@wix/auto_sdk_loyalty_coupons 1.0.12 → 1.0.14

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.
Files changed (130) hide show
  1. package/build/index.d.mts +101 -0
  2. package/build/index.d.ts +101 -0
  3. package/build/index.js +756 -0
  4. package/build/index.js.map +1 -0
  5. package/build/index.mjs +720 -0
  6. package/build/index.mjs.map +1 -0
  7. package/build/internal/index.d.mts +101 -0
  8. package/build/internal/index.d.ts +101 -0
  9. package/build/internal/index.js +756 -0
  10. package/build/internal/index.js.map +1 -0
  11. package/build/internal/index.mjs +720 -0
  12. package/build/internal/index.mjs.map +1 -0
  13. package/build/internal/{cjs/src/loyalty-v1-coupon-coupons.universal.d.ts → loyalty-v1-coupon-coupons.universal-YZSAPFpG.d.mts} +74 -226
  14. package/build/internal/{es/src/loyalty-v1-coupon-coupons.universal.d.ts → loyalty-v1-coupon-coupons.universal-YZSAPFpG.d.ts} +74 -226
  15. package/build/{es/src/loyalty-v1-coupon-coupons.types.d.ts → internal/meta.d.mts} +70 -196
  16. package/build/internal/{cjs/src/loyalty-v1-coupon-coupons.types.d.ts → meta.d.ts} +70 -196
  17. package/build/internal/meta.js +515 -0
  18. package/build/internal/meta.js.map +1 -0
  19. package/build/internal/meta.mjs +482 -0
  20. package/build/internal/meta.mjs.map +1 -0
  21. package/build/{cjs/src/loyalty-v1-coupon-coupons.universal.d.ts → loyalty-v1-coupon-coupons.universal-YZSAPFpG.d.mts} +74 -226
  22. package/build/{es/src/loyalty-v1-coupon-coupons.universal.d.ts → loyalty-v1-coupon-coupons.universal-YZSAPFpG.d.ts} +74 -226
  23. package/build/{cjs/src/loyalty-v1-coupon-coupons.types.d.ts → meta.d.mts} +70 -196
  24. package/build/{internal/es/src/loyalty-v1-coupon-coupons.types.d.ts → meta.d.ts} +70 -196
  25. package/build/meta.js +515 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +482 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +13 -12
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/loyalty-v1-coupon-coupons.context.d.ts +0 -22
  40. package/build/cjs/src/loyalty-v1-coupon-coupons.context.js +0 -29
  41. package/build/cjs/src/loyalty-v1-coupon-coupons.context.js.map +0 -1
  42. package/build/cjs/src/loyalty-v1-coupon-coupons.http.d.ts +0 -43
  43. package/build/cjs/src/loyalty-v1-coupon-coupons.http.js +0 -389
  44. package/build/cjs/src/loyalty-v1-coupon-coupons.http.js.map +0 -1
  45. package/build/cjs/src/loyalty-v1-coupon-coupons.meta.d.ts +0 -23
  46. package/build/cjs/src/loyalty-v1-coupon-coupons.meta.js +0 -161
  47. package/build/cjs/src/loyalty-v1-coupon-coupons.meta.js.map +0 -1
  48. package/build/cjs/src/loyalty-v1-coupon-coupons.public.d.ts +0 -85
  49. package/build/cjs/src/loyalty-v1-coupon-coupons.public.js +0 -98
  50. package/build/cjs/src/loyalty-v1-coupon-coupons.public.js.map +0 -1
  51. package/build/cjs/src/loyalty-v1-coupon-coupons.types.js +0 -41
  52. package/build/cjs/src/loyalty-v1-coupon-coupons.types.js.map +0 -1
  53. package/build/cjs/src/loyalty-v1-coupon-coupons.universal.js +0 -372
  54. package/build/cjs/src/loyalty-v1-coupon-coupons.universal.js.map +0 -1
  55. package/build/es/index.d.ts +0 -1
  56. package/build/es/index.js +0 -2
  57. package/build/es/index.js.map +0 -1
  58. package/build/es/index.typings.d.ts +0 -1
  59. package/build/es/index.typings.js +0 -2
  60. package/build/es/index.typings.js.map +0 -1
  61. package/build/es/meta.d.ts +0 -1
  62. package/build/es/meta.js +0 -2
  63. package/build/es/meta.js.map +0 -1
  64. package/build/es/package.json +0 -3
  65. package/build/es/src/loyalty-v1-coupon-coupons.context.d.ts +0 -22
  66. package/build/es/src/loyalty-v1-coupon-coupons.context.js +0 -22
  67. package/build/es/src/loyalty-v1-coupon-coupons.context.js.map +0 -1
  68. package/build/es/src/loyalty-v1-coupon-coupons.http.d.ts +0 -43
  69. package/build/es/src/loyalty-v1-coupon-coupons.http.js +0 -379
  70. package/build/es/src/loyalty-v1-coupon-coupons.http.js.map +0 -1
  71. package/build/es/src/loyalty-v1-coupon-coupons.meta.d.ts +0 -23
  72. package/build/es/src/loyalty-v1-coupon-coupons.meta.js +0 -128
  73. package/build/es/src/loyalty-v1-coupon-coupons.meta.js.map +0 -1
  74. package/build/es/src/loyalty-v1-coupon-coupons.public.d.ts +0 -85
  75. package/build/es/src/loyalty-v1-coupon-coupons.public.js +0 -84
  76. package/build/es/src/loyalty-v1-coupon-coupons.public.js.map +0 -1
  77. package/build/es/src/loyalty-v1-coupon-coupons.types.js +0 -38
  78. package/build/es/src/loyalty-v1-coupon-coupons.types.js.map +0 -1
  79. package/build/es/src/loyalty-v1-coupon-coupons.universal.js +0 -339
  80. package/build/es/src/loyalty-v1-coupon-coupons.universal.js.map +0 -1
  81. package/build/internal/cjs/index.d.ts +0 -1
  82. package/build/internal/cjs/index.js +0 -18
  83. package/build/internal/cjs/index.js.map +0 -1
  84. package/build/internal/cjs/index.typings.d.ts +0 -1
  85. package/build/internal/cjs/index.typings.js +0 -18
  86. package/build/internal/cjs/index.typings.js.map +0 -1
  87. package/build/internal/cjs/meta.d.ts +0 -1
  88. package/build/internal/cjs/meta.js +0 -18
  89. package/build/internal/cjs/meta.js.map +0 -1
  90. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.context.d.ts +0 -22
  91. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.context.js +0 -29
  92. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.context.js.map +0 -1
  93. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.http.d.ts +0 -43
  94. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.http.js +0 -389
  95. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.http.js.map +0 -1
  96. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.meta.d.ts +0 -23
  97. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.meta.js +0 -161
  98. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.meta.js.map +0 -1
  99. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.public.d.ts +0 -85
  100. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.public.js +0 -98
  101. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.public.js.map +0 -1
  102. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.types.js +0 -41
  103. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.types.js.map +0 -1
  104. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.universal.js +0 -372
  105. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.universal.js.map +0 -1
  106. package/build/internal/es/index.d.ts +0 -1
  107. package/build/internal/es/index.js +0 -2
  108. package/build/internal/es/index.js.map +0 -1
  109. package/build/internal/es/index.typings.d.ts +0 -1
  110. package/build/internal/es/index.typings.js +0 -2
  111. package/build/internal/es/index.typings.js.map +0 -1
  112. package/build/internal/es/meta.d.ts +0 -1
  113. package/build/internal/es/meta.js +0 -2
  114. package/build/internal/es/meta.js.map +0 -1
  115. package/build/internal/es/src/loyalty-v1-coupon-coupons.context.d.ts +0 -22
  116. package/build/internal/es/src/loyalty-v1-coupon-coupons.context.js +0 -22
  117. package/build/internal/es/src/loyalty-v1-coupon-coupons.context.js.map +0 -1
  118. package/build/internal/es/src/loyalty-v1-coupon-coupons.http.d.ts +0 -43
  119. package/build/internal/es/src/loyalty-v1-coupon-coupons.http.js +0 -379
  120. package/build/internal/es/src/loyalty-v1-coupon-coupons.http.js.map +0 -1
  121. package/build/internal/es/src/loyalty-v1-coupon-coupons.meta.d.ts +0 -23
  122. package/build/internal/es/src/loyalty-v1-coupon-coupons.meta.js +0 -128
  123. package/build/internal/es/src/loyalty-v1-coupon-coupons.meta.js.map +0 -1
  124. package/build/internal/es/src/loyalty-v1-coupon-coupons.public.d.ts +0 -85
  125. package/build/internal/es/src/loyalty-v1-coupon-coupons.public.js +0 -84
  126. package/build/internal/es/src/loyalty-v1-coupon-coupons.public.js.map +0 -1
  127. package/build/internal/es/src/loyalty-v1-coupon-coupons.types.js +0 -38
  128. package/build/internal/es/src/loyalty-v1-coupon-coupons.types.js.map +0 -1
  129. package/build/internal/es/src/loyalty-v1-coupon-coupons.universal.js +0 -339
  130. package/build/internal/es/src/loyalty-v1-coupon-coupons.universal.js.map +0 -1
