@wix/auto_sdk_loyalty_programs 1.0.29 → 1.0.31
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.
- package/build/cjs/index.d.ts +1 -1
- package/build/cjs/index.js +8 -66
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +13 -460
- package/build/cjs/index.typings.js +8 -66
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs +7 -62
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +13 -460
- package/build/es/index.typings.mjs +7 -62
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +1 -1
- package/build/internal/cjs/index.js +8 -66
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +13 -460
- package/build/internal/cjs/index.typings.js +8 -66
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.d.mts +1 -1
- package/build/internal/es/index.mjs +7 -62
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +13 -460
- package/build/internal/es/index.typings.mjs +7 -62
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.typings.ts","../../src/loyalty-v1-program-programs.universal.ts","../../src/loyalty-v1-program-programs.http.ts"],"sourcesContent":["export * from './src/loyalty-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 ambassadorWixLoyaltyV1Program from './loyalty-v1-program-programs.http.js';\nimport { transformSDKImageToRESTImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * A loyalty program allows sites to maintain customer reward accounts. Wix users can create a\n * loyalty program to increase customer retention. Read more about the [loyalty program](https://support.wix.com/en/article/wix-loyalty-program-an-overview).\n */\nexport interface LoyaltyProgram {\n /**\n * Program name.\n * @minLength 2\n * @maxLength 50\n */\n name?: string | null;\n /** Details about the program's collectible unit. */\n pointDefinition?: PointDefinition;\n /**\n * Program status.\n * Customers can only earn or redeem points while the program is `\"ACTIVE\"`.\n *\n * Default: `\"DRAFT\"`\n * @readonly\n */\n status?: ProgramStatusWithLiterals;\n /**\n * Date and time the program was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the program was updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Configuration for the points expiration feature. */\n pointsExpiration?: PointsExpiration;\n /**\n * Information about the available program premium features.\n * @readonly\n */\n premiumFeatures?: PremiumFeatures;\n}\n\nexport interface PointDefinition {\n /**\n * Display name for the program's collectible unit.\n *\n * It's recommended to use a plural, for example `\"Stars\"`.\n *\n * In contrast to a custom name, the default `\"Points\"` name is translated and adjusted to singular based on circumstances.\n *\n * Default: `\"Points\"`.\n * @maxLength 20\n */\n customName?: string | null;\n /** Image URL. See [Image]($w/image/introduction) for more information on URL formats for images. */\n icon?: string;\n}\n\nexport interface FocalPoint {\n /** X-coordinate of the focal point. */\n x?: number;\n /** Y-coordinate of the focal point. */\n y?: number;\n /** crop by height */\n height?: number | null;\n /** crop by width */\n width?: number | null;\n}\n\nexport enum ProgramStatus {\n /** Unknown program status. */\n UNKNOWN = 'UNKNOWN',\n /** Program is in draft mode. Customers can't earn or redeem points. */\n DRAFT = 'DRAFT',\n /** Program is active. Customers can earn and redeem points. */\n ACTIVE = 'ACTIVE',\n /**\n * Program is paused. Customers can't earn or redeem points while the program is paused.\n *\n * Set the program to `\"ACTIVE\"` to resume earning and redeeming points.\n */\n PAUSED = 'PAUSED',\n}\n\n/** @enumType */\nexport type ProgramStatusWithLiterals =\n | ProgramStatus\n | 'UNKNOWN'\n | 'DRAFT'\n | 'ACTIVE'\n | 'PAUSED';\n\nexport interface PointsExpiration {\n /**\n * Status of the points expiration feature.\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * How many months a member should be inactive to lose the collected points.\n * @min 1\n * @max 12\n */\n monthsOfInactivity?: number;\n /**\n * Percentage of points that a member loses after being inactive.\n * @min 1\n * @max 100\n */\n expiringPointsPercentage?: number;\n}\n\nexport enum Status {\n /** Unknown points expiration status. This value is not used. */\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n /** Points expiration feature is disabled. */\n DISABLED = 'DISABLED',\n /** Points expiration feature is enabled. */\n ENABLED = 'ENABLED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN_STATUS'\n | 'DISABLED'\n | 'ENABLED';\n\nexport interface PremiumFeatures {\n /**\n * Whether there are any loyalty program premium features.\n * @readonly\n */\n loyaltyProgram?: boolean;\n /**\n * Whether this loyalty program includes tiers.\n * @readonly\n */\n tiers?: boolean;\n /**\n * Whether this loyalty program includes point expiration.\n * @readonly\n */\n pointsExpiration?: boolean;\n}\n\nexport interface SocialMediaSettings {\n /**\n * List of social media channels\n * @maxSize 5\n */\n channels?: SocialMediaChannel[];\n}\n\nexport interface SocialMediaChannel {\n /** Social media channel type */\n type?: TypeWithLiterals;\n /** Enable or disable social media channel */\n enabled?: boolean;\n /**\n * Social media channel ID. For example, Instagram username.\n * @minLength 1\n * @maxLength 255\n */\n _id?: string;\n /**\n * Social media channel URL\n * @readonly\n * @format WEB_URL\n */\n url?: string | null;\n}\n\nexport enum Type {\n /** Unknown social media channel type. */\n UNKNOWN_CHANNEL = 'UNKNOWN_CHANNEL',\n /** Facebook social media channel. */\n FACEBOOK = 'FACEBOOK',\n /** Instagram social media channel. */\n INSTAGRAM = 'INSTAGRAM',\n /** LinkedIn social media channel. */\n LINKEDIN = 'LINKEDIN',\n /** X social media channel. */\n X = 'X',\n /** TikTok social media channel. */\n TIKTOK = 'TIKTOK',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'UNKNOWN_CHANNEL'\n | 'FACEBOOK'\n | 'INSTAGRAM'\n | 'LINKEDIN'\n | 'X'\n | 'TIKTOK';\n\nexport interface GetLoyaltyProgramRequest {}\n\nexport interface GetLoyaltyProgramResponse {\n /** Retrieved loyalty program. */\n loyaltyProgram?: LoyaltyProgram;\n}\n\nexport interface BulkGetLoyaltyProgramRequest {}\n\nexport interface BulkGetLoyaltyProgramResponse {\n /** Retrieved loyalty programs. */\n programInSites?: ProgramInSite[];\n}\n\nexport interface ProgramInSite {\n /**\n * Metasite ID.\n * @format GUID\n */\n metaSiteId?: string;\n /** Loyalty program. */\n loyaltyProgram?: LoyaltyProgram;\n}\n\nexport interface UpdateLoyaltyProgramRequest {\n /** Loyalty program fields to update. */\n loyaltyProgram: LoyaltyProgram;\n}\n\nexport interface UpdateLoyaltyProgramResponse {\n /** Updated loyalty program. */\n loyaltyProgram?: LoyaltyProgram;\n}\n\nexport interface PointsExpirationConfigurationChanged {\n /** Loyalty program. */\n loyaltyProgram?: LoyaltyProgram;\n /** Points expiration configuration changes */\n pointsExpirationChanges?: PointsExpirationChanges;\n}\n\nexport interface PointsExpirationChanges {\n monthsOfInactivity?: number | null;\n expiringPointsPercentage?: number | null;\n}\n\nexport interface ActivateLoyaltyProgramRequest {}\n\nexport interface ActivateLoyaltyProgramResponse {\n /** Activated loyalty program. */\n loyaltyProgram?: LoyaltyProgram;\n}\n\nexport interface LoyaltyProgramActivated {\n /** Activated loyalty program. */\n loyaltyProgram?: LoyaltyProgram;\n}\n\nexport interface PauseLoyaltyProgramRequest {}\n\nexport interface PauseLoyaltyProgramResponse {\n /** Paused loyalty program. */\n loyaltyProgram?: LoyaltyProgram;\n}\n\nexport interface GetLoyaltyProgramDescriptionRequest {\n /**\n * List of description fields to retrieve. Supported values: `description`, `updatedDate`.\n * @maxSize 2\n */\n fields?: string[];\n}\n\nexport interface GetLoyaltyProgramDescriptionResponse {\n /** Retrieved loyalty program description. */\n description?: string | null;\n /** Date and time of the latest description update. */\n _updatedDate?: Date | null;\n}\n\nexport interface UpdateLoyaltyProgramDescriptionRequest {\n /**\n * Loyalty program description to update.\n * @minLength 1\n * @maxLength 1000000\n */\n description?: string;\n}\n\nexport interface UpdateLoyaltyProgramDescriptionResponse {}\n\nexport interface LoyaltyProgramDescriptionUpdated {}\n\nexport interface GetLoyaltyProgramPremiumFeaturesRequest {}\n\nexport interface GetLoyaltyProgramPremiumFeaturesResponse {\n /**\n * Whether there are any loyalty program premium features.\n * @readonly\n */\n loyaltyProgram?: boolean;\n /**\n * Whether this loyalty program includes tiers.\n * @readonly\n */\n tiers?: boolean;\n /**\n * Whether this loyalty program includes point expiration.\n * @readonly\n */\n pointsExpiration?: boolean;\n}\n\nexport interface EnablePointsExpirationRequest {}\n\nexport interface EnablePointsExpirationResponse {\n /** Loyalty program with enabled points expiration feature. */\n loyaltyProgram?: LoyaltyProgram;\n}\n\nexport interface PointsExpirationEnabled {\n /** Loyalty program. */\n loyaltyProgram?: LoyaltyProgram;\n}\n\nexport interface DisablePointsExpirationRequest {}\n\nexport interface DisablePointsExpirationResponse {\n /** Loyalty program with disabled points expiration feature. */\n loyaltyProgram?: LoyaltyProgram;\n}\n\nexport interface PointsExpirationDisabled {\n /** Loyalty program. */\n loyaltyProgram?: LoyaltyProgram;\n}\n\nexport interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {\n /** Emitted on a meta site creation. */\n siteCreated?: SiteCreated;\n /** Emitted on a meta site transfer completion. */\n siteTransferred?: SiteTransferred;\n /** Emitted on a meta site deletion. */\n siteDeleted?: SiteDeleted;\n /** Emitted on a meta site restoration. */\n siteUndeleted?: SiteUndeleted;\n /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */\n sitePublished?: SitePublished;\n /** Emitted on a meta site unpublish. */\n siteUnpublished?: SiteUnpublished;\n /** Emitted when meta site is marked as template. */\n siteMarkedAsTemplate?: SiteMarkedAsTemplate;\n /** Emitted when meta site is marked as a WixSite. */\n siteMarkedAsWixSite?: SiteMarkedAsWixSite;\n /** Emitted when an application is provisioned (installed). */\n serviceProvisioned?: ServiceProvisioned;\n /** Emitted when an application is removed (uninstalled). */\n serviceRemoved?: ServiceRemoved;\n /** Emitted when meta site name (URL slug) is changed. */\n siteRenamedPayload?: SiteRenamed;\n /** Emitted when meta site was permanently deleted. */\n hardDeleted?: SiteHardDeleted;\n /** Emitted on a namespace change. */\n namespaceChanged?: NamespaceChanged;\n /** Emitted when Studio is attached. */\n studioAssigned?: StudioAssigned;\n /** Emitted when Studio is detached. */\n studioUnassigned?: StudioUnassigned;\n /**\n * Emitted when one of the URLs is changed. After this event you may call `urls-server` to fetch\n * the actual URL.\n *\n * See: https://wix.slack.com/archives/C0UHEBPFT/p1732520791210559?thread_ts=1732027914.294059&cid=C0UHEBPFT\n * See: https://wix.slack.com/archives/C0UHEBPFT/p1744115197619459\n */\n urlChanged?: SiteUrlChanged;\n /** Site is marked as PurgedExternally */\n sitePurgedExternally?: SitePurgedExternally;\n /** Emitted when Odeditor is attached. */\n odeditorAssigned?: OdeditorAssigned;\n /** Emitted when Odeditor is detached. */\n odeditorUnassigned?: OdeditorUnassigned;\n /** Emitted when Picasso is attached. */\n picassoAssigned?: PicassoAssigned;\n /** Emitted when Picasso is detached. */\n picassoUnassigned?: PicassoUnassigned;\n /**\n * A meta site id.\n * @format GUID\n */\n metaSiteId?: string;\n /** A meta site version. Monotonically increasing. */\n version?: string;\n /** A timestamp of the event. */\n timestamp?: string;\n /**\n * TODO(meta-site): Change validation once validations are disabled for consumers\n * More context: https://wix.slack.com/archives/C0UHEBPFT/p1720957844413149 and https://wix.slack.com/archives/CFWKX325T/p1728892152855659\n * @maxSize 4000\n */\n assets?: Asset[];\n}\n\n/** @oneof */\nexport interface MetaSiteSpecialEventPayloadOneOf {\n /** Emitted on a meta site creation. */\n siteCreated?: SiteCreated;\n /** Emitted on a meta site transfer completion. */\n siteTransferred?: SiteTransferred;\n /** Emitted on a meta site deletion. */\n siteDeleted?: SiteDeleted;\n /** Emitted on a meta site restoration. */\n siteUndeleted?: SiteUndeleted;\n /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */\n sitePublished?: SitePublished;\n /** Emitted on a meta site unpublish. */\n siteUnpublished?: SiteUnpublished;\n /** Emitted when meta site is marked as template. */\n siteMarkedAsTemplate?: SiteMarkedAsTemplate;\n /** Emitted when meta site is marked as a WixSite. */\n siteMarkedAsWixSite?: SiteMarkedAsWixSite;\n /** Emitted when an application is provisioned (installed). */\n serviceProvisioned?: ServiceProvisioned;\n /** Emitted when an application is removed (uninstalled). */\n serviceRemoved?: ServiceRemoved;\n /** Emitted when meta site name (URL slug) is changed. */\n siteRenamedPayload?: SiteRenamed;\n /** Emitted when meta site was permanently deleted. */\n hardDeleted?: SiteHardDeleted;\n /** Emitted on a namespace change. */\n namespaceChanged?: NamespaceChanged;\n /** Emitted when Studio is attached. */\n studioAssigned?: StudioAssigned;\n /** Emitted when Studio is detached. */\n studioUnassigned?: StudioUnassigned;\n /**\n * Emitted when one of the URLs is changed. After this event you may call `urls-server` to fetch\n * the actual URL.\n *\n * See: https://wix.slack.com/archives/C0UHEBPFT/p1732520791210559?thread_ts=1732027914.294059&cid=C0UHEBPFT\n * See: https://wix.slack.com/archives/C0UHEBPFT/p1744115197619459\n */\n urlChanged?: SiteUrlChanged;\n /** Site is marked as PurgedExternally */\n sitePurgedExternally?: SitePurgedExternally;\n /** Emitted when Odeditor is attached. */\n odeditorAssigned?: OdeditorAssigned;\n /** Emitted when Odeditor is detached. */\n odeditorUnassigned?: OdeditorUnassigned;\n /** Emitted when Picasso is attached. */\n picassoAssigned?: PicassoAssigned;\n /** Emitted when Picasso is detached. */\n picassoUnassigned?: PicassoUnassigned;\n}\n\nexport interface Asset {\n /**\n * An application definition id (app_id in dev-center). For legacy reasons may be UUID or a string (from Java Enum).\n * @maxLength 36\n */\n appDefId?: string;\n /**\n * An instance id. For legacy reasons may be UUID or a string.\n * @maxLength 200\n */\n instanceId?: string;\n /** An application state. */\n state?: StateWithLiterals;\n}\n\nexport enum State {\n UNKNOWN = 'UNKNOWN',\n ENABLED = 'ENABLED',\n DISABLED = 'DISABLED',\n PENDING = 'PENDING',\n DEMO = 'DEMO',\n}\n\n/** @enumType */\nexport type StateWithLiterals =\n | State\n | 'UNKNOWN'\n | 'ENABLED'\n | 'DISABLED'\n | 'PENDING'\n | 'DEMO';\n\nexport interface SiteCreated {\n /**\n * A template identifier (empty if not created from a template).\n * @maxLength 36\n */\n originTemplateId?: string;\n /**\n * An account id of the owner.\n * @format GUID\n */\n ownerId?: string;\n /** A context in which meta site was created. */\n context?: SiteCreatedContextWithLiterals;\n /**\n * A meta site id from which this site was created.\n *\n * In case of a creation from a template it's a template id.\n * In case of a site duplication (\"Save As\" in dashboard or duplicate in UM) it's an id of a source site.\n * @format GUID\n */\n originMetaSiteId?: string | null;\n /**\n * A meta site name (URL slug).\n * @maxLength 20\n */\n siteName?: string;\n /** A namespace. */\n namespace?: NamespaceWithLiterals;\n}\n\nexport enum SiteCreatedContext {\n /** A valid option, we don't expose all reasons why site might be created. */\n OTHER = 'OTHER',\n /** A meta site was created from template. */\n FROM_TEMPLATE = 'FROM_TEMPLATE',\n /** A meta site was created by copying of the transfferred meta site. */\n DUPLICATE_BY_SITE_TRANSFER = 'DUPLICATE_BY_SITE_TRANSFER',\n /** A copy of existing meta site. */\n DUPLICATE = 'DUPLICATE',\n /** A meta site was created as a transfferred site (copy of the original), old flow, should die soon. */\n OLD_SITE_TRANSFER = 'OLD_SITE_TRANSFER',\n /** deprecated A meta site was created for Flash editor. */\n FLASH = 'FLASH',\n}\n\n/** @enumType */\nexport type SiteCreatedContextWithLiterals =\n | SiteCreatedContext\n | 'OTHER'\n | 'FROM_TEMPLATE'\n | 'DUPLICATE_BY_SITE_TRANSFER'\n | 'DUPLICATE'\n | 'OLD_SITE_TRANSFER'\n | 'FLASH';\n\nexport enum Namespace {\n UNKNOWN_NAMESPACE = 'UNKNOWN_NAMESPACE',\n /** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */\n WIX = 'WIX',\n /** ShoutOut stand alone product. These are siteless (no actual Wix site, no HtmlWeb). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n SHOUT_OUT = 'SHOUT_OUT',\n /** MetaSites created by the Albums product, they appear as part of the Albums app. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n ALBUMS = 'ALBUMS',\n /** Part of the WixStores migration flow, a user tries to migrate and gets this site to view and if the user likes it then stores removes this namespace and deletes the old site with the old stores. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n WIX_STORES_TEST_DRIVE = 'WIX_STORES_TEST_DRIVE',\n /** Hotels standalone (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n HOTELS = 'HOTELS',\n /** Clubs siteless MetaSites, a club without a wix website. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n CLUBS = 'CLUBS',\n /** A partially created ADI website. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n ONBOARDING_DRAFT = 'ONBOARDING_DRAFT',\n /** AppBuilder for AppStudio / shmite (c). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n DEV_SITE = 'DEV_SITE',\n /** LogoMaker websites offered to the user after logo purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n LOGOS = 'LOGOS',\n /** VideoMaker websites offered to the user after video purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n VIDEO_MAKER = 'VIDEO_MAKER',\n /** MetaSites with this namespace will *not* be shown in a user's site list by default. */\n PARTNER_DASHBOARD = 'PARTNER_DASHBOARD',\n /** MetaSites with this namespace will *not* be shown in a user's site list by default. */\n DEV_CENTER_COMPANY = 'DEV_CENTER_COMPANY',\n /**\n * A draft created by HTML editor on open. Upon \"first save\" it will be moved to be of WIX domain.\n *\n * Meta site with this namespace will *not* be shown in a user's site list by default.\n */\n HTML_DRAFT = 'HTML_DRAFT',\n /**\n * the user-journey for Fitness users who want to start from managing their business instead of designing their website.\n * Will be accessible from Site List and will not have a website app.\n * Once the user attaches a site, the site will become a regular wixsite.\n */\n SITELESS_BUSINESS = 'SITELESS_BUSINESS',\n /** Belongs to \"strategic products\" company. Supports new product in the creator's economy space. */\n CREATOR_ECONOMY = 'CREATOR_ECONOMY',\n /** It is to be used in the Business First efforts. */\n DASHBOARD_FIRST = 'DASHBOARD_FIRST',\n /** Bookings business flow with no site. */\n ANYWHERE = 'ANYWHERE',\n /** Namespace for Headless Backoffice with no editor */\n HEADLESS = 'HEADLESS',\n /**\n * Namespace for master site that will exist in parent account that will be referenced by subaccounts\n * The site will be used for account level CSM feature for enterprise\n */\n ACCOUNT_MASTER_CMS = 'ACCOUNT_MASTER_CMS',\n /** Rise.ai Siteless account management for Gift Cards and Store Credit. */\n RISE = 'RISE',\n /**\n * As part of the branded app new funnel, users now can create a meta site that will be branded app first.\n * There's a blank site behind the scene but it's blank).\n * The Mobile company will be the owner of this namespace.\n */\n BRANDED_FIRST = 'BRANDED_FIRST',\n /** Nownia.com Siteless account management for Ai Scheduling Assistant. */\n NOWNIA = 'NOWNIA',\n /**\n * UGC Templates are templates that are created by users for personal use and to sale to other users.\n * The Partners company owns this namespace.\n */\n UGC_TEMPLATE = 'UGC_TEMPLATE',\n /** Codux Headless Sites */\n CODUX = 'CODUX',\n /** Bobb - AI Design Creator. */\n MEDIA_DESIGN_CREATOR = 'MEDIA_DESIGN_CREATOR',\n /**\n * Shared Blog Site is a unique single site across Enterprise account,\n * This site will hold all Blog posts related to the Marketing product.\n */\n SHARED_BLOG_ENTERPRISE = 'SHARED_BLOG_ENTERPRISE',\n /** Standalone forms (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n STANDALONE_FORMS = 'STANDALONE_FORMS',\n /** Standalone events (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n STANDALONE_EVENTS = 'STANDALONE_EVENTS',\n /** MIMIR - Siteless account for MIMIR Ai Job runner. */\n MIMIR = 'MIMIR',\n}\n\n/** @enumType */\nexport type NamespaceWithLiterals =\n | Namespace\n | 'UNKNOWN_NAMESPACE'\n | 'WIX'\n | 'SHOUT_OUT'\n | 'ALBUMS'\n | 'WIX_STORES_TEST_DRIVE'\n | 'HOTELS'\n | 'CLUBS'\n | 'ONBOARDING_DRAFT'\n | 'DEV_SITE'\n | 'LOGOS'\n | 'VIDEO_MAKER'\n | 'PARTNER_DASHBOARD'\n | 'DEV_CENTER_COMPANY'\n | 'HTML_DRAFT'\n | 'SITELESS_BUSINESS'\n | 'CREATOR_ECONOMY'\n | 'DASHBOARD_FIRST'\n | 'ANYWHERE'\n | 'HEADLESS'\n | 'ACCOUNT_MASTER_CMS'\n | 'RISE'\n | 'BRANDED_FIRST'\n | 'NOWNIA'\n | 'UGC_TEMPLATE'\n | 'CODUX'\n | 'MEDIA_DESIGN_CREATOR'\n | 'SHARED_BLOG_ENTERPRISE'\n | 'STANDALONE_FORMS'\n | 'STANDALONE_EVENTS'\n | 'MIMIR';\n\n/** Site transferred to another user. */\nexport interface SiteTransferred {\n /**\n * A previous owner id (user that transfers meta site).\n * @format GUID\n */\n oldOwnerId?: string;\n /**\n * A new owner id (user that accepts meta site).\n * @format GUID\n */\n newOwnerId?: string;\n}\n\n/** Soft deletion of the meta site. Could be restored. */\nexport interface SiteDeleted {\n /** A deletion context. */\n deleteContext?: DeleteContext;\n}\n\nexport interface DeleteContext {\n /** When the meta site was deleted. */\n dateDeleted?: Date | null;\n /** A status. */\n deleteStatus?: DeleteStatusWithLiterals;\n /**\n * A reason (flow).\n * @maxLength 255\n */\n deleteOrigin?: string;\n /**\n * A service that deleted it.\n * @maxLength 255\n */\n initiatorId?: string | null;\n}\n\nexport enum DeleteStatus {\n UNKNOWN = 'UNKNOWN',\n TRASH = 'TRASH',\n DELETED = 'DELETED',\n PENDING_PURGE = 'PENDING_PURGE',\n PURGED_EXTERNALLY = 'PURGED_EXTERNALLY',\n}\n\n/** @enumType */\nexport type DeleteStatusWithLiterals =\n | DeleteStatus\n | 'UNKNOWN'\n | 'TRASH'\n | 'DELETED'\n | 'PENDING_PURGE'\n | 'PURGED_EXTERNALLY';\n\n/** Restoration of the meta site. */\nexport interface SiteUndeleted {}\n\n/** First publish of a meta site. Or subsequent publish after unpublish. */\nexport interface SitePublished {}\n\nexport interface SiteUnpublished {\n /**\n * A list of URLs previously associated with the meta site.\n * @maxLength 4000\n * @maxSize 10000\n */\n urls?: string[];\n}\n\nexport interface SiteMarkedAsTemplate {}\n\nexport interface SiteMarkedAsWixSite {}\n\n/**\n * Represents a service provisioned a site.\n *\n * Note on `origin_instance_id`:\n * There is no guarantee that you will be able to find a meta site using `origin_instance_id`.\n * This is because of the following scenario:\n *\n * Imagine you have a template where a third-party application (TPA) includes some stub data,\n * such as a product catalog. When you create a site from this template, you inherit this\n * default product catalog. However, if the template's product catalog is modified,\n * your site will retain the catalog as it was at the time of site creation. This ensures that\n * your site remains consistent with what you initially received and does not include any\n * changes made to the original template afterward.\n * To ensure this, the TPA on the template gets a new instance_id.\n */\nexport interface ServiceProvisioned {\n /**\n * Either UUID or EmbeddedServiceType.\n * @maxLength 36\n */\n appDefId?: string;\n /**\n * Not only UUID. Something here could be something weird.\n * @maxLength 36\n */\n instanceId?: string;\n /**\n * An instance id from which this instance is originated.\n * @maxLength 36\n */\n originInstanceId?: string;\n /**\n * A version.\n * @maxLength 500\n */\n version?: string | null;\n /**\n * The origin meta site id\n * @format GUID\n */\n originMetaSiteId?: string | null;\n}\n\nexport interface ServiceRemoved {\n /**\n * Either UUID or EmbeddedServiceType.\n * @maxLength 36\n */\n appDefId?: string;\n /**\n * Not only UUID. Something here could be something weird.\n * @maxLength 36\n */\n instanceId?: string;\n /**\n * A version.\n * @maxLength 500\n */\n version?: string | null;\n}\n\n/** Rename of the site. Meaning, free public url has been changed as well. */\nexport interface SiteRenamed {\n /**\n * A new meta site name (URL slug).\n * @maxLength 20\n */\n newSiteName?: string;\n /**\n * A previous meta site name (URL slug).\n * @maxLength 255\n */\n oldSiteName?: string;\n}\n\n/**\n * Hard deletion of the meta site.\n *\n * Could not be restored. Therefore it's desirable to cleanup data.\n */\nexport interface SiteHardDeleted {\n /** A deletion context. */\n deleteContext?: DeleteContext;\n}\n\nexport interface NamespaceChanged {\n /** A previous namespace. */\n oldNamespace?: NamespaceWithLiterals;\n /** A new namespace. */\n newNamespace?: NamespaceWithLiterals;\n}\n\n/** Assigned Studio editor */\nexport interface StudioAssigned {}\n\n/** Unassigned Studio editor */\nexport interface StudioUnassigned {}\n\n/**\n * Fired in case site URLs were changed in any way: new secondary domain, published, account slug rename, site rename etc.\n *\n * This is an internal event, it's not propagated in special events, because it's non-actionable. If you need to keep up\n * with sites and its urls, you need to listen to another topic/event. Read about it:\n *\n * https://bo.wix.com/wix-docs/rest/meta-site/meta-site---urls-service\n */\nexport interface SiteUrlChanged {}\n\n/**\n * Used at the end of the deletion flow for both draft sites and when a user deletes a site.\n * Consumed by other teams to remove relevant data.\n */\nexport interface SitePurgedExternally {\n /**\n * @maxLength 2048\n * @maxSize 100\n * @deprecated\n * @targetRemovalDate 2025-04-15\n */\n appDefId?: string[];\n}\n\n/** Assigned Odeditor */\nexport interface OdeditorAssigned {}\n\n/** Unassigned Odeditor */\nexport interface OdeditorUnassigned {}\n\n/** Assigned Picasso editor */\nexport interface PicassoAssigned {}\n\n/** Unassigned Picasso */\nexport interface PicassoUnassigned {}\n\nexport interface Empty {}\n\nexport interface FeatureEvent extends FeatureEventEventOneOf {\n /**\n * Information about an event that makes a feature eligible to the user.\n * Triggered for example, for new features or when a feature is reassigned\n * to an account or a site.\n */\n enabled?: FeatureEnabled;\n /**\n * Information about an event that disables a feature for the user.\n * Triggered for example, when a feature is unassigned from a site,\n * reassigned to a different site, or the user switched to a different contract.\n */\n disabled?: FeatureDisabled;\n /**\n * Information about an event that updates a feature. An `updated` event\n * is triggered for example by the\n * [Report Quota Usage](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/report-quota-usage)\n * and [Reset Usage Counter](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/reset-usage-counter)\n * endpoints.\n */\n updated?: FeatureUpdated;\n /**\n * Information about an event that cancels a feature for the user.\n * Triggered for example, when a feature is canceled, transferred to\n * another account, or the user switched to a different contract.\n */\n cancelled?: FeatureCancelled;\n /**\n * Timestamp of the event in\n * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).\n */\n timestamp?: Date | null;\n}\n\n/** @oneof */\nexport interface FeatureEventEventOneOf {\n /**\n * Information about an event that makes a feature eligible to the user.\n * Triggered for example, for new features or when a feature is reassigned\n * to an account or a site.\n */\n enabled?: FeatureEnabled;\n /**\n * Information about an event that disables a feature for the user.\n * Triggered for example, when a feature is unassigned from a site,\n * reassigned to a different site, or the user switched to a different contract.\n */\n disabled?: FeatureDisabled;\n /**\n * Information about an event that updates a feature. An `updated` event\n * is triggered for example by the\n * [Report Quota Usage](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/report-quota-usage)\n * and [Reset Usage Counter](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/reset-usage-counter)\n * endpoints.\n */\n updated?: FeatureUpdated;\n /**\n * Information about an event that cancels a feature for the user.\n * Triggered for example, when a feature is canceled, transferred to\n * another account, or the user switched to a different contract.\n */\n cancelled?: FeatureCancelled;\n}\n\n/** Feature created or enabled after disabled state */\nexport interface FeatureEnabled extends FeatureEnabledReasonOneOf {\n /** Information about a transfer from another account. */\n transferredFromAnotherAccount?: TransferredFromAnotherAccountReason;\n /** Information about a transfer from another site. */\n reassignedFromSite?: ReassignedFromSiteReason;\n /** Information about a feature that hadn't been assigned to site. */\n assignedFromFloating?: AssignedFromFloatingReason;\n /** Information about the new feature. */\n newFeature?: NewFeatureReason;\n /** Information about the contract switch. */\n contractSwitched?: ContractSwitchedReason;\n /** Information about the manually created features. */\n manualFeatureCreation?: ManualFeatureCreationReason;\n /** Information about a feature that was migrated from legacy. */\n migratedFromLegacy?: MigratedFromLegacyReason;\n /** Enabled feature. */\n feature?: Feature;\n /**\n * Information about a transfer from another account.\n * __Deprecated__. Use `reason.transferred_from_another_account` instead.\n * @format GUID\n */\n transferredFromAccount?: string | null;\n /**\n * Information about a transfer from another site.\n * __Deprecated__. Use `reason.reassigned_from_site` instead.\n * @format GUID\n */\n reassignedFromMetasite?: string | null;\n}\n\n/** @oneof */\nexport interface FeatureEnabledReasonOneOf {\n /** Information about a transfer from another account. */\n transferredFromAnotherAccount?: TransferredFromAnotherAccountReason;\n /** Information about a transfer from another site. */\n reassignedFromSite?: ReassignedFromSiteReason;\n /** Information about a feature that hadn't been assigned to site. */\n assignedFromFloating?: AssignedFromFloatingReason;\n /** Information about the new feature. */\n newFeature?: NewFeatureReason;\n /** Information about the contract switch. */\n contractSwitched?: ContractSwitchedReason;\n /** Information about the manually created features. */\n manualFeatureCreation?: ManualFeatureCreationReason;\n /** Information about a feature that was migrated from legacy. */\n migratedFromLegacy?: MigratedFromLegacyReason;\n}\n\nexport interface Feature extends FeatureQuantityInfoOneOf {\n /**\n * Deprecated. Use `enabled` instead.\n * @deprecated\n */\n booleanFeature?: BooleanFeature;\n /**\n * Deprecated. Use `quotaInfo` instead.\n * @deprecated\n */\n quotaFeature?: QuotaFeature;\n /**\n * ID of the feature. __Note:__ Isn't unique. For example, all features that\n * are available to free Wix accounts or site in some capacity have\n * `{\"id\": \"DEFAULT\"}`. Use `uniqueName` as unique identifier for a feature.\n * @readonly\n */\n _id?: string;\n /**\n * Unique name of the feature. Only lower case letters, numbers, and dashes\n * `-` are supported. Used in the endpoints of the\n * [Features Manager API](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/introduction)\n * to specify the feature. Not visible to customers. We recommend to start\n * the unique name with a prefix describing your organization or Wix company.\n * For example, `bookings` or `crm`.\n *\n * Min: 2 characters\n * Max: 50 characters\n * @minLength 2\n * @maxLength 50\n */\n uniqueName?: string;\n /**\n * Information about whether the feature belongs to a Wix account or site.\n * Account features have `context.userId`. Site features have `context.metaSiteId` in case\n * they're assigned to a specific site. Site features that aren't assigned to\n * a specific site have neither ID.\n */\n context?: FeatureContext;\n /**\n * Deprecated.\n * @readonly\n * @deprecated\n */\n createdAt?: Date | null;\n /**\n * Deprecated.\n * @readonly\n * @deprecated\n */\n updatedAt?: Date | null;\n /**\n * Aggregated information about how often customers can use the feature.\n * Available only for quota features.\n */\n quotaInfo?: QuotaInfo;\n /**\n * Whether the customer is currently allowed to use the feature.\n * `true` means that the customer can use the feature. This means a boolean\n * feature is active or a quota feature has remaining usage.\n * `false` means that the customer can't use the feature.\n * This means a boolean feature isn't active or a quota feature doesn't\n * have remaining usage.\n */\n enabled?: boolean;\n /**\n * ID of the [subscription](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/subscription-object)\n * to which the feature instance belongs.\n * @format GUID\n */\n subscriptionId?: string | null;\n /**\n * Metadata of the feature. Wix Premium uses the metadata object to indicate\n * that customers who purchase a product with the feature also get\n * access to an additional product. For these bundled products `metadata`\n * looks like this: `{\"tpa\": \"{\"appDefId\": \"sample-app-def-id-1234567890\", \"vendorProductId\": \"sample-productId\"}}\"`.\n * But you can use the `metadata` property for other purposes, too.\n */\n metadata?: Record<string, string>;\n}\n\n/** @oneof */\nexport interface FeatureQuantityInfoOneOf {\n /**\n * Deprecated. Use `enabled` instead.\n * @deprecated\n */\n booleanFeature?: BooleanFeature;\n /**\n * Deprecated. Use `quotaInfo` instead.\n * @deprecated\n */\n quotaFeature?: QuotaFeature;\n}\n\n/**\n * Context this feature is currently connected to.\n * Note: Do not confuse with feature scope which is configured in the product catalog\n * and defines in which context the product can be used\n */\nexport interface FeatureContext {\n /**\n * ID of the Wix account that the feature instance belongs to.\n * Available for both site and account level feature instances.\n * @format GUID\n */\n userId?: string;\n /**\n * ID of the meta site that the feature instance is assigned to.\n * Only available for site level feature instances that are assigned to a Wix\n * site. Not available for account level and unassigned site level feature\n * instances.\n * @format GUID\n */\n metaSiteId?: string | null;\n}\n\n/**\n * A feature that can be either \"enabled\" or \"disabled\". The default/freemium setting is always OFF, and the premium setting is always ON (meaning, unlimited usage without tracking).\n * A boolean feature is similar to a quantitive feature with a default limit of 0 and UNLIMITED premium limit (although a bit simplified).\n */\nexport interface BooleanFeature {}\n\n/** A feature with a periodic usage limitation. The default limit is defined in the Feature Spec, the Premium limits are defined in the respective ProductFeature. */\nexport interface QuotaFeature {\n /** Default (or Freemium) quota limitation. if left undefined the free feature has unlimited amount. */\n limit?: string | null;\n /** Periodic time-frame to reset the usage counter. You may use NO_PERIOD if counter shouldn't be reset. */\n period?: FeaturePeriodWithLiterals;\n /** Usage measurement units (seconds? MBs? unitless?). Usage reported will be counted in multiples of this basic unit. */\n units?: string | null;\n}\n\n/** Determines the reset cycle of the feature usage. */\nexport enum FeaturePeriod {\n NO_PERIOD = 'NO_PERIOD',\n MILLISECOND = 'MILLISECOND',\n SECOND = 'SECOND',\n MINUTE = 'MINUTE',\n HOUR = 'HOUR',\n DAY = 'DAY',\n WEEK = 'WEEK',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type FeaturePeriodWithLiterals =\n | FeaturePeriod\n | 'NO_PERIOD'\n | 'MILLISECOND'\n | 'SECOND'\n | 'MINUTE'\n | 'HOUR'\n | 'DAY'\n | 'WEEK'\n | 'MONTH'\n | 'YEAR';\n\nexport interface QuotaInfo {\n /**\n * Aggregation of how often the customer is allowed to use the feature at the time of the request.\n * `null` means that the customer has unlimited access to the feature.\n */\n limit?: string | null;\n /**\n * Deprecated because a feature can have multiple periods defined. Use `period` in `breakdown` entries instead.\n * Time frame for the usage limitation. `NO_PERIOD` means that `remainingUsage`\n * isn't automatically reset to the feature's `limit` after a specific period.\n * You may still manually call\n * [Reset Usage Counter](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/reset-usage-counter).\n * @deprecated\n * @replacedBy breakdown.period\n * @targetRemovalDate 2026-03-31\n */\n period?: FeaturePeriodWithLiterals;\n /**\n * Aggregation of how often the customer has used the feature.\n * This value is retrieved from the Quota Manager/Rate Limiter system. If the\n * `exclude_quota_usage` field in the `ListFeaturesRequest` was set to `true`,\n * this field will contain the value `-1`.\n */\n currentUsage?: string;\n /**\n * Aggregation of how often the customer can still use the feature.\n * `null` means that the customer has unlimited access to the feature.\n * This value is retrieved from the Quota Manager/Rate Limiter system. If the\n * `exclude_quota_usage` field in the `ListFeaturesRequest` was set to `true`,\n * this field will not be populated.\n */\n remainingUsage?: string | null;\n /**\n * Breakdown of quota information entries, entry per feature instance.\n * @maxSize 100\n */\n breakdown?: QuotaInfoEntry[];\n}\n\nexport interface QuotaInfoEntry {\n /**\n * If quota is of free feature, the id would be empty (None).\n * If quota is of premium feature, this is the ID of the feature instance.\n * @format GUID\n */\n featureInstanceId?: string | null;\n /**\n * How often the customer is allowed to use the feature during the specified\n * period. `null` means that the customer has unlimited access to the feature.\n */\n limit?: string | null;\n /**\n * Time frame for the usage limitation. `NO_PERIOD` means that `remainingUsage`\n * isn't automatically reset to the feature's `limit` after a specific period.\n * You may still manually call\n * [Reset Usage Counter](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/reset-usage-counter).\n */\n period?: FeaturePeriodWithLiterals;\n /**\n * How often the customer has used the feature during the current\n * period.\n * This value is retrieved from the Quota Manager/Rate Limiter system. If the\n * `exclude_quota_usage` field in the `ListFeaturesRequest` was set to `true`,\n * this field will contain the value `-1`.\n */\n currentUsage?: string;\n /**\n * How often the customer can still use the feature during the current\n * period. `null` means that the customer has unlimited access to the feature.\n * This value is retrieved from the Quota Manager/Rate Limiter system. If the\n * `exclude_quota_usage` field in the `ListFeaturesRequest` was set to `true`,\n * this field will not be populated.\n */\n remainingUsage?: string | null;\n}\n\n/** Subscription transferred from another account, features on the current account were enabled. */\nexport interface TransferredFromAnotherAccountReason {\n /**\n * Information about a transfer from another account.\n * @format GUID\n */\n transferredFromAccount?: string;\n}\n\n/** Subscription moved from one site to another in the same account, features enabled on the target site */\nexport interface ReassignedFromSiteReason {\n /**\n * Information about a transfer from another site.\n * @format GUID\n */\n reassignedFromMetasite?: string;\n}\n\n/** Subscription was floating and assigned to site, features enabled on the target site */\nexport interface AssignedFromFloatingReason {}\n\n/** New subscription created and features created as enabled */\nexport interface NewFeatureReason {}\n\n/** Subscription was upgraded or downgraded, as a result new features enabled, missing features disabled , quantities are updated */\nexport interface ContractSwitchedReason {}\n\n/** a call to CreateFeature in features-writer, creates feature that is not attached to subscription */\nexport interface ManualFeatureCreationReason {}\n\n/** Subscription created due to migration from old premium model */\nexport interface MigratedFromLegacyReason {}\n\n/** Feature disabled and can be enabled in the future */\nexport interface FeatureDisabled extends FeatureDisabledReasonOneOf {\n /** Information about a feature that's no longer assigned to a site. */\n unassingedToFloating?: UnAssingedToFloatingReason;\n /**\n * Information about a feature that's been replaced by a feature from a\n * different subscription.\n */\n replacedByAnotherSubscription?: ReplacedByAnotherSubscriptionReason;\n /**\n * Information about a feature that's been reassigned to a different\n * site.\n */\n reassignedToAnotherSite?: ReassignedToAnotherSiteReason;\n /**\n * Disabled feature. Includes information about the feature's new state,\n * possibly its new context.\n */\n feature?: Feature;\n /**\n * ID of the meta site for which the feature has been disabled.\n * @format GUID\n */\n metaSiteId?: string | null;\n}\n\n/** @oneof */\nexport interface FeatureDisabledReasonOneOf {\n /** Information about a feature that's no longer assigned to a site. */\n unassingedToFloating?: UnAssingedToFloatingReason;\n /**\n * Information about a feature that's been replaced by a feature from a\n * different subscription.\n */\n replacedByAnotherSubscription?: ReplacedByAnotherSubscriptionReason;\n /**\n * Information about a feature that's been reassigned to a different\n * site.\n */\n reassignedToAnotherSite?: ReassignedToAnotherSiteReason;\n}\n\n/** Subscription was unassigned from the site and moved into floating state */\nexport interface UnAssingedToFloatingReason {}\n\n/** Another subscription was assigned to the site, causing existing features on this site to be disabled */\nexport interface ReplacedByAnotherSubscriptionReason {}\n\n/** Subscription was assigned to another site, causing features on the origin site to be disabled. */\nexport interface ReassignedToAnotherSiteReason {\n /**\n * Information about a transfer to the site.\n * @format GUID\n */\n reassignedToMetasite?: string;\n}\n\n/** Feature updated, for example Quota was increased due to upgrade */\nexport interface FeatureUpdated\n extends FeatureUpdatedPreviousQuantityInfoOneOf,\n FeatureUpdatedReasonOneOf {\n /** Information about a feature that doesn't have a usage quota. */\n booleanFeature?: BooleanFeature;\n /** Information about a feature that has a usage quota. */\n quotaFeature?: QuotaFeature;\n /** Information about the contract switch. */\n contractSwitched?: ContractSwitchedReason;\n /**\n * Updated feature. Includes information about the feature's new state and\n * possibly its new context.\n */\n feature?: Feature;\n}\n\n/** @oneof */\nexport interface FeatureUpdatedPreviousQuantityInfoOneOf {\n /** Information about a feature that doesn't have a usage quota. */\n booleanFeature?: BooleanFeature;\n /** Information about a feature that has a usage quota. */\n quotaFeature?: QuotaFeature;\n}\n\n/** @oneof */\nexport interface FeatureUpdatedReasonOneOf {\n /** Information about the contract switch. */\n contractSwitched?: ContractSwitchedReason;\n}\n\n/** Feature was permanently cancelled */\nexport interface FeatureCancelled extends FeatureCancelledReasonOneOf {\n /** Information about a transfer to the account. */\n transferredToAnotherAccount?: TransferredToAnotherAccountReason;\n /** Information about the contract switch. */\n contractSwitched?: ContractSwitchedReason;\n /** Information about the feature cancellation. */\n cancelRequest?: CancelRequestedReason;\n /** Canceled feature. */\n feature?: Feature;\n /**\n * Information about a transfer to the account.\n * __Deprecated__. Use `reason.transferred_to_account` instead.\n * @format GUID\n */\n transferredToAccount?: string | null;\n}\n\n/** @oneof */\nexport interface FeatureCancelledReasonOneOf {\n /** Information about a transfer to the account. */\n transferredToAnotherAccount?: TransferredToAnotherAccountReason;\n /** Information about the contract switch. */\n contractSwitched?: ContractSwitchedReason;\n /** Information about the feature cancellation. */\n cancelRequest?: CancelRequestedReason;\n}\n\n/** Subscription was transferred to another account, features in the origin account were cancelled */\nexport interface TransferredToAnotherAccountReason {\n /**\n * Information about a transfer to the account.\n * @format GUID\n */\n transferredToAccount?: string;\n}\n\n/** Cancellation was requested from the subscription manager api, might be a result of billing event, or direct call */\nexport interface CancelRequestedReason {}\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 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: LoyaltyProgram;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a loyalty program is updated.\n * @permissionScope Read Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY\n * @permissionScope Manage Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId LOYALTY.READ_PROGRAM\n * @webhook\n * @eventType wix.loyalty.v1.program_updated\n * @serviceIdentifier com.wixpress.loyalty.program.LoyaltyPrograms\n * @slug updated\n */\nexport declare function onProgramUpdated(\n handler: (event: ProgramUpdatedEnvelope) => void | Promise<void>\n): void;\n\ntype ProgramNonNullablePaths =\n | `status`\n | `pointsExpiration.status`\n | `pointsExpiration.monthsOfInactivity`\n | `pointsExpiration.expiringPointsPercentage`\n | `premiumFeatures.loyaltyProgram`\n | `premiumFeatures.tiers`\n | `premiumFeatures.pointsExpiration`;\n\n/**\n * Retrieves the loyalty program.\n * @public\n * @permissionId LOYALTY.READ_PROGRAM\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wixpress.loyalty.program.LoyaltyPrograms.GetLoyaltyProgram\n */\nexport async function getLoyaltyProgram(): Promise<\n NonNullablePaths<\n GetLoyaltyProgramResponse,\n {\n [P in ProgramNonNullablePaths]: `loyaltyProgram.${P}`;\n }[ProgramNonNullablePaths]\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 = ambassadorWixLoyaltyV1Program.getLoyaltyProgram(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [{ path: 'loyaltyProgram.pointDefinition.icon' }],\n },\n ])\n )!;\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 loyalty programs for all metasites that the caller is a member of.\n *\n * Must be called with user identity.\n * @public\n * @permissionId LOYALTY.PROGRAM_BULK_READ\n * @fqn com.wixpress.loyalty.program.LoyaltyPrograms.BulkGetLoyaltyProgram\n */\nexport async function bulkGetLoyaltyProgram(): Promise<\n NonNullablePaths<\n BulkGetLoyaltyProgramResponse,\n | `programInSites`\n | `programInSites.${number}.metaSiteId`\n | {\n [P in ProgramNonNullablePaths]: `programInSites.${number}.loyaltyProgram.${P}`;\n }[ProgramNonNullablePaths]\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 = ambassadorWixLoyaltyV1Program.bulkGetLoyaltyProgram(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'programInSites.loyaltyProgram.pointDefinition.icon' },\n ],\n },\n ])\n )!;\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 site's loyalty program.\n *\n * This method updates the name of the loyalty program and the details of the collectible points unit.\n * To activate the loyalty program, call Activate Loyalty Program.\n * @param loyaltyProgram - Loyalty program fields to update.\n * @public\n * @requiredField loyaltyProgram\n * @permissionId LOYALTY.MANAGE_PROGRAM\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.program.LoyaltyPrograms.UpdateLoyaltyProgram\n */\nexport async function updateLoyaltyProgram(\n loyaltyProgram: LoyaltyProgram\n): Promise<\n NonNullablePaths<\n UpdateLoyaltyProgramResponse,\n {\n [P in ProgramNonNullablePaths]: `loyaltyProgram.${P}`;\n }[ProgramNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({ loyaltyProgram: loyaltyProgram }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [{ path: 'loyaltyProgram.pointDefinition.icon' }],\n },\n ]\n );\n\n const reqOpts = ambassadorWixLoyaltyV1Program.updateLoyaltyProgram(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [{ path: 'loyaltyProgram.pointDefinition.icon' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { loyaltyProgram: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['loyaltyProgram']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Activates a loyalty program.\n *\n * Initially, when a loyalty program is installed, the status is set to `\"DRAFT\"`.\n * You can change the program's status to `\"ACTIVE\"` with this method or through the [dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Floyalty-accounts/wizard/).\n * A site's customers can only earn or redeem points while the program is `\"ACTIVE\"`.\n *\n * This method only updates the status of a loyalty program. To make other updates to the program, call Update Loyalty Program.\n *\n * To temporarily pause your loyalty program, call Pause Loyalty Program and see [Pausing Your Loyalty Program](https://support.wix.com/en/article/wix-loyalty-program-pausing-your-loyalty-program) for more information.\n * @public\n * @permissionId LOYALTY.MANAGE_PROGRAM\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.program.LoyaltyPrograms.ActivateLoyaltyProgram\n */\nexport async function activateLoyaltyProgram(): Promise<\n NonNullablePaths<\n ActivateLoyaltyProgramResponse,\n {\n [P in ProgramNonNullablePaths]: `loyaltyProgram.${P}`;\n }[ProgramNonNullablePaths]\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 = ambassadorWixLoyaltyV1Program.activateLoyaltyProgram(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [{ path: 'loyaltyProgram.pointDefinition.icon' }],\n },\n ])\n )!;\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 * Changes the program status to `\"PAUSED\"`.\n *\n * See [Pausing Your Loyalty Program](https://support.wix.com/en/article/wix-loyalty-program-pausing-your-loyalty-program) for more information.\n * @public\n * @permissionId LOYALTY.MANAGE_PROGRAM\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.program.LoyaltyPrograms.PauseLoyaltyProgram\n */\nexport async function pauseLoyaltyProgram(): Promise<\n NonNullablePaths<\n PauseLoyaltyProgramResponse,\n {\n [P in ProgramNonNullablePaths]: `loyaltyProgram.${P}`;\n }[ProgramNonNullablePaths]\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 = ambassadorWixLoyaltyV1Program.pauseLoyaltyProgram(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [{ path: 'loyaltyProgram.pointDefinition.icon' }],\n },\n ])\n )!;\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 information about the available loyalty program premium features.\n * @public\n * @permissionId LOYALTY.READ_PROGRAM\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wixpress.loyalty.program.LoyaltyPrograms.GetLoyaltyProgramPremiumFeatures\n */\nexport async function getLoyaltyProgramPremiumFeatures(): Promise<\n NonNullablePaths<\n GetLoyaltyProgramPremiumFeaturesResponse,\n `loyaltyProgram` | `tiers` | `pointsExpiration`\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 ambassadorWixLoyaltyV1Program.getLoyaltyProgramPremiumFeatures(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 the `pointsExpiration` status to `\"ENABLED\"`.\n * @public\n * @permissionId LOYALTY.MANAGE_PROGRAM\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.program.LoyaltyPrograms.EnablePointsExpiration\n */\nexport async function enablePointsExpiration(): Promise<\n NonNullablePaths<\n EnablePointsExpirationResponse,\n {\n [P in ProgramNonNullablePaths]: `loyaltyProgram.${P}`;\n }[ProgramNonNullablePaths]\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 = ambassadorWixLoyaltyV1Program.enablePointsExpiration(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [{ path: 'loyaltyProgram.pointDefinition.icon' }],\n },\n ])\n )!;\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 the `pointsExpiration` status to `\"DISABLED\"`.\n * @public\n * @permissionId LOYALTY.MANAGE_PROGRAM\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.program.LoyaltyPrograms.DisablePointsExpiration\n */\nexport async function disablePointsExpiration(): Promise<\n NonNullablePaths<\n DisablePointsExpirationResponse,\n {\n [P in ProgramNonNullablePaths]: `loyaltyProgram.${P}`;\n }[ProgramNonNullablePaths]\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 ambassadorWixLoyaltyV1Program.disablePointsExpiration(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [{ path: 'loyaltyProgram.pointDefinition.icon' }],\n },\n ])\n )!;\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 { 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 resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/loyalty-programs',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/loyalty-programs',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/loyalty-programs',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/loyalty-programs',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/loyalty-programs',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/loyalty-programs',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/loyalty-programs',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/loyalty-programs',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/loyalty-programs',\n destPath: '',\n },\n ],\n '*.pub.wix-code.com': [\n {\n srcPath: '/_api/loyalty-programs',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/loyalty-programs',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_loyalty_programs';\n\n/** Retrieves the loyalty program. */\nexport function getLoyaltyProgram(payload: object): RequestOptionsFactory<any> {\n function __getLoyaltyProgram({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.program',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.loyalty.program.LoyaltyPrograms.GetLoyaltyProgram',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl({\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: 'loyaltyProgram.createdDate' },\n { path: 'loyaltyProgram.updatedDate' },\n { path: 'loyaltyProgram.pointDefinition.icon.urlExpirationDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.x' },\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.y' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getLoyaltyProgram;\n}\n\n/**\n * Retrieves loyalty programs for all metasites that the caller is a member of.\n *\n * Must be called with user identity.\n */\nexport function bulkGetLoyaltyProgram(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkGetLoyaltyProgram({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.program',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.loyalty.program.LoyaltyPrograms.BulkGetLoyaltyProgram',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl({\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.loyaltyProgram.createdDate' },\n { path: 'programInSites.loyaltyProgram.updatedDate' },\n {\n path: 'programInSites.loyaltyProgram.pointDefinition.icon.urlExpirationDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'programInSites.loyaltyProgram.pointDefinition.icon.focalPoint.x',\n },\n {\n path: 'programInSites.loyaltyProgram.pointDefinition.icon.focalPoint.y',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkGetLoyaltyProgram;\n}\n\n/**\n * Updates a site's loyalty program.\n *\n * This method updates the name of the loyalty program and the details of the collectible points unit.\n * To activate the loyalty program, call Activate Loyalty Program.\n */\nexport function updateLoyaltyProgram(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateLoyaltyProgram({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'loyaltyProgram.createdDate' },\n { path: 'loyaltyProgram.updatedDate' },\n { path: 'loyaltyProgram.pointDefinition.icon.urlExpirationDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.x' },\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.y' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.program',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wixpress.loyalty.program.LoyaltyPrograms.UpdateLoyaltyProgram',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl({\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: 'loyaltyProgram.createdDate' },\n { path: 'loyaltyProgram.updatedDate' },\n { path: 'loyaltyProgram.pointDefinition.icon.urlExpirationDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.x' },\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.y' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateLoyaltyProgram;\n}\n\n/**\n * Activates a loyalty program.\n *\n * Initially, when a loyalty program is installed, the status is set to `\"DRAFT\"`.\n * You can change the program's status to `\"ACTIVE\"` with this method or through the [dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Floyalty-accounts/wizard/).\n * A site's customers can only earn or redeem points while the program is `\"ACTIVE\"`.\n *\n * This method only updates the status of a loyalty program. To make other updates to the program, call Update Loyalty Program.\n *\n * To temporarily pause your loyalty program, call Pause Loyalty Program and see [Pausing Your Loyalty Program](https://support.wix.com/en/article/wix-loyalty-program-pausing-your-loyalty-program) for more information.\n */\nexport function activateLoyaltyProgram(\n payload: object\n): RequestOptionsFactory<any> {\n function __activateLoyaltyProgram({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.program',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.program.LoyaltyPrograms.ActivateLoyaltyProgram',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl({\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: 'loyaltyProgram.createdDate' },\n { path: 'loyaltyProgram.updatedDate' },\n { path: 'loyaltyProgram.pointDefinition.icon.urlExpirationDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.x' },\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.y' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __activateLoyaltyProgram;\n}\n\n/**\n * Changes the program status to `\"PAUSED\"`.\n *\n * See [Pausing Your Loyalty Program](https://support.wix.com/en/article/wix-loyalty-program-pausing-your-loyalty-program) for more information.\n */\nexport function pauseLoyaltyProgram(\n payload: object\n): RequestOptionsFactory<any> {\n function __pauseLoyaltyProgram({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.program',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.program.LoyaltyPrograms.PauseLoyaltyProgram',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl({\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: 'loyaltyProgram.createdDate' },\n { path: 'loyaltyProgram.updatedDate' },\n { path: 'loyaltyProgram.pointDefinition.icon.urlExpirationDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.x' },\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.y' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __pauseLoyaltyProgram;\n}\n\n/** Retrieves information about the available loyalty program premium features. */\nexport function getLoyaltyProgramPremiumFeatures(\n payload: object\n): RequestOptionsFactory<any> {\n function __getLoyaltyProgramPremiumFeatures({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.program',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.loyalty.program.LoyaltyPrograms.GetLoyaltyProgramPremiumFeatures',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl({\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 __getLoyaltyProgramPremiumFeatures;\n}\n\n/** Updates the `pointsExpiration` status to `\"ENABLED\"`. */\nexport function enablePointsExpiration(\n payload: object\n): RequestOptionsFactory<any> {\n function __enablePointsExpiration({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.program',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.program.LoyaltyPrograms.EnablePointsExpiration',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl({\n protoPath: '/v1/program/points-expiration/enable',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'loyaltyProgram.createdDate' },\n { path: 'loyaltyProgram.updatedDate' },\n { path: 'loyaltyProgram.pointDefinition.icon.urlExpirationDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.x' },\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.y' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __enablePointsExpiration;\n}\n\n/** Updates the `pointsExpiration` status to `\"DISABLED\"`. */\nexport function disablePointsExpiration(\n payload: object\n): RequestOptionsFactory<any> {\n function __disablePointsExpiration({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.program',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.program.LoyaltyPrograms.DisablePointsExpiration',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl({\n protoPath: '/v1/program/points-expiration/disable',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'loyaltyProgram.createdDate' },\n { path: 'loyaltyProgram.updatedDate' },\n { path: 'loyaltyProgram.pointDefinition.icon.urlExpirationDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.x' },\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.y' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __disablePointsExpiration;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAAA;AAAA,EAAA,6BAAAC;AAAA,EAAA,+BAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,wCAAAC;AAAA,EAAA,2BAAAC;AAAA,EAAA,4BAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,mDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE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BAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["activateLoyaltyProgram","bulkGetLoyaltyProgram","disablePointsExpiration","enablePointsExpiration","getLoyaltyProgram","getLoyaltyProgramPremiumFeatures","pauseLoyaltyProgram","updateLoyaltyProgram","import_float","import_timestamp","import_rest_modules","payload","import_image","import_transform_paths","ProgramStatus","Status","Type","State","SiteCreatedContext","Namespace","DeleteStatus","FeaturePeriod","WebhookIdentityType","getLoyaltyProgram","sdkTransformError","bulkGetLoyaltyProgram","updateLoyaltyProgram","activateLoyaltyProgram","pauseLoyaltyProgram","getLoyaltyProgramPremiumFeatures","enablePointsExpiration","disablePointsExpiration"]}
|
|
1
|
+
{"version":3,"sources":["../../index.typings.ts","../../src/loyalty-v1-program-programs.universal.ts","../../src/loyalty-v1-program-programs.http.ts"],"sourcesContent":["export * from './src/loyalty-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 ambassadorWixLoyaltyV1Program from './loyalty-v1-program-programs.http.js';\nimport { transformSDKImageToRESTImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * A loyalty program allows sites to maintain customer reward accounts. Wix users can create a\n * loyalty program to increase customer retention. Read more about the [loyalty program](https://support.wix.com/en/article/wix-loyalty-program-an-overview).\n */\nexport interface LoyaltyProgram {\n /**\n * Program name.\n * @minLength 2\n * @maxLength 50\n */\n name?: string | null;\n /** Details about the program's collectible unit. */\n pointDefinition?: PointDefinition;\n /**\n * Program status.\n * Customers can only earn or redeem points while the program is `\"ACTIVE\"`.\n *\n * Default: `\"DRAFT\"`\n * @readonly\n */\n status?: ProgramStatusWithLiterals;\n /**\n * Date and time the program was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the program was updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Configuration for the points expiration feature. */\n pointsExpiration?: PointsExpiration;\n /**\n * Information about the available program premium features.\n * @readonly\n */\n premiumFeatures?: PremiumFeatures;\n}\n\nexport interface PointDefinition {\n /**\n * Display name for the program's collectible unit.\n *\n * It's recommended to use a plural, for example `\"Stars\"`.\n *\n * In contrast to a custom name, the default `\"Points\"` name is translated and adjusted to singular based on circumstances.\n *\n * Default: `\"Points\"`.\n * @maxLength 20\n */\n customName?: string | null;\n /** Image URL. See [Image]($w/image/introduction) for more information on URL formats for images. */\n icon?: string;\n}\n\nexport interface FocalPoint {\n /** X-coordinate of the focal point. */\n x?: number;\n /** Y-coordinate of the focal point. */\n y?: number;\n /** crop by height */\n height?: number | null;\n /** crop by width */\n width?: number | null;\n}\n\nexport enum ProgramStatus {\n /** Unknown program status. */\n UNKNOWN = 'UNKNOWN',\n /** Program is in draft mode. Customers can't earn or redeem points. */\n DRAFT = 'DRAFT',\n /** Program is active. Customers can earn and redeem points. */\n ACTIVE = 'ACTIVE',\n /**\n * Program is paused. Customers can't earn or redeem points while the program is paused.\n *\n * Set the program to `\"ACTIVE\"` to resume earning and redeeming points.\n */\n PAUSED = 'PAUSED',\n}\n\n/** @enumType */\nexport type ProgramStatusWithLiterals =\n | ProgramStatus\n | 'UNKNOWN'\n | 'DRAFT'\n | 'ACTIVE'\n | 'PAUSED';\n\nexport interface PointsExpiration {\n /**\n * Status of the points expiration feature.\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * How many months a member should be inactive to lose the collected points.\n * @min 1\n * @max 12\n */\n monthsOfInactivity?: number;\n /**\n * Percentage of points that a member loses after being inactive.\n * @min 1\n * @max 100\n */\n expiringPointsPercentage?: number;\n}\n\nexport enum Status {\n /** Unknown points expiration status. This value is not used. */\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n /** Points expiration feature is disabled. */\n DISABLED = 'DISABLED',\n /** Points expiration feature is enabled. */\n ENABLED = 'ENABLED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN_STATUS'\n | 'DISABLED'\n | 'ENABLED';\n\nexport interface PremiumFeatures {\n /**\n * Whether there are any loyalty program premium features.\n * @readonly\n */\n loyaltyProgram?: boolean;\n /**\n * Whether this loyalty program includes tiers.\n * @readonly\n */\n tiers?: boolean;\n /**\n * Whether this loyalty program includes point expiration.\n * @readonly\n */\n pointsExpiration?: boolean;\n}\n\nexport interface SocialMediaSettings {\n /**\n * List of social media channels\n * @maxSize 5\n */\n channels?: SocialMediaChannel[];\n}\n\nexport interface SocialMediaChannel {\n /** Social media channel type */\n type?: TypeWithLiterals;\n /** Enable or disable social media channel */\n enabled?: boolean;\n /**\n * Social media channel ID. For example, Instagram username.\n * @minLength 1\n * @maxLength 255\n */\n _id?: string;\n /**\n * Social media channel URL\n * @readonly\n * @format WEB_URL\n */\n url?: string | null;\n}\n\nexport enum Type {\n /** Unknown social media channel type. */\n UNKNOWN_CHANNEL = 'UNKNOWN_CHANNEL',\n /** Facebook social media channel. */\n FACEBOOK = 'FACEBOOK',\n /** Instagram social media channel. */\n INSTAGRAM = 'INSTAGRAM',\n /** LinkedIn social media channel. */\n LINKEDIN = 'LINKEDIN',\n /** X social media channel. */\n X = 'X',\n /** TikTok social media channel. */\n TIKTOK = 'TIKTOK',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'UNKNOWN_CHANNEL'\n | 'FACEBOOK'\n | 'INSTAGRAM'\n | 'LINKEDIN'\n | 'X'\n | 'TIKTOK';\n\nexport interface GetLoyaltyProgramRequest {}\n\nexport interface GetLoyaltyProgramResponse {\n /** Retrieved loyalty program. */\n loyaltyProgram?: LoyaltyProgram;\n}\n\nexport interface BulkGetLoyaltyProgramRequest {}\n\nexport interface BulkGetLoyaltyProgramResponse {\n /** Retrieved loyalty programs. */\n programInSites?: ProgramInSite[];\n}\n\nexport interface ProgramInSite {\n /**\n * Metasite ID.\n * @format GUID\n */\n metaSiteId?: string;\n /** Loyalty program. */\n loyaltyProgram?: LoyaltyProgram;\n}\n\nexport interface UpdateLoyaltyProgramRequest {\n /** Loyalty program fields to update. */\n loyaltyProgram: LoyaltyProgram;\n}\n\nexport interface UpdateLoyaltyProgramResponse {\n /** Updated loyalty program. */\n loyaltyProgram?: LoyaltyProgram;\n}\n\nexport interface PointsExpirationConfigurationChanged {\n /** Loyalty program. */\n loyaltyProgram?: LoyaltyProgram;\n /** Points expiration configuration changes */\n pointsExpirationChanges?: PointsExpirationChanges;\n}\n\nexport interface PointsExpirationChanges {\n monthsOfInactivity?: number | null;\n expiringPointsPercentage?: number | null;\n}\n\nexport interface ActivateLoyaltyProgramRequest {}\n\nexport interface ActivateLoyaltyProgramResponse {\n /** Activated loyalty program. */\n loyaltyProgram?: LoyaltyProgram;\n}\n\nexport interface LoyaltyProgramActivated {\n /** Activated loyalty program. */\n loyaltyProgram?: LoyaltyProgram;\n}\n\nexport interface PauseLoyaltyProgramRequest {}\n\nexport interface PauseLoyaltyProgramResponse {\n /** Paused loyalty program. */\n loyaltyProgram?: LoyaltyProgram;\n}\n\nexport interface GetLoyaltyProgramDescriptionRequest {\n /**\n * List of description fields to retrieve. Supported values: `description`, `updatedDate`.\n * @maxSize 2\n */\n fields?: string[];\n}\n\nexport interface GetLoyaltyProgramDescriptionResponse {\n /** Retrieved loyalty program description. */\n description?: string | null;\n /** Date and time of the latest description update. */\n _updatedDate?: Date | null;\n}\n\nexport interface UpdateLoyaltyProgramDescriptionRequest {\n /**\n * Loyalty program description to update.\n * @minLength 1\n * @maxLength 1000000\n */\n description?: string;\n}\n\nexport interface UpdateLoyaltyProgramDescriptionResponse {}\n\nexport interface LoyaltyProgramDescriptionUpdated {}\n\nexport interface GetLoyaltyProgramPremiumFeaturesRequest {}\n\nexport interface GetLoyaltyProgramPremiumFeaturesResponse {\n /**\n * Whether there are any loyalty program premium features.\n * @readonly\n */\n loyaltyProgram?: boolean;\n /**\n * Whether this loyalty program includes tiers.\n * @readonly\n */\n tiers?: boolean;\n /**\n * Whether this loyalty program includes point expiration.\n * @readonly\n */\n pointsExpiration?: boolean;\n}\n\nexport interface EnablePointsExpirationRequest {}\n\nexport interface EnablePointsExpirationResponse {\n /** Loyalty program with enabled points expiration feature. */\n loyaltyProgram?: LoyaltyProgram;\n}\n\nexport interface PointsExpirationEnabled {\n /** Loyalty program. */\n loyaltyProgram?: LoyaltyProgram;\n}\n\nexport interface DisablePointsExpirationRequest {}\n\nexport interface DisablePointsExpirationResponse {\n /** Loyalty program with disabled points expiration feature. */\n loyaltyProgram?: LoyaltyProgram;\n}\n\nexport interface PointsExpirationDisabled {\n /** Loyalty program. */\n loyaltyProgram?: LoyaltyProgram;\n}\n\nexport interface FeatureEvent extends FeatureEventEventOneOf {\n /**\n * Information about an event that makes a feature eligible to the user.\n * Triggered for example, for new features or when a feature is reassigned\n * to an account or a site.\n */\n enabled?: FeatureEnabled;\n /**\n * Information about an event that disables a feature for the user.\n * Triggered for example, when a feature is unassigned from a site,\n * reassigned to a different site, or the user switched to a different contract.\n */\n disabled?: FeatureDisabled;\n /**\n * Information about an event that updates a feature. An `updated` event\n * is triggered for example by the\n * [Report Quota Usage](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/report-quota-usage)\n * and [Reset Usage Counter](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/reset-usage-counter)\n * endpoints.\n */\n updated?: FeatureUpdated;\n /**\n * Information about an event that cancels a feature for the user.\n * Triggered for example, when a feature is canceled, transferred to\n * another account, or the user switched to a different contract.\n */\n cancelled?: FeatureCancelled;\n /**\n * Timestamp of the event in\n * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).\n */\n timestamp?: Date | null;\n}\n\n/** @oneof */\nexport interface FeatureEventEventOneOf {\n /**\n * Information about an event that makes a feature eligible to the user.\n * Triggered for example, for new features or when a feature is reassigned\n * to an account or a site.\n */\n enabled?: FeatureEnabled;\n /**\n * Information about an event that disables a feature for the user.\n * Triggered for example, when a feature is unassigned from a site,\n * reassigned to a different site, or the user switched to a different contract.\n */\n disabled?: FeatureDisabled;\n /**\n * Information about an event that updates a feature. An `updated` event\n * is triggered for example by the\n * [Report Quota Usage](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/report-quota-usage)\n * and [Reset Usage Counter](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/reset-usage-counter)\n * endpoints.\n */\n updated?: FeatureUpdated;\n /**\n * Information about an event that cancels a feature for the user.\n * Triggered for example, when a feature is canceled, transferred to\n * another account, or the user switched to a different contract.\n */\n cancelled?: FeatureCancelled;\n}\n\n/** Feature created or enabled after disabled state */\nexport interface FeatureEnabled extends FeatureEnabledReasonOneOf {\n /** Information about a transfer from another account. */\n transferredFromAnotherAccount?: TransferredFromAnotherAccountReason;\n /** Information about a transfer from another site. */\n reassignedFromSite?: ReassignedFromSiteReason;\n /** Information about a feature that hadn't been assigned to site. */\n assignedFromFloating?: AssignedFromFloatingReason;\n /** Information about the new feature. */\n newFeature?: NewFeatureReason;\n /** Information about the contract switch. */\n contractSwitched?: ContractSwitchedReason;\n /** Information about the manually created features. */\n manualFeatureCreation?: ManualFeatureCreationReason;\n /** Information about a feature that was migrated from legacy. */\n migratedFromLegacy?: MigratedFromLegacyReason;\n /** Enabled feature. */\n feature?: Feature;\n /**\n * Information about a transfer from another account.\n * __Deprecated__. Use `reason.transferred_from_another_account` instead.\n * @format GUID\n */\n transferredFromAccount?: string | null;\n /**\n * Information about a transfer from another site.\n * __Deprecated__. Use `reason.reassigned_from_site` instead.\n * @format GUID\n */\n reassignedFromMetasite?: string | null;\n}\n\n/** @oneof */\nexport interface FeatureEnabledReasonOneOf {\n /** Information about a transfer from another account. */\n transferredFromAnotherAccount?: TransferredFromAnotherAccountReason;\n /** Information about a transfer from another site. */\n reassignedFromSite?: ReassignedFromSiteReason;\n /** Information about a feature that hadn't been assigned to site. */\n assignedFromFloating?: AssignedFromFloatingReason;\n /** Information about the new feature. */\n newFeature?: NewFeatureReason;\n /** Information about the contract switch. */\n contractSwitched?: ContractSwitchedReason;\n /** Information about the manually created features. */\n manualFeatureCreation?: ManualFeatureCreationReason;\n /** Information about a feature that was migrated from legacy. */\n migratedFromLegacy?: MigratedFromLegacyReason;\n}\n\nexport interface Feature extends FeatureQuantityInfoOneOf {\n /**\n * Deprecated. Use `enabled` instead.\n * @deprecated\n */\n booleanFeature?: BooleanFeature;\n /**\n * Deprecated. Use `quotaInfo` instead.\n * @deprecated\n */\n quotaFeature?: QuotaFeature;\n /**\n * ID of the feature. __Note:__ Isn't unique. For example, all features that\n * are available to free Wix accounts or site in some capacity have\n * `{\"id\": \"DEFAULT\"}`. Use `uniqueName` as unique identifier for a feature.\n * @readonly\n */\n _id?: string;\n /**\n * Unique name of the feature. Only lower case letters, numbers, and dashes\n * `-` are supported. Used in the endpoints of the\n * [Features Manager API](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/introduction)\n * to specify the feature. Not visible to customers. We recommend to start\n * the unique name with a prefix describing your organization or Wix company.\n * For example, `bookings` or `crm`.\n *\n * Min: 2 characters\n * Max: 50 characters\n * @minLength 2\n * @maxLength 50\n */\n uniqueName?: string;\n /**\n * Information about whether the feature belongs to a Wix account or site.\n * Account features have `context.userId`. Site features have `context.metaSiteId` in case\n * they're assigned to a specific site. Site features that aren't assigned to\n * a specific site have neither ID.\n */\n context?: FeatureContext;\n /**\n * Deprecated.\n * @readonly\n * @deprecated\n */\n createdAt?: Date | null;\n /**\n * Deprecated.\n * @readonly\n * @deprecated\n */\n updatedAt?: Date | null;\n /**\n * Aggregated information about how often customers can use the feature.\n * Available only for quota features.\n */\n quotaInfo?: QuotaInfo;\n /**\n * Whether the customer is currently allowed to use the feature.\n * `true` means that the customer can use the feature. This means a boolean\n * feature is active or a quota feature has remaining usage.\n * `false` means that the customer can't use the feature.\n * This means a boolean feature isn't active or a quota feature doesn't\n * have remaining usage.\n */\n enabled?: boolean;\n /**\n * ID of the [subscription](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/subscription-object)\n * to which the feature instance belongs.\n * @format GUID\n */\n subscriptionId?: string | null;\n /**\n * Metadata of the feature. Wix Premium uses the metadata object to indicate\n * that customers who purchase a product with the feature also get\n * access to an additional product. For these bundled products `metadata`\n * looks like this: `{\"tpa\": \"{\"appDefId\": \"sample-app-def-id-1234567890\", \"vendorProductId\": \"sample-productId\"}}\"`.\n * But you can use the `metadata` property for other purposes, too.\n */\n metadata?: Record<string, string>;\n}\n\n/** @oneof */\nexport interface FeatureQuantityInfoOneOf {\n /**\n * Deprecated. Use `enabled` instead.\n * @deprecated\n */\n booleanFeature?: BooleanFeature;\n /**\n * Deprecated. Use `quotaInfo` instead.\n * @deprecated\n */\n quotaFeature?: QuotaFeature;\n}\n\n/**\n * Context this feature is currently connected to.\n * Note: Do not confuse with feature scope which is configured in the product catalog\n * and defines in which context the product can be used\n */\nexport interface FeatureContext {\n /**\n * ID of the Wix account that the feature instance belongs to.\n * Available for both site and account level feature instances.\n * @format GUID\n */\n userId?: string;\n /**\n * ID of the meta site that the feature instance is assigned to.\n * Only available for site level feature instances that are assigned to a Wix\n * site. Not available for account level and unassigned site level feature\n * instances.\n * @format GUID\n */\n metaSiteId?: string | null;\n}\n\n/**\n * A feature that can be either \"enabled\" or \"disabled\". The default/freemium setting is always OFF, and the premium setting is always ON (meaning, unlimited usage without tracking).\n * A boolean feature is similar to a quantitive feature with a default limit of 0 and UNLIMITED premium limit (although a bit simplified).\n */\nexport interface BooleanFeature {}\n\n/** A feature with a periodic usage limitation. The default limit is defined in the Feature Spec, the Premium limits are defined in the respective ProductFeature. */\nexport interface QuotaFeature {\n /** Default (or Freemium) quota limitation. if left undefined the free feature has unlimited amount. */\n limit?: string | null;\n /** Periodic time-frame to reset the usage counter. You may use NO_PERIOD if counter shouldn't be reset. */\n period?: FeaturePeriodWithLiterals;\n /** Usage measurement units (seconds? MBs? unitless?). Usage reported will be counted in multiples of this basic unit. */\n units?: string | null;\n}\n\n/** Determines the reset cycle of the feature usage. */\nexport enum FeaturePeriod {\n NO_PERIOD = 'NO_PERIOD',\n MILLISECOND = 'MILLISECOND',\n SECOND = 'SECOND',\n MINUTE = 'MINUTE',\n HOUR = 'HOUR',\n DAY = 'DAY',\n WEEK = 'WEEK',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type FeaturePeriodWithLiterals =\n | FeaturePeriod\n | 'NO_PERIOD'\n | 'MILLISECOND'\n | 'SECOND'\n | 'MINUTE'\n | 'HOUR'\n | 'DAY'\n | 'WEEK'\n | 'MONTH'\n | 'YEAR';\n\nexport interface QuotaInfo {\n /**\n * Aggregation of how often the customer is allowed to use the feature at the time of the request.\n * `null` means that the customer has unlimited access to the feature.\n */\n limit?: string | null;\n /**\n * Deprecated because a feature can have multiple periods defined. Use `period` in `breakdown` entries instead.\n * Time frame for the usage limitation. `NO_PERIOD` means that `remainingUsage`\n * isn't automatically reset to the feature's `limit` after a specific period.\n * You may still manually call\n * [Reset Usage Counter](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/reset-usage-counter).\n * @deprecated\n * @replacedBy breakdown.period\n * @targetRemovalDate 2026-03-31\n */\n period?: FeaturePeriodWithLiterals;\n /**\n * Aggregation of how often the customer has used the feature.\n * This value is retrieved from the Quota Manager/Rate Limiter system. If the\n * `exclude_quota_usage` field in the `ListFeaturesRequest` was set to `true`,\n * this field will contain the value `-1`.\n */\n currentUsage?: string;\n /**\n * Aggregation of how often the customer can still use the feature.\n * `null` means that the customer has unlimited access to the feature.\n * This value is retrieved from the Quota Manager/Rate Limiter system. If the\n * `exclude_quota_usage` field in the `ListFeaturesRequest` was set to `true`,\n * this field will not be populated.\n */\n remainingUsage?: string | null;\n /**\n * Breakdown of quota information entries, entry per feature instance.\n * @maxSize 100\n */\n breakdown?: QuotaInfoEntry[];\n}\n\nexport interface QuotaInfoEntry {\n /**\n * If quota is of free feature, the id would be empty (None).\n * If quota is of premium feature, this is the ID of the feature instance.\n * @format GUID\n */\n featureInstanceId?: string | null;\n /**\n * How often the customer is allowed to use the feature during the specified\n * period. `null` means that the customer has unlimited access to the feature.\n */\n limit?: string | null;\n /**\n * Time frame for the usage limitation. `NO_PERIOD` means that `remainingUsage`\n * isn't automatically reset to the feature's `limit` after a specific period.\n * You may still manually call\n * [Reset Usage Counter](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/reset-usage-counter).\n */\n period?: FeaturePeriodWithLiterals;\n /**\n * How often the customer has used the feature during the current\n * period.\n * This value is retrieved from the Quota Manager/Rate Limiter system. If the\n * `exclude_quota_usage` field in the `ListFeaturesRequest` was set to `true`,\n * this field will contain the value `-1`.\n */\n currentUsage?: string;\n /**\n * How often the customer can still use the feature during the current\n * period. `null` means that the customer has unlimited access to the feature.\n * This value is retrieved from the Quota Manager/Rate Limiter system. If the\n * `exclude_quota_usage` field in the `ListFeaturesRequest` was set to `true`,\n * this field will not be populated.\n */\n remainingUsage?: string | null;\n}\n\n/** Subscription transferred from another account, features on the current account were enabled. */\nexport interface TransferredFromAnotherAccountReason {\n /**\n * Information about a transfer from another account.\n * @format GUID\n */\n transferredFromAccount?: string;\n}\n\n/** Subscription moved from one site to another in the same account, features enabled on the target site */\nexport interface ReassignedFromSiteReason {\n /**\n * Information about a transfer from another site.\n * @format GUID\n */\n reassignedFromMetasite?: string;\n}\n\n/** Subscription was floating and assigned to site, features enabled on the target site */\nexport interface AssignedFromFloatingReason {}\n\n/** New subscription created and features created as enabled */\nexport interface NewFeatureReason {}\n\n/** Subscription was upgraded or downgraded, as a result new features enabled, missing features disabled , quantities are updated */\nexport interface ContractSwitchedReason {}\n\n/** a call to CreateFeature in features-writer, creates feature that is not attached to subscription */\nexport interface ManualFeatureCreationReason {}\n\n/** Subscription created due to migration from old premium model */\nexport interface MigratedFromLegacyReason {}\n\n/** Feature disabled and can be enabled in the future */\nexport interface FeatureDisabled extends FeatureDisabledReasonOneOf {\n /** Information about a feature that's no longer assigned to a site. */\n unassingedToFloating?: UnAssingedToFloatingReason;\n /**\n * Information about a feature that's been replaced by a feature from a\n * different subscription.\n */\n replacedByAnotherSubscription?: ReplacedByAnotherSubscriptionReason;\n /**\n * Information about a feature that's been reassigned to a different\n * site.\n */\n reassignedToAnotherSite?: ReassignedToAnotherSiteReason;\n /**\n * Disabled feature. Includes information about the feature's new state,\n * possibly its new context.\n */\n feature?: Feature;\n /**\n * ID of the meta site for which the feature has been disabled.\n * @format GUID\n */\n metaSiteId?: string | null;\n}\n\n/** @oneof */\nexport interface FeatureDisabledReasonOneOf {\n /** Information about a feature that's no longer assigned to a site. */\n unassingedToFloating?: UnAssingedToFloatingReason;\n /**\n * Information about a feature that's been replaced by a feature from a\n * different subscription.\n */\n replacedByAnotherSubscription?: ReplacedByAnotherSubscriptionReason;\n /**\n * Information about a feature that's been reassigned to a different\n * site.\n */\n reassignedToAnotherSite?: ReassignedToAnotherSiteReason;\n}\n\n/** Subscription was unassigned from the site and moved into floating state */\nexport interface UnAssingedToFloatingReason {}\n\n/** Another subscription was assigned to the site, causing existing features on this site to be disabled */\nexport interface ReplacedByAnotherSubscriptionReason {}\n\n/** Subscription was assigned to another site, causing features on the origin site to be disabled. */\nexport interface ReassignedToAnotherSiteReason {\n /**\n * Information about a transfer to the site.\n * @format GUID\n */\n reassignedToMetasite?: string;\n}\n\n/** Feature updated, for example Quota was increased due to upgrade */\nexport interface FeatureUpdated\n extends FeatureUpdatedPreviousQuantityInfoOneOf,\n FeatureUpdatedReasonOneOf {\n /** Information about a feature that doesn't have a usage quota. */\n booleanFeature?: BooleanFeature;\n /** Information about a feature that has a usage quota. */\n quotaFeature?: QuotaFeature;\n /** Information about the contract switch. */\n contractSwitched?: ContractSwitchedReason;\n /**\n * Updated feature. Includes information about the feature's new state and\n * possibly its new context.\n */\n feature?: Feature;\n}\n\n/** @oneof */\nexport interface FeatureUpdatedPreviousQuantityInfoOneOf {\n /** Information about a feature that doesn't have a usage quota. */\n booleanFeature?: BooleanFeature;\n /** Information about a feature that has a usage quota. */\n quotaFeature?: QuotaFeature;\n}\n\n/** @oneof */\nexport interface FeatureUpdatedReasonOneOf {\n /** Information about the contract switch. */\n contractSwitched?: ContractSwitchedReason;\n}\n\n/** Feature was permanently cancelled */\nexport interface FeatureCancelled extends FeatureCancelledReasonOneOf {\n /** Information about a transfer to the account. */\n transferredToAnotherAccount?: TransferredToAnotherAccountReason;\n /** Information about the contract switch. */\n contractSwitched?: ContractSwitchedReason;\n /** Information about the feature cancellation. */\n cancelRequest?: CancelRequestedReason;\n /** Canceled feature. */\n feature?: Feature;\n /**\n * Information about a transfer to the account.\n * __Deprecated__. Use `reason.transferred_to_account` instead.\n * @format GUID\n */\n transferredToAccount?: string | null;\n}\n\n/** @oneof */\nexport interface FeatureCancelledReasonOneOf {\n /** Information about a transfer to the account. */\n transferredToAnotherAccount?: TransferredToAnotherAccountReason;\n /** Information about the contract switch. */\n contractSwitched?: ContractSwitchedReason;\n /** Information about the feature cancellation. */\n cancelRequest?: CancelRequestedReason;\n}\n\n/** Subscription was transferred to another account, features in the origin account were cancelled */\nexport interface TransferredToAnotherAccountReason {\n /**\n * Information about a transfer to the account.\n * @format GUID\n */\n transferredToAccount?: string;\n}\n\n/** Cancellation was requested from the subscription manager api, might be a result of billing event, or direct call */\nexport interface CancelRequestedReason {}\n\nexport interface Empty {}\n\nexport interface LoyaltyAppInstallation {\n type?: V1TypeWithLiterals;\n}\n\nexport enum V1Type {\n UNSPECIFIED = 'UNSPECIFIED',\n INSTALLED = 'INSTALLED',\n DELETED = 'DELETED',\n}\n\n/** @enumType */\nexport type V1TypeWithLiterals =\n | V1Type\n | 'UNSPECIFIED'\n | 'INSTALLED'\n | 'DELETED';\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 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: LoyaltyProgram;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a loyalty program is updated.\n * @permissionScope Read Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY\n * @permissionScope Manage Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId LOYALTY.READ_PROGRAM\n * @webhook\n * @eventType wix.loyalty.v1.program_updated\n * @serviceIdentifier com.wixpress.loyalty.program.LoyaltyPrograms\n * @slug updated\n */\nexport declare function onProgramUpdated(\n handler: (event: ProgramUpdatedEnvelope) => void | Promise<void>\n): void;\n\ntype ProgramNonNullablePaths =\n | `status`\n | `pointsExpiration.status`\n | `pointsExpiration.monthsOfInactivity`\n | `pointsExpiration.expiringPointsPercentage`\n | `premiumFeatures.loyaltyProgram`\n | `premiumFeatures.tiers`\n | `premiumFeatures.pointsExpiration`;\n\n/**\n * Retrieves the loyalty program.\n * @public\n * @permissionId LOYALTY.READ_PROGRAM\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wixpress.loyalty.program.LoyaltyPrograms.GetLoyaltyProgram\n */\nexport async function getLoyaltyProgram(): Promise<\n NonNullablePaths<\n GetLoyaltyProgramResponse,\n {\n [P in ProgramNonNullablePaths]: `loyaltyProgram.${P}`;\n }[ProgramNonNullablePaths]\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 = ambassadorWixLoyaltyV1Program.getLoyaltyProgram(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [{ path: 'loyaltyProgram.pointDefinition.icon' }],\n },\n ])\n )!;\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 loyalty programs for all metasites that the caller is a member of.\n *\n * Must be called with user identity.\n * @public\n * @permissionId LOYALTY.PROGRAM_BULK_READ\n * @fqn com.wixpress.loyalty.program.LoyaltyPrograms.BulkGetLoyaltyProgram\n */\nexport async function bulkGetLoyaltyProgram(): Promise<\n NonNullablePaths<\n BulkGetLoyaltyProgramResponse,\n | `programInSites`\n | `programInSites.${number}.metaSiteId`\n | {\n [P in ProgramNonNullablePaths]: `programInSites.${number}.loyaltyProgram.${P}`;\n }[ProgramNonNullablePaths]\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 = ambassadorWixLoyaltyV1Program.bulkGetLoyaltyProgram(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'programInSites.loyaltyProgram.pointDefinition.icon' },\n ],\n },\n ])\n )!;\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 site's loyalty program.\n *\n * This method updates the name of the loyalty program and the details of the collectible points unit.\n * To activate the loyalty program, call Activate Loyalty Program.\n * @param loyaltyProgram - Loyalty program fields to update.\n * @public\n * @requiredField loyaltyProgram\n * @permissionId LOYALTY.MANAGE_PROGRAM\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.program.LoyaltyPrograms.UpdateLoyaltyProgram\n */\nexport async function updateLoyaltyProgram(\n loyaltyProgram: LoyaltyProgram\n): Promise<\n NonNullablePaths<\n UpdateLoyaltyProgramResponse,\n {\n [P in ProgramNonNullablePaths]: `loyaltyProgram.${P}`;\n }[ProgramNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({ loyaltyProgram: loyaltyProgram }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [{ path: 'loyaltyProgram.pointDefinition.icon' }],\n },\n ]\n );\n\n const reqOpts = ambassadorWixLoyaltyV1Program.updateLoyaltyProgram(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [{ path: 'loyaltyProgram.pointDefinition.icon' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { loyaltyProgram: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['loyaltyProgram']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Activates a loyalty program.\n *\n * Initially, when a loyalty program is installed, the status is set to `\"DRAFT\"`.\n * You can change the program's status to `\"ACTIVE\"` with this method or through the [dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Floyalty-accounts/wizard/).\n * A site's customers can only earn or redeem points while the program is `\"ACTIVE\"`.\n *\n * This method only updates the status of a loyalty program. To make other updates to the program, call Update Loyalty Program.\n *\n * To temporarily pause your loyalty program, call Pause Loyalty Program and see [Pausing Your Loyalty Program](https://support.wix.com/en/article/wix-loyalty-program-pausing-your-loyalty-program) for more information.\n * @public\n * @permissionId LOYALTY.MANAGE_PROGRAM\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.program.LoyaltyPrograms.ActivateLoyaltyProgram\n */\nexport async function activateLoyaltyProgram(): Promise<\n NonNullablePaths<\n ActivateLoyaltyProgramResponse,\n {\n [P in ProgramNonNullablePaths]: `loyaltyProgram.${P}`;\n }[ProgramNonNullablePaths]\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 = ambassadorWixLoyaltyV1Program.activateLoyaltyProgram(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [{ path: 'loyaltyProgram.pointDefinition.icon' }],\n },\n ])\n )!;\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 * Changes the program status to `\"PAUSED\"`.\n *\n * See [Pausing Your Loyalty Program](https://support.wix.com/en/article/wix-loyalty-program-pausing-your-loyalty-program) for more information.\n * @public\n * @permissionId LOYALTY.MANAGE_PROGRAM\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.program.LoyaltyPrograms.PauseLoyaltyProgram\n */\nexport async function pauseLoyaltyProgram(): Promise<\n NonNullablePaths<\n PauseLoyaltyProgramResponse,\n {\n [P in ProgramNonNullablePaths]: `loyaltyProgram.${P}`;\n }[ProgramNonNullablePaths]\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 = ambassadorWixLoyaltyV1Program.pauseLoyaltyProgram(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [{ path: 'loyaltyProgram.pointDefinition.icon' }],\n },\n ])\n )!;\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 information about the available loyalty program premium features.\n * @public\n * @permissionId LOYALTY.READ_PROGRAM\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wixpress.loyalty.program.LoyaltyPrograms.GetLoyaltyProgramPremiumFeatures\n */\nexport async function getLoyaltyProgramPremiumFeatures(): Promise<\n NonNullablePaths<\n GetLoyaltyProgramPremiumFeaturesResponse,\n `loyaltyProgram` | `tiers` | `pointsExpiration`\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 ambassadorWixLoyaltyV1Program.getLoyaltyProgramPremiumFeatures(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 the `pointsExpiration` status to `\"ENABLED\"`.\n * @public\n * @permissionId LOYALTY.MANAGE_PROGRAM\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.program.LoyaltyPrograms.EnablePointsExpiration\n */\nexport async function enablePointsExpiration(): Promise<\n NonNullablePaths<\n EnablePointsExpirationResponse,\n {\n [P in ProgramNonNullablePaths]: `loyaltyProgram.${P}`;\n }[ProgramNonNullablePaths]\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 = ambassadorWixLoyaltyV1Program.enablePointsExpiration(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [{ path: 'loyaltyProgram.pointDefinition.icon' }],\n },\n ])\n )!;\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 the `pointsExpiration` status to `\"DISABLED\"`.\n * @public\n * @permissionId LOYALTY.MANAGE_PROGRAM\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.program.LoyaltyPrograms.DisablePointsExpiration\n */\nexport async function disablePointsExpiration(): Promise<\n NonNullablePaths<\n DisablePointsExpirationResponse,\n {\n [P in ProgramNonNullablePaths]: `loyaltyProgram.${P}`;\n }[ProgramNonNullablePaths]\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 ambassadorWixLoyaltyV1Program.disablePointsExpiration(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [{ path: 'loyaltyProgram.pointDefinition.icon' }],\n },\n ])\n )!;\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 { 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 resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/loyalty-programs',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/loyalty-programs',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/loyalty-programs',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/loyalty-programs',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/loyalty-programs',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/loyalty-programs',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/loyalty-programs',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/loyalty-programs',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/loyalty-programs',\n destPath: '',\n },\n ],\n '*.pub.wix-code.com': [\n {\n srcPath: '/_api/loyalty-programs',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/loyalty-programs',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_loyalty_programs';\n\n/** Retrieves the loyalty program. */\nexport function getLoyaltyProgram(payload: object): RequestOptionsFactory<any> {\n function __getLoyaltyProgram({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.program',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.loyalty.program.LoyaltyPrograms.GetLoyaltyProgram',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl({\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: 'loyaltyProgram.createdDate' },\n { path: 'loyaltyProgram.updatedDate' },\n { path: 'loyaltyProgram.pointDefinition.icon.urlExpirationDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.x' },\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.y' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getLoyaltyProgram;\n}\n\n/**\n * Retrieves loyalty programs for all metasites that the caller is a member of.\n *\n * Must be called with user identity.\n */\nexport function bulkGetLoyaltyProgram(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkGetLoyaltyProgram({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.program',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.loyalty.program.LoyaltyPrograms.BulkGetLoyaltyProgram',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl({\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.loyaltyProgram.createdDate' },\n { path: 'programInSites.loyaltyProgram.updatedDate' },\n {\n path: 'programInSites.loyaltyProgram.pointDefinition.icon.urlExpirationDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'programInSites.loyaltyProgram.pointDefinition.icon.focalPoint.x',\n },\n {\n path: 'programInSites.loyaltyProgram.pointDefinition.icon.focalPoint.y',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkGetLoyaltyProgram;\n}\n\n/**\n * Updates a site's loyalty program.\n *\n * This method updates the name of the loyalty program and the details of the collectible points unit.\n * To activate the loyalty program, call Activate Loyalty Program.\n */\nexport function updateLoyaltyProgram(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateLoyaltyProgram({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'loyaltyProgram.createdDate' },\n { path: 'loyaltyProgram.updatedDate' },\n { path: 'loyaltyProgram.pointDefinition.icon.urlExpirationDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.x' },\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.y' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.program',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wixpress.loyalty.program.LoyaltyPrograms.UpdateLoyaltyProgram',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl({\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: 'loyaltyProgram.createdDate' },\n { path: 'loyaltyProgram.updatedDate' },\n { path: 'loyaltyProgram.pointDefinition.icon.urlExpirationDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.x' },\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.y' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateLoyaltyProgram;\n}\n\n/**\n * Activates a loyalty program.\n *\n * Initially, when a loyalty program is installed, the status is set to `\"DRAFT\"`.\n * You can change the program's status to `\"ACTIVE\"` with this method or through the [dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Floyalty-accounts/wizard/).\n * A site's customers can only earn or redeem points while the program is `\"ACTIVE\"`.\n *\n * This method only updates the status of a loyalty program. To make other updates to the program, call Update Loyalty Program.\n *\n * To temporarily pause your loyalty program, call Pause Loyalty Program and see [Pausing Your Loyalty Program](https://support.wix.com/en/article/wix-loyalty-program-pausing-your-loyalty-program) for more information.\n */\nexport function activateLoyaltyProgram(\n payload: object\n): RequestOptionsFactory<any> {\n function __activateLoyaltyProgram({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.program',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.program.LoyaltyPrograms.ActivateLoyaltyProgram',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl({\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: 'loyaltyProgram.createdDate' },\n { path: 'loyaltyProgram.updatedDate' },\n { path: 'loyaltyProgram.pointDefinition.icon.urlExpirationDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.x' },\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.y' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __activateLoyaltyProgram;\n}\n\n/**\n * Changes the program status to `\"PAUSED\"`.\n *\n * See [Pausing Your Loyalty Program](https://support.wix.com/en/article/wix-loyalty-program-pausing-your-loyalty-program) for more information.\n */\nexport function pauseLoyaltyProgram(\n payload: object\n): RequestOptionsFactory<any> {\n function __pauseLoyaltyProgram({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.program',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.program.LoyaltyPrograms.PauseLoyaltyProgram',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl({\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: 'loyaltyProgram.createdDate' },\n { path: 'loyaltyProgram.updatedDate' },\n { path: 'loyaltyProgram.pointDefinition.icon.urlExpirationDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.x' },\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.y' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __pauseLoyaltyProgram;\n}\n\n/** Retrieves information about the available loyalty program premium features. */\nexport function getLoyaltyProgramPremiumFeatures(\n payload: object\n): RequestOptionsFactory<any> {\n function __getLoyaltyProgramPremiumFeatures({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.program',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.loyalty.program.LoyaltyPrograms.GetLoyaltyProgramPremiumFeatures',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl({\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 __getLoyaltyProgramPremiumFeatures;\n}\n\n/** Updates the `pointsExpiration` status to `\"ENABLED\"`. */\nexport function enablePointsExpiration(\n payload: object\n): RequestOptionsFactory<any> {\n function __enablePointsExpiration({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.program',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.program.LoyaltyPrograms.EnablePointsExpiration',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl({\n protoPath: '/v1/program/points-expiration/enable',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'loyaltyProgram.createdDate' },\n { path: 'loyaltyProgram.updatedDate' },\n { path: 'loyaltyProgram.pointDefinition.icon.urlExpirationDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.x' },\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.y' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __enablePointsExpiration;\n}\n\n/** Updates the `pointsExpiration` status to `\"DISABLED\"`. */\nexport function disablePointsExpiration(\n payload: object\n): RequestOptionsFactory<any> {\n function __disablePointsExpiration({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.program',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.program.LoyaltyPrograms.DisablePointsExpiration',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl({\n protoPath: '/v1/program/points-expiration/disable',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'loyaltyProgram.createdDate' },\n { path: 'loyaltyProgram.updatedDate' },\n { path: 'loyaltyProgram.pointDefinition.icon.urlExpirationDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.x' },\n { path: 'loyaltyProgram.pointDefinition.icon.focalPoint.y' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __disablePointsExpiration;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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E,aAAa;AAAA,UACb,OAAO,CAAC,EAAE,MAAM,sCAAsC,CAAC;AAAA,QACzD;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAN;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,CAAC;AAAA,QAC3B,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC;AAAA,IACH;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AASA,eAAsBO,2BAOpB;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC,CAAC,CAAC;AAExD,QAAM,UAC0B,wBAAwB,OAAO;AAE/D,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO;AAAA,UACL,wCAAe,OAAO,MAAM;AAAA,QAC1B;AAAA,UACE,aAAa;AAAA,UACb,OAAO,CAAC,EAAE,MAAM,sCAAsC,CAAC;AAAA,QACzD;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAP;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,CAAC;AAAA,QAC3B,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC;AAAA,IACH;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["activateLoyaltyProgram","bulkGetLoyaltyProgram","disablePointsExpiration","enablePointsExpiration","getLoyaltyProgram","getLoyaltyProgramPremiumFeatures","pauseLoyaltyProgram","updateLoyaltyProgram","import_float","import_timestamp","import_rest_modules","payload","import_image","import_transform_paths","ProgramStatus","Status","Type","FeaturePeriod","V1Type","WebhookIdentityType","getLoyaltyProgram","sdkTransformError","bulkGetLoyaltyProgram","updateLoyaltyProgram","activateLoyaltyProgram","pauseLoyaltyProgram","getLoyaltyProgramPremiumFeatures","enablePointsExpiration","disablePointsExpiration"]}
|
package/build/es/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
2
|
import { GetLoyaltyProgramResponse, BulkGetLoyaltyProgramResponse, LoyaltyProgram, UpdateLoyaltyProgramResponse, ActivateLoyaltyProgramResponse, PauseLoyaltyProgramResponse, GetLoyaltyProgramPremiumFeaturesResponse, EnablePointsExpirationResponse, DisablePointsExpirationResponse, ProgramUpdatedEnvelope } from './index.typings.mjs';
|
|
3
|
-
export { ActionEvent, ActivateLoyaltyProgramRequest,
|
|
3
|
+
export { ActionEvent, ActivateLoyaltyProgramRequest, AssignedFromFloatingReason, BaseEventMetadata, BooleanFeature, BulkGetLoyaltyProgramRequest, CancelRequestedReason, ContractSwitchedReason, DisablePointsExpirationRequest, DomainEvent, DomainEventBodyOneOf, Empty, EnablePointsExpirationRequest, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, Feature, FeatureCancelled, FeatureCancelledReasonOneOf, FeatureContext, FeatureDisabled, FeatureDisabledReasonOneOf, FeatureEnabled, FeatureEnabledReasonOneOf, FeatureEvent, FeatureEventEventOneOf, FeaturePeriod, FeatureQuantityInfoOneOf, FeatureUpdated, FeatureUpdatedPreviousQuantityInfoOneOf, FeatureUpdatedReasonOneOf, FocalPoint, GetLoyaltyProgramDescriptionRequest, GetLoyaltyProgramDescriptionResponse, GetLoyaltyProgramPremiumFeaturesRequest, GetLoyaltyProgramRequest, IdentificationData, IdentificationDataIdOneOf, LoyaltyAppInstallation, LoyaltyProgramActivated, LoyaltyProgramDescriptionUpdated, ManualFeatureCreationReason, MessageEnvelope, MigratedFromLegacyReason, NewFeatureReason, PauseLoyaltyProgramRequest, PointDefinition, PointsExpiration, PointsExpirationChanges, PointsExpirationConfigurationChanged, PointsExpirationDisabled, PointsExpirationEnabled, PremiumFeatures, ProgramInSite, ProgramStatus, QuotaFeature, QuotaInfo, QuotaInfoEntry, ReassignedFromSiteReason, ReassignedToAnotherSiteReason, ReplacedByAnotherSubscriptionReason, RestoreInfo, SocialMediaChannel, SocialMediaSettings, Status, TransferredFromAnotherAccountReason, TransferredToAnotherAccountReason, Type, UnAssingedToFloatingReason, UpdateLoyaltyProgramDescriptionRequest, UpdateLoyaltyProgramDescriptionResponse, UpdateLoyaltyProgramRequest, V1Type, WebhookIdentityType } from './index.typings.mjs';
|
|
4
4
|
|
|
5
5
|
type ProgramNonNullablePaths = `status` | `pointsExpiration.status` | `pointsExpiration.monthsOfInactivity` | `pointsExpiration.expiringPointsPercentage` | `premiumFeatures.loyaltyProgram` | `premiumFeatures.tiers` | `premiumFeatures.pointsExpiration`;
|
|
6
6
|
declare function getLoyaltyProgram$1(httpClient: HttpClient): GetLoyaltyProgramSignature;
|
package/build/es/index.mjs
CHANGED
|
@@ -405,64 +405,6 @@ var Type = /* @__PURE__ */ ((Type2) => {
|
|
|
405
405
|
Type2["TIKTOK"] = "TIKTOK";
|
|
406
406
|
return Type2;
|
|
407
407
|
})(Type || {});
|
|
408
|
-
var State = /* @__PURE__ */ ((State2) => {
|
|
409
|
-
State2["UNKNOWN"] = "UNKNOWN";
|
|
410
|
-
State2["ENABLED"] = "ENABLED";
|
|
411
|
-
State2["DISABLED"] = "DISABLED";
|
|
412
|
-
State2["PENDING"] = "PENDING";
|
|
413
|
-
State2["DEMO"] = "DEMO";
|
|
414
|
-
return State2;
|
|
415
|
-
})(State || {});
|
|
416
|
-
var SiteCreatedContext = /* @__PURE__ */ ((SiteCreatedContext2) => {
|
|
417
|
-
SiteCreatedContext2["OTHER"] = "OTHER";
|
|
418
|
-
SiteCreatedContext2["FROM_TEMPLATE"] = "FROM_TEMPLATE";
|
|
419
|
-
SiteCreatedContext2["DUPLICATE_BY_SITE_TRANSFER"] = "DUPLICATE_BY_SITE_TRANSFER";
|
|
420
|
-
SiteCreatedContext2["DUPLICATE"] = "DUPLICATE";
|
|
421
|
-
SiteCreatedContext2["OLD_SITE_TRANSFER"] = "OLD_SITE_TRANSFER";
|
|
422
|
-
SiteCreatedContext2["FLASH"] = "FLASH";
|
|
423
|
-
return SiteCreatedContext2;
|
|
424
|
-
})(SiteCreatedContext || {});
|
|
425
|
-
var Namespace = /* @__PURE__ */ ((Namespace2) => {
|
|
426
|
-
Namespace2["UNKNOWN_NAMESPACE"] = "UNKNOWN_NAMESPACE";
|
|
427
|
-
Namespace2["WIX"] = "WIX";
|
|
428
|
-
Namespace2["SHOUT_OUT"] = "SHOUT_OUT";
|
|
429
|
-
Namespace2["ALBUMS"] = "ALBUMS";
|
|
430
|
-
Namespace2["WIX_STORES_TEST_DRIVE"] = "WIX_STORES_TEST_DRIVE";
|
|
431
|
-
Namespace2["HOTELS"] = "HOTELS";
|
|
432
|
-
Namespace2["CLUBS"] = "CLUBS";
|
|
433
|
-
Namespace2["ONBOARDING_DRAFT"] = "ONBOARDING_DRAFT";
|
|
434
|
-
Namespace2["DEV_SITE"] = "DEV_SITE";
|
|
435
|
-
Namespace2["LOGOS"] = "LOGOS";
|
|
436
|
-
Namespace2["VIDEO_MAKER"] = "VIDEO_MAKER";
|
|
437
|
-
Namespace2["PARTNER_DASHBOARD"] = "PARTNER_DASHBOARD";
|
|
438
|
-
Namespace2["DEV_CENTER_COMPANY"] = "DEV_CENTER_COMPANY";
|
|
439
|
-
Namespace2["HTML_DRAFT"] = "HTML_DRAFT";
|
|
440
|
-
Namespace2["SITELESS_BUSINESS"] = "SITELESS_BUSINESS";
|
|
441
|
-
Namespace2["CREATOR_ECONOMY"] = "CREATOR_ECONOMY";
|
|
442
|
-
Namespace2["DASHBOARD_FIRST"] = "DASHBOARD_FIRST";
|
|
443
|
-
Namespace2["ANYWHERE"] = "ANYWHERE";
|
|
444
|
-
Namespace2["HEADLESS"] = "HEADLESS";
|
|
445
|
-
Namespace2["ACCOUNT_MASTER_CMS"] = "ACCOUNT_MASTER_CMS";
|
|
446
|
-
Namespace2["RISE"] = "RISE";
|
|
447
|
-
Namespace2["BRANDED_FIRST"] = "BRANDED_FIRST";
|
|
448
|
-
Namespace2["NOWNIA"] = "NOWNIA";
|
|
449
|
-
Namespace2["UGC_TEMPLATE"] = "UGC_TEMPLATE";
|
|
450
|
-
Namespace2["CODUX"] = "CODUX";
|
|
451
|
-
Namespace2["MEDIA_DESIGN_CREATOR"] = "MEDIA_DESIGN_CREATOR";
|
|
452
|
-
Namespace2["SHARED_BLOG_ENTERPRISE"] = "SHARED_BLOG_ENTERPRISE";
|
|
453
|
-
Namespace2["STANDALONE_FORMS"] = "STANDALONE_FORMS";
|
|
454
|
-
Namespace2["STANDALONE_EVENTS"] = "STANDALONE_EVENTS";
|
|
455
|
-
Namespace2["MIMIR"] = "MIMIR";
|
|
456
|
-
return Namespace2;
|
|
457
|
-
})(Namespace || {});
|
|
458
|
-
var DeleteStatus = /* @__PURE__ */ ((DeleteStatus2) => {
|
|
459
|
-
DeleteStatus2["UNKNOWN"] = "UNKNOWN";
|
|
460
|
-
DeleteStatus2["TRASH"] = "TRASH";
|
|
461
|
-
DeleteStatus2["DELETED"] = "DELETED";
|
|
462
|
-
DeleteStatus2["PENDING_PURGE"] = "PENDING_PURGE";
|
|
463
|
-
DeleteStatus2["PURGED_EXTERNALLY"] = "PURGED_EXTERNALLY";
|
|
464
|
-
return DeleteStatus2;
|
|
465
|
-
})(DeleteStatus || {});
|
|
466
408
|
var FeaturePeriod = /* @__PURE__ */ ((FeaturePeriod2) => {
|
|
467
409
|
FeaturePeriod2["NO_PERIOD"] = "NO_PERIOD";
|
|
468
410
|
FeaturePeriod2["MILLISECOND"] = "MILLISECOND";
|
|
@@ -475,6 +417,12 @@ var FeaturePeriod = /* @__PURE__ */ ((FeaturePeriod2) => {
|
|
|
475
417
|
FeaturePeriod2["YEAR"] = "YEAR";
|
|
476
418
|
return FeaturePeriod2;
|
|
477
419
|
})(FeaturePeriod || {});
|
|
420
|
+
var V1Type = /* @__PURE__ */ ((V1Type2) => {
|
|
421
|
+
V1Type2["UNSPECIFIED"] = "UNSPECIFIED";
|
|
422
|
+
V1Type2["INSTALLED"] = "INSTALLED";
|
|
423
|
+
V1Type2["DELETED"] = "DELETED";
|
|
424
|
+
return V1Type2;
|
|
425
|
+
})(V1Type || {});
|
|
478
426
|
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
479
427
|
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
480
428
|
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
@@ -811,14 +759,11 @@ var enablePointsExpiration4 = /* @__PURE__ */ createRESTModule(enablePointsExpir
|
|
|
811
759
|
var disablePointsExpiration4 = /* @__PURE__ */ createRESTModule(disablePointsExpiration3);
|
|
812
760
|
var onProgramUpdated2 = createEventModule(onProgramUpdated);
|
|
813
761
|
export {
|
|
814
|
-
DeleteStatus,
|
|
815
762
|
FeaturePeriod,
|
|
816
|
-
Namespace,
|
|
817
763
|
ProgramStatus,
|
|
818
|
-
SiteCreatedContext,
|
|
819
|
-
State,
|
|
820
764
|
Status,
|
|
821
765
|
Type,
|
|
766
|
+
V1Type,
|
|
822
767
|
WebhookIdentityType,
|
|
823
768
|
activateLoyaltyProgram4 as activateLoyaltyProgram,
|
|
824
769
|
bulkGetLoyaltyProgram4 as bulkGetLoyaltyProgram,
|