@wix/auto_sdk_loyalty_coupons 1.0.19 → 1.0.21
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 +10 -10
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +27 -27
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +13 -13
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +10 -10
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +27 -27
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +13 -13
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +10 -10
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +27 -27
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +13 -13
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +10 -10
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +27 -27
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +13 -13
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -2
|
@@ -3,7 +3,7 @@ import '@wix/sdk-types';
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* A loyalty coupon is created when a customer redeems their loyalty points for a reward. Creating a loyalty coupon
|
|
6
|
-
* also creates a corresponding "reference" coupon with the
|
|
6
|
+
* also creates a corresponding "reference" coupon with the Coupons API.
|
|
7
7
|
*/
|
|
8
8
|
interface LoyaltyCoupon {
|
|
9
9
|
/**
|
|
@@ -13,34 +13,34 @@ interface LoyaltyCoupon {
|
|
|
13
13
|
*/
|
|
14
14
|
id?: string;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Loyalty account ID ([SDK](https://dev.wix.com/docs/sdk/backend-modules/loyalty/accounts/introduction) | [REST](https://dev.wix.com/docs/rest/crm/loyalty-program/accounts/account-object)) of the customer that redeemed points for a coupon.
|
|
17
17
|
* @format GUID
|
|
18
18
|
* @readonly
|
|
19
19
|
*/
|
|
20
20
|
accountId?: string;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Member ID of the customer that redeemed points for a coupon. See the Members API for more information.
|
|
23
23
|
* @format GUID
|
|
24
24
|
* @readonly
|
|
25
|
-
* @deprecated
|
|
25
|
+
* @deprecated Member ID of the customer that redeemed points for a coupon. See the Members API for more information.
|
|
26
26
|
* @replacedBy member_id
|
|
27
27
|
* @targetRemovalDate 2024-06-01
|
|
28
28
|
*/
|
|
29
29
|
memberIdDeprecated?: string;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* Member ID of the customer that redeemed points for a coupon. See the Members API for more information.
|
|
32
32
|
* @format GUID
|
|
33
33
|
* @readonly
|
|
34
34
|
*/
|
|
35
35
|
memberId?: string | null;
|
|
36
36
|
/**
|
|
37
|
-
* Transaction ID for the transaction that created a coupon.
|
|
37
|
+
* Transaction ID ([SDK](https://dev.wix.com/docs/sdk/backend-modules/loyalty/transactions/introduction) | [REST](https://dev.wix.com/docs/rest/crm/loyalty-program/transactions/loyalty-transaction-object)) for the transaction that created a coupon.
|
|
38
38
|
* @format GUID
|
|
39
39
|
* @readonly
|
|
40
40
|
*/
|
|
41
41
|
transactionId?: string | null;
|
|
42
42
|
/**
|
|
43
|
-
* Reference coupon information for the corresponding [
|
|
43
|
+
* Reference coupon information for the corresponding coupon ([SDK](https://dev.wix.com/docs/sdk/backend-modules/marketing/coupons/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/marketing/coupons/coupons/coupon-object))
|
|
44
44
|
* that is created along with the loyalty coupon.
|
|
45
45
|
* @readonly
|
|
46
46
|
*/
|
|
@@ -115,7 +115,7 @@ interface Specification extends SpecificationTypeDetailsOneOf, SpecificationScop
|
|
|
115
115
|
moneyOffAmount?: number;
|
|
116
116
|
/** Discount as a percentage. */
|
|
117
117
|
percentOffRate?: number;
|
|
118
|
-
/** Free shipping. If true, the coupon applies to all items in all `namespaces`
|
|
118
|
+
/** Free shipping. If true, the coupon applies to all items in all `namespaces` on a site. */
|
|
119
119
|
freeShipping?: boolean;
|
|
120
120
|
/** Specific sale price. Currently only supported for coupons with a `stores` `namespace`. */
|
|
121
121
|
fixedPriceAmount?: number;
|
|
@@ -161,7 +161,7 @@ interface SpecificationTypeDetailsOneOf {
|
|
|
161
161
|
moneyOffAmount?: number;
|
|
162
162
|
/** Discount as a percentage. */
|
|
163
163
|
percentOffRate?: number;
|
|
164
|
-
/** Free shipping. If true, the coupon applies to all items in all `namespaces`
|
|
164
|
+
/** Free shipping. If true, the coupon applies to all items in all `namespaces` on a site. */
|
|
165
165
|
freeShipping?: boolean;
|
|
166
166
|
/** Specific sale price. Currently only supported for coupons with a `stores` `namespace`. */
|
|
167
167
|
fixedPriceAmount?: number;
|
|
@@ -244,12 +244,12 @@ declare enum Status {
|
|
|
244
244
|
type StatusWithLiterals = Status | 'UNKNOWN' | 'PENDING' | 'ACTIVE' | 'APPLIED' | 'FAILED' | 'ARCHIVED';
|
|
245
245
|
interface RedeemPointsForCouponRequest {
|
|
246
246
|
/**
|
|
247
|
-
* ID of the
|
|
247
|
+
* ID of the loyalty reward to redeem. See the Loyalty Rewards API for more information.
|
|
248
248
|
* @format GUID
|
|
249
249
|
*/
|
|
250
250
|
rewardId: string;
|
|
251
251
|
/**
|
|
252
|
-
* ID of the
|
|
252
|
+
* ID of the loyalty account of the customer redeeming points. See the Loyalty Accounts API for more information.
|
|
253
253
|
* @format GUID
|
|
254
254
|
*/
|
|
255
255
|
loyaltyAccountId: string;
|
|
@@ -260,7 +260,7 @@ interface RedeemPointsForCouponResponse {
|
|
|
260
260
|
}
|
|
261
261
|
interface RedeemCurrentMemberPointsForCouponRequest {
|
|
262
262
|
/**
|
|
263
|
-
* ID of the
|
|
263
|
+
* ID of the loyalty reward to redeem. See the Loyalty Rewards API for more information.
|
|
264
264
|
* @format GUID
|
|
265
265
|
*/
|
|
266
266
|
rewardId: string;
|
|
@@ -353,7 +353,7 @@ interface BulkGetLoyaltyCouponResponse {
|
|
|
353
353
|
}
|
|
354
354
|
interface CouponsInSite {
|
|
355
355
|
/**
|
|
356
|
-
* Metasite
|
|
356
|
+
* Metasite ID.
|
|
357
357
|
* @format GUID
|
|
358
358
|
*/
|
|
359
359
|
metaSiteId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../meta.ts","../../../src/loyalty-v1-coupon-coupons.http.ts","../../../src/loyalty-v1-coupon-coupons.meta.ts"],"sourcesContent":["export * from './src/loyalty-v1-coupon-coupons.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n '*.pub.wix-code.com': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/loyalty-coupons',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/loyalty-coupons',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_loyalty_coupons';\n\n/**\n * Redeems a customer's loyalty points for a loyalty reward and creates a loyalty coupon.\n *\n * Creating a loyalty coupon also creates a corresponding \"reference\" coupon with the [Coupons API](https://dev.wix.com/api/rest/coupons/about-wix-coupons).\n * The customer receives the reference coupon, which they can apply to their order. The loyalty coupon and its corresponding reference coupon\n * are linked and the loyalty coupon's `status` reflects the current state of the reference coupon.\n *\n * Check which loyalty rewards a site has available with [List Rewards](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/list-rewards).\n */\nexport function redeemPointsForCoupon(\n payload: object\n): RequestOptionsFactory<any> {\n function __redeemPointsForCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.coupon.LoyaltyCoupons.RedeemPointsForCoupon',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/coupons',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'coupon.createdDate' },\n { path: 'coupon.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'coupon.couponReference.specification.moneyOffAmount' },\n { path: 'coupon.couponReference.specification.percentOffRate' },\n { path: 'coupon.couponReference.specification.fixedPriceAmount' },\n { path: 'coupon.couponReference.specification.minimumSubtotal' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __redeemPointsForCoupon;\n}\n\n/**\n * Redeems a current customer's loyalty points for a loyalty reward and creates a loyalty coupon.\n *\n * Creating a loyalty coupon also creates a corresponding \"reference\" coupon with the [Coupons API](https://dev.wix.com/api/rest/coupons/about-wix-coupons).\n * The customer receives the reference coupon, which they can apply to their order. The loyalty coupon and its corresponding reference coupon\n * are linked and the loyalty coupon's `status` reflects the current state of the reference coupon.\n *\n * Check which loyalty rewards a site has available with [List Rewards](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/list-rewards).\n *\n * >**Note:**\n * >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).\n */\nexport function redeemCurrentMemberPointsForCoupon(\n payload: object\n): RequestOptionsFactory<any> {\n function __redeemCurrentMemberPointsForCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.coupon.LoyaltyCoupons.RedeemCurrentMemberPointsForCoupon',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/coupons/redeem-my-coupon',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'coupon.createdDate' },\n { path: 'coupon.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'coupon.couponReference.specification.moneyOffAmount' },\n { path: 'coupon.couponReference.specification.percentOffRate' },\n { path: 'coupon.couponReference.specification.fixedPriceAmount' },\n { path: 'coupon.couponReference.specification.minimumSubtotal' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __redeemCurrentMemberPointsForCoupon;\n}\n\n/** Retrieves a loyalty coupon. */\nexport function getLoyaltyCoupon(payload: object): RequestOptionsFactory<any> {\n function __getLoyaltyCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.loyalty.coupon.LoyaltyCoupons.GetLoyaltyCoupon',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/coupons/{loyaltyCouponId}',\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: 'loyaltyCoupon.createdDate' },\n { path: 'loyaltyCoupon.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'loyaltyCoupon.couponReference.specification.moneyOffAmount',\n },\n {\n path: 'loyaltyCoupon.couponReference.specification.percentOffRate',\n },\n {\n path: 'loyaltyCoupon.couponReference.specification.fixedPriceAmount',\n },\n {\n path: 'loyaltyCoupon.couponReference.specification.minimumSubtotal',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getLoyaltyCoupon;\n}\n\n/** Retrieves a sequence of loyalty coupons */\nexport function bulkGetLoyaltyCoupon(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkGetLoyaltyCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.loyalty.coupon.LoyaltyCoupons.BulkGetLoyaltyCoupon',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/bulk/coupons',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'couponsInSite.loyaltyCoupons.createdDate' },\n { path: 'couponsInSite.loyaltyCoupons.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'couponsInSite.loyaltyCoupons.couponReference.specification.moneyOffAmount',\n },\n {\n path: 'couponsInSite.loyaltyCoupons.couponReference.specification.percentOffRate',\n },\n {\n path: 'couponsInSite.loyaltyCoupons.couponReference.specification.fixedPriceAmount',\n },\n {\n path: 'couponsInSite.loyaltyCoupons.couponReference.specification.minimumSubtotal',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkGetLoyaltyCoupon;\n}\n\n/**\n * Retrieves the loyalty coupons for the currently logged-in member.\n *\n * >**Note:**\n * >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).\n */\nexport function getCurrentMemberCoupons(\n payload: object\n): RequestOptionsFactory<any> {\n function __getCurrentMemberCoupons({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.loyalty.coupon.LoyaltyCoupons.GetCurrentMemberCoupons',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/coupons/my-coupons',\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: 'loyaltyCoupons.createdDate' },\n { path: 'loyaltyCoupons.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'loyaltyCoupons.couponReference.specification.moneyOffAmount',\n },\n {\n path: 'loyaltyCoupons.couponReference.specification.percentOffRate',\n },\n {\n path: 'loyaltyCoupons.couponReference.specification.fixedPriceAmount',\n },\n {\n path: 'loyaltyCoupons.couponReference.specification.minimumSubtotal',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getCurrentMemberCoupons;\n}\n\n/** Retrieves a list of loyalty coupons, given the provided paging, filtering, and sorting. */\nexport function queryLoyaltyCoupon(\n payload: object\n): RequestOptionsFactory<any> {\n function __queryLoyaltyCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.coupon.LoyaltyCoupons.QueryLoyaltyCoupon',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/coupons/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'loyaltyCoupons.createdDate' },\n { path: 'loyaltyCoupons.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'loyaltyCoupons.couponReference.specification.moneyOffAmount',\n },\n {\n path: 'loyaltyCoupons.couponReference.specification.percentOffRate',\n },\n {\n path: 'loyaltyCoupons.couponReference.specification.fixedPriceAmount',\n },\n {\n path: 'loyaltyCoupons.couponReference.specification.minimumSubtotal',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryLoyaltyCoupon;\n}\n\n/**\n * Deletes a loyalty coupon.\n *\n * The deletion of a loyalty coupon does not impact the functionality of the corresponding coupon itself.\n */\nexport function deleteLoyaltyCoupon(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteLoyaltyCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.loyalty.coupon.LoyaltyCoupons.DeleteLoyaltyCoupon',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/coupons/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteLoyaltyCoupon;\n}\n","import * as ambassadorWixLoyaltyV1Coupon from './loyalty-v1-coupon-coupons.http.js';\nimport * as ambassadorWixLoyaltyV1CouponTypes from './loyalty-v1-coupon-coupons.types.js';\nimport * as ambassadorWixLoyaltyV1CouponUniversalTypes from './loyalty-v1-coupon-coupons.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 redeemPointsForCoupon(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1CouponUniversalTypes.RedeemPointsForCouponRequest,\n ambassadorWixLoyaltyV1CouponTypes.RedeemPointsForCouponRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.RedeemPointsForCouponResponse,\n ambassadorWixLoyaltyV1CouponTypes.RedeemPointsForCouponResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.redeemPointsForCoupon(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/coupons',\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 redeemCurrentMemberPointsForCoupon(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1CouponUniversalTypes.RedeemCurrentMemberPointsForCouponRequest,\n ambassadorWixLoyaltyV1CouponTypes.RedeemCurrentMemberPointsForCouponRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.RedeemCurrentMemberPointsForCouponResponse,\n ambassadorWixLoyaltyV1CouponTypes.RedeemCurrentMemberPointsForCouponResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.redeemCurrentMemberPointsForCoupon(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/coupons/redeem-my-coupon',\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 getLoyaltyCoupon(): __PublicMethodMetaInfo<\n 'GET',\n { loyaltyCouponId: string },\n ambassadorWixLoyaltyV1CouponUniversalTypes.GetLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponTypes.GetLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.GetLoyaltyCouponResponse,\n ambassadorWixLoyaltyV1CouponTypes.GetLoyaltyCouponResponse\n> {\n const payload = { loyaltyCouponId: ':loyaltyCouponId' } as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.getLoyaltyCoupon(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/coupons/{loyaltyCouponId}',\n pathParams: { loyaltyCouponId: 'loyaltyCouponId' },\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 bulkGetLoyaltyCoupon(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixLoyaltyV1CouponUniversalTypes.BulkGetLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponTypes.BulkGetLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.BulkGetLoyaltyCouponResponse,\n ambassadorWixLoyaltyV1CouponTypes.BulkGetLoyaltyCouponResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.bulkGetLoyaltyCoupon(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/coupons',\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 getCurrentMemberCoupons(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixLoyaltyV1CouponUniversalTypes.GetCurrentMemberCouponsRequest,\n ambassadorWixLoyaltyV1CouponTypes.GetCurrentMemberCouponsRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.GetCurrentMemberCouponsResponse,\n ambassadorWixLoyaltyV1CouponTypes.GetCurrentMemberCouponsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.getCurrentMemberCoupons(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/coupons/my-coupons',\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 queryLoyaltyCoupons(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1CouponUniversalTypes.QueryLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponTypes.QueryLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.QueryLoyaltyCouponResponse,\n ambassadorWixLoyaltyV1CouponTypes.QueryLoyaltyCouponResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.queryLoyaltyCoupon(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/coupons/query',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deleteLoyaltyCoupon(): __PublicMethodMetaInfo<\n 'DELETE',\n { id: string },\n ambassadorWixLoyaltyV1CouponUniversalTypes.DeleteLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponTypes.DeleteLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.DeleteLoyaltyCouponResponse,\n ambassadorWixLoyaltyV1CouponTypes.DeleteLoyaltyCouponResponse\n> {\n const payload = { id: ':id' } as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.deleteLoyaltyCoupon(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v1/coupons/{id}',\n pathParams: { id: 'id' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,8BAAAA;AAAA,EAAA,2BAAAC;AAAA,EAAA,+BAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA;AAAA,4CAAAC;AAAA,EAAA,6BAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,mBAA6C;AAC7C,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,iDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,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,I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,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,uBAOd;AACA,QAAM,UAAU,EAAE,IAAI,MAAM;AAE5B,QAAM,oBACyB,oBAAoB,OAAO;AAE1D,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,IAAI,KAAK;AAAA,IACvB,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["bulkGetLoyaltyCoupon","deleteLoyaltyCoupon","getCurrentMemberCoupons","getLoyaltyCoupon","redeemCurrentMemberPointsForCoupon","redeemPointsForCoupon","import_rest_modules","payload","redeemPointsForCoupon","redeemCurrentMemberPointsForCoupon","getLoyaltyCoupon","bulkGetLoyaltyCoupon","getCurrentMemberCoupons","deleteLoyaltyCoupon"]}
|
|
1
|
+
{"version":3,"sources":["../../../meta.ts","../../../src/loyalty-v1-coupon-coupons.http.ts","../../../src/loyalty-v1-coupon-coupons.meta.ts"],"sourcesContent":["export * from './src/loyalty-v1-coupon-coupons.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n '*.pub.wix-code.com': [\n {\n srcPath: '/_api/loyalty-coupons',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/loyalty-coupons',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/loyalty-coupons',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_loyalty_coupons';\n\n/**\n * Redeems a customer's loyalty points for a loyalty reward and creates a loyalty coupon.\n *\n * Creating a loyalty coupon also creates a corresponding \"reference\" coupon with the Coupons API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/marketing/coupons/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/marketing/coupons/coupons/coupon-object)).\n * The customer receives the reference coupon, which they can apply to their order. The loyalty coupon and its corresponding reference coupon\n * are linked and the loyalty coupon's `status` reflects the current state of the reference coupon.\n *\n * Check which loyalty rewards a site has available with List Rewards in the Loyalty Rewards API.\n */\nexport function redeemPointsForCoupon(\n payload: object\n): RequestOptionsFactory<any> {\n function __redeemPointsForCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.coupon.LoyaltyCoupons.RedeemPointsForCoupon',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/coupons',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'coupon.createdDate' },\n { path: 'coupon.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'coupon.couponReference.specification.moneyOffAmount' },\n { path: 'coupon.couponReference.specification.percentOffRate' },\n { path: 'coupon.couponReference.specification.fixedPriceAmount' },\n { path: 'coupon.couponReference.specification.minimumSubtotal' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __redeemPointsForCoupon;\n}\n\n/**\n * Redeems a current customer's loyalty points for a loyalty reward and creates a loyalty coupon.\n *\n * Creating a loyalty coupon also creates a corresponding \"reference\" coupon with the Coupons API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/marketing/coupons/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/marketing/coupons/coupons/coupon-object)).\n * The customer receives the reference coupon, which they can apply to their order. The loyalty coupon and its corresponding reference coupon\n * are linked and the loyalty coupon's `status` reflects the current state of the reference coupon.\n *\n * Check which loyalty rewards a site has available with List Rewards in the Loyalty Rewards API.\n *\n * >**Note:**\n * >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities).\n */\nexport function redeemCurrentMemberPointsForCoupon(\n payload: object\n): RequestOptionsFactory<any> {\n function __redeemCurrentMemberPointsForCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.coupon.LoyaltyCoupons.RedeemCurrentMemberPointsForCoupon',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/coupons/redeem-my-coupon',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'coupon.createdDate' },\n { path: 'coupon.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'coupon.couponReference.specification.moneyOffAmount' },\n { path: 'coupon.couponReference.specification.percentOffRate' },\n { path: 'coupon.couponReference.specification.fixedPriceAmount' },\n { path: 'coupon.couponReference.specification.minimumSubtotal' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __redeemCurrentMemberPointsForCoupon;\n}\n\n/** Retrieves a loyalty coupon. */\nexport function getLoyaltyCoupon(payload: object): RequestOptionsFactory<any> {\n function __getLoyaltyCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.loyalty.coupon.LoyaltyCoupons.GetLoyaltyCoupon',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/coupons/{loyaltyCouponId}',\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: 'loyaltyCoupon.createdDate' },\n { path: 'loyaltyCoupon.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'loyaltyCoupon.couponReference.specification.moneyOffAmount',\n },\n {\n path: 'loyaltyCoupon.couponReference.specification.percentOffRate',\n },\n {\n path: 'loyaltyCoupon.couponReference.specification.fixedPriceAmount',\n },\n {\n path: 'loyaltyCoupon.couponReference.specification.minimumSubtotal',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getLoyaltyCoupon;\n}\n\n/** Retrieves a sequence of loyalty coupons. */\nexport function bulkGetLoyaltyCoupon(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkGetLoyaltyCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.loyalty.coupon.LoyaltyCoupons.BulkGetLoyaltyCoupon',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/bulk/coupons',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'couponsInSite.loyaltyCoupons.createdDate' },\n { path: 'couponsInSite.loyaltyCoupons.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'couponsInSite.loyaltyCoupons.couponReference.specification.moneyOffAmount',\n },\n {\n path: 'couponsInSite.loyaltyCoupons.couponReference.specification.percentOffRate',\n },\n {\n path: 'couponsInSite.loyaltyCoupons.couponReference.specification.fixedPriceAmount',\n },\n {\n path: 'couponsInSite.loyaltyCoupons.couponReference.specification.minimumSubtotal',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkGetLoyaltyCoupon;\n}\n\n/**\n * Retrieves the loyalty coupons for the currently logged-in member.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities).\n */\nexport function getCurrentMemberCoupons(\n payload: object\n): RequestOptionsFactory<any> {\n function __getCurrentMemberCoupons({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.loyalty.coupon.LoyaltyCoupons.GetCurrentMemberCoupons',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/coupons/my-coupons',\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: 'loyaltyCoupons.createdDate' },\n { path: 'loyaltyCoupons.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'loyaltyCoupons.couponReference.specification.moneyOffAmount',\n },\n {\n path: 'loyaltyCoupons.couponReference.specification.percentOffRate',\n },\n {\n path: 'loyaltyCoupons.couponReference.specification.fixedPriceAmount',\n },\n {\n path: 'loyaltyCoupons.couponReference.specification.minimumSubtotal',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getCurrentMemberCoupons;\n}\n\n/** Retrieves a list of loyalty coupons, with the specified paging, filtering, and sorting. */\nexport function queryLoyaltyCoupon(\n payload: object\n): RequestOptionsFactory<any> {\n function __queryLoyaltyCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.coupon.LoyaltyCoupons.QueryLoyaltyCoupon',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/coupons/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'loyaltyCoupons.createdDate' },\n { path: 'loyaltyCoupons.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'loyaltyCoupons.couponReference.specification.moneyOffAmount',\n },\n {\n path: 'loyaltyCoupons.couponReference.specification.percentOffRate',\n },\n {\n path: 'loyaltyCoupons.couponReference.specification.fixedPriceAmount',\n },\n {\n path: 'loyaltyCoupons.couponReference.specification.minimumSubtotal',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryLoyaltyCoupon;\n}\n\n/**\n * Deletes a loyalty coupon.\n *\n * The deletion of a loyalty coupon does not impact the functionality of the corresponding coupon itself.\n */\nexport function deleteLoyaltyCoupon(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteLoyaltyCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.coupon',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.loyalty.coupon.LoyaltyCoupons.DeleteLoyaltyCoupon',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyCouponLoyaltyCouponsUrl({\n protoPath: '/v1/coupons/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteLoyaltyCoupon;\n}\n","import * as ambassadorWixLoyaltyV1Coupon from './loyalty-v1-coupon-coupons.http.js';\nimport * as ambassadorWixLoyaltyV1CouponTypes from './loyalty-v1-coupon-coupons.types.js';\nimport * as ambassadorWixLoyaltyV1CouponUniversalTypes from './loyalty-v1-coupon-coupons.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 redeemPointsForCoupon(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1CouponUniversalTypes.RedeemPointsForCouponRequest,\n ambassadorWixLoyaltyV1CouponTypes.RedeemPointsForCouponRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.RedeemPointsForCouponResponse,\n ambassadorWixLoyaltyV1CouponTypes.RedeemPointsForCouponResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.redeemPointsForCoupon(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/coupons',\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 redeemCurrentMemberPointsForCoupon(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1CouponUniversalTypes.RedeemCurrentMemberPointsForCouponRequest,\n ambassadorWixLoyaltyV1CouponTypes.RedeemCurrentMemberPointsForCouponRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.RedeemCurrentMemberPointsForCouponResponse,\n ambassadorWixLoyaltyV1CouponTypes.RedeemCurrentMemberPointsForCouponResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.redeemCurrentMemberPointsForCoupon(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/coupons/redeem-my-coupon',\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 getLoyaltyCoupon(): __PublicMethodMetaInfo<\n 'GET',\n { loyaltyCouponId: string },\n ambassadorWixLoyaltyV1CouponUniversalTypes.GetLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponTypes.GetLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.GetLoyaltyCouponResponse,\n ambassadorWixLoyaltyV1CouponTypes.GetLoyaltyCouponResponse\n> {\n const payload = { loyaltyCouponId: ':loyaltyCouponId' } as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.getLoyaltyCoupon(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/coupons/{loyaltyCouponId}',\n pathParams: { loyaltyCouponId: 'loyaltyCouponId' },\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 bulkGetLoyaltyCoupon(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixLoyaltyV1CouponUniversalTypes.BulkGetLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponTypes.BulkGetLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.BulkGetLoyaltyCouponResponse,\n ambassadorWixLoyaltyV1CouponTypes.BulkGetLoyaltyCouponResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.bulkGetLoyaltyCoupon(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/coupons',\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 getCurrentMemberCoupons(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixLoyaltyV1CouponUniversalTypes.GetCurrentMemberCouponsRequest,\n ambassadorWixLoyaltyV1CouponTypes.GetCurrentMemberCouponsRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.GetCurrentMemberCouponsResponse,\n ambassadorWixLoyaltyV1CouponTypes.GetCurrentMemberCouponsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.getCurrentMemberCoupons(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/coupons/my-coupons',\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 queryLoyaltyCoupons(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1CouponUniversalTypes.QueryLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponTypes.QueryLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.QueryLoyaltyCouponResponse,\n ambassadorWixLoyaltyV1CouponTypes.QueryLoyaltyCouponResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.queryLoyaltyCoupon(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/coupons/query',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deleteLoyaltyCoupon(): __PublicMethodMetaInfo<\n 'DELETE',\n { id: string },\n ambassadorWixLoyaltyV1CouponUniversalTypes.DeleteLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponTypes.DeleteLoyaltyCouponRequest,\n ambassadorWixLoyaltyV1CouponUniversalTypes.DeleteLoyaltyCouponResponse,\n ambassadorWixLoyaltyV1CouponTypes.DeleteLoyaltyCouponResponse\n> {\n const payload = { id: ':id' } as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1Coupon.deleteLoyaltyCoupon(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v1/coupons/{id}',\n pathParams: { id: 'id' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,8BAAAA;AAAA,EAAA,2BAAAC;AAAA,EAAA,+BAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA;AAAA,4CAAAC;AAAA,EAAA,6BAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,mBAA6C;AAC7C,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,iDACP,MACA;AACA,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AAA,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,SAAS,sBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACyB,mBAAmB,OAAO;AAEzD,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,uBAOd;AACA,QAAM,UAAU,EAAE,IAAI,MAAM;AAE5B,QAAM,oBACyB,oBAAoB,OAAO;AAE1D,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,IAAI,KAAK;AAAA,IACvB,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["bulkGetLoyaltyCoupon","deleteLoyaltyCoupon","getCurrentMemberCoupons","getLoyaltyCoupon","redeemCurrentMemberPointsForCoupon","redeemPointsForCoupon","import_rest_modules","payload","redeemPointsForCoupon","redeemCurrentMemberPointsForCoupon","getLoyaltyCoupon","bulkGetLoyaltyCoupon","getCurrentMemberCoupons","deleteLoyaltyCoupon"]}
|
|
@@ -8,12 +8,12 @@ interface RedeemPointsForCouponSignature {
|
|
|
8
8
|
/**
|
|
9
9
|
* Redeems a customer's loyalty points for a loyalty reward and creates a loyalty coupon.
|
|
10
10
|
*
|
|
11
|
-
* Creating a loyalty coupon also creates a corresponding "reference" coupon with the
|
|
11
|
+
* Creating a loyalty coupon also creates a corresponding "reference" coupon with the Coupons API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/marketing/coupons/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/marketing/coupons/coupons/coupon-object)).
|
|
12
12
|
* The customer receives the reference coupon, which they can apply to their order. The loyalty coupon and its corresponding reference coupon
|
|
13
13
|
* are linked and the loyalty coupon's `status` reflects the current state of the reference coupon.
|
|
14
14
|
*
|
|
15
|
-
* Check which loyalty rewards a site has available with
|
|
16
|
-
* @param - ID of the
|
|
15
|
+
* Check which loyalty rewards a site has available with List Rewards in the Loyalty Rewards API.
|
|
16
|
+
* @param - ID of the loyalty reward to redeem. See the Loyalty Rewards API for more information.
|
|
17
17
|
*/
|
|
18
18
|
(rewardId: string, options: NonNullablePaths<RedeemPointsForCouponOptions, `loyaltyAccountId`>): Promise<NonNullablePaths<RedeemPointsForCouponResponse, {
|
|
19
19
|
[P in CouponNonNullablePaths]: `coupon.${P}`;
|
|
@@ -24,15 +24,15 @@ interface RedeemCurrentMemberPointsForCouponSignature {
|
|
|
24
24
|
/**
|
|
25
25
|
* Redeems a current customer's loyalty points for a loyalty reward and creates a loyalty coupon.
|
|
26
26
|
*
|
|
27
|
-
* Creating a loyalty coupon also creates a corresponding "reference" coupon with the
|
|
27
|
+
* Creating a loyalty coupon also creates a corresponding "reference" coupon with the Coupons API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/marketing/coupons/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/marketing/coupons/coupons/coupon-object)).
|
|
28
28
|
* The customer receives the reference coupon, which they can apply to their order. The loyalty coupon and its corresponding reference coupon
|
|
29
29
|
* are linked and the loyalty coupon's `status` reflects the current state of the reference coupon.
|
|
30
30
|
*
|
|
31
|
-
* Check which loyalty rewards a site has available with
|
|
31
|
+
* Check which loyalty rewards a site has available with List Rewards in the Loyalty Rewards API.
|
|
32
32
|
*
|
|
33
33
|
* >**Note:**
|
|
34
|
-
* >This endpoint requires
|
|
35
|
-
* @param - ID of the
|
|
34
|
+
* >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities).
|
|
35
|
+
* @param - ID of the loyalty reward to redeem. See the Loyalty Rewards API for more information.
|
|
36
36
|
*/
|
|
37
37
|
(rewardId: string): Promise<NonNullablePaths<RedeemCurrentMemberPointsForCouponResponse, {
|
|
38
38
|
[P in CouponNonNullablePaths]: `coupon.${P}`;
|
|
@@ -50,7 +50,7 @@ interface GetLoyaltyCouponSignature {
|
|
|
50
50
|
declare function bulkGetLoyaltyCoupon$1(httpClient: HttpClient): BulkGetLoyaltyCouponSignature;
|
|
51
51
|
interface BulkGetLoyaltyCouponSignature {
|
|
52
52
|
/**
|
|
53
|
-
* Retrieves a sequence of loyalty coupons
|
|
53
|
+
* Retrieves a sequence of loyalty coupons.
|
|
54
54
|
*/
|
|
55
55
|
(options?: BulkGetLoyaltyCouponOptions): Promise<NonNullablePaths<BulkGetLoyaltyCouponResponse, `couponsInSite` | `couponsInSite.${number}.metaSiteId` | {
|
|
56
56
|
[P in CouponNonNullablePaths]: `couponsInSite.${number}.loyaltyCoupons.${number}.${P}`;
|
|
@@ -62,7 +62,7 @@ interface GetCurrentMemberCouponsSignature {
|
|
|
62
62
|
* Retrieves the loyalty coupons for the currently logged-in member.
|
|
63
63
|
*
|
|
64
64
|
* >**Note:**
|
|
65
|
-
* >This
|
|
65
|
+
* >This method requires [visitor or member authentication](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities).
|
|
66
66
|
*/
|
|
67
67
|
(): Promise<NonNullablePaths<GetCurrentMemberCouponsResponse, {
|
|
68
68
|
[P in CouponNonNullablePaths]: `loyaltyCoupons.${number}.${P}`;
|
|
@@ -71,7 +71,7 @@ interface GetCurrentMemberCouponsSignature {
|
|
|
71
71
|
declare function queryLoyaltyCoupons$1(httpClient: HttpClient): QueryLoyaltyCouponsSignature;
|
|
72
72
|
interface QueryLoyaltyCouponsSignature {
|
|
73
73
|
/**
|
|
74
|
-
* Retrieves a list of loyalty coupons,
|
|
74
|
+
* Retrieves a list of loyalty coupons, with the specified paging, filtering, and sorting.
|
|
75
75
|
*/
|
|
76
76
|
(): LoyaltyCouponsQueryBuilder;
|
|
77
77
|
}
|