@wix/auto_sdk_loyalty_programs 1.0.25 → 1.0.26
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 +4 -22
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +5 -23
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +4 -22
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +5 -23
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +4 -22
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +5 -23
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +4 -22
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +5 -23
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/meta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../meta.ts","../../src/loyalty-v1-program-programs.http.ts","../../src/loyalty-v1-program-programs.meta.ts"],"sourcesContent":["export * from './src/loyalty-v1-program-programs.meta.js';\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/**\n * Retrieves the site's loyalty program.\n *\n * The `getLoyaltyProgram()` function returns a Promise that resolves to the site's loyalty program.\n */\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 the site's loyalty program.\n *\n * The `updateLoyaltyProgram()` function returns a Promise that resolves when the loyalty program is updated.\n *\n * With the `updateLoyaltyProgram()` function you can update the name of the loyalty program and the details of the collectible points unit. To activate the loyalty program use the [`activateLoyaltyProgram()`](https://dev.wix.com/docs/sdk/backend-modules/loyalty/programs/activate-loyalty-program) function.\n *\n * >**Note:** Only visitors with **Manage Loyalty** [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can update a loyalty program. You can override the permissions with the `wix-auth` [`elevate()`](wix-auth/elevate) function.\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 * The `activateLoyaltyProgram()` function returns a Promise that resolves when the status of the loyalty program is successfully changed to `\"ACTIVE\"`.\n *\n * Before you begin, a Wix Loyalty Program must first be installed through your [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/) or through the [Wix App Market](https://www.wix.com/app-market/loyalty). Initially when a loyalty program is installed, the status is set to `\"DRAFT\"`. You can change the program's status to `\"ACTIVE\"` with this function or through your [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/). A site's customers can only earn or redeem points while the program status is `\"ACTIVE\"`.\n *\n * This function updates only the status of a loyalty program, to make other updates to the program, use the [`updateLoyaltyProgram()`](https://dev.wix.com/docs/sdk/backend-modules/loyalty/programs/update-loyalty-program) function.\n *\n * To temporarily pause your loyalty program you must follow three steps:\n * 1. Remove all [`earnPoints()`](https://dev.wix.com/docs/sdk/backend-modules/loyalty/accounts/earn-points) functions and switch off all the \"Earn Points\" and \"Rewards\" toggles in the [Loyalty Program dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Open%20Loyalty%20Program&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https://www.wix.com/dashboard/{{metaSiteId}}/loyalty-accounts/).\n * 1. Hide the loyalty page from your site.\n * 1. Delete the My Rewards page from the Member pages.\n * See [Pausing Your Loyalty Program](https://support.wix.com/en/article/wix-loyalty-program-pausing-your-loyalty-program) for more information.\n *\n * >**Note:** Only visitors with **Manage Loyalty** [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can activate a loyalty program. You can override the permissions with the `wix-auth` [`elevate()`](wix-auth/elevate) function.\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/** Changes the program status to `PAUSED`. */\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","import * as ambassadorWixLoyaltyV1Program from './loyalty-v1-program-programs.http.js';\nimport * as ambassadorWixLoyaltyV1ProgramTypes from './loyalty-v1-program-programs.types.js';\nimport * as ambassadorWixLoyaltyV1ProgramUniversalTypes from './loyalty-v1-program-programs.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function getLoyaltyProgram(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixLoyaltyV1ProgramUniversalTypes.GetLoyaltyProgramRequest,\n ambassadorWixLoyaltyV1ProgramTypes.GetLoyaltyProgramRequest,\n ambassadorWixLoyaltyV1ProgramUniversalTypes.GetLoyaltyProgramResponse,\n ambassadorWixLoyaltyV1ProgramTypes.GetLoyaltyProgramResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Program.getLoyaltyProgram(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/program',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function bulkGetLoyaltyProgram(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixLoyaltyV1ProgramUniversalTypes.BulkGetLoyaltyProgramRequest,\n ambassadorWixLoyaltyV1ProgramTypes.BulkGetLoyaltyProgramRequest,\n ambassadorWixLoyaltyV1ProgramUniversalTypes.BulkGetLoyaltyProgramResponse,\n ambassadorWixLoyaltyV1ProgramTypes.BulkGetLoyaltyProgramResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Program.bulkGetLoyaltyProgram(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/bulk/programs',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateLoyaltyProgram(): __PublicMethodMetaInfo<\n 'PATCH',\n {},\n ambassadorWixLoyaltyV1ProgramUniversalTypes.UpdateLoyaltyProgramRequest,\n ambassadorWixLoyaltyV1ProgramTypes.UpdateLoyaltyProgramRequest,\n ambassadorWixLoyaltyV1ProgramUniversalTypes.UpdateLoyaltyProgramResponse,\n ambassadorWixLoyaltyV1ProgramTypes.UpdateLoyaltyProgramResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Program.updateLoyaltyProgram(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PATCH',\n path: '/v1/program',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function activateLoyaltyProgram(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1ProgramUniversalTypes.ActivateLoyaltyProgramRequest,\n ambassadorWixLoyaltyV1ProgramTypes.ActivateLoyaltyProgramRequest,\n ambassadorWixLoyaltyV1ProgramUniversalTypes.ActivateLoyaltyProgramResponse,\n ambassadorWixLoyaltyV1ProgramTypes.ActivateLoyaltyProgramResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Program.activateLoyaltyProgram(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/program/activate',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function pauseLoyaltyProgram(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1ProgramUniversalTypes.PauseLoyaltyProgramRequest,\n ambassadorWixLoyaltyV1ProgramTypes.PauseLoyaltyProgramRequest,\n ambassadorWixLoyaltyV1ProgramUniversalTypes.PauseLoyaltyProgramResponse,\n ambassadorWixLoyaltyV1ProgramTypes.PauseLoyaltyProgramResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Program.pauseLoyaltyProgram(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/program/pause',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getLoyaltyProgramPremiumFeatures(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixLoyaltyV1ProgramUniversalTypes.GetLoyaltyProgramPremiumFeaturesRequest,\n ambassadorWixLoyaltyV1ProgramTypes.GetLoyaltyProgramPremiumFeaturesRequest,\n ambassadorWixLoyaltyV1ProgramUniversalTypes.GetLoyaltyProgramPremiumFeaturesResponse,\n ambassadorWixLoyaltyV1ProgramTypes.GetLoyaltyProgramPremiumFeaturesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Program.getLoyaltyProgramPremiumFeatures(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/program/premium-features',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function enablePointsExpiration(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1ProgramUniversalTypes.EnablePointsExpirationRequest,\n ambassadorWixLoyaltyV1ProgramTypes.EnablePointsExpirationRequest,\n ambassadorWixLoyaltyV1ProgramUniversalTypes.EnablePointsExpirationResponse,\n ambassadorWixLoyaltyV1ProgramTypes.EnablePointsExpirationResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Program.enablePointsExpiration(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/program/points-expiration/enable',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function disablePointsExpiration(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1ProgramUniversalTypes.DisablePointsExpirationRequest,\n ambassadorWixLoyaltyV1ProgramTypes.DisablePointsExpirationRequest,\n ambassadorWixLoyaltyV1ProgramUniversalTypes.DisablePointsExpirationResponse,\n ambassadorWixLoyaltyV1ProgramTypes.DisablePointsExpirationResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Program.disablePointsExpiration(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/program/points-expiration/disable',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;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,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;A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C,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["activateLoyaltyProgram","bulkGetLoyaltyProgram","disablePointsExpiration","enablePointsExpiration","getLoyaltyProgram","getLoyaltyProgramPremiumFeatures","pauseLoyaltyProgram","updateLoyaltyProgram","import_float","import_timestamp","import_rest_modules","payload","getLoyaltyProgram","bulkGetLoyaltyProgram","updateLoyaltyProgram","activateLoyaltyProgram","pauseLoyaltyProgram","getLoyaltyProgramPremiumFeatures","enablePointsExpiration","disablePointsExpiration"]}
|
|
1
|
+
{"version":3,"sources":["../../meta.ts","../../src/loyalty-v1-program-programs.http.ts","../../src/loyalty-v1-program-programs.meta.ts"],"sourcesContent":["export * from './src/loyalty-v1-program-programs.meta.js';\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 the loyalty program.\n *\n * You cannot activate the loyalty program using this endpoint. To do so, use the [Activate Loyalty Program endpoint](https://dev.wix.com/api/rest/wix-loyalty-program/program/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 * When a loyalty program is installed it starts in `DRAFT` status. Customers cannot earn or redeem points while the program is not `ACTIVE`.\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/** Changes the program status to `PAUSED`. */\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","import * as ambassadorWixLoyaltyV1Program from './loyalty-v1-program-programs.http.js';\nimport * as ambassadorWixLoyaltyV1ProgramTypes from './loyalty-v1-program-programs.types.js';\nimport * as ambassadorWixLoyaltyV1ProgramUniversalTypes from './loyalty-v1-program-programs.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function getLoyaltyProgram(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixLoyaltyV1ProgramUniversalTypes.GetLoyaltyProgramRequest,\n ambassadorWixLoyaltyV1ProgramTypes.GetLoyaltyProgramRequest,\n ambassadorWixLoyaltyV1ProgramUniversalTypes.GetLoyaltyProgramResponse,\n ambassadorWixLoyaltyV1ProgramTypes.GetLoyaltyProgramResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Program.getLoyaltyProgram(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/program',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function bulkGetLoyaltyProgram(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixLoyaltyV1ProgramUniversalTypes.BulkGetLoyaltyProgramRequest,\n ambassadorWixLoyaltyV1ProgramTypes.BulkGetLoyaltyProgramRequest,\n ambassadorWixLoyaltyV1ProgramUniversalTypes.BulkGetLoyaltyProgramResponse,\n ambassadorWixLoyaltyV1ProgramTypes.BulkGetLoyaltyProgramResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Program.bulkGetLoyaltyProgram(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/bulk/programs',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateLoyaltyProgram(): __PublicMethodMetaInfo<\n 'PATCH',\n {},\n ambassadorWixLoyaltyV1ProgramUniversalTypes.UpdateLoyaltyProgramRequest,\n ambassadorWixLoyaltyV1ProgramTypes.UpdateLoyaltyProgramRequest,\n ambassadorWixLoyaltyV1ProgramUniversalTypes.UpdateLoyaltyProgramResponse,\n ambassadorWixLoyaltyV1ProgramTypes.UpdateLoyaltyProgramResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Program.updateLoyaltyProgram(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PATCH',\n path: '/v1/program',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function activateLoyaltyProgram(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1ProgramUniversalTypes.ActivateLoyaltyProgramRequest,\n ambassadorWixLoyaltyV1ProgramTypes.ActivateLoyaltyProgramRequest,\n ambassadorWixLoyaltyV1ProgramUniversalTypes.ActivateLoyaltyProgramResponse,\n ambassadorWixLoyaltyV1ProgramTypes.ActivateLoyaltyProgramResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Program.activateLoyaltyProgram(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/program/activate',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function pauseLoyaltyProgram(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1ProgramUniversalTypes.PauseLoyaltyProgramRequest,\n ambassadorWixLoyaltyV1ProgramTypes.PauseLoyaltyProgramRequest,\n ambassadorWixLoyaltyV1ProgramUniversalTypes.PauseLoyaltyProgramResponse,\n ambassadorWixLoyaltyV1ProgramTypes.PauseLoyaltyProgramResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Program.pauseLoyaltyProgram(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/program/pause',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getLoyaltyProgramPremiumFeatures(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixLoyaltyV1ProgramUniversalTypes.GetLoyaltyProgramPremiumFeaturesRequest,\n ambassadorWixLoyaltyV1ProgramTypes.GetLoyaltyProgramPremiumFeaturesRequest,\n ambassadorWixLoyaltyV1ProgramUniversalTypes.GetLoyaltyProgramPremiumFeaturesResponse,\n ambassadorWixLoyaltyV1ProgramTypes.GetLoyaltyProgramPremiumFeaturesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Program.getLoyaltyProgramPremiumFeatures(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/program/premium-features',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function enablePointsExpiration(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1ProgramUniversalTypes.EnablePointsExpirationRequest,\n ambassadorWixLoyaltyV1ProgramTypes.EnablePointsExpirationRequest,\n ambassadorWixLoyaltyV1ProgramUniversalTypes.EnablePointsExpirationResponse,\n ambassadorWixLoyaltyV1ProgramTypes.EnablePointsExpirationResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Program.enablePointsExpiration(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/program/points-expiration/enable',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function disablePointsExpiration(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1ProgramUniversalTypes.DisablePointsExpirationRequest,\n ambassadorWixLoyaltyV1ProgramTypes.DisablePointsExpirationRequest,\n ambassadorWixLoyaltyV1ProgramUniversalTypes.DisablePointsExpirationResponse,\n ambassadorWixLoyaltyV1ProgramTypes.DisablePointsExpirationResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Program.disablePointsExpiration(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/program/points-expiration/disable',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":";;;;;;;;;;;;;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EO,SAASC,oCAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC0B,iCAAiC,OAAO;AAExE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,0BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC0B,uBAAuB,OAAO;AAE9D,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,2BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC0B,wBAAwB,OAAO;AAE/D,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["activateLoyaltyProgram","bulkGetLoyaltyProgram","disablePointsExpiration","enablePointsExpiration","getLoyaltyProgram","getLoyaltyProgramPremiumFeatures","pauseLoyaltyProgram","updateLoyaltyProgram","import_float","import_timestamp","import_rest_modules","payload","getLoyaltyProgram","bulkGetLoyaltyProgram","updateLoyaltyProgram","activateLoyaltyProgram","pauseLoyaltyProgram","getLoyaltyProgramPremiumFeatures","enablePointsExpiration","disablePointsExpiration"]}
|
package/build/es/index.d.mts
CHANGED
|
@@ -6,9 +6,7 @@ type ProgramNonNullablePaths = `status` | `pointsExpiration.status` | `pointsExp
|
|
|
6
6
|
declare function getLoyaltyProgram$1(httpClient: HttpClient): GetLoyaltyProgramSignature;
|
|
7
7
|
interface GetLoyaltyProgramSignature {
|
|
8
8
|
/**
|
|
9
|
-
* Retrieves the
|
|
10
|
-
*
|
|
11
|
-
* The `getLoyaltyProgram()` function returns a Promise that resolves to the site's loyalty program.
|
|
9
|
+
* Retrieves the loyalty program.
|
|
12
10
|
*/
|
|
13
11
|
(): Promise<NonNullablePaths<GetLoyaltyProgramResponse, {
|
|
14
12
|
[P in ProgramNonNullablePaths]: `loyaltyProgram.${P}`;
|
|
@@ -28,13 +26,9 @@ interface BulkGetLoyaltyProgramSignature {
|
|
|
28
26
|
declare function updateLoyaltyProgram$1(httpClient: HttpClient): UpdateLoyaltyProgramSignature;
|
|
29
27
|
interface UpdateLoyaltyProgramSignature {
|
|
30
28
|
/**
|
|
31
|
-
* Updates the
|
|
32
|
-
*
|
|
33
|
-
* The `updateLoyaltyProgram()` function returns a Promise that resolves when the loyalty program is updated.
|
|
29
|
+
* Updates the loyalty program.
|
|
34
30
|
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* >**Note:** Only visitors with **Manage Loyalty** [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can update a loyalty program. You can override the permissions with the `wix-auth` [`elevate()`](wix-auth/elevate) function.
|
|
31
|
+
* You cannot activate the loyalty program using this endpoint. To do so, use the [Activate Loyalty Program endpoint](https://dev.wix.com/api/rest/wix-loyalty-program/program/activate-loyalty-program).
|
|
38
32
|
* @param - Loyalty program fields to update.
|
|
39
33
|
*/
|
|
40
34
|
(loyaltyProgram: LoyaltyProgram): Promise<NonNullablePaths<UpdateLoyaltyProgramResponse, {
|
|
@@ -46,19 +40,7 @@ interface ActivateLoyaltyProgramSignature {
|
|
|
46
40
|
/**
|
|
47
41
|
* Activates a loyalty program.
|
|
48
42
|
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* Before you begin, a Wix Loyalty Program must first be installed through your [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/) or through the [Wix App Market](https://www.wix.com/app-market/loyalty). Initially when a loyalty program is installed, the status is set to `"DRAFT"`. You can change the program's status to `"ACTIVE"` with this function or through your [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/). A site's customers can only earn or redeem points while the program status is `"ACTIVE"`.
|
|
52
|
-
*
|
|
53
|
-
* This function updates only the status of a loyalty program, to make other updates to the program, use the [`updateLoyaltyProgram()`](https://dev.wix.com/docs/sdk/backend-modules/loyalty/programs/update-loyalty-program) function.
|
|
54
|
-
*
|
|
55
|
-
* To temporarily pause your loyalty program you must follow three steps:
|
|
56
|
-
* 1. Remove all [`earnPoints()`](https://dev.wix.com/docs/sdk/backend-modules/loyalty/accounts/earn-points) functions and switch off all the "Earn Points" and "Rewards" toggles in the [Loyalty Program dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Open%20Loyalty%20Program&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https://www.wix.com/dashboard/{{metaSiteId}}/loyalty-accounts/).
|
|
57
|
-
* 1. Hide the loyalty page from your site.
|
|
58
|
-
* 1. Delete the My Rewards page from the Member pages.
|
|
59
|
-
* See [Pausing Your Loyalty Program](https://support.wix.com/en/article/wix-loyalty-program-pausing-your-loyalty-program) for more information.
|
|
60
|
-
*
|
|
61
|
-
* >**Note:** Only visitors with **Manage Loyalty** [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can activate a loyalty program. You can override the permissions with the `wix-auth` [`elevate()`](wix-auth/elevate) function.
|
|
43
|
+
* When a loyalty program is installed it starts in `DRAFT` status. Customers cannot earn or redeem points while the program is not `ACTIVE`.
|
|
62
44
|
*/
|
|
63
45
|
(): Promise<NonNullablePaths<ActivateLoyaltyProgramResponse, {
|
|
64
46
|
[P in ProgramNonNullablePaths]: `loyaltyProgram.${P}`;
|