@wix/auto_sdk_loyalty_coupons 1.0.13 → 1.0.15

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 (119) hide show
  1. package/build/cjs/index.d.ts +101 -1
  2. package/build/cjs/index.js +753 -15
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/{internal/cjs/src/loyalty-v1-coupon-coupons.universal.d.ts → cjs/loyalty-v1-coupon-coupons.universal-YZSAPFpG.d.ts} +62 -222
  5. package/build/cjs/meta.d.ts +478 -1
  6. package/build/cjs/meta.js +512 -15
  7. package/build/cjs/meta.js.map +1 -1
  8. package/build/es/index.d.mts +101 -0
  9. package/build/es/index.mjs +720 -0
  10. package/build/es/index.mjs.map +1 -0
  11. package/build/{internal/es/src/loyalty-v1-coupon-coupons.universal.d.ts → es/loyalty-v1-coupon-coupons.universal-YZSAPFpG.d.mts} +62 -222
  12. package/build/{internal/cjs/src/loyalty-v1-coupon-coupons.types.d.ts → es/meta.d.mts} +64 -198
  13. package/build/es/meta.mjs +482 -0
  14. package/build/es/meta.mjs.map +1 -0
  15. package/build/internal/cjs/index.d.ts +101 -1
  16. package/build/internal/cjs/index.js +753 -15
  17. package/build/internal/cjs/index.js.map +1 -1
  18. package/build/{cjs/src/loyalty-v1-coupon-coupons.universal.d.ts → internal/cjs/loyalty-v1-coupon-coupons.universal-YZSAPFpG.d.ts} +62 -222
  19. package/build/internal/cjs/meta.d.ts +478 -1
  20. package/build/internal/cjs/meta.js +512 -15
  21. package/build/internal/cjs/meta.js.map +1 -1
  22. package/build/internal/es/index.d.mts +101 -0
  23. package/build/internal/es/index.mjs +720 -0
  24. package/build/internal/es/index.mjs.map +1 -0
  25. package/build/{es/src/loyalty-v1-coupon-coupons.universal.d.ts → internal/es/loyalty-v1-coupon-coupons.universal-YZSAPFpG.d.mts} +62 -222
  26. package/build/{cjs/src/loyalty-v1-coupon-coupons.types.d.ts → internal/es/meta.d.mts} +64 -198
  27. package/build/internal/es/meta.mjs +482 -0
  28. package/build/internal/es/meta.mjs.map +1 -0
  29. package/package.json +10 -9
  30. package/build/cjs/index.typings.d.ts +0 -1
  31. package/build/cjs/index.typings.js +0 -18
  32. package/build/cjs/index.typings.js.map +0 -1
  33. package/build/cjs/src/loyalty-v1-coupon-coupons.context.d.ts +0 -22
  34. package/build/cjs/src/loyalty-v1-coupon-coupons.context.js +0 -29
  35. package/build/cjs/src/loyalty-v1-coupon-coupons.context.js.map +0 -1
  36. package/build/cjs/src/loyalty-v1-coupon-coupons.http.d.ts +0 -43
  37. package/build/cjs/src/loyalty-v1-coupon-coupons.http.js +0 -389
  38. package/build/cjs/src/loyalty-v1-coupon-coupons.http.js.map +0 -1
  39. package/build/cjs/src/loyalty-v1-coupon-coupons.meta.d.ts +0 -23
  40. package/build/cjs/src/loyalty-v1-coupon-coupons.meta.js +0 -161
  41. package/build/cjs/src/loyalty-v1-coupon-coupons.meta.js.map +0 -1
  42. package/build/cjs/src/loyalty-v1-coupon-coupons.public.d.ts +0 -85
  43. package/build/cjs/src/loyalty-v1-coupon-coupons.public.js +0 -98
  44. package/build/cjs/src/loyalty-v1-coupon-coupons.public.js.map +0 -1
  45. package/build/cjs/src/loyalty-v1-coupon-coupons.types.js +0 -41
  46. package/build/cjs/src/loyalty-v1-coupon-coupons.types.js.map +0 -1
  47. package/build/cjs/src/loyalty-v1-coupon-coupons.universal.js +0 -372
  48. package/build/cjs/src/loyalty-v1-coupon-coupons.universal.js.map +0 -1
  49. package/build/es/index.d.ts +0 -1
  50. package/build/es/index.js +0 -2
  51. package/build/es/index.js.map +0 -1
  52. package/build/es/index.typings.d.ts +0 -1
  53. package/build/es/index.typings.js +0 -2
  54. package/build/es/index.typings.js.map +0 -1
  55. package/build/es/meta.d.ts +0 -1
  56. package/build/es/meta.js +0 -2
  57. package/build/es/meta.js.map +0 -1
  58. package/build/es/src/loyalty-v1-coupon-coupons.context.d.ts +0 -22
  59. package/build/es/src/loyalty-v1-coupon-coupons.context.js +0 -22
  60. package/build/es/src/loyalty-v1-coupon-coupons.context.js.map +0 -1
  61. package/build/es/src/loyalty-v1-coupon-coupons.http.d.ts +0 -43
  62. package/build/es/src/loyalty-v1-coupon-coupons.http.js +0 -379
  63. package/build/es/src/loyalty-v1-coupon-coupons.http.js.map +0 -1
  64. package/build/es/src/loyalty-v1-coupon-coupons.meta.d.ts +0 -23
  65. package/build/es/src/loyalty-v1-coupon-coupons.meta.js +0 -128
  66. package/build/es/src/loyalty-v1-coupon-coupons.meta.js.map +0 -1
  67. package/build/es/src/loyalty-v1-coupon-coupons.public.d.ts +0 -85
  68. package/build/es/src/loyalty-v1-coupon-coupons.public.js +0 -84
  69. package/build/es/src/loyalty-v1-coupon-coupons.public.js.map +0 -1
  70. package/build/es/src/loyalty-v1-coupon-coupons.types.d.ts +0 -612
  71. package/build/es/src/loyalty-v1-coupon-coupons.types.js +0 -38
  72. package/build/es/src/loyalty-v1-coupon-coupons.types.js.map +0 -1
  73. package/build/es/src/loyalty-v1-coupon-coupons.universal.js +0 -339
  74. package/build/es/src/loyalty-v1-coupon-coupons.universal.js.map +0 -1
  75. package/build/internal/cjs/index.typings.d.ts +0 -1
  76. package/build/internal/cjs/index.typings.js +0 -18
  77. package/build/internal/cjs/index.typings.js.map +0 -1
  78. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.context.d.ts +0 -22
  79. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.context.js +0 -29
  80. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.context.js.map +0 -1
  81. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.http.d.ts +0 -43
  82. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.http.js +0 -389
  83. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.http.js.map +0 -1
  84. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.meta.d.ts +0 -23
  85. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.meta.js +0 -161
  86. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.meta.js.map +0 -1
  87. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.public.d.ts +0 -85
  88. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.public.js +0 -98
  89. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.public.js.map +0 -1
  90. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.types.js +0 -41
  91. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.types.js.map +0 -1
  92. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.universal.js +0 -372
  93. package/build/internal/cjs/src/loyalty-v1-coupon-coupons.universal.js.map +0 -1
  94. package/build/internal/es/index.d.ts +0 -1
  95. package/build/internal/es/index.js +0 -2
  96. package/build/internal/es/index.js.map +0 -1
  97. package/build/internal/es/index.typings.d.ts +0 -1
  98. package/build/internal/es/index.typings.js +0 -2
  99. package/build/internal/es/index.typings.js.map +0 -1
  100. package/build/internal/es/meta.d.ts +0 -1
  101. package/build/internal/es/meta.js +0 -2
  102. package/build/internal/es/meta.js.map +0 -1
  103. package/build/internal/es/src/loyalty-v1-coupon-coupons.context.d.ts +0 -22
  104. package/build/internal/es/src/loyalty-v1-coupon-coupons.context.js +0 -22
  105. package/build/internal/es/src/loyalty-v1-coupon-coupons.context.js.map +0 -1
  106. package/build/internal/es/src/loyalty-v1-coupon-coupons.http.d.ts +0 -43
  107. package/build/internal/es/src/loyalty-v1-coupon-coupons.http.js +0 -379
  108. package/build/internal/es/src/loyalty-v1-coupon-coupons.http.js.map +0 -1
  109. package/build/internal/es/src/loyalty-v1-coupon-coupons.meta.d.ts +0 -23
  110. package/build/internal/es/src/loyalty-v1-coupon-coupons.meta.js +0 -128
  111. package/build/internal/es/src/loyalty-v1-coupon-coupons.meta.js.map +0 -1
  112. package/build/internal/es/src/loyalty-v1-coupon-coupons.public.d.ts +0 -85
  113. package/build/internal/es/src/loyalty-v1-coupon-coupons.public.js +0 -84
  114. package/build/internal/es/src/loyalty-v1-coupon-coupons.public.js.map +0 -1
  115. package/build/internal/es/src/loyalty-v1-coupon-coupons.types.d.ts +0 -612
  116. package/build/internal/es/src/loyalty-v1-coupon-coupons.types.js +0 -38
  117. package/build/internal/es/src/loyalty-v1-coupon-coupons.types.js.map +0 -1
  118. package/build/internal/es/src/loyalty-v1-coupon-coupons.universal.js +0 -339
  119. 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
@@ -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. */
@@ -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",
@@ -189,14 +188,14 @@ export declare enum Type {
189
188
  BUY_X_GET_Y = "BUY_X_GET_Y"
190
189
  }
191
190
  /** @enumType */
192
- export type TypeWithLiterals = Type | 'UNKNOWN' | 'MONEY_OFF_AMOUNT' | 'PERCENT_OFF_RATE' | 'FREE_SHIPPING' | 'FIXED_PRICE_AMOUNT' | 'BUY_X_GET_Y';
193
- export interface BuyXGetY {
191
+ type TypeWithLiterals = Type | 'UNKNOWN' | 'MONEY_OFF_AMOUNT' | 'PERCENT_OFF_RATE' | 'FREE_SHIPPING' | 'FIXED_PRICE_AMOUNT' | 'BUY_X_GET_Y';
192
+ interface BuyXGetY {
194
193
  /** Number of purchased items required to receive free items. */
195
194
  x?: number;
196
195
  /** Number of items received for free if required number of items were purchased. */
197
196
  y?: number;
198
197
  }
199
- export interface Scope {
198
+ interface Scope {
200
199
  /**
201
200
  * Group within a `namespace` for which the coupon is applicable.
202
201
  *
@@ -224,7 +223,7 @@ export interface Scope {
224
223
  */
225
224
  namespace?: string;
226
225
  }
227
- export declare enum Status {
226
+ declare enum Status {
228
227
  /** Unknown status. */
229
228
  UNKNOWN = "UNKNOWN",
230
229
  /** The reference coupon was created but the loyalty points have not been redeemed yet. */
@@ -239,8 +238,8 @@ export declare enum Status {
239
238
  ARCHIVED = "ARCHIVED"
240
239
  }
241
240
  /** @enumType */
242
- export type StatusWithLiterals = Status | 'UNKNOWN' | 'PENDING' | 'ACTIVE' | 'APPLIED' | 'FAILED' | 'ARCHIVED';
243
- export interface RedeemPointsForCouponRequest {
241
+ type StatusWithLiterals = Status | 'UNKNOWN' | 'PENDING' | 'ACTIVE' | 'APPLIED' | 'FAILED' | 'ARCHIVED';
242
+ interface RedeemPointsForCouponRequest {
244
243
  /**
245
244
  * ID of the [loyalty reward](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/reward-object) to redeem.
246
245
  * @format GUID
@@ -252,22 +251,22 @@ export interface RedeemPointsForCouponRequest {
252
251
  */
253
252
  loyaltyAccountId: string;
254
253
  }
255
- export interface RedeemPointsForCouponResponse {
254
+ interface RedeemPointsForCouponResponse {
256
255
  /** Created loyalty coupon. */
257
256
  coupon?: LoyaltyCoupon;
258
257
  }
259
- export interface RedeemCurrentMemberPointsForCouponRequest {
258
+ interface RedeemCurrentMemberPointsForCouponRequest {
260
259
  /**
261
260
  * ID of the [loyalty reward](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/reward-object) to redeem.
262
261
  * @format GUID
263
262
  */
264
263
  rewardId: string;
265
264
  }
266
- export interface RedeemCurrentMemberPointsForCouponResponse {
265
+ interface RedeemCurrentMemberPointsForCouponResponse {
267
266
  /** Created loyalty coupon. */
268
267
  coupon?: LoyaltyCoupon;
269
268
  }
270
- export interface RedeemMemberPointsForDiscountAmountCouponRequest {
269
+ interface RedeemMemberPointsForDiscountAmountCouponRequest {
271
270
  /**
272
271
  * ID of the [loyalty reward](https://dev.wix.com/api/rest/wix-loyalty-program/rewards) to redeem.
273
272
  * @format GUID
@@ -283,28 +282,28 @@ export interface RedeemMemberPointsForDiscountAmountCouponRequest {
283
282
  /** Coupon specification. */
284
283
  specification?: Specification;
285
284
  }
286
- export interface RedeemMemberPointsForDiscountAmountCouponResponse {
285
+ interface RedeemMemberPointsForDiscountAmountCouponResponse {
287
286
  /** Created loyalty coupon. */
288
287
  coupon?: LoyaltyCoupon;
289
288
  /** Transaction id of the coupon redemption */
290
289
  transactionId?: string;
291
290
  }
292
- export interface GetLoyaltyCouponRequest {
291
+ interface GetLoyaltyCouponRequest {
293
292
  /**
294
293
  * ID of the loyalty coupon to retrieve.
295
294
  * @format GUID
296
295
  */
297
296
  loyaltyCouponId: string;
298
297
  }
299
- export interface GetLoyaltyCouponResponse {
298
+ interface GetLoyaltyCouponResponse {
300
299
  /** Retrieved loyalty coupon. */
301
300
  loyaltyCoupon?: LoyaltyCoupon;
302
301
  }
303
- export interface BulkGetLoyaltyCouponRequest {
302
+ interface BulkGetLoyaltyCouponRequest {
304
303
  /** Query to filter loyalty coupons. */
305
304
  query?: CursorQuery;
306
305
  }
307
- export interface CursorQuery extends CursorQueryPagingMethodOneOf {
306
+ interface CursorQuery extends CursorQueryPagingMethodOneOf {
308
307
  /**
309
308
  * Cursor paging options.
310
309
  *
@@ -326,7 +325,7 @@ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
326
325
  sort?: Sorting[];
327
326
  }
328
327
  /** @oneof */
329
- export interface CursorQueryPagingMethodOneOf {
328
+ interface CursorQueryPagingMethodOneOf {
330
329
  /**
331
330
  * Cursor paging options.
332
331
  *
@@ -334,7 +333,7 @@ export interface CursorQueryPagingMethodOneOf {
334
333
  */
335
334
  cursorPaging?: CursorPaging;
336
335
  }
337
- export interface Sorting {
336
+ interface Sorting {
338
337
  /**
339
338
  * Name of the field to sort by.
340
339
  * @maxLength 512
@@ -343,13 +342,13 @@ export interface Sorting {
343
342
  /** Sort order. */
344
343
  order?: SortOrderWithLiterals;
345
344
  }
346
- export declare enum SortOrder {
345
+ declare enum SortOrder {
347
346
  ASC = "ASC",
348
347
  DESC = "DESC"
349
348
  }
350
349
  /** @enumType */
351
- export type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
352
- export interface CursorPaging {
350
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
351
+ interface CursorPaging {
353
352
  /**
354
353
  * Maximum number of items to return in the results.
355
354
  * @max 100
@@ -364,14 +363,14 @@ export interface CursorPaging {
364
363
  */
365
364
  cursor?: string | null;
366
365
  }
367
- export interface BulkGetLoyaltyCouponResponse {
366
+ interface BulkGetLoyaltyCouponResponse {
368
367
  /**
369
368
  * Retrieved loyalty coupons.
370
369
  * @maxSize 100
371
370
  */
372
371
  couponsInSite?: CouponsInSite[];
373
372
  }
374
- export interface CouponsInSite {
373
+ interface CouponsInSite {
375
374
  /**
376
375
  * Metasite id
377
376
  * @format GUID
@@ -383,17 +382,17 @@ export interface CouponsInSite {
383
382
  */
384
383
  loyaltyCoupons?: LoyaltyCoupon[];
385
384
  }
386
- export interface GetCurrentMemberCouponsRequest {
385
+ interface GetCurrentMemberCouponsRequest {
387
386
  }
388
- export interface GetCurrentMemberCouponsResponse {
387
+ interface GetCurrentMemberCouponsResponse {
389
388
  /** Retrieved loyalty coupons. */
390
389
  loyaltyCoupons?: LoyaltyCoupon[];
391
390
  }
392
- export interface QueryLoyaltyCouponRequest {
391
+ interface QueryLoyaltyCouponRequest {
393
392
  /** Query options. */
394
393
  query: QueryV2;
395
394
  }
396
- export interface QueryV2 extends QueryV2PagingMethodOneOf {
395
+ interface QueryV2 extends QueryV2PagingMethodOneOf {
397
396
  /** Paging options to limit and skip the number of items. */
398
397
  paging?: Paging;
399
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`. */
@@ -416,25 +415,25 @@ export interface QueryV2 extends QueryV2PagingMethodOneOf {
416
415
  fieldsets?: string[];
417
416
  }
418
417
  /** @oneof */
419
- export interface QueryV2PagingMethodOneOf {
418
+ interface QueryV2PagingMethodOneOf {
420
419
  /** Paging options to limit and skip the number of items. */
421
420
  paging?: Paging;
422
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`. */
423
422
  cursorPaging?: CursorPaging;
424
423
  }
425
- export interface Paging {
424
+ interface Paging {
426
425
  /** Number of items to load. */
427
426
  limit?: number | null;
428
427
  /** Number of items to skip in the current sort order. */
429
428
  offset?: number | null;
430
429
  }
431
- export interface QueryLoyaltyCouponResponse {
430
+ interface QueryLoyaltyCouponResponse {
432
431
  /** Retrieved loyalty coupons. */
433
432
  loyaltyCoupons?: LoyaltyCoupon[];
434
433
  /** Metadata. */
435
434
  metadata?: PagingMetadataV2;
436
435
  }
437
- export interface PagingMetadataV2 {
436
+ interface PagingMetadataV2 {
438
437
  /** Number of items returned in the response. */
439
438
  count?: number | null;
440
439
  /** Offset that was requested. */
@@ -446,7 +445,7 @@ export interface PagingMetadataV2 {
446
445
  /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
447
446
  cursors?: Cursors;
448
447
  }
449
- export interface Cursors {
448
+ interface Cursors {
450
449
  /**
451
450
  * Cursor string pointing to the next page in the list of results.
452
451
  * @maxLength 16000
@@ -458,7 +457,7 @@ export interface Cursors {
458
457
  */
459
458
  prev?: string | null;
460
459
  }
461
- export interface DeleteLoyaltyCouponRequest {
460
+ interface DeleteLoyaltyCouponRequest {
462
461
  /**
463
462
  * ID of the loyalty coupon to delete.
464
463
  * @format GUID
@@ -471,9 +470,9 @@ export interface DeleteLoyaltyCouponRequest {
471
470
  */
472
471
  revision?: string;
473
472
  }
474
- export interface DeleteLoyaltyCouponResponse {
473
+ interface DeleteLoyaltyCouponResponse {
475
474
  }
476
- export interface DomainEvent extends DomainEventBodyOneOf {
475
+ interface DomainEvent extends DomainEventBodyOneOf {
477
476
  createdEvent?: EntityCreatedEvent;
478
477
  updatedEvent?: EntityUpdatedEvent;
479
478
  deletedEvent?: EntityDeletedEvent;
@@ -508,19 +507,19 @@ export interface DomainEvent extends DomainEventBodyOneOf {
508
507
  entityEventSequence?: string | null;
509
508
  }
510
509
  /** @oneof */
511
- export interface DomainEventBodyOneOf {
510
+ interface DomainEventBodyOneOf {
512
511
  createdEvent?: EntityCreatedEvent;
513
512
  updatedEvent?: EntityUpdatedEvent;
514
513
  deletedEvent?: EntityDeletedEvent;
515
514
  actionEvent?: ActionEvent;
516
515
  }
517
- export interface EntityCreatedEvent {
516
+ interface EntityCreatedEvent {
518
517
  entity?: string;
519
518
  }
520
- export interface RestoreInfo {
519
+ interface RestoreInfo {
521
520
  deletedDate?: Date | null;
522
521
  }
523
- export interface EntityUpdatedEvent {
522
+ interface EntityUpdatedEvent {
524
523
  /**
525
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.
526
525
  * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
@@ -528,16 +527,16 @@ export interface EntityUpdatedEvent {
528
527
  */
529
528
  currentEntity?: string;
530
529
  }
531
- export interface EntityDeletedEvent {
530
+ interface EntityDeletedEvent {
532
531
  /** Entity that was deleted. */
533
532
  deletedEntity?: string | null;
534
533
  }
535
- export interface ActionEvent {
534
+ interface ActionEvent {
536
535
  body?: string;
537
536
  }
538
- export interface Empty {
537
+ interface Empty {
539
538
  }
540
- export interface MessageEnvelope {
539
+ interface MessageEnvelope {
541
540
  /**
542
541
  * App instance ID.
543
542
  * @format GUID
@@ -553,7 +552,7 @@ export interface MessageEnvelope {
553
552
  /** Stringify payload. */
554
553
  data?: string;
555
554
  }
556
- export interface IdentificationData extends IdentificationDataIdOneOf {
555
+ interface IdentificationData extends IdentificationDataIdOneOf {
557
556
  /**
558
557
  * ID of a site visitor that has not logged in to the site.
559
558
  * @format GUID
@@ -578,7 +577,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
578
577
  identityType?: WebhookIdentityTypeWithLiterals;
579
578
  }
580
579
  /** @oneof */
581
- export interface IdentificationDataIdOneOf {
580
+ interface IdentificationDataIdOneOf {
582
581
  /**
583
582
  * ID of a site visitor that has not logged in to the site.
584
583
  * @format GUID
@@ -600,7 +599,7 @@ export interface IdentificationDataIdOneOf {
600
599
  */
601
600
  appId?: string;
602
601
  }
603
- export declare enum WebhookIdentityType {
602
+ declare enum WebhookIdentityType {
604
603
  UNKNOWN = "UNKNOWN",
605
604
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
606
605
  MEMBER = "MEMBER",
@@ -608,8 +607,8 @@ export declare enum WebhookIdentityType {
608
607
  APP = "APP"
609
608
  }
610
609
  /** @enumType */
611
- export type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
612
- export interface BaseEventMetadata {
610
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
611
+ interface BaseEventMetadata {
613
612
  /**
614
613
  * App instance ID.
615
614
  * @format GUID
@@ -623,7 +622,7 @@ export interface BaseEventMetadata {
623
622
  /** The identification type and identity data. */
624
623
  identity?: IdentificationData;
625
624
  }
626
- export interface EventMetadata extends BaseEventMetadata {
625
+ interface EventMetadata extends BaseEventMetadata {
627
626
  /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
628
627
  _id?: string;
629
628
  /**
@@ -653,164 +652,24 @@ export interface EventMetadata extends BaseEventMetadata {
653
652
  */
654
653
  entityEventSequence?: string | null;
655
654
  }
656
- export interface CouponCreatedEnvelope {
655
+ interface CouponCreatedEnvelope {
657
656
  entity: LoyaltyCoupon;
658
657
  metadata: EventMetadata;
659
658
  }
660
- /**
661
- * Triggered when a loyalty coupon is created.
662
- * @permissionScope Read Loyalty
663
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
664
- * @permissionScope Manage Loyalty
665
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
666
- * @permissionScope Manage Restaurants - all permissions
667
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
668
- * @permissionId LOYALTY.READ_COUPONS
669
- * @webhook
670
- * @eventType wix.loyalty.v1.coupon_created
671
- * @serviceIdentifier com.wixpress.loyalty.coupon.LoyaltyCoupons
672
- * @slug created
673
- */
674
- export declare function onCouponCreated(handler: (event: CouponCreatedEnvelope) => void | Promise<void>): void;
675
- export interface CouponDeletedEnvelope {
659
+ interface CouponDeletedEnvelope {
676
660
  metadata: EventMetadata;
677
661
  }
678
- /**
679
- * Triggered when a loyalty coupon is deleted.
680
- * @permissionScope Read Loyalty
681
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
682
- * @permissionScope Manage Loyalty
683
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
684
- * @permissionScope Manage Restaurants - all permissions
685
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
686
- * @permissionId LOYALTY.READ_COUPONS
687
- * @webhook
688
- * @eventType wix.loyalty.v1.coupon_deleted
689
- * @serviceIdentifier com.wixpress.loyalty.coupon.LoyaltyCoupons
690
- * @slug deleted
691
- */
692
- export declare function onCouponDeleted(handler: (event: CouponDeletedEnvelope) => void | Promise<void>): void;
693
- 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`;
694
- /**
695
- * Redeems a customer's loyalty points for a loyalty reward and creates a loyalty coupon.
696
- *
697
- * Creating a loyalty coupon also creates a corresponding "reference" coupon with the [Coupons API](https://dev.wix.com/api/rest/coupons/about-wix-coupons).
698
- * The customer receives the reference coupon, which they can apply to their order. The loyalty coupon and its corresponding reference coupon
699
- * are linked and the loyalty coupon's `status` reflects the current state of the reference coupon.
700
- *
701
- * Check which loyalty rewards a site has available with [List Rewards](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/list-rewards).
702
- * @param rewardId - ID of the [loyalty reward](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/reward-object) to redeem.
703
- * @public
704
- * @requiredField options
705
- * @requiredField options.loyaltyAccountId
706
- * @requiredField rewardId
707
- * @permissionId LOYALTY.REDEEM_COUPON
708
- * @permissionScope Manage Restaurants - all permissions
709
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
710
- * @applicableIdentity APP
711
- * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.RedeemPointsForCoupon
712
- */
713
- export declare function redeemPointsForCoupon(rewardId: string, options: NonNullablePaths<RedeemPointsForCouponOptions, `loyaltyAccountId`>): Promise<NonNullablePaths<RedeemPointsForCouponResponse, {
714
- [P in CouponNonNullablePaths]: `coupon.${P}`;
715
- }[CouponNonNullablePaths]>>;
716
- export interface RedeemPointsForCouponOptions {
662
+ interface RedeemPointsForCouponOptions {
717
663
  /**
718
664
  * ID of the [loyalty account](https://dev.wix.com/docs/rest/crm/loyalty-program/accounts/account-object) of the customer redeeming points.
719
665
  * @format GUID
720
666
  */
721
667
  loyaltyAccountId: string;
722
668
  }
723
- /**
724
- * Redeems a current customer's loyalty points for a loyalty reward and creates a loyalty coupon.
725
- *
726
- * Creating a loyalty coupon also creates a corresponding "reference" coupon with the [Coupons API](https://dev.wix.com/api/rest/coupons/about-wix-coupons).
727
- * The customer receives the reference coupon, which they can apply to their order. The loyalty coupon and its corresponding reference coupon
728
- * are linked and the loyalty coupon's `status` reflects the current state of the reference coupon.
729
- *
730
- * Check which loyalty rewards a site has available with [List Rewards](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/list-rewards).
731
- *
732
- * >**Note:**
733
- * >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).
734
- * @param rewardId - ID of the [loyalty reward](https://dev.wix.com/docs/rest/crm/loyalty-program/rewards/reward-object) to redeem.
735
- * @public
736
- * @requiredField rewardId
737
- * @permissionId LOYALTY.REDEEM_OWN_COUPON
738
- * @permissionScope Manage Loyalty
739
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
740
- * @permissionScope Manage Restaurants - all permissions
741
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
742
- * @applicableIdentity APP
743
- * @applicableIdentity MEMBER
744
- * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.RedeemCurrentMemberPointsForCoupon
745
- */
746
- export declare function redeemCurrentMemberPointsForCoupon(rewardId: string): Promise<NonNullablePaths<RedeemCurrentMemberPointsForCouponResponse, {
747
- [P in CouponNonNullablePaths]: `coupon.${P}`;
748
- }[CouponNonNullablePaths]>>;
749
- /**
750
- * Retrieves a loyalty coupon.
751
- * @param loyaltyCouponId - ID of the loyalty coupon to retrieve.
752
- * @public
753
- * @requiredField loyaltyCouponId
754
- * @permissionId LOYALTY.READ_COUPONS
755
- * @permissionScope Read Loyalty
756
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
757
- * @permissionScope Manage Loyalty
758
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
759
- * @permissionScope Manage Restaurants - all permissions
760
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
761
- * @applicableIdentity APP
762
- * @returns Retrieved loyalty coupon.
763
- * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.GetLoyaltyCoupon
764
- */
765
- export declare function getLoyaltyCoupon(loyaltyCouponId: string): Promise<NonNullablePaths<LoyaltyCoupon, CouponNonNullablePaths>>;
766
- /**
767
- * Retrieves a sequence of loyalty coupons
768
- * @public
769
- * @documentationMaturity preview
770
- * @permissionId LOYALTY.REWARD_BULK_READ
771
- * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.BulkGetLoyaltyCoupon
772
- */
773
- export declare function bulkGetLoyaltyCoupon(options?: BulkGetLoyaltyCouponOptions): Promise<NonNullablePaths<BulkGetLoyaltyCouponResponse, `couponsInSite` | `couponsInSite.${number}.metaSiteId` | {
774
- [P in CouponNonNullablePaths]: `couponsInSite.${number}.loyaltyCoupons.${number}.${P}`;
775
- }[CouponNonNullablePaths]>>;
776
- export interface BulkGetLoyaltyCouponOptions {
669
+ interface BulkGetLoyaltyCouponOptions {
777
670
  /** Query to filter loyalty coupons. */
778
671
  query?: CursorQuery;
779
672
  }
780
- /**
781
- * Retrieves the loyalty coupons for the currently logged-in member.
782
- *
783
- * >**Note:**
784
- * >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).
785
- * @public
786
- * @permissionId LOYALTY.READ_OWN_COUPONS
787
- * @permissionScope Read Loyalty
788
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
789
- * @permissionScope Manage Loyalty
790
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
791
- * @permissionScope Manage Restaurants - all permissions
792
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
793
- * @applicableIdentity APP
794
- * @applicableIdentity MEMBER
795
- * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.GetCurrentMemberCoupons
796
- */
797
- export declare function getCurrentMemberCoupons(): Promise<NonNullablePaths<GetCurrentMemberCouponsResponse, {
798
- [P in CouponNonNullablePaths]: `loyaltyCoupons.${number}.${P}`;
799
- }[CouponNonNullablePaths]>>;
800
- /**
801
- * Retrieves a list of loyalty coupons, given the provided paging, filtering, and sorting.
802
- * @public
803
- * @permissionScope Read Loyalty
804
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
805
- * @permissionScope Manage Loyalty
806
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
807
- * @permissionScope Manage Restaurants - all permissions
808
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
809
- * @permissionId LOYALTY.READ_COUPONS
810
- * @applicableIdentity APP
811
- * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.QueryLoyaltyCoupon
812
- */
813
- export declare function queryLoyaltyCoupons(): LoyaltyCouponsQueryBuilder;
814
673
  interface QueryCursorResult {
815
674
  cursors: Cursors;
816
675
  hasNext: () => boolean;
@@ -818,13 +677,13 @@ interface QueryCursorResult {
818
677
  length: number;
819
678
  pageSize: number;
820
679
  }
821
- export interface LoyaltyCouponsQueryResult extends QueryCursorResult {
680
+ interface LoyaltyCouponsQueryResult extends QueryCursorResult {
822
681
  items: LoyaltyCoupon[];
823
682
  query: LoyaltyCouponsQueryBuilder;
824
683
  next: () => Promise<LoyaltyCouponsQueryResult>;
825
684
  prev: () => Promise<LoyaltyCouponsQueryResult>;
826
685
  }
827
- export interface LoyaltyCouponsQueryBuilder {
686
+ interface LoyaltyCouponsQueryBuilder {
828
687
  /** @param propertyName - Property whose value is compared with `value`.
829
688
  * @param value - Value to compare against.
830
689
  */
@@ -869,24 +728,5 @@ export interface LoyaltyCouponsQueryBuilder {
869
728
  skipTo: (cursor: string) => LoyaltyCouponsQueryBuilder;
870
729
  find: () => Promise<LoyaltyCouponsQueryResult>;
871
730
  }
872
- /**
873
- * Deletes a loyalty coupon.
874
- *
875
- * The deletion of a loyalty coupon does not impact the functionality of the corresponding coupon itself.
876
- * @param _id - ID of the loyalty coupon to delete.
877
- * @param revision - Revision number, which increments by 1 each time the loyalty coupon is updated.
878
- *
879
- * To prevent conflicting changes, the current `revision` must be passed when updating the loyalty coupon.
880
- * @public
881
- * @requiredField _id
882
- * @requiredField revision
883
- * @permissionId LOYALTY.MANAGE_COUPONS
884
- * @permissionScope Manage Loyalty
885
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
886
- * @permissionScope Manage Restaurants - all permissions
887
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
888
- * @applicableIdentity APP
889
- * @fqn com.wixpress.loyalty.coupon.LoyaltyCoupons.DeleteLoyaltyCoupon
890
- */
891
- export declare function deleteLoyaltyCoupon(_id: string, revision: string): Promise<void>;
892
- 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 };