{"version":3,"sources":["../../src/loyalty-referral-v1-referral-reward-rewards.http.ts","../../src/loyalty-referral-v1-referral-reward-rewards.types.ts","../../src/loyalty-referral-v1-referral-reward-rewards.meta.ts"],"sourcesContent":["import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixLoyaltyReferralRewardV1ReferralRewardsUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'api._api_base_domain_': [\n      {\n        srcPath: '/referral-rewards',\n        destPath: '',\n      },\n    ],\n    'manage._base_domain_': [\n      {\n        srcPath: '/_api/referral-rewards',\n        destPath: '',\n      },\n    ],\n    _: [\n      {\n        srcPath: '/_api/referral-rewards',\n        destPath: '',\n      },\n    ],\n    'editor._base_domain_': [\n      {\n        srcPath: '/_api/referral-rewards',\n        destPath: '',\n      },\n    ],\n    'blocks._base_domain_': [\n      {\n        srcPath: '/_api/referral-rewards',\n        destPath: '',\n      },\n    ],\n    'create.editorx': [\n      {\n        srcPath: '/_api/referral-rewards',\n        destPath: '',\n      },\n    ],\n    'www._base_domain_': [\n      {\n        srcPath: '/_api/referral-rewards',\n        destPath: '',\n      },\n    ],\n    'www.wixapis.com': [\n      {\n        srcPath: '/_api/referral-rewards',\n        destPath: '',\n      },\n    ],\n    '*.dev.wix-code.com': [\n      {\n        srcPath: '/_api/referral-rewards',\n        destPath: '',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_referral_rewards';\n\n/** Retrieves a referral reward. */\nexport function getReferralReward(payload: object): RequestOptionsFactory<any> {\n  function __getReferralReward({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.loyalty.referral.v1.referral_reward',\n      method: 'GET' as any,\n      methodFqn:\n        'wix.loyalty.referral.reward.v1.ReferralRewards.GetReferralReward',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixLoyaltyReferralRewardV1ReferralRewardsUrl({\n        protoPath: '/v1/referral-rewards/{id}',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'referralReward.createdDate' },\n              { path: 'referralReward.updatedDate' },\n            ],\n          },\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              {\n                path: 'referralReward.coupon.couponSpecification.minimumSubtotal',\n              },\n              {\n                path: 'referralReward.coupon.couponSpecification.fixedAmountOptions.amount',\n              },\n              {\n                path: 'referralReward.coupon.couponSpecification.percentageOptions.percentage',\n              },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __getReferralReward;\n}\n\n/**\n * Creates a query to retrieve a list of referral rewards.\n *\n * The `queryReferralRewards()` function builds a query to retrieve a list of events and returns a `ReferralRewardsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the `find()` function.\n *\n * You can refine the query by chaining `ReferralRewardsQueryBuilder` functions onto the query. `ReferralRewardsQueryBuilder` functions enable you to sort, filter, and control the results `queryReferralRewards()` returns.\n *\n * `queryReferralRewards()` runs with these `ReferralRewardsQueryBuilder` defaults, which you can override:\n *\n * - `limit(50)`\n * - `descending(\"_createdDate\")`\n *\n * The functions that are chained to `queryReferralRewards()` are applied in the order they're called. For example, if you apply ascending('rewardedReferredFriendId') and then descending('rewardType'), the results are sorted first by the referred friend ID, and then, if there are multiple results with the same ID, the items are sorted by reward type.\n */\nexport function queryReferralRewards(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __queryReferralRewards({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.loyalty.referral.v1.referral_reward',\n      method: 'POST' as any,\n      methodFqn:\n        'wix.loyalty.referral.reward.v1.ReferralRewards.QueryReferralRewards',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixLoyaltyReferralRewardV1ReferralRewardsUrl({\n        protoPath: '/v1/referral-rewards/query',\n        data: payload,\n        host,\n      }),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'referralRewards.createdDate' },\n              { path: 'referralRewards.updatedDate' },\n            ],\n          },\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              {\n                path: 'referralRewards.coupon.couponSpecification.minimumSubtotal',\n              },\n              {\n                path: 'referralRewards.coupon.couponSpecification.fixedAmountOptions.amount',\n              },\n              {\n                path: 'referralRewards.coupon.couponSpecification.percentageOptions.percentage',\n              },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __queryReferralRewards;\n}\n\n/**\n * Retrieves rewards from all metasites that the caller is the member of.\n *\n * This method must be called with a [user identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities#wix-users).\n */\nexport function bulkGetReferralRewards(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __bulkGetReferralRewards({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.loyalty.referral.v1.referral_reward',\n      method: 'GET' as any,\n      methodFqn:\n        'wix.loyalty.referral.reward.v1.ReferralRewards.BulkGetReferralRewards',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixLoyaltyReferralRewardV1ReferralRewardsUrl({\n        protoPath: '/v1/bulk/referral-rewards',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'rewardsInSite.rewards.createdDate' },\n              { path: 'rewardsInSite.rewards.updatedDate' },\n            ],\n          },\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              {\n                path: 'rewardsInSite.rewards.coupon.couponSpecification.minimumSubtotal',\n              },\n              {\n                path: 'rewardsInSite.rewards.coupon.couponSpecification.fixedAmountOptions.amount',\n              },\n              {\n                path: 'rewardsInSite.rewards.coupon.couponSpecification.percentageOptions.percentage',\n              },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __bulkGetReferralRewards;\n}\n","export interface ReferralReward\n  extends ReferralRewardReceiverOneOf,\n    ReferralRewardRewardTypeOptionsOneOf {\n  /**\n   * ID of the referring customer who received the reward.\n   * @format GUID\n   * @readonly\n   */\n  rewardedReferringCustomerId?: string;\n  /**\n   * ID of the referred friend who received the reward.\n   * @format GUID\n   * @readonly\n   */\n  rewardedReferredFriendId?: string;\n  /** Details of a coupon reward. Present when `rewardType` is `COUPON`. */\n  coupon?: V1Coupon;\n  /** Details of a loyalty points reward. Present when `rewardType` is `LOYALTY_POINTS`. */\n  loyaltyPoints?: V1LoyaltyPoints;\n  /**\n   * Referral reward ID.\n   * @format GUID\n   * @readonly\n   */\n  id?: string | null;\n  /**\n   * Revision number, which increments by 1 each time the referral reward is updated.\n   * To prevent conflicting changes, the current revision must be passed when updating the referral reward.\n   * @immutable\n   */\n  revision?: string | null;\n  /**\n   * Date and time the referral reward was created.\n   * @readonly\n   */\n  createdDate?: Date | null;\n  /**\n   * Date and time the referral reward was last updated.\n   * @readonly\n   */\n  updatedDate?: Date | null;\n  /** Type of reward given. */\n  rewardType?: RewardTypeTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface ReferralRewardReceiverOneOf {\n  /**\n   * ID of the referring customer who received the reward.\n   * @format GUID\n   * @readonly\n   */\n  rewardedReferringCustomerId?: string;\n  /**\n   * ID of the referred friend who received the reward.\n   * @format GUID\n   * @readonly\n   */\n  rewardedReferredFriendId?: string;\n}\n\n/** @oneof */\nexport interface ReferralRewardRewardTypeOptionsOneOf {\n  /** Details of a coupon reward. Present when `rewardType` is `COUPON`. */\n  coupon?: V1Coupon;\n  /** Details of a loyalty points reward. Present when `rewardType` is `LOYALTY_POINTS`. */\n  loyaltyPoints?: V1LoyaltyPoints;\n}\n\nexport enum RewardTypeType {\n  /** Unknown reward type. */\n  UNKNOWN = 'UNKNOWN',\n  /** Loyalty coupon is given. */\n  COUPON = 'COUPON',\n  /** Loyalty points are awarded. */\n  LOYALTY_POINTS = 'LOYALTY_POINTS',\n  /** No reward is given. */\n  NOTHING = 'NOTHING',\n}\n\n/** @enumType */\nexport type RewardTypeTypeWithLiterals =\n  | RewardTypeType\n  | 'UNKNOWN'\n  | 'COUPON'\n  | 'LOYALTY_POINTS'\n  | 'NOTHING';\n\nexport interface V1Coupon {\n  /**\n   * Coupon ID. Example: `8934b045-7052-4a90-be2b-832c70afc9da`.\n   * @format GUID\n   * @readonly\n   */\n  id?: string;\n  /**\n   * The code that customers can use to apply the coupon. Example: `6RFD2A3HSPXW`.\n   * @readonly\n   */\n  code?: string;\n  /**\n   * Current status of the coupon.\n   * @readonly\n   */\n  status?: StatusWithLiterals;\n  /**\n   * Detailed specifications of the coupon.\n   * @readonly\n   */\n  couponSpecification?: Coupon;\n}\n\nexport enum Status {\n  /** Coupon status is unknown or not specified. */\n  UNKNOWN = 'UNKNOWN',\n  /** Coupon is active and can be applied to purchases. */\n  ACTIVE = 'ACTIVE',\n  /** Coupon was applied and can't be used again. */\n  APPLIED = 'APPLIED',\n  /** Coupon was deleted and is no longer valid. */\n  DELETED = 'DELETED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n  | Status\n  | 'UNKNOWN'\n  | 'ACTIVE'\n  | 'APPLIED'\n  | 'DELETED';\n\nexport interface Coupon\n  extends CouponDiscountTypeOptionsOneOf,\n    CouponScopeOrMinSubtotalOneOf {\n  /** Options for fixed amount discount. */\n  fixedAmountOptions?: FixedAmountDiscount;\n  /** Options for percentage discounts. */\n  percentageOptions?: PercentageDiscount;\n  /** Limit the coupon to carts with a subtotal above this number. */\n  minimumSubtotal?: number;\n  /** Specifies the type of line items this coupon will apply to. See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */\n  scope?: CouponScope;\n  /**\n   * Coupon name.\n   * @minLength 1\n   * @maxLength 50\n   */\n  name?: string;\n  /** Coupon discount type. */\n  discountType?: DiscountTypeWithLiterals;\n  /**\n   * Whether the coupon is limited to one item.\n   * If `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.\n   * Coupons with a bookings `scope.namespace` are always limited to one item.\n   */\n  limitedToOneItem?: boolean | null;\n  /** Whether the coupon applies to subscription products. */\n  appliesToSubscriptions?: boolean | null;\n  /**\n   * Specifies the amount of discounted cycles for a subscription item.\n   *\n   * - Can only be set when `scope.namespace = pricingPlans`.\n   * - If `discountedCycleCount` is empty, the coupon applies to all available cycles.\n   * - `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.\n   *\n   * Max: `999`\n   */\n  discountedCycleCount?: number | null;\n}\n\n/** @oneof */\nexport interface CouponDiscountTypeOptionsOneOf {\n  /** Options for fixed amount discount. */\n  fixedAmountOptions?: FixedAmountDiscount;\n  /** Options for percentage discounts. */\n  percentageOptions?: PercentageDiscount;\n}\n\n/** @oneof */\nexport interface CouponScopeOrMinSubtotalOneOf {\n  /** Limit the coupon to carts with a subtotal above this number. */\n  minimumSubtotal?: number;\n  /** Specifies the type of line items this coupon will apply to. See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */\n  scope?: CouponScope;\n}\n\nexport enum DiscountType {\n  /** Unknown discount type. */\n  UNKNOWN = 'UNKNOWN',\n  /** Discount as a fixed amount. */\n  FIXED_AMOUNT = 'FIXED_AMOUNT',\n  /** Discount as a percentage. */\n  PERCENTAGE = 'PERCENTAGE',\n  /** Free shipping. If `true`, the coupon applies to all items in all `namespaces`. */\n  FREE_SHIPPING = 'FREE_SHIPPING',\n}\n\n/** @enumType */\nexport type DiscountTypeWithLiterals =\n  | DiscountType\n  | 'UNKNOWN'\n  | 'FIXED_AMOUNT'\n  | 'PERCENTAGE'\n  | 'FREE_SHIPPING';\n\nexport interface FixedAmountDiscount {\n  /**\n   * Amount of the discount as a fixed value.\n   * @min 0.01\n   */\n  amount?: number;\n}\n\nexport interface PercentageDiscount {\n  /**\n   * Percentage of discount.\n   * @max 100\n   */\n  percentage?: number;\n}\n\nexport interface CouponScope {\n  /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */\n  namespace?: string;\n  /** Coupon scope's applied group, for example, Event or ticket in Wix Events. */\n  group?: Group;\n}\n\nexport interface Group {\n  /** Name of the group. */\n  name?: string;\n  /** Entity ID of the group. */\n  entityId?: string | null;\n}\n\nexport interface V1LoyaltyPoints {\n  /**\n   * Loyalty transaction ID.\n   * @format GUID\n   * @readonly\n   */\n  transactionId?: string;\n  /**\n   * The number of loyalty points awarded.\n   * @readonly\n   */\n  amount?: number;\n}\n\nexport interface GetReferralRewardRequest {\n  /**\n   * Referral reward ID.\n   * @format GUID\n   */\n  id: string;\n}\n\nexport interface GetReferralRewardResponse {\n  /** Retrieved referral reward. */\n  referralReward?: ReferralReward;\n}\n\nexport interface QueryReferralRewardsRequest {\n  /** Query to filter referral rewards. */\n  query: CursorQuery;\n  /** Contact ID to filter rewards by. Use `\"me\"` for current identity's rewards. */\n  contactId?: string | null;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n  /**\n   * Cursor paging options.\n   *\n   * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n   */\n  cursorPaging?: CursorPaging;\n  /**\n   * Filter object.\n   *\n   * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).\n   */\n  filter?: Record<string, any> | null;\n  /**\n   * Sort object.\n   *\n   * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).\n   * @maxSize 5\n   */\n  sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n  /**\n   * Cursor paging options.\n   *\n   * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n   */\n  cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n  /**\n   * Name of the field to sort by.\n   * @maxLength 512\n   */\n  fieldName?: string;\n  /** Sort order. */\n  order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n  ASC = 'ASC',\n  DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n  /**\n   * Maximum number of items to return in the results.\n   * @max 100\n   */\n  limit?: number | null;\n  /**\n   * Pointer to the next or previous page in the list of results.\n   *\n   * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n   * Not relevant for the first request.\n   * @maxLength 16000\n   */\n  cursor?: string | null;\n}\n\nexport interface QueryReferralRewardsResponse {\n  /** Retrieved referral rewards. */\n  referralRewards?: ReferralReward[];\n  /** Metadata for paging. */\n  metadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n  /** Number of items returned in current page. */\n  count?: number | null;\n  /** Cursor strings that point to the next page, previous page, or both. */\n  cursors?: Cursors;\n  /**\n   * Whether there are more pages to retrieve following the current page.\n   *\n   * + `true`: Another page of results can be retrieved.\n   * + `false`: This is the last page.\n   */\n  hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n  /**\n   * Cursor string pointing to the next page in the list of results.\n   * @maxLength 16000\n   */\n  next?: string | null;\n  /**\n   * Cursor pointing to the previous page in the list of results.\n   * @maxLength 16000\n   */\n  prev?: string | null;\n}\n\nexport interface ValidateReferralRewardRequest {\n  /** Reward to validate. */\n  reward?: Reward;\n}\n\nexport interface Reward extends RewardOptionsOneOf {\n  /** Options for coupon reward type. */\n  couponOptions?: Coupon;\n  /** Options for the Loyalty points reward type. */\n  loyaltyPointsOptions?: LoyaltyPoints;\n  /** Type of the reward. */\n  type?: TypeWithLiterals;\n}\n\n/** @oneof */\nexport interface RewardOptionsOneOf {\n  /** Options for coupon reward type. */\n  couponOptions?: Coupon;\n  /** Options for the Loyalty points reward type. */\n  loyaltyPointsOptions?: LoyaltyPoints;\n}\n\nexport enum Type {\n  /** Unknown reward type. */\n  UNKNOWN = 'UNKNOWN',\n  /** Coupon reward type. */\n  COUPON = 'COUPON',\n  /** Loyalty points reward type. */\n  LOYALTY_POINTS = 'LOYALTY_POINTS',\n  /** No reward type. */\n  NOTHING = 'NOTHING',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n  | Type\n  | 'UNKNOWN'\n  | 'COUPON'\n  | 'LOYALTY_POINTS'\n  | 'NOTHING';\n\nexport interface LoyaltyPoints {\n  /**\n   * Number of loyalty points to give.\n   * @min 1\n   * @max 9999999\n   */\n  amount?: number;\n}\n\nexport interface ValidateReferralRewardResponse {}\n\nexport interface BulkGetReferralRewardsRequest {}\n\nexport interface BulkGetReferralRewardsResponse {\n  /** Rewards grouped by site. */\n  rewardsInSite?: RewardsInSite[];\n}\n\nexport interface RewardsInSite {\n  /**\n   * Metasite ID.\n   * @format GUID\n   */\n  metaSiteId?: string;\n  /** List of rewards for the site. */\n  rewards?: ReferralReward[];\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n  createdEvent?: EntityCreatedEvent;\n  updatedEvent?: EntityUpdatedEvent;\n  deletedEvent?: EntityDeletedEvent;\n  actionEvent?: ActionEvent;\n  /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n  id?: string;\n  /**\n   * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n   * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n   */\n  entityFqdn?: string;\n  /**\n   * Event action name, placed at the top level to make it easier for users to dispatch messages.\n   * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n   */\n  slug?: string;\n  /** ID of the entity associated with the event. */\n  entityId?: string;\n  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n  eventTime?: Date | null;\n  /**\n   * Whether the event was triggered as a result of a privacy regulation application\n   * (for example, GDPR).\n   */\n  triggeredByAnonymizeRequest?: boolean | null;\n  /** If present, indicates the action that triggered the event. */\n  originatedFrom?: string | null;\n  /**\n   * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n   * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n   */\n  entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n  createdEvent?: EntityCreatedEvent;\n  updatedEvent?: EntityUpdatedEvent;\n  deletedEvent?: EntityDeletedEvent;\n  actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n  entityAsJson?: string;\n  /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n  restoreInfo?: RestoreInfo;\n}\n\nexport interface RestoreInfo {\n  deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n  /**\n   * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n   * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n   * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n   */\n  currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n  /** Entity that was deleted. */\n  deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n  bodyAsJson?: string;\n}\n\nexport interface Empty {}\n\nexport interface SuccessfulReferralEvent {\n  /** Details of the referred friend who completed their referral. */\n  referredFriendDetails?: ReferredFriendDetails;\n}\n\nexport interface ReferredFriendDetails {\n  /**\n   * ID of the referred friend.\n   * @format GUID\n   * @readonly\n   */\n  referredFriendId?: string;\n  /**\n   * Contact ID of the referred friend.\n   * @format GUID\n   * @readonly\n   */\n  contactId?: string;\n  /**\n   * ID of the customer who referred this friend.\n   * @format GUID\n   * @readonly\n   */\n  referringCustomerId?: string;\n}\n\nexport interface MessageEnvelope {\n  /**\n   * App instance ID.\n   * @format GUID\n   */\n  instanceId?: string | null;\n  /**\n   * Event type.\n   * @maxLength 150\n   */\n  eventType?: string;\n  /** The identification type and identity data. */\n  identity?: IdentificationData;\n  /** Stringify payload. */\n  data?: string;\n  /** Details related to the account */\n  accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n  /**\n   * ID of a site visitor that has not logged in to the site.\n   * @format GUID\n   */\n  anonymousVisitorId?: string;\n  /**\n   * ID of a site visitor that has logged in to the site.\n   * @format GUID\n   */\n  memberId?: string;\n  /**\n   * ID of a Wix user (site owner, contributor, etc.).\n   * @format GUID\n   */\n  wixUserId?: string;\n  /**\n   * ID of an app.\n   * @format GUID\n   */\n  appId?: string;\n  /** @readonly */\n  identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n  /**\n   * ID of a site visitor that has not logged in to the site.\n   * @format GUID\n   */\n  anonymousVisitorId?: string;\n  /**\n   * ID of a site visitor that has logged in to the site.\n   * @format GUID\n   */\n  memberId?: string;\n  /**\n   * ID of a Wix user (site owner, contributor, etc.).\n   * @format GUID\n   */\n  wixUserId?: string;\n  /**\n   * ID of an app.\n   * @format GUID\n   */\n  appId?: string;\n}\n\nexport enum WebhookIdentityType {\n  UNKNOWN = 'UNKNOWN',\n  ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n  MEMBER = 'MEMBER',\n  WIX_USER = 'WIX_USER',\n  APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n  | WebhookIdentityType\n  | 'UNKNOWN'\n  | 'ANONYMOUS_VISITOR'\n  | 'MEMBER'\n  | 'WIX_USER'\n  | 'APP';\n\nexport interface AccountInfo {\n  /**\n   * ID of the Wix account associated with the event.\n   * @format GUID\n   */\n  accountId?: string | null;\n  /**\n   * ID of the parent Wix account. Only included when accountId belongs to a child account.\n   * @format GUID\n   */\n  parentAccountId?: string | null;\n  /**\n   * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n   * @format GUID\n   */\n  siteId?: string | null;\n}\n","import * as ambassadorWixLoyaltyReferralV1ReferralReward from './loyalty-referral-v1-referral-reward-rewards.http.js';\nimport * as ambassadorWixLoyaltyReferralV1ReferralRewardTypes from './loyalty-referral-v1-referral-reward-rewards.types.js';\nimport * as ambassadorWixLoyaltyReferralV1ReferralRewardUniversalTypes from './loyalty-referral-v1-referral-reward-rewards.universal.js';\n\nexport type __PublicMethodMetaInfo<\n  K = string,\n  M = unknown,\n  T = unknown,\n  S = unknown,\n  Q = unknown,\n  R = unknown\n> = {\n  getUrl: (context: any) => string;\n  httpMethod: K;\n  path: string;\n  pathParams: M;\n  __requestType: T;\n  __originalRequestType: S;\n  __responseType: Q;\n  __originalResponseType: R;\n};\n\nexport function getReferralReward(): __PublicMethodMetaInfo<\n  'GET',\n  { id: string },\n  ambassadorWixLoyaltyReferralV1ReferralRewardUniversalTypes.GetReferralRewardRequest,\n  ambassadorWixLoyaltyReferralV1ReferralRewardTypes.GetReferralRewardRequest,\n  ambassadorWixLoyaltyReferralV1ReferralRewardUniversalTypes.GetReferralRewardResponse,\n  ambassadorWixLoyaltyReferralV1ReferralRewardTypes.GetReferralRewardResponse\n> {\n  const payload = { id: ':id' } as any;\n\n  const getRequestOptions =\n    ambassadorWixLoyaltyReferralV1ReferralReward.getReferralReward(payload);\n\n  const getUrl = (context: any): string => {\n    const { url } = getRequestOptions(context);\n    return url!;\n  };\n\n  return {\n    getUrl,\n    httpMethod: 'GET',\n    path: '/v1/referral-rewards/{id}',\n    pathParams: { id: 'id' },\n    __requestType: null as any,\n    __originalRequestType: null as any,\n    __responseType: null as any,\n    __originalResponseType: null as any,\n  };\n}\n\nexport function queryReferralRewards(): __PublicMethodMetaInfo<\n  'POST',\n  {},\n  ambassadorWixLoyaltyReferralV1ReferralRewardUniversalTypes.QueryReferralRewardsRequest,\n  ambassadorWixLoyaltyReferralV1ReferralRewardTypes.QueryReferralRewardsRequest,\n  ambassadorWixLoyaltyReferralV1ReferralRewardUniversalTypes.QueryReferralRewardsResponse,\n  ambassadorWixLoyaltyReferralV1ReferralRewardTypes.QueryReferralRewardsResponse\n> {\n  const payload = {} as any;\n\n  const getRequestOptions =\n    ambassadorWixLoyaltyReferralV1ReferralReward.queryReferralRewards(payload);\n\n  const getUrl = (context: any): string => {\n    const { url } = getRequestOptions(context);\n    return url!;\n  };\n\n  return {\n    getUrl,\n    httpMethod: 'POST',\n    path: '/v1/referral-rewards/query',\n    pathParams: {},\n    __requestType: null as any,\n    __originalRequestType: null as any,\n    __responseType: null as any,\n    __originalResponseType: null as any,\n  };\n}\n\nexport function bulkGetReferralRewards(): __PublicMethodMetaInfo<\n  'GET',\n  {},\n  ambassadorWixLoyaltyReferralV1ReferralRewardUniversalTypes.BulkGetReferralRewardsRequest,\n  ambassadorWixLoyaltyReferralV1ReferralRewardTypes.BulkGetReferralRewardsRequest,\n  ambassadorWixLoyaltyReferralV1ReferralRewardUniversalTypes.BulkGetReferralRewardsResponse,\n  ambassadorWixLoyaltyReferralV1ReferralRewardTypes.BulkGetReferralRewardsResponse\n> {\n  const payload = {} as any;\n\n  const getRequestOptions =\n    ambassadorWixLoyaltyReferralV1ReferralReward.bulkGetReferralRewards(\n      payload\n    );\n\n  const getUrl = (context: any): string => {\n    const { url } = getRequestOptions(context);\n    return url!;\n  };\n\n  return {\n    getUrl,\n    httpMethod: 'GET',\n    path: '/v1/bulk/referral-rewards',\n    pathParams: {},\n    __requestType: null as any,\n    __originalRequestType: null as any,\n    __responseType: null as any,\n    __originalResponseType: null as any,\n  };\n}\n\nexport {\n  ReferralReward as ReferralRewardOriginal,\n  ReferralRewardReceiverOneOf as ReferralRewardReceiverOneOfOriginal,\n  ReferralRewardRewardTypeOptionsOneOf as ReferralRewardRewardTypeOptionsOneOfOriginal,\n  RewardTypeType as RewardTypeTypeOriginal,\n  RewardTypeTypeWithLiterals as RewardTypeTypeWithLiteralsOriginal,\n  V1Coupon as V1CouponOriginal,\n  Status as StatusOriginal,\n  StatusWithLiterals as StatusWithLiteralsOriginal,\n  Coupon as CouponOriginal,\n  CouponDiscountTypeOptionsOneOf as CouponDiscountTypeOptionsOneOfOriginal,\n  CouponScopeOrMinSubtotalOneOf as CouponScopeOrMinSubtotalOneOfOriginal,\n  DiscountType as DiscountTypeOriginal,\n  DiscountTypeWithLiterals as DiscountTypeWithLiteralsOriginal,\n  FixedAmountDiscount as FixedAmountDiscountOriginal,\n  PercentageDiscount as PercentageDiscountOriginal,\n  CouponScope as CouponScopeOriginal,\n  Group as GroupOriginal,\n  V1LoyaltyPoints as V1LoyaltyPointsOriginal,\n  GetReferralRewardRequest as GetReferralRewardRequestOriginal,\n  GetReferralRewardResponse as GetReferralRewardResponseOriginal,\n  QueryReferralRewardsRequest as QueryReferralRewardsRequestOriginal,\n  CursorQuery as CursorQueryOriginal,\n  CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal,\n  Sorting as SortingOriginal,\n  SortOrder as SortOrderOriginal,\n  SortOrderWithLiterals as SortOrderWithLiteralsOriginal,\n  CursorPaging as CursorPagingOriginal,\n  QueryReferralRewardsResponse as QueryReferralRewardsResponseOriginal,\n  CursorPagingMetadata as CursorPagingMetadataOriginal,\n  Cursors as CursorsOriginal,\n  ValidateReferralRewardRequest as ValidateReferralRewardRequestOriginal,\n  Reward as RewardOriginal,\n  RewardOptionsOneOf as RewardOptionsOneOfOriginal,\n  Type as TypeOriginal,\n  TypeWithLiterals as TypeWithLiteralsOriginal,\n  LoyaltyPoints as LoyaltyPointsOriginal,\n  ValidateReferralRewardResponse as ValidateReferralRewardResponseOriginal,\n  BulkGetReferralRewardsRequest as BulkGetReferralRewardsRequestOriginal,\n  BulkGetReferralRewardsResponse as BulkGetReferralRewardsResponseOriginal,\n  RewardsInSite as RewardsInSiteOriginal,\n  DomainEvent as DomainEventOriginal,\n  DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n  EntityCreatedEvent as EntityCreatedEventOriginal,\n  RestoreInfo as RestoreInfoOriginal,\n  EntityUpdatedEvent as EntityUpdatedEventOriginal,\n  EntityDeletedEvent as EntityDeletedEventOriginal,\n  ActionEvent as ActionEventOriginal,\n  Empty as EmptyOriginal,\n  SuccessfulReferralEvent as SuccessfulReferralEventOriginal,\n  ReferredFriendDetails as ReferredFriendDetailsOriginal,\n  MessageEnvelope as MessageEnvelopeOriginal,\n  IdentificationData as IdentificationDataOriginal,\n  IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n  WebhookIdentityType as WebhookIdentityTypeOriginal,\n  WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n  AccountInfo as AccountInfoOriginal,\n} from './loyalty-referral-v1-referral-reward-rewards.types.js';\n"],"mappings":";AAAA,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,oDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAA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,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,SAAM;AALI,SAAAA;AAAA,GAAA;;;ACvkBL,SAASC,qBAOd;AACA,QAAM,UAAU,EAAE,IAAI,MAAM;AAE5B,QAAM,oBACyC,kBAAkB,OAAO;AAExE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,IAAI,KAAK;AAAA,IACvB,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,wBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACyC,qBAAqB,OAAO;AAE3E,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,0BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACyC;AAAA,IAC3C;AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["payload","RewardTypeType","Status","DiscountType","SortOrder","Type","WebhookIdentityType","getReferralReward","queryReferralRewards","bulkGetReferralRewards"]}