@wix/auto_sdk_referral_programs 1.0.105 → 1.0.106

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/loyalty-referral-v1-program-programs.public.ts","../../src/loyalty-referral-v1-program-programs.universal.ts","../../src/loyalty-referral-v1-program-programs.http.ts","../../src/loyalty-referral-v1-program-programs.context.ts"],"sourcesContent":["export * from './src/loyalty-referral-v1-program-programs.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\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 { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n ActivateReferralProgramResponse,\n BulkGetReferralProgramResponse,\n GenerateAISocialMediaPostsSuggestionsResponse,\n GenerateAiSocialMediaPostsSuggestionsOptions,\n GetAISocialMediaPostsSuggestionsResponse,\n GetAiSocialMediaPostsSuggestionsOptions,\n GetReferralProgramPremiumFeaturesResponse,\n GetReferralProgramResponse,\n PauseReferralProgramResponse,\n ProgramUpdatedEnvelope,\n ReferralProgram,\n UpdateReferralProgramResponse,\n activateReferralProgram as universalActivateReferralProgram,\n bulkGetReferralProgram as universalBulkGetReferralProgram,\n generateAiSocialMediaPostsSuggestions as universalGenerateAiSocialMediaPostsSuggestions,\n getAiSocialMediaPostsSuggestions as universalGetAiSocialMediaPostsSuggestions,\n getReferralProgram as universalGetReferralProgram,\n getReferralProgramPremiumFeatures as universalGetReferralProgramPremiumFeatures,\n pauseReferralProgram as universalPauseReferralProgram,\n updateReferralProgram as universalUpdateReferralProgram,\n} from './loyalty-referral-v1-program-programs.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/referral' };\n\nexport function getReferralProgram(\n httpClient: HttpClient\n): GetReferralProgramSignature {\n return () =>\n universalGetReferralProgram(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetReferralProgramSignature {\n /**\n * Retrieves the referral program.\n */\n (): Promise<\n NonNullablePaths<\n GetReferralProgramResponse,\n | `referralProgram.status`\n | `referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount`\n | `referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage`\n | `referralProgram.referredFriendReward.couponOptions.minimumSubtotal`\n | `referralProgram.referredFriendReward.couponOptions.scope.namespace`\n | `referralProgram.referredFriendReward.couponOptions.scope.group.name`\n | `referralProgram.referredFriendReward.couponOptions.name`\n | `referralProgram.referredFriendReward.couponOptions.discountType`\n | `referralProgram.referredFriendReward.loyaltyPointsOptions.amount`\n | `referralProgram.referredFriendReward.type`\n | `referralProgram.successfulReferralActions`\n | `referralProgram.emails.encourageToReferFriends`\n | `referralProgram.emails.notifyCustomersAboutReward`\n | `referralProgram.premiumFeatures.referralProgram`,\n 7\n >\n >;\n}\n\n/** @internal */\nexport function bulkGetReferralProgram(\n httpClient: HttpClient\n): BulkGetReferralProgramSignature {\n return () =>\n universalBulkGetReferralProgram(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkGetReferralProgramSignature {\n /**\n * Retrieves multiple referral programs for all metasites that the caller is the member of.\n *\n * Must be called with a [user identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities#identity-types).\n */\n (): Promise<\n NonNullablePaths<\n BulkGetReferralProgramResponse,\n | `programInSites`\n | `programInSites.${number}.metaSiteId`\n | `programInSites.${number}.referralProgram.status`\n | `programInSites.${number}.referralProgram.referredFriendReward.type`\n | `programInSites.${number}.referralProgram.emails.notifyCustomersAboutReward`\n | `programInSites.${number}.referralProgram.premiumFeatures.referralProgram`,\n 6\n >\n >;\n}\n\nexport function updateReferralProgram(\n httpClient: HttpClient\n): UpdateReferralProgramSignature {\n return (referralProgram: NonNullablePaths<ReferralProgram, `revision`, 2>) =>\n universalUpdateReferralProgram(\n referralProgram,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateReferralProgramSignature {\n /**\n * Updates a referral program. Supports partial updates.\n *\n * Revision number, which increments by 1 each time the referral program is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the referral program.\n * @param - Referral program to update. Include the latest `revision` for a successful update.\n */\n (referralProgram: NonNullablePaths<ReferralProgram, `revision`, 2>): Promise<\n NonNullablePaths<\n UpdateReferralProgramResponse,\n | `referralProgram.status`\n | `referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount`\n | `referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage`\n | `referralProgram.referredFriendReward.couponOptions.minimumSubtotal`\n | `referralProgram.referredFriendReward.couponOptions.scope.namespace`\n | `referralProgram.referredFriendReward.couponOptions.scope.group.name`\n | `referralProgram.referredFriendReward.couponOptions.name`\n | `referralProgram.referredFriendReward.couponOptions.discountType`\n | `referralProgram.referredFriendReward.loyaltyPointsOptions.amount`\n | `referralProgram.referredFriendReward.type`\n | `referralProgram.successfulReferralActions`\n | `referralProgram.emails.encourageToReferFriends`\n | `referralProgram.emails.notifyCustomersAboutReward`\n | `referralProgram.premiumFeatures.referralProgram`,\n 7\n >\n >;\n}\n\nexport function activateReferralProgram(\n httpClient: HttpClient\n): ActivateReferralProgramSignature {\n return () =>\n universalActivateReferralProgram(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ActivateReferralProgramSignature {\n /**\n * Activates the referral program, changing its status to `ACTIVE`.\n */\n (): Promise<\n NonNullablePaths<\n ActivateReferralProgramResponse,\n | `referralProgram.status`\n | `referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount`\n | `referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage`\n | `referralProgram.referredFriendReward.couponOptions.minimumSubtotal`\n | `referralProgram.referredFriendReward.couponOptions.scope.namespace`\n | `referralProgram.referredFriendReward.couponOptions.scope.group.name`\n | `referralProgram.referredFriendReward.couponOptions.name`\n | `referralProgram.referredFriendReward.couponOptions.discountType`\n | `referralProgram.referredFriendReward.loyaltyPointsOptions.amount`\n | `referralProgram.referredFriendReward.type`\n | `referralProgram.successfulReferralActions`\n | `referralProgram.emails.encourageToReferFriends`\n | `referralProgram.emails.notifyCustomersAboutReward`\n | `referralProgram.premiumFeatures.referralProgram`,\n 7\n >\n >;\n}\n\nexport function pauseReferralProgram(\n httpClient: HttpClient\n): PauseReferralProgramSignature {\n return () =>\n universalPauseReferralProgram(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface PauseReferralProgramSignature {\n /**\n * Pauses the referral program, changing its status to `PAUSED`.\n */\n (): Promise<\n NonNullablePaths<\n PauseReferralProgramResponse,\n | `referralProgram.status`\n | `referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount`\n | `referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage`\n | `referralProgram.referredFriendReward.couponOptions.minimumSubtotal`\n | `referralProgram.referredFriendReward.couponOptions.scope.namespace`\n | `referralProgram.referredFriendReward.couponOptions.scope.group.name`\n | `referralProgram.referredFriendReward.couponOptions.name`\n | `referralProgram.referredFriendReward.couponOptions.discountType`\n | `referralProgram.referredFriendReward.loyaltyPointsOptions.amount`\n | `referralProgram.referredFriendReward.type`\n | `referralProgram.successfulReferralActions`\n | `referralProgram.emails.encourageToReferFriends`\n | `referralProgram.emails.notifyCustomersAboutReward`\n | `referralProgram.premiumFeatures.referralProgram`,\n 7\n >\n >;\n}\n\nexport function getAiSocialMediaPostsSuggestions(\n httpClient: HttpClient\n): GetAiSocialMediaPostsSuggestionsSignature {\n return (options?: GetAiSocialMediaPostsSuggestionsOptions) =>\n universalGetAiSocialMediaPostsSuggestions(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetAiSocialMediaPostsSuggestionsSignature {\n /**\n * Retrieves pre-generated AI social media post suggestions for promoting the referral program.\n *\n * This method returns a list of AI-generated social media post suggestions that site owners or members can use to promote the referral program. You can display these suggestions to allow referring customers to easily copy and share them on their preferred social media platforms.\n *\n * >**Note**: This method retrieves existing suggestions. To generate new ones,\n * use Generate AI Social Media Posts Suggestions.\n */\n (options?: GetAiSocialMediaPostsSuggestionsOptions): Promise<\n NonNullablePaths<\n GetAISocialMediaPostsSuggestionsResponse,\n `suggestions` | `suggestions.${number}.postContent`,\n 4\n >\n >;\n}\n\nexport function generateAiSocialMediaPostsSuggestions(\n httpClient: HttpClient\n): GenerateAiSocialMediaPostsSuggestionsSignature {\n return (options?: GenerateAiSocialMediaPostsSuggestionsOptions) =>\n universalGenerateAiSocialMediaPostsSuggestions(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateAiSocialMediaPostsSuggestionsSignature {\n /**\n * Creates new AI-generated social media post suggestions for promoting the referral program.\n *\n * This method generates new AI-powered social media post suggestions for promoting the referral program. Use it to refresh content or create alternatives to existing suggestions.\n *\n * >**Note**: This method generates new suggestions each time it's called. To retrieve existing suggestions without generating new ones, use Get AI Social Media Posts Suggestions.\n */\n (options?: GenerateAiSocialMediaPostsSuggestionsOptions): Promise<\n NonNullablePaths<\n GenerateAISocialMediaPostsSuggestionsResponse,\n `suggestions` | `suggestions.${number}.postContent`,\n 4\n >\n >;\n}\n\nexport function getReferralProgramPremiumFeatures(\n httpClient: HttpClient\n): GetReferralProgramPremiumFeaturesSignature {\n return () =>\n universalGetReferralProgramPremiumFeatures(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetReferralProgramPremiumFeaturesSignature {\n /**\n * Retrieves information about the enabled premium features for the referral program.\n */\n (): Promise<\n NonNullablePaths<\n GetReferralProgramPremiumFeaturesResponse,\n `referralProgram`,\n 2\n >\n >;\n}\n\nexport const onProgramUpdated = EventDefinition(\n 'wix.loyalty.referral.v1.program_updated',\n true,\n (event: ProgramUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'entity.referredFriendReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'entity.referredFriendReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'entity.referredFriendReward.couponOptions.percentageOptions.percentage',\n },\n {\n path: 'entity.referringCustomerReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'entity.referringCustomerReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'entity.referringCustomerReward.couponOptions.percentageOptions.percentage',\n },\n ],\n },\n ])\n )\n)<ProgramUpdatedEnvelope>();\n\nexport {\n AISocialMediaPostSuggestion,\n Action,\n ActionEvent,\n ActivateReferralProgramRequest,\n ActivateReferralProgramResponse,\n App,\n BaseEventMetadata,\n BillingReference,\n BulkGetReferralProgramRequest,\n BulkGetReferralProgramResponse,\n CancellationDetails,\n ContractSwitchReason,\n ContractSwitchType,\n ContractSwitched,\n Coupon,\n CouponDiscountTypeOptionsOneOf,\n CouponScope,\n CouponScopeOrMinSubtotalOneOf,\n Cycle,\n CycleCycleSelectorOneOf,\n DiscountType,\n DomainEvent,\n DomainEventBodyOneOf,\n Emails,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n FixedAmountDiscount,\n GenerateAISocialMediaPostsSuggestionsRequest,\n GenerateAISocialMediaPostsSuggestionsResponse,\n GenerateAiSocialMediaPostsSuggestionsOptions,\n GetAISocialMediaPostsSuggestionsRequest,\n GetAISocialMediaPostsSuggestionsResponse,\n GetAiSocialMediaPostsSuggestionsOptions,\n GetReferralProgramPremiumFeaturesRequest,\n GetReferralProgramPremiumFeaturesResponse,\n GetReferralProgramRequest,\n GetReferralProgramResponse,\n Group,\n HtmlSitePublished,\n IdentificationData,\n IdentificationDataIdOneOf,\n Initiator,\n Interval,\n IntervalUnit,\n LoyaltyPoints,\n MessageEnvelope,\n OneTime,\n Page,\n PauseReferralProgramRequest,\n PauseReferralProgramResponse,\n PercentageDiscount,\n PremiumFeatures,\n PriceIncreaseTrigger,\n ProductAdjustment,\n ProductPriceIncreaseData,\n ProgramInSite,\n ProgramStatus,\n ProgramUpdatedEnvelope,\n ProviderName,\n ReactivationData,\n ReactivationReasonEnum,\n RecurringChargeAttemptFailed,\n RecurringChargeSucceeded,\n ReferralAppInstallation,\n ReferralProgram,\n RefundType,\n RestoreInfo,\n Reward,\n RewardOptionsOneOf,\n RewardType,\n Subscription,\n SubscriptionAssigned,\n SubscriptionAutoRenewTurnedOff,\n SubscriptionAutoRenewTurnedOn,\n SubscriptionCancelled,\n SubscriptionCreated,\n SubscriptionEvent,\n SubscriptionEventEventOneOf,\n SubscriptionNearEndOfPeriod,\n SubscriptionPendingChange,\n SubscriptionStatus,\n SubscriptionTransferred,\n SubscriptionUnassigned,\n Type,\n UnassignReason,\n UpdateReferralProgramRequest,\n UpdateReferralProgramResponse,\n WebhookIdentityType,\n} from './loyalty-referral-v1-program-programs.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixLoyaltyReferralV1Program from './loyalty-referral-v1-program-programs.http.js';\n\nexport interface ReferralProgram {\n /**\n * Referral program name.\n * @minLength 2\n * @maxLength 50\n */\n name?: string | null;\n /** @readonly */\n status?: ProgramStatusWithLiterals;\n /**\n * Revision number, which increments by 1 each time the program is updated.\n * To prevent conflicting changes, the current `revision` must be passed when updating the program.\n * @immutable\n */\n revision?: string | null;\n /**\n * Date and time the program was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the program was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Reward configuration for the referred friend.\n * Specifies the reward given to a new customer who was referred to the business.\n */\n referredFriendReward?: Reward;\n /**\n * Reward configuration for the referring customer.\n * Specifies the reward given to an existing customer who referred a new customer to the business.\n */\n referringCustomerReward?: Reward;\n /**\n * List of actions that complete a referral. For an action to be considered successful, the referred friend must place and pay for an item.\n * @maxSize 100\n */\n successfulReferralActions?: ActionWithLiterals[];\n /** Configures email notifications for the referral program. */\n emails?: Emails;\n /**\n * Indicates which premium features are available for the current account.\n * @readonly\n */\n premiumFeatures?: PremiumFeatures;\n}\n\n/** Status of the referral program. */\nexport enum ProgramStatus {\n /** Unknown program status. */\n UNKNOWN = 'UNKNOWN',\n /** Referral program is in a draft state and is being modified. It is not yet active. */\n DRAFT = 'DRAFT',\n /** Referral program is active. */\n ACTIVE = 'ACTIVE',\n /** Referral program is paused. */\n PAUSED = 'PAUSED',\n}\n\n/** @enumType */\nexport type ProgramStatusWithLiterals =\n | ProgramStatus\n | 'UNKNOWN'\n | 'DRAFT'\n | 'ACTIVE'\n | 'PAUSED';\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?: RewardTypeWithLiterals;\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 RewardType {\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 RewardTypeWithLiterals =\n | RewardType\n | 'UNKNOWN'\n | 'COUPON'\n | 'LOYALTY_POINTS'\n | 'NOTHING';\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 LoyaltyPoints {\n /**\n * Number of loyalty points to give.\n * @min 1\n * @max 9999999\n */\n amount?: number;\n}\n\nexport enum Action {\n /** Unknown action. */\n UNKNOWN = 'UNKNOWN',\n /** Referred friend ordered and paid for an order in a store. */\n STORE_ORDER_PLACED = 'STORE_ORDER_PLACED',\n /** Referred friend ordered and paid for a plan. */\n PLAN_ORDERED = 'PLAN_ORDERED',\n /** Referred friend ordered and paid for a ticket. */\n TICKET_ORDERED = 'TICKET_ORDERED',\n /** Referred friend booked and paid for a session. */\n SESSION_BOOKED = 'SESSION_BOOKED',\n /** Referred friend placed and paid for a restaurant order. */\n RESTAURANT_ORDER_PLACED = 'RESTAURANT_ORDER_PLACED',\n /** Referred friend joined an online program. */\n ONLINE_PROGRAM_JOINED = 'ONLINE_PROGRAM_JOINED',\n}\n\n/** @enumType */\nexport type ActionWithLiterals =\n | Action\n | 'UNKNOWN'\n | 'STORE_ORDER_PLACED'\n | 'PLAN_ORDERED'\n | 'TICKET_ORDERED'\n | 'SESSION_BOOKED'\n | 'RESTAURANT_ORDER_PLACED'\n | 'ONLINE_PROGRAM_JOINED';\n\nexport interface Emails {\n /** Configures email invitations to encourage customers to refer their friends. Select the apps for which this feature is enabled. */\n encourageToReferFriends?: AppWithLiterals[];\n /**\n * Whether to send email notifications to referring customers when they receive a referral reward.\n * If true, referring customers will be notified by email when their referred friend completes a qualifying action (for example, placing an order).\n */\n notifyCustomersAboutReward?: boolean;\n}\n\nexport enum App {\n /** Unknown app. */\n UNKNOWN = 'UNKNOWN',\n /** Send an email to customers who've placed an order with stores. */\n STORES = 'STORES',\n /** Send an email to customers who've placed an order with pricing plans. */\n PRICING_PLANS = 'PRICING_PLANS',\n /** Send an email to customers who've placed an order with events. */\n EVENTS = 'EVENTS',\n /** Send an email to customers who've placed an order with bookings. */\n BOOKINGS = 'BOOKINGS',\n /** Send an email to customers who've placed an order with restaurants. */\n RESTAURANTS = 'RESTAURANTS',\n /** Send an email to customers who've joined an online program. */\n ONLINE_PROGRAMS = 'ONLINE_PROGRAMS',\n}\n\n/** @enumType */\nexport type AppWithLiterals =\n | App\n | 'UNKNOWN'\n | 'STORES'\n | 'PRICING_PLANS'\n | 'EVENTS'\n | 'BOOKINGS'\n | 'RESTAURANTS'\n | 'ONLINE_PROGRAMS';\n\nexport interface PremiumFeatures {\n /**\n * Whether the site owner has access to the referral program feature.\n * @readonly\n */\n referralProgram?: boolean;\n}\n\nexport interface GetReferralProgramRequest {}\n\nexport interface GetReferralProgramResponse {\n /** Retrieved referral program. */\n referralProgram?: ReferralProgram;\n}\n\nexport interface BulkGetReferralProgramRequest {}\n\nexport interface BulkGetReferralProgramResponse {\n /** Retrieved referral programs. */\n programInSites?: ProgramInSite[];\n}\n\nexport interface ProgramInSite {\n /**\n * Metasite ID.\n * @format GUID\n */\n metaSiteId?: string;\n /** Retrieved referral program. */\n referralProgram?: ReferralProgram;\n}\n\nexport interface UpdateReferralProgramRequest {\n /** Referral program to update. Include the latest `revision` for a successful update. */\n referralProgram: ReferralProgram;\n}\n\nexport interface UpdateReferralProgramResponse {\n /** Updated referral program. */\n referralProgram?: ReferralProgram;\n}\n\nexport interface ActivateReferralProgramRequest {}\n\nexport interface ActivateReferralProgramResponse {\n /** Activated referral program. */\n referralProgram?: ReferralProgram;\n}\n\nexport interface PauseReferralProgramRequest {}\n\nexport interface PauseReferralProgramResponse {\n /** Paused referral program. */\n referralProgram?: ReferralProgram;\n}\n\nexport interface GetAISocialMediaPostsSuggestionsRequest {\n /**\n * Topic to generate social media post suggestions for. For example, fitness, education, or technology.\n * @maxLength 512\n */\n topic?: string;\n}\n\nexport interface GetAISocialMediaPostsSuggestionsResponse {\n /**\n * Generated social media post suggestions.\n * @maxSize 3\n */\n suggestions?: AISocialMediaPostSuggestion[];\n /**\n * Referral URL to refer friends.\n * @maxLength 2083\n */\n referFriendsPageUrl?: string | null;\n}\n\nexport interface AISocialMediaPostSuggestion {\n /**\n * Suggested post content.\n * @maxLength 4096\n */\n postContent?: string;\n /**\n * Suggested hashtags.\n * @maxLength 256\n * @maxSize 256\n */\n hashtags?: string[];\n}\n\nexport interface GenerateAISocialMediaPostsSuggestionsRequest {\n /**\n * Topic to generate social media post suggestions for. For example, fitness, education, or technology.\n * @maxLength 512\n */\n topic?: string;\n}\n\nexport interface GenerateAISocialMediaPostsSuggestionsResponse {\n /**\n * Generated social media post suggestions.\n * @maxSize 3\n */\n suggestions?: AISocialMediaPostSuggestion[];\n /**\n * Referral URL to refer friends.\n * @maxLength 2083\n */\n referFriendsPageUrl?: string | null;\n}\n\nexport interface GetReferralProgramPremiumFeaturesRequest {}\n\nexport interface GetReferralProgramPremiumFeaturesResponse {\n /**\n * Whether the site has the referral program feature enabled.\n * @readonly\n */\n referralProgram?: boolean;\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 entity?: string;\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 currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface HtmlSitePublished {\n /**\n * Application instance ID\n * @maxLength 50\n */\n appInstanceId?: string;\n /**\n * Application type\n * @maxLength 100\n */\n appType?: string;\n /** Revision */\n revision?: string;\n /**\n * MSID\n * @maxLength 100\n */\n metaSiteId?: string | null;\n /**\n * optional branch id if publish is done from branch\n * @format GUID\n */\n branchId?: string | null;\n /** The site's last transactionId */\n lastTransactionId?: string | null;\n /** A list of the site's pages */\n pages?: Page[];\n /** Site's publish date */\n publishDate?: string;\n /** Determine if this message was produced by editor-deployments service */\n originatedFromDeploymentsService?: boolean;\n}\n\nexport interface Page {\n /**\n * Page's Id\n * @maxLength 100\n */\n _id?: string;\n}\n\nexport interface SubscriptionEvent extends SubscriptionEventEventOneOf {\n /** Triggered when a subscription is created. */\n created?: SubscriptionCreated;\n /**\n * Triggered when a subscription is assigned to a Wix site, including the initial\n * assignment of a floating subscription or a re-assignement from a different site.\n */\n assigned?: SubscriptionAssigned;\n /** Triggered when a subscription is canceled. */\n cancelled?: SubscriptionCancelled;\n /** Triggered when the subscription's auto renew is turned on. */\n autoRenewTurnedOn?: SubscriptionAutoRenewTurnedOn;\n /** Triggered when the subscription's auto renew is turned off. */\n autoRenewTurnedOff?: SubscriptionAutoRenewTurnedOff;\n /**\n * Triggered when a subscription is unassigned from a Wix site and becomes\n * floating.\n */\n unassigned?: SubscriptionUnassigned;\n /**\n * Triggered when a subscription is transferred from one Wix account to another.\n * A transfer includes cancelling the original subscription and creating a new\n * subscription for the target account. The event returns both the original\n * and the new subscription.\n */\n transferred?: SubscriptionTransferred;\n /** Triggered when a recurring charge succeeds for a subscription. */\n recurringChargeSucceeded?: RecurringChargeSucceeded;\n /**\n * Triggered when a subscription was updated including when its product has been\n * up- or downgraded or the billing cycle is changed.\n */\n contractSwitched?: ContractSwitched;\n /**\n * Triggered when a subscription gets close to the end of its billing cycle.\n * The exact number of days is defined in the billing system.\n */\n nearEndOfPeriod?: SubscriptionNearEndOfPeriod;\n /**\n * Triggered when a subscription is updated and the change doesn't happen\n * immediately but at the end of the current billing cycle.\n */\n pendingChange?: SubscriptionPendingChange;\n /** Triggered when a recurring charge attempt fails for a subscription. */\n recurringChargeAttemptFailed?: RecurringChargeAttemptFailed;\n /**\n * ID of the subscription's event.\n * @format GUID\n */\n eventId?: string | null;\n /**\n * Date and time of the event in\n * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)\n * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n */\n eventDate?: Date | null;\n}\n\n/** @oneof */\nexport interface SubscriptionEventEventOneOf {\n /** Triggered when a subscription is created. */\n created?: SubscriptionCreated;\n /**\n * Triggered when a subscription is assigned to a Wix site, including the initial\n * assignment of a floating subscription or a re-assignement from a different site.\n */\n assigned?: SubscriptionAssigned;\n /** Triggered when a subscription is canceled. */\n cancelled?: SubscriptionCancelled;\n /** Triggered when the subscription's auto renew is turned on. */\n autoRenewTurnedOn?: SubscriptionAutoRenewTurnedOn;\n /** Triggered when the subscription's auto renew is turned off. */\n autoRenewTurnedOff?: SubscriptionAutoRenewTurnedOff;\n /**\n * Triggered when a subscription is unassigned from a Wix site and becomes\n * floating.\n */\n unassigned?: SubscriptionUnassigned;\n /**\n * Triggered when a subscription is transferred from one Wix account to another.\n * A transfer includes cancelling the original subscription and creating a new\n * subscription for the target account. The event returns both the original\n * and the new subscription.\n */\n transferred?: SubscriptionTransferred;\n /** Triggered when a recurring charge succeeds for a subscription. */\n recurringChargeSucceeded?: RecurringChargeSucceeded;\n /**\n * Triggered when a subscription was updated including when its product has been\n * up- or downgraded or the billing cycle is changed.\n */\n contractSwitched?: ContractSwitched;\n /**\n * Triggered when a subscription gets close to the end of its billing cycle.\n * The exact number of days is defined in the billing system.\n */\n nearEndOfPeriod?: SubscriptionNearEndOfPeriod;\n /**\n * Triggered when a subscription is updated and the change doesn't happen\n * immediately but at the end of the current billing cycle.\n */\n pendingChange?: SubscriptionPendingChange;\n /** Triggered when a recurring charge attempt fails for a subscription. */\n recurringChargeAttemptFailed?: RecurringChargeAttemptFailed;\n}\n\n/** Triggered when a subscription is created. */\nexport interface SubscriptionCreated {\n /** Created subscription. */\n subscription?: Subscription;\n /** Metadata for the `created` event. */\n metadata?: Record<string, string>;\n /**\n * Subscription reactivation data.\n * A subscription can be reactivated for example if it was incorrectly canceled because of fraud and then reactivated\n * by the billing system\n */\n reactivationData?: ReactivationData;\n}\n\n/**\n * A subscription holds information about a Premium product that a Wix account\n * owner has purchased including details about the billing.\n */\nexport interface Subscription {\n /**\n * ID of the subscription.\n * @format GUID\n */\n _id?: string;\n /**\n * ID of the Wix account that purchased the subscription.\n * @format GUID\n */\n userId?: string;\n /**\n * ID of the [product](https://bo.wix.com/wix-docs/rest/premium/premium-product-catalog-v2/products/product-object)\n * for which the subscription was purchased.\n * @format GUID\n */\n productId?: string;\n /**\n * Date and time the subscription was created in\n * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)\n * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n */\n createdAt?: Date | null;\n /**\n * Date and time the subscription was last updated in\n * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)\n * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n */\n updatedAt?: Date | null;\n /**\n * ID of the metasite that the subscription is assigned to.\n * Available only when the subscription is assigned to a Wix site.\n * Subscriptions for account level products can't be assigned to a Wix site.\n * @format GUID\n */\n metaSiteId?: string | null;\n /** Information about the system that manages the subscription's billing. */\n billingReference?: BillingReference;\n /** Information about the billing cycle of the subscription. */\n cycle?: Cycle;\n /**\n * Subscription status.\n *\n * + `UNKNOWN`: Default status.\n * + `AUTO_RENEW_ON`: Subscription is active and automatically renews at the end of the current billing cycle.\n * + `AUTO_RENEW_OFF`: Subscription is active but expires at the end of the current billing cycle.\n * + `MANUAL_RECURRING`: Subscription is active and renews at the end of the current billing cycle, in case the customer takes an action related to the payment.\n * + `CANCELLED`: Subscription isn't active because it has been canceled.\n * + `TRANSFERRED`: Subscription isn't active because it has been transferred to a different account. A different active subscription was created for the target account.\n */\n status?: SubscriptionStatusWithLiterals;\n /**\n * Date and time the subscription was last transferred from one Wix account to\n * another in\n * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)\n * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n */\n transferredAt?: Date | null;\n /**\n * ID of the [product type](https://bo.wix.com/wix-docs/rest/premium/premium-product-catalog-v2/product-types/product-type-object)\n * that the product, for which the subscription was purchased, belongs to.\n * @format GUID\n */\n productTypeId?: string;\n /** Version number, which increments by 1 each time the subscription is updated. */\n version?: number;\n /**\n * Whether the subscription is active. Includes the statuses\n * `\"AUTO_RENEW_ON\"`, `\"AUTO_RENEW_OFF\"`, and `\"MANUAL_RECURRING\"`.\n */\n active?: boolean;\n /**\n * Date and time the subscription was originally created in\n * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)\n * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * Differs from `createdAt` in case the subscription was originally created for a different Wix account and has been transferred.\n */\n originalCreationDate?: Date | null;\n /** Custom metadata about the subscription. */\n metadata?: Record<string, string>;\n /**\n * 2-letter country code in\n * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\n * format.\n */\n countryCode?: string | null;\n /**\n * Seats of the product that the subscription was purchased for.\n * Will be Null for products that don't support seats.\n * @min 1\n * @max 500\n */\n seats?: number | null;\n}\n\nexport interface BillingReference {\n /**\n * Name of the billing system that manages the subscription.\n *\n * + `\"UNKNOWN\"`: Default value.\n * + `\"SBS\"`: [Wix Billing](https://github.com/wix-p/premium-billing/tree/master/sbs).\n * + `\"LICENSER\"`:\n * + `\"BASS\"`: [Billing and Subscriptions System](https://dev.wix.com/docs/rest/internal-only/premium/subscriptions-by-billing-by-wix/introduction).\n * + `\"RESELLER\"`: [External Reseller](https://dev.wix.com/api/rest/account-level-apis/resellers/introduction).\n */\n providerName?: ProviderNameWithLiterals;\n /** Current provider reference ID. */\n providerReferenceId?: string | null;\n /** Previous provider reference IDs. Used for when a subscription is extended, specifically for domains. */\n previousProviderReferenceIds?: string[];\n}\n\nexport enum ProviderName {\n UNKNOWN = 'UNKNOWN',\n SBS = 'SBS',\n LICENSER = 'LICENSER',\n BASS = 'BASS',\n RESELLER = 'RESELLER',\n RECURRING_INVOICES = 'RECURRING_INVOICES',\n}\n\n/** @enumType */\nexport type ProviderNameWithLiterals =\n | ProviderName\n | 'UNKNOWN'\n | 'SBS'\n | 'LICENSER'\n | 'BASS'\n | 'RESELLER'\n | 'RECURRING_INVOICES';\n\nexport interface Cycle extends CycleCycleSelectorOneOf {\n /** repetitive interval */\n interval?: Interval;\n /** one time */\n oneTime?: OneTime;\n}\n\n/** @oneof */\nexport interface CycleCycleSelectorOneOf {\n /** repetitive interval */\n interval?: Interval;\n /** one time */\n oneTime?: OneTime;\n}\n\nexport interface Interval {\n /** interval unit of measure */\n unit?: IntervalUnitWithLiterals;\n /** number of interval */\n count?: number;\n}\n\nexport enum IntervalUnit {\n /** unknown interval unit */\n UNKNOWN = 'UNKNOWN',\n /** day */\n DAY = 'DAY',\n /** week */\n WEEK = 'WEEK',\n /** month */\n MONTH = 'MONTH',\n /** year */\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type IntervalUnitWithLiterals =\n | IntervalUnit\n | 'UNKNOWN'\n | 'DAY'\n | 'WEEK'\n | 'MONTH'\n | 'YEAR';\n\nexport interface OneTime {}\n\nexport enum SubscriptionStatus {\n UNKNOWN = 'UNKNOWN',\n AUTO_RENEW_ON = 'AUTO_RENEW_ON',\n AUTO_RENEW_OFF = 'AUTO_RENEW_OFF',\n MANUAL_RECURRING = 'MANUAL_RECURRING',\n CANCELLED = 'CANCELLED',\n TRANSFERRED = 'TRANSFERRED',\n}\n\n/** @enumType */\nexport type SubscriptionStatusWithLiterals =\n | SubscriptionStatus\n | 'UNKNOWN'\n | 'AUTO_RENEW_ON'\n | 'AUTO_RENEW_OFF'\n | 'MANUAL_RECURRING'\n | 'CANCELLED'\n | 'TRANSFERRED';\n\n/** Triggered when a subscription is reactivated. */\nexport interface ReactivationData {\n reactivationReason?: ReactivationReasonEnumWithLiterals;\n /**\n * In the event of reactivation after chargeback dispute, the subscription may be extended according to the\n * number of days it was inactive during the time of resolving the dispute\n */\n newEndOfPeriod?: Date | null;\n /** The original end date, before the inactive period. */\n oldEndOfPeriod?: Date | null;\n /** The difference in days between the new new_end_of_period and old_end_of_period */\n differenceInDays?: number | null;\n}\n\n/** Reason for subscription reactivation */\nexport enum ReactivationReasonEnum {\n UNKNOWN = 'UNKNOWN',\n /**\n * Subscription was reactivated due to billing status change from CANCELED to ACTIVE, for example if it was incorrectly\n * canceled because of suspicion of fraud\n */\n BILLING_STATUS_CHANGE = 'BILLING_STATUS_CHANGE',\n /** Subscription was reactivated after a chargeback dispute */\n REACTIVATED_AFTER_CHARGEBACK = 'REACTIVATED_AFTER_CHARGEBACK',\n}\n\n/** @enumType */\nexport type ReactivationReasonEnumWithLiterals =\n | ReactivationReasonEnum\n | 'UNKNOWN'\n | 'BILLING_STATUS_CHANGE'\n | 'REACTIVATED_AFTER_CHARGEBACK';\n\n/**\n * Triggered when a subscription is assigned to a Wix site, including the initial\n * assignment of a floating subscription or a re-assignement from a different site.\n */\nexport interface SubscriptionAssigned {\n /** Assigned subscription. */\n subscription?: Subscription;\n /**\n * ID of the metasite that the subscription has been assigned to before the update.\n * @format GUID\n */\n previousMetaSiteId?: string | null;\n}\n\n/** Triggered when a subscription is canceled. */\nexport interface SubscriptionCancelled {\n /** Canceled subscription. */\n subscription?: Subscription;\n /** Details about the cancellation including who canceled the subscription and why. */\n cancellationDetails?: CancellationDetails;\n /**\n * Whether the subscription is canceled immediately or expires at the end of the current billing cycle.\n *\n * Default: `false`\n */\n immediateCancel?: boolean;\n /** Whether the subscription was canceled during the free trial period. */\n canceledInFreeTrial?: boolean;\n /** The type of refund applied to the cancellation. */\n refundType?: RefundTypeWithLiterals;\n}\n\n/** Information about the cancellation flow including who canceled the subscription and why it was canceled. */\nexport interface CancellationDetails {\n /**\n * Cancellation code.\n *\n * Values supported for cancellations on behalf of the billing system: `-1`, `-2`, `-3`, `-4`, `-5`, `-6`, `-7`, `-8`.\n * For cancellations on behalf of the site owner or the service provider `cancellationCode`\n * is taken from the request of\n * [Cancel Immediately Offline](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/cancel-immediately-offline).\n *\n * + `-1`: The subscription has been cancelled by the billing system but none of the listed cancellation reasons applies.\n * + `-2`: There were payment problems.\n * + `-3`: There was a chargeback.\n * + `-4`: Customer support has canceled the subscription and issued a refund.\n * + `-5`: The site owner has changed their existing subscription.\n * + `-6`: The subscription has been transferred to a different Wix account.\n * + `-7`: The subscription has been canceled because the site owner hasn't manually authenticated the recurring payment during the subscription's grace period. For example, site owners must manually confirm recurring payments within 40 days when paying with boleto.\n * + `-8`: The Wix account that the subscription belonged to has been deleted.\n */\n cancellationCode?: number | null;\n /**\n * Cancellation reason. For cancellations on behalf of the site owner or the service provider `cancellationReason`\n * is taken from the request of\n * [Cancel Immediately Offline](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/cancel-immediately-offline).\n * For cancellations on behalf of the billing system `cancellationReason` is `null` or an empty string.\n */\n cancellationReason?: string | null;\n /**\n * Initiator of the cancellation. For `\"USER_REQUESTED\"` and `\"APP_MANAGED\"`,\n * `cancellationCode` and `cancellationReason` are taken from the request of\n * [Cancel Immediately](https://dev.wix.com/docs/rest/account-level/premium/premium-subscriptions-manager/subscription-v1/cancel-immediately)\n * or [Cancel Immediately Offline](https://dev.wix.com/docs/rest/account-level/premium/premium-subscriptions-manager/subscription-v1/cancel-immediately-offline).\n * For `\"PASSIVE\"`, cancellations `cancellationCode` is automatically calculated and `cancellationReason`\n * is `null` or an empty string.\n *\n * + `\"UNKNOWN`: Default value.\n * + `\"USER_REQUESTED\"`: The Wix account owner has canceled the subscription.\n * + `\"APP_MANAGED\"`: The service provider has canceled the subscription.\n * + `\"PASSIVE\"`: The billing system has canceled the subscription. For example, in case of payment failure or fraud.\n */\n initiator?: InitiatorWithLiterals;\n}\n\nexport enum Initiator {\n UNKNOWN = 'UNKNOWN',\n USER_REQUESTED = 'USER_REQUESTED',\n APP_MANAGED = 'APP_MANAGED',\n PASSIVE = 'PASSIVE',\n}\n\n/** @enumType */\nexport type InitiatorWithLiterals =\n | Initiator\n | 'UNKNOWN'\n | 'USER_REQUESTED'\n | 'APP_MANAGED'\n | 'PASSIVE';\n\nexport enum RefundType {\n UNKNOWN = 'UNKNOWN',\n NO_REFUND = 'NO_REFUND',\n FULL_REFUND = 'FULL_REFUND',\n PRORATED_REFUND = 'PRORATED_REFUND',\n}\n\n/** @enumType */\nexport type RefundTypeWithLiterals =\n | RefundType\n | 'UNKNOWN'\n | 'NO_REFUND'\n | 'FULL_REFUND'\n | 'PRORATED_REFUND';\n\n/** Triggered when the subscription's auto renew is turned on. */\nexport interface SubscriptionAutoRenewTurnedOn {\n /** Subscription for which auto renew is turned on. */\n subscription?: Subscription;\n /**\n * Supported values: `USER`, `APP`.\n *\n * Information about who turned auto renew on.\n * + `\"USER\"`: The site owner who purchased the subscription has turned auto renew on.\n * + `\"APP\"`: The service provider has turned auto renew on.\n */\n initiator?: string | null;\n}\n\n/** Triggered when the subscription's auto renew is turned off. */\nexport interface SubscriptionAutoRenewTurnedOff {\n /** Subscription for which auto renew is turned off. */\n subscription?: Subscription;\n /** Details about the cancellation including who canceled the subscription and why. */\n cancellationDetails?: CancellationDetails;\n /**\n * Whether the subscription is immediately canceled or expires at the end of the current billing cycle.\n *\n * Default: `false`\n */\n immediateCancel?: boolean;\n}\n\n/**\n * Triggered when a subscription is unassigned from a Wix site and becomes\n * floating.\n */\nexport interface SubscriptionUnassigned {\n /** Unassigned subscription. */\n subscription?: Subscription;\n /**\n * ID of the metasite that the subscription has been assigned to before the event.\n * @format GUID\n */\n previousMetaSiteId?: string;\n /**\n * Reason why the subscription is unassigned.\n *\n * + `\"UNKNOWN\"`: Default value.\n * + `\"USER_REQUESTED\"`: The Wix account owner has unassigned the subscription.\n * + `\"REPLACED_BY_ANOTHER_SUBSCRIPTION\"`: A different subscription that replaces this subscription is assigned to the site.\n */\n unassignReason?: UnassignReasonWithLiterals;\n}\n\nexport enum UnassignReason {\n UNKNOWN = 'UNKNOWN',\n USER_REQUESTED = 'USER_REQUESTED',\n REPLACED_BY_ANOTHER_SUBSCRIPTION = 'REPLACED_BY_ANOTHER_SUBSCRIPTION',\n}\n\n/** @enumType */\nexport type UnassignReasonWithLiterals =\n | UnassignReason\n | 'UNKNOWN'\n | 'USER_REQUESTED'\n | 'REPLACED_BY_ANOTHER_SUBSCRIPTION';\n\n/**\n * Triggered when a subscription is transferred from one Wix account to another.\n * A transfer includes cancelling the original subscription and creating a new\n * subscription for the target account. The event returns both the original\n * and the new subscription.\n */\nexport interface SubscriptionTransferred {\n /** Original subscription that was canceled for the transfer. */\n originSubscription?: Subscription;\n /** Newly created subscription for the target account. */\n targetSubscription?: Subscription;\n}\n\n/** Triggered when a recurring charge succeeds for a subscription. */\nexport interface RecurringChargeSucceeded {\n /** Subscription for which the recurring charge has succeeded. */\n subscription?: Subscription;\n /** Indication that there was a successful charge at the end of the free trial period */\n freeTrialPeriodEnd?: boolean;\n}\n\n/**\n * Triggered when a subscription was updated including when its product has been\n * up- or downgraded or the billing cycle is changed.\n */\nexport interface ContractSwitched {\n /** Updated subscription. */\n subscription?: Subscription;\n /** Billing cycle before the update. */\n previousCycle?: Cycle;\n /**\n * ID of the product belonging to the subscription before the update.\n * @format GUID\n */\n previousProductId?: string;\n /**\n * ID of the product type that the subscription's original product belonged to before the update.\n * @format GUID\n */\n previousProductTypeId?: string;\n /**\n * Update type. __Note__: Doesn't include information about a product adjustment.\n * For that purpose, see `productAdjustment`.\n *\n * + `\"NOT_APPLICABLE\"`: Default value.\n * + `\"ADDITIONAL_QUANTITY\"`: An increased usage quota is added to the subscription. For example, a second mailbox is added to a subscription that previously included a single mailbox.\n * + `\"CREDIT_UNUSED_PERIOD\"`: The subscription is upgraded and the new price is less than the regular price. The new price applies to every billing cycle, not just the first cycle.\n * + `\"REFUND_PRICE_DIFF\"`: Not implemented.\n * + `\"ADJUST_PERIOD_END\"`: Not implemented.\n * + `\"DOWNGRADE_GRACE_PERIOD\"`: For downgrades during the grace period. In this situation, the site owner hasn’t paid yet and must immediately pay for the downgraded subscription.\n * + `\"FULL_AMOUNT_PERIOD\"`: For upgrades in which the site owner retains unused benefits. For example, site owners upgrading a Facebook Ads subscription retain their unused FB Ads credit. The unused credit is added to the new credit.\n * + `\"END_OF_PERIOD\"`: The subscription's billing current cycle is extended because of a downgrade.\n * + `\"PENDING_CHANGES\"`: The subscription's billing is updated, but the change doesn't apply immediately. Instead, the update becomes effective at the end of current billing cycle.\n * + `\"DOWNGRADE_RENEWAL\"`: The subscription is downgraded because of a declined payment. This prevents subscriptions from churning.\n */\n contractSwitchType?: ContractSwitchTypeWithLiterals;\n /**\n * ID of the metasite the subscription has been assigned to previously.\n * Available only in case the subscription is assigned to a different site.\n * @format GUID\n */\n previousMetaSiteId?: string | null;\n /**\n * Update reason.\n *\n * + `\"PRICE_INCREASE\"`: The subscription's price has been increased.\n * + `\"EXTERNAL_PROVIDER_TRIGGER\"`: Any reason other than a price increase.\n */\n contractSwitchReason?: ContractSwitchReasonWithLiterals;\n /** Information about the price update. Available only for updates with a price increase. */\n productPriceIncreaseData?: ProductPriceIncreaseData;\n /**\n * Information about a product adjustment. For example, a downgrade.\n * __Note__: This isn't the same as `contractSwitchType`.\n *\n * + `NOT_APPLICABLE`: There is no information about whether the product has been up- or downgraded.\n * + `DOWNGRADE`: The product has been downgraded.\n */\n productAdjustment?: ProductAdjustmentWithLiterals;\n /**\n * Number of seats before the contract switch.\n * @min 1\n * @max 500\n */\n previousSeats?: number | null;\n}\n\n/** Copied from SBS */\nexport enum ContractSwitchType {\n NOT_APPLICABLE = 'NOT_APPLICABLE',\n ADDITIONAL_QUANTITY = 'ADDITIONAL_QUANTITY',\n CREDIT_UNUSED_PERIOD = 'CREDIT_UNUSED_PERIOD',\n REFUND_PRICE_DIFF = 'REFUND_PRICE_DIFF',\n ADJUST_PERIOD_END = 'ADJUST_PERIOD_END',\n DOWNGRADE_GRACE_PERIOD = 'DOWNGRADE_GRACE_PERIOD',\n FULL_AMOUNT_PERIOD = 'FULL_AMOUNT_PERIOD',\n END_OF_PERIOD = 'END_OF_PERIOD',\n PENDING_CHANGES = 'PENDING_CHANGES',\n DOWNGRADE_RENEWAL = 'DOWNGRADE_RENEWAL',\n FIXED_BILLING_DATE_PRORATION = 'FIXED_BILLING_DATE_PRORATION',\n}\n\n/** @enumType */\nexport type ContractSwitchTypeWithLiterals =\n | ContractSwitchType\n | 'NOT_APPLICABLE'\n | 'ADDITIONAL_QUANTITY'\n | 'CREDIT_UNUSED_PERIOD'\n | 'REFUND_PRICE_DIFF'\n | 'ADJUST_PERIOD_END'\n | 'DOWNGRADE_GRACE_PERIOD'\n | 'FULL_AMOUNT_PERIOD'\n | 'END_OF_PERIOD'\n | 'PENDING_CHANGES'\n | 'DOWNGRADE_RENEWAL'\n | 'FIXED_BILLING_DATE_PRORATION';\n\nexport enum ContractSwitchReason {\n EXTERNAL_PROVIDER_TRIGGER = 'EXTERNAL_PROVIDER_TRIGGER',\n PRICE_INCREASE = 'PRICE_INCREASE',\n}\n\n/** @enumType */\nexport type ContractSwitchReasonWithLiterals =\n | ContractSwitchReason\n | 'EXTERNAL_PROVIDER_TRIGGER'\n | 'PRICE_INCREASE';\n\n/** Triggered when a subscription's price is increased. */\nexport interface ProductPriceIncreaseData {\n /**\n * Price of the subscription before the update.\n * @format DECIMAL_VALUE\n */\n previousPrice?: string | null;\n /** A value that is used in order to select the correct email template to send the user regarding the price increase. */\n emailTemplateSelector?: string | null;\n /** Used to differentiate between migration segments. Does not have to be unique per segment. */\n segmentName?: string | null;\n /** Used to determine how the price increase was triggered. */\n priceIncreaseTrigger?: PriceIncreaseTriggerWithLiterals;\n}\n\n/** Reason for Price Increase Trigger */\nexport enum PriceIncreaseTrigger {\n NEAR_RENEWAL = 'NEAR_RENEWAL',\n RECURRING_SUCCESS = 'RECURRING_SUCCESS',\n MANUAL = 'MANUAL',\n}\n\n/** @enumType */\nexport type PriceIncreaseTriggerWithLiterals =\n | PriceIncreaseTrigger\n | 'NEAR_RENEWAL'\n | 'RECURRING_SUCCESS'\n | 'MANUAL';\n\n/** Triggered when a subscription's product is adusted. */\nexport enum ProductAdjustment {\n /** flag to show that the ContractSwitchedEvent is not applicable / needed */\n NOT_APPLICABLE = 'NOT_APPLICABLE',\n /** flag to show that the ContractSwitchedEvent is a Downgrade */\n DOWNGRADE = 'DOWNGRADE',\n}\n\n/** @enumType */\nexport type ProductAdjustmentWithLiterals =\n | ProductAdjustment\n | 'NOT_APPLICABLE'\n | 'DOWNGRADE';\n\n/**\n * Triggered when a subscription gets close to the end of its billing cycle.\n * The exact number of days is defined in the billing system.\n */\nexport interface SubscriptionNearEndOfPeriod {\n /** Subscription that got close to the end of its billing cycle. */\n subscription?: Subscription;\n /** Whether the subscription is within the free trial period. */\n inFreeTrial?: boolean;\n}\n\n/**\n * Triggered when a subscription is updated and the change doesn't happen\n * immediately but at the end of the current billing cycle.\n */\nexport interface SubscriptionPendingChange {\n /** Subscription for which a pending update is triggered. */\n subscription?: Subscription;\n}\n\n/** Triggered when a recurring charge attempt failed for a subscription. */\nexport interface RecurringChargeAttemptFailed {\n /** Subscription for which the recurring charge attempt has failed. */\n subscription?: Subscription;\n}\n\nexport interface ReferralAppInstallation {\n type?: TypeWithLiterals;\n}\n\nexport enum Type {\n UNSPECIFIED = 'UNSPECIFIED',\n INSTALLED = 'INSTALLED',\n DELETED = 'DELETED',\n}\n\n/** @enumType */\nexport type TypeWithLiterals = Type | 'UNSPECIFIED' | 'INSTALLED' | 'DELETED';\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}\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 BaseEventMetadata {\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}\n\nexport interface EventMetadata extends BaseEventMetadata {\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\nexport interface ProgramUpdatedEnvelope {\n entity: ReferralProgram;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a referral program is updated.\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage Referrals\n * @permissionScopeId SCOPE.DC-REFERRALS.MANAGE-REFERRALS\n * @permissionId REFERRALS.READ_PROGRAM\n * @webhook\n * @eventType wix.loyalty.referral.v1.program_updated\n * @serviceIdentifier wix.loyalty.referral.program.v1.ReferralPrograms\n * @slug updated\n */\nexport declare function onProgramUpdated(\n handler: (event: ProgramUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves the referral program.\n * @public\n * @permissionId REFERRALS.READ_PROGRAM\n * @applicableIdentity APP\n * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.GetReferralProgram\n */\nexport async function getReferralProgram(): Promise<\n NonNullablePaths<\n GetReferralProgramResponse,\n | `referralProgram.status`\n | `referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount`\n | `referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage`\n | `referralProgram.referredFriendReward.couponOptions.minimumSubtotal`\n | `referralProgram.referredFriendReward.couponOptions.scope.namespace`\n | `referralProgram.referredFriendReward.couponOptions.scope.group.name`\n | `referralProgram.referredFriendReward.couponOptions.name`\n | `referralProgram.referredFriendReward.couponOptions.discountType`\n | `referralProgram.referredFriendReward.loyaltyPointsOptions.amount`\n | `referralProgram.referredFriendReward.type`\n | `referralProgram.successfulReferralActions`\n | `referralProgram.emails.encourageToReferFriends`\n | `referralProgram.emails.notifyCustomersAboutReward`\n | `referralProgram.premiumFeatures.referralProgram`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixLoyaltyReferralV1Program.getReferralProgram(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves multiple referral programs for all metasites that the caller is the member of.\n *\n * Must be called with a [user identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities#identity-types).\n * @internal\n * @documentationMaturity preview\n * @permissionId REFERRALS.PROGRAM_BULK_READ\n * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.BulkGetReferralProgram\n */\nexport async function bulkGetReferralProgram(): Promise<\n NonNullablePaths<\n BulkGetReferralProgramResponse,\n | `programInSites`\n | `programInSites.${number}.metaSiteId`\n | `programInSites.${number}.referralProgram.status`\n | `programInSites.${number}.referralProgram.referredFriendReward.type`\n | `programInSites.${number}.referralProgram.emails.notifyCustomersAboutReward`\n | `programInSites.${number}.referralProgram.premiumFeatures.referralProgram`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixLoyaltyReferralV1Program.bulkGetReferralProgram(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a referral program. Supports partial updates.\n *\n * Revision number, which increments by 1 each time the referral program is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the referral program.\n * @param referralProgram - Referral program to update. Include the latest `revision` for a successful update.\n * @public\n * @requiredField referralProgram\n * @requiredField referralProgram.revision\n * @permissionId REFERRALS.MANAGE_PROGRAM\n * @applicableIdentity APP\n * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.UpdateReferralProgram\n */\nexport async function updateReferralProgram(\n referralProgram: NonNullablePaths<ReferralProgram, `revision`, 2>\n): Promise<\n NonNullablePaths<\n UpdateReferralProgramResponse,\n | `referralProgram.status`\n | `referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount`\n | `referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage`\n | `referralProgram.referredFriendReward.couponOptions.minimumSubtotal`\n | `referralProgram.referredFriendReward.couponOptions.scope.namespace`\n | `referralProgram.referredFriendReward.couponOptions.scope.group.name`\n | `referralProgram.referredFriendReward.couponOptions.name`\n | `referralProgram.referredFriendReward.couponOptions.discountType`\n | `referralProgram.referredFriendReward.loyaltyPointsOptions.amount`\n | `referralProgram.referredFriendReward.type`\n | `referralProgram.successfulReferralActions`\n | `referralProgram.emails.encourageToReferFriends`\n | `referralProgram.emails.notifyCustomersAboutReward`\n | `referralProgram.premiumFeatures.referralProgram`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n referralProgram: referralProgram,\n });\n\n const reqOpts =\n ambassadorWixLoyaltyReferralV1Program.updateReferralProgram(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { referralProgram: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['referralProgram']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Activates the referral program, changing its status to `ACTIVE`.\n * @public\n * @permissionId REFERRALS.MANAGE_PROGRAM\n * @applicableIdentity APP\n * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.ActivateReferralProgram\n */\nexport async function activateReferralProgram(): Promise<\n NonNullablePaths<\n ActivateReferralProgramResponse,\n | `referralProgram.status`\n | `referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount`\n | `referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage`\n | `referralProgram.referredFriendReward.couponOptions.minimumSubtotal`\n | `referralProgram.referredFriendReward.couponOptions.scope.namespace`\n | `referralProgram.referredFriendReward.couponOptions.scope.group.name`\n | `referralProgram.referredFriendReward.couponOptions.name`\n | `referralProgram.referredFriendReward.couponOptions.discountType`\n | `referralProgram.referredFriendReward.loyaltyPointsOptions.amount`\n | `referralProgram.referredFriendReward.type`\n | `referralProgram.successfulReferralActions`\n | `referralProgram.emails.encourageToReferFriends`\n | `referralProgram.emails.notifyCustomersAboutReward`\n | `referralProgram.premiumFeatures.referralProgram`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixLoyaltyReferralV1Program.activateReferralProgram(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Pauses the referral program, changing its status to `PAUSED`.\n * @public\n * @permissionId REFERRALS.MANAGE_PROGRAM\n * @applicableIdentity APP\n * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.PauseReferralProgram\n */\nexport async function pauseReferralProgram(): Promise<\n NonNullablePaths<\n PauseReferralProgramResponse,\n | `referralProgram.status`\n | `referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount`\n | `referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage`\n | `referralProgram.referredFriendReward.couponOptions.minimumSubtotal`\n | `referralProgram.referredFriendReward.couponOptions.scope.namespace`\n | `referralProgram.referredFriendReward.couponOptions.scope.group.name`\n | `referralProgram.referredFriendReward.couponOptions.name`\n | `referralProgram.referredFriendReward.couponOptions.discountType`\n | `referralProgram.referredFriendReward.loyaltyPointsOptions.amount`\n | `referralProgram.referredFriendReward.type`\n | `referralProgram.successfulReferralActions`\n | `referralProgram.emails.encourageToReferFriends`\n | `referralProgram.emails.notifyCustomersAboutReward`\n | `referralProgram.premiumFeatures.referralProgram`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixLoyaltyReferralV1Program.pauseReferralProgram(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves pre-generated AI social media post suggestions for promoting the referral program.\n *\n * This method returns a list of AI-generated social media post suggestions that site owners or members can use to promote the referral program. You can display these suggestions to allow referring customers to easily copy and share them on their preferred social media platforms.\n *\n * >**Note**: This method retrieves existing suggestions. To generate new ones,\n * use Generate AI Social Media Posts Suggestions.\n * @public\n * @permissionId REFERRALS.MANAGE_PROGRAM\n * @applicableIdentity APP\n * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.GetAISocialMediaPostsSuggestions\n */\nexport async function getAiSocialMediaPostsSuggestions(\n options?: GetAiSocialMediaPostsSuggestionsOptions\n): Promise<\n NonNullablePaths<\n GetAISocialMediaPostsSuggestionsResponse,\n `suggestions` | `suggestions.${number}.postContent`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n topic: options?.topic,\n });\n\n const reqOpts =\n ambassadorWixLoyaltyReferralV1Program.getAiSocialMediaPostsSuggestions(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { topic: '$[0].topic' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetAiSocialMediaPostsSuggestionsOptions {\n /**\n * Topic to generate social media post suggestions for. For example, fitness, education, or technology.\n * @maxLength 512\n */\n topic?: string;\n}\n\n/**\n * Creates new AI-generated social media post suggestions for promoting the referral program.\n *\n * This method generates new AI-powered social media post suggestions for promoting the referral program. Use it to refresh content or create alternatives to existing suggestions.\n *\n * >**Note**: This method generates new suggestions each time it's called. To retrieve existing suggestions without generating new ones, use Get AI Social Media Posts Suggestions.\n * @public\n * @permissionId REFERRALS.MANAGE_PROGRAM\n * @applicableIdentity APP\n * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.GenerateAISocialMediaPostsSuggestions\n */\nexport async function generateAiSocialMediaPostsSuggestions(\n options?: GenerateAiSocialMediaPostsSuggestionsOptions\n): Promise<\n NonNullablePaths<\n GenerateAISocialMediaPostsSuggestionsResponse,\n `suggestions` | `suggestions.${number}.postContent`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n topic: options?.topic,\n });\n\n const reqOpts =\n ambassadorWixLoyaltyReferralV1Program.generateAiSocialMediaPostsSuggestions(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { topic: '$[0].topic' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GenerateAiSocialMediaPostsSuggestionsOptions {\n /**\n * Topic to generate social media post suggestions for. For example, fitness, education, or technology.\n * @maxLength 512\n */\n topic?: string;\n}\n\n/**\n * Retrieves information about the enabled premium features for the referral program.\n * @public\n * @permissionId REFERRALS.READ_PROGRAM\n * @applicableIdentity APP\n * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.GetReferralProgramPremiumFeatures\n */\nexport async function getReferralProgramPremiumFeatures(): Promise<\n NonNullablePaths<\n GetReferralProgramPremiumFeaturesResponse,\n `referralProgram`,\n 2\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixLoyaltyReferralV1Program.getReferralProgramPremiumFeatures(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\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 resolveWixLoyaltyReferralProgramV1ReferralProgramsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/referral-programs',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/referral-programs',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/referral-programs',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/referral-programs',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/referral-programs',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/referral-programs',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/referral-programs',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/referral-programs',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/referral-programs',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_referral_programs';\n\n/** Retrieves the referral program. */\nexport function getReferralProgram(\n payload: object\n): RequestOptionsFactory<any> {\n function __getReferralProgram({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.referral.v1.program',\n method: 'GET' as any,\n methodFqn:\n 'wix.loyalty.referral.program.v1.ReferralPrograms.GetReferralProgram',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixLoyaltyReferralProgramV1ReferralProgramsUrl({\n protoPath: '/v1/program',\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: 'referralProgram.createdDate' },\n { path: 'referralProgram.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'referralProgram.referredFriendReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.percentageOptions.percentage',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getReferralProgram;\n}\n\n/**\n * Retrieves multiple referral programs for all metasites that the caller is the member of.\n *\n * Must be called with a [user identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities#identity-types).\n */\nexport function bulkGetReferralProgram(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkGetReferralProgram({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.referral.v1.program',\n method: 'GET' as any,\n methodFqn:\n 'wix.loyalty.referral.program.v1.ReferralPrograms.BulkGetReferralProgram',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixLoyaltyReferralProgramV1ReferralProgramsUrl({\n protoPath: '/v1/bulk/programs',\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: 'programInSites.referralProgram.createdDate' },\n { path: 'programInSites.referralProgram.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'programInSites.referralProgram.referredFriendReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'programInSites.referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'programInSites.referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage',\n },\n {\n path: 'programInSites.referralProgram.referringCustomerReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'programInSites.referralProgram.referringCustomerReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'programInSites.referralProgram.referringCustomerReward.couponOptions.percentageOptions.percentage',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkGetReferralProgram;\n}\n\n/**\n * Updates a referral program. Supports partial updates.\n *\n * Revision number, which increments by 1 each time the referral program is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the referral program.\n */\nexport function updateReferralProgram(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateReferralProgram({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'mask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'referralProgram.createdDate' },\n { path: 'referralProgram.updatedDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n {\n path: 'referralProgram.referredFriendReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.percentageOptions.percentage',\n },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.loyalty.referral.v1.program',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.loyalty.referral.program.v1.ReferralPrograms.UpdateReferralProgram',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixLoyaltyReferralProgramV1ReferralProgramsUrl({\n protoPath: '/v1/program',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'referralProgram.createdDate' },\n { path: 'referralProgram.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'referralProgram.referredFriendReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.percentageOptions.percentage',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateReferralProgram;\n}\n\n/** Activates the referral program, changing its status to `ACTIVE`. */\nexport function activateReferralProgram(\n payload: object\n): RequestOptionsFactory<any> {\n function __activateReferralProgram({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.referral.v1.program',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.loyalty.referral.program.v1.ReferralPrograms.ActivateReferralProgram',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixLoyaltyReferralProgramV1ReferralProgramsUrl({\n protoPath: '/v1/program/activate',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'referralProgram.createdDate' },\n { path: 'referralProgram.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'referralProgram.referredFriendReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.percentageOptions.percentage',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __activateReferralProgram;\n}\n\n/** Pauses the referral program, changing its status to `PAUSED`. */\nexport function pauseReferralProgram(\n payload: object\n): RequestOptionsFactory<any> {\n function __pauseReferralProgram({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.referral.v1.program',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.loyalty.referral.program.v1.ReferralPrograms.PauseReferralProgram',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixLoyaltyReferralProgramV1ReferralProgramsUrl({\n protoPath: '/v1/program/pause',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'referralProgram.createdDate' },\n { path: 'referralProgram.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'referralProgram.referredFriendReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.percentageOptions.percentage',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __pauseReferralProgram;\n}\n\n/**\n * Retrieves pre-generated AI social media post suggestions for promoting the referral program.\n *\n * This method returns a list of AI-generated social media post suggestions that site owners or members can use to promote the referral program. You can display these suggestions to allow referring customers to easily copy and share them on their preferred social media platforms.\n *\n * >**Note**: This method retrieves existing suggestions. To generate new ones,\n * use Generate AI Social Media Posts Suggestions.\n */\nexport function getAiSocialMediaPostsSuggestions(\n payload: object\n): RequestOptionsFactory<any> {\n function __getAiSocialMediaPostsSuggestions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.referral.v1.program',\n method: 'GET' as any,\n methodFqn:\n 'wix.loyalty.referral.program.v1.ReferralPrograms.GetAISocialMediaPostsSuggestions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixLoyaltyReferralProgramV1ReferralProgramsUrl({\n protoPath: '/v1/program/ai-social-media-posts-suggestions',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getAiSocialMediaPostsSuggestions;\n}\n\n/**\n * Creates new AI-generated social media post suggestions for promoting the referral program.\n *\n * This method generates new AI-powered social media post suggestions for promoting the referral program. Use it to refresh content or create alternatives to existing suggestions.\n *\n * >**Note**: This method generates new suggestions each time it's called. To retrieve existing suggestions without generating new ones, use Get AI Social Media Posts Suggestions.\n */\nexport function generateAiSocialMediaPostsSuggestions(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateAiSocialMediaPostsSuggestions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.referral.v1.program',\n method: 'POST' as any,\n methodFqn:\n 'wix.loyalty.referral.program.v1.ReferralPrograms.GenerateAISocialMediaPostsSuggestions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixLoyaltyReferralProgramV1ReferralProgramsUrl({\n protoPath: '/v1/program/ai-social-media-posts-suggestions',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __generateAiSocialMediaPostsSuggestions;\n}\n\n/** Retrieves information about the enabled premium features for the referral program. */\nexport function getReferralProgramPremiumFeatures(\n payload: object\n): RequestOptionsFactory<any> {\n function __getReferralProgramPremiumFeatures({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.referral.v1.program',\n method: 'GET' as any,\n methodFqn:\n 'wix.loyalty.referral.program.v1.ReferralPrograms.GetReferralProgramPremiumFeatures',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixLoyaltyReferralProgramV1ReferralProgramsUrl({\n protoPath: '/v1/program/premium-features',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getReferralProgramPremiumFeatures;\n}\n","import {\n getReferralProgram as publicGetReferralProgram,\n bulkGetReferralProgram as publicBulkGetReferralProgram,\n updateReferralProgram as publicUpdateReferralProgram,\n activateReferralProgram as publicActivateReferralProgram,\n pauseReferralProgram as publicPauseReferralProgram,\n getAiSocialMediaPostsSuggestions as publicGetAiSocialMediaPostsSuggestions,\n generateAiSocialMediaPostsSuggestions as publicGenerateAiSocialMediaPostsSuggestions,\n getReferralProgramPremiumFeatures as publicGetReferralProgramPremiumFeatures,\n} from './loyalty-referral-v1-program-programs.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onProgramUpdated as publicOnProgramUpdated } from './loyalty-referral-v1-program-programs.public.js';\n\nexport const getReferralProgram: MaybeContext<\n BuildRESTFunction<typeof publicGetReferralProgram> &\n typeof publicGetReferralProgram\n> = /*#__PURE__*/ createRESTModule(publicGetReferralProgram);\n/** @internal */\nexport const bulkGetReferralProgram: MaybeContext<\n BuildRESTFunction<typeof publicBulkGetReferralProgram> &\n typeof publicBulkGetReferralProgram\n> = /*#__PURE__*/ createRESTModule(publicBulkGetReferralProgram);\nexport const updateReferralProgram: MaybeContext<\n BuildRESTFunction<typeof publicUpdateReferralProgram> &\n typeof publicUpdateReferralProgram\n> = /*#__PURE__*/ createRESTModule(publicUpdateReferralProgram);\nexport const activateReferralProgram: MaybeContext<\n BuildRESTFunction<typeof publicActivateReferralProgram> &\n typeof publicActivateReferralProgram\n> = /*#__PURE__*/ createRESTModule(publicActivateReferralProgram);\nexport const pauseReferralProgram: MaybeContext<\n BuildRESTFunction<typeof publicPauseReferralProgram> &\n typeof publicPauseReferralProgram\n> = /*#__PURE__*/ createRESTModule(publicPauseReferralProgram);\nexport const getAiSocialMediaPostsSuggestions: MaybeContext<\n BuildRESTFunction<typeof publicGetAiSocialMediaPostsSuggestions> &\n typeof publicGetAiSocialMediaPostsSuggestions\n> = /*#__PURE__*/ createRESTModule(publicGetAiSocialMediaPostsSuggestions);\nexport const generateAiSocialMediaPostsSuggestions: MaybeContext<\n BuildRESTFunction<typeof publicGenerateAiSocialMediaPostsSuggestions> &\n typeof publicGenerateAiSocialMediaPostsSuggestions\n> = /*#__PURE__*/ createRESTModule(publicGenerateAiSocialMediaPostsSuggestions);\nexport const getReferralProgramPremiumFeatures: MaybeContext<\n BuildRESTFunction<typeof publicGetReferralProgramPremiumFeatures> &\n typeof publicGetReferralProgramPremiumFeatures\n> = /*#__PURE__*/ createRESTModule(publicGetReferralProgramPremiumFeatures);\n/**\n * Triggered when a referral program is updated.\n */\nexport const onProgramUpdated: BuildEventDefinition<\n typeof publicOnProgramUpdated\n> &\n typeof publicOnProgramUpdated = createEventModule(publicOnProgramUpdated);\n\nexport {\n ProgramStatus,\n RewardType,\n DiscountType,\n Action,\n App,\n ProviderName,\n IntervalUnit,\n SubscriptionStatus,\n ReactivationReasonEnum,\n Initiator,\n RefundType,\n UnassignReason,\n ContractSwitchType,\n ContractSwitchReason,\n PriceIncreaseTrigger,\n ProductAdjustment,\n Type,\n WebhookIdentityType,\n} from './loyalty-referral-v1-program-programs.universal.js';\nexport {\n ReferralProgram,\n Reward,\n RewardOptionsOneOf,\n Coupon,\n CouponDiscountTypeOptionsOneOf,\n CouponScopeOrMinSubtotalOneOf,\n FixedAmountDiscount,\n PercentageDiscount,\n CouponScope,\n Group,\n LoyaltyPoints,\n Emails,\n PremiumFeatures,\n GetReferralProgramRequest,\n GetReferralProgramResponse,\n BulkGetReferralProgramRequest,\n BulkGetReferralProgramResponse,\n ProgramInSite,\n UpdateReferralProgramRequest,\n UpdateReferralProgramResponse,\n ActivateReferralProgramRequest,\n ActivateReferralProgramResponse,\n PauseReferralProgramRequest,\n PauseReferralProgramResponse,\n GetAISocialMediaPostsSuggestionsRequest,\n GetAISocialMediaPostsSuggestionsResponse,\n AISocialMediaPostSuggestion,\n GenerateAISocialMediaPostsSuggestionsRequest,\n GenerateAISocialMediaPostsSuggestionsResponse,\n GetReferralProgramPremiumFeaturesRequest,\n GetReferralProgramPremiumFeaturesResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n HtmlSitePublished,\n Page,\n SubscriptionEvent,\n SubscriptionEventEventOneOf,\n SubscriptionCreated,\n Subscription,\n BillingReference,\n Cycle,\n CycleCycleSelectorOneOf,\n Interval,\n OneTime,\n ReactivationData,\n SubscriptionAssigned,\n SubscriptionCancelled,\n CancellationDetails,\n SubscriptionAutoRenewTurnedOn,\n SubscriptionAutoRenewTurnedOff,\n SubscriptionUnassigned,\n SubscriptionTransferred,\n RecurringChargeSucceeded,\n ContractSwitched,\n ProductPriceIncreaseData,\n SubscriptionNearEndOfPeriod,\n SubscriptionPendingChange,\n RecurringChargeAttemptFailed,\n ReferralAppInstallation,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n ProgramUpdatedEnvelope,\n GetAiSocialMediaPostsSuggestionsOptions,\n GenerateAiSocialMediaPostsSuggestionsOptions,\n} from './loyalty-referral-v1-program-programs.universal.js';\nexport {\n ProgramStatusWithLiterals,\n RewardTypeWithLiterals,\n DiscountTypeWithLiterals,\n ActionWithLiterals,\n AppWithLiterals,\n ProviderNameWithLiterals,\n IntervalUnitWithLiterals,\n SubscriptionStatusWithLiterals,\n ReactivationReasonEnumWithLiterals,\n InitiatorWithLiterals,\n RefundTypeWithLiterals,\n UnassignReasonWithLiterals,\n ContractSwitchTypeWithLiterals,\n ContractSwitchReasonWithLiterals,\n PriceIncreaseTriggerWithLiterals,\n ProductAdjustmentWithLiterals,\n TypeWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './loyalty-referral-v1-program-programs.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,QAC/B;AAAA,MACF;AAAA,MACA;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL;AAAA,YACE,MAAM;AAAA,UACR;AAAA,UACA;AAAA,YACE,MAAM;AAAA,UACR;AAAA,UACA;AAAA,YACE,MAAM;AAAA,UACR;AAAA,UACA;AAAA,YACE,MAAM;AAAA,UACR;AAAA,UACA;AAAA,YACE,MAAM;AAAA,UACR;AAAA,UACA;AAAA,YACE,MAAM;AAAA,UACR;AAAA,QACF;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAA0B;;;AG/T1B,IAAAC,uBAAiC;AACjC,sCAAkC;AAQ3B,IAAMC,sBAGK,2DAAiBA,mBAAwB;AAEpD,IAAMC,0BAGK,2DAAiBA,uBAA4B;AACxD,IAAMC,yBAGK,2DAAiBA,sBAA2B;AACvD,IAAMC,2BAGK,2DAAiBA,wBAA6B;AACzD,IAAMC,wBAGK,2DAAiBA,qBAA0B;AACtD,IAAMC,oCAGK,2DAAiBA,iCAAsC;AAClE,IAAMC,yCAGK,2DAAiBA,sCAA2C;AACvE,IAAMC,qCAGK,2DAAiBA,kCAAuC;AAInE,IAAMC,wBAGqB,mDAAkB,gBAAsB;","names":["activateReferralProgram","bulkGetReferralProgram","generateAiSocialMediaPostsSuggestions","getAiSocialMediaPostsSuggestions","getReferralProgram","getReferralProgramPremiumFeatures","onProgramUpdated","pauseReferralProgram","updateReferralProgram","import_rename_all_nested_keys","import_float","import_timestamp","import_transform_paths","import_float","import_timestamp","import_rest_modules","payload","ProgramStatus","RewardType","DiscountType","Action","App","ProviderName","IntervalUnit","SubscriptionStatus","ReactivationReasonEnum","Initiator","RefundType","UnassignReason","ContractSwitchType","ContractSwitchReason","PriceIncreaseTrigger","ProductAdjustment","Type","WebhookIdentityType","getReferralProgram","sdkTransformError","bulkGetReferralProgram","updateReferralProgram","activateReferralProgram","pauseReferralProgram","getAiSocialMediaPostsSuggestions","generateAiSocialMediaPostsSuggestions","getReferralProgramPremiumFeatures","getReferralProgram","bulkGetReferralProgram","updateReferralProgram","activateReferralProgram","pauseReferralProgram","getAiSocialMediaPostsSuggestions","generateAiSocialMediaPostsSuggestions","getReferralProgramPremiumFeatures","import_rest_modules","getReferralProgram","bulkGetReferralProgram","updateReferralProgram","activateReferralProgram","pauseReferralProgram","getAiSocialMediaPostsSuggestions","generateAiSocialMediaPostsSuggestions","getReferralProgramPremiumFeatures","onProgramUpdated"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/loyalty-referral-v1-program-programs.public.ts","../../src/loyalty-referral-v1-program-programs.universal.ts","../../src/loyalty-referral-v1-program-programs.http.ts","../../src/loyalty-referral-v1-program-programs.context.ts"],"sourcesContent":["export * from './src/loyalty-referral-v1-program-programs.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\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 { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n ActivateReferralProgramResponse,\n BulkGetReferralProgramResponse,\n GenerateAISocialMediaPostsSuggestionsResponse,\n GenerateAiSocialMediaPostsSuggestionsOptions,\n GetAISocialMediaPostsSuggestionsResponse,\n GetAiSocialMediaPostsSuggestionsOptions,\n GetReferralProgramPremiumFeaturesResponse,\n GetReferralProgramResponse,\n PauseReferralProgramResponse,\n ProgramUpdatedEnvelope,\n ReferralProgram,\n UpdateReferralProgramResponse,\n activateReferralProgram as universalActivateReferralProgram,\n bulkGetReferralProgram as universalBulkGetReferralProgram,\n generateAiSocialMediaPostsSuggestions as universalGenerateAiSocialMediaPostsSuggestions,\n getAiSocialMediaPostsSuggestions as universalGetAiSocialMediaPostsSuggestions,\n getReferralProgram as universalGetReferralProgram,\n getReferralProgramPremiumFeatures as universalGetReferralProgramPremiumFeatures,\n pauseReferralProgram as universalPauseReferralProgram,\n updateReferralProgram as universalUpdateReferralProgram,\n} from './loyalty-referral-v1-program-programs.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/referral' };\n\nexport function getReferralProgram(\n httpClient: HttpClient\n): GetReferralProgramSignature {\n return () =>\n universalGetReferralProgram(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetReferralProgramSignature {\n /**\n * Retrieves the referral program.\n */\n (): Promise<\n NonNullablePaths<\n GetReferralProgramResponse,\n | `referralProgram.status`\n | `referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount`\n | `referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage`\n | `referralProgram.referredFriendReward.couponOptions.minimumSubtotal`\n | `referralProgram.referredFriendReward.couponOptions.scope.namespace`\n | `referralProgram.referredFriendReward.couponOptions.scope.group.name`\n | `referralProgram.referredFriendReward.couponOptions.name`\n | `referralProgram.referredFriendReward.couponOptions.discountType`\n | `referralProgram.referredFriendReward.loyaltyPointsOptions.amount`\n | `referralProgram.referredFriendReward.type`\n | `referralProgram.successfulReferralActions`\n | `referralProgram.emails.encourageToReferFriends`\n | `referralProgram.emails.notifyCustomersAboutReward`\n | `referralProgram.premiumFeatures.referralProgram`,\n 7\n >\n >;\n}\n\n/** @internal */\nexport function bulkGetReferralProgram(\n httpClient: HttpClient\n): BulkGetReferralProgramSignature {\n return () =>\n universalBulkGetReferralProgram(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkGetReferralProgramSignature {\n /**\n * Retrieves multiple referral programs for all metasites that the caller is the member of.\n *\n * Must be called with a [user identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities#identity-types).\n */\n (): Promise<\n NonNullablePaths<\n BulkGetReferralProgramResponse,\n | `programInSites`\n | `programInSites.${number}.metaSiteId`\n | `programInSites.${number}.referralProgram.status`\n | `programInSites.${number}.referralProgram.referredFriendReward.type`\n | `programInSites.${number}.referralProgram.emails.notifyCustomersAboutReward`\n | `programInSites.${number}.referralProgram.premiumFeatures.referralProgram`,\n 6\n >\n >;\n}\n\nexport function updateReferralProgram(\n httpClient: HttpClient\n): UpdateReferralProgramSignature {\n return (referralProgram: NonNullablePaths<ReferralProgram, `revision`, 2>) =>\n universalUpdateReferralProgram(\n referralProgram,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateReferralProgramSignature {\n /**\n * Updates a referral program. Supports partial updates.\n *\n * Revision number, which increments by 1 each time the referral program is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the referral program.\n * @param - Referral program to update. Include the latest `revision` for a successful update.\n */\n (referralProgram: NonNullablePaths<ReferralProgram, `revision`, 2>): Promise<\n NonNullablePaths<\n UpdateReferralProgramResponse,\n | `referralProgram.status`\n | `referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount`\n | `referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage`\n | `referralProgram.referredFriendReward.couponOptions.minimumSubtotal`\n | `referralProgram.referredFriendReward.couponOptions.scope.namespace`\n | `referralProgram.referredFriendReward.couponOptions.scope.group.name`\n | `referralProgram.referredFriendReward.couponOptions.name`\n | `referralProgram.referredFriendReward.couponOptions.discountType`\n | `referralProgram.referredFriendReward.loyaltyPointsOptions.amount`\n | `referralProgram.referredFriendReward.type`\n | `referralProgram.successfulReferralActions`\n | `referralProgram.emails.encourageToReferFriends`\n | `referralProgram.emails.notifyCustomersAboutReward`\n | `referralProgram.premiumFeatures.referralProgram`,\n 7\n >\n >;\n}\n\nexport function activateReferralProgram(\n httpClient: HttpClient\n): ActivateReferralProgramSignature {\n return () =>\n universalActivateReferralProgram(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ActivateReferralProgramSignature {\n /**\n * Activates the referral program, changing its status to `ACTIVE`.\n */\n (): Promise<\n NonNullablePaths<\n ActivateReferralProgramResponse,\n | `referralProgram.status`\n | `referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount`\n | `referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage`\n | `referralProgram.referredFriendReward.couponOptions.minimumSubtotal`\n | `referralProgram.referredFriendReward.couponOptions.scope.namespace`\n | `referralProgram.referredFriendReward.couponOptions.scope.group.name`\n | `referralProgram.referredFriendReward.couponOptions.name`\n | `referralProgram.referredFriendReward.couponOptions.discountType`\n | `referralProgram.referredFriendReward.loyaltyPointsOptions.amount`\n | `referralProgram.referredFriendReward.type`\n | `referralProgram.successfulReferralActions`\n | `referralProgram.emails.encourageToReferFriends`\n | `referralProgram.emails.notifyCustomersAboutReward`\n | `referralProgram.premiumFeatures.referralProgram`,\n 7\n >\n >;\n}\n\nexport function pauseReferralProgram(\n httpClient: HttpClient\n): PauseReferralProgramSignature {\n return () =>\n universalPauseReferralProgram(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface PauseReferralProgramSignature {\n /**\n * Pauses the referral program, changing its status to `PAUSED`.\n */\n (): Promise<\n NonNullablePaths<\n PauseReferralProgramResponse,\n | `referralProgram.status`\n | `referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount`\n | `referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage`\n | `referralProgram.referredFriendReward.couponOptions.minimumSubtotal`\n | `referralProgram.referredFriendReward.couponOptions.scope.namespace`\n | `referralProgram.referredFriendReward.couponOptions.scope.group.name`\n | `referralProgram.referredFriendReward.couponOptions.name`\n | `referralProgram.referredFriendReward.couponOptions.discountType`\n | `referralProgram.referredFriendReward.loyaltyPointsOptions.amount`\n | `referralProgram.referredFriendReward.type`\n | `referralProgram.successfulReferralActions`\n | `referralProgram.emails.encourageToReferFriends`\n | `referralProgram.emails.notifyCustomersAboutReward`\n | `referralProgram.premiumFeatures.referralProgram`,\n 7\n >\n >;\n}\n\nexport function getAiSocialMediaPostsSuggestions(\n httpClient: HttpClient\n): GetAiSocialMediaPostsSuggestionsSignature {\n return (options?: GetAiSocialMediaPostsSuggestionsOptions) =>\n universalGetAiSocialMediaPostsSuggestions(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetAiSocialMediaPostsSuggestionsSignature {\n /**\n * Retrieves pre-generated AI social media post suggestions for promoting the referral program.\n *\n * This method returns a list of AI-generated social media post suggestions that site owners or members can use to promote the referral program. You can display these suggestions to allow referring customers to easily copy and share them on their preferred social media platforms.\n *\n * >**Note**: This method retrieves existing suggestions. To generate new ones,\n * use Generate AI Social Media Posts Suggestions.\n */\n (options?: GetAiSocialMediaPostsSuggestionsOptions): Promise<\n NonNullablePaths<\n GetAISocialMediaPostsSuggestionsResponse,\n `suggestions` | `suggestions.${number}.postContent`,\n 4\n >\n >;\n}\n\nexport function generateAiSocialMediaPostsSuggestions(\n httpClient: HttpClient\n): GenerateAiSocialMediaPostsSuggestionsSignature {\n return (options?: GenerateAiSocialMediaPostsSuggestionsOptions) =>\n universalGenerateAiSocialMediaPostsSuggestions(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateAiSocialMediaPostsSuggestionsSignature {\n /**\n * Creates new AI-generated social media post suggestions for promoting the referral program.\n *\n * This method generates new AI-powered social media post suggestions for promoting the referral program. Use it to refresh content or create alternatives to existing suggestions.\n *\n * >**Note**: This method generates new suggestions each time it's called. To retrieve existing suggestions without generating new ones, use Get AI Social Media Posts Suggestions.\n */\n (options?: GenerateAiSocialMediaPostsSuggestionsOptions): Promise<\n NonNullablePaths<\n GenerateAISocialMediaPostsSuggestionsResponse,\n `suggestions` | `suggestions.${number}.postContent`,\n 4\n >\n >;\n}\n\nexport function getReferralProgramPremiumFeatures(\n httpClient: HttpClient\n): GetReferralProgramPremiumFeaturesSignature {\n return () =>\n universalGetReferralProgramPremiumFeatures(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetReferralProgramPremiumFeaturesSignature {\n /**\n * Retrieves information about the enabled premium features for the referral program.\n */\n (): Promise<\n NonNullablePaths<\n GetReferralProgramPremiumFeaturesResponse,\n `referralProgram`,\n 2\n >\n >;\n}\n\nexport const onProgramUpdated = EventDefinition(\n 'wix.loyalty.referral.v1.program_updated',\n true,\n (event: ProgramUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'entity.referredFriendReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'entity.referredFriendReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'entity.referredFriendReward.couponOptions.percentageOptions.percentage',\n },\n {\n path: 'entity.referringCustomerReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'entity.referringCustomerReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'entity.referringCustomerReward.couponOptions.percentageOptions.percentage',\n },\n ],\n },\n ])\n )\n)<ProgramUpdatedEnvelope>();\n\nexport {\n AISocialMediaPostSuggestion,\n Action,\n ActionEvent,\n ActivateReferralProgramRequest,\n ActivateReferralProgramResponse,\n App,\n BaseEventMetadata,\n BillingReference,\n BulkGetReferralProgramRequest,\n BulkGetReferralProgramResponse,\n CancellationDetails,\n ContractSwitchReason,\n ContractSwitchType,\n ContractSwitched,\n Coupon,\n CouponDiscountTypeOptionsOneOf,\n CouponScope,\n CouponScopeOrMinSubtotalOneOf,\n Cycle,\n CycleCycleSelectorOneOf,\n DiscountType,\n DomainEvent,\n DomainEventBodyOneOf,\n Emails,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n FixedAmountDiscount,\n GenerateAISocialMediaPostsSuggestionsRequest,\n GenerateAISocialMediaPostsSuggestionsResponse,\n GenerateAiSocialMediaPostsSuggestionsOptions,\n GetAISocialMediaPostsSuggestionsRequest,\n GetAISocialMediaPostsSuggestionsResponse,\n GetAiSocialMediaPostsSuggestionsOptions,\n GetReferralProgramPremiumFeaturesRequest,\n GetReferralProgramPremiumFeaturesResponse,\n GetReferralProgramRequest,\n GetReferralProgramResponse,\n Group,\n HtmlSitePublished,\n IdentificationData,\n IdentificationDataIdOneOf,\n Initiator,\n Interval,\n IntervalUnit,\n LoyaltyPoints,\n MessageEnvelope,\n OneTime,\n Page,\n PauseReferralProgramRequest,\n PauseReferralProgramResponse,\n PercentageDiscount,\n PremiumFeatures,\n PriceIncreaseTrigger,\n ProductAdjustment,\n ProductPriceIncreaseData,\n ProgramInSite,\n ProgramStatus,\n ProgramUpdatedEnvelope,\n ProviderName,\n ReactivationData,\n ReactivationReasonEnum,\n RecurringChargeAttemptFailed,\n RecurringChargeSucceeded,\n ReferralAppInstallation,\n ReferralProgram,\n RefundType,\n RestoreInfo,\n Reward,\n RewardOptionsOneOf,\n RewardType,\n Subscription,\n SubscriptionAssigned,\n SubscriptionAutoRenewTurnedOff,\n SubscriptionAutoRenewTurnedOn,\n SubscriptionCancelled,\n SubscriptionCreated,\n SubscriptionEvent,\n SubscriptionEventEventOneOf,\n SubscriptionNearEndOfPeriod,\n SubscriptionPendingChange,\n SubscriptionStatus,\n SubscriptionTransferred,\n SubscriptionUnassigned,\n Type,\n UnassignReason,\n UpdateReferralProgramRequest,\n UpdateReferralProgramResponse,\n WebhookIdentityType,\n} from './loyalty-referral-v1-program-programs.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixLoyaltyReferralV1Program from './loyalty-referral-v1-program-programs.http.js';\n\nexport interface ReferralProgram {\n /**\n * Referral program name.\n * @minLength 2\n * @maxLength 50\n */\n name?: string | null;\n /** @readonly */\n status?: ProgramStatusWithLiterals;\n /**\n * Revision number, which increments by 1 each time the program is updated.\n * To prevent conflicting changes, the current `revision` must be passed when updating the program.\n * @immutable\n */\n revision?: string | null;\n /**\n * Date and time the program was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the program was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Reward configuration for the referred friend.\n * Specifies the reward given to a new customer who was referred to the business.\n */\n referredFriendReward?: Reward;\n /**\n * Reward configuration for the referring customer.\n * Specifies the reward given to an existing customer who referred a new customer to the business.\n */\n referringCustomerReward?: Reward;\n /**\n * List of actions that complete a referral. For an action to be considered successful, the referred friend must place and pay for an item.\n * @maxSize 100\n */\n successfulReferralActions?: ActionWithLiterals[];\n /** Configures email notifications for the referral program. */\n emails?: Emails;\n /**\n * Indicates which premium features are available for the current account.\n * @readonly\n */\n premiumFeatures?: PremiumFeatures;\n}\n\n/** Status of the referral program. */\nexport enum ProgramStatus {\n /** Unknown program status. */\n UNKNOWN = 'UNKNOWN',\n /** Referral program is in a draft state and is being modified. It is not yet active. */\n DRAFT = 'DRAFT',\n /** Referral program is active. */\n ACTIVE = 'ACTIVE',\n /** Referral program is paused. */\n PAUSED = 'PAUSED',\n}\n\n/** @enumType */\nexport type ProgramStatusWithLiterals =\n | ProgramStatus\n | 'UNKNOWN'\n | 'DRAFT'\n | 'ACTIVE'\n | 'PAUSED';\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?: RewardTypeWithLiterals;\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 RewardType {\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 RewardTypeWithLiterals =\n | RewardType\n | 'UNKNOWN'\n | 'COUPON'\n | 'LOYALTY_POINTS'\n | 'NOTHING';\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 LoyaltyPoints {\n /**\n * Number of loyalty points to give.\n * @min 1\n * @max 9999999\n */\n amount?: number;\n}\n\nexport enum Action {\n /** Unknown action. */\n UNKNOWN = 'UNKNOWN',\n /** Referred friend ordered and paid for an order in a store. */\n STORE_ORDER_PLACED = 'STORE_ORDER_PLACED',\n /** Referred friend ordered and paid for a plan. */\n PLAN_ORDERED = 'PLAN_ORDERED',\n /** Referred friend ordered and paid for a ticket. */\n TICKET_ORDERED = 'TICKET_ORDERED',\n /** Referred friend booked and paid for a session. */\n SESSION_BOOKED = 'SESSION_BOOKED',\n /** Referred friend placed and paid for a restaurant order. */\n RESTAURANT_ORDER_PLACED = 'RESTAURANT_ORDER_PLACED',\n /** Referred friend joined an online program. */\n ONLINE_PROGRAM_JOINED = 'ONLINE_PROGRAM_JOINED',\n}\n\n/** @enumType */\nexport type ActionWithLiterals =\n | Action\n | 'UNKNOWN'\n | 'STORE_ORDER_PLACED'\n | 'PLAN_ORDERED'\n | 'TICKET_ORDERED'\n | 'SESSION_BOOKED'\n | 'RESTAURANT_ORDER_PLACED'\n | 'ONLINE_PROGRAM_JOINED';\n\nexport interface Emails {\n /** Configures email invitations to encourage customers to refer their friends. Select the apps for which this feature is enabled. */\n encourageToReferFriends?: AppWithLiterals[];\n /**\n * Whether to send email notifications to referring customers when they receive a referral reward.\n * If true, referring customers will be notified by email when their referred friend completes a qualifying action (for example, placing an order).\n */\n notifyCustomersAboutReward?: boolean;\n}\n\nexport enum App {\n /** Unknown app. */\n UNKNOWN = 'UNKNOWN',\n /** Send an email to customers who've placed an order with stores. */\n STORES = 'STORES',\n /** Send an email to customers who've placed an order with pricing plans. */\n PRICING_PLANS = 'PRICING_PLANS',\n /** Send an email to customers who've placed an order with events. */\n EVENTS = 'EVENTS',\n /** Send an email to customers who've placed an order with bookings. */\n BOOKINGS = 'BOOKINGS',\n /** Send an email to customers who've placed an order with restaurants. */\n RESTAURANTS = 'RESTAURANTS',\n /** Send an email to customers who've joined an online program. */\n ONLINE_PROGRAMS = 'ONLINE_PROGRAMS',\n}\n\n/** @enumType */\nexport type AppWithLiterals =\n | App\n | 'UNKNOWN'\n | 'STORES'\n | 'PRICING_PLANS'\n | 'EVENTS'\n | 'BOOKINGS'\n | 'RESTAURANTS'\n | 'ONLINE_PROGRAMS';\n\nexport interface PremiumFeatures {\n /**\n * Whether the site owner has access to the referral program feature.\n * @readonly\n */\n referralProgram?: boolean;\n}\n\nexport interface GetReferralProgramRequest {}\n\nexport interface GetReferralProgramResponse {\n /** Retrieved referral program. */\n referralProgram?: ReferralProgram;\n}\n\nexport interface BulkGetReferralProgramRequest {}\n\nexport interface BulkGetReferralProgramResponse {\n /** Retrieved referral programs. */\n programInSites?: ProgramInSite[];\n}\n\nexport interface ProgramInSite {\n /**\n * Metasite ID.\n * @format GUID\n */\n metaSiteId?: string;\n /** Retrieved referral program. */\n referralProgram?: ReferralProgram;\n}\n\nexport interface UpdateReferralProgramRequest {\n /** Referral program to update. Include the latest `revision` for a successful update. */\n referralProgram: ReferralProgram;\n}\n\nexport interface UpdateReferralProgramResponse {\n /** Updated referral program. */\n referralProgram?: ReferralProgram;\n}\n\nexport interface ActivateReferralProgramRequest {}\n\nexport interface ActivateReferralProgramResponse {\n /** Activated referral program. */\n referralProgram?: ReferralProgram;\n}\n\nexport interface PauseReferralProgramRequest {}\n\nexport interface PauseReferralProgramResponse {\n /** Paused referral program. */\n referralProgram?: ReferralProgram;\n}\n\nexport interface GetAISocialMediaPostsSuggestionsRequest {\n /**\n * Topic to generate social media post suggestions for. For example, fitness, education, or technology.\n * @maxLength 512\n */\n topic?: string;\n}\n\nexport interface GetAISocialMediaPostsSuggestionsResponse {\n /**\n * Generated social media post suggestions.\n * @maxSize 3\n */\n suggestions?: AISocialMediaPostSuggestion[];\n /**\n * Referral URL to refer friends.\n * @maxLength 2083\n */\n referFriendsPageUrl?: string | null;\n}\n\nexport interface AISocialMediaPostSuggestion {\n /**\n * Suggested post content.\n * @maxLength 4096\n */\n postContent?: string;\n /**\n * Suggested hashtags.\n * @maxLength 256\n * @maxSize 256\n */\n hashtags?: string[];\n}\n\nexport interface GenerateAISocialMediaPostsSuggestionsRequest {\n /**\n * Topic to generate social media post suggestions for. For example, fitness, education, or technology.\n * @maxLength 512\n */\n topic?: string;\n}\n\nexport interface GenerateAISocialMediaPostsSuggestionsResponse {\n /**\n * Generated social media post suggestions.\n * @maxSize 3\n */\n suggestions?: AISocialMediaPostSuggestion[];\n /**\n * Referral URL to refer friends.\n * @maxLength 2083\n */\n referFriendsPageUrl?: string | null;\n}\n\nexport interface GetReferralProgramPremiumFeaturesRequest {}\n\nexport interface GetReferralProgramPremiumFeaturesResponse {\n /**\n * Whether the site has the referral program feature enabled.\n * @readonly\n */\n referralProgram?: boolean;\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 entity?: string;\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 currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface HtmlSitePublished {\n /**\n * Application instance ID\n * @maxLength 50\n */\n appInstanceId?: string;\n /**\n * Application type\n * @maxLength 100\n */\n appType?: string;\n /** Revision */\n revision?: string;\n /**\n * MSID\n * @maxLength 100\n */\n metaSiteId?: string | null;\n /**\n * optional branch id if publish is done from branch\n * @format GUID\n */\n branchId?: string | null;\n /** The site's last transactionId */\n lastTransactionId?: string | null;\n /** A list of the site's pages */\n pages?: Page[];\n /** Site's publish date */\n publishDate?: string;\n /** Determine if this message was produced by editor-deployments service */\n originatedFromDeploymentsService?: boolean;\n}\n\nexport interface Page {\n /**\n * Page's Id\n * @maxLength 100\n */\n _id?: string;\n}\n\nexport interface SubscriptionEvent extends SubscriptionEventEventOneOf {\n /** Triggered when a subscription is created. */\n created?: SubscriptionCreated;\n /**\n * Triggered when a subscription is assigned to a Wix site, including the initial\n * assignment of a floating subscription or a re-assignement from a different site.\n */\n assigned?: SubscriptionAssigned;\n /** Triggered when a subscription is canceled. */\n cancelled?: SubscriptionCancelled;\n /** Triggered when the subscription's auto renew is turned on. */\n autoRenewTurnedOn?: SubscriptionAutoRenewTurnedOn;\n /** Triggered when the subscription's auto renew is turned off. */\n autoRenewTurnedOff?: SubscriptionAutoRenewTurnedOff;\n /**\n * Triggered when a subscription is unassigned from a Wix site and becomes\n * floating.\n */\n unassigned?: SubscriptionUnassigned;\n /**\n * Triggered when a subscription is transferred from one Wix account to another.\n * A transfer includes cancelling the original subscription and creating a new\n * subscription for the target account. The event returns both the original\n * and the new subscription.\n */\n transferred?: SubscriptionTransferred;\n /** Triggered when a recurring charge succeeds for a subscription. */\n recurringChargeSucceeded?: RecurringChargeSucceeded;\n /**\n * Triggered when a subscription was updated including when its product has been\n * up- or downgraded or the billing cycle is changed.\n */\n contractSwitched?: ContractSwitched;\n /**\n * Triggered when a subscription gets close to the end of its billing cycle.\n * The exact number of days is defined in the billing system.\n */\n nearEndOfPeriod?: SubscriptionNearEndOfPeriod;\n /**\n * Triggered when a subscription is updated and the change doesn't happen\n * immediately but at the end of the current billing cycle.\n */\n pendingChange?: SubscriptionPendingChange;\n /** Triggered when a recurring charge attempt fails for a subscription. */\n recurringChargeAttemptFailed?: RecurringChargeAttemptFailed;\n /**\n * ID of the subscription's event.\n * @format GUID\n */\n eventId?: string | null;\n /**\n * Date and time of the event in\n * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)\n * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n */\n eventDate?: Date | null;\n}\n\n/** @oneof */\nexport interface SubscriptionEventEventOneOf {\n /** Triggered when a subscription is created. */\n created?: SubscriptionCreated;\n /**\n * Triggered when a subscription is assigned to a Wix site, including the initial\n * assignment of a floating subscription or a re-assignement from a different site.\n */\n assigned?: SubscriptionAssigned;\n /** Triggered when a subscription is canceled. */\n cancelled?: SubscriptionCancelled;\n /** Triggered when the subscription's auto renew is turned on. */\n autoRenewTurnedOn?: SubscriptionAutoRenewTurnedOn;\n /** Triggered when the subscription's auto renew is turned off. */\n autoRenewTurnedOff?: SubscriptionAutoRenewTurnedOff;\n /**\n * Triggered when a subscription is unassigned from a Wix site and becomes\n * floating.\n */\n unassigned?: SubscriptionUnassigned;\n /**\n * Triggered when a subscription is transferred from one Wix account to another.\n * A transfer includes cancelling the original subscription and creating a new\n * subscription for the target account. The event returns both the original\n * and the new subscription.\n */\n transferred?: SubscriptionTransferred;\n /** Triggered when a recurring charge succeeds for a subscription. */\n recurringChargeSucceeded?: RecurringChargeSucceeded;\n /**\n * Triggered when a subscription was updated including when its product has been\n * up- or downgraded or the billing cycle is changed.\n */\n contractSwitched?: ContractSwitched;\n /**\n * Triggered when a subscription gets close to the end of its billing cycle.\n * The exact number of days is defined in the billing system.\n */\n nearEndOfPeriod?: SubscriptionNearEndOfPeriod;\n /**\n * Triggered when a subscription is updated and the change doesn't happen\n * immediately but at the end of the current billing cycle.\n */\n pendingChange?: SubscriptionPendingChange;\n /** Triggered when a recurring charge attempt fails for a subscription. */\n recurringChargeAttemptFailed?: RecurringChargeAttemptFailed;\n}\n\n/** Triggered when a subscription is created. */\nexport interface SubscriptionCreated {\n /** Created subscription. */\n subscription?: Subscription;\n /** Metadata for the `created` event. */\n metadata?: Record<string, string>;\n /**\n * Subscription reactivation data.\n * A subscription can be reactivated for example if it was incorrectly canceled because of fraud and then reactivated\n * by the billing system\n */\n reactivationData?: ReactivationData;\n}\n\n/**\n * A subscription holds information about a Premium product that a Wix account\n * owner has purchased including details about the billing.\n */\nexport interface Subscription {\n /**\n * ID of the subscription.\n * @format GUID\n */\n _id?: string;\n /**\n * ID of the Wix account that purchased the subscription.\n * @format GUID\n */\n userId?: string;\n /**\n * ID of the [product](https://bo.wix.com/wix-docs/rest/premium/premium-product-catalog-v2/products/product-object)\n * for which the subscription was purchased.\n * @format GUID\n */\n productId?: string;\n /**\n * Date and time the subscription was created in\n * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)\n * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n */\n createdAt?: Date | null;\n /**\n * Date and time the subscription was last updated in\n * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)\n * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n */\n updatedAt?: Date | null;\n /**\n * ID of the metasite that the subscription is assigned to.\n * Available only when the subscription is assigned to a Wix site.\n * Subscriptions for account level products can't be assigned to a Wix site.\n * @format GUID\n */\n metaSiteId?: string | null;\n /** Information about the system that manages the subscription's billing. */\n billingReference?: BillingReference;\n /** Information about the billing cycle of the subscription. */\n cycle?: Cycle;\n /**\n * Subscription status.\n *\n * + `UNKNOWN`: Default status.\n * + `AUTO_RENEW_ON`: Subscription is active and automatically renews at the end of the current billing cycle.\n * + `AUTO_RENEW_OFF`: Subscription is active but expires at the end of the current billing cycle.\n * + `MANUAL_RECURRING`: Subscription is active and renews at the end of the current billing cycle, in case the customer takes an action related to the payment.\n * + `CANCELLED`: Subscription isn't active because it has been canceled.\n * + `TRANSFERRED`: Subscription isn't active because it has been transferred to a different account. A different active subscription was created for the target account.\n */\n status?: SubscriptionStatusWithLiterals;\n /**\n * Date and time the subscription was last transferred from one Wix account to\n * another in\n * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)\n * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n */\n transferredAt?: Date | null;\n /**\n * ID of the [product type](https://bo.wix.com/wix-docs/rest/premium/premium-product-catalog-v2/product-types/product-type-object)\n * that the product, for which the subscription was purchased, belongs to.\n * @format GUID\n */\n productTypeId?: string;\n /** Version number, which increments by 1 each time the subscription is updated. */\n version?: number;\n /**\n * Whether the subscription is active. Includes the statuses\n * `\"AUTO_RENEW_ON\"`, `\"AUTO_RENEW_OFF\"`, and `\"MANUAL_RECURRING\"`.\n */\n active?: boolean;\n /**\n * Date and time the subscription was originally created in\n * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)\n * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * Differs from `createdAt` in case the subscription was originally created for a different Wix account and has been transferred.\n */\n originalCreationDate?: Date | null;\n /** Custom metadata about the subscription. */\n metadata?: Record<string, string>;\n /**\n * 2-letter country code in\n * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\n * format.\n */\n countryCode?: string | null;\n /**\n * Seats of the product that the subscription was purchased for.\n * Will be Null for products that don't support seats.\n * @min 1\n * @max 500\n */\n seats?: number | null;\n}\n\nexport interface BillingReference {\n /**\n * Name of the billing system that manages the subscription.\n *\n * + `\"UNKNOWN\"`: Default value.\n * + `\"SBS\"`: [Wix Billing](https://github.com/wix-p/premium-billing/tree/master/sbs).\n * + `\"LICENSER\"`:\n * + `\"BASS\"`: [Billing and Subscriptions System](https://dev.wix.com/docs/rest/internal-only/premium/subscriptions-by-billing-by-wix/introduction).\n * + `\"RESELLER\"`: [External Reseller](https://dev.wix.com/api/rest/account-level-apis/resellers/introduction).\n */\n providerName?: ProviderNameWithLiterals;\n /** Current provider reference ID. */\n providerReferenceId?: string | null;\n /** Previous provider reference IDs. Used for when a subscription is extended, specifically for domains. */\n previousProviderReferenceIds?: string[];\n}\n\nexport enum ProviderName {\n UNKNOWN = 'UNKNOWN',\n SBS = 'SBS',\n LICENSER = 'LICENSER',\n BASS = 'BASS',\n RESELLER = 'RESELLER',\n RECURRING_INVOICES = 'RECURRING_INVOICES',\n}\n\n/** @enumType */\nexport type ProviderNameWithLiterals =\n | ProviderName\n | 'UNKNOWN'\n | 'SBS'\n | 'LICENSER'\n | 'BASS'\n | 'RESELLER'\n | 'RECURRING_INVOICES';\n\nexport interface Cycle extends CycleCycleSelectorOneOf {\n /** repetitive interval */\n interval?: Interval;\n /** one time */\n oneTime?: OneTime;\n}\n\n/** @oneof */\nexport interface CycleCycleSelectorOneOf {\n /** repetitive interval */\n interval?: Interval;\n /** one time */\n oneTime?: OneTime;\n}\n\nexport interface Interval {\n /** interval unit of measure */\n unit?: IntervalUnitWithLiterals;\n /** number of interval */\n count?: number;\n}\n\nexport enum IntervalUnit {\n /** unknown interval unit */\n UNKNOWN = 'UNKNOWN',\n /** day */\n DAY = 'DAY',\n /** week */\n WEEK = 'WEEK',\n /** month */\n MONTH = 'MONTH',\n /** year */\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type IntervalUnitWithLiterals =\n | IntervalUnit\n | 'UNKNOWN'\n | 'DAY'\n | 'WEEK'\n | 'MONTH'\n | 'YEAR';\n\nexport interface OneTime {}\n\nexport enum SubscriptionStatus {\n UNKNOWN = 'UNKNOWN',\n AUTO_RENEW_ON = 'AUTO_RENEW_ON',\n AUTO_RENEW_OFF = 'AUTO_RENEW_OFF',\n MANUAL_RECURRING = 'MANUAL_RECURRING',\n CANCELLED = 'CANCELLED',\n TRANSFERRED = 'TRANSFERRED',\n}\n\n/** @enumType */\nexport type SubscriptionStatusWithLiterals =\n | SubscriptionStatus\n | 'UNKNOWN'\n | 'AUTO_RENEW_ON'\n | 'AUTO_RENEW_OFF'\n | 'MANUAL_RECURRING'\n | 'CANCELLED'\n | 'TRANSFERRED';\n\n/** Triggered when a subscription is reactivated. */\nexport interface ReactivationData {\n reactivationReason?: ReactivationReasonEnumWithLiterals;\n /**\n * In the event of reactivation after chargeback dispute, the subscription may be extended according to the\n * number of days it was inactive during the time of resolving the dispute\n */\n newEndOfPeriod?: Date | null;\n /** The original end date, before the inactive period. */\n oldEndOfPeriod?: Date | null;\n /** The difference in days between the new new_end_of_period and old_end_of_period */\n differenceInDays?: number | null;\n}\n\n/** Reason for subscription reactivation */\nexport enum ReactivationReasonEnum {\n UNKNOWN = 'UNKNOWN',\n /**\n * Subscription was reactivated due to billing status change from CANCELED to ACTIVE, for example if it was incorrectly\n * canceled because of suspicion of fraud\n */\n BILLING_STATUS_CHANGE = 'BILLING_STATUS_CHANGE',\n /** Subscription was reactivated after a chargeback dispute */\n REACTIVATED_AFTER_CHARGEBACK = 'REACTIVATED_AFTER_CHARGEBACK',\n}\n\n/** @enumType */\nexport type ReactivationReasonEnumWithLiterals =\n | ReactivationReasonEnum\n | 'UNKNOWN'\n | 'BILLING_STATUS_CHANGE'\n | 'REACTIVATED_AFTER_CHARGEBACK';\n\n/**\n * Triggered when a subscription is assigned to a Wix site, including the initial\n * assignment of a floating subscription or a re-assignement from a different site.\n */\nexport interface SubscriptionAssigned {\n /** Assigned subscription. */\n subscription?: Subscription;\n /**\n * ID of the metasite that the subscription has been assigned to before the update.\n * @format GUID\n */\n previousMetaSiteId?: string | null;\n}\n\n/** Triggered when a subscription is canceled. */\nexport interface SubscriptionCancelled {\n /** Canceled subscription. */\n subscription?: Subscription;\n /** Details about the cancellation including who canceled the subscription and why. */\n cancellationDetails?: CancellationDetails;\n /**\n * Whether the subscription is canceled immediately or expires at the end of the current billing cycle.\n *\n * Default: `false`\n */\n immediateCancel?: boolean;\n /** Whether the subscription was canceled during the free trial period. */\n canceledInFreeTrial?: boolean;\n /** The type of refund applied to the cancellation. */\n refundType?: RefundTypeWithLiterals;\n}\n\n/** Information about the cancellation flow including who canceled the subscription and why it was canceled. */\nexport interface CancellationDetails {\n /**\n * Cancellation code.\n *\n * Values supported for cancellations on behalf of the billing system: `-1`, `-2`, `-3`, `-4`, `-5`, `-6`, `-7`, `-8`.\n * For cancellations on behalf of the site owner or the service provider `cancellationCode`\n * is taken from the request of\n * [Cancel Immediately Offline](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/cancel-immediately-offline).\n *\n * + `-1`: The subscription has been cancelled by the billing system but none of the listed cancellation reasons applies.\n * + `-2`: There were payment problems.\n * + `-3`: There was a chargeback.\n * + `-4`: Customer support has canceled the subscription and issued a refund.\n * + `-5`: The site owner has changed their existing subscription.\n * + `-6`: The subscription has been transferred to a different Wix account.\n * + `-7`: The subscription has been canceled because the site owner hasn't manually authenticated the recurring payment during the subscription's grace period. For example, site owners must manually confirm recurring payments within 40 days when paying with boleto.\n * + `-8`: The Wix account that the subscription belonged to has been deleted.\n */\n cancellationCode?: number | null;\n /**\n * Cancellation reason. For cancellations on behalf of the site owner or the service provider `cancellationReason`\n * is taken from the request of\n * [Cancel Immediately Offline](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/cancel-immediately-offline).\n * For cancellations on behalf of the billing system `cancellationReason` is `null` or an empty string.\n */\n cancellationReason?: string | null;\n /**\n * Initiator of the cancellation. For `\"USER_REQUESTED\"` and `\"APP_MANAGED\"`,\n * `cancellationCode` and `cancellationReason` are taken from the request of\n * [Cancel Immediately](https://dev.wix.com/docs/rest/account-level/premium/premium-subscriptions-manager/subscription-v1/cancel-immediately)\n * or [Cancel Immediately Offline](https://dev.wix.com/docs/rest/account-level/premium/premium-subscriptions-manager/subscription-v1/cancel-immediately-offline).\n * For `\"PASSIVE\"`, cancellations `cancellationCode` is automatically calculated and `cancellationReason`\n * is `null` or an empty string.\n *\n * + `\"UNKNOWN`: Default value.\n * + `\"USER_REQUESTED\"`: The Wix account owner has canceled the subscription.\n * + `\"APP_MANAGED\"`: The service provider has canceled the subscription.\n * + `\"PASSIVE\"`: The billing system has canceled the subscription. For example, in case of payment failure or fraud.\n */\n initiator?: InitiatorWithLiterals;\n}\n\nexport enum Initiator {\n UNKNOWN = 'UNKNOWN',\n USER_REQUESTED = 'USER_REQUESTED',\n APP_MANAGED = 'APP_MANAGED',\n PASSIVE = 'PASSIVE',\n}\n\n/** @enumType */\nexport type InitiatorWithLiterals =\n | Initiator\n | 'UNKNOWN'\n | 'USER_REQUESTED'\n | 'APP_MANAGED'\n | 'PASSIVE';\n\nexport enum RefundType {\n UNKNOWN = 'UNKNOWN',\n NO_REFUND = 'NO_REFUND',\n FULL_REFUND = 'FULL_REFUND',\n PRORATED_REFUND = 'PRORATED_REFUND',\n}\n\n/** @enumType */\nexport type RefundTypeWithLiterals =\n | RefundType\n | 'UNKNOWN'\n | 'NO_REFUND'\n | 'FULL_REFUND'\n | 'PRORATED_REFUND';\n\n/** Triggered when the subscription's auto renew is turned on. */\nexport interface SubscriptionAutoRenewTurnedOn {\n /** Subscription for which auto renew is turned on. */\n subscription?: Subscription;\n /**\n * Supported values: `USER`, `APP`.\n *\n * Information about who turned auto renew on.\n * + `\"USER\"`: The site owner who purchased the subscription has turned auto renew on.\n * + `\"APP\"`: The service provider has turned auto renew on.\n */\n initiator?: string | null;\n}\n\n/** Triggered when the subscription's auto renew is turned off. */\nexport interface SubscriptionAutoRenewTurnedOff {\n /** Subscription for which auto renew is turned off. */\n subscription?: Subscription;\n /** Details about the cancellation including who canceled the subscription and why. */\n cancellationDetails?: CancellationDetails;\n /**\n * Whether the subscription is immediately canceled or expires at the end of the current billing cycle.\n *\n * Default: `false`\n */\n immediateCancel?: boolean;\n}\n\n/**\n * Triggered when a subscription is unassigned from a Wix site and becomes\n * floating.\n */\nexport interface SubscriptionUnassigned {\n /** Unassigned subscription. */\n subscription?: Subscription;\n /**\n * ID of the metasite that the subscription has been assigned to before the event.\n * @format GUID\n */\n previousMetaSiteId?: string;\n /**\n * Reason why the subscription is unassigned.\n *\n * + `\"UNKNOWN\"`: Default value.\n * + `\"USER_REQUESTED\"`: The Wix account owner has unassigned the subscription.\n * + `\"REPLACED_BY_ANOTHER_SUBSCRIPTION\"`: A different subscription that replaces this subscription is assigned to the site.\n */\n unassignReason?: UnassignReasonWithLiterals;\n}\n\nexport enum UnassignReason {\n UNKNOWN = 'UNKNOWN',\n USER_REQUESTED = 'USER_REQUESTED',\n REPLACED_BY_ANOTHER_SUBSCRIPTION = 'REPLACED_BY_ANOTHER_SUBSCRIPTION',\n}\n\n/** @enumType */\nexport type UnassignReasonWithLiterals =\n | UnassignReason\n | 'UNKNOWN'\n | 'USER_REQUESTED'\n | 'REPLACED_BY_ANOTHER_SUBSCRIPTION';\n\n/**\n * Triggered when a subscription is transferred from one Wix account to another.\n * A transfer includes cancelling the original subscription and creating a new\n * subscription for the target account. The event returns both the original\n * and the new subscription.\n */\nexport interface SubscriptionTransferred {\n /** Original subscription that was canceled for the transfer. */\n originSubscription?: Subscription;\n /** Newly created subscription for the target account. */\n targetSubscription?: Subscription;\n}\n\n/** Triggered when a recurring charge succeeds for a subscription. */\nexport interface RecurringChargeSucceeded {\n /** Subscription for which the recurring charge has succeeded. */\n subscription?: Subscription;\n /** Indication that there was a successful charge at the end of the free trial period */\n freeTrialPeriodEnd?: boolean;\n}\n\n/**\n * Triggered when a subscription was updated including when its product has been\n * up- or downgraded or the billing cycle is changed.\n */\nexport interface ContractSwitched {\n /** Updated subscription. */\n subscription?: Subscription;\n /** Billing cycle before the update. */\n previousCycle?: Cycle;\n /**\n * ID of the product belonging to the subscription before the update.\n * @format GUID\n */\n previousProductId?: string;\n /**\n * ID of the product type that the subscription's original product belonged to before the update.\n * @format GUID\n */\n previousProductTypeId?: string;\n /**\n * Update type. __Note__: Doesn't include information about a product adjustment.\n * For that purpose, see `productAdjustment`.\n *\n * + `\"NOT_APPLICABLE\"`: Default value.\n * + `\"ADDITIONAL_QUANTITY\"`: An increased usage quota is added to the subscription. For example, a second mailbox is added to a subscription that previously included a single mailbox.\n * + `\"CREDIT_UNUSED_PERIOD\"`: The subscription is upgraded and the new price is less than the regular price. The new price applies to every billing cycle, not just the first cycle.\n * + `\"REFUND_PRICE_DIFF\"`: Not implemented.\n * + `\"ADJUST_PERIOD_END\"`: Not implemented.\n * + `\"DOWNGRADE_GRACE_PERIOD\"`: For downgrades during the grace period. In this situation, the site owner hasn’t paid yet and must immediately pay for the downgraded subscription.\n * + `\"FULL_AMOUNT_PERIOD\"`: For upgrades in which the site owner retains unused benefits. For example, site owners upgrading a Facebook Ads subscription retain their unused FB Ads credit. The unused credit is added to the new credit.\n * + `\"END_OF_PERIOD\"`: The subscription's billing current cycle is extended because of a downgrade.\n * + `\"PENDING_CHANGES\"`: The subscription's billing is updated, but the change doesn't apply immediately. Instead, the update becomes effective at the end of current billing cycle.\n * + `\"DOWNGRADE_RENEWAL\"`: The subscription is downgraded because of a declined payment. This prevents subscriptions from churning.\n */\n contractSwitchType?: ContractSwitchTypeWithLiterals;\n /**\n * ID of the metasite the subscription has been assigned to previously.\n * Available only in case the subscription is assigned to a different site.\n * @format GUID\n */\n previousMetaSiteId?: string | null;\n /**\n * Update reason.\n *\n * + `\"PRICE_INCREASE\"`: The subscription's price has been increased.\n * + `\"EXTERNAL_PROVIDER_TRIGGER\"`: Any reason other than a price increase.\n */\n contractSwitchReason?: ContractSwitchReasonWithLiterals;\n /** Information about the price update. Available only for updates with a price increase. */\n productPriceIncreaseData?: ProductPriceIncreaseData;\n /**\n * Information about a product adjustment. For example, a downgrade.\n * __Note__: This isn't the same as `contractSwitchType`.\n *\n * + `NOT_APPLICABLE`: There is no information about whether the product has been up- or downgraded.\n * + `DOWNGRADE`: The product has been downgraded.\n */\n productAdjustment?: ProductAdjustmentWithLiterals;\n /**\n * Number of seats before the contract switch.\n * @min 1\n * @max 500\n */\n previousSeats?: number | null;\n}\n\n/** Copied from SBS */\nexport enum ContractSwitchType {\n NOT_APPLICABLE = 'NOT_APPLICABLE',\n ADDITIONAL_QUANTITY = 'ADDITIONAL_QUANTITY',\n CREDIT_UNUSED_PERIOD = 'CREDIT_UNUSED_PERIOD',\n REFUND_PRICE_DIFF = 'REFUND_PRICE_DIFF',\n ADJUST_PERIOD_END = 'ADJUST_PERIOD_END',\n DOWNGRADE_GRACE_PERIOD = 'DOWNGRADE_GRACE_PERIOD',\n FULL_AMOUNT_PERIOD = 'FULL_AMOUNT_PERIOD',\n END_OF_PERIOD = 'END_OF_PERIOD',\n PENDING_CHANGES = 'PENDING_CHANGES',\n DOWNGRADE_RENEWAL = 'DOWNGRADE_RENEWAL',\n FIXED_BILLING_DATE_PRORATION = 'FIXED_BILLING_DATE_PRORATION',\n}\n\n/** @enumType */\nexport type ContractSwitchTypeWithLiterals =\n | ContractSwitchType\n | 'NOT_APPLICABLE'\n | 'ADDITIONAL_QUANTITY'\n | 'CREDIT_UNUSED_PERIOD'\n | 'REFUND_PRICE_DIFF'\n | 'ADJUST_PERIOD_END'\n | 'DOWNGRADE_GRACE_PERIOD'\n | 'FULL_AMOUNT_PERIOD'\n | 'END_OF_PERIOD'\n | 'PENDING_CHANGES'\n | 'DOWNGRADE_RENEWAL'\n | 'FIXED_BILLING_DATE_PRORATION';\n\nexport enum ContractSwitchReason {\n EXTERNAL_PROVIDER_TRIGGER = 'EXTERNAL_PROVIDER_TRIGGER',\n PRICE_INCREASE = 'PRICE_INCREASE',\n}\n\n/** @enumType */\nexport type ContractSwitchReasonWithLiterals =\n | ContractSwitchReason\n | 'EXTERNAL_PROVIDER_TRIGGER'\n | 'PRICE_INCREASE';\n\n/** Triggered when a subscription's price is increased. */\nexport interface ProductPriceIncreaseData {\n /**\n * Price of the subscription before the update.\n * @format DECIMAL_VALUE\n */\n previousPrice?: string | null;\n /** A value that is used in order to select the correct email template to send the user regarding the price increase. */\n emailTemplateSelector?: string | null;\n /** Used to differentiate between migration segments. Does not have to be unique per segment. */\n segmentName?: string | null;\n /** Used to determine how the price increase was triggered. */\n priceIncreaseTrigger?: PriceIncreaseTriggerWithLiterals;\n}\n\n/** Reason for Price Increase Trigger */\nexport enum PriceIncreaseTrigger {\n NEAR_RENEWAL = 'NEAR_RENEWAL',\n RECURRING_SUCCESS = 'RECURRING_SUCCESS',\n MANUAL = 'MANUAL',\n}\n\n/** @enumType */\nexport type PriceIncreaseTriggerWithLiterals =\n | PriceIncreaseTrigger\n | 'NEAR_RENEWAL'\n | 'RECURRING_SUCCESS'\n | 'MANUAL';\n\n/** Triggered when a subscription's product is adusted. */\nexport enum ProductAdjustment {\n /** flag to show that the ContractSwitchedEvent is not applicable / needed */\n NOT_APPLICABLE = 'NOT_APPLICABLE',\n /** flag to show that the ContractSwitchedEvent is a Downgrade */\n DOWNGRADE = 'DOWNGRADE',\n}\n\n/** @enumType */\nexport type ProductAdjustmentWithLiterals =\n | ProductAdjustment\n | 'NOT_APPLICABLE'\n | 'DOWNGRADE';\n\n/**\n * Triggered when a subscription gets close to the end of its billing cycle.\n * The exact number of days is defined in the billing system.\n */\nexport interface SubscriptionNearEndOfPeriod {\n /** Subscription that got close to the end of its billing cycle. */\n subscription?: Subscription;\n /** Whether the subscription is within the free trial period. */\n inFreeTrial?: boolean;\n}\n\n/**\n * Triggered when a subscription is updated and the change doesn't happen\n * immediately but at the end of the current billing cycle.\n */\nexport interface SubscriptionPendingChange {\n /** Subscription for which a pending update is triggered. */\n subscription?: Subscription;\n}\n\n/** Triggered when a recurring charge attempt failed for a subscription. */\nexport interface RecurringChargeAttemptFailed {\n /** Subscription for which the recurring charge attempt has failed. */\n subscription?: Subscription;\n}\n\nexport interface ReferralAppInstallation {\n type?: TypeWithLiterals;\n}\n\nexport enum Type {\n UNSPECIFIED = 'UNSPECIFIED',\n INSTALLED = 'INSTALLED',\n DELETED = 'DELETED',\n}\n\n/** @enumType */\nexport type TypeWithLiterals = Type | 'UNSPECIFIED' | 'INSTALLED' | 'DELETED';\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}\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 BaseEventMetadata {\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}\n\nexport interface EventMetadata extends BaseEventMetadata {\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\nexport interface ProgramUpdatedEnvelope {\n entity: ReferralProgram;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a referral program is updated.\n * @permissionScope Manage Referrals\n * @permissionScopeId SCOPE.DC-REFERRALS.MANAGE-REFERRALS\n * @permissionId REFERRALS.READ_PROGRAM\n * @webhook\n * @eventType wix.loyalty.referral.v1.program_updated\n * @serviceIdentifier wix.loyalty.referral.program.v1.ReferralPrograms\n * @slug updated\n */\nexport declare function onProgramUpdated(\n handler: (event: ProgramUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves the referral program.\n * @public\n * @permissionId REFERRALS.READ_PROGRAM\n * @applicableIdentity APP\n * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.GetReferralProgram\n */\nexport async function getReferralProgram(): Promise<\n NonNullablePaths<\n GetReferralProgramResponse,\n | `referralProgram.status`\n | `referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount`\n | `referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage`\n | `referralProgram.referredFriendReward.couponOptions.minimumSubtotal`\n | `referralProgram.referredFriendReward.couponOptions.scope.namespace`\n | `referralProgram.referredFriendReward.couponOptions.scope.group.name`\n | `referralProgram.referredFriendReward.couponOptions.name`\n | `referralProgram.referredFriendReward.couponOptions.discountType`\n | `referralProgram.referredFriendReward.loyaltyPointsOptions.amount`\n | `referralProgram.referredFriendReward.type`\n | `referralProgram.successfulReferralActions`\n | `referralProgram.emails.encourageToReferFriends`\n | `referralProgram.emails.notifyCustomersAboutReward`\n | `referralProgram.premiumFeatures.referralProgram`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixLoyaltyReferralV1Program.getReferralProgram(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves multiple referral programs for all metasites that the caller is the member of.\n *\n * Must be called with a [user identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities#identity-types).\n * @internal\n * @documentationMaturity preview\n * @permissionId REFERRALS.PROGRAM_BULK_READ\n * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.BulkGetReferralProgram\n */\nexport async function bulkGetReferralProgram(): Promise<\n NonNullablePaths<\n BulkGetReferralProgramResponse,\n | `programInSites`\n | `programInSites.${number}.metaSiteId`\n | `programInSites.${number}.referralProgram.status`\n | `programInSites.${number}.referralProgram.referredFriendReward.type`\n | `programInSites.${number}.referralProgram.emails.notifyCustomersAboutReward`\n | `programInSites.${number}.referralProgram.premiumFeatures.referralProgram`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixLoyaltyReferralV1Program.bulkGetReferralProgram(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a referral program. Supports partial updates.\n *\n * Revision number, which increments by 1 each time the referral program is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the referral program.\n * @param referralProgram - Referral program to update. Include the latest `revision` for a successful update.\n * @public\n * @requiredField referralProgram\n * @requiredField referralProgram.revision\n * @permissionId REFERRALS.MANAGE_PROGRAM\n * @applicableIdentity APP\n * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.UpdateReferralProgram\n */\nexport async function updateReferralProgram(\n referralProgram: NonNullablePaths<ReferralProgram, `revision`, 2>\n): Promise<\n NonNullablePaths<\n UpdateReferralProgramResponse,\n | `referralProgram.status`\n | `referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount`\n | `referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage`\n | `referralProgram.referredFriendReward.couponOptions.minimumSubtotal`\n | `referralProgram.referredFriendReward.couponOptions.scope.namespace`\n | `referralProgram.referredFriendReward.couponOptions.scope.group.name`\n | `referralProgram.referredFriendReward.couponOptions.name`\n | `referralProgram.referredFriendReward.couponOptions.discountType`\n | `referralProgram.referredFriendReward.loyaltyPointsOptions.amount`\n | `referralProgram.referredFriendReward.type`\n | `referralProgram.successfulReferralActions`\n | `referralProgram.emails.encourageToReferFriends`\n | `referralProgram.emails.notifyCustomersAboutReward`\n | `referralProgram.premiumFeatures.referralProgram`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n referralProgram: referralProgram,\n });\n\n const reqOpts =\n ambassadorWixLoyaltyReferralV1Program.updateReferralProgram(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { referralProgram: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['referralProgram']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Activates the referral program, changing its status to `ACTIVE`.\n * @public\n * @permissionId REFERRALS.MANAGE_PROGRAM\n * @applicableIdentity APP\n * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.ActivateReferralProgram\n */\nexport async function activateReferralProgram(): Promise<\n NonNullablePaths<\n ActivateReferralProgramResponse,\n | `referralProgram.status`\n | `referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount`\n | `referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage`\n | `referralProgram.referredFriendReward.couponOptions.minimumSubtotal`\n | `referralProgram.referredFriendReward.couponOptions.scope.namespace`\n | `referralProgram.referredFriendReward.couponOptions.scope.group.name`\n | `referralProgram.referredFriendReward.couponOptions.name`\n | `referralProgram.referredFriendReward.couponOptions.discountType`\n | `referralProgram.referredFriendReward.loyaltyPointsOptions.amount`\n | `referralProgram.referredFriendReward.type`\n | `referralProgram.successfulReferralActions`\n | `referralProgram.emails.encourageToReferFriends`\n | `referralProgram.emails.notifyCustomersAboutReward`\n | `referralProgram.premiumFeatures.referralProgram`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixLoyaltyReferralV1Program.activateReferralProgram(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Pauses the referral program, changing its status to `PAUSED`.\n * @public\n * @permissionId REFERRALS.MANAGE_PROGRAM\n * @applicableIdentity APP\n * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.PauseReferralProgram\n */\nexport async function pauseReferralProgram(): Promise<\n NonNullablePaths<\n PauseReferralProgramResponse,\n | `referralProgram.status`\n | `referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount`\n | `referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage`\n | `referralProgram.referredFriendReward.couponOptions.minimumSubtotal`\n | `referralProgram.referredFriendReward.couponOptions.scope.namespace`\n | `referralProgram.referredFriendReward.couponOptions.scope.group.name`\n | `referralProgram.referredFriendReward.couponOptions.name`\n | `referralProgram.referredFriendReward.couponOptions.discountType`\n | `referralProgram.referredFriendReward.loyaltyPointsOptions.amount`\n | `referralProgram.referredFriendReward.type`\n | `referralProgram.successfulReferralActions`\n | `referralProgram.emails.encourageToReferFriends`\n | `referralProgram.emails.notifyCustomersAboutReward`\n | `referralProgram.premiumFeatures.referralProgram`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixLoyaltyReferralV1Program.pauseReferralProgram(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves pre-generated AI social media post suggestions for promoting the referral program.\n *\n * This method returns a list of AI-generated social media post suggestions that site owners or members can use to promote the referral program. You can display these suggestions to allow referring customers to easily copy and share them on their preferred social media platforms.\n *\n * >**Note**: This method retrieves existing suggestions. To generate new ones,\n * use Generate AI Social Media Posts Suggestions.\n * @public\n * @permissionId REFERRALS.MANAGE_PROGRAM\n * @applicableIdentity APP\n * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.GetAISocialMediaPostsSuggestions\n */\nexport async function getAiSocialMediaPostsSuggestions(\n options?: GetAiSocialMediaPostsSuggestionsOptions\n): Promise<\n NonNullablePaths<\n GetAISocialMediaPostsSuggestionsResponse,\n `suggestions` | `suggestions.${number}.postContent`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n topic: options?.topic,\n });\n\n const reqOpts =\n ambassadorWixLoyaltyReferralV1Program.getAiSocialMediaPostsSuggestions(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { topic: '$[0].topic' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetAiSocialMediaPostsSuggestionsOptions {\n /**\n * Topic to generate social media post suggestions for. For example, fitness, education, or technology.\n * @maxLength 512\n */\n topic?: string;\n}\n\n/**\n * Creates new AI-generated social media post suggestions for promoting the referral program.\n *\n * This method generates new AI-powered social media post suggestions for promoting the referral program. Use it to refresh content or create alternatives to existing suggestions.\n *\n * >**Note**: This method generates new suggestions each time it's called. To retrieve existing suggestions without generating new ones, use Get AI Social Media Posts Suggestions.\n * @public\n * @permissionId REFERRALS.MANAGE_PROGRAM\n * @applicableIdentity APP\n * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.GenerateAISocialMediaPostsSuggestions\n */\nexport async function generateAiSocialMediaPostsSuggestions(\n options?: GenerateAiSocialMediaPostsSuggestionsOptions\n): Promise<\n NonNullablePaths<\n GenerateAISocialMediaPostsSuggestionsResponse,\n `suggestions` | `suggestions.${number}.postContent`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n topic: options?.topic,\n });\n\n const reqOpts =\n ambassadorWixLoyaltyReferralV1Program.generateAiSocialMediaPostsSuggestions(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { topic: '$[0].topic' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GenerateAiSocialMediaPostsSuggestionsOptions {\n /**\n * Topic to generate social media post suggestions for. For example, fitness, education, or technology.\n * @maxLength 512\n */\n topic?: string;\n}\n\n/**\n * Retrieves information about the enabled premium features for the referral program.\n * @public\n * @permissionId REFERRALS.READ_PROGRAM\n * @applicableIdentity APP\n * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.GetReferralProgramPremiumFeatures\n */\nexport async function getReferralProgramPremiumFeatures(): Promise<\n NonNullablePaths<\n GetReferralProgramPremiumFeaturesResponse,\n `referralProgram`,\n 2\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixLoyaltyReferralV1Program.getReferralProgramPremiumFeatures(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\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 resolveWixLoyaltyReferralProgramV1ReferralProgramsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/referral-programs',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/referral-programs',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/referral-programs',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/referral-programs',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/referral-programs',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/referral-programs',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/referral-programs',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/referral-programs',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/referral-programs',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_referral_programs';\n\n/** Retrieves the referral program. */\nexport function getReferralProgram(\n payload: object\n): RequestOptionsFactory<any> {\n function __getReferralProgram({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.referral.v1.program',\n method: 'GET' as any,\n methodFqn:\n 'wix.loyalty.referral.program.v1.ReferralPrograms.GetReferralProgram',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixLoyaltyReferralProgramV1ReferralProgramsUrl({\n protoPath: '/v1/program',\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: 'referralProgram.createdDate' },\n { path: 'referralProgram.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'referralProgram.referredFriendReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.percentageOptions.percentage',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getReferralProgram;\n}\n\n/**\n * Retrieves multiple referral programs for all metasites that the caller is the member of.\n *\n * Must be called with a [user identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities#identity-types).\n */\nexport function bulkGetReferralProgram(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkGetReferralProgram({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.referral.v1.program',\n method: 'GET' as any,\n methodFqn:\n 'wix.loyalty.referral.program.v1.ReferralPrograms.BulkGetReferralProgram',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixLoyaltyReferralProgramV1ReferralProgramsUrl({\n protoPath: '/v1/bulk/programs',\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: 'programInSites.referralProgram.createdDate' },\n { path: 'programInSites.referralProgram.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'programInSites.referralProgram.referredFriendReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'programInSites.referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'programInSites.referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage',\n },\n {\n path: 'programInSites.referralProgram.referringCustomerReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'programInSites.referralProgram.referringCustomerReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'programInSites.referralProgram.referringCustomerReward.couponOptions.percentageOptions.percentage',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkGetReferralProgram;\n}\n\n/**\n * Updates a referral program. Supports partial updates.\n *\n * Revision number, which increments by 1 each time the referral program is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the referral program.\n */\nexport function updateReferralProgram(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateReferralProgram({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'mask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'referralProgram.createdDate' },\n { path: 'referralProgram.updatedDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n {\n path: 'referralProgram.referredFriendReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.percentageOptions.percentage',\n },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.loyalty.referral.v1.program',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.loyalty.referral.program.v1.ReferralPrograms.UpdateReferralProgram',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixLoyaltyReferralProgramV1ReferralProgramsUrl({\n protoPath: '/v1/program',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'referralProgram.createdDate' },\n { path: 'referralProgram.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'referralProgram.referredFriendReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.percentageOptions.percentage',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateReferralProgram;\n}\n\n/** Activates the referral program, changing its status to `ACTIVE`. */\nexport function activateReferralProgram(\n payload: object\n): RequestOptionsFactory<any> {\n function __activateReferralProgram({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.referral.v1.program',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.loyalty.referral.program.v1.ReferralPrograms.ActivateReferralProgram',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixLoyaltyReferralProgramV1ReferralProgramsUrl({\n protoPath: '/v1/program/activate',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'referralProgram.createdDate' },\n { path: 'referralProgram.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'referralProgram.referredFriendReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.percentageOptions.percentage',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __activateReferralProgram;\n}\n\n/** Pauses the referral program, changing its status to `PAUSED`. */\nexport function pauseReferralProgram(\n payload: object\n): RequestOptionsFactory<any> {\n function __pauseReferralProgram({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.referral.v1.program',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.loyalty.referral.program.v1.ReferralPrograms.PauseReferralProgram',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixLoyaltyReferralProgramV1ReferralProgramsUrl({\n protoPath: '/v1/program/pause',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'referralProgram.createdDate' },\n { path: 'referralProgram.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'referralProgram.referredFriendReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'referralProgram.referredFriendReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'referralProgram.referredFriendReward.couponOptions.percentageOptions.percentage',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.minimumSubtotal',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.fixedAmountOptions.amount',\n },\n {\n path: 'referralProgram.referringCustomerReward.couponOptions.percentageOptions.percentage',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __pauseReferralProgram;\n}\n\n/**\n * Retrieves pre-generated AI social media post suggestions for promoting the referral program.\n *\n * This method returns a list of AI-generated social media post suggestions that site owners or members can use to promote the referral program. You can display these suggestions to allow referring customers to easily copy and share them on their preferred social media platforms.\n *\n * >**Note**: This method retrieves existing suggestions. To generate new ones,\n * use Generate AI Social Media Posts Suggestions.\n */\nexport function getAiSocialMediaPostsSuggestions(\n payload: object\n): RequestOptionsFactory<any> {\n function __getAiSocialMediaPostsSuggestions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.referral.v1.program',\n method: 'GET' as any,\n methodFqn:\n 'wix.loyalty.referral.program.v1.ReferralPrograms.GetAISocialMediaPostsSuggestions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixLoyaltyReferralProgramV1ReferralProgramsUrl({\n protoPath: '/v1/program/ai-social-media-posts-suggestions',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getAiSocialMediaPostsSuggestions;\n}\n\n/**\n * Creates new AI-generated social media post suggestions for promoting the referral program.\n *\n * This method generates new AI-powered social media post suggestions for promoting the referral program. Use it to refresh content or create alternatives to existing suggestions.\n *\n * >**Note**: This method generates new suggestions each time it's called. To retrieve existing suggestions without generating new ones, use Get AI Social Media Posts Suggestions.\n */\nexport function generateAiSocialMediaPostsSuggestions(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateAiSocialMediaPostsSuggestions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.referral.v1.program',\n method: 'POST' as any,\n methodFqn:\n 'wix.loyalty.referral.program.v1.ReferralPrograms.GenerateAISocialMediaPostsSuggestions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixLoyaltyReferralProgramV1ReferralProgramsUrl({\n protoPath: '/v1/program/ai-social-media-posts-suggestions',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __generateAiSocialMediaPostsSuggestions;\n}\n\n/** Retrieves information about the enabled premium features for the referral program. */\nexport function getReferralProgramPremiumFeatures(\n payload: object\n): RequestOptionsFactory<any> {\n function __getReferralProgramPremiumFeatures({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.referral.v1.program',\n method: 'GET' as any,\n methodFqn:\n 'wix.loyalty.referral.program.v1.ReferralPrograms.GetReferralProgramPremiumFeatures',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixLoyaltyReferralProgramV1ReferralProgramsUrl({\n protoPath: '/v1/program/premium-features',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getReferralProgramPremiumFeatures;\n}\n","import {\n getReferralProgram as publicGetReferralProgram,\n bulkGetReferralProgram as publicBulkGetReferralProgram,\n updateReferralProgram as publicUpdateReferralProgram,\n activateReferralProgram as publicActivateReferralProgram,\n pauseReferralProgram as publicPauseReferralProgram,\n getAiSocialMediaPostsSuggestions as publicGetAiSocialMediaPostsSuggestions,\n generateAiSocialMediaPostsSuggestions as publicGenerateAiSocialMediaPostsSuggestions,\n getReferralProgramPremiumFeatures as publicGetReferralProgramPremiumFeatures,\n} from './loyalty-referral-v1-program-programs.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onProgramUpdated as publicOnProgramUpdated } from './loyalty-referral-v1-program-programs.public.js';\n\nexport const getReferralProgram: MaybeContext<\n BuildRESTFunction<typeof publicGetReferralProgram> &\n typeof publicGetReferralProgram\n> = /*#__PURE__*/ createRESTModule(publicGetReferralProgram);\n/** @internal */\nexport const bulkGetReferralProgram: MaybeContext<\n BuildRESTFunction<typeof publicBulkGetReferralProgram> &\n typeof publicBulkGetReferralProgram\n> = /*#__PURE__*/ createRESTModule(publicBulkGetReferralProgram);\nexport const updateReferralProgram: MaybeContext<\n BuildRESTFunction<typeof publicUpdateReferralProgram> &\n typeof publicUpdateReferralProgram\n> = /*#__PURE__*/ createRESTModule(publicUpdateReferralProgram);\nexport const activateReferralProgram: MaybeContext<\n BuildRESTFunction<typeof publicActivateReferralProgram> &\n typeof publicActivateReferralProgram\n> = /*#__PURE__*/ createRESTModule(publicActivateReferralProgram);\nexport const pauseReferralProgram: MaybeContext<\n BuildRESTFunction<typeof publicPauseReferralProgram> &\n typeof publicPauseReferralProgram\n> = /*#__PURE__*/ createRESTModule(publicPauseReferralProgram);\nexport const getAiSocialMediaPostsSuggestions: MaybeContext<\n BuildRESTFunction<typeof publicGetAiSocialMediaPostsSuggestions> &\n typeof publicGetAiSocialMediaPostsSuggestions\n> = /*#__PURE__*/ createRESTModule(publicGetAiSocialMediaPostsSuggestions);\nexport const generateAiSocialMediaPostsSuggestions: MaybeContext<\n BuildRESTFunction<typeof publicGenerateAiSocialMediaPostsSuggestions> &\n typeof publicGenerateAiSocialMediaPostsSuggestions\n> = /*#__PURE__*/ createRESTModule(publicGenerateAiSocialMediaPostsSuggestions);\nexport const getReferralProgramPremiumFeatures: MaybeContext<\n BuildRESTFunction<typeof publicGetReferralProgramPremiumFeatures> &\n typeof publicGetReferralProgramPremiumFeatures\n> = /*#__PURE__*/ createRESTModule(publicGetReferralProgramPremiumFeatures);\n/**\n * Triggered when a referral program is updated.\n */\nexport const onProgramUpdated: BuildEventDefinition<\n typeof publicOnProgramUpdated\n> &\n typeof publicOnProgramUpdated = createEventModule(publicOnProgramUpdated);\n\nexport {\n ProgramStatus,\n RewardType,\n DiscountType,\n Action,\n App,\n ProviderName,\n IntervalUnit,\n SubscriptionStatus,\n ReactivationReasonEnum,\n Initiator,\n RefundType,\n UnassignReason,\n ContractSwitchType,\n ContractSwitchReason,\n PriceIncreaseTrigger,\n ProductAdjustment,\n Type,\n WebhookIdentityType,\n} from './loyalty-referral-v1-program-programs.universal.js';\nexport {\n ReferralProgram,\n Reward,\n RewardOptionsOneOf,\n Coupon,\n CouponDiscountTypeOptionsOneOf,\n CouponScopeOrMinSubtotalOneOf,\n FixedAmountDiscount,\n PercentageDiscount,\n CouponScope,\n Group,\n LoyaltyPoints,\n Emails,\n PremiumFeatures,\n GetReferralProgramRequest,\n GetReferralProgramResponse,\n BulkGetReferralProgramRequest,\n BulkGetReferralProgramResponse,\n ProgramInSite,\n UpdateReferralProgramRequest,\n UpdateReferralProgramResponse,\n ActivateReferralProgramRequest,\n ActivateReferralProgramResponse,\n PauseReferralProgramRequest,\n PauseReferralProgramResponse,\n GetAISocialMediaPostsSuggestionsRequest,\n GetAISocialMediaPostsSuggestionsResponse,\n AISocialMediaPostSuggestion,\n GenerateAISocialMediaPostsSuggestionsRequest,\n GenerateAISocialMediaPostsSuggestionsResponse,\n GetReferralProgramPremiumFeaturesRequest,\n GetReferralProgramPremiumFeaturesResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n HtmlSitePublished,\n Page,\n SubscriptionEvent,\n SubscriptionEventEventOneOf,\n SubscriptionCreated,\n Subscription,\n BillingReference,\n Cycle,\n CycleCycleSelectorOneOf,\n Interval,\n OneTime,\n ReactivationData,\n SubscriptionAssigned,\n SubscriptionCancelled,\n CancellationDetails,\n SubscriptionAutoRenewTurnedOn,\n SubscriptionAutoRenewTurnedOff,\n SubscriptionUnassigned,\n SubscriptionTransferred,\n RecurringChargeSucceeded,\n ContractSwitched,\n ProductPriceIncreaseData,\n SubscriptionNearEndOfPeriod,\n SubscriptionPendingChange,\n RecurringChargeAttemptFailed,\n ReferralAppInstallation,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n ProgramUpdatedEnvelope,\n GetAiSocialMediaPostsSuggestionsOptions,\n GenerateAiSocialMediaPostsSuggestionsOptions,\n} from './loyalty-referral-v1-program-programs.universal.js';\nexport {\n ProgramStatusWithLiterals,\n RewardTypeWithLiterals,\n DiscountTypeWithLiterals,\n ActionWithLiterals,\n AppWithLiterals,\n ProviderNameWithLiterals,\n IntervalUnitWithLiterals,\n SubscriptionStatusWithLiterals,\n ReactivationReasonEnumWithLiterals,\n InitiatorWithLiterals,\n RefundTypeWithLiterals,\n UnassignReasonWithLiterals,\n ContractSwitchTypeWithLiterals,\n ContractSwitchReasonWithLiterals,\n PriceIncreaseTriggerWithLiterals,\n ProductAdjustmentWithLiterals,\n TypeWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './loyalty-referral-v1-program-programs.universal.js';\n"],"mappings":";;;;;;;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EACA,CAAC,cACC;AAAA,QACE,wCAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,QAC/B;AAAA,MACF;AAAA,MACA;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL;AAAA,YACE,MAAM;AAAA,UACR;AAAA,UACA;AAAA,YACE,MAAM;AAAA,UACR;AAAA,UACA;AAAA,YACE,MAAM;AAAA,UACR;AAAA,UACA;AAAA,YACE,MAAM;AAAA,UACR;AAAA,UACA;AAAA,YACE,MAAM;AAAA,UACR;AAAA,UACA;AAAA,YACE,MAAM;AAAA,UACR;AAAA,QACF;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAA0B;;;AG/T1B,IAAAC,uBAAiC;AACjC,sCAAkC;AAQ3B,IAAMC,sBAGK,2DAAiBA,mBAAwB;AAEpD,IAAMC,0BAGK,2DAAiBA,uBAA4B;AACxD,IAAMC,yBAGK,2DAAiBA,sBAA2B;AACvD,IAAMC,2BAGK,2DAAiBA,wBAA6B;AACzD,IAAMC,wBAGK,2DAAiBA,qBAA0B;AACtD,IAAMC,oCAGK,2DAAiBA,iCAAsC;AAClE,IAAMC,yCAGK,2DAAiBA,sCAA2C;AACvE,IAAMC,qCAGK,2DAAiBA,kCAAuC;AAInE,IAAMC,wBAGqB,mDAAkB,gBAAsB;","names":["activateReferralProgram","bulkGetReferralProgram","generateAiSocialMediaPostsSuggestions","getAiSocialMediaPostsSuggestions","getReferralProgram","getReferralProgramPremiumFeatures","onProgramUpdated","pauseReferralProgram","updateReferralProgram","import_rename_all_nested_keys","import_float","import_timestamp","import_transform_paths","import_float","import_timestamp","import_rest_modules","payload","ProgramStatus","RewardType","DiscountType","Action","App","ProviderName","IntervalUnit","SubscriptionStatus","ReactivationReasonEnum","Initiator","RefundType","UnassignReason","ContractSwitchType","ContractSwitchReason","PriceIncreaseTrigger","ProductAdjustment","Type","WebhookIdentityType","getReferralProgram","sdkTransformError","bulkGetReferralProgram","updateReferralProgram","activateReferralProgram","pauseReferralProgram","getAiSocialMediaPostsSuggestions","generateAiSocialMediaPostsSuggestions","getReferralProgramPremiumFeatures","getReferralProgram","bulkGetReferralProgram","updateReferralProgram","activateReferralProgram","pauseReferralProgram","getAiSocialMediaPostsSuggestions","generateAiSocialMediaPostsSuggestions","getReferralProgramPremiumFeatures","import_rest_modules","getReferralProgram","bulkGetReferralProgram","updateReferralProgram","activateReferralProgram","pauseReferralProgram","getAiSocialMediaPostsSuggestions","generateAiSocialMediaPostsSuggestions","getReferralProgramPremiumFeatures","onProgramUpdated"]}