@wix/auto_sdk_loyalty_coupons 1.0.29 → 1.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +4 -4
- package/build/cjs/index.js +22 -14
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +14 -3
- package/build/cjs/index.typings.js +14 -8
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +7 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +4 -4
- package/build/es/index.mjs +22 -14
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +14 -3
- package/build/es/index.typings.mjs +14 -8
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +7 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +4 -4
- package/build/internal/cjs/index.js +22 -14
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +14 -3
- package/build/internal/cjs/index.typings.js +14 -8
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +7 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +4 -4
- package/build/internal/es/index.mjs +22 -14
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +14 -3
- package/build/internal/es/index.typings.mjs +14 -8
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +7 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import { RedeemPointsForCouponOptions, RedeemPointsForCouponResponse, RedeemCurrentMemberPointsForCouponResponse, LoyaltyCoupon, BulkGetLoyaltyCouponOptions, BulkGetLoyaltyCouponResponse, GetCurrentMemberCouponsResponse, CouponCreatedEnvelope, CouponDeletedEnvelope,
|
|
2
|
+
import { RedeemPointsForCouponOptions, RedeemPointsForCouponResponse, RedeemCurrentMemberPointsForCouponResponse, LoyaltyCoupon, BulkGetLoyaltyCouponOptions, BulkGetLoyaltyCouponResponse, GetCurrentMemberCouponsResponse, CouponCreatedEnvelope, CouponDeletedEnvelope, QueryV2, QueryLoyaltyCouponOptions, typedQueryLoyaltyCoupons, LoyaltyCouponsQueryBuilder } from './index.typings.js';
|
|
3
3
|
export { ActionEvent, BaseEventMetadata, BulkGetLoyaltyCouponRequest, BuyXGetY, CouponReference, CouponsInSite, CursorPaging, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteLoyaltyCouponRequest, DeleteLoyaltyCouponResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, GetCurrentMemberCouponsRequest, GetLoyaltyCouponRequest, GetLoyaltyCouponResponse, IdentificationData, IdentificationDataIdOneOf, LoyaltyCouponsQueryResult, MessageEnvelope, Paging, PagingMetadataV2, QueryLoyaltyCouponRequest, QueryLoyaltyCouponResponse, QueryV2PagingMethodOneOf, RedeemCurrentMemberPointsForCouponRequest, RedeemMemberPointsForDiscountAmountCouponRequest, RedeemMemberPointsForDiscountAmountCouponResponse, RedeemPointsForCouponRequest, RestoreInfo, Scope, SortOrder, SortOrderWithLiterals, Sorting, Specification, SpecificationScopeOrMinSubtotalOneOf, SpecificationTypeDetailsOneOf, Status, StatusWithLiterals, Type, TypeWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function redeemPointsForCoupon$1(httpClient: HttpClient): RedeemPointsForCouponSignature;
|
|
@@ -76,8 +76,8 @@ declare const onCouponCreated$1: EventDefinition<CouponCreatedEnvelope, "wix.loy
|
|
|
76
76
|
declare const onCouponDeleted$1: EventDefinition<CouponDeletedEnvelope, "wix.loyalty.v1.coupon_deleted">;
|
|
77
77
|
|
|
78
78
|
declare function customQueryLoyaltyCoupons(httpClient: HttpClient): {
|
|
79
|
-
():
|
|
80
|
-
(
|
|
79
|
+
(query: QueryV2, options?: QueryLoyaltyCouponOptions): ReturnType<typeof typedQueryLoyaltyCoupons>;
|
|
80
|
+
(options?: QueryLoyaltyCouponOptions): LoyaltyCouponsQueryBuilder;
|
|
81
81
|
};
|
|
82
82
|
declare const redeemPointsForCoupon: MaybeContext<BuildRESTFunction<typeof redeemPointsForCoupon$1> & typeof redeemPointsForCoupon$1>;
|
|
83
83
|
declare const redeemCurrentMemberPointsForCoupon: MaybeContext<BuildRESTFunction<typeof redeemCurrentMemberPointsForCoupon$1> & typeof redeemCurrentMemberPointsForCoupon$1>;
|
|
@@ -95,4 +95,4 @@ declare const onCouponCreated: BuildEventDefinition<typeof onCouponCreated$1> &
|
|
|
95
95
|
*/
|
|
96
96
|
declare const onCouponDeleted: BuildEventDefinition<typeof onCouponDeleted$1> & typeof onCouponDeleted$1;
|
|
97
97
|
|
|
98
|
-
export { BulkGetLoyaltyCouponOptions, BulkGetLoyaltyCouponResponse, CouponCreatedEnvelope, CouponDeletedEnvelope, GetCurrentMemberCouponsResponse, LoyaltyCoupon, LoyaltyCouponsQueryBuilder, QueryV2, RedeemCurrentMemberPointsForCouponResponse, RedeemPointsForCouponOptions, RedeemPointsForCouponResponse, bulkGetLoyaltyCoupon, deleteLoyaltyCoupon, getCurrentMemberCoupons, getLoyaltyCoupon, onCouponCreated, onCouponDeleted, queryLoyaltyCoupons, redeemCurrentMemberPointsForCoupon, redeemPointsForCoupon };
|
|
98
|
+
export { BulkGetLoyaltyCouponOptions, BulkGetLoyaltyCouponResponse, CouponCreatedEnvelope, CouponDeletedEnvelope, GetCurrentMemberCouponsResponse, LoyaltyCoupon, LoyaltyCouponsQueryBuilder, QueryLoyaltyCouponOptions, QueryV2, RedeemCurrentMemberPointsForCouponResponse, RedeemPointsForCouponOptions, RedeemPointsForCouponResponse, bulkGetLoyaltyCoupon, deleteLoyaltyCoupon, getCurrentMemberCoupons, getLoyaltyCoupon, onCouponCreated, onCouponDeleted, queryLoyaltyCoupons, redeemCurrentMemberPointsForCoupon, redeemPointsForCoupon };
|
package/build/cjs/index.js
CHANGED
|
@@ -572,11 +572,14 @@ async function getCurrentMemberCoupons2() {
|
|
|
572
572
|
throw transformedError;
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
|
-
function queryLoyaltyCoupons() {
|
|
576
|
-
const { httpClient, sideEffects } = arguments[
|
|
575
|
+
function queryLoyaltyCoupons(options) {
|
|
576
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
577
577
|
return (0, import_query_builder.queryBuilder)({
|
|
578
578
|
func: async (payload) => {
|
|
579
|
-
const reqOpts = queryLoyaltyCoupon(
|
|
579
|
+
const reqOpts = queryLoyaltyCoupon({
|
|
580
|
+
...payload,
|
|
581
|
+
...options ?? {}
|
|
582
|
+
});
|
|
580
583
|
sideEffects?.onSiteCall?.();
|
|
581
584
|
try {
|
|
582
585
|
const result = await httpClient.request(reqOpts);
|
|
@@ -588,7 +591,7 @@ function queryLoyaltyCoupons() {
|
|
|
588
591
|
}
|
|
589
592
|
},
|
|
590
593
|
requestTransformer: (query) => {
|
|
591
|
-
const args = [query,
|
|
594
|
+
const args = [query, options];
|
|
592
595
|
return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
593
596
|
...args?.[1],
|
|
594
597
|
query: args?.[0]
|
|
@@ -617,9 +620,12 @@ function queryLoyaltyCoupons() {
|
|
|
617
620
|
transformationPaths: {}
|
|
618
621
|
});
|
|
619
622
|
}
|
|
620
|
-
async function typedQueryLoyaltyCoupons(query) {
|
|
621
|
-
const { httpClient, sideEffects } = arguments[
|
|
622
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
623
|
+
async function typedQueryLoyaltyCoupons(query, options) {
|
|
624
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
625
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
626
|
+
query,
|
|
627
|
+
...options
|
|
628
|
+
});
|
|
623
629
|
const reqOpts = queryLoyaltyCoupon(payload);
|
|
624
630
|
sideEffects?.onSiteCall?.();
|
|
625
631
|
try {
|
|
@@ -634,7 +640,7 @@ async function typedQueryLoyaltyCoupons(query) {
|
|
|
634
640
|
explicitPathsToArguments: { query: "$[0]" },
|
|
635
641
|
singleArgumentUnchanged: false
|
|
636
642
|
},
|
|
637
|
-
["query"]
|
|
643
|
+
["query", "options"]
|
|
638
644
|
);
|
|
639
645
|
sideEffects?.onError?.(err);
|
|
640
646
|
throw transformedError;
|
|
@@ -703,14 +709,16 @@ function getCurrentMemberCoupons3(httpClient) {
|
|
|
703
709
|
);
|
|
704
710
|
}
|
|
705
711
|
function queryLoyaltyCoupons2(httpClient) {
|
|
706
|
-
return () => queryLoyaltyCoupons(
|
|
712
|
+
return (options) => queryLoyaltyCoupons(
|
|
713
|
+
options,
|
|
707
714
|
// @ts-ignore
|
|
708
715
|
{ httpClient }
|
|
709
716
|
);
|
|
710
717
|
}
|
|
711
718
|
function typedQueryLoyaltyCoupons2(httpClient) {
|
|
712
|
-
return (query) => typedQueryLoyaltyCoupons(
|
|
719
|
+
return (query, options) => typedQueryLoyaltyCoupons(
|
|
713
720
|
query,
|
|
721
|
+
options,
|
|
714
722
|
// @ts-ignore
|
|
715
723
|
{ httpClient }
|
|
716
724
|
);
|
|
@@ -782,11 +790,11 @@ var import_event_definition_modules = require("@wix/sdk-runtime/event-definition
|
|
|
782
790
|
var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
|
|
783
791
|
function customQueryLoyaltyCoupons(httpClient) {
|
|
784
792
|
const router = (0, import_query_method_router.createQueryOverloadRouter)({
|
|
785
|
-
builderQueryFunction: () => queryLoyaltyCoupons2(httpClient)(),
|
|
786
|
-
typedQueryFunction: (query) => typedQueryLoyaltyCoupons2(httpClient)(query),
|
|
787
|
-
hasOptionsParameter:
|
|
793
|
+
builderQueryFunction: (options) => queryLoyaltyCoupons2(httpClient)(options),
|
|
794
|
+
typedQueryFunction: (query, options) => typedQueryLoyaltyCoupons2(httpClient)(query, options),
|
|
795
|
+
hasOptionsParameter: true
|
|
788
796
|
});
|
|
789
|
-
function overloadedQuery(
|
|
797
|
+
function overloadedQuery(queryOrOptions, options) {
|
|
790
798
|
return router(...arguments);
|
|
791
799
|
}
|
|
792
800
|
return overloadedQuery;
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/loyalty-v1-coupon-coupons.public.ts","../../src/loyalty-v1-coupon-coupons.universal.ts","../../src/loyalty-v1-coupon-coupons.http.ts","../../src/loyalty-v1-coupon-coupons.context.ts"],"sourcesContent":["export * from './src/loyalty-v1-coupon-coupons.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n BulkGetLoyaltyCouponOptions,\n BulkGetLoyaltyCouponResponse,\n CouponCreatedEnvelope,\n CouponDeletedEnvelope,\n GetCurrentMemberCouponsResponse,\n LoyaltyCoupon,\n LoyaltyCouponsQueryBuilder,\n QueryLoyaltyCouponResponse,\n QueryV2,\n RedeemCurrentMemberPointsForCouponResponse,\n RedeemPointsForCouponOptions,\n RedeemPointsForCouponResponse,\n bulkGetLoyaltyCoupon as universalBulkGetLoyaltyCoupon,\n deleteLoyaltyCoupon as universalDeleteLoyaltyCoupon,\n getCurrentMemberCoupons as universalGetCurrentMemberCoupons,\n getLoyaltyCoupon as universalGetLoyaltyCoupon,\n queryLoyaltyCoupons as universalQueryLoyaltyCoupons,\n redeemCurrentMemberPointsForCoupon as universalRedeemCurrentMemberPointsForCoupon,\n redeemPointsForCoupon as universalRedeemPointsForCoupon,\n typedQueryLoyaltyCoupons as universalTypedQueryLoyaltyCoupons,\n} from './loyalty-v1-coupon-coupons.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/loyalty' };\n\nexport function redeemPointsForCoupon(\n httpClient: HttpClient\n): RedeemPointsForCouponSignature {\n return (\n rewardId: string,\n options: NonNullablePaths<\n RedeemPointsForCouponOptions,\n `loyaltyAccountId`,\n 2\n >\n ) =>\n universalRedeemPointsForCoupon(\n rewardId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RedeemPointsForCouponSignature {\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/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 * @param - ID of the loyalty reward to redeem. See the Loyalty Rewards API for more information.\n */\n (\n rewardId: string,\n options: NonNullablePaths<\n RedeemPointsForCouponOptions,\n `loyaltyAccountId`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n RedeemPointsForCouponResponse,\n | `coupon._id`\n | `coupon.accountId`\n | `coupon.memberIdDeprecated`\n | `coupon.couponReference.couponId`\n | `coupon.couponReference.code`\n | `coupon.couponReference.specification.moneyOffAmount`\n | `coupon.couponReference.specification.percentOffRate`\n | `coupon.couponReference.specification.freeShipping`\n | `coupon.couponReference.specification.fixedPriceAmount`\n | `coupon.couponReference.specification.buyXGetY.x`\n | `coupon.couponReference.specification.buyXGetY.y`\n | `coupon.couponReference.specification.scope.namespace`\n | `coupon.couponReference.specification.type`\n | `coupon.status`\n | `coupon.rewardName`,\n 6\n >\n >;\n}\n\nexport function redeemCurrentMemberPointsForCoupon(\n httpClient: HttpClient\n): RedeemCurrentMemberPointsForCouponSignature {\n return (rewardId: string) =>\n universalRedeemCurrentMemberPointsForCoupon(\n rewardId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RedeemCurrentMemberPointsForCouponSignature {\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/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 * @param - ID of the loyalty reward to redeem. See the Loyalty Rewards API for more information.\n */\n (rewardId: string): Promise<\n NonNullablePaths<\n RedeemCurrentMemberPointsForCouponResponse,\n | `coupon._id`\n | `coupon.accountId`\n | `coupon.memberIdDeprecated`\n | `coupon.couponReference.couponId`\n | `coupon.couponReference.code`\n | `coupon.couponReference.specification.moneyOffAmount`\n | `coupon.couponReference.specification.percentOffRate`\n | `coupon.couponReference.specification.freeShipping`\n | `coupon.couponReference.specification.fixedPriceAmount`\n | `coupon.couponReference.specification.buyXGetY.x`\n | `coupon.couponReference.specification.buyXGetY.y`\n | `coupon.couponReference.specification.scope.namespace`\n | `coupon.couponReference.specification.type`\n | `coupon.status`\n | `coupon.rewardName`,\n 6\n >\n >;\n}\n\nexport function getLoyaltyCoupon(\n httpClient: HttpClient\n): GetLoyaltyCouponSignature {\n return (loyaltyCouponId: string) =>\n universalGetLoyaltyCoupon(\n loyaltyCouponId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetLoyaltyCouponSignature {\n /**\n * Retrieves a loyalty coupon.\n * @param - ID of the loyalty coupon to retrieve.\n * @returns Retrieved loyalty coupon.\n */\n (loyaltyCouponId: string): Promise<\n NonNullablePaths<\n LoyaltyCoupon,\n | `_id`\n | `accountId`\n | `memberIdDeprecated`\n | `couponReference.couponId`\n | `couponReference.code`\n | `couponReference.specification.moneyOffAmount`\n | `couponReference.specification.percentOffRate`\n | `couponReference.specification.freeShipping`\n | `couponReference.specification.fixedPriceAmount`\n | `couponReference.specification.buyXGetY.x`\n | `couponReference.specification.buyXGetY.y`\n | `couponReference.specification.scope.namespace`\n | `couponReference.specification.type`\n | `status`\n | `rewardName`,\n 5\n >\n >;\n}\n\nexport function bulkGetLoyaltyCoupon(\n httpClient: HttpClient\n): BulkGetLoyaltyCouponSignature {\n return (options?: BulkGetLoyaltyCouponOptions) =>\n universalBulkGetLoyaltyCoupon(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkGetLoyaltyCouponSignature {\n /**\n * Retrieves a sequence of loyalty coupons.\n */\n (options?: BulkGetLoyaltyCouponOptions): Promise<\n NonNullablePaths<\n BulkGetLoyaltyCouponResponse,\n `couponsInSite` | `couponsInSite.${number}.metaSiteId`,\n 4\n >\n >;\n}\n\nexport function getCurrentMemberCoupons(\n httpClient: HttpClient\n): GetCurrentMemberCouponsSignature {\n return () =>\n universalGetCurrentMemberCoupons(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetCurrentMemberCouponsSignature {\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 */\n (): Promise<\n NonNullablePaths<\n GetCurrentMemberCouponsResponse,\n | `loyaltyCoupons`\n | `loyaltyCoupons.${number}._id`\n | `loyaltyCoupons.${number}.accountId`\n | `loyaltyCoupons.${number}.memberIdDeprecated`\n | `loyaltyCoupons.${number}.couponReference.couponId`\n | `loyaltyCoupons.${number}.couponReference.code`\n | `loyaltyCoupons.${number}.couponReference.specification.moneyOffAmount`\n | `loyaltyCoupons.${number}.couponReference.specification.percentOffRate`\n | `loyaltyCoupons.${number}.couponReference.specification.freeShipping`\n | `loyaltyCoupons.${number}.couponReference.specification.fixedPriceAmount`\n | `loyaltyCoupons.${number}.couponReference.specification.type`\n | `loyaltyCoupons.${number}.status`\n | `loyaltyCoupons.${number}.rewardName`,\n 6\n >\n >;\n}\n\nexport function queryLoyaltyCoupons(\n httpClient: HttpClient\n): QueryLoyaltyCouponsSignature {\n return () =>\n universalQueryLoyaltyCoupons(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryLoyaltyCouponsSignature {\n /**\n * Retrieves a list of loyalty coupons, with the specified paging, filtering, and sorting.\n */\n (): LoyaltyCouponsQueryBuilder;\n}\n\nexport function typedQueryLoyaltyCoupons(\n httpClient: HttpClient\n): TypedQueryLoyaltyCouponsSignature {\n return (query: QueryV2) =>\n universalTypedQueryLoyaltyCoupons(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryLoyaltyCouponsSignature {\n /** */\n (query: QueryV2): Promise<\n NonNullablePaths<\n QueryLoyaltyCouponResponse,\n | `loyaltyCoupons`\n | `loyaltyCoupons.${number}._id`\n | `loyaltyCoupons.${number}.accountId`\n | `loyaltyCoupons.${number}.memberIdDeprecated`\n | `loyaltyCoupons.${number}.couponReference.couponId`\n | `loyaltyCoupons.${number}.couponReference.code`\n | `loyaltyCoupons.${number}.couponReference.specification.moneyOffAmount`\n | `loyaltyCoupons.${number}.couponReference.specification.percentOffRate`\n | `loyaltyCoupons.${number}.couponReference.specification.freeShipping`\n | `loyaltyCoupons.${number}.couponReference.specification.fixedPriceAmount`\n | `loyaltyCoupons.${number}.couponReference.specification.type`\n | `loyaltyCoupons.${number}.status`\n | `loyaltyCoupons.${number}.rewardName`,\n 6\n >\n >;\n}\n\nexport function deleteLoyaltyCoupon(\n httpClient: HttpClient\n): DeleteLoyaltyCouponSignature {\n return (_id: string, revision: string) =>\n universalDeleteLoyaltyCoupon(\n _id,\n revision,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteLoyaltyCouponSignature {\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 * @param - ID of the loyalty coupon to delete.\n * @param - Revision number, which increments by 1 each time the loyalty coupon is updated.\n *\n * To prevent conflicting changes, the current `revision` must be passed when updating the loyalty coupon.\n */\n (_id: string, revision: string): Promise<void>;\n}\n\nexport const onCouponCreated = EventDefinition(\n 'wix.loyalty.v1.coupon_created',\n true,\n (event: CouponCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'entity.couponReference.specification.moneyOffAmount' },\n { path: 'entity.couponReference.specification.percentOffRate' },\n { path: 'entity.couponReference.specification.fixedPriceAmount' },\n { path: 'entity.couponReference.specification.minimumSubtotal' },\n ],\n },\n ])\n )\n)<CouponCreatedEnvelope>();\nexport const onCouponDeleted = EventDefinition(\n 'wix.loyalty.v1.coupon_deleted',\n true,\n (event: CouponDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'undefined.createdDate' },\n { path: 'undefined.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'undefined.couponReference.specification.moneyOffAmount' },\n { path: 'undefined.couponReference.specification.percentOffRate' },\n {\n path: 'undefined.couponReference.specification.fixedPriceAmount',\n },\n { path: 'undefined.couponReference.specification.minimumSubtotal' },\n ],\n },\n ])\n )\n)<CouponDeletedEnvelope>();\n\nexport {\n ActionEvent,\n BaseEventMetadata,\n BulkGetLoyaltyCouponOptions,\n BulkGetLoyaltyCouponRequest,\n BulkGetLoyaltyCouponResponse,\n BuyXGetY,\n CouponCreatedEnvelope,\n CouponDeletedEnvelope,\n CouponReference,\n CouponsInSite,\n CursorPaging,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeleteLoyaltyCouponRequest,\n DeleteLoyaltyCouponResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n GetCurrentMemberCouponsRequest,\n GetCurrentMemberCouponsResponse,\n GetLoyaltyCouponRequest,\n GetLoyaltyCouponResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n LoyaltyCoupon,\n LoyaltyCouponsQueryBuilder,\n LoyaltyCouponsQueryResult,\n MessageEnvelope,\n Paging,\n PagingMetadataV2,\n QueryLoyaltyCouponRequest,\n QueryLoyaltyCouponResponse,\n QueryV2,\n QueryV2PagingMethodOneOf,\n RedeemCurrentMemberPointsForCouponRequest,\n RedeemCurrentMemberPointsForCouponResponse,\n RedeemMemberPointsForDiscountAmountCouponRequest,\n RedeemMemberPointsForDiscountAmountCouponResponse,\n RedeemPointsForCouponOptions,\n RedeemPointsForCouponRequest,\n RedeemPointsForCouponResponse,\n RestoreInfo,\n Scope,\n SortOrder,\n Sorting,\n Specification,\n SpecificationScopeOrMinSubtotalOneOf,\n SpecificationTypeDetailsOneOf,\n Status,\n Type,\n WebhookIdentityType,\n} from './loyalty-v1-coupon-coupons.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixLoyaltyV1Coupon from './loyalty-v1-coupon-coupons.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * A loyalty coupon is created when a customer redeems their loyalty points for a reward. Creating a loyalty coupon\n * also creates a corresponding \"reference\" coupon with the Coupons API.\n */\nexport interface LoyaltyCoupon {\n /**\n * Loyalty coupon ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Loyalty [account ID](https://dev.wix.com/docs/rest/crm/loyalty-program/accounts/account-object) of the customer that redeemed points for a coupon.\n * @format GUID\n * @readonly\n */\n accountId?: string;\n /**\n * Member ID of the customer that redeemed points for a coupon. See the Members API for more information.\n * @format GUID\n * @readonly\n * @deprecated Member ID of the customer that redeemed points for a coupon. See the Members API for more information.\n * @replacedBy member_id\n * @targetRemovalDate 2024-06-01\n */\n memberIdDeprecated?: string;\n /**\n * Member ID of the customer that redeemed points for a coupon. See the Members API for more information.\n * @format GUID\n * @readonly\n */\n memberId?: string | null;\n /**\n * [Transaction ID](https://dev.wix.com/docs/rest/crm/loyalty-program/transactions/loyalty-transaction-object) for the transaction that created a coupon.\n * @format GUID\n * @readonly\n */\n transactionId?: string | null;\n /**\n * Reference coupon information for the corresponding [coupon](https://dev.wix.com/docs/rest/business-management/marketing/coupons/coupons/coupon-object)\n * that is created along with the loyalty coupon.\n * @readonly\n */\n couponReference?: CouponReference;\n /**\n * Loyalty coupon status.\n *\n * This status relates to the corresponding coupon that is created\n * at the same time as the loyalty coupon and is included in `couponReference`.\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * Name of reward that was redeemed to create this coupon.\n * @minLength 1\n * @maxLength 50\n * @readonly\n */\n rewardName?: string;\n /**\n * Revision number, which increments by 1 each time the loyalty coupon is updated.\n *\n * To prevent conflicting changes, the current `revision` must be passed when updating the loyalty coupon.\n * @immutable\n */\n revision?: string | null;\n /**\n * Date and time the loyalty coupon was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the loyalty coupon was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n}\n\nexport interface CouponReference {\n /**\n * Coupon ID.\n * @format GUID\n * @readonly\n */\n couponId?: string;\n /**\n * Coupon code.\n *\n * Unique code entered by a customer to apply the coupon.\n * @maxLength 20\n * @readonly\n */\n code?: string;\n /**\n * Name of coupon.\n * @maxLength 80\n * @readonly\n */\n name?: string | null;\n /**\n * The information to use when creating the coupon.\n * @readonly\n */\n specification?: Specification;\n /**\n * Whether the referenced coupon was deleted.\n * @readonly\n */\n deleted?: boolean | null;\n}\n\nexport interface Specification\n extends SpecificationTypeDetailsOneOf,\n SpecificationScopeOrMinSubtotalOneOf {\n /**\n * Fixed price discount.\n * @min 0.01\n */\n moneyOffAmount?: number;\n /** Discount as a percentage. */\n percentOffRate?: number;\n /** Free shipping. If true, the coupon applies to all items in all `namespaces` on a site. */\n freeShipping?: boolean;\n /** Specific sale price. Currently only supported for coupons with a `stores` `namespace`. */\n fixedPriceAmount?: number;\n /**\n * Free products when making a purchase. `buyXGetY` is an object that specifies `x` and `y` in the\n * following scenario: if a visitor purchases x number of products, they receive y number of products for free. C\n * urrently only supported for coupons with a `stores` `namespace`.\n */\n buyXGetY?: BuyXGetY;\n /**\n * Scope of the coupon. When no scope is defined, the coupon applies to all\n * items in all `namespaces` in the site.\n */\n scope?: Scope;\n /** The coupon is only applicable when the order subtotal is over this amount. */\n minimumSubtotal?: number | null;\n /** Name of coupon. */\n name?: string | null;\n type?: TypeWithLiterals;\n /**\n * Whether the coupon is limited to 1 discount per order. If true and a customer pays for multiple items\n * that the coupon applies to, only the lowest priced item is discounted.\n * Coupons with a `bookings` `namespace` are always limited to 1 item.\n */\n limitedToOneItem?: boolean | null;\n /** Whether the coupon also applies to subscriptions. */\n appliesToSubscriptions?: boolean | null;\n /**\n * Specifies the amount of cycles to apply the discount to for a subscription item.\n *\n * Can only be set when `appliesToSubscriptions` is `TRUE` and `specification.scope.namespace` is `pricingPlans`.\n * If `discountedCycleCount` is empty, the coupon applies to all available cycles.\n *\n * Min: `1`\n *\n * Max: `999`\n */\n discountedCycleCount?: number | null;\n}\n\n/** @oneof */\nexport interface SpecificationTypeDetailsOneOf {\n /**\n * Fixed price discount.\n * @min 0.01\n */\n moneyOffAmount?: number;\n /** Discount as a percentage. */\n percentOffRate?: number;\n /** Free shipping. If true, the coupon applies to all items in all `namespaces` on a site. */\n freeShipping?: boolean;\n /** Specific sale price. Currently only supported for coupons with a `stores` `namespace`. */\n fixedPriceAmount?: number;\n /**\n * Free products when making a purchase. `buyXGetY` is an object that specifies `x` and `y` in the\n * following scenario: if a visitor purchases x number of products, they receive y number of products for free. C\n * urrently only supported for coupons with a `stores` `namespace`.\n */\n buyXGetY?: BuyXGetY;\n}\n\n/** @oneof */\nexport interface SpecificationScopeOrMinSubtotalOneOf {\n /**\n * Scope of the coupon. When no scope is defined, the coupon applies to all\n * items in all `namespaces` in the site.\n */\n scope?: Scope;\n /** The coupon is only applicable when the order subtotal is over this amount. */\n minimumSubtotal?: number | null;\n}\n\nexport enum Type {\n UNKNOWN = 'UNKNOWN',\n MONEY_OFF_AMOUNT = 'MONEY_OFF_AMOUNT',\n PERCENT_OFF_RATE = 'PERCENT_OFF_RATE',\n FREE_SHIPPING = 'FREE_SHIPPING',\n FIXED_PRICE_AMOUNT = 'FIXED_PRICE_AMOUNT',\n BUY_X_GET_Y = 'BUY_X_GET_Y',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'UNKNOWN'\n | 'MONEY_OFF_AMOUNT'\n | 'PERCENT_OFF_RATE'\n | 'FREE_SHIPPING'\n | 'FIXED_PRICE_AMOUNT'\n | 'BUY_X_GET_Y';\n\nexport interface BuyXGetY {\n /** Number of purchased items required to receive free items. */\n x?: number;\n /** Number of items received for free if required number of items were purchased. */\n y?: number;\n}\n\nexport interface Scope {\n /**\n * Group within a `namespace` for which the coupon is applicable.\n *\n * If no group is specified, the coupon applies to all items in the namespace.\n * `group` is required in some namespaces. See [Scope Values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values)\n * for a list of currently supported groups for each namespace.\n */\n name?: string | null;\n /**\n * ID of the specific entity in the group for which the coupon is applicable.\n *\n * If no `entityId` is specified, the coupon applies to all entities in the group. In some cases when a group is specified,\n * an `entityId` is required. See [Scope Values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values)\n * for a list of currently supported entities for each namespace and group.\n */\n entityId?: string | null;\n /**\n * Wix application for which the coupon is applicable.\n *\n * One of the following:\n * + `\"stores\"`\n * + `\"bookings\"`\n * + `\"events\"`\n * + `\"pricingPlans\"`\n */\n namespace?: string;\n}\n\nexport enum Status {\n /** Unknown status. */\n UNKNOWN = 'UNKNOWN',\n /** The reference coupon was created but the loyalty points have not been redeemed yet. */\n PENDING = 'PENDING',\n /** The reference coupon is active and available to the customer. */\n ACTIVE = 'ACTIVE',\n /** The reference coupon was applied and is no longer available for use. */\n APPLIED = 'APPLIED',\n /** The reference coupon was created but something went wrong when redeeming points from the loyalty account. */\n FAILED = 'FAILED',\n /** The reference coupon was deleted. */\n ARCHIVED = 'ARCHIVED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN'\n | 'PENDING'\n | 'ACTIVE'\n | 'APPLIED'\n | 'FAILED'\n | 'ARCHIVED';\n\nexport interface RedeemPointsForCouponRequest {\n /**\n * ID of the loyalty reward to redeem. See the Loyalty Rewards API for more information.\n * @format GUID\n */\n rewardId: string;\n /**\n * ID of the loyalty account of the customer redeeming points. See the Loyalty Accounts API for more information.\n * @format GUID\n */\n loyaltyAccountId: string;\n}\n\nexport interface RedeemPointsForCouponResponse {\n /** Created loyalty coupon. */\n coupon?: LoyaltyCoupon;\n}\n\nexport interface RedeemCurrentMemberPointsForCouponRequest {\n /**\n * ID of the loyalty reward to redeem. See the Loyalty Rewards API for more information.\n * @format GUID\n */\n rewardId: string;\n}\n\nexport interface RedeemCurrentMemberPointsForCouponResponse {\n /** Created loyalty coupon. */\n coupon?: LoyaltyCoupon;\n}\n\nexport interface RedeemMemberPointsForDiscountAmountCouponRequest {\n /**\n * ID of the loyalty reward to redeem. See the Loyalty Rewards API for more information.\n * @format GUID\n */\n rewardId?: string;\n /**\n * Loyalty account ID. See the Loyalty Accounts API for more information.\n * @format GUID\n */\n loyaltyAccountId?: string;\n /** Number of points to redeem. */\n pointsToRedeem?: number;\n /** Coupon specification. */\n specification?: Specification;\n}\n\nexport interface RedeemMemberPointsForDiscountAmountCouponResponse {\n /** Created loyalty coupon. */\n coupon?: LoyaltyCoupon;\n /** Transaction ID of the coupon redemption. */\n transactionId?: string;\n}\n\nexport interface GetLoyaltyCouponRequest {\n /**\n * ID of the loyalty coupon to retrieve.\n * @format GUID\n */\n loyaltyCouponId: string;\n}\n\nexport interface GetLoyaltyCouponResponse {\n /** Retrieved loyalty coupon. */\n loyaltyCoupon?: LoyaltyCoupon;\n}\n\nexport interface BulkGetLoyaltyCouponRequest {\n /** Query to filter loyalty coupons. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface BulkGetLoyaltyCouponResponse {\n /**\n * Retrieved loyalty coupons.\n * @maxSize 100\n */\n couponsInSite?: CouponsInSite[];\n}\n\nexport interface CouponsInSite {\n /**\n * Metasite ID.\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Retrieved loyalty coupons.\n * @maxSize 100\n */\n loyaltyCoupons?: LoyaltyCoupon[];\n}\n\nexport interface GetCurrentMemberCouponsRequest {}\n\nexport interface GetCurrentMemberCouponsResponse {\n /** Retrieved loyalty coupons. */\n loyaltyCoupons?: LoyaltyCoupon[];\n}\n\nexport interface QueryLoyaltyCouponRequest {\n /** Query options. */\n query: QueryV2;\n}\n\nexport interface QueryV2 extends QueryV2PagingMethodOneOf {\n /** Paging options to limit and offset the number of items. */\n paging?: Paging;\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).\n */\n sort?: Sorting[];\n /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */\n fields?: string[];\n /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */\n fieldsets?: string[];\n}\n\n/** @oneof */\nexport interface QueryV2PagingMethodOneOf {\n /** Paging options to limit and offset the number of items. */\n paging?: Paging;\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface QueryLoyaltyCouponResponse {\n /** Retrieved loyalty coupons. */\n loyaltyCoupons?: LoyaltyCoupon[];\n /** Metadata. */\n metadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface DeleteLoyaltyCouponRequest {\n /**\n * ID of the loyalty coupon to delete.\n * @format GUID\n */\n _id: string;\n /**\n * Revision number, which increments by 1 each time the loyalty coupon is updated.\n *\n * To prevent conflicting changes, the current `revision` must be passed when updating the loyalty coupon.\n */\n revision?: string;\n}\n\nexport interface DeleteLoyaltyCouponResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface CouponCreatedEnvelope {\n entity: LoyaltyCoupon;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a loyalty coupon is created.\n * @permissionScope Read Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY\n * @permissionScope Manage Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId LOYALTY.READ_COUPONS\n * @webhook\n * @eventType wix.loyalty.v1.coupon_created\n * @serviceIdentifier com.wixpress.loyalty.coupon.LoyaltyCoupons\n * @slug created\n */\nexport declare function onCouponCreated(\n handler: (event: CouponCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface CouponDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a loyalty coupon is deleted.\n * @permissionScope Read Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY\n * @permissionScope Manage Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId LOYALTY.READ_COUPONS\n * @webhook\n * @eventType wix.loyalty.v1.coupon_deleted\n * @serviceIdentifier com.wixpress.loyalty.coupon.LoyaltyCoupons\n * @slug deleted\n */\nexport declare function onCouponDeleted(\n handler: (event: CouponDeletedEnvelope) => void | Promise<void>\n): void;\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/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 * @param rewardId - ID of the loyalty reward to redeem. See the Loyalty Rewards API for more information.\n * @public\n * @requiredField options\n * @requiredField options.loyaltyAccountId\n * @requiredField rewardId\n * @permissionId LOYALTY.REDEEM_COUPON\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.RedeemPointsForCoupon\n */\nexport async function redeemPointsForCoupon(\n rewardId: string,\n options: NonNullablePaths<RedeemPointsForCouponOptions, `loyaltyAccountId`, 2>\n): Promise<\n NonNullablePaths<\n RedeemPointsForCouponResponse,\n | `coupon._id`\n | `coupon.accountId`\n | `coupon.memberIdDeprecated`\n | `coupon.couponReference.couponId`\n | `coupon.couponReference.code`\n | `coupon.couponReference.specification.moneyOffAmount`\n | `coupon.couponReference.specification.percentOffRate`\n | `coupon.couponReference.specification.freeShipping`\n | `coupon.couponReference.specification.fixedPriceAmount`\n | `coupon.couponReference.specification.buyXGetY.x`\n | `coupon.couponReference.specification.buyXGetY.y`\n | `coupon.couponReference.specification.scope.namespace`\n | `coupon.couponReference.specification.type`\n | `coupon.status`\n | `coupon.rewardName`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n rewardId: rewardId,\n loyaltyAccountId: options?.loyaltyAccountId,\n });\n\n const reqOpts = ambassadorWixLoyaltyV1Coupon.redeemPointsForCoupon(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n rewardId: '$[0]',\n loyaltyAccountId: '$[1].loyaltyAccountId',\n },\n singleArgumentUnchanged: false,\n },\n ['rewardId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface RedeemPointsForCouponOptions {\n /**\n * ID of the loyalty account of the customer redeeming points. See the Loyalty Accounts API for more information.\n * @format GUID\n */\n loyaltyAccountId: string;\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/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 * @param rewardId - ID of the loyalty reward to redeem. See the Loyalty Rewards API for more information.\n * @public\n * @requiredField rewardId\n * @permissionId LOYALTY.REDEEM_OWN_COUPON\n * @applicableIdentity APP\n * @applicableIdentity MEMBER\n * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.RedeemCurrentMemberPointsForCoupon\n */\nexport async function redeemCurrentMemberPointsForCoupon(\n rewardId: string\n): Promise<\n NonNullablePaths<\n RedeemCurrentMemberPointsForCouponResponse,\n | `coupon._id`\n | `coupon.accountId`\n | `coupon.memberIdDeprecated`\n | `coupon.couponReference.couponId`\n | `coupon.couponReference.code`\n | `coupon.couponReference.specification.moneyOffAmount`\n | `coupon.couponReference.specification.percentOffRate`\n | `coupon.couponReference.specification.freeShipping`\n | `coupon.couponReference.specification.fixedPriceAmount`\n | `coupon.couponReference.specification.buyXGetY.x`\n | `coupon.couponReference.specification.buyXGetY.y`\n | `coupon.couponReference.specification.scope.namespace`\n | `coupon.couponReference.specification.type`\n | `coupon.status`\n | `coupon.rewardName`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ rewardId: rewardId });\n\n const reqOpts =\n ambassadorWixLoyaltyV1Coupon.redeemCurrentMemberPointsForCoupon(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { rewardId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['rewardId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a loyalty coupon.\n * @param loyaltyCouponId - ID of the loyalty coupon to retrieve.\n * @public\n * @requiredField loyaltyCouponId\n * @permissionId LOYALTY.READ_COUPONS\n * @applicableIdentity APP\n * @returns Retrieved loyalty coupon.\n * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.GetLoyaltyCoupon\n */\nexport async function getLoyaltyCoupon(\n loyaltyCouponId: string\n): Promise<\n NonNullablePaths<\n LoyaltyCoupon,\n | `_id`\n | `accountId`\n | `memberIdDeprecated`\n | `couponReference.couponId`\n | `couponReference.code`\n | `couponReference.specification.moneyOffAmount`\n | `couponReference.specification.percentOffRate`\n | `couponReference.specification.freeShipping`\n | `couponReference.specification.fixedPriceAmount`\n | `couponReference.specification.buyXGetY.x`\n | `couponReference.specification.buyXGetY.y`\n | `couponReference.specification.scope.namespace`\n | `couponReference.specification.type`\n | `status`\n | `rewardName`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n loyaltyCouponId: loyaltyCouponId,\n });\n\n const reqOpts = ambassadorWixLoyaltyV1Coupon.getLoyaltyCoupon(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.loyaltyCoupon!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { loyaltyCouponId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['loyaltyCouponId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a sequence of loyalty coupons.\n * @public\n * @permissionId LOYALTY.REWARD_BULK_READ\n * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.BulkGetLoyaltyCoupon\n */\nexport async function bulkGetLoyaltyCoupon(\n options?: BulkGetLoyaltyCouponOptions\n): Promise<\n NonNullablePaths<\n BulkGetLoyaltyCouponResponse,\n `couponsInSite` | `couponsInSite.${number}.metaSiteId`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n query: options?.query,\n });\n\n const reqOpts = ambassadorWixLoyaltyV1Coupon.bulkGetLoyaltyCoupon(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0].query' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkGetLoyaltyCouponOptions {\n /** Query to filter loyalty coupons. */\n query?: CursorQuery;\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 * @public\n * @permissionId LOYALTY.READ_OWN_COUPONS\n * @applicableIdentity APP\n * @applicableIdentity MEMBER\n * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.GetCurrentMemberCoupons\n */\nexport async function getCurrentMemberCoupons(): Promise<\n NonNullablePaths<\n GetCurrentMemberCouponsResponse,\n | `loyaltyCoupons`\n | `loyaltyCoupons.${number}._id`\n | `loyaltyCoupons.${number}.accountId`\n | `loyaltyCoupons.${number}.memberIdDeprecated`\n | `loyaltyCoupons.${number}.couponReference.couponId`\n | `loyaltyCoupons.${number}.couponReference.code`\n | `loyaltyCoupons.${number}.couponReference.specification.moneyOffAmount`\n | `loyaltyCoupons.${number}.couponReference.specification.percentOffRate`\n | `loyaltyCoupons.${number}.couponReference.specification.freeShipping`\n | `loyaltyCoupons.${number}.couponReference.specification.fixedPriceAmount`\n | `loyaltyCoupons.${number}.couponReference.specification.type`\n | `loyaltyCoupons.${number}.status`\n | `loyaltyCoupons.${number}.rewardName`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts = ambassadorWixLoyaltyV1Coupon.getCurrentMemberCoupons(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of loyalty coupons, with the specified paging, filtering, and sorting.\n * @public\n * @permissionId LOYALTY.READ_COUPONS\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.QueryLoyaltyCoupon\n */\nexport function queryLoyaltyCoupons(): LoyaltyCouponsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n LoyaltyCoupon,\n 'CURSOR',\n QueryLoyaltyCouponRequest,\n QueryLoyaltyCouponResponse\n >({\n func: async (payload: QueryLoyaltyCouponRequest) => {\n const reqOpts = ambassadorWixLoyaltyV1Coupon.queryLoyaltyCoupon(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryLoyaltyCouponRequest['query']) => {\n const args = [query, {}] as [QueryLoyaltyCouponRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({\n data,\n }: HttpResponse<QueryLoyaltyCouponResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.loyaltyCoupons,\n pagingMetadata: transformedData?.metadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface LoyaltyCouponsQueryResult extends QueryCursorResult {\n items: LoyaltyCoupon[];\n query: LoyaltyCouponsQueryBuilder;\n next: () => Promise<LoyaltyCouponsQueryResult>;\n prev: () => Promise<LoyaltyCouponsQueryResult>;\n}\n\nexport interface LoyaltyCouponsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName:\n | 'accountId'\n | 'memberId'\n | 'transactionId'\n | 'couponReference'\n | 'status'\n | 'rewardName'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => LoyaltyCouponsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ne: (\n propertyName:\n | 'accountId'\n | 'memberId'\n | 'transactionId'\n | 'couponReference'\n | 'status'\n | 'rewardName'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => LoyaltyCouponsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ge: (\n propertyName:\n | 'accountId'\n | 'memberId'\n | 'transactionId'\n | 'rewardName'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => LoyaltyCouponsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (\n propertyName:\n | 'accountId'\n | 'memberId'\n | 'transactionId'\n | 'rewardName'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => LoyaltyCouponsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (\n propertyName:\n | 'accountId'\n | 'memberId'\n | 'transactionId'\n | 'rewardName'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => LoyaltyCouponsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (\n propertyName:\n | 'accountId'\n | 'memberId'\n | 'transactionId'\n | 'rewardName'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => LoyaltyCouponsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n */\n startsWith: (\n propertyName: 'accountId' | 'memberId' | 'transactionId' | 'rewardName',\n value: string\n ) => LoyaltyCouponsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n */\n hasSome: (\n propertyName:\n | 'accountId'\n | 'memberId'\n | 'transactionId'\n | 'couponReference'\n | 'status'\n | 'rewardName'\n | '_createdDate'\n | '_updatedDate',\n value: any[]\n ) => LoyaltyCouponsQueryBuilder;\n in: (\n propertyName:\n | 'accountId'\n | 'memberId'\n | 'transactionId'\n | 'couponReference'\n | 'status'\n | 'rewardName'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => LoyaltyCouponsQueryBuilder;\n exists: (\n propertyName:\n | 'accountId'\n | 'memberId'\n | 'transactionId'\n | 'couponReference'\n | 'status'\n | 'rewardName'\n | '_createdDate'\n | '_updatedDate',\n value: boolean\n ) => LoyaltyCouponsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n ascending: (\n ...propertyNames: Array<\n | 'accountId'\n | 'memberId'\n | 'transactionId'\n | 'couponReference'\n | 'status'\n | 'rewardName'\n | '_createdDate'\n | '_updatedDate'\n >\n ) => LoyaltyCouponsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n descending: (\n ...propertyNames: Array<\n | 'accountId'\n | 'memberId'\n | 'transactionId'\n | 'couponReference'\n | 'status'\n | 'rewardName'\n | '_createdDate'\n | '_updatedDate'\n >\n ) => LoyaltyCouponsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => LoyaltyCouponsQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => LoyaltyCouponsQueryBuilder;\n find: () => Promise<LoyaltyCouponsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.QueryLoyaltyCoupon\n * @requiredField query\n */\nexport async function typedQueryLoyaltyCoupons(\n query: QueryV2\n): Promise<\n NonNullablePaths<\n QueryLoyaltyCouponResponse,\n | `loyaltyCoupons`\n | `loyaltyCoupons.${number}._id`\n | `loyaltyCoupons.${number}.accountId`\n | `loyaltyCoupons.${number}.memberIdDeprecated`\n | `loyaltyCoupons.${number}.couponReference.couponId`\n | `loyaltyCoupons.${number}.couponReference.code`\n | `loyaltyCoupons.${number}.couponReference.specification.moneyOffAmount`\n | `loyaltyCoupons.${number}.couponReference.specification.percentOffRate`\n | `loyaltyCoupons.${number}.couponReference.specification.freeShipping`\n | `loyaltyCoupons.${number}.couponReference.specification.fixedPriceAmount`\n | `loyaltyCoupons.${number}.couponReference.specification.type`\n | `loyaltyCoupons.${number}.status`\n | `loyaltyCoupons.${number}.rewardName`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n const reqOpts = ambassadorWixLoyaltyV1Coupon.queryLoyaltyCoupon(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\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 * @param _id - ID of the loyalty coupon to delete.\n * @param revision - Revision number, which increments by 1 each time the loyalty coupon is updated.\n *\n * To prevent conflicting changes, the current `revision` must be passed when updating the loyalty coupon.\n * @public\n * @requiredField _id\n * @requiredField revision\n * @permissionId LOYALTY.MANAGE_COUPONS\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.DeleteLoyaltyCoupon\n */\nexport async function deleteLoyaltyCoupon(\n _id: string,\n revision: string\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n id: _id,\n revision: revision,\n });\n\n const reqOpts = ambassadorWixLoyaltyV1Coupon.deleteLoyaltyCoupon(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]', revision: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'revision']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\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/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 migrationOptions: {\n optInTransformResponse: true,\n },\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/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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 {\n redeemPointsForCoupon as publicRedeemPointsForCoupon,\n redeemCurrentMemberPointsForCoupon as publicRedeemCurrentMemberPointsForCoupon,\n getLoyaltyCoupon as publicGetLoyaltyCoupon,\n bulkGetLoyaltyCoupon as publicBulkGetLoyaltyCoupon,\n getCurrentMemberCoupons as publicGetCurrentMemberCoupons,\n queryLoyaltyCoupons as publicQueryLoyaltyCoupons,\n typedQueryLoyaltyCoupons as publicTypedQueryLoyaltyCoupons,\n deleteLoyaltyCoupon as publicDeleteLoyaltyCoupon,\n} from './loyalty-v1-coupon-coupons.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n LoyaltyCouponsQueryBuilder,\n QueryV2,\n typedQueryLoyaltyCoupons as universalTypedQueryLoyaltyCoupons,\n} from './loyalty-v1-coupon-coupons.universal.js';\nimport { onCouponCreated as publicOnCouponCreated } from './loyalty-v1-coupon-coupons.public.js';\nimport { onCouponDeleted as publicOnCouponDeleted } from './loyalty-v1-coupon-coupons.public.js';\n\nfunction customQueryLoyaltyCoupons(httpClient: HttpClient) {\n const router = createQueryOverloadRouter({\n builderQueryFunction: () => publicQueryLoyaltyCoupons(httpClient)(),\n typedQueryFunction: (query: QueryV2) =>\n publicTypedQueryLoyaltyCoupons(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): LoyaltyCouponsQueryBuilder;\n function overloadedQuery(\n query: QueryV2\n ): ReturnType<typeof universalTypedQueryLoyaltyCoupons>;\n function overloadedQuery(query?: QueryV2): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const redeemPointsForCoupon: MaybeContext<\n BuildRESTFunction<typeof publicRedeemPointsForCoupon> &\n typeof publicRedeemPointsForCoupon\n> = /*#__PURE__*/ createRESTModule(publicRedeemPointsForCoupon);\nexport const redeemCurrentMemberPointsForCoupon: MaybeContext<\n BuildRESTFunction<typeof publicRedeemCurrentMemberPointsForCoupon> &\n typeof publicRedeemCurrentMemberPointsForCoupon\n> = /*#__PURE__*/ createRESTModule(publicRedeemCurrentMemberPointsForCoupon);\nexport const getLoyaltyCoupon: MaybeContext<\n BuildRESTFunction<typeof publicGetLoyaltyCoupon> &\n typeof publicGetLoyaltyCoupon\n> = /*#__PURE__*/ createRESTModule(publicGetLoyaltyCoupon);\nexport const bulkGetLoyaltyCoupon: MaybeContext<\n BuildRESTFunction<typeof publicBulkGetLoyaltyCoupon> &\n typeof publicBulkGetLoyaltyCoupon\n> = /*#__PURE__*/ createRESTModule(publicBulkGetLoyaltyCoupon);\nexport const getCurrentMemberCoupons: MaybeContext<\n BuildRESTFunction<typeof publicGetCurrentMemberCoupons> &\n typeof publicGetCurrentMemberCoupons\n> = /*#__PURE__*/ createRESTModule(publicGetCurrentMemberCoupons);\nexport const deleteLoyaltyCoupon: MaybeContext<\n BuildRESTFunction<typeof publicDeleteLoyaltyCoupon> &\n typeof publicDeleteLoyaltyCoupon\n> = /*#__PURE__*/ createRESTModule(publicDeleteLoyaltyCoupon);\nexport const queryLoyaltyCoupons: MaybeContext<\n BuildRESTFunction<typeof customQueryLoyaltyCoupons> &\n typeof customQueryLoyaltyCoupons\n> = /*#__PURE__*/ createRESTModule(customQueryLoyaltyCoupons);\n/**\n * Triggered when a loyalty coupon is created.\n */\nexport const onCouponCreated: BuildEventDefinition<\n typeof publicOnCouponCreated\n> &\n typeof publicOnCouponCreated = createEventModule(publicOnCouponCreated);\n/**\n * Triggered when a loyalty coupon is deleted.\n */\nexport const onCouponDeleted: BuildEventDefinition<\n typeof publicOnCouponDeleted\n> &\n typeof publicOnCouponDeleted = createEventModule(publicOnCouponDeleted);\n\nexport {\n Type,\n Status,\n SortOrder,\n WebhookIdentityType,\n} from './loyalty-v1-coupon-coupons.universal.js';\nexport {\n LoyaltyCoupon,\n CouponReference,\n Specification,\n SpecificationTypeDetailsOneOf,\n SpecificationScopeOrMinSubtotalOneOf,\n BuyXGetY,\n Scope,\n RedeemPointsForCouponRequest,\n RedeemPointsForCouponResponse,\n RedeemCurrentMemberPointsForCouponRequest,\n RedeemCurrentMemberPointsForCouponResponse,\n RedeemMemberPointsForDiscountAmountCouponRequest,\n RedeemMemberPointsForDiscountAmountCouponResponse,\n GetLoyaltyCouponRequest,\n GetLoyaltyCouponResponse,\n BulkGetLoyaltyCouponRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n BulkGetLoyaltyCouponResponse,\n CouponsInSite,\n GetCurrentMemberCouponsRequest,\n GetCurrentMemberCouponsResponse,\n QueryLoyaltyCouponRequest,\n QueryV2,\n QueryV2PagingMethodOneOf,\n Paging,\n QueryLoyaltyCouponResponse,\n PagingMetadataV2,\n Cursors,\n DeleteLoyaltyCouponRequest,\n DeleteLoyaltyCouponResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n CouponCreatedEnvelope,\n CouponDeletedEnvelope,\n RedeemPointsForCouponOptions,\n BulkGetLoyaltyCouponOptions,\n LoyaltyCouponsQueryResult,\n LoyaltyCouponsQueryBuilder,\n} from './loyalty-v1-coupon-coupons.universal.js';\nexport {\n TypeWithLiterals,\n StatusWithLiterals,\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './loyalty-v1-coupon-coupons.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAAAA;AAAA,EAAA,2BAAAC;AAAA,EAAA,+BAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,2BAAAC;AAAA,EAAA,0CAAAC;AAAA,EAAA,6BAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,gBAA6C;AAC7C,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACJ9D,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,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;AA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B,UAAU,EAAE;AAAA,IAClE,oBAAoB,CAAC,UACnBC,0BAA+B,UAAU,EAAE,KAAK;AAAA,IAClD,qBAAqB;AAAA,EACvB,CAAC;AAMD,WAAS,gBAAgB,OAAsB;AAC7C,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,yBAGK,2DAAiBA,sBAA2B;AACvD,IAAMC,sCAGK,2DAAiBA,mCAAwC;AACpE,IAAMC,oBAGK,2DAAiBA,iBAAsB;AAClD,IAAMC,wBAGK,2DAAiBA,qBAA0B;AACtD,IAAMC,2BAGK,2DAAiBA,wBAA6B;AACzD,IAAMC,uBAGK,2DAAiBA,oBAAyB;AACrD,IAAMP,uBAGK,2DAAiB,yBAAyB;AAIrD,IAAMQ,uBAGoB,mDAAkB,eAAqB;AAIjE,IAAMC,uBAGoB,mDAAkB,eAAqB;","names":["bulkGetLoyaltyCoupon","deleteLoyaltyCoupon","getCurrentMemberCoupons","getLoyaltyCoupon","onCouponCreated","onCouponDeleted","queryLoyaltyCoupons","redeemCurrentMemberPointsForCoupon","redeemPointsForCoupon","import_rename_all_nested_keys","import_float","import_timestamp","import_transform_paths","import_rest_modules","payload","import_transform_paths","Type","Status","SortOrder","WebhookIdentityType","redeemPointsForCoupon","sdkTransformError","redeemCurrentMemberPointsForCoupon","getLoyaltyCoupon","bulkGetLoyaltyCoupon","getCurrentMemberCoupons","deleteLoyaltyCoupon","redeemPointsForCoupon","redeemCurrentMemberPointsForCoupon","getLoyaltyCoupon","bulkGetLoyaltyCoupon","getCurrentMemberCoupons","queryLoyaltyCoupons","typedQueryLoyaltyCoupons","deleteLoyaltyCoupon","import_rest_modules","queryLoyaltyCoupons","typedQueryLoyaltyCoupons","redeemPointsForCoupon","redeemCurrentMemberPointsForCoupon","getLoyaltyCoupon","bulkGetLoyaltyCoupon","getCurrentMemberCoupons","deleteLoyaltyCoupon","onCouponCreated","onCouponDeleted"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/loyalty-v1-coupon-coupons.public.ts","../../src/loyalty-v1-coupon-coupons.universal.ts","../../src/loyalty-v1-coupon-coupons.http.ts","../../src/loyalty-v1-coupon-coupons.context.ts"],"sourcesContent":["export * from './src/loyalty-v1-coupon-coupons.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n BulkGetLoyaltyCouponOptions,\n BulkGetLoyaltyCouponResponse,\n CouponCreatedEnvelope,\n CouponDeletedEnvelope,\n GetCurrentMemberCouponsResponse,\n LoyaltyCoupon,\n LoyaltyCouponsQueryBuilder,\n QueryLoyaltyCouponOptions,\n QueryLoyaltyCouponResponse,\n QueryV2,\n RedeemCurrentMemberPointsForCouponResponse,\n RedeemPointsForCouponOptions,\n RedeemPointsForCouponResponse,\n bulkGetLoyaltyCoupon as universalBulkGetLoyaltyCoupon,\n deleteLoyaltyCoupon as universalDeleteLoyaltyCoupon,\n getCurrentMemberCoupons as universalGetCurrentMemberCoupons,\n getLoyaltyCoupon as universalGetLoyaltyCoupon,\n queryLoyaltyCoupons as universalQueryLoyaltyCoupons,\n redeemCurrentMemberPointsForCoupon as universalRedeemCurrentMemberPointsForCoupon,\n redeemPointsForCoupon as universalRedeemPointsForCoupon,\n typedQueryLoyaltyCoupons as universalTypedQueryLoyaltyCoupons,\n} from './loyalty-v1-coupon-coupons.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/loyalty' };\n\nexport function redeemPointsForCoupon(\n httpClient: HttpClient\n): RedeemPointsForCouponSignature {\n return (\n rewardId: string,\n options: NonNullablePaths<\n RedeemPointsForCouponOptions,\n `loyaltyAccountId`,\n 2\n >\n ) =>\n universalRedeemPointsForCoupon(\n rewardId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RedeemPointsForCouponSignature {\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/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 * @param - ID of the loyalty reward to redeem. See the Loyalty Rewards API for more information.\n */\n (\n rewardId: string,\n options: NonNullablePaths<\n RedeemPointsForCouponOptions,\n `loyaltyAccountId`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n RedeemPointsForCouponResponse,\n | `coupon._id`\n | `coupon.accountId`\n | `coupon.memberIdDeprecated`\n | `coupon.couponReference.couponId`\n | `coupon.couponReference.code`\n | `coupon.couponReference.specification.moneyOffAmount`\n | `coupon.couponReference.specification.percentOffRate`\n | `coupon.couponReference.specification.freeShipping`\n | `coupon.couponReference.specification.fixedPriceAmount`\n | `coupon.couponReference.specification.buyXGetY.x`\n | `coupon.couponReference.specification.buyXGetY.y`\n | `coupon.couponReference.specification.scope.namespace`\n | `coupon.couponReference.specification.type`\n | `coupon.status`\n | `coupon.rewardName`,\n 6\n >\n >;\n}\n\nexport function redeemCurrentMemberPointsForCoupon(\n httpClient: HttpClient\n): RedeemCurrentMemberPointsForCouponSignature {\n return (rewardId: string) =>\n universalRedeemCurrentMemberPointsForCoupon(\n rewardId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RedeemCurrentMemberPointsForCouponSignature {\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/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 * @param - ID of the loyalty reward to redeem. See the Loyalty Rewards API for more information.\n */\n (rewardId: string): Promise<\n NonNullablePaths<\n RedeemCurrentMemberPointsForCouponResponse,\n | `coupon._id`\n | `coupon.accountId`\n | `coupon.memberIdDeprecated`\n | `coupon.couponReference.couponId`\n | `coupon.couponReference.code`\n | `coupon.couponReference.specification.moneyOffAmount`\n | `coupon.couponReference.specification.percentOffRate`\n | `coupon.couponReference.specification.freeShipping`\n | `coupon.couponReference.specification.fixedPriceAmount`\n | `coupon.couponReference.specification.buyXGetY.x`\n | `coupon.couponReference.specification.buyXGetY.y`\n | `coupon.couponReference.specification.scope.namespace`\n | `coupon.couponReference.specification.type`\n | `coupon.status`\n | `coupon.rewardName`,\n 6\n >\n >;\n}\n\nexport function getLoyaltyCoupon(\n httpClient: HttpClient\n): GetLoyaltyCouponSignature {\n return (loyaltyCouponId: string) =>\n universalGetLoyaltyCoupon(\n loyaltyCouponId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetLoyaltyCouponSignature {\n /**\n * Retrieves a loyalty coupon.\n * @param - ID of the loyalty coupon to retrieve.\n * @returns Retrieved loyalty coupon.\n */\n (loyaltyCouponId: string): Promise<\n NonNullablePaths<\n LoyaltyCoupon,\n | `_id`\n | `accountId`\n | `memberIdDeprecated`\n | `couponReference.couponId`\n | `couponReference.code`\n | `couponReference.specification.moneyOffAmount`\n | `couponReference.specification.percentOffRate`\n | `couponReference.specification.freeShipping`\n | `couponReference.specification.fixedPriceAmount`\n | `couponReference.specification.buyXGetY.x`\n | `couponReference.specification.buyXGetY.y`\n | `couponReference.specification.scope.namespace`\n | `couponReference.specification.type`\n | `status`\n | `rewardName`,\n 5\n >\n >;\n}\n\nexport function bulkGetLoyaltyCoupon(\n httpClient: HttpClient\n): BulkGetLoyaltyCouponSignature {\n return (options?: BulkGetLoyaltyCouponOptions) =>\n universalBulkGetLoyaltyCoupon(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkGetLoyaltyCouponSignature {\n /**\n * Retrieves a sequence of loyalty coupons.\n */\n (options?: BulkGetLoyaltyCouponOptions): Promise<\n NonNullablePaths<\n BulkGetLoyaltyCouponResponse,\n `couponsInSite` | `couponsInSite.${number}.metaSiteId`,\n 4\n >\n >;\n}\n\nexport function getCurrentMemberCoupons(\n httpClient: HttpClient\n): GetCurrentMemberCouponsSignature {\n return () =>\n universalGetCurrentMemberCoupons(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetCurrentMemberCouponsSignature {\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 */\n (): Promise<\n NonNullablePaths<\n GetCurrentMemberCouponsResponse,\n | `loyaltyCoupons`\n | `loyaltyCoupons.${number}._id`\n | `loyaltyCoupons.${number}.accountId`\n | `loyaltyCoupons.${number}.memberIdDeprecated`\n | `loyaltyCoupons.${number}.couponReference.couponId`\n | `loyaltyCoupons.${number}.couponReference.code`\n | `loyaltyCoupons.${number}.couponReference.specification.moneyOffAmount`\n | `loyaltyCoupons.${number}.couponReference.specification.percentOffRate`\n | `loyaltyCoupons.${number}.couponReference.specification.freeShipping`\n | `loyaltyCoupons.${number}.couponReference.specification.fixedPriceAmount`\n | `loyaltyCoupons.${number}.couponReference.specification.type`\n | `loyaltyCoupons.${number}.status`\n | `loyaltyCoupons.${number}.rewardName`,\n 6\n >\n >;\n}\n\nexport function queryLoyaltyCoupons(\n httpClient: HttpClient\n): QueryLoyaltyCouponsSignature {\n return (options?: QueryLoyaltyCouponOptions) =>\n universalQueryLoyaltyCoupons(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryLoyaltyCouponsSignature {\n /**\n * Retrieves a list of loyalty coupons, with the specified paging, filtering, and sorting.\n */\n (options?: QueryLoyaltyCouponOptions): LoyaltyCouponsQueryBuilder;\n}\n\nexport function typedQueryLoyaltyCoupons(\n httpClient: HttpClient\n): TypedQueryLoyaltyCouponsSignature {\n return (query: QueryV2, options?: QueryLoyaltyCouponOptions) =>\n universalTypedQueryLoyaltyCoupons(\n query,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryLoyaltyCouponsSignature {\n /** */\n (query: QueryV2, options?: QueryLoyaltyCouponOptions): Promise<\n NonNullablePaths<\n QueryLoyaltyCouponResponse,\n | `loyaltyCoupons`\n | `loyaltyCoupons.${number}._id`\n | `loyaltyCoupons.${number}.accountId`\n | `loyaltyCoupons.${number}.memberIdDeprecated`\n | `loyaltyCoupons.${number}.couponReference.couponId`\n | `loyaltyCoupons.${number}.couponReference.code`\n | `loyaltyCoupons.${number}.couponReference.specification.moneyOffAmount`\n | `loyaltyCoupons.${number}.couponReference.specification.percentOffRate`\n | `loyaltyCoupons.${number}.couponReference.specification.freeShipping`\n | `loyaltyCoupons.${number}.couponReference.specification.fixedPriceAmount`\n | `loyaltyCoupons.${number}.couponReference.specification.type`\n | `loyaltyCoupons.${number}.status`\n | `loyaltyCoupons.${number}.rewardName`,\n 6\n >\n >;\n}\n\nexport function deleteLoyaltyCoupon(\n httpClient: HttpClient\n): DeleteLoyaltyCouponSignature {\n return (_id: string, revision: string) =>\n universalDeleteLoyaltyCoupon(\n _id,\n revision,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteLoyaltyCouponSignature {\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 * @param - ID of the loyalty coupon to delete.\n * @param - Revision number, which increments by 1 each time the loyalty coupon is updated.\n *\n * To prevent conflicting changes, the current `revision` must be passed when updating the loyalty coupon.\n */\n (_id: string, revision: string): Promise<void>;\n}\n\nexport const onCouponCreated = EventDefinition(\n 'wix.loyalty.v1.coupon_created',\n true,\n (event: CouponCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'entity.couponReference.specification.moneyOffAmount' },\n { path: 'entity.couponReference.specification.percentOffRate' },\n { path: 'entity.couponReference.specification.fixedPriceAmount' },\n { path: 'entity.couponReference.specification.minimumSubtotal' },\n ],\n },\n ])\n )\n)<CouponCreatedEnvelope>();\nexport const onCouponDeleted = EventDefinition(\n 'wix.loyalty.v1.coupon_deleted',\n true,\n (event: CouponDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'undefined.createdDate' },\n { path: 'undefined.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'undefined.couponReference.specification.moneyOffAmount' },\n { path: 'undefined.couponReference.specification.percentOffRate' },\n {\n path: 'undefined.couponReference.specification.fixedPriceAmount',\n },\n { path: 'undefined.couponReference.specification.minimumSubtotal' },\n ],\n },\n ])\n )\n)<CouponDeletedEnvelope>();\n\nexport {\n ActionEvent,\n BaseEventMetadata,\n BulkGetLoyaltyCouponOptions,\n BulkGetLoyaltyCouponRequest,\n BulkGetLoyaltyCouponResponse,\n BuyXGetY,\n CouponCreatedEnvelope,\n CouponDeletedEnvelope,\n CouponReference,\n CouponsInSite,\n CursorPaging,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeleteLoyaltyCouponRequest,\n DeleteLoyaltyCouponResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n GetCurrentMemberCouponsRequest,\n GetCurrentMemberCouponsResponse,\n GetLoyaltyCouponRequest,\n GetLoyaltyCouponResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n LoyaltyCoupon,\n LoyaltyCouponsQueryBuilder,\n LoyaltyCouponsQueryResult,\n MessageEnvelope,\n Paging,\n PagingMetadataV2,\n QueryLoyaltyCouponOptions,\n QueryLoyaltyCouponRequest,\n QueryLoyaltyCouponResponse,\n QueryV2,\n QueryV2PagingMethodOneOf,\n RedeemCurrentMemberPointsForCouponRequest,\n RedeemCurrentMemberPointsForCouponResponse,\n RedeemMemberPointsForDiscountAmountCouponRequest,\n RedeemMemberPointsForDiscountAmountCouponResponse,\n RedeemPointsForCouponOptions,\n RedeemPointsForCouponRequest,\n RedeemPointsForCouponResponse,\n RestoreInfo,\n Scope,\n SortOrder,\n Sorting,\n Specification,\n SpecificationScopeOrMinSubtotalOneOf,\n SpecificationTypeDetailsOneOf,\n Status,\n Type,\n WebhookIdentityType,\n} from './loyalty-v1-coupon-coupons.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixLoyaltyV1Coupon from './loyalty-v1-coupon-coupons.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * A loyalty coupon is created when a customer redeems their loyalty points for a reward. Creating a loyalty coupon\n * also creates a corresponding \"reference\" coupon with the Coupons API.\n */\nexport interface LoyaltyCoupon {\n /**\n * Loyalty coupon ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Loyalty [account ID](https://dev.wix.com/docs/rest/crm/loyalty-program/accounts/account-object) of the customer that redeemed points for a coupon.\n * @format GUID\n * @readonly\n */\n accountId?: string;\n /**\n * Member ID of the customer that redeemed points for a coupon. See the Members API for more information.\n * @format GUID\n * @readonly\n * @deprecated Member ID of the customer that redeemed points for a coupon. See the Members API for more information.\n * @replacedBy member_id\n * @targetRemovalDate 2024-06-01\n */\n memberIdDeprecated?: string;\n /**\n * Member ID of the customer that redeemed points for a coupon. See the Members API for more information.\n * @format GUID\n * @readonly\n */\n memberId?: string | null;\n /**\n * [Transaction ID](https://dev.wix.com/docs/rest/crm/loyalty-program/transactions/loyalty-transaction-object) for the transaction that created a coupon.\n * @format GUID\n * @readonly\n */\n transactionId?: string | null;\n /**\n * Reference coupon information for the corresponding [coupon](https://dev.wix.com/docs/rest/business-management/marketing/coupons/coupons/coupon-object)\n * that is created along with the loyalty coupon.\n * @readonly\n */\n couponReference?: CouponReference;\n /**\n * Loyalty coupon status.\n *\n * This status relates to the corresponding coupon that is created\n * at the same time as the loyalty coupon and is included in `couponReference`.\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * Name of reward that was redeemed to create this coupon.\n * @minLength 1\n * @maxLength 50\n * @readonly\n */\n rewardName?: string;\n /**\n * Revision number, which increments by 1 each time the loyalty coupon is updated.\n *\n * To prevent conflicting changes, the current `revision` must be passed when updating the loyalty coupon.\n * @immutable\n */\n revision?: string | null;\n /**\n * Date and time the loyalty coupon was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the loyalty coupon was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Whether the loyalty coupon was created in a \"refundable workflow\" i.e. checkout-exchange, and therefore can be deleted in the background. Refundable coupons should not be visible to customers in the UI.\n * @readonly\n */\n refundable?: boolean | null;\n}\n\nexport interface CouponReference {\n /**\n * Coupon ID.\n * @format GUID\n * @readonly\n */\n couponId?: string;\n /**\n * Coupon code.\n *\n * Unique code entered by a customer to apply the coupon.\n * @maxLength 20\n * @readonly\n */\n code?: string;\n /**\n * Name of coupon.\n * @maxLength 80\n * @readonly\n */\n name?: string | null;\n /**\n * The information to use when creating the coupon.\n * @readonly\n */\n specification?: Specification;\n /**\n * Whether the referenced coupon was deleted.\n * @readonly\n */\n deleted?: boolean | null;\n}\n\nexport interface Specification\n extends SpecificationTypeDetailsOneOf,\n SpecificationScopeOrMinSubtotalOneOf {\n /**\n * Fixed price discount.\n * @min 0.01\n */\n moneyOffAmount?: number;\n /** Discount as a percentage. */\n percentOffRate?: number;\n /** Free shipping. If true, the coupon applies to all items in all `namespaces` on a site. */\n freeShipping?: boolean;\n /** Specific sale price. Currently only supported for coupons with a `stores` `namespace`. */\n fixedPriceAmount?: number;\n /**\n * Free products when making a purchase. `buyXGetY` is an object that specifies `x` and `y` in the\n * following scenario: if a visitor purchases x number of products, they receive y number of products for free. C\n * urrently only supported for coupons with a `stores` `namespace`.\n */\n buyXGetY?: BuyXGetY;\n /**\n * Scope of the coupon. When no scope is defined, the coupon applies to all\n * items in all `namespaces` in the site.\n */\n scope?: Scope;\n /** The coupon is only applicable when the order subtotal is over this amount. */\n minimumSubtotal?: number | null;\n /** Name of coupon. */\n name?: string | null;\n type?: TypeWithLiterals;\n /**\n * Whether the coupon is limited to 1 discount per order. If true and a customer pays for multiple items\n * that the coupon applies to, only the lowest priced item is discounted.\n * Coupons with a `bookings` `namespace` are always limited to 1 item.\n */\n limitedToOneItem?: boolean | null;\n /** Whether the coupon also applies to subscriptions. */\n appliesToSubscriptions?: boolean | null;\n /**\n * Specifies the amount of cycles to apply the discount to for a subscription item.\n *\n * Can only be set when `appliesToSubscriptions` is `TRUE` and `specification.scope.namespace` is `pricingPlans`.\n * If `discountedCycleCount` is empty, the coupon applies to all available cycles.\n *\n * Min: `1`\n *\n * Max: `999`\n */\n discountedCycleCount?: number | null;\n}\n\n/** @oneof */\nexport interface SpecificationTypeDetailsOneOf {\n /**\n * Fixed price discount.\n * @min 0.01\n */\n moneyOffAmount?: number;\n /** Discount as a percentage. */\n percentOffRate?: number;\n /** Free shipping. If true, the coupon applies to all items in all `namespaces` on a site. */\n freeShipping?: boolean;\n /** Specific sale price. Currently only supported for coupons with a `stores` `namespace`. */\n fixedPriceAmount?: number;\n /**\n * Free products when making a purchase. `buyXGetY` is an object that specifies `x` and `y` in the\n * following scenario: if a visitor purchases x number of products, they receive y number of products for free. C\n * urrently only supported for coupons with a `stores` `namespace`.\n */\n buyXGetY?: BuyXGetY;\n}\n\n/** @oneof */\nexport interface SpecificationScopeOrMinSubtotalOneOf {\n /**\n * Scope of the coupon. When no scope is defined, the coupon applies to all\n * items in all `namespaces` in the site.\n */\n scope?: Scope;\n /** The coupon is only applicable when the order subtotal is over this amount. */\n minimumSubtotal?: number | null;\n}\n\nexport enum Type {\n UNKNOWN = 'UNKNOWN',\n MONEY_OFF_AMOUNT = 'MONEY_OFF_AMOUNT',\n PERCENT_OFF_RATE = 'PERCENT_OFF_RATE',\n FREE_SHIPPING = 'FREE_SHIPPING',\n FIXED_PRICE_AMOUNT = 'FIXED_PRICE_AMOUNT',\n BUY_X_GET_Y = 'BUY_X_GET_Y',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'UNKNOWN'\n | 'MONEY_OFF_AMOUNT'\n | 'PERCENT_OFF_RATE'\n | 'FREE_SHIPPING'\n | 'FIXED_PRICE_AMOUNT'\n | 'BUY_X_GET_Y';\n\nexport interface BuyXGetY {\n /** Number of purchased items required to receive free items. */\n x?: number;\n /** Number of items received for free if required number of items were purchased. */\n y?: number;\n}\n\nexport interface Scope {\n /**\n * Group within a `namespace` for which the coupon is applicable.\n *\n * If no group is specified, the coupon applies to all items in the namespace.\n * `group` is required in some namespaces. See [Scope Values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values)\n * for a list of currently supported groups for each namespace.\n */\n name?: string | null;\n /**\n * ID of the specific entity in the group for which the coupon is applicable.\n *\n * If no `entityId` is specified, the coupon applies to all entities in the group. In some cases when a group is specified,\n * an `entityId` is required. See [Scope Values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values)\n * for a list of currently supported entities for each namespace and group.\n */\n entityId?: string | null;\n /**\n * Wix application for which the coupon is applicable.\n *\n * One of the following:\n * + `\"stores\"`\n * + `\"bookings\"`\n * + `\"events\"`\n * + `\"pricingPlans\"`\n */\n namespace?: string;\n}\n\nexport enum Status {\n /** Unknown status. */\n UNKNOWN = 'UNKNOWN',\n /** The reference coupon was created but the loyalty points have not been redeemed yet. */\n PENDING = 'PENDING',\n /** The reference coupon is active and available to the customer. */\n ACTIVE = 'ACTIVE',\n /** The reference coupon was applied and is no longer available for use. */\n APPLIED = 'APPLIED',\n /** The reference coupon was created but something went wrong when redeeming points from the loyalty account. */\n FAILED = 'FAILED',\n /** The reference coupon was deleted. */\n ARCHIVED = 'ARCHIVED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN'\n | 'PENDING'\n | 'ACTIVE'\n | 'APPLIED'\n | 'FAILED'\n | 'ARCHIVED';\n\nexport interface RedeemPointsForCouponRequest {\n /**\n * ID of the loyalty reward to redeem. See the Loyalty Rewards API for more information.\n * @format GUID\n */\n rewardId: string;\n /**\n * ID of the loyalty account of the customer redeeming points. See the Loyalty Accounts API for more information.\n * @format GUID\n */\n loyaltyAccountId: string;\n}\n\nexport interface RedeemPointsForCouponResponse {\n /** Created loyalty coupon. */\n coupon?: LoyaltyCoupon;\n}\n\nexport interface RedeemCurrentMemberPointsForCouponRequest {\n /**\n * ID of the loyalty reward to redeem. See the Loyalty Rewards API for more information.\n * @format GUID\n */\n rewardId: string;\n}\n\nexport interface RedeemCurrentMemberPointsForCouponResponse {\n /** Created loyalty coupon. */\n coupon?: LoyaltyCoupon;\n}\n\nexport interface RedeemMemberPointsForDiscountAmountCouponRequest {\n /**\n * ID of the loyalty reward to redeem. See the Loyalty Rewards API for more information.\n * @format GUID\n */\n rewardId?: string;\n /**\n * Loyalty account ID. See the Loyalty Accounts API for more information.\n * @format GUID\n */\n loyaltyAccountId?: string;\n /** Number of points to redeem. */\n pointsToRedeem?: number;\n /** Coupon specification. */\n specification?: Specification;\n}\n\nexport interface RedeemMemberPointsForDiscountAmountCouponResponse {\n /** Created loyalty coupon. */\n coupon?: LoyaltyCoupon;\n /** Transaction ID of the coupon redemption. */\n transactionId?: string;\n}\n\nexport interface GetLoyaltyCouponRequest {\n /**\n * ID of the loyalty coupon to retrieve.\n * @format GUID\n */\n loyaltyCouponId: string;\n}\n\nexport interface GetLoyaltyCouponResponse {\n /** Retrieved loyalty coupon. */\n loyaltyCoupon?: LoyaltyCoupon;\n}\n\nexport interface BulkGetLoyaltyCouponRequest {\n /** Query to filter loyalty coupons. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface BulkGetLoyaltyCouponResponse {\n /**\n * Retrieved loyalty coupons.\n * @maxSize 100\n */\n couponsInSite?: CouponsInSite[];\n}\n\nexport interface CouponsInSite {\n /**\n * Metasite ID.\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Retrieved loyalty coupons.\n * @maxSize 100\n */\n loyaltyCoupons?: LoyaltyCoupon[];\n}\n\nexport interface GetCurrentMemberCouponsRequest {}\n\nexport interface GetCurrentMemberCouponsResponse {\n /** Retrieved loyalty coupons. */\n loyaltyCoupons?: LoyaltyCoupon[];\n}\n\nexport interface QueryLoyaltyCouponRequest {\n /** Query options. */\n query: QueryV2;\n /** temporary field to skip refundable field filtering, to be removed later once clients filter \"refundable\" field on their side */\n skipRefundableFieldFiltering?: boolean | null;\n}\n\nexport interface QueryV2 extends QueryV2PagingMethodOneOf {\n /** Paging options to limit and offset the number of items. */\n paging?: Paging;\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).\n */\n sort?: Sorting[];\n /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */\n fields?: string[];\n /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */\n fieldsets?: string[];\n}\n\n/** @oneof */\nexport interface QueryV2PagingMethodOneOf {\n /** Paging options to limit and offset the number of items. */\n paging?: Paging;\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface QueryLoyaltyCouponResponse {\n /** Retrieved loyalty coupons. */\n loyaltyCoupons?: LoyaltyCoupon[];\n /** Metadata. */\n metadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface DeleteLoyaltyCouponRequest {\n /**\n * ID of the loyalty coupon to delete.\n * @format GUID\n */\n _id: string;\n /**\n * Revision number, which increments by 1 each time the loyalty coupon is updated.\n *\n * To prevent conflicting changes, the current `revision` must be passed when updating the loyalty coupon.\n */\n revision?: string;\n}\n\nexport interface DeleteLoyaltyCouponResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface CouponCreatedEnvelope {\n entity: LoyaltyCoupon;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a loyalty coupon is created.\n * @permissionScope Read Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY\n * @permissionScope Manage Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId LOYALTY.READ_COUPONS\n * @webhook\n * @eventType wix.loyalty.v1.coupon_created\n * @serviceIdentifier com.wixpress.loyalty.coupon.LoyaltyCoupons\n * @slug created\n */\nexport declare function onCouponCreated(\n handler: (event: CouponCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface CouponDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a loyalty coupon is deleted.\n * @permissionScope Read Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY\n * @permissionScope Manage Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId LOYALTY.READ_COUPONS\n * @webhook\n * @eventType wix.loyalty.v1.coupon_deleted\n * @serviceIdentifier com.wixpress.loyalty.coupon.LoyaltyCoupons\n * @slug deleted\n */\nexport declare function onCouponDeleted(\n handler: (event: CouponDeletedEnvelope) => void | Promise<void>\n): void;\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/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 * @param rewardId - ID of the loyalty reward to redeem. See the Loyalty Rewards API for more information.\n * @public\n * @requiredField options\n * @requiredField options.loyaltyAccountId\n * @requiredField rewardId\n * @permissionId LOYALTY.REDEEM_COUPON\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.RedeemPointsForCoupon\n */\nexport async function redeemPointsForCoupon(\n rewardId: string,\n options: NonNullablePaths<RedeemPointsForCouponOptions, `loyaltyAccountId`, 2>\n): Promise<\n NonNullablePaths<\n RedeemPointsForCouponResponse,\n | `coupon._id`\n | `coupon.accountId`\n | `coupon.memberIdDeprecated`\n | `coupon.couponReference.couponId`\n | `coupon.couponReference.code`\n | `coupon.couponReference.specification.moneyOffAmount`\n | `coupon.couponReference.specification.percentOffRate`\n | `coupon.couponReference.specification.freeShipping`\n | `coupon.couponReference.specification.fixedPriceAmount`\n | `coupon.couponReference.specification.buyXGetY.x`\n | `coupon.couponReference.specification.buyXGetY.y`\n | `coupon.couponReference.specification.scope.namespace`\n | `coupon.couponReference.specification.type`\n | `coupon.status`\n | `coupon.rewardName`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n rewardId: rewardId,\n loyaltyAccountId: options?.loyaltyAccountId,\n });\n\n const reqOpts = ambassadorWixLoyaltyV1Coupon.redeemPointsForCoupon(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n rewardId: '$[0]',\n loyaltyAccountId: '$[1].loyaltyAccountId',\n },\n singleArgumentUnchanged: false,\n },\n ['rewardId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface RedeemPointsForCouponOptions {\n /**\n * ID of the loyalty account of the customer redeeming points. See the Loyalty Accounts API for more information.\n * @format GUID\n */\n loyaltyAccountId: string;\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/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 * @param rewardId - ID of the loyalty reward to redeem. See the Loyalty Rewards API for more information.\n * @public\n * @requiredField rewardId\n * @permissionId LOYALTY.REDEEM_OWN_COUPON\n * @applicableIdentity APP\n * @applicableIdentity MEMBER\n * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.RedeemCurrentMemberPointsForCoupon\n */\nexport async function redeemCurrentMemberPointsForCoupon(\n rewardId: string\n): Promise<\n NonNullablePaths<\n RedeemCurrentMemberPointsForCouponResponse,\n | `coupon._id`\n | `coupon.accountId`\n | `coupon.memberIdDeprecated`\n | `coupon.couponReference.couponId`\n | `coupon.couponReference.code`\n | `coupon.couponReference.specification.moneyOffAmount`\n | `coupon.couponReference.specification.percentOffRate`\n | `coupon.couponReference.specification.freeShipping`\n | `coupon.couponReference.specification.fixedPriceAmount`\n | `coupon.couponReference.specification.buyXGetY.x`\n | `coupon.couponReference.specification.buyXGetY.y`\n | `coupon.couponReference.specification.scope.namespace`\n | `coupon.couponReference.specification.type`\n | `coupon.status`\n | `coupon.rewardName`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ rewardId: rewardId });\n\n const reqOpts =\n ambassadorWixLoyaltyV1Coupon.redeemCurrentMemberPointsForCoupon(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { rewardId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['rewardId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a loyalty coupon.\n * @param loyaltyCouponId - ID of the loyalty coupon to retrieve.\n * @public\n * @requiredField loyaltyCouponId\n * @permissionId LOYALTY.READ_COUPONS\n * @applicableIdentity APP\n * @returns Retrieved loyalty coupon.\n * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.GetLoyaltyCoupon\n */\nexport async function getLoyaltyCoupon(\n loyaltyCouponId: string\n): Promise<\n NonNullablePaths<\n LoyaltyCoupon,\n | `_id`\n | `accountId`\n | `memberIdDeprecated`\n | `couponReference.couponId`\n | `couponReference.code`\n | `couponReference.specification.moneyOffAmount`\n | `couponReference.specification.percentOffRate`\n | `couponReference.specification.freeShipping`\n | `couponReference.specification.fixedPriceAmount`\n | `couponReference.specification.buyXGetY.x`\n | `couponReference.specification.buyXGetY.y`\n | `couponReference.specification.scope.namespace`\n | `couponReference.specification.type`\n | `status`\n | `rewardName`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n loyaltyCouponId: loyaltyCouponId,\n });\n\n const reqOpts = ambassadorWixLoyaltyV1Coupon.getLoyaltyCoupon(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.loyaltyCoupon!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { loyaltyCouponId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['loyaltyCouponId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a sequence of loyalty coupons.\n * @public\n * @permissionId LOYALTY.REWARD_BULK_READ\n * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.BulkGetLoyaltyCoupon\n */\nexport async function bulkGetLoyaltyCoupon(\n options?: BulkGetLoyaltyCouponOptions\n): Promise<\n NonNullablePaths<\n BulkGetLoyaltyCouponResponse,\n `couponsInSite` | `couponsInSite.${number}.metaSiteId`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n query: options?.query,\n });\n\n const reqOpts = ambassadorWixLoyaltyV1Coupon.bulkGetLoyaltyCoupon(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0].query' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkGetLoyaltyCouponOptions {\n /** Query to filter loyalty coupons. */\n query?: CursorQuery;\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 * @public\n * @permissionId LOYALTY.READ_OWN_COUPONS\n * @applicableIdentity APP\n * @applicableIdentity MEMBER\n * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.GetCurrentMemberCoupons\n */\nexport async function getCurrentMemberCoupons(): Promise<\n NonNullablePaths<\n GetCurrentMemberCouponsResponse,\n | `loyaltyCoupons`\n | `loyaltyCoupons.${number}._id`\n | `loyaltyCoupons.${number}.accountId`\n | `loyaltyCoupons.${number}.memberIdDeprecated`\n | `loyaltyCoupons.${number}.couponReference.couponId`\n | `loyaltyCoupons.${number}.couponReference.code`\n | `loyaltyCoupons.${number}.couponReference.specification.moneyOffAmount`\n | `loyaltyCoupons.${number}.couponReference.specification.percentOffRate`\n | `loyaltyCoupons.${number}.couponReference.specification.freeShipping`\n | `loyaltyCoupons.${number}.couponReference.specification.fixedPriceAmount`\n | `loyaltyCoupons.${number}.couponReference.specification.type`\n | `loyaltyCoupons.${number}.status`\n | `loyaltyCoupons.${number}.rewardName`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts = ambassadorWixLoyaltyV1Coupon.getCurrentMemberCoupons(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of loyalty coupons, with the specified paging, filtering, and sorting.\n * @public\n * @permissionId LOYALTY.READ_COUPONS\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.QueryLoyaltyCoupon\n */\nexport function queryLoyaltyCoupons(\n options?: QueryLoyaltyCouponOptions\n): LoyaltyCouponsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n LoyaltyCoupon,\n 'CURSOR',\n QueryLoyaltyCouponRequest,\n QueryLoyaltyCouponResponse\n >({\n func: async (payload: QueryLoyaltyCouponRequest) => {\n const reqOpts = ambassadorWixLoyaltyV1Coupon.queryLoyaltyCoupon({\n ...payload,\n ...(options ?? {}),\n });\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryLoyaltyCouponRequest['query']) => {\n const args = [query, options] as [\n QueryLoyaltyCouponRequest['query'],\n QueryLoyaltyCouponOptions\n ];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({\n data,\n }: HttpResponse<QueryLoyaltyCouponResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.loyaltyCoupons,\n pagingMetadata: transformedData?.metadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\nexport interface QueryLoyaltyCouponOptions {\n /** temporary field to skip refundable field filtering, to be removed later once clients filter \"refundable\" field on their side */\n skipRefundableFieldFiltering?: boolean | null | undefined;\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface LoyaltyCouponsQueryResult extends QueryCursorResult {\n items: LoyaltyCoupon[];\n query: LoyaltyCouponsQueryBuilder;\n next: () => Promise<LoyaltyCouponsQueryResult>;\n prev: () => Promise<LoyaltyCouponsQueryResult>;\n}\n\nexport interface LoyaltyCouponsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName:\n | 'accountId'\n | 'memberId'\n | 'transactionId'\n | 'couponReference'\n | 'status'\n | 'rewardName'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => LoyaltyCouponsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ne: (\n propertyName:\n | 'accountId'\n | 'memberId'\n | 'transactionId'\n | 'couponReference'\n | 'status'\n | 'rewardName'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => LoyaltyCouponsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ge: (\n propertyName:\n | 'accountId'\n | 'memberId'\n | 'transactionId'\n | 'rewardName'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => LoyaltyCouponsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (\n propertyName:\n | 'accountId'\n | 'memberId'\n | 'transactionId'\n | 'rewardName'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => LoyaltyCouponsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (\n propertyName:\n | 'accountId'\n | 'memberId'\n | 'transactionId'\n | 'rewardName'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => LoyaltyCouponsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (\n propertyName:\n | 'accountId'\n | 'memberId'\n | 'transactionId'\n | 'rewardName'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => LoyaltyCouponsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n */\n startsWith: (\n propertyName: 'accountId' | 'memberId' | 'transactionId' | 'rewardName',\n value: string\n ) => LoyaltyCouponsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n */\n hasSome: (\n propertyName:\n | 'accountId'\n | 'memberId'\n | 'transactionId'\n | 'couponReference'\n | 'status'\n | 'rewardName'\n | '_createdDate'\n | '_updatedDate',\n value: any[]\n ) => LoyaltyCouponsQueryBuilder;\n in: (\n propertyName:\n | 'accountId'\n | 'memberId'\n | 'transactionId'\n | 'couponReference'\n | 'status'\n | 'rewardName'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => LoyaltyCouponsQueryBuilder;\n exists: (\n propertyName:\n | 'accountId'\n | 'memberId'\n | 'transactionId'\n | 'couponReference'\n | 'status'\n | 'rewardName'\n | '_createdDate'\n | '_updatedDate',\n value: boolean\n ) => LoyaltyCouponsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n ascending: (\n ...propertyNames: Array<\n | 'accountId'\n | 'memberId'\n | 'transactionId'\n | 'couponReference'\n | 'status'\n | 'rewardName'\n | '_createdDate'\n | '_updatedDate'\n >\n ) => LoyaltyCouponsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n descending: (\n ...propertyNames: Array<\n | 'accountId'\n | 'memberId'\n | 'transactionId'\n | 'couponReference'\n | 'status'\n | 'rewardName'\n | '_createdDate'\n | '_updatedDate'\n >\n ) => LoyaltyCouponsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => LoyaltyCouponsQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => LoyaltyCouponsQueryBuilder;\n find: () => Promise<LoyaltyCouponsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.QueryLoyaltyCoupon\n * @requiredField query\n */\nexport async function typedQueryLoyaltyCoupons(\n query: QueryV2,\n options?: QueryLoyaltyCouponOptions\n): Promise<\n NonNullablePaths<\n QueryLoyaltyCouponResponse,\n | `loyaltyCoupons`\n | `loyaltyCoupons.${number}._id`\n | `loyaltyCoupons.${number}.accountId`\n | `loyaltyCoupons.${number}.memberIdDeprecated`\n | `loyaltyCoupons.${number}.couponReference.couponId`\n | `loyaltyCoupons.${number}.couponReference.code`\n | `loyaltyCoupons.${number}.couponReference.specification.moneyOffAmount`\n | `loyaltyCoupons.${number}.couponReference.specification.percentOffRate`\n | `loyaltyCoupons.${number}.couponReference.specification.freeShipping`\n | `loyaltyCoupons.${number}.couponReference.specification.fixedPriceAmount`\n | `loyaltyCoupons.${number}.couponReference.specification.type`\n | `loyaltyCoupons.${number}.status`\n | `loyaltyCoupons.${number}.rewardName`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n query: query,\n ...options,\n });\n\n const reqOpts = ambassadorWixLoyaltyV1Coupon.queryLoyaltyCoupon(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\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 * @param _id - ID of the loyalty coupon to delete.\n * @param revision - Revision number, which increments by 1 each time the loyalty coupon is updated.\n *\n * To prevent conflicting changes, the current `revision` must be passed when updating the loyalty coupon.\n * @public\n * @requiredField _id\n * @requiredField revision\n * @permissionId LOYALTY.MANAGE_COUPONS\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.DeleteLoyaltyCoupon\n */\nexport async function deleteLoyaltyCoupon(\n _id: string,\n revision: string\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n id: _id,\n revision: revision,\n });\n\n const reqOpts = ambassadorWixLoyaltyV1Coupon.deleteLoyaltyCoupon(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]', revision: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'revision']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\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/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 migrationOptions: {\n optInTransformResponse: true,\n },\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/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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 {\n redeemPointsForCoupon as publicRedeemPointsForCoupon,\n redeemCurrentMemberPointsForCoupon as publicRedeemCurrentMemberPointsForCoupon,\n getLoyaltyCoupon as publicGetLoyaltyCoupon,\n bulkGetLoyaltyCoupon as publicBulkGetLoyaltyCoupon,\n getCurrentMemberCoupons as publicGetCurrentMemberCoupons,\n queryLoyaltyCoupons as publicQueryLoyaltyCoupons,\n typedQueryLoyaltyCoupons as publicTypedQueryLoyaltyCoupons,\n deleteLoyaltyCoupon as publicDeleteLoyaltyCoupon,\n} from './loyalty-v1-coupon-coupons.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n LoyaltyCouponsQueryBuilder,\n QueryLoyaltyCouponOptions,\n QueryV2,\n typedQueryLoyaltyCoupons as universalTypedQueryLoyaltyCoupons,\n} from './loyalty-v1-coupon-coupons.universal.js';\nimport { onCouponCreated as publicOnCouponCreated } from './loyalty-v1-coupon-coupons.public.js';\nimport { onCouponDeleted as publicOnCouponDeleted } from './loyalty-v1-coupon-coupons.public.js';\n\nfunction customQueryLoyaltyCoupons(httpClient: HttpClient) {\n const router = createQueryOverloadRouter({\n builderQueryFunction: (options?: QueryLoyaltyCouponOptions) =>\n publicQueryLoyaltyCoupons(httpClient)(options),\n typedQueryFunction: (query: QueryV2, options?: QueryLoyaltyCouponOptions) =>\n publicTypedQueryLoyaltyCoupons(httpClient)(query, options),\n hasOptionsParameter: true,\n });\n\n function overloadedQuery(\n query: QueryV2,\n options?: QueryLoyaltyCouponOptions\n ): ReturnType<typeof universalTypedQueryLoyaltyCoupons>;\n function overloadedQuery(\n options?: QueryLoyaltyCouponOptions\n ): LoyaltyCouponsQueryBuilder;\n function overloadedQuery(\n queryOrOptions?: QueryV2 | QueryLoyaltyCouponOptions,\n options?: QueryLoyaltyCouponOptions\n ): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const redeemPointsForCoupon: MaybeContext<\n BuildRESTFunction<typeof publicRedeemPointsForCoupon> &\n typeof publicRedeemPointsForCoupon\n> = /*#__PURE__*/ createRESTModule(publicRedeemPointsForCoupon);\nexport const redeemCurrentMemberPointsForCoupon: MaybeContext<\n BuildRESTFunction<typeof publicRedeemCurrentMemberPointsForCoupon> &\n typeof publicRedeemCurrentMemberPointsForCoupon\n> = /*#__PURE__*/ createRESTModule(publicRedeemCurrentMemberPointsForCoupon);\nexport const getLoyaltyCoupon: MaybeContext<\n BuildRESTFunction<typeof publicGetLoyaltyCoupon> &\n typeof publicGetLoyaltyCoupon\n> = /*#__PURE__*/ createRESTModule(publicGetLoyaltyCoupon);\nexport const bulkGetLoyaltyCoupon: MaybeContext<\n BuildRESTFunction<typeof publicBulkGetLoyaltyCoupon> &\n typeof publicBulkGetLoyaltyCoupon\n> = /*#__PURE__*/ createRESTModule(publicBulkGetLoyaltyCoupon);\nexport const getCurrentMemberCoupons: MaybeContext<\n BuildRESTFunction<typeof publicGetCurrentMemberCoupons> &\n typeof publicGetCurrentMemberCoupons\n> = /*#__PURE__*/ createRESTModule(publicGetCurrentMemberCoupons);\nexport const deleteLoyaltyCoupon: MaybeContext<\n BuildRESTFunction<typeof publicDeleteLoyaltyCoupon> &\n typeof publicDeleteLoyaltyCoupon\n> = /*#__PURE__*/ createRESTModule(publicDeleteLoyaltyCoupon);\nexport const queryLoyaltyCoupons: MaybeContext<\n BuildRESTFunction<typeof customQueryLoyaltyCoupons> &\n typeof customQueryLoyaltyCoupons\n> = /*#__PURE__*/ createRESTModule(customQueryLoyaltyCoupons);\n/**\n * Triggered when a loyalty coupon is created.\n */\nexport const onCouponCreated: BuildEventDefinition<\n typeof publicOnCouponCreated\n> &\n typeof publicOnCouponCreated = createEventModule(publicOnCouponCreated);\n/**\n * Triggered when a loyalty coupon is deleted.\n */\nexport const onCouponDeleted: BuildEventDefinition<\n typeof publicOnCouponDeleted\n> &\n typeof publicOnCouponDeleted = createEventModule(publicOnCouponDeleted);\n\nexport {\n Type,\n Status,\n SortOrder,\n WebhookIdentityType,\n} from './loyalty-v1-coupon-coupons.universal.js';\nexport {\n LoyaltyCoupon,\n CouponReference,\n Specification,\n SpecificationTypeDetailsOneOf,\n SpecificationScopeOrMinSubtotalOneOf,\n BuyXGetY,\n Scope,\n RedeemPointsForCouponRequest,\n RedeemPointsForCouponResponse,\n RedeemCurrentMemberPointsForCouponRequest,\n RedeemCurrentMemberPointsForCouponResponse,\n RedeemMemberPointsForDiscountAmountCouponRequest,\n RedeemMemberPointsForDiscountAmountCouponResponse,\n GetLoyaltyCouponRequest,\n GetLoyaltyCouponResponse,\n BulkGetLoyaltyCouponRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n BulkGetLoyaltyCouponResponse,\n CouponsInSite,\n GetCurrentMemberCouponsRequest,\n GetCurrentMemberCouponsResponse,\n QueryLoyaltyCouponRequest,\n QueryV2,\n QueryV2PagingMethodOneOf,\n Paging,\n QueryLoyaltyCouponResponse,\n PagingMetadataV2,\n Cursors,\n DeleteLoyaltyCouponRequest,\n DeleteLoyaltyCouponResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n CouponCreatedEnvelope,\n CouponDeletedEnvelope,\n RedeemPointsForCouponOptions,\n BulkGetLoyaltyCouponOptions,\n QueryLoyaltyCouponOptions,\n LoyaltyCouponsQueryResult,\n LoyaltyCouponsQueryBuilder,\n} from './loyalty-v1-coupon-coupons.universal.js';\nexport {\n TypeWithLiterals,\n StatusWithLiterals,\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './loyalty-v1-coupon-coupons.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAAAA;AAAA,EAAA,2BAAAC;AAAA,EAAA,+BAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,2BAAAC;AAAA,EAAA,0CAAAC;AAAA,EAAA,6BAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,gBAA6C;AAC7C,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACJ9D,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,mBAA6C;AAC7C,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,iDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IAC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A,UAChC,EAAE,MAAM,wBAAwB;AAAA,UAChC,EAAE,MAAM,qBAAqB;AAAA,QAC/B;AAAA,MACF;AAAA,MACA;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,yDAAyD;AAAA,UACjE,EAAE,MAAM,yDAAyD;AAAA,UACjE;AAAA,YACE,MAAM;AAAA,UACR;AAAA,UACA,EAAE,MAAM,0DAA0D;AAAA,QACpE;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAyB;;;AG1WzB,IAAAC,uBAAiC;AACjC,sCAAkC;AAOlC,iCAA0C;AAU1C,SAAS,0BAA0B,YAAwB;AACzD,QAAM,aAAS,sDAA0B;AAAA,IACvC,sBAAsB,CAAC,YACrBC,qBAA0B,UAAU,EAAE,OAAO;AAAA,IAC/C,oBAAoB,CAAC,OAAgB,YACnCC,0BAA+B,UAAU,EAAE,OAAO,OAAO;AAAA,IAC3D,qBAAqB;AAAA,EACvB,CAAC;AASD,WAAS,gBACP,gBACA,SACK;AACL,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,yBAGK,2DAAiBA,sBAA2B;AACvD,IAAMC,sCAGK,2DAAiBA,mCAAwC;AACpE,IAAMC,oBAGK,2DAAiBA,iBAAsB;AAClD,IAAMC,wBAGK,2DAAiBA,qBAA0B;AACtD,IAAMC,2BAGK,2DAAiBA,wBAA6B;AACzD,IAAMC,uBAGK,2DAAiBA,oBAAyB;AACrD,IAAMP,uBAGK,2DAAiB,yBAAyB;AAIrD,IAAMQ,uBAGoB,mDAAkB,eAAqB;AAIjE,IAAMC,uBAGoB,mDAAkB,eAAqB;","names":["bulkGetLoyaltyCoupon","deleteLoyaltyCoupon","getCurrentMemberCoupons","getLoyaltyCoupon","onCouponCreated","onCouponDeleted","queryLoyaltyCoupons","redeemCurrentMemberPointsForCoupon","redeemPointsForCoupon","import_rename_all_nested_keys","import_float","import_timestamp","import_transform_paths","import_rest_modules","payload","import_transform_paths","Type","Status","SortOrder","WebhookIdentityType","redeemPointsForCoupon","sdkTransformError","redeemCurrentMemberPointsForCoupon","getLoyaltyCoupon","bulkGetLoyaltyCoupon","getCurrentMemberCoupons","deleteLoyaltyCoupon","redeemPointsForCoupon","redeemCurrentMemberPointsForCoupon","getLoyaltyCoupon","bulkGetLoyaltyCoupon","getCurrentMemberCoupons","queryLoyaltyCoupons","typedQueryLoyaltyCoupons","deleteLoyaltyCoupon","import_rest_modules","queryLoyaltyCoupons","typedQueryLoyaltyCoupons","redeemPointsForCoupon","redeemCurrentMemberPointsForCoupon","getLoyaltyCoupon","bulkGetLoyaltyCoupon","getCurrentMemberCoupons","deleteLoyaltyCoupon","onCouponCreated","onCouponDeleted"]}
|