@@ -1,9 +1,8 @@
1
- import { NonNullablePaths } from '@wix/sdk-types';
2
1
  /**
3
2
  * A loyalty coupon is created when a customer redeems their loyalty points for a reward. Creating a loyalty coupon
4
3
  * also creates a corresponding "reference" coupon with the [Coupons API](https://dev.wix.com/api/rest/coupons/about-wix-coupons).
5
4
  */
6
- export interface LoyaltyCoupon {
5
+ interface LoyaltyCoupon {
7
6
  /**
8
7
  * Loyalty coupon ID.
9
8
  * @format GUID
@@ -50,7 +49,7 @@ export interface LoyaltyCoupon {
50
49
  * at the same time as the loyalty coupon and is included in `couponReference`.
51
50
  * @readonly
52
51
  */
53
- status?: Status;
52
+ status?: StatusWithLiterals;
54
53
  /**
55
54
  * Name of reward that was redeemed to create this coupon.
56
55
  * @minLength 1
@@ -76,7 +75,7 @@ export interface LoyaltyCoupon {
76
75
  */
77
76
  _updatedDate?: Date | null;
78
77
  }
79
- export interface CouponReference {
78
+ interface CouponReference {
80
79
  /**
81
80
  * Coupon ID.
82
81
  * @format GUID
@@ -108,7 +107,7 @@ export interface CouponReference {
108
107
  */
109
108
  deleted?: boolean | null;
110
109
  }
111
- export interface Specification extends SpecificationTypeDetailsOneOf, SpecificationScopeOrMinSubtotalOneOf {
110
+ interface Specification extends SpecificationTypeDetailsOneOf, SpecificationScopeOrMinSubtotalOneOf {
112
111
  /** Fixed price discount. */
113
112
  moneyOffAmount?: number;
114
113
  /** Discount as a percentage. */
@@ -132,7 +131,7 @@ export interface Specification extends SpecificationTypeDetailsOneOf, Specificat
132
131
  minimumSubtotal?: number | null;
133
132
  /** Name of coupon. */
134
133
  name?: string | null;
135
- type?: Type;
134
+ type?: TypeWithLiterals;
136
135
  /**
137
136
  * Whether the coupon is limited to 1 discount per order. If true and a customer pays for multiple items
138
137
  * that the coupon applies to, only the lowest priced item is discounted.
@@ -154,7 +153,7 @@ export interface Specification extends SpecificationTypeDetailsOneOf, Specificat
154
153
  discountedCycleCount?: number | null;
155
154
  }
156
155
  /** @oneof */
157
- export interface SpecificationTypeDetailsOneOf {
156
+ interface SpecificationTypeDetailsOneOf {
158
157
  /** Fixed price discount. */
159
158
  moneyOffAmount?: number;
160
159
  /** Discount as a percentage. */
@@ -171,7 +170,7 @@ export interface SpecificationTypeDetailsOneOf {
171
170
  buyXGetY?: BuyXGetY;
172
171
  }
173
172
  /** @oneof */
174
- export interface SpecificationScopeOrMinSubtotalOneOf {
173
+ interface SpecificationScopeOrMinSubtotalOneOf {
175
174
  /**
176
175
  * Scope of the coupon. When no scope is defined, the coupon applies to all
177
176
  * items in all `namespaces` in the site.
@@ -180,7 +179,7 @@ export interface SpecificationScopeOrMinSubtotalOneOf {
180
179
  /** The coupon is only applicable when the order subtotal is over this amount. */
181
180
  minimumSubtotal?: number | null;
182
181
  }
183
- export declare enum Type {
182
+ declare enum Type {
184
183
  UNKNOWN = "UNKNOWN",
185
184
  MONEY_OFF_AMOUNT = "MONEY_OFF_AMOUNT",
186
185
  PERCENT_OFF_RATE = "PERCENT_OFF_RATE",
@@ -188,13 +187,15 @@ export declare enum Type {
188
187
  FIXED_PRICE_AMOUNT = "FIXED_PRICE_AMOUNT",
189
188
  BUY_X_GET_Y = "BUY_X_GET_Y"
190
189
  }
191
- export interface BuyXGetY {
190
+ /** @enumType */
191
+ type TypeWithLiterals = Type | 'UNKNOWN' | 'MONEY_OFF_AMOUNT' | 'PERCENT_OFF_RATE' | 'FREE_SHIPPING' | 'FIXED_PRICE_AMOUNT' | 'BUY_X_GET_Y';
192
+ interface BuyXGetY {
192
193
  /** Number of purchased items required to receive free items. */
193
194
  x?: number;
194
195
  /** Number of items received for free if required number of items were purchased. */
195
196
  y?: number;
196
197
  }
197
- export interface Scope {
198
+ interface Scope {
198
199
  /**
199
200
  * Group within a `namespace` for which the coupon is applicable.
200
201
  *
@@ -222,7 +223,7 @@ export interface Scope {
222
223
  */
223
224
  namespace?: string;
224
225
  }
225
- export declare enum Status {
226
+ declare enum Status {
226
227
  /** Unknown status. */
227
228
  UNKNOWN = "UNKNOWN",
228
229
  /** The reference coupon was created but the loyalty points have not been redeemed yet. */
@@ -236,7 +237,9 @@ export declare enum Status {
236
237
  /** The reference coupon was deleted. */
237
238
  ARCHIVED = "ARCHIVED"
238
239
  }
239
- export interface RedeemPointsForCouponRequest {
240
+ /** @enumType */
241
+ type StatusWithLiterals = Status | 'UNKNOWN' | 'PENDING' | 'ACTIVE' | 'APPLIED' | 'FAILED' | 'ARCHIVED';
242
+ interface RedeemPointsForCouponRequest {
240
243
  /**
241
244
  * ID of the [loyalty reward](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/reward-object) to redeem.
242
245
  * @format GUID
@@ -248,22 +251,22 @@ export interface RedeemPointsForCouponRequest {
248
251
  */
249
252
  loyaltyAccountId: string;
250
253
  }
251
- export interface RedeemPointsForCouponResponse {
254
+ interface RedeemPointsForCouponResponse {
252
255
  /** Created loyalty coupon. */
253
256
  coupon?: LoyaltyCoupon;
254
257
  }
255
- export interface RedeemCurrentMemberPointsForCouponRequest {
258
+ interface RedeemCurrentMemberPointsForCouponRequest {
256
259
  /**
257
260
  * ID of the [loyalty reward](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/reward-object) to redeem.
258
261
  * @format GUID
259
262
  */
260
263
  rewardId: string;
261
264
  }
262
- export interface RedeemCurrentMemberPointsForCouponResponse {
265
+ interface RedeemCurrentMemberPointsForCouponResponse {
263
266
  /** Created loyalty coupon. */
264
267
  coupon?: LoyaltyCoupon;
265
268
  }
266
- export interface RedeemMemberPointsForDiscountAmountCouponRequest {
269
+ interface RedeemMemberPointsForDiscountAmountCouponRequest {
267
270
  /**
268
271
  * ID of the [loyalty reward](https://dev.wix.com/api/rest/wix-loyalty-program/rewards) to redeem.
269
272
  * @format GUID
@@ -279,28 +282,28 @@ export interface RedeemMemberPointsForDiscountAmountCouponRequest {
279
282
  /** Coupon specification. */
280
283
  specification?: Specification;
281
284
  }
282
- export interface RedeemMemberPointsForDiscountAmountCouponResponse {
285
+ interface RedeemMemberPointsForDiscountAmountCouponResponse {
283
286
  /** Created loyalty coupon. */
284
287
  coupon?: LoyaltyCoupon;
285
288
  /** Transaction id of the coupon redemption */
286
289
  transactionId?: string;
287
290
  }
288
- export interface GetLoyaltyCouponRequest {
291
+ interface GetLoyaltyCouponRequest {
289
292
  /**
290
293
  * ID of the loyalty coupon to retrieve.
291
294
  * @format GUID
292
295
  */
293
296
  loyaltyCouponId: string;
294
297
  }
295
- export interface GetLoyaltyCouponResponse {
298
+ interface GetLoyaltyCouponResponse {
296
299
  /** Retrieved loyalty coupon. */
297
300
  loyaltyCoupon?: LoyaltyCoupon;
298
301
  }
299
- export interface BulkGetLoyaltyCouponRequest {
302
+ interface BulkGetLoyaltyCouponRequest {
300
303
  /** Query to filter loyalty coupons. */
301
304
  query?: CursorQuery;
302
305
  }
303
- export interface CursorQuery extends CursorQueryPagingMethodOneOf {
306
+ interface CursorQuery extends CursorQueryPagingMethodOneOf {
304
307
  /**
305
308
  * Cursor paging options.
306
309
  *
@@ -322,7 +325,7 @@ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
322
325
  sort?: Sorting[];
323
326
  }
324
327
  /** @oneof */
325
- export interface CursorQueryPagingMethodOneOf {
328
+ interface CursorQueryPagingMethodOneOf {
326
329
  /**
327
330
  * Cursor paging options.
328
331
  *
@@ -330,20 +333,22 @@ export interface CursorQueryPagingMethodOneOf {
330
333
  */
331
334
  cursorPaging?: CursorPaging;
332
335
  }
333
- export interface Sorting {
336
+ interface Sorting {
334
337
  /**
335
338
  * Name of the field to sort by.
336
339
  * @maxLength 512
337
340
  */
338
341
  fieldName?: string;
339
342
  /** Sort order. */
340
- order?: SortOrder;
343
+ order?: SortOrderWithLiterals;
341
344
  }
342
- export declare enum SortOrder {
345
+ declare enum SortOrder {
343
346
  ASC = "ASC",
344
347
  DESC = "DESC"
345
348
  }
346
- export interface CursorPaging {
349
+ /** @enumType */
350
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
351
+ interface CursorPaging {
347
352
  /**
348
353
  * Maximum number of items to return in the results.
349
354
  * @max 100
@@ -358,14 +363,14 @@ export interface CursorPaging {
358
363
  */
359
364
  cursor?: string | null;
360
365
  }
361
- export interface BulkGetLoyaltyCouponResponse {
366
+ interface BulkGetLoyaltyCouponResponse {
362
367
  /**
363
368
  * Retrieved loyalty coupons.
364
369
  * @maxSize 100
365
370
  */
366
371
  couponsInSite?: CouponsInSite[];
367
372
  }
368
- export interface CouponsInSite {
373
+ interface CouponsInSite {
369
374
  /**
370
375
  * Metasite id
371
376
  * @format GUID
@@ -377,17 +382,17 @@ export interface CouponsInSite {
377
382
  */
378
383
  loyaltyCoupons?: LoyaltyCoupon[];
379
384
  }
380
- export interface GetCurrentMemberCouponsRequest {
385
+ interface GetCurrentMemberCouponsRequest {
381
386
  }
382
- export interface GetCurrentMemberCouponsResponse {
387
+ interface GetCurrentMemberCouponsResponse {
383
388
  /** Retrieved loyalty coupons. */
384
389
  loyaltyCoupons?: LoyaltyCoupon[];
385
390
  }
386
- export interface QueryLoyaltyCouponRequest {
391
+ interface QueryLoyaltyCouponRequest {
387
392
  /** Query options. */
388
393
  query: QueryV2;
389
394
  }
390
- export interface QueryV2 extends QueryV2PagingMethodOneOf {
395
+ interface QueryV2 extends QueryV2PagingMethodOneOf {
391
396
  /** Paging options to limit and skip the number of items. */
392
397
  paging?: Paging;
393
398
  /** 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`. */
@@ -410,25 +415,25 @@ export interface QueryV2 extends QueryV2PagingMethodOneOf {
410
415
  fieldsets?: string[];
411
416
  }
412
417
  /** @oneof */
413
- export interface QueryV2PagingMethodOneOf {
418
+ interface QueryV2PagingMethodOneOf {
414
419
  /** Paging options to limit and skip the number of items. */
415
420
  paging?: Paging;
416
421
  /** 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`. */
417
422
  cursorPaging?: CursorPaging;
418
423
  }
419
- export interface Paging {
424
+ interface Paging {
420
425
  /** Number of items to load. */
421
426
  limit?: number | null;
422
427
  /** Number of items to skip in the current sort order. */
423
428
  offset?: number | null;
424
429
  }
425
- export interface QueryLoyaltyCouponResponse {
430
+ interface QueryLoyaltyCouponResponse {
426
431
  /** Retrieved loyalty coupons. */
427
432
  loyaltyCoupons?: LoyaltyCoupon[];
428
433
  /** Metadata. */
429
434
  metadata?: PagingMetadataV2;
430
435
  }
431
- export interface PagingMetadataV2 {
436
+ interface PagingMetadataV2 {
432
437
  /** Number of items returned in the response. */
433
438
  count?: number | null;
434
439
  /** Offset that was requested. */
@@ -440,7 +445,7 @@ export interface PagingMetadataV2 {
440
445
  /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
441
446
  cursors?: Cursors;
442
447
  }
443
- export interface Cursors {
448
+ interface Cursors {
444
449
  /**
445
450
  * Cursor string pointing to the next page in the list of results.
446
451
  * @maxLength 16000
@@ -452,7 +457,7 @@ export interface Cursors {
452
457
  */
453
458
  prev?: string | null;
454
459
  }
455
- export interface DeleteLoyaltyCouponRequest {
460
+ interface DeleteLoyaltyCouponRequest {
456
461
  /**
457
462
  * ID of the loyalty coupon to delete.
458
463
  * @format GUID
@@ -465,9 +470,9 @@ export interface DeleteLoyaltyCouponRequest {
465
470
  */
466
471
  revision?: string;
467
472
  }
468
- export interface DeleteLoyaltyCouponResponse {
473
+ interface DeleteLoyaltyCouponResponse {
469
474
  }
470
- export interface DomainEvent extends DomainEventBodyOneOf {
475
+ interface DomainEvent extends DomainEventBodyOneOf {
471
476
  createdEvent?: EntityCreatedEvent;
472
477
  updatedEvent?: EntityUpdatedEvent;
473
478
  deletedEvent?: EntityDeletedEvent;
@@ -502,19 +507,19 @@ export interface DomainEvent extends DomainEventBodyOneOf {
502
507
  entityEventSequence?: string | null;
503
508
  }
504
509
  /** @oneof */
505
- export interface DomainEventBodyOneOf {
510
+ interface DomainEventBodyOneOf {
506
511
  createdEvent?: EntityCreatedEvent;
507
512
  updatedEvent?: EntityUpdatedEvent;
508
513
  deletedEvent?: EntityDeletedEvent;
509
514
  actionEvent?: ActionEvent;
510
515
  }
511
- export interface EntityCreatedEvent {
516
+ interface EntityCreatedEvent {
512
517
  entity?: string;
513
518
  }
514
- export interface RestoreInfo {
519
+ interface RestoreInfo {
515
520
  deletedDate?: Date | null;
516
521
  }
517
- export interface EntityUpdatedEvent {
522
+ interface EntityUpdatedEvent {
518
523
  /**
519
524
  * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
520
525
  * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
@@ -522,16 +527,16 @@ export interface EntityUpdatedEvent {
522
527
  */
523
528
  currentEntity?: string;
524
529
  }
525
- export interface EntityDeletedEvent {
530
+ interface EntityDeletedEvent {
526
531
  /** Entity that was deleted. */
527
532
  deletedEntity?: string | null;
528
533
  }
529
- export interface ActionEvent {
534
+ interface ActionEvent {
530
535
  body?: string;
531
536
  }
532
- export interface Empty {
537
+ interface Empty {
533
538
  }
534
- export interface MessageEnvelope {
539
+ interface MessageEnvelope {
535
540
  /**
536
541
  * App instance ID.
537
542
  * @format GUID
@@ -547,7 +552,7 @@ export interface MessageEnvelope {
547
552
  /** Stringify payload. */
548
553
  data?: string;
549
554
  }
550
- export interface IdentificationData extends IdentificationDataIdOneOf {
555
+ interface IdentificationData extends IdentificationDataIdOneOf {
551
556
  /**
552
557
  * ID of a site visitor that has not logged in to the site.
553
558
  * @format GUID
@@ -569,10 +574,10 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
569
574
  */
570
575
  appId?: string;
571
576
  /** @readonly */
572
- identityType?: WebhookIdentityType;
577
+ identityType?: WebhookIdentityTypeWithLiterals;
573
578
  }
574
579
  /** @oneof */
575
- export interface IdentificationDataIdOneOf {
580
+ interface IdentificationDataIdOneOf {
576
581
  /**
577
582
  * ID of a site visitor that has not logged in to the site.
578
583
  * @format GUID
@@ -594,14 +599,16 @@ export interface IdentificationDataIdOneOf {
594
599
  */
595
600
  appId?: string;
596
601
  }
597
- export declare enum WebhookIdentityType {
602
+ declare enum WebhookIdentityType {
598
603
  UNKNOWN = "UNKNOWN",
599
604
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
600
605
  MEMBER = "MEMBER",
601
606
  WIX_USER = "WIX_USER",
602
607
  APP = "APP"
603
608
  }
604
- export interface BaseEventMetadata {
609
+ /** @enumType */
610
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
611
+ interface BaseEventMetadata {
605
612
  /**
606
613
  * App instance ID.
607
614
  * @format GUID
@@ -615,7 +622,7 @@ export interface BaseEventMetadata {
615
622
  /** The identification type and identity data. */
616
623
  identity?: IdentificationData;
617
624
  }
618
- export interface EventMetadata extends BaseEventMetadata {
625
+ interface EventMetadata extends BaseEventMetadata {
619
626
  /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
620
627
  _id?: string;
621
628
  /**
@@ -645,164 +652,24 @@ export interface EventMetadata extends BaseEventMetadata {
645
652
  */
646
653
  entityEventSequence?: string | null;
647
654
  }
648
- export interface CouponCreatedEnvelope {
655
+ interface CouponCreatedEnvelope {
649
656
  entity: LoyaltyCoupon;
650
657
  metadata: EventMetadata;
651
658
  }
652
- /**
653
- * Triggered when a loyalty coupon is created.
654
- * @permissionScope Read Loyalty
655
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
656
- * @permissionScope Manage Loyalty
657
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
658
- * @permissionScope Manage Restaurants - all permissions
659
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
660
- * @permissionId LOYALTY.READ_COUPONS
661
- * @webhook
662
- * @eventType wix.loyalty.v1.coupon_created
663
- * @serviceIdentifier com.wixpress.loyalty.coupon.LoyaltyCoupons
664
- * @slug created
665
- */
666
- export declare function onCouponCreated(handler: (event: CouponCreatedEnvelope) => void | Promise<void>): void;
667
- export interface CouponDeletedEnvelope {
659
+ interface CouponDeletedEnvelope {
668
660
  metadata: EventMetadata;
669
661
  }
670
- /**
671
- * Triggered when a loyalty coupon is deleted.
672
- * @permissionScope Read Loyalty
673
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
674
- * @permissionScope Manage Loyalty
675
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
676
- * @permissionScope Manage Restaurants - all permissions
677
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
678
- * @permissionId LOYALTY.READ_COUPONS
679
- * @webhook
680
- * @eventType wix.loyalty.v1.coupon_deleted
681
- * @serviceIdentifier com.wixpress.loyalty.coupon.LoyaltyCoupons
682
- * @slug deleted
683
- */
684
- export declare function onCouponDeleted(handler: (event: CouponDeletedEnvelope) => void | Promise<void>): void;
685
- 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`;
686
- /**
687
- * Redeems a customer's loyalty points for a loyalty reward and creates a loyalty coupon.
688
- *
689
- * Creating a loyalty coupon also creates a corresponding "reference" coupon with the [Coupons API](https://dev.wix.com/api/rest/coupons/about-wix-coupons).
690
- * The customer receives the reference coupon, which they can apply to their order. The loyalty coupon and its corresponding reference coupon
691
- * are linked and the loyalty coupon's `status` reflects the current state of the reference coupon.
692
- *
693
- * Check which loyalty rewards a site has available with [List Rewards](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/list-rewards).
694
- * @param rewardId - ID of the [loyalty reward](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/reward-object) to redeem.
695
- * @public
696
- * @requiredField options
697
- * @requiredField options.loyaltyAccountId
698
- * @requiredField rewardId
699
- * @permissionId LOYALTY.REDEEM_COUPON
700
- * @permissionScope Manage Restaurants - all permissions
701
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
702
- * @applicableIdentity APP
703
- * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.RedeemPointsForCoupon
704
- */
705
- export declare function redeemPointsForCoupon(rewardId: string, options: NonNullablePaths<RedeemPointsForCouponOptions, `loyaltyAccountId`>): Promise<NonNullablePaths<RedeemPointsForCouponResponse, {
706
- [P in CouponNonNullablePaths]: `coupon.${P}`;
707
- }[CouponNonNullablePaths]>>;
708
- export interface RedeemPointsForCouponOptions {
662
+ interface RedeemPointsForCouponOptions {
709
663
  /**
710
664
  * ID of the [loyalty account](https://dev.wix.com/docs/rest/crm/loyalty-program/accounts/account-object) of the customer redeeming points.
711
665
  * @format GUID
712
666
  */
713
667
  loyaltyAccountId: string;
714
668
  }
715
- /**
716
- * Redeems a current customer's loyalty points for a loyalty reward and creates a loyalty coupon.
717
- *
718
- * Creating a loyalty coupon also creates a corresponding "reference" coupon with the [Coupons API](https://dev.wix.com/api/rest/coupons/about-wix-coupons).
719
- * The customer receives the reference coupon, which they can apply to their order. The loyalty coupon and its corresponding reference coupon
720
- * are linked and the loyalty coupon's `status` reflects the current state of the reference coupon.
721
- *
722
- * Check which loyalty rewards a site has available with [List Rewards](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/list-rewards).
723
- *
724
- * >**Note:**
725
- * >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).
726
- * @param rewardId - ID of the [loyalty reward](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/reward-object) to redeem.
727
- * @public
728
- * @requiredField rewardId
729
- * @permissionId LOYALTY.REDEEM_OWN_COUPON
730
- * @permissionScope Manage Loyalty
731
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
732
- * @permissionScope Manage Restaurants - all permissions
733
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
734
- * @applicableIdentity APP
735
- * @applicableIdentity MEMBER
736
- * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.RedeemCurrentMemberPointsForCoupon
737
- */
738
- export declare function redeemCurrentMemberPointsForCoupon(rewardId: string): Promise<NonNullablePaths<RedeemCurrentMemberPointsForCouponResponse, {
739
- [P in CouponNonNullablePaths]: `coupon.${P}`;
740
- }[CouponNonNullablePaths]>>;
741
- /**
742
- * Retrieves a loyalty coupon.
743
- * @param loyaltyCouponId - ID of the loyalty coupon to retrieve.
744
- * @public
745
- * @requiredField loyaltyCouponId
746
- * @permissionId LOYALTY.READ_COUPONS
747
- * @permissionScope Read Loyalty
748
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
749
- * @permissionScope Manage Loyalty
750
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
751
- * @permissionScope Manage Restaurants - all permissions
752
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
753
- * @applicableIdentity APP
754
- * @returns Retrieved loyalty coupon.
755
- * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.GetLoyaltyCoupon
756
- */
757
- export declare function getLoyaltyCoupon(loyaltyCouponId: string): Promise<NonNullablePaths<LoyaltyCoupon, CouponNonNullablePaths>>;
758
- /**
759
- * Retrieves a sequence of loyalty coupons
760
- * @public
761
- * @documentationMaturity preview
762
- * @permissionId LOYALTY.REWARD_BULK_READ
763
- * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.BulkGetLoyaltyCoupon
764
- */
765
- export declare function bulkGetLoyaltyCoupon(options?: BulkGetLoyaltyCouponOptions): Promise<NonNullablePaths<BulkGetLoyaltyCouponResponse, `couponsInSite` | `couponsInSite.${number}.metaSiteId` | {
766
- [P in CouponNonNullablePaths]: `couponsInSite.${number}.loyaltyCoupons.${number}.${P}`;
767
- }[CouponNonNullablePaths]>>;
768
- export interface BulkGetLoyaltyCouponOptions {
669
+ interface BulkGetLoyaltyCouponOptions {
769
670
  /** Query to filter loyalty coupons. */
770
671
  query?: CursorQuery;
771
672
  }
772
- /**
773
- * Retrieves the loyalty coupons for the currently logged-in member.
774
- *
775
- * >**Note:**
776
- * >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).
777
- * @public
778
- * @permissionId LOYALTY.READ_OWN_COUPONS
779
- * @permissionScope Read Loyalty
780
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
781
- * @permissionScope Manage Loyalty
782
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
783
- * @permissionScope Manage Restaurants - all permissions
784
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
785
- * @applicableIdentity APP
786
- * @applicableIdentity MEMBER
787
- * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.GetCurrentMemberCoupons
788
- */
789
- export declare function getCurrentMemberCoupons(): Promise<NonNullablePaths<GetCurrentMemberCouponsResponse, {
790
- [P in CouponNonNullablePaths]: `loyaltyCoupons.${number}.${P}`;
791
- }[CouponNonNullablePaths]>>;
792
- /**
793
- * Retrieves a list of loyalty coupons, given the provided paging, filtering, and sorting.
794
- * @public
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
- * @permissionId LOYALTY.READ_COUPONS
802
- * @applicableIdentity APP
803
- * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.QueryLoyaltyCoupon
804
- */
805
- export declare function queryLoyaltyCoupons(): LoyaltyCouponsQueryBuilder;
806
673
  interface QueryCursorResult {
807
674
  cursors: Cursors;
808
675
  hasNext: () => boolean;
@@ -810,13 +677,13 @@ interface QueryCursorResult {
810
677
  length: number;
811
678
  pageSize: number;
812
679
  }
813
- export interface LoyaltyCouponsQueryResult extends QueryCursorResult {
680
+ interface LoyaltyCouponsQueryResult extends QueryCursorResult {
814
681
  items: LoyaltyCoupon[];
815
682
  query: LoyaltyCouponsQueryBuilder;
816
683
  next: () => Promise<LoyaltyCouponsQueryResult>;
817
684
  prev: () => Promise<LoyaltyCouponsQueryResult>;
818
685
  }
819
- export interface LoyaltyCouponsQueryBuilder {
686
+ interface LoyaltyCouponsQueryBuilder {
820
687
  /** @param propertyName - Property whose value is compared with `value`.
821
688
  * @param value - Value to compare against.
822
689
  */
@@ -828,19 +695,19 @@ export interface LoyaltyCouponsQueryBuilder {
828
695
  /** @param propertyName - Property whose value is compared with `value`.
829
696
  * @param value - Value to compare against.
830
697
  */
831
- ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => LoyaltyCouponsQueryBuilder;
698
+ ge: (propertyName: 'accountId' | 'memberId' | 'transactionId' | 'rewardName' | '_createdDate' | '_updatedDate', value: any) => LoyaltyCouponsQueryBuilder;
832
699
  /** @param propertyName - Property whose value is compared with `value`.
833
700
  * @param value - Value to compare against.
834
701
  */
835
- gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => LoyaltyCouponsQueryBuilder;
702
+ gt: (propertyName: 'accountId' | 'memberId' | 'transactionId' | 'rewardName' | '_createdDate' | '_updatedDate', value: any) => LoyaltyCouponsQueryBuilder;
836
703
  /** @param propertyName - Property whose value is compared with `value`.
837
704
  * @param value - Value to compare against.
838
705
  */
839
- le: (propertyName: '_createdDate' | '_updatedDate', value: any) => LoyaltyCouponsQueryBuilder;
706
+ le: (propertyName: 'accountId' | 'memberId' | 'transactionId' | 'rewardName' | '_createdDate' | '_updatedDate', value: any) => LoyaltyCouponsQueryBuilder;
840
707
  /** @param propertyName - Property whose value is compared with `value`.
841
708
  * @param value - Value to compare against.
842
709
  */
843
- lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => LoyaltyCouponsQueryBuilder;
710
+ lt: (propertyName: 'accountId' | 'memberId' | 'transactionId' | 'rewardName' | '_createdDate' | '_updatedDate', value: any) => LoyaltyCouponsQueryBuilder;
844
711
  /** @param propertyName - Property whose value is compared with `string`.
845
712
  * @param string - String to compare against. Case-insensitive.
846
713
  */
@@ -861,24 +728,5 @@ export interface LoyaltyCouponsQueryBuilder {
861
728
  skipTo: (cursor: string) => LoyaltyCouponsQueryBuilder;
862
729
  find: () => Promise<LoyaltyCouponsQueryResult>;
863
730
  }
864
- /**
865
- * Deletes a loyalty coupon.
866
- *
867
- * The deletion of a loyalty coupon does not impact the functionality of the corresponding coupon itself.
868
- * @param _id - ID of the loyalty coupon to delete.
869
- * @param revision - Revision number, which increments by 1 each time the loyalty coupon is updated.
870
- *
871
- * To prevent conflicting changes, the current `revision` must be passed when updating the loyalty coupon.
872
- * @public
873
- * @requiredField _id
874
- * @requiredField revision
875
- * @permissionId LOYALTY.MANAGE_COUPONS
876
- * @permissionScope Manage Loyalty
877
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
878
- * @permissionScope Manage Restaurants - all permissions
879
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
880
- * @applicableIdentity APP
881
- * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.DeleteLoyaltyCoupon
882
- */
883
- export declare function deleteLoyaltyCoupon(_id: string, revision: string): Promise<void>;
884
- export {};
731
+
732
+ export { type BaseEventMetadata as $, type QueryV2PagingMethodOneOf as A, type BulkGetLoyaltyCouponOptions as B, type CouponCreatedEnvelope as C, type QueryLoyaltyCouponResponse as D, type PagingMetadataV2 as E, type Cursors as F, type GetCurrentMemberCouponsResponse as G, type DeleteLoyaltyCouponRequest as H, type DeleteLoyaltyCouponResponse as I, type DomainEvent as J, type DomainEventBodyOneOf as K, type LoyaltyCoupon as L, type EntityCreatedEvent as M, type RestoreInfo as N, type EntityUpdatedEvent as O, type Paging as P, type QueryLoyaltyCouponRequest as Q, type RedeemPointsForCouponOptions as R, Status as S, Type as T, type EntityDeletedEvent as U, type ActionEvent as V, WebhookIdentityType as W, type Empty as X, type MessageEnvelope as Y, type IdentificationData as Z, type IdentificationDataIdOneOf as _, type RedeemPointsForCouponResponse as a, type EventMetadata as a0, type LoyaltyCouponsQueryResult as a1, type RedeemCurrentMemberPointsForCouponResponse as b, type BulkGetLoyaltyCouponResponse as c, type LoyaltyCouponsQueryBuilder as d, type CouponDeletedEnvelope as e, SortOrder as f, type CouponReference as g, type Specification as h, type SpecificationTypeDetailsOneOf as i, type SpecificationScopeOrMinSubtotalOneOf as j, type BuyXGetY as k, type Scope as l, type RedeemPointsForCouponRequest as m, type RedeemCurrentMemberPointsForCouponRequest as n, type RedeemMemberPointsForDiscountAmountCouponRequest as o, type RedeemMemberPointsForDiscountAmountCouponResponse as p, type GetLoyaltyCouponRequest as q, type GetLoyaltyCouponResponse as r, type BulkGetLoyaltyCouponRequest as s, type CursorQuery as t, type CursorQueryPagingMethodOneOf as u, type Sorting as v, type CursorPaging as w, type CouponsInSite as x, type GetCurrentMemberCouponsRequest as y, type QueryV2 as z };