@wix/auto_sdk_loyalty_coupons 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/loyalty-v1-coupon-coupons.context.d.ts +22 -0
- package/build/cjs/src/loyalty-v1-coupon-coupons.context.js +29 -0
- package/build/cjs/src/loyalty-v1-coupon-coupons.context.js.map +1 -0
- package/build/cjs/src/loyalty-v1-coupon-coupons.http.d.ts +43 -0
- package/build/cjs/src/loyalty-v1-coupon-coupons.http.js +389 -0
- package/build/cjs/src/loyalty-v1-coupon-coupons.http.js.map +1 -0
- package/build/cjs/src/loyalty-v1-coupon-coupons.meta.d.ts +23 -0
- package/build/cjs/src/loyalty-v1-coupon-coupons.meta.js +161 -0
- package/build/cjs/src/loyalty-v1-coupon-coupons.meta.js.map +1 -0
- package/build/cjs/src/loyalty-v1-coupon-coupons.public.d.ts +85 -0
- package/build/cjs/src/loyalty-v1-coupon-coupons.public.js +98 -0
- package/build/cjs/src/loyalty-v1-coupon-coupons.public.js.map +1 -0
- package/build/{meta.d.mts → cjs/src/loyalty-v1-coupon-coupons.types.d.ts} +201 -61
- package/build/cjs/src/loyalty-v1-coupon-coupons.types.js +41 -0
- package/build/cjs/src/loyalty-v1-coupon-coupons.types.js.map +1 -0
- package/build/{internal/loyalty-v1-coupon-coupons.universal-BpPn8h94.d.mts → cjs/src/loyalty-v1-coupon-coupons.universal.d.ts} +218 -58
- package/build/cjs/src/loyalty-v1-coupon-coupons.universal.js +370 -0
- package/build/cjs/src/loyalty-v1-coupon-coupons.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/src/loyalty-v1-coupon-coupons.context.d.ts +22 -0
- package/build/es/src/loyalty-v1-coupon-coupons.context.js +22 -0
- package/build/es/src/loyalty-v1-coupon-coupons.context.js.map +1 -0
- package/build/es/src/loyalty-v1-coupon-coupons.http.d.ts +43 -0
- package/build/es/src/loyalty-v1-coupon-coupons.http.js +379 -0
- package/build/es/src/loyalty-v1-coupon-coupons.http.js.map +1 -0
- package/build/es/src/loyalty-v1-coupon-coupons.meta.d.ts +23 -0
- package/build/es/src/loyalty-v1-coupon-coupons.meta.js +128 -0
- package/build/es/src/loyalty-v1-coupon-coupons.meta.js.map +1 -0
- package/build/es/src/loyalty-v1-coupon-coupons.public.d.ts +85 -0
- package/build/es/src/loyalty-v1-coupon-coupons.public.js +84 -0
- package/build/es/src/loyalty-v1-coupon-coupons.public.js.map +1 -0
- package/build/{internal/meta.d.mts → es/src/loyalty-v1-coupon-coupons.types.d.ts} +201 -61
- package/build/es/src/loyalty-v1-coupon-coupons.types.js +38 -0
- package/build/es/src/loyalty-v1-coupon-coupons.types.js.map +1 -0
- package/build/{loyalty-v1-coupon-coupons.universal-BpPn8h94.d.ts → es/src/loyalty-v1-coupon-coupons.universal.d.ts} +218 -58
- package/build/es/src/loyalty-v1-coupon-coupons.universal.js +337 -0
- package/build/es/src/loyalty-v1-coupon-coupons.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.context.d.ts +22 -0
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.context.js +29 -0
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.context.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.http.d.ts +43 -0
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.http.js +389 -0
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.http.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.meta.d.ts +23 -0
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.meta.js +161 -0
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.meta.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.public.d.ts +85 -0
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.public.js +98 -0
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.public.js.map +1 -0
- package/build/internal/{meta.d.ts → cjs/src/loyalty-v1-coupon-coupons.types.d.ts} +201 -61
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.types.js +41 -0
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.types.js.map +1 -0
- package/build/{loyalty-v1-coupon-coupons.universal-BpPn8h94.d.mts → internal/cjs/src/loyalty-v1-coupon-coupons.universal.d.ts} +218 -58
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.universal.js +370 -0
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-coupon-coupons.context.d.ts +22 -0
- package/build/internal/es/src/loyalty-v1-coupon-coupons.context.js +22 -0
- package/build/internal/es/src/loyalty-v1-coupon-coupons.context.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-coupon-coupons.http.d.ts +43 -0
- package/build/internal/es/src/loyalty-v1-coupon-coupons.http.js +379 -0
- package/build/internal/es/src/loyalty-v1-coupon-coupons.http.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-coupon-coupons.meta.d.ts +23 -0
- package/build/internal/es/src/loyalty-v1-coupon-coupons.meta.js +128 -0
- package/build/internal/es/src/loyalty-v1-coupon-coupons.meta.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-coupon-coupons.public.d.ts +85 -0
- package/build/internal/es/src/loyalty-v1-coupon-coupons.public.js +84 -0
- package/build/internal/es/src/loyalty-v1-coupon-coupons.public.js.map +1 -0
- package/build/{meta.d.ts → internal/es/src/loyalty-v1-coupon-coupons.types.d.ts} +201 -61
- package/build/internal/es/src/loyalty-v1-coupon-coupons.types.js +38 -0
- package/build/internal/es/src/loyalty-v1-coupon-coupons.types.js.map +1 -0
- package/build/internal/{loyalty-v1-coupon-coupons.universal-BpPn8h94.d.ts → es/src/loyalty-v1-coupon-coupons.universal.d.ts} +218 -58
- package/build/internal/es/src/loyalty-v1-coupon-coupons.universal.js +337 -0
- package/build/internal/es/src/loyalty-v1-coupon-coupons.universal.js.map +1 -0
- package/package.json +11 -12
- package/build/index.d.mts +0 -100
- package/build/index.d.ts +0 -100
- package/build/index.js +0 -753
- package/build/index.js.map +0 -1
- package/build/index.mjs +0 -717
- package/build/index.mjs.map +0 -1
- package/build/internal/index.d.mts +0 -100
- package/build/internal/index.d.ts +0 -100
- package/build/internal/index.js +0 -753
- package/build/internal/index.js.map +0 -1
- package/build/internal/index.mjs +0 -717
- package/build/internal/index.mjs.map +0 -1
- package/build/internal/meta.js +0 -515
- package/build/internal/meta.js.map +0 -1
- package/build/internal/meta.mjs +0 -482
- package/build/internal/meta.mjs.map +0 -1
- package/build/meta.js +0 -515
- package/build/meta.js.map +0 -1
- package/build/meta.mjs +0 -482
- package/build/meta.mjs.map +0 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebhookIdentityType = exports.SortOrder = exports.Status = exports.Type = void 0;
|
|
4
|
+
var Type;
|
|
5
|
+
(function (Type) {
|
|
6
|
+
Type["UNKNOWN"] = "UNKNOWN";
|
|
7
|
+
Type["MONEY_OFF_AMOUNT"] = "MONEY_OFF_AMOUNT";
|
|
8
|
+
Type["PERCENT_OFF_RATE"] = "PERCENT_OFF_RATE";
|
|
9
|
+
Type["FREE_SHIPPING"] = "FREE_SHIPPING";
|
|
10
|
+
Type["FIXED_PRICE_AMOUNT"] = "FIXED_PRICE_AMOUNT";
|
|
11
|
+
Type["BUY_X_GET_Y"] = "BUY_X_GET_Y";
|
|
12
|
+
})(Type || (exports.Type = Type = {}));
|
|
13
|
+
var Status;
|
|
14
|
+
(function (Status) {
|
|
15
|
+
/** Unknown status. */
|
|
16
|
+
Status["UNKNOWN"] = "UNKNOWN";
|
|
17
|
+
/** The reference coupon was created but the loyalty points have not been redeemed yet. */
|
|
18
|
+
Status["PENDING"] = "PENDING";
|
|
19
|
+
/** The reference coupon is active and available to the customer. */
|
|
20
|
+
Status["ACTIVE"] = "ACTIVE";
|
|
21
|
+
/** The reference coupon was applied and is no longer available for use. */
|
|
22
|
+
Status["APPLIED"] = "APPLIED";
|
|
23
|
+
/** The reference coupon was created but something went wrong when redeeming points from the loyalty account. */
|
|
24
|
+
Status["FAILED"] = "FAILED";
|
|
25
|
+
/** The reference coupon was deleted. */
|
|
26
|
+
Status["ARCHIVED"] = "ARCHIVED";
|
|
27
|
+
})(Status || (exports.Status = Status = {}));
|
|
28
|
+
var SortOrder;
|
|
29
|
+
(function (SortOrder) {
|
|
30
|
+
SortOrder["ASC"] = "ASC";
|
|
31
|
+
SortOrder["DESC"] = "DESC";
|
|
32
|
+
})(SortOrder || (exports.SortOrder = SortOrder = {}));
|
|
33
|
+
var WebhookIdentityType;
|
|
34
|
+
(function (WebhookIdentityType) {
|
|
35
|
+
WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
|
|
36
|
+
WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
37
|
+
WebhookIdentityType["MEMBER"] = "MEMBER";
|
|
38
|
+
WebhookIdentityType["WIX_USER"] = "WIX_USER";
|
|
39
|
+
WebhookIdentityType["APP"] = "APP";
|
|
40
|
+
})(WebhookIdentityType || (exports.WebhookIdentityType = WebhookIdentityType = {}));
|
|
41
|
+
//# sourceMappingURL=loyalty-v1-coupon-coupons.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loyalty-v1-coupon-coupons.types.js","sourceRoot":"","sources":["../../../../src/loyalty-v1-coupon-coupons.types.ts"],"names":[],"mappings":";;;AA4LA,IAAY,IAOX;AAPD,WAAY,IAAI;IACd,2BAAmB,CAAA;IACnB,6CAAqC,CAAA;IACrC,6CAAqC,CAAA;IACrC,uCAA+B,CAAA;IAC/B,iDAAyC,CAAA;IACzC,mCAA2B,CAAA;AAC7B,CAAC,EAPW,IAAI,oBAAJ,IAAI,QAOf;AAsCD,IAAY,MAaX;AAbD,WAAY,MAAM;IAChB,sBAAsB;IACtB,6BAAmB,CAAA;IACnB,0FAA0F;IAC1F,6BAAmB,CAAA;IACnB,oEAAoE;IACpE,2BAAiB,CAAA;IACjB,2EAA2E;IAC3E,6BAAmB,CAAA;IACnB,gHAAgH;IAChH,2BAAiB,CAAA;IACjB,wCAAwC;IACxC,+BAAqB,CAAA;AACvB,CAAC,EAbW,MAAM,sBAAN,MAAM,QAajB;AAqHD,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AA6RD,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,mCAAnB,mBAAmB,QAM9B"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
1
2
|
/**
|
|
2
3
|
* A loyalty coupon is created when a customer redeems their loyalty points for a reward. Creating a loyalty coupon
|
|
3
4
|
* also creates a corresponding "reference" coupon with the [Coupons API](https://dev.wix.com/api/rest/coupons/about-wix-coupons).
|
|
4
5
|
*/
|
|
5
|
-
interface LoyaltyCoupon {
|
|
6
|
+
export interface LoyaltyCoupon {
|
|
6
7
|
/**
|
|
7
8
|
* Loyalty coupon ID.
|
|
8
9
|
* @format GUID
|
|
@@ -75,7 +76,7 @@ interface LoyaltyCoupon {
|
|
|
75
76
|
*/
|
|
76
77
|
_updatedDate?: Date | null;
|
|
77
78
|
}
|
|
78
|
-
interface CouponReference {
|
|
79
|
+
export interface CouponReference {
|
|
79
80
|
/**
|
|
80
81
|
* Coupon ID.
|
|
81
82
|
* @format GUID
|
|
@@ -107,7 +108,7 @@ interface CouponReference {
|
|
|
107
108
|
*/
|
|
108
109
|
deleted?: boolean | null;
|
|
109
110
|
}
|
|
110
|
-
interface Specification extends SpecificationTypeDetailsOneOf, SpecificationScopeOrMinSubtotalOneOf {
|
|
111
|
+
export interface Specification extends SpecificationTypeDetailsOneOf, SpecificationScopeOrMinSubtotalOneOf {
|
|
111
112
|
/** Fixed price discount. */
|
|
112
113
|
moneyOffAmount?: number;
|
|
113
114
|
/** Discount as a percentage. */
|
|
@@ -153,7 +154,7 @@ interface Specification extends SpecificationTypeDetailsOneOf, SpecificationScop
|
|
|
153
154
|
discountedCycleCount?: number | null;
|
|
154
155
|
}
|
|
155
156
|
/** @oneof */
|
|
156
|
-
interface SpecificationTypeDetailsOneOf {
|
|
157
|
+
export interface SpecificationTypeDetailsOneOf {
|
|
157
158
|
/** Fixed price discount. */
|
|
158
159
|
moneyOffAmount?: number;
|
|
159
160
|
/** Discount as a percentage. */
|
|
@@ -170,7 +171,7 @@ interface SpecificationTypeDetailsOneOf {
|
|
|
170
171
|
buyXGetY?: BuyXGetY;
|
|
171
172
|
}
|
|
172
173
|
/** @oneof */
|
|
173
|
-
interface SpecificationScopeOrMinSubtotalOneOf {
|
|
174
|
+
export interface SpecificationScopeOrMinSubtotalOneOf {
|
|
174
175
|
/**
|
|
175
176
|
* Scope of the coupon. When no scope is defined, the coupon applies to all
|
|
176
177
|
* items in all `namespaces` in the site.
|
|
@@ -179,7 +180,7 @@ interface SpecificationScopeOrMinSubtotalOneOf {
|
|
|
179
180
|
/** The coupon is only applicable when the order subtotal is over this amount. */
|
|
180
181
|
minimumSubtotal?: number | null;
|
|
181
182
|
}
|
|
182
|
-
declare enum Type {
|
|
183
|
+
export declare enum Type {
|
|
183
184
|
UNKNOWN = "UNKNOWN",
|
|
184
185
|
MONEY_OFF_AMOUNT = "MONEY_OFF_AMOUNT",
|
|
185
186
|
PERCENT_OFF_RATE = "PERCENT_OFF_RATE",
|
|
@@ -187,13 +188,13 @@ declare enum Type {
|
|
|
187
188
|
FIXED_PRICE_AMOUNT = "FIXED_PRICE_AMOUNT",
|
|
188
189
|
BUY_X_GET_Y = "BUY_X_GET_Y"
|
|
189
190
|
}
|
|
190
|
-
interface BuyXGetY {
|
|
191
|
+
export interface BuyXGetY {
|
|
191
192
|
/** Number of purchased items required to receive free items. */
|
|
192
193
|
x?: number;
|
|
193
194
|
/** Number of items received for free if required number of items were purchased. */
|
|
194
195
|
y?: number;
|
|
195
196
|
}
|
|
196
|
-
interface Scope {
|
|
197
|
+
export interface Scope {
|
|
197
198
|
/**
|
|
198
199
|
* Group within a `namespace` for which the coupon is applicable.
|
|
199
200
|
*
|
|
@@ -221,7 +222,7 @@ interface Scope {
|
|
|
221
222
|
*/
|
|
222
223
|
namespace?: string;
|
|
223
224
|
}
|
|
224
|
-
declare enum Status {
|
|
225
|
+
export declare enum Status {
|
|
225
226
|
/** Unknown status. */
|
|
226
227
|
UNKNOWN = "UNKNOWN",
|
|
227
228
|
/** The reference coupon was created but the loyalty points have not been redeemed yet. */
|
|
@@ -235,7 +236,7 @@ declare enum Status {
|
|
|
235
236
|
/** The reference coupon was deleted. */
|
|
236
237
|
ARCHIVED = "ARCHIVED"
|
|
237
238
|
}
|
|
238
|
-
interface RedeemPointsForCouponRequest {
|
|
239
|
+
export interface RedeemPointsForCouponRequest {
|
|
239
240
|
/**
|
|
240
241
|
* ID of the [loyalty reward](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/reward-object) to redeem.
|
|
241
242
|
* @format GUID
|
|
@@ -247,22 +248,22 @@ interface RedeemPointsForCouponRequest {
|
|
|
247
248
|
*/
|
|
248
249
|
loyaltyAccountId: string;
|
|
249
250
|
}
|
|
250
|
-
interface RedeemPointsForCouponResponse {
|
|
251
|
+
export interface RedeemPointsForCouponResponse {
|
|
251
252
|
/** Created loyalty coupon. */
|
|
252
253
|
coupon?: LoyaltyCoupon;
|
|
253
254
|
}
|
|
254
|
-
interface RedeemCurrentMemberPointsForCouponRequest {
|
|
255
|
+
export interface RedeemCurrentMemberPointsForCouponRequest {
|
|
255
256
|
/**
|
|
256
257
|
* ID of the [loyalty reward](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/reward-object) to redeem.
|
|
257
258
|
* @format GUID
|
|
258
259
|
*/
|
|
259
260
|
rewardId: string;
|
|
260
261
|
}
|
|
261
|
-
interface RedeemCurrentMemberPointsForCouponResponse {
|
|
262
|
+
export interface RedeemCurrentMemberPointsForCouponResponse {
|
|
262
263
|
/** Created loyalty coupon. */
|
|
263
264
|
coupon?: LoyaltyCoupon;
|
|
264
265
|
}
|
|
265
|
-
interface RedeemMemberPointsForDiscountAmountCouponRequest {
|
|
266
|
+
export interface RedeemMemberPointsForDiscountAmountCouponRequest {
|
|
266
267
|
/**
|
|
267
268
|
* ID of the [loyalty reward](https://dev.wix.com/api/rest/wix-loyalty-program/rewards) to redeem.
|
|
268
269
|
* @format GUID
|
|
@@ -278,28 +279,28 @@ interface RedeemMemberPointsForDiscountAmountCouponRequest {
|
|
|
278
279
|
/** Coupon specification. */
|
|
279
280
|
specification?: Specification;
|
|
280
281
|
}
|
|
281
|
-
interface RedeemMemberPointsForDiscountAmountCouponResponse {
|
|
282
|
+
export interface RedeemMemberPointsForDiscountAmountCouponResponse {
|
|
282
283
|
/** Created loyalty coupon. */
|
|
283
284
|
coupon?: LoyaltyCoupon;
|
|
284
285
|
/** Transaction id of the coupon redemption */
|
|
285
286
|
transactionId?: string;
|
|
286
287
|
}
|
|
287
|
-
interface GetLoyaltyCouponRequest {
|
|
288
|
+
export interface GetLoyaltyCouponRequest {
|
|
288
289
|
/**
|
|
289
290
|
* ID of the loyalty coupon to retrieve.
|
|
290
291
|
* @format GUID
|
|
291
292
|
*/
|
|
292
293
|
loyaltyCouponId: string;
|
|
293
294
|
}
|
|
294
|
-
interface GetLoyaltyCouponResponse {
|
|
295
|
+
export interface GetLoyaltyCouponResponse {
|
|
295
296
|
/** Retrieved loyalty coupon. */
|
|
296
297
|
loyaltyCoupon?: LoyaltyCoupon;
|
|
297
298
|
}
|
|
298
|
-
interface BulkGetLoyaltyCouponRequest {
|
|
299
|
+
export interface BulkGetLoyaltyCouponRequest {
|
|
299
300
|
/** Query to filter loyalty coupons. */
|
|
300
301
|
query?: CursorQuery;
|
|
301
302
|
}
|
|
302
|
-
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
303
|
+
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
303
304
|
/**
|
|
304
305
|
* Cursor paging options.
|
|
305
306
|
*
|
|
@@ -321,7 +322,7 @@ interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
|
321
322
|
sort?: Sorting[];
|
|
322
323
|
}
|
|
323
324
|
/** @oneof */
|
|
324
|
-
interface CursorQueryPagingMethodOneOf {
|
|
325
|
+
export interface CursorQueryPagingMethodOneOf {
|
|
325
326
|
/**
|
|
326
327
|
* Cursor paging options.
|
|
327
328
|
*
|
|
@@ -329,7 +330,7 @@ interface CursorQueryPagingMethodOneOf {
|
|
|
329
330
|
*/
|
|
330
331
|
cursorPaging?: CursorPaging;
|
|
331
332
|
}
|
|
332
|
-
interface Sorting {
|
|
333
|
+
export interface Sorting {
|
|
333
334
|
/**
|
|
334
335
|
* Name of the field to sort by.
|
|
335
336
|
* @maxLength 512
|
|
@@ -338,11 +339,11 @@ interface Sorting {
|
|
|
338
339
|
/** Sort order. */
|
|
339
340
|
order?: SortOrder;
|
|
340
341
|
}
|
|
341
|
-
declare enum SortOrder {
|
|
342
|
+
export declare enum SortOrder {
|
|
342
343
|
ASC = "ASC",
|
|
343
344
|
DESC = "DESC"
|
|
344
345
|
}
|
|
345
|
-
interface CursorPaging {
|
|
346
|
+
export interface CursorPaging {
|
|
346
347
|
/**
|
|
347
348
|
* Maximum number of items to return in the results.
|
|
348
349
|
* @max 100
|
|
@@ -357,14 +358,14 @@ interface CursorPaging {
|
|
|
357
358
|
*/
|
|
358
359
|
cursor?: string | null;
|
|
359
360
|
}
|
|
360
|
-
interface BulkGetLoyaltyCouponResponse {
|
|
361
|
+
export interface BulkGetLoyaltyCouponResponse {
|
|
361
362
|
/**
|
|
362
363
|
* Retrieved loyalty coupons.
|
|
363
364
|
* @maxSize 100
|
|
364
365
|
*/
|
|
365
366
|
couponsInSite?: CouponsInSite[];
|
|
366
367
|
}
|
|
367
|
-
interface CouponsInSite {
|
|
368
|
+
export interface CouponsInSite {
|
|
368
369
|
/**
|
|
369
370
|
* Metasite id
|
|
370
371
|
* @format GUID
|
|
@@ -376,17 +377,17 @@ interface CouponsInSite {
|
|
|
376
377
|
*/
|
|
377
378
|
loyaltyCoupons?: LoyaltyCoupon[];
|
|
378
379
|
}
|
|
379
|
-
interface GetCurrentMemberCouponsRequest {
|
|
380
|
+
export interface GetCurrentMemberCouponsRequest {
|
|
380
381
|
}
|
|
381
|
-
interface GetCurrentMemberCouponsResponse {
|
|
382
|
+
export interface GetCurrentMemberCouponsResponse {
|
|
382
383
|
/** Retrieved loyalty coupons. */
|
|
383
384
|
loyaltyCoupons?: LoyaltyCoupon[];
|
|
384
385
|
}
|
|
385
|
-
interface QueryLoyaltyCouponRequest {
|
|
386
|
+
export interface QueryLoyaltyCouponRequest {
|
|
386
387
|
/** Query options. */
|
|
387
388
|
query: QueryV2;
|
|
388
389
|
}
|
|
389
|
-
interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
390
|
+
export interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
390
391
|
/** Paging options to limit and skip the number of items. */
|
|
391
392
|
paging?: Paging;
|
|
392
393
|
/** 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`. */
|
|
@@ -409,25 +410,25 @@ interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
|
409
410
|
fieldsets?: string[];
|
|
410
411
|
}
|
|
411
412
|
/** @oneof */
|
|
412
|
-
interface QueryV2PagingMethodOneOf {
|
|
413
|
+
export interface QueryV2PagingMethodOneOf {
|
|
413
414
|
/** Paging options to limit and skip the number of items. */
|
|
414
415
|
paging?: Paging;
|
|
415
416
|
/** 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`. */
|
|
416
417
|
cursorPaging?: CursorPaging;
|
|
417
418
|
}
|
|
418
|
-
interface Paging {
|
|
419
|
+
export interface Paging {
|
|
419
420
|
/** Number of items to load. */
|
|
420
421
|
limit?: number | null;
|
|
421
422
|
/** Number of items to skip in the current sort order. */
|
|
422
423
|
offset?: number | null;
|
|
423
424
|
}
|
|
424
|
-
interface QueryLoyaltyCouponResponse {
|
|
425
|
+
export interface QueryLoyaltyCouponResponse {
|
|
425
426
|
/** Retrieved loyalty coupons. */
|
|
426
427
|
loyaltyCoupons?: LoyaltyCoupon[];
|
|
427
428
|
/** Metadata. */
|
|
428
429
|
metadata?: PagingMetadataV2;
|
|
429
430
|
}
|
|
430
|
-
interface PagingMetadataV2 {
|
|
431
|
+
export interface PagingMetadataV2 {
|
|
431
432
|
/** Number of items returned in the response. */
|
|
432
433
|
count?: number | null;
|
|
433
434
|
/** Offset that was requested. */
|
|
@@ -439,7 +440,7 @@ interface PagingMetadataV2 {
|
|
|
439
440
|
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
440
441
|
cursors?: Cursors;
|
|
441
442
|
}
|
|
442
|
-
interface Cursors {
|
|
443
|
+
export interface Cursors {
|
|
443
444
|
/**
|
|
444
445
|
* Cursor string pointing to the next page in the list of results.
|
|
445
446
|
* @maxLength 16000
|
|
@@ -451,7 +452,7 @@ interface Cursors {
|
|
|
451
452
|
*/
|
|
452
453
|
prev?: string | null;
|
|
453
454
|
}
|
|
454
|
-
interface DeleteLoyaltyCouponRequest {
|
|
455
|
+
export interface DeleteLoyaltyCouponRequest {
|
|
455
456
|
/**
|
|
456
457
|
* ID of the loyalty coupon to delete.
|
|
457
458
|
* @format GUID
|
|
@@ -464,9 +465,9 @@ interface DeleteLoyaltyCouponRequest {
|
|
|
464
465
|
*/
|
|
465
466
|
revision?: string;
|
|
466
467
|
}
|
|
467
|
-
interface DeleteLoyaltyCouponResponse {
|
|
468
|
+
export interface DeleteLoyaltyCouponResponse {
|
|
468
469
|
}
|
|
469
|
-
interface DomainEvent extends DomainEventBodyOneOf {
|
|
470
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
470
471
|
createdEvent?: EntityCreatedEvent;
|
|
471
472
|
updatedEvent?: EntityUpdatedEvent;
|
|
472
473
|
deletedEvent?: EntityDeletedEvent;
|
|
@@ -509,19 +510,19 @@ interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
509
510
|
entityEventSequence?: string | null;
|
|
510
511
|
}
|
|
511
512
|
/** @oneof */
|
|
512
|
-
interface DomainEventBodyOneOf {
|
|
513
|
+
export interface DomainEventBodyOneOf {
|
|
513
514
|
createdEvent?: EntityCreatedEvent;
|
|
514
515
|
updatedEvent?: EntityUpdatedEvent;
|
|
515
516
|
deletedEvent?: EntityDeletedEvent;
|
|
516
517
|
actionEvent?: ActionEvent;
|
|
517
518
|
}
|
|
518
|
-
interface EntityCreatedEvent {
|
|
519
|
+
export interface EntityCreatedEvent {
|
|
519
520
|
entity?: string;
|
|
520
521
|
}
|
|
521
|
-
interface RestoreInfo {
|
|
522
|
+
export interface RestoreInfo {
|
|
522
523
|
deletedDate?: Date | null;
|
|
523
524
|
}
|
|
524
|
-
interface EntityUpdatedEvent {
|
|
525
|
+
export interface EntityUpdatedEvent {
|
|
525
526
|
/**
|
|
526
527
|
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
527
528
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
@@ -529,16 +530,16 @@ interface EntityUpdatedEvent {
|
|
|
529
530
|
*/
|
|
530
531
|
currentEntity?: string;
|
|
531
532
|
}
|
|
532
|
-
interface EntityDeletedEvent {
|
|
533
|
+
export interface EntityDeletedEvent {
|
|
533
534
|
/** Entity that was deleted */
|
|
534
535
|
deletedEntity?: string | null;
|
|
535
536
|
}
|
|
536
|
-
interface ActionEvent {
|
|
537
|
+
export interface ActionEvent {
|
|
537
538
|
body?: string;
|
|
538
539
|
}
|
|
539
|
-
interface Empty {
|
|
540
|
+
export interface Empty {
|
|
540
541
|
}
|
|
541
|
-
interface MessageEnvelope {
|
|
542
|
+
export interface MessageEnvelope {
|
|
542
543
|
/**
|
|
543
544
|
* App instance ID.
|
|
544
545
|
* @format GUID
|
|
@@ -554,7 +555,7 @@ interface MessageEnvelope {
|
|
|
554
555
|
/** Stringify payload. */
|
|
555
556
|
data?: string;
|
|
556
557
|
}
|
|
557
|
-
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
558
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
558
559
|
/**
|
|
559
560
|
* ID of a site visitor that has not logged in to the site.
|
|
560
561
|
* @format GUID
|
|
@@ -579,7 +580,7 @@ interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
579
580
|
identityType?: WebhookIdentityType;
|
|
580
581
|
}
|
|
581
582
|
/** @oneof */
|
|
582
|
-
interface IdentificationDataIdOneOf {
|
|
583
|
+
export interface IdentificationDataIdOneOf {
|
|
583
584
|
/**
|
|
584
585
|
* ID of a site visitor that has not logged in to the site.
|
|
585
586
|
* @format GUID
|
|
@@ -601,14 +602,14 @@ interface IdentificationDataIdOneOf {
|
|
|
601
602
|
*/
|
|
602
603
|
appId?: string;
|
|
603
604
|
}
|
|
604
|
-
declare enum WebhookIdentityType {
|
|
605
|
+
export declare enum WebhookIdentityType {
|
|
605
606
|
UNKNOWN = "UNKNOWN",
|
|
606
607
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
607
608
|
MEMBER = "MEMBER",
|
|
608
609
|
WIX_USER = "WIX_USER",
|
|
609
610
|
APP = "APP"
|
|
610
611
|
}
|
|
611
|
-
interface BaseEventMetadata {
|
|
612
|
+
export interface BaseEventMetadata {
|
|
612
613
|
/**
|
|
613
614
|
* App instance ID.
|
|
614
615
|
* @format GUID
|
|
@@ -622,7 +623,7 @@ interface BaseEventMetadata {
|
|
|
622
623
|
/** The identification type and identity data. */
|
|
623
624
|
identity?: IdentificationData;
|
|
624
625
|
}
|
|
625
|
-
interface EventMetadata extends BaseEventMetadata {
|
|
626
|
+
export interface EventMetadata extends BaseEventMetadata {
|
|
626
627
|
/**
|
|
627
628
|
* Unique event ID.
|
|
628
629
|
* Allows clients to ignore duplicate webhooks.
|
|
@@ -660,24 +661,164 @@ interface EventMetadata extends BaseEventMetadata {
|
|
|
660
661
|
*/
|
|
661
662
|
entityEventSequence?: string | null;
|
|
662
663
|
}
|
|
663
|
-
interface CouponCreatedEnvelope {
|
|
664
|
+
export interface CouponCreatedEnvelope {
|
|
664
665
|
entity: LoyaltyCoupon;
|
|
665
666
|
metadata: EventMetadata;
|
|
666
667
|
}
|
|
667
|
-
|
|
668
|
+
/**
|
|
669
|
+
* Triggered when a loyalty coupon is created.
|
|
670
|
+
* @permissionScope Read Loyalty
|
|
671
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
|
|
672
|
+
* @permissionScope Manage Loyalty
|
|
673
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
674
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
675
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
676
|
+
* @permissionId LOYALTY.READ_COUPONS
|
|
677
|
+
* @webhook
|
|
678
|
+
* @eventType wix.loyalty.v1.coupon_created
|
|
679
|
+
* @serviceIdentifier com.wixpress.loyalty.coupon.LoyaltyCoupons
|
|
680
|
+
* @slug created
|
|
681
|
+
*/
|
|
682
|
+
export declare function onCouponCreated(handler: (event: CouponCreatedEnvelope) => void | Promise<void>): void;
|
|
683
|
+
export interface CouponDeletedEnvelope {
|
|
668
684
|
metadata: EventMetadata;
|
|
669
685
|
}
|
|
670
|
-
|
|
686
|
+
/**
|
|
687
|
+
* Triggered when a loyalty coupon is deleted.
|
|
688
|
+
* @permissionScope Read Loyalty
|
|
689
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
|
|
690
|
+
* @permissionScope Manage Loyalty
|
|
691
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
692
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
693
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
694
|
+
* @permissionId LOYALTY.READ_COUPONS
|
|
695
|
+
* @webhook
|
|
696
|
+
* @eventType wix.loyalty.v1.coupon_deleted
|
|
697
|
+
* @serviceIdentifier com.wixpress.loyalty.coupon.LoyaltyCoupons
|
|
698
|
+
* @slug deleted
|
|
699
|
+
*/
|
|
700
|
+
export declare function onCouponDeleted(handler: (event: CouponDeletedEnvelope) => void | Promise<void>): void;
|
|
701
|
+
type CouponNonNullablePaths = `_id` | `accountId` | `memberIdDeprecated` | `couponReference.couponId` | `couponReference.code` | `couponReference.specification.moneyOffAmount` | `couponReference.specification.percentOffRate` | `couponReference.specification.freeShipping` | `couponReference.specification.fixedPriceAmount` | `couponReference.specification.buyXGetY.x` | `couponReference.specification.buyXGetY.y` | `couponReference.specification.scope.namespace` | `couponReference.specification.type` | `status` | `rewardName`;
|
|
702
|
+
/**
|
|
703
|
+
* Redeems a customer's loyalty points for a loyalty reward and creates a loyalty coupon.
|
|
704
|
+
*
|
|
705
|
+
* Creating a loyalty coupon also creates a corresponding "reference" coupon with the [Coupons API](https://dev.wix.com/api/rest/coupons/about-wix-coupons).
|
|
706
|
+
* The customer receives the reference coupon, which they can apply to their order. The loyalty coupon and its corresponding reference coupon
|
|
707
|
+
* are linked and the loyalty coupon's `status` reflects the current state of the reference coupon.
|
|
708
|
+
*
|
|
709
|
+
* Check which loyalty rewards a site has available with [List Rewards](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/list-rewards).
|
|
710
|
+
* @param rewardId - ID of the [loyalty reward](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/reward-object) to redeem.
|
|
711
|
+
* @public
|
|
712
|
+
* @requiredField options
|
|
713
|
+
* @requiredField options.loyaltyAccountId
|
|
714
|
+
* @requiredField rewardId
|
|
715
|
+
* @permissionId LOYALTY.REDEEM_COUPON
|
|
716
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
717
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
718
|
+
* @applicableIdentity APP
|
|
719
|
+
* @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.RedeemPointsForCoupon
|
|
720
|
+
*/
|
|
721
|
+
export declare function redeemPointsForCoupon(rewardId: string, options: NonNullablePaths<RedeemPointsForCouponOptions, `loyaltyAccountId`>): Promise<NonNullablePaths<RedeemPointsForCouponResponse, {
|
|
722
|
+
[P in CouponNonNullablePaths]: `coupon.${P}`;
|
|
723
|
+
}[CouponNonNullablePaths]>>;
|
|
724
|
+
export interface RedeemPointsForCouponOptions {
|
|
671
725
|
/**
|
|
672
726
|
* ID of the [loyalty account](https://dev.wix.com/docs/rest/crm/loyalty-program/accounts/account-object) of the customer redeeming points.
|
|
673
727
|
* @format GUID
|
|
674
728
|
*/
|
|
675
729
|
loyaltyAccountId: string;
|
|
676
730
|
}
|
|
677
|
-
|
|
731
|
+
/**
|
|
732
|
+
* Redeems a current customer's loyalty points for a loyalty reward and creates a loyalty coupon.
|
|
733
|
+
*
|
|
734
|
+
* Creating a loyalty coupon also creates a corresponding "reference" coupon with the [Coupons API](https://dev.wix.com/api/rest/coupons/about-wix-coupons).
|
|
735
|
+
* The customer receives the reference coupon, which they can apply to their order. The loyalty coupon and its corresponding reference coupon
|
|
736
|
+
* are linked and the loyalty coupon's `status` reflects the current state of the reference coupon.
|
|
737
|
+
*
|
|
738
|
+
* Check which loyalty rewards a site has available with [List Rewards](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/list-rewards).
|
|
739
|
+
*
|
|
740
|
+
* >**Note:**
|
|
741
|
+
* >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).
|
|
742
|
+
* @param rewardId - ID of the [loyalty reward](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/reward-object) to redeem.
|
|
743
|
+
* @public
|
|
744
|
+
* @requiredField rewardId
|
|
745
|
+
* @permissionId LOYALTY.REDEEM_OWN_COUPON
|
|
746
|
+
* @permissionScope Manage Loyalty
|
|
747
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
748
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
749
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
750
|
+
* @applicableIdentity APP
|
|
751
|
+
* @applicableIdentity MEMBER
|
|
752
|
+
* @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.RedeemCurrentMemberPointsForCoupon
|
|
753
|
+
*/
|
|
754
|
+
export declare function redeemCurrentMemberPointsForCoupon(rewardId: string): Promise<NonNullablePaths<RedeemCurrentMemberPointsForCouponResponse, {
|
|
755
|
+
[P in CouponNonNullablePaths]: `coupon.${P}`;
|
|
756
|
+
}[CouponNonNullablePaths]>>;
|
|
757
|
+
/**
|
|
758
|
+
* Retrieves a loyalty coupon.
|
|
759
|
+
* @param loyaltyCouponId - ID of the loyalty coupon to retrieve.
|
|
760
|
+
* @public
|
|
761
|
+
* @requiredField loyaltyCouponId
|
|
762
|
+
* @permissionId LOYALTY.READ_COUPONS
|
|
763
|
+
* @permissionScope Read Loyalty
|
|
764
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
|
|
765
|
+
* @permissionScope Manage Loyalty
|
|
766
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
767
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
768
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
769
|
+
* @applicableIdentity APP
|
|
770
|
+
* @returns Retrieved loyalty coupon.
|
|
771
|
+
* @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.GetLoyaltyCoupon
|
|
772
|
+
*/
|
|
773
|
+
export declare function getLoyaltyCoupon(loyaltyCouponId: string): Promise<NonNullablePaths<LoyaltyCoupon, CouponNonNullablePaths>>;
|
|
774
|
+
/**
|
|
775
|
+
* Retrieves a sequence of loyalty coupons
|
|
776
|
+
* @public
|
|
777
|
+
* @documentationMaturity preview
|
|
778
|
+
* @permissionId LOYALTY.REWARD_BULK_READ
|
|
779
|
+
* @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.BulkGetLoyaltyCoupon
|
|
780
|
+
*/
|
|
781
|
+
export declare function bulkGetLoyaltyCoupon(options?: BulkGetLoyaltyCouponOptions): Promise<NonNullablePaths<BulkGetLoyaltyCouponResponse, `couponsInSite` | `couponsInSite.${number}.metaSiteId` | {
|
|
782
|
+
[P in CouponNonNullablePaths]: `couponsInSite.${number}.loyaltyCoupons.${number}.${P}`;
|
|
783
|
+
}[CouponNonNullablePaths]>>;
|
|
784
|
+
export interface BulkGetLoyaltyCouponOptions {
|
|
678
785
|
/** Query to filter loyalty coupons. */
|
|
679
786
|
query?: CursorQuery;
|
|
680
787
|
}
|
|
788
|
+
/**
|
|
789
|
+
* Retrieves the loyalty coupons for the currently logged-in member.
|
|
790
|
+
*
|
|
791
|
+
* >**Note:**
|
|
792
|
+
* >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).
|
|
793
|
+
* @public
|
|
794
|
+
* @permissionId LOYALTY.READ_OWN_COUPONS
|
|
795
|
+
* @permissionScope Read Loyalty
|
|
796
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
|
|
797
|
+
* @permissionScope Manage Loyalty
|
|
798
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
799
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
800
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
801
|
+
* @applicableIdentity APP
|
|
802
|
+
* @applicableIdentity MEMBER
|
|
803
|
+
* @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.GetCurrentMemberCoupons
|
|
804
|
+
*/
|
|
805
|
+
export declare function getCurrentMemberCoupons(): Promise<NonNullablePaths<GetCurrentMemberCouponsResponse, {
|
|
806
|
+
[P in CouponNonNullablePaths]: `loyaltyCoupons.${number}.${P}`;
|
|
807
|
+
}[CouponNonNullablePaths]>>;
|
|
808
|
+
/**
|
|
809
|
+
* Retrieves a list of loyalty coupons, given the provided paging, filtering, and sorting.
|
|
810
|
+
* @public
|
|
811
|
+
* @permissionScope Read Loyalty
|
|
812
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
|
|
813
|
+
* @permissionScope Manage Loyalty
|
|
814
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
815
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
816
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
817
|
+
* @permissionId LOYALTY.READ_COUPONS
|
|
818
|
+
* @applicableIdentity APP
|
|
819
|
+
* @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.QueryLoyaltyCoupon
|
|
820
|
+
*/
|
|
821
|
+
export declare function queryLoyaltyCoupons(): LoyaltyCouponsQueryBuilder;
|
|
681
822
|
interface QueryCursorResult {
|
|
682
823
|
cursors: Cursors;
|
|
683
824
|
hasNext: () => boolean;
|
|
@@ -685,13 +826,13 @@ interface QueryCursorResult {
|
|
|
685
826
|
length: number;
|
|
686
827
|
pageSize: number;
|
|
687
828
|
}
|
|
688
|
-
interface LoyaltyCouponsQueryResult extends QueryCursorResult {
|
|
829
|
+
export interface LoyaltyCouponsQueryResult extends QueryCursorResult {
|
|
689
830
|
items: LoyaltyCoupon[];
|
|
690
831
|
query: LoyaltyCouponsQueryBuilder;
|
|
691
832
|
next: () => Promise<LoyaltyCouponsQueryResult>;
|
|
692
833
|
prev: () => Promise<LoyaltyCouponsQueryResult>;
|
|
693
834
|
}
|
|
694
|
-
interface LoyaltyCouponsQueryBuilder {
|
|
835
|
+
export interface LoyaltyCouponsQueryBuilder {
|
|
695
836
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
696
837
|
* @param value - Value to compare against.
|
|
697
838
|
*/
|
|
@@ -736,5 +877,24 @@ interface LoyaltyCouponsQueryBuilder {
|
|
|
736
877
|
skipTo: (cursor: string) => LoyaltyCouponsQueryBuilder;
|
|
737
878
|
find: () => Promise<LoyaltyCouponsQueryResult>;
|
|
738
879
|
}
|
|
739
|
-
|
|
740
|
-
|
|
880
|
+
/**
|
|
881
|
+
* Deletes a loyalty coupon.
|
|
882
|
+
*
|
|
883
|
+
* The deletion of a loyalty coupon does not impact the functionality of the corresponding coupon itself.
|
|
884
|
+
* @param _id - ID of the loyalty coupon to delete.
|
|
885
|
+
* @param revision - Revision number, which increments by 1 each time the loyalty coupon is updated.
|
|
886
|
+
*
|
|
887
|
+
* To prevent conflicting changes, the current `revision` must be passed when updating the loyalty coupon.
|
|
888
|
+
* @public
|
|
889
|
+
* @requiredField _id
|
|
890
|
+
* @requiredField revision
|
|
891
|
+
* @permissionId LOYALTY.MANAGE_COUPONS
|
|
892
|
+
* @permissionScope Manage Loyalty
|
|
893
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
894
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
895
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
896
|
+
* @applicableIdentity APP
|
|
897
|
+
* @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.DeleteLoyaltyCoupon
|
|
898
|
+
*/
|
|
899
|
+
export declare function deleteLoyaltyCoupon(_id: string, revision: string): Promise<void>;
|
|
900
|
+
export {};
|