@wix/auto_sdk_loyalty_coupons 1.0.4 → 1.0.6
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/index.d.mts +100 -0
- package/build/index.d.ts +100 -0
- package/build/index.js +753 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +717 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/index.d.mts +100 -0
- package/build/internal/index.d.ts +100 -0
- package/build/internal/index.js +753 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +717 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/internal/{cjs/src/loyalty-v1-coupon-coupons.universal.d.ts → loyalty-v1-coupon-coupons.universal-BpPn8h94.d.mts} +58 -243
- package/build/internal/{es/src/loyalty-v1-coupon-coupons.universal.d.ts → loyalty-v1-coupon-coupons.universal-BpPn8h94.d.ts} +58 -243
- package/build/internal/{cjs/src/loyalty-v1-coupon-coupons.types.d.ts → meta.d.mts} +60 -253
- package/build/{es/src/loyalty-v1-coupon-coupons.types.d.ts → internal/meta.d.ts} +60 -253
- package/build/internal/meta.js +515 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +482 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/{cjs/src/loyalty-v1-coupon-coupons.universal.d.ts → loyalty-v1-coupon-coupons.universal-BpPn8h94.d.mts} +58 -243
- package/build/{es/src/loyalty-v1-coupon-coupons.universal.d.ts → loyalty-v1-coupon-coupons.universal-BpPn8h94.d.ts} +58 -243
- package/build/{cjs/src/loyalty-v1-coupon-coupons.types.d.ts → meta.d.mts} +60 -253
- package/build/{internal/es/src/loyalty-v1-coupon-coupons.types.d.ts → meta.d.ts} +60 -253
- package/build/meta.js +515 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +482 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +13 -12
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/loyalty-v1-coupon-coupons.context.d.ts +0 -22
- package/build/cjs/src/loyalty-v1-coupon-coupons.context.js +0 -29
- package/build/cjs/src/loyalty-v1-coupon-coupons.context.js.map +0 -1
- package/build/cjs/src/loyalty-v1-coupon-coupons.http.d.ts +0 -43
- package/build/cjs/src/loyalty-v1-coupon-coupons.http.js +0 -389
- package/build/cjs/src/loyalty-v1-coupon-coupons.http.js.map +0 -1
- package/build/cjs/src/loyalty-v1-coupon-coupons.meta.d.ts +0 -23
- package/build/cjs/src/loyalty-v1-coupon-coupons.meta.js +0 -161
- package/build/cjs/src/loyalty-v1-coupon-coupons.meta.js.map +0 -1
- package/build/cjs/src/loyalty-v1-coupon-coupons.public.d.ts +0 -85
- package/build/cjs/src/loyalty-v1-coupon-coupons.public.js +0 -98
- package/build/cjs/src/loyalty-v1-coupon-coupons.public.js.map +0 -1
- package/build/cjs/src/loyalty-v1-coupon-coupons.types.js +0 -41
- package/build/cjs/src/loyalty-v1-coupon-coupons.types.js.map +0 -1
- package/build/cjs/src/loyalty-v1-coupon-coupons.universal.js +0 -357
- package/build/cjs/src/loyalty-v1-coupon-coupons.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/package.json +0 -3
- package/build/es/src/loyalty-v1-coupon-coupons.context.d.ts +0 -22
- package/build/es/src/loyalty-v1-coupon-coupons.context.js +0 -22
- package/build/es/src/loyalty-v1-coupon-coupons.context.js.map +0 -1
- package/build/es/src/loyalty-v1-coupon-coupons.http.d.ts +0 -43
- package/build/es/src/loyalty-v1-coupon-coupons.http.js +0 -379
- package/build/es/src/loyalty-v1-coupon-coupons.http.js.map +0 -1
- package/build/es/src/loyalty-v1-coupon-coupons.meta.d.ts +0 -23
- package/build/es/src/loyalty-v1-coupon-coupons.meta.js +0 -128
- package/build/es/src/loyalty-v1-coupon-coupons.meta.js.map +0 -1
- package/build/es/src/loyalty-v1-coupon-coupons.public.d.ts +0 -85
- package/build/es/src/loyalty-v1-coupon-coupons.public.js +0 -84
- package/build/es/src/loyalty-v1-coupon-coupons.public.js.map +0 -1
- package/build/es/src/loyalty-v1-coupon-coupons.types.js +0 -38
- package/build/es/src/loyalty-v1-coupon-coupons.types.js.map +0 -1
- package/build/es/src/loyalty-v1-coupon-coupons.universal.js +0 -324
- package/build/es/src/loyalty-v1-coupon-coupons.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.context.d.ts +0 -22
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.context.js +0 -29
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.context.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.http.d.ts +0 -43
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.http.js +0 -389
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.http.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.meta.d.ts +0 -23
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.meta.js +0 -161
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.meta.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.public.d.ts +0 -85
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.public.js +0 -98
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.public.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.types.js +0 -41
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.types.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.universal.js +0 -357
- package/build/internal/cjs/src/loyalty-v1-coupon-coupons.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-coupon-coupons.context.d.ts +0 -22
- package/build/internal/es/src/loyalty-v1-coupon-coupons.context.js +0 -22
- package/build/internal/es/src/loyalty-v1-coupon-coupons.context.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-coupon-coupons.http.d.ts +0 -43
- package/build/internal/es/src/loyalty-v1-coupon-coupons.http.js +0 -379
- package/build/internal/es/src/loyalty-v1-coupon-coupons.http.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-coupon-coupons.meta.d.ts +0 -23
- package/build/internal/es/src/loyalty-v1-coupon-coupons.meta.js +0 -128
- package/build/internal/es/src/loyalty-v1-coupon-coupons.meta.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-coupon-coupons.public.d.ts +0 -85
- package/build/internal/es/src/loyalty-v1-coupon-coupons.public.js +0 -84
- package/build/internal/es/src/loyalty-v1-coupon-coupons.public.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-coupon-coupons.types.js +0 -38
- package/build/internal/es/src/loyalty-v1-coupon-coupons.types.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-coupon-coupons.universal.js +0 -324
- package/build/internal/es/src/loyalty-v1-coupon-coupons.universal.js.map +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* A loyalty coupon is created when a customer redeems their loyalty points for a reward. Creating a loyalty coupon
|
|
3
3
|
* also creates a corresponding "reference" coupon with the [Coupons API](https://dev.wix.com/api/rest/coupons/about-wix-coupons).
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
interface LoyaltyCoupon {
|
|
6
6
|
/**
|
|
7
7
|
* Loyalty coupon ID.
|
|
8
8
|
* @format GUID
|
|
@@ -75,7 +75,7 @@ export interface LoyaltyCoupon {
|
|
|
75
75
|
*/
|
|
76
76
|
_updatedDate?: Date | null;
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
interface CouponReference {
|
|
79
79
|
/**
|
|
80
80
|
* Coupon ID.
|
|
81
81
|
* @format GUID
|
|
@@ -107,7 +107,7 @@ export interface CouponReference {
|
|
|
107
107
|
*/
|
|
108
108
|
deleted?: boolean | null;
|
|
109
109
|
}
|
|
110
|
-
|
|
110
|
+
interface Specification extends SpecificationTypeDetailsOneOf, SpecificationScopeOrMinSubtotalOneOf {
|
|
111
111
|
/** Fixed price discount. */
|
|
112
112
|
moneyOffAmount?: number;
|
|
113
113
|
/** Discount as a percentage. */
|
|
@@ -153,7 +153,7 @@ export interface Specification extends SpecificationTypeDetailsOneOf, Specificat
|
|
|
153
153
|
discountedCycleCount?: number | null;
|
|
154
154
|
}
|
|
155
155
|
/** @oneof */
|
|
156
|
-
|
|
156
|
+
interface SpecificationTypeDetailsOneOf {
|
|
157
157
|
/** Fixed price discount. */
|
|
158
158
|
moneyOffAmount?: number;
|
|
159
159
|
/** Discount as a percentage. */
|
|
@@ -170,7 +170,7 @@ export interface SpecificationTypeDetailsOneOf {
|
|
|
170
170
|
buyXGetY?: BuyXGetY;
|
|
171
171
|
}
|
|
172
172
|
/** @oneof */
|
|
173
|
-
|
|
173
|
+
interface SpecificationScopeOrMinSubtotalOneOf {
|
|
174
174
|
/**
|
|
175
175
|
* Scope of the coupon. When no scope is defined, the coupon applies to all
|
|
176
176
|
* items in all `namespaces` in the site.
|
|
@@ -179,7 +179,7 @@ export interface SpecificationScopeOrMinSubtotalOneOf {
|
|
|
179
179
|
/** The coupon is only applicable when the order subtotal is over this amount. */
|
|
180
180
|
minimumSubtotal?: number | null;
|
|
181
181
|
}
|
|
182
|
-
|
|
182
|
+
declare enum Type {
|
|
183
183
|
UNKNOWN = "UNKNOWN",
|
|
184
184
|
MONEY_OFF_AMOUNT = "MONEY_OFF_AMOUNT",
|
|
185
185
|
PERCENT_OFF_RATE = "PERCENT_OFF_RATE",
|
|
@@ -187,13 +187,13 @@ export declare enum Type {
|
|
|
187
187
|
FIXED_PRICE_AMOUNT = "FIXED_PRICE_AMOUNT",
|
|
188
188
|
BUY_X_GET_Y = "BUY_X_GET_Y"
|
|
189
189
|
}
|
|
190
|
-
|
|
190
|
+
interface BuyXGetY {
|
|
191
191
|
/** Number of purchased items required to receive free items. */
|
|
192
192
|
x?: number;
|
|
193
193
|
/** Number of items received for free if required number of items were purchased. */
|
|
194
194
|
y?: number;
|
|
195
195
|
}
|
|
196
|
-
|
|
196
|
+
interface Scope {
|
|
197
197
|
/**
|
|
198
198
|
* Group within a `namespace` for which the coupon is applicable.
|
|
199
199
|
*
|
|
@@ -221,7 +221,7 @@ export interface Scope {
|
|
|
221
221
|
*/
|
|
222
222
|
namespace?: string;
|
|
223
223
|
}
|
|
224
|
-
|
|
224
|
+
declare enum Status {
|
|
225
225
|
/** Unknown status. */
|
|
226
226
|
UNKNOWN = "UNKNOWN",
|
|
227
227
|
/** The reference coupon was created but the loyalty points have not been redeemed yet. */
|
|
@@ -235,7 +235,7 @@ export declare enum Status {
|
|
|
235
235
|
/** The reference coupon was deleted. */
|
|
236
236
|
ARCHIVED = "ARCHIVED"
|
|
237
237
|
}
|
|
238
|
-
|
|
238
|
+
interface RedeemPointsForCouponRequest {
|
|
239
239
|
/**
|
|
240
240
|
* ID of the [loyalty reward](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/reward-object) to redeem.
|
|
241
241
|
* @format GUID
|
|
@@ -247,22 +247,22 @@ export interface RedeemPointsForCouponRequest {
|
|
|
247
247
|
*/
|
|
248
248
|
loyaltyAccountId: string;
|
|
249
249
|
}
|
|
250
|
-
|
|
250
|
+
interface RedeemPointsForCouponResponse {
|
|
251
251
|
/** Created loyalty coupon. */
|
|
252
252
|
coupon?: LoyaltyCoupon;
|
|
253
253
|
}
|
|
254
|
-
|
|
254
|
+
interface RedeemCurrentMemberPointsForCouponRequest {
|
|
255
255
|
/**
|
|
256
256
|
* ID of the [loyalty reward](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/reward-object) to redeem.
|
|
257
257
|
* @format GUID
|
|
258
258
|
*/
|
|
259
259
|
rewardId: string;
|
|
260
260
|
}
|
|
261
|
-
|
|
261
|
+
interface RedeemCurrentMemberPointsForCouponResponse {
|
|
262
262
|
/** Created loyalty coupon. */
|
|
263
263
|
coupon?: LoyaltyCoupon;
|
|
264
264
|
}
|
|
265
|
-
|
|
265
|
+
interface RedeemMemberPointsForDiscountAmountCouponRequest {
|
|
266
266
|
/**
|
|
267
267
|
* ID of the [loyalty reward](https://dev.wix.com/api/rest/wix-loyalty-program/rewards) to redeem.
|
|
268
268
|
* @format GUID
|
|
@@ -278,28 +278,28 @@ export interface RedeemMemberPointsForDiscountAmountCouponRequest {
|
|
|
278
278
|
/** Coupon specification. */
|
|
279
279
|
specification?: Specification;
|
|
280
280
|
}
|
|
281
|
-
|
|
281
|
+
interface RedeemMemberPointsForDiscountAmountCouponResponse {
|
|
282
282
|
/** Created loyalty coupon. */
|
|
283
283
|
coupon?: LoyaltyCoupon;
|
|
284
284
|
/** Transaction id of the coupon redemption */
|
|
285
285
|
transactionId?: string;
|
|
286
286
|
}
|
|
287
|
-
|
|
287
|
+
interface GetLoyaltyCouponRequest {
|
|
288
288
|
/**
|
|
289
289
|
* ID of the loyalty coupon to retrieve.
|
|
290
290
|
* @format GUID
|
|
291
291
|
*/
|
|
292
292
|
loyaltyCouponId: string;
|
|
293
293
|
}
|
|
294
|
-
|
|
294
|
+
interface GetLoyaltyCouponResponse {
|
|
295
295
|
/** Retrieved loyalty coupon. */
|
|
296
296
|
loyaltyCoupon?: LoyaltyCoupon;
|
|
297
297
|
}
|
|
298
|
-
|
|
298
|
+
interface BulkGetLoyaltyCouponRequest {
|
|
299
299
|
/** Query to filter loyalty coupons. */
|
|
300
300
|
query?: CursorQuery;
|
|
301
301
|
}
|
|
302
|
-
|
|
302
|
+
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
303
303
|
/**
|
|
304
304
|
* Cursor paging options.
|
|
305
305
|
*
|
|
@@ -321,7 +321,7 @@ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
|
321
321
|
sort?: Sorting[];
|
|
322
322
|
}
|
|
323
323
|
/** @oneof */
|
|
324
|
-
|
|
324
|
+
interface CursorQueryPagingMethodOneOf {
|
|
325
325
|
/**
|
|
326
326
|
* Cursor paging options.
|
|
327
327
|
*
|
|
@@ -329,7 +329,7 @@ export interface CursorQueryPagingMethodOneOf {
|
|
|
329
329
|
*/
|
|
330
330
|
cursorPaging?: CursorPaging;
|
|
331
331
|
}
|
|
332
|
-
|
|
332
|
+
interface Sorting {
|
|
333
333
|
/**
|
|
334
334
|
* Name of the field to sort by.
|
|
335
335
|
* @maxLength 512
|
|
@@ -338,11 +338,11 @@ export interface Sorting {
|
|
|
338
338
|
/** Sort order. */
|
|
339
339
|
order?: SortOrder;
|
|
340
340
|
}
|
|
341
|
-
|
|
341
|
+
declare enum SortOrder {
|
|
342
342
|
ASC = "ASC",
|
|
343
343
|
DESC = "DESC"
|
|
344
344
|
}
|
|
345
|
-
|
|
345
|
+
interface CursorPaging {
|
|
346
346
|
/**
|
|
347
347
|
* Maximum number of items to return in the results.
|
|
348
348
|
* @max 100
|
|
@@ -357,14 +357,14 @@ export interface CursorPaging {
|
|
|
357
357
|
*/
|
|
358
358
|
cursor?: string | null;
|
|
359
359
|
}
|
|
360
|
-
|
|
360
|
+
interface BulkGetLoyaltyCouponResponse {
|
|
361
361
|
/**
|
|
362
362
|
* Retrieved loyalty coupons.
|
|
363
363
|
* @maxSize 100
|
|
364
364
|
*/
|
|
365
365
|
couponsInSite?: CouponsInSite[];
|
|
366
366
|
}
|
|
367
|
-
|
|
367
|
+
interface CouponsInSite {
|
|
368
368
|
/**
|
|
369
369
|
* Metasite id
|
|
370
370
|
* @format GUID
|
|
@@ -376,17 +376,17 @@ export interface CouponsInSite {
|
|
|
376
376
|
*/
|
|
377
377
|
loyaltyCoupons?: LoyaltyCoupon[];
|
|
378
378
|
}
|
|
379
|
-
|
|
379
|
+
interface GetCurrentMemberCouponsRequest {
|
|
380
380
|
}
|
|
381
|
-
|
|
381
|
+
interface GetCurrentMemberCouponsResponse {
|
|
382
382
|
/** Retrieved loyalty coupons. */
|
|
383
383
|
loyaltyCoupons?: LoyaltyCoupon[];
|
|
384
384
|
}
|
|
385
|
-
|
|
385
|
+
interface QueryLoyaltyCouponRequest {
|
|
386
386
|
/** Query options. */
|
|
387
387
|
query: QueryV2;
|
|
388
388
|
}
|
|
389
|
-
|
|
389
|
+
interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
390
390
|
/** Paging options to limit and skip the number of items. */
|
|
391
391
|
paging?: Paging;
|
|
392
392
|
/** 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 +409,25 @@ export interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
|
409
409
|
fieldsets?: string[];
|
|
410
410
|
}
|
|
411
411
|
/** @oneof */
|
|
412
|
-
|
|
412
|
+
interface QueryV2PagingMethodOneOf {
|
|
413
413
|
/** Paging options to limit and skip the number of items. */
|
|
414
414
|
paging?: Paging;
|
|
415
415
|
/** 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
416
|
cursorPaging?: CursorPaging;
|
|
417
417
|
}
|
|
418
|
-
|
|
418
|
+
interface Paging {
|
|
419
419
|
/** Number of items to load. */
|
|
420
420
|
limit?: number | null;
|
|
421
421
|
/** Number of items to skip in the current sort order. */
|
|
422
422
|
offset?: number | null;
|
|
423
423
|
}
|
|
424
|
-
|
|
424
|
+
interface QueryLoyaltyCouponResponse {
|
|
425
425
|
/** Retrieved loyalty coupons. */
|
|
426
426
|
loyaltyCoupons?: LoyaltyCoupon[];
|
|
427
427
|
/** Metadata. */
|
|
428
428
|
metadata?: PagingMetadataV2;
|
|
429
429
|
}
|
|
430
|
-
|
|
430
|
+
interface PagingMetadataV2 {
|
|
431
431
|
/** Number of items returned in the response. */
|
|
432
432
|
count?: number | null;
|
|
433
433
|
/** Offset that was requested. */
|
|
@@ -439,7 +439,7 @@ export interface PagingMetadataV2 {
|
|
|
439
439
|
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
440
440
|
cursors?: Cursors;
|
|
441
441
|
}
|
|
442
|
-
|
|
442
|
+
interface Cursors {
|
|
443
443
|
/**
|
|
444
444
|
* Cursor string pointing to the next page in the list of results.
|
|
445
445
|
* @maxLength 16000
|
|
@@ -451,7 +451,7 @@ export interface Cursors {
|
|
|
451
451
|
*/
|
|
452
452
|
prev?: string | null;
|
|
453
453
|
}
|
|
454
|
-
|
|
454
|
+
interface DeleteLoyaltyCouponRequest {
|
|
455
455
|
/**
|
|
456
456
|
* ID of the loyalty coupon to delete.
|
|
457
457
|
* @format GUID
|
|
@@ -464,9 +464,9 @@ export interface DeleteLoyaltyCouponRequest {
|
|
|
464
464
|
*/
|
|
465
465
|
revision?: string;
|
|
466
466
|
}
|
|
467
|
-
|
|
467
|
+
interface DeleteLoyaltyCouponResponse {
|
|
468
468
|
}
|
|
469
|
-
|
|
469
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
470
470
|
createdEvent?: EntityCreatedEvent;
|
|
471
471
|
updatedEvent?: EntityUpdatedEvent;
|
|
472
472
|
deletedEvent?: EntityDeletedEvent;
|
|
@@ -509,19 +509,19 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
509
509
|
entityEventSequence?: string | null;
|
|
510
510
|
}
|
|
511
511
|
/** @oneof */
|
|
512
|
-
|
|
512
|
+
interface DomainEventBodyOneOf {
|
|
513
513
|
createdEvent?: EntityCreatedEvent;
|
|
514
514
|
updatedEvent?: EntityUpdatedEvent;
|
|
515
515
|
deletedEvent?: EntityDeletedEvent;
|
|
516
516
|
actionEvent?: ActionEvent;
|
|
517
517
|
}
|
|
518
|
-
|
|
518
|
+
interface EntityCreatedEvent {
|
|
519
519
|
entity?: string;
|
|
520
520
|
}
|
|
521
|
-
|
|
521
|
+
interface RestoreInfo {
|
|
522
522
|
deletedDate?: Date | null;
|
|
523
523
|
}
|
|
524
|
-
|
|
524
|
+
interface EntityUpdatedEvent {
|
|
525
525
|
/**
|
|
526
526
|
* 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
527
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
@@ -529,16 +529,16 @@ export interface EntityUpdatedEvent {
|
|
|
529
529
|
*/
|
|
530
530
|
currentEntity?: string;
|
|
531
531
|
}
|
|
532
|
-
|
|
532
|
+
interface EntityDeletedEvent {
|
|
533
533
|
/** Entity that was deleted */
|
|
534
534
|
deletedEntity?: string | null;
|
|
535
535
|
}
|
|
536
|
-
|
|
536
|
+
interface ActionEvent {
|
|
537
537
|
body?: string;
|
|
538
538
|
}
|
|
539
|
-
|
|
539
|
+
interface Empty {
|
|
540
540
|
}
|
|
541
|
-
|
|
541
|
+
interface MessageEnvelope {
|
|
542
542
|
/**
|
|
543
543
|
* App instance ID.
|
|
544
544
|
* @format GUID
|
|
@@ -554,7 +554,7 @@ export interface MessageEnvelope {
|
|
|
554
554
|
/** Stringify payload. */
|
|
555
555
|
data?: string;
|
|
556
556
|
}
|
|
557
|
-
|
|
557
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
558
558
|
/**
|
|
559
559
|
* ID of a site visitor that has not logged in to the site.
|
|
560
560
|
* @format GUID
|
|
@@ -579,7 +579,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
579
579
|
identityType?: WebhookIdentityType;
|
|
580
580
|
}
|
|
581
581
|
/** @oneof */
|
|
582
|
-
|
|
582
|
+
interface IdentificationDataIdOneOf {
|
|
583
583
|
/**
|
|
584
584
|
* ID of a site visitor that has not logged in to the site.
|
|
585
585
|
* @format GUID
|
|
@@ -601,66 +601,14 @@ export interface IdentificationDataIdOneOf {
|
|
|
601
601
|
*/
|
|
602
602
|
appId?: string;
|
|
603
603
|
}
|
|
604
|
-
|
|
604
|
+
declare enum WebhookIdentityType {
|
|
605
605
|
UNKNOWN = "UNKNOWN",
|
|
606
606
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
607
607
|
MEMBER = "MEMBER",
|
|
608
608
|
WIX_USER = "WIX_USER",
|
|
609
609
|
APP = "APP"
|
|
610
610
|
}
|
|
611
|
-
interface
|
|
612
|
-
x: number;
|
|
613
|
-
y: number;
|
|
614
|
-
}
|
|
615
|
-
interface ScopeNonNullableFields {
|
|
616
|
-
namespace: string;
|
|
617
|
-
}
|
|
618
|
-
interface SpecificationNonNullableFields {
|
|
619
|
-
moneyOffAmount: number;
|
|
620
|
-
percentOffRate: number;
|
|
621
|
-
freeShipping: boolean;
|
|
622
|
-
fixedPriceAmount: number;
|
|
623
|
-
buyXGetY?: BuyXGetYNonNullableFields;
|
|
624
|
-
scope?: ScopeNonNullableFields;
|
|
625
|
-
type: Type;
|
|
626
|
-
}
|
|
627
|
-
interface CouponReferenceNonNullableFields {
|
|
628
|
-
couponId: string;
|
|
629
|
-
code: string;
|
|
630
|
-
specification?: SpecificationNonNullableFields;
|
|
631
|
-
}
|
|
632
|
-
export interface LoyaltyCouponNonNullableFields {
|
|
633
|
-
_id: string;
|
|
634
|
-
accountId: string;
|
|
635
|
-
memberIdDeprecated: string;
|
|
636
|
-
couponReference?: CouponReferenceNonNullableFields;
|
|
637
|
-
status: Status;
|
|
638
|
-
rewardName: string;
|
|
639
|
-
}
|
|
640
|
-
export interface RedeemPointsForCouponResponseNonNullableFields {
|
|
641
|
-
coupon?: LoyaltyCouponNonNullableFields;
|
|
642
|
-
}
|
|
643
|
-
export interface RedeemCurrentMemberPointsForCouponResponseNonNullableFields {
|
|
644
|
-
coupon?: LoyaltyCouponNonNullableFields;
|
|
645
|
-
transactionId: string;
|
|
646
|
-
}
|
|
647
|
-
export interface GetLoyaltyCouponResponseNonNullableFields {
|
|
648
|
-
loyaltyCoupon?: LoyaltyCouponNonNullableFields;
|
|
649
|
-
}
|
|
650
|
-
interface CouponsInSiteNonNullableFields {
|
|
651
|
-
metaSiteId: string;
|
|
652
|
-
loyaltyCoupons: LoyaltyCouponNonNullableFields[];
|
|
653
|
-
}
|
|
654
|
-
export interface BulkGetLoyaltyCouponResponseNonNullableFields {
|
|
655
|
-
couponsInSite: CouponsInSiteNonNullableFields[];
|
|
656
|
-
}
|
|
657
|
-
export interface GetCurrentMemberCouponsResponseNonNullableFields {
|
|
658
|
-
loyaltyCoupons: LoyaltyCouponNonNullableFields[];
|
|
659
|
-
}
|
|
660
|
-
export interface QueryLoyaltyCouponResponseNonNullableFields {
|
|
661
|
-
loyaltyCoupons: LoyaltyCouponNonNullableFields[];
|
|
662
|
-
}
|
|
663
|
-
export interface BaseEventMetadata {
|
|
611
|
+
interface BaseEventMetadata {
|
|
664
612
|
/**
|
|
665
613
|
* App instance ID.
|
|
666
614
|
* @format GUID
|
|
@@ -674,7 +622,7 @@ export interface BaseEventMetadata {
|
|
|
674
622
|
/** The identification type and identity data. */
|
|
675
623
|
identity?: IdentificationData;
|
|
676
624
|
}
|
|
677
|
-
|
|
625
|
+
interface EventMetadata extends BaseEventMetadata {
|
|
678
626
|
/**
|
|
679
627
|
* Unique event ID.
|
|
680
628
|
* Allows clients to ignore duplicate webhooks.
|
|
@@ -712,140 +660,24 @@ export interface EventMetadata extends BaseEventMetadata {
|
|
|
712
660
|
*/
|
|
713
661
|
entityEventSequence?: string | null;
|
|
714
662
|
}
|
|
715
|
-
|
|
663
|
+
interface CouponCreatedEnvelope {
|
|
716
664
|
entity: LoyaltyCoupon;
|
|
717
665
|
metadata: EventMetadata;
|
|
718
666
|
}
|
|
719
|
-
|
|
720
|
-
* Triggered when a loyalty coupon is created.
|
|
721
|
-
* @permissionScope Read Loyalty
|
|
722
|
-
* @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
|
|
723
|
-
* @permissionScope Manage Loyalty
|
|
724
|
-
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
725
|
-
* @permissionId LOYALTY.READ_COUPONS
|
|
726
|
-
* @webhook
|
|
727
|
-
* @eventType wix.loyalty.v1.coupon_created
|
|
728
|
-
* @serviceIdentifier com.wixpress.loyalty.coupon.LoyaltyCoupons
|
|
729
|
-
* @slug created
|
|
730
|
-
*/
|
|
731
|
-
export declare function onCouponCreated(handler: (event: CouponCreatedEnvelope) => void | Promise<void>): void;
|
|
732
|
-
export interface CouponDeletedEnvelope {
|
|
667
|
+
interface CouponDeletedEnvelope {
|
|
733
668
|
metadata: EventMetadata;
|
|
734
669
|
}
|
|
735
|
-
|
|
736
|
-
* Triggered when a loyalty coupon is deleted.
|
|
737
|
-
* @permissionScope Read Loyalty
|
|
738
|
-
* @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
|
|
739
|
-
* @permissionScope Manage Loyalty
|
|
740
|
-
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
741
|
-
* @permissionId LOYALTY.READ_COUPONS
|
|
742
|
-
* @webhook
|
|
743
|
-
* @eventType wix.loyalty.v1.coupon_deleted
|
|
744
|
-
* @serviceIdentifier com.wixpress.loyalty.coupon.LoyaltyCoupons
|
|
745
|
-
* @slug deleted
|
|
746
|
-
*/
|
|
747
|
-
export declare function onCouponDeleted(handler: (event: CouponDeletedEnvelope) => void | Promise<void>): void;
|
|
748
|
-
/**
|
|
749
|
-
* Redeems a customer's loyalty points for a loyalty reward and creates a loyalty coupon.
|
|
750
|
-
*
|
|
751
|
-
* Creating a loyalty coupon also creates a corresponding "reference" coupon with the [Coupons API](https://dev.wix.com/api/rest/coupons/about-wix-coupons).
|
|
752
|
-
* The customer receives the reference coupon, which they can apply to their order. The loyalty coupon and its corresponding reference coupon
|
|
753
|
-
* are linked and the loyalty coupon's `status` reflects the current state of the reference coupon.
|
|
754
|
-
*
|
|
755
|
-
* Check which loyalty rewards a site has available with [List Rewards](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/list-rewards).
|
|
756
|
-
* @param rewardId - ID of the [loyalty reward](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/reward-object) to redeem.
|
|
757
|
-
* @public
|
|
758
|
-
* @requiredField options
|
|
759
|
-
* @requiredField options.loyaltyAccountId
|
|
760
|
-
* @requiredField rewardId
|
|
761
|
-
* @permissionId LOYALTY.REDEEM_COUPON
|
|
762
|
-
* @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.RedeemPointsForCoupon
|
|
763
|
-
*/
|
|
764
|
-
export declare function redeemPointsForCoupon(rewardId: string, options: RedeemPointsForCouponOptions): Promise<RedeemPointsForCouponResponse & RedeemPointsForCouponResponseNonNullableFields>;
|
|
765
|
-
export interface RedeemPointsForCouponOptions {
|
|
670
|
+
interface RedeemPointsForCouponOptions {
|
|
766
671
|
/**
|
|
767
672
|
* ID of the [loyalty account](https://dev.wix.com/docs/rest/crm/loyalty-program/accounts/account-object) of the customer redeeming points.
|
|
768
673
|
* @format GUID
|
|
769
674
|
*/
|
|
770
675
|
loyaltyAccountId: string;
|
|
771
676
|
}
|
|
772
|
-
|
|
773
|
-
* Redeems a current customer's loyalty points for a loyalty reward and creates a loyalty coupon.
|
|
774
|
-
*
|
|
775
|
-
* Creating a loyalty coupon also creates a corresponding "reference" coupon with the [Coupons API](https://dev.wix.com/api/rest/coupons/about-wix-coupons).
|
|
776
|
-
* The customer receives the reference coupon, which they can apply to their order. The loyalty coupon and its corresponding reference coupon
|
|
777
|
-
* are linked and the loyalty coupon's `status` reflects the current state of the reference coupon.
|
|
778
|
-
*
|
|
779
|
-
* Check which loyalty rewards a site has available with [List Rewards](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/list-rewards).
|
|
780
|
-
*
|
|
781
|
-
* >**Note:**
|
|
782
|
-
* >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).
|
|
783
|
-
* @param rewardId - ID of the [loyalty reward](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/reward-object) to redeem.
|
|
784
|
-
* @public
|
|
785
|
-
* @requiredField rewardId
|
|
786
|
-
* @permissionId LOYALTY.REDEEM_OWN_COUPON
|
|
787
|
-
* @permissionScope Manage Loyalty
|
|
788
|
-
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
789
|
-
* @applicableIdentity APP
|
|
790
|
-
* @applicableIdentity MEMBER
|
|
791
|
-
* @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.RedeemCurrentMemberPointsForCoupon
|
|
792
|
-
*/
|
|
793
|
-
export declare function redeemCurrentMemberPointsForCoupon(rewardId: string): Promise<RedeemCurrentMemberPointsForCouponResponse & RedeemCurrentMemberPointsForCouponResponseNonNullableFields>;
|
|
794
|
-
/**
|
|
795
|
-
* Retrieves a loyalty coupon.
|
|
796
|
-
* @param loyaltyCouponId - ID of the loyalty coupon to retrieve.
|
|
797
|
-
* @public
|
|
798
|
-
* @requiredField loyaltyCouponId
|
|
799
|
-
* @permissionId LOYALTY.READ_COUPONS
|
|
800
|
-
* @permissionScope Read Loyalty
|
|
801
|
-
* @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
|
|
802
|
-
* @permissionScope Manage Loyalty
|
|
803
|
-
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
804
|
-
* @applicableIdentity APP
|
|
805
|
-
* @returns Retrieved loyalty coupon.
|
|
806
|
-
* @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.GetLoyaltyCoupon
|
|
807
|
-
*/
|
|
808
|
-
export declare function getLoyaltyCoupon(loyaltyCouponId: string): Promise<LoyaltyCoupon & LoyaltyCouponNonNullableFields>;
|
|
809
|
-
/**
|
|
810
|
-
* Retrieves a sequence of loyalty coupons
|
|
811
|
-
* @public
|
|
812
|
-
* @documentationMaturity preview
|
|
813
|
-
* @permissionId LOYALTY.REWARD_BULK_READ
|
|
814
|
-
* @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.BulkGetLoyaltyCoupon
|
|
815
|
-
*/
|
|
816
|
-
export declare function bulkGetLoyaltyCoupon(options?: BulkGetLoyaltyCouponOptions): Promise<BulkGetLoyaltyCouponResponse & BulkGetLoyaltyCouponResponseNonNullableFields>;
|
|
817
|
-
export interface BulkGetLoyaltyCouponOptions {
|
|
677
|
+
interface BulkGetLoyaltyCouponOptions {
|
|
818
678
|
/** Query to filter loyalty coupons. */
|
|
819
679
|
query?: CursorQuery;
|
|
820
680
|
}
|
|
821
|
-
/**
|
|
822
|
-
* Retrieves the loyalty coupons for the currently logged-in member.
|
|
823
|
-
*
|
|
824
|
-
* >**Note:**
|
|
825
|
-
* >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).
|
|
826
|
-
* @public
|
|
827
|
-
* @permissionId LOYALTY.READ_OWN_COUPONS
|
|
828
|
-
* @permissionScope Read Loyalty
|
|
829
|
-
* @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
|
|
830
|
-
* @permissionScope Manage Loyalty
|
|
831
|
-
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
832
|
-
* @applicableIdentity APP
|
|
833
|
-
* @applicableIdentity MEMBER
|
|
834
|
-
* @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.GetCurrentMemberCoupons
|
|
835
|
-
*/
|
|
836
|
-
export declare function getCurrentMemberCoupons(): Promise<GetCurrentMemberCouponsResponse & GetCurrentMemberCouponsResponseNonNullableFields>;
|
|
837
|
-
/**
|
|
838
|
-
* Retrieves a list of loyalty coupons, given the provided paging, filtering, and sorting.
|
|
839
|
-
* @public
|
|
840
|
-
* @permissionScope Read Loyalty
|
|
841
|
-
* @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
|
|
842
|
-
* @permissionScope Manage Loyalty
|
|
843
|
-
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
844
|
-
* @permissionId LOYALTY.READ_COUPONS
|
|
845
|
-
* @applicableIdentity APP
|
|
846
|
-
* @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.QueryLoyaltyCoupon
|
|
847
|
-
*/
|
|
848
|
-
export declare function queryLoyaltyCoupons(): LoyaltyCouponsQueryBuilder;
|
|
849
681
|
interface QueryCursorResult {
|
|
850
682
|
cursors: Cursors;
|
|
851
683
|
hasNext: () => boolean;
|
|
@@ -853,13 +685,13 @@ interface QueryCursorResult {
|
|
|
853
685
|
length: number;
|
|
854
686
|
pageSize: number;
|
|
855
687
|
}
|
|
856
|
-
|
|
688
|
+
interface LoyaltyCouponsQueryResult extends QueryCursorResult {
|
|
857
689
|
items: LoyaltyCoupon[];
|
|
858
690
|
query: LoyaltyCouponsQueryBuilder;
|
|
859
691
|
next: () => Promise<LoyaltyCouponsQueryResult>;
|
|
860
692
|
prev: () => Promise<LoyaltyCouponsQueryResult>;
|
|
861
693
|
}
|
|
862
|
-
|
|
694
|
+
interface LoyaltyCouponsQueryBuilder {
|
|
863
695
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
864
696
|
* @param value - Value to compare against.
|
|
865
697
|
*/
|
|
@@ -904,22 +736,5 @@ export interface LoyaltyCouponsQueryBuilder {
|
|
|
904
736
|
skipTo: (cursor: string) => LoyaltyCouponsQueryBuilder;
|
|
905
737
|
find: () => Promise<LoyaltyCouponsQueryResult>;
|
|
906
738
|
}
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
*
|
|
910
|
-
* The deletion of a loyalty coupon does not impact the functionality of the corresponding coupon itself.
|
|
911
|
-
* @param _id - ID of the loyalty coupon to delete.
|
|
912
|
-
* @param revision - Revision number, which increments by 1 each time the loyalty coupon is updated.
|
|
913
|
-
*
|
|
914
|
-
* To prevent conflicting changes, the current `revision` must be passed when updating the loyalty coupon.
|
|
915
|
-
* @public
|
|
916
|
-
* @requiredField _id
|
|
917
|
-
* @requiredField revision
|
|
918
|
-
* @permissionId LOYALTY.MANAGE_COUPONS
|
|
919
|
-
* @permissionScope Manage Loyalty
|
|
920
|
-
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
921
|
-
* @applicableIdentity APP
|
|
922
|
-
* @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.DeleteLoyaltyCoupon
|
|
923
|
-
*/
|
|
924
|
-
export declare function deleteLoyaltyCoupon(_id: string, revision: string): Promise<void>;
|
|
925
|
-
export {};
|
|
739
|
+
|
|
740
|
+
export { type CouponCreatedEnvelope as $, type PagingMetadataV2 as A, type BulkGetLoyaltyCouponOptions as B, type CouponReference as C, type Cursors as D, type DeleteLoyaltyCouponRequest as E, type DeleteLoyaltyCouponResponse as F, type GetCurrentMemberCouponsResponse as G, type DomainEvent as H, type DomainEventBodyOneOf as I, type EntityCreatedEvent as J, type RestoreInfo as K, type LoyaltyCoupon as L, type EntityUpdatedEvent as M, type EntityDeletedEvent as N, type ActionEvent as O, type Paging as P, type QueryLoyaltyCouponRequest as Q, type RedeemPointsForCouponOptions as R, Status as S, Type as T, type Empty as U, type MessageEnvelope as V, WebhookIdentityType as W, type IdentificationData as X, type IdentificationDataIdOneOf as Y, type BaseEventMetadata as Z, type EventMetadata as _, type RedeemPointsForCouponResponse as a, type CouponDeletedEnvelope as a0, type LoyaltyCouponsQueryResult as a1, type RedeemCurrentMemberPointsForCouponResponse as b, type BulkGetLoyaltyCouponResponse as c, type LoyaltyCouponsQueryBuilder as d, SortOrder as e, type Specification as f, type SpecificationTypeDetailsOneOf as g, type SpecificationScopeOrMinSubtotalOneOf as h, type BuyXGetY as i, type Scope as j, type RedeemPointsForCouponRequest as k, type RedeemCurrentMemberPointsForCouponRequest as l, type RedeemMemberPointsForDiscountAmountCouponRequest as m, type RedeemMemberPointsForDiscountAmountCouponResponse as n, type GetLoyaltyCouponRequest as o, type GetLoyaltyCouponResponse as p, type BulkGetLoyaltyCouponRequest as q, type CursorQuery as r, type CursorQueryPagingMethodOneOf as s, type Sorting as t, type CursorPaging as u, type CouponsInSite as v, type GetCurrentMemberCouponsRequest as w, type QueryV2 as x, type QueryV2PagingMethodOneOf as y, type QueryLoyaltyCouponResponse as z };
|