@wix/auto_sdk_loyalty_rewards 1.0.6 → 1.0.8

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 (134) hide show
  1. package/build/index.d.mts +128 -0
  2. package/build/index.d.ts +128 -0
  3. package/build/index.js +834 -0
  4. package/build/index.js.map +1 -0
  5. package/build/index.mjs +797 -0
  6. package/build/index.mjs.map +1 -0
  7. package/build/internal/index.d.mts +128 -0
  8. package/build/internal/index.d.ts +128 -0
  9. package/build/internal/index.js +834 -0
  10. package/build/internal/index.js.map +1 -0
  11. package/build/internal/index.mjs +797 -0
  12. package/build/internal/index.mjs.map +1 -0
  13. package/build/{es/src/loyalty-v1-reward-rewards.types.d.ts → internal/loyalty-v1-reward-rewards.universal-BFnbQRqi.d.mts} +202 -87
  14. package/build/{cjs/src/loyalty-v1-reward-rewards.types.d.ts → internal/loyalty-v1-reward-rewards.universal-BFnbQRqi.d.ts} +202 -87
  15. package/build/internal/meta.d.mts +476 -0
  16. package/build/internal/meta.d.ts +476 -0
  17. package/build/internal/meta.js +597 -0
  18. package/build/internal/meta.js.map +1 -0
  19. package/build/internal/meta.mjs +563 -0
  20. package/build/internal/meta.mjs.map +1 -0
  21. package/build/{internal/cjs/src/loyalty-v1-reward-rewards.types.d.ts → loyalty-v1-reward-rewards.universal-BFnbQRqi.d.mts} +202 -87
  22. package/build/{internal/es/src/loyalty-v1-reward-rewards.types.d.ts → loyalty-v1-reward-rewards.universal-BFnbQRqi.d.ts} +202 -87
  23. package/build/meta.d.mts +476 -0
  24. package/build/meta.d.ts +476 -0
  25. package/build/meta.js +597 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +563 -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-reward-rewards.context.d.ts +0 -28
  40. package/build/cjs/src/loyalty-v1-reward-rewards.context.js +0 -34
  41. package/build/cjs/src/loyalty-v1-reward-rewards.context.js.map +0 -1
  42. package/build/cjs/src/loyalty-v1-reward-rewards.http.d.ts +0 -56
  43. package/build/cjs/src/loyalty-v1-reward-rewards.http.js +0 -464
  44. package/build/cjs/src/loyalty-v1-reward-rewards.http.js.map +0 -1
  45. package/build/cjs/src/loyalty-v1-reward-rewards.meta.d.ts +0 -26
  46. package/build/cjs/src/loyalty-v1-reward-rewards.meta.js +0 -180
  47. package/build/cjs/src/loyalty-v1-reward-rewards.meta.js.map +0 -1
  48. package/build/cjs/src/loyalty-v1-reward-rewards.public.d.ts +0 -107
  49. package/build/cjs/src/loyalty-v1-reward-rewards.public.js +0 -119
  50. package/build/cjs/src/loyalty-v1-reward-rewards.public.js.map +0 -1
  51. package/build/cjs/src/loyalty-v1-reward-rewards.types.js +0 -29
  52. package/build/cjs/src/loyalty-v1-reward-rewards.types.js.map +0 -1
  53. package/build/cjs/src/loyalty-v1-reward-rewards.universal.d.ts +0 -920
  54. package/build/cjs/src/loyalty-v1-reward-rewards.universal.js +0 -373
  55. package/build/cjs/src/loyalty-v1-reward-rewards.universal.js.map +0 -1
  56. package/build/es/index.d.ts +0 -1
  57. package/build/es/index.js +0 -2
  58. package/build/es/index.js.map +0 -1
  59. package/build/es/index.typings.d.ts +0 -1
  60. package/build/es/index.typings.js +0 -2
  61. package/build/es/index.typings.js.map +0 -1
  62. package/build/es/meta.d.ts +0 -1
  63. package/build/es/meta.js +0 -2
  64. package/build/es/meta.js.map +0 -1
  65. package/build/es/package.json +0 -3
  66. package/build/es/src/loyalty-v1-reward-rewards.context.d.ts +0 -28
  67. package/build/es/src/loyalty-v1-reward-rewards.context.js +0 -28
  68. package/build/es/src/loyalty-v1-reward-rewards.context.js.map +0 -1
  69. package/build/es/src/loyalty-v1-reward-rewards.http.d.ts +0 -56
  70. package/build/es/src/loyalty-v1-reward-rewards.http.js +0 -453
  71. package/build/es/src/loyalty-v1-reward-rewards.http.js.map +0 -1
  72. package/build/es/src/loyalty-v1-reward-rewards.meta.d.ts +0 -26
  73. package/build/es/src/loyalty-v1-reward-rewards.meta.js +0 -146
  74. package/build/es/src/loyalty-v1-reward-rewards.meta.js.map +0 -1
  75. package/build/es/src/loyalty-v1-reward-rewards.public.d.ts +0 -107
  76. package/build/es/src/loyalty-v1-reward-rewards.public.js +0 -105
  77. package/build/es/src/loyalty-v1-reward-rewards.public.js.map +0 -1
  78. package/build/es/src/loyalty-v1-reward-rewards.types.js +0 -26
  79. package/build/es/src/loyalty-v1-reward-rewards.types.js.map +0 -1
  80. package/build/es/src/loyalty-v1-reward-rewards.universal.d.ts +0 -920
  81. package/build/es/src/loyalty-v1-reward-rewards.universal.js +0 -339
  82. package/build/es/src/loyalty-v1-reward-rewards.universal.js.map +0 -1
  83. package/build/internal/cjs/index.d.ts +0 -1
  84. package/build/internal/cjs/index.js +0 -18
  85. package/build/internal/cjs/index.js.map +0 -1
  86. package/build/internal/cjs/index.typings.d.ts +0 -1
  87. package/build/internal/cjs/index.typings.js +0 -18
  88. package/build/internal/cjs/index.typings.js.map +0 -1
  89. package/build/internal/cjs/meta.d.ts +0 -1
  90. package/build/internal/cjs/meta.js +0 -18
  91. package/build/internal/cjs/meta.js.map +0 -1
  92. package/build/internal/cjs/src/loyalty-v1-reward-rewards.context.d.ts +0 -28
  93. package/build/internal/cjs/src/loyalty-v1-reward-rewards.context.js +0 -34
  94. package/build/internal/cjs/src/loyalty-v1-reward-rewards.context.js.map +0 -1
  95. package/build/internal/cjs/src/loyalty-v1-reward-rewards.http.d.ts +0 -56
  96. package/build/internal/cjs/src/loyalty-v1-reward-rewards.http.js +0 -464
  97. package/build/internal/cjs/src/loyalty-v1-reward-rewards.http.js.map +0 -1
  98. package/build/internal/cjs/src/loyalty-v1-reward-rewards.meta.d.ts +0 -26
  99. package/build/internal/cjs/src/loyalty-v1-reward-rewards.meta.js +0 -180
  100. package/build/internal/cjs/src/loyalty-v1-reward-rewards.meta.js.map +0 -1
  101. package/build/internal/cjs/src/loyalty-v1-reward-rewards.public.d.ts +0 -107
  102. package/build/internal/cjs/src/loyalty-v1-reward-rewards.public.js +0 -119
  103. package/build/internal/cjs/src/loyalty-v1-reward-rewards.public.js.map +0 -1
  104. package/build/internal/cjs/src/loyalty-v1-reward-rewards.types.js +0 -29
  105. package/build/internal/cjs/src/loyalty-v1-reward-rewards.types.js.map +0 -1
  106. package/build/internal/cjs/src/loyalty-v1-reward-rewards.universal.d.ts +0 -920
  107. package/build/internal/cjs/src/loyalty-v1-reward-rewards.universal.js +0 -373
  108. package/build/internal/cjs/src/loyalty-v1-reward-rewards.universal.js.map +0 -1
  109. package/build/internal/es/index.d.ts +0 -1
  110. package/build/internal/es/index.js +0 -2
  111. package/build/internal/es/index.js.map +0 -1
  112. package/build/internal/es/index.typings.d.ts +0 -1
  113. package/build/internal/es/index.typings.js +0 -2
  114. package/build/internal/es/index.typings.js.map +0 -1
  115. package/build/internal/es/meta.d.ts +0 -1
  116. package/build/internal/es/meta.js +0 -2
  117. package/build/internal/es/meta.js.map +0 -1
  118. package/build/internal/es/src/loyalty-v1-reward-rewards.context.d.ts +0 -28
  119. package/build/internal/es/src/loyalty-v1-reward-rewards.context.js +0 -28
  120. package/build/internal/es/src/loyalty-v1-reward-rewards.context.js.map +0 -1
  121. package/build/internal/es/src/loyalty-v1-reward-rewards.http.d.ts +0 -56
  122. package/build/internal/es/src/loyalty-v1-reward-rewards.http.js +0 -453
  123. package/build/internal/es/src/loyalty-v1-reward-rewards.http.js.map +0 -1
  124. package/build/internal/es/src/loyalty-v1-reward-rewards.meta.d.ts +0 -26
  125. package/build/internal/es/src/loyalty-v1-reward-rewards.meta.js +0 -146
  126. package/build/internal/es/src/loyalty-v1-reward-rewards.meta.js.map +0 -1
  127. package/build/internal/es/src/loyalty-v1-reward-rewards.public.d.ts +0 -107
  128. package/build/internal/es/src/loyalty-v1-reward-rewards.public.js +0 -105
  129. package/build/internal/es/src/loyalty-v1-reward-rewards.public.js.map +0 -1
  130. package/build/internal/es/src/loyalty-v1-reward-rewards.types.js +0 -26
  131. package/build/internal/es/src/loyalty-v1-reward-rewards.types.js.map +0 -1
  132. package/build/internal/es/src/loyalty-v1-reward-rewards.universal.d.ts +0 -920
  133. package/build/internal/es/src/loyalty-v1-reward-rewards.universal.js +0 -339
  134. package/build/internal/es/src/loyalty-v1-reward-rewards.universal.js.map +0 -1
@@ -2,7 +2,7 @@
2
2
  * A loyalty reward is an object a customer can redeem with loyalty points.
3
3
  * Redeeming a reward then creates a loyalty coupon that the customer can use.
4
4
  */
5
- export interface Reward extends RewardTypeDetailsOneOf {
5
+ interface Reward extends RewardTypeDetailsOneOf {
6
6
  /** Discount details. */
7
7
  discountAmount?: DiscountAmount;
8
8
  /** Coupon details. */
@@ -12,7 +12,7 @@ export interface Reward extends RewardTypeDetailsOneOf {
12
12
  * @format GUID
13
13
  * @readonly
14
14
  */
15
- id?: string | null;
15
+ _id?: string | null;
16
16
  /**
17
17
  * Reward name.
18
18
  * @minLength 1
@@ -22,7 +22,7 @@ export interface Reward extends RewardTypeDetailsOneOf {
22
22
  /** Whether the reward is active. Default: `FALSE` */
23
23
  active?: boolean;
24
24
  /** Reward type. */
25
- type?: RewardType;
25
+ type?: RewardTypeWithLiterals;
26
26
  /**
27
27
  * Revision number, which increments by 1 each time the loyalty reward is updated.
28
28
  *
@@ -34,22 +34,22 @@ export interface Reward extends RewardTypeDetailsOneOf {
34
34
  * Date and time the reward was created.
35
35
  * @readonly
36
36
  */
37
- createdDate?: Date | null;
37
+ _createdDate?: Date | null;
38
38
  /**
39
39
  * Date and time the reward was last updated.
40
40
  * @readonly
41
41
  */
42
- updatedDate?: Date | null;
42
+ _updatedDate?: Date | null;
43
43
  }
44
44
  /** @oneof */
45
- export interface RewardTypeDetailsOneOf {
45
+ interface RewardTypeDetailsOneOf {
46
46
  /** Discount details. */
47
47
  discountAmount?: DiscountAmount;
48
48
  /** Coupon details. */
49
49
  couponReward?: CouponReward;
50
50
  }
51
51
  /** Available reward types. */
52
- export declare enum RewardType {
52
+ declare enum RewardType {
53
53
  /** Undefined reward type. */
54
54
  UNDEFINED = "UNDEFINED",
55
55
  /** Discount reward. Special flexible reward type used in checkout. */
@@ -59,14 +59,16 @@ export declare enum RewardType {
59
59
  /** For internal use. */
60
60
  SPI_DISCOUNT_AMOUNT = "SPI_DISCOUNT_AMOUNT"
61
61
  }
62
- export interface DiscountAmount {
62
+ /** @enumType */
63
+ type RewardTypeWithLiterals = RewardType | 'UNDEFINED' | 'DISCOUNT_AMOUNT' | 'COUPON_REWARD' | 'SPI_DISCOUNT_AMOUNT';
64
+ interface DiscountAmount {
63
65
  /**
64
66
  * Discount details for each tier.
65
67
  * @maxSize 21
66
68
  */
67
69
  configsByTier?: DiscountAmountConfig[];
68
70
  }
69
- export interface DiscountAmountConfig {
71
+ interface DiscountAmountConfig {
70
72
  /**
71
73
  * Discount amount. Must be a positive value.
72
74
  * @format DECIMAL_VALUE
@@ -85,7 +87,7 @@ export interface DiscountAmountConfig {
85
87
  */
86
88
  costInPoints?: number;
87
89
  }
88
- export interface CouponReward extends CouponRewardDiscountTypeOneOf, CouponRewardScopeOrMinSubtotalOneOf {
90
+ interface CouponReward extends CouponRewardDiscountTypeOneOf, CouponRewardScopeOrMinSubtotalOneOf {
89
91
  /** Discount as a fixed amount. */
90
92
  fixedAmount?: FixedAmountDiscount;
91
93
  /** Discount as a percentage. */
@@ -96,25 +98,27 @@ export interface CouponReward extends CouponRewardDiscountTypeOneOf, CouponRewar
96
98
  minimumSubtotal?: number;
97
99
  /**
98
100
  * Specifies the type of line items this coupon will apply to.
99
- * For more information, see [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values).
101
+ *
102
+ * For more information, see the Coupons API.
100
103
  */
101
104
  scope?: CouponScope;
102
105
  /** Whether the coupon is limited to one item. */
103
106
  limitedToOneItem?: boolean | null;
104
- /** Whether the coupon also applies to subscriptions. */
105
- appliesToSubscriptions?: boolean | null;
106
107
  /**
107
- * Specifies the amount of discounted cycles for a subscription item.
108
+ * Whether the coupon applies to subscription products.
108
109
  *
109
- * Can only be set when `appliesToSubscriptions` is `true` and `scope.namespace` is `pricingPlans`.
110
- * If `discountedCycleCount` is empty, the coupon applies to all available cycles.
110
+ * If set to `true`, the discount will apply to all billing cycles.
111
+ */
112
+ appliesToSubscriptions?: boolean | null;
113
+ /**
114
+ * Reserved for internal use.
111
115
  * @min 1
112
116
  * @max 999
113
117
  */
114
118
  discountedCycleCount?: number | null;
115
119
  }
116
120
  /** @oneof */
117
- export interface CouponRewardDiscountTypeOneOf {
121
+ interface CouponRewardDiscountTypeOneOf {
118
122
  /** Discount as a fixed amount. */
119
123
  fixedAmount?: FixedAmountDiscount;
120
124
  /** Discount as a percentage. */
@@ -123,16 +127,17 @@ export interface CouponRewardDiscountTypeOneOf {
123
127
  freeShipping?: FreeShippingDiscount;
124
128
  }
125
129
  /** @oneof */
126
- export interface CouponRewardScopeOrMinSubtotalOneOf {
130
+ interface CouponRewardScopeOrMinSubtotalOneOf {
127
131
  /** Limit the coupon to carts with a subtotal greater than this number. */
128
132
  minimumSubtotal?: number;
129
133
  /**
130
134
  * Specifies the type of line items this coupon will apply to.
131
- * For more information, see [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values).
135
+ *
136
+ * For more information, see the Coupons API.
132
137
  */
133
138
  scope?: CouponScope;
134
139
  }
135
- export interface FixedAmountDiscount {
140
+ interface FixedAmountDiscount {
136
141
  /**
137
142
  * Discount details for each tier.
138
143
  * @minSize 1
@@ -140,7 +145,7 @@ export interface FixedAmountDiscount {
140
145
  */
141
146
  configsByTier?: FixedAmountDiscountConfig[];
142
147
  }
143
- export interface FixedAmountDiscountConfig {
148
+ interface FixedAmountDiscountConfig {
144
149
  /**
145
150
  * Tier ID, or empty if config applies to the base tier.
146
151
  * @format GUID
@@ -155,7 +160,7 @@ export interface FixedAmountDiscountConfig {
155
160
  /** Discount amount. */
156
161
  amount?: number;
157
162
  }
158
- export interface PercentageDiscount {
163
+ interface PercentageDiscount {
159
164
  /**
160
165
  * Discount details for each tier.
161
166
  * @minSize 1
@@ -163,7 +168,7 @@ export interface PercentageDiscount {
163
168
  */
164
169
  configsByTier?: PercentageDiscountConfig[];
165
170
  }
166
- export interface PercentageDiscountConfig {
171
+ interface PercentageDiscountConfig {
167
172
  /**
168
173
  * Tier ID, or empty if config applies to the base tier.
169
174
  * @format GUID
@@ -178,7 +183,7 @@ export interface PercentageDiscountConfig {
178
183
  /** Percentage discount. */
179
184
  percentage?: number;
180
185
  }
181
- export interface FreeShippingDiscount {
186
+ interface FreeShippingDiscount {
182
187
  /**
183
188
  * Discount details for each tier.
184
189
  * @minSize 1
@@ -186,7 +191,7 @@ export interface FreeShippingDiscount {
186
191
  */
187
192
  configsByTier?: FreeShippingDiscountConfig[];
188
193
  }
189
- export interface FreeShippingDiscountConfig {
194
+ interface FreeShippingDiscountConfig {
190
195
  /**
191
196
  * Tier ID, or empty if config applies to the base tier.
192
197
  * @format GUID
@@ -199,31 +204,31 @@ export interface FreeShippingDiscountConfig {
199
204
  */
200
205
  costInPoints?: number;
201
206
  }
202
- export interface CouponScope {
207
+ interface CouponScope {
203
208
  /**
204
209
  * Scope namespace.
205
210
  *
206
- * See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values) for valid namespaces.
211
+ * See the Coupons API for valid namespaces.
207
212
  */
208
213
  namespace?: string;
209
214
  /**
210
215
  * Coupon scope's applied group.
211
216
  *
212
- * See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values) for valid groups.
217
+ * See the Coupons API for valid groups.
213
218
  */
214
219
  group?: Group;
215
220
  }
216
- export interface Group {
221
+ interface Group {
217
222
  /**
218
223
  * Name of coupon scope's group.
219
224
  *
220
- * See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values) for valid groups.
225
+ * See the Coupons API for valid groups.
221
226
  */
222
227
  name?: string;
223
228
  /** Entity ID, if the coupon scope is limited to just one item. */
224
229
  entityId?: string | null;
225
230
  }
226
- export interface SpiDiscountAmount {
231
+ interface SpiDiscountAmount {
227
232
  /**
228
233
  * Discount details for each tier.
229
234
  * @maxSize 21
@@ -235,17 +240,17 @@ export interface SpiDiscountAmount {
235
240
  */
236
241
  description?: string;
237
242
  }
238
- export interface RewardDisabled {
243
+ interface RewardDisabled {
239
244
  }
240
- export interface CreateRewardRequest {
245
+ interface CreateRewardRequest {
241
246
  /** Reward to create. */
242
247
  reward: Reward;
243
248
  }
244
- export interface CreateRewardResponse {
249
+ interface CreateRewardResponse {
245
250
  /** Created reward. */
246
251
  reward?: Reward;
247
252
  }
248
- export interface BulkCreateRewardsRequest {
253
+ interface BulkCreateRewardsRequest {
249
254
  /**
250
255
  * Rewards to create.
251
256
  * @minSize 1
@@ -253,21 +258,21 @@ export interface BulkCreateRewardsRequest {
253
258
  */
254
259
  rewards: Reward[];
255
260
  }
256
- export interface BulkCreateRewardsResponse {
261
+ interface BulkCreateRewardsResponse {
257
262
  /** Created rewards. */
258
263
  results?: BulkRewardResult[];
259
264
  /** Total successes and failures of the bulk create rewards action. */
260
265
  bulkActionMetadata?: BulkActionMetadata;
261
266
  }
262
- export interface BulkRewardResult {
267
+ interface BulkRewardResult {
263
268
  /** Item metadata. */
264
269
  itemMetadata?: ItemMetadata;
265
270
  /** Created reward. */
266
271
  item?: Reward;
267
272
  }
268
- export interface ItemMetadata {
273
+ interface ItemMetadata {
269
274
  /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
270
- id?: string | null;
275
+ _id?: string | null;
271
276
  /** Index of the item within the request array. Allows for correlation between request and response items. */
272
277
  originalIndex?: number;
273
278
  /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
@@ -275,7 +280,7 @@ export interface ItemMetadata {
275
280
  /** Details about the error in case of failure. */
276
281
  error?: ApplicationError;
277
282
  }
278
- export interface ApplicationError {
283
+ interface ApplicationError {
279
284
  /** Error code. */
280
285
  code?: string;
281
286
  /** Description of the error. */
@@ -283,7 +288,7 @@ export interface ApplicationError {
283
288
  /** Data related to the error. */
284
289
  data?: Record<string, any> | null;
285
290
  }
286
- export interface BulkActionMetadata {
291
+ interface BulkActionMetadata {
287
292
  /** Number of items that were successfully processed. */
288
293
  totalSuccesses?: number;
289
294
  /** Number of items that couldn't be processed. */
@@ -291,24 +296,24 @@ export interface BulkActionMetadata {
291
296
  /** Number of failures without details because detailed failure threshold was exceeded. */
292
297
  undetailedFailures?: number;
293
298
  }
294
- export interface GetRewardRequest {
299
+ interface GetRewardRequest {
295
300
  /**
296
301
  * ID of the reward to retrieve.
297
302
  * @format GUID
298
303
  */
299
- id: string;
304
+ _id: string;
300
305
  }
301
- export interface GetRewardResponse {
306
+ interface GetRewardResponse {
302
307
  /** Retrieved reward. */
303
308
  reward?: Reward;
304
309
  }
305
- export interface BulkGetRewardsRequest {
310
+ interface BulkGetRewardsRequest {
306
311
  }
307
- export interface BulkGetRewardsResponse {
312
+ interface BulkGetRewardsResponse {
308
313
  /** Found rewards per site. */
309
314
  rewardsInSite?: RewardsInSite[];
310
315
  }
311
- export interface RewardsInSite {
316
+ interface RewardsInSite {
312
317
  /**
313
318
  * Metasite id.
314
319
  * @format GUID
@@ -317,11 +322,11 @@ export interface RewardsInSite {
317
322
  /** Rewards. */
318
323
  rewards?: Reward[];
319
324
  }
320
- export interface QueryRewardsRequest {
325
+ interface QueryRewardsRequest {
321
326
  /** Query parameters. */
322
327
  query: CursorQuery;
323
328
  }
324
- export interface CursorQuery extends CursorQueryPagingMethodOneOf {
329
+ interface CursorQuery extends CursorQueryPagingMethodOneOf {
325
330
  /**
326
331
  * Cursor paging options.
327
332
  *
@@ -343,7 +348,7 @@ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
343
348
  sort?: Sorting[];
344
349
  }
345
350
  /** @oneof */
346
- export interface CursorQueryPagingMethodOneOf {
351
+ interface CursorQueryPagingMethodOneOf {
347
352
  /**
348
353
  * Cursor paging options.
349
354
  *
@@ -351,20 +356,22 @@ export interface CursorQueryPagingMethodOneOf {
351
356
  */
352
357
  cursorPaging?: CursorPaging;
353
358
  }
354
- export interface Sorting {
359
+ interface Sorting {
355
360
  /**
356
361
  * Name of the field to sort by.
357
362
  * @maxLength 512
358
363
  */
359
364
  fieldName?: string;
360
365
  /** Sort order. */
361
- order?: SortOrder;
366
+ order?: SortOrderWithLiterals;
362
367
  }
363
- export declare enum SortOrder {
368
+ declare enum SortOrder {
364
369
  ASC = "ASC",
365
370
  DESC = "DESC"
366
371
  }
367
- export interface CursorPaging {
372
+ /** @enumType */
373
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
374
+ interface CursorPaging {
368
375
  /**
369
376
  * Maximum number of items to return in the results.
370
377
  * @max 100
@@ -379,13 +386,13 @@ export interface CursorPaging {
379
386
  */
380
387
  cursor?: string | null;
381
388
  }
382
- export interface QueryRewardsResponse {
389
+ interface QueryRewardsResponse {
383
390
  /** Retrieved loyalty rewards. */
384
391
  rewards?: Reward[];
385
392
  /** Details on the paged set of results returned. */
386
393
  pagingMetadata?: CursorPagingMetadata;
387
394
  }
388
- export interface CursorPagingMetadata {
395
+ interface CursorPagingMetadata {
389
396
  /** Number of items returned in current page. */
390
397
  count?: number | null;
391
398
  /** Cursor strings that point to the next page, previous page, or both. */
@@ -398,7 +405,7 @@ export interface CursorPagingMetadata {
398
405
  */
399
406
  hasNext?: boolean | null;
400
407
  }
401
- export interface Cursors {
408
+ interface Cursors {
402
409
  /**
403
410
  * Cursor string pointing to the next page in the list of results.
404
411
  * @maxLength 16000
@@ -410,20 +417,20 @@ export interface Cursors {
410
417
  */
411
418
  prev?: string | null;
412
419
  }
413
- export interface UpdateRewardRequest {
420
+ interface UpdateRewardRequest {
414
421
  /** Reward information to update. */
415
422
  reward: Reward;
416
423
  }
417
- export interface UpdateRewardResponse {
424
+ interface UpdateRewardResponse {
418
425
  /** Updated reward. */
419
426
  reward?: Reward;
420
427
  }
421
- export interface DeleteRewardRequest {
428
+ interface DeleteRewardRequest {
422
429
  /**
423
430
  * ID of the reward to delete.
424
431
  * @format GUID
425
432
  */
426
- id: string;
433
+ _id: string;
427
434
  /**
428
435
  * Revision number, which increments by 1 each time the reward is updated.
429
436
  *
@@ -431,19 +438,19 @@ export interface DeleteRewardRequest {
431
438
  */
432
439
  revision?: string;
433
440
  }
434
- export interface DeleteRewardResponse {
441
+ interface DeleteRewardResponse {
435
442
  }
436
- export interface ListRewardsRequest {
443
+ interface ListRewardsRequest {
437
444
  /** Pagination options. */
438
445
  cursorPaging?: CursorPaging;
439
446
  }
440
- export interface ListRewardsResponse {
447
+ interface ListRewardsResponse {
441
448
  /** Retrieved loyalty rewards. */
442
449
  rewards?: Reward[];
443
450
  /** Details on the paged set of results returned. */
444
451
  pagingMetadata?: PagingMetadataV2;
445
452
  }
446
- export interface PagingMetadataV2 {
453
+ interface PagingMetadataV2 {
447
454
  /** Number of items returned in the response. */
448
455
  count?: number | null;
449
456
  /** Offset that was requested. */
@@ -455,7 +462,7 @@ export interface PagingMetadataV2 {
455
462
  /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
456
463
  cursors?: Cursors;
457
464
  }
458
- export interface ListRewardsInTierRequest {
465
+ interface ListRewardsInTierRequest {
459
466
  /**
460
467
  * Tier id.
461
468
  * @format GUID
@@ -465,13 +472,13 @@ export interface ListRewardsInTierRequest {
465
472
  /** Pagination options. */
466
473
  cursorPaging?: CursorPaging;
467
474
  }
468
- export interface ListRewardsInTierResponse {
475
+ interface ListRewardsInTierResponse {
469
476
  /** Retrieved loyalty rewards. */
470
477
  rewards?: Reward[];
471
478
  /** Details on the paged set of results returned. */
472
479
  pagingMetadata?: PagingMetadataV2;
473
480
  }
474
- export interface DomainEvent extends DomainEventBodyOneOf {
481
+ interface DomainEvent extends DomainEventBodyOneOf {
475
482
  createdEvent?: EntityCreatedEvent;
476
483
  updatedEvent?: EntityUpdatedEvent;
477
484
  deletedEvent?: EntityDeletedEvent;
@@ -480,7 +487,7 @@ export interface DomainEvent extends DomainEventBodyOneOf {
480
487
  * Unique event ID.
481
488
  * Allows clients to ignore duplicate webhooks.
482
489
  */
483
- id?: string;
490
+ _id?: string;
484
491
  /**
485
492
  * Assumes actions are also always typed to an entity_type
486
493
  * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
@@ -514,38 +521,36 @@ export interface DomainEvent extends DomainEventBodyOneOf {
514
521
  entityEventSequence?: string | null;
515
522
  }
516
523
  /** @oneof */
517
- export interface DomainEventBodyOneOf {
524
+ interface DomainEventBodyOneOf {
518
525
  createdEvent?: EntityCreatedEvent;
519
526
  updatedEvent?: EntityUpdatedEvent;
520
527
  deletedEvent?: EntityDeletedEvent;
521
528
  actionEvent?: ActionEvent;
522
529
  }
523
- export interface EntityCreatedEvent {
524
- entityAsJson?: string;
525
- /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
526
- restoreInfo?: RestoreInfo;
530
+ interface EntityCreatedEvent {
531
+ entity?: string;
527
532
  }
528
- export interface RestoreInfo {
533
+ interface RestoreInfo {
529
534
  deletedDate?: Date | null;
530
535
  }
531
- export interface EntityUpdatedEvent {
536
+ interface EntityUpdatedEvent {
532
537
  /**
533
538
  * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
534
539
  * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
535
540
  * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
536
541
  */
537
- currentEntityAsJson?: string;
542
+ currentEntity?: string;
538
543
  }
539
- export interface EntityDeletedEvent {
544
+ interface EntityDeletedEvent {
540
545
  /** Entity that was deleted */
541
- deletedEntityAsJson?: string | null;
546
+ deletedEntity?: string | null;
542
547
  }
543
- export interface ActionEvent {
544
- bodyAsJson?: string;
548
+ interface ActionEvent {
549
+ body?: string;
545
550
  }
546
- export interface Empty {
551
+ interface Empty {
547
552
  }
548
- export interface MessageEnvelope {
553
+ interface MessageEnvelope {
549
554
  /**
550
555
  * App instance ID.
551
556
  * @format GUID
@@ -561,7 +566,7 @@ export interface MessageEnvelope {
561
566
  /** Stringify payload. */
562
567
  data?: string;
563
568
  }
564
- export interface IdentificationData extends IdentificationDataIdOneOf {
569
+ interface IdentificationData extends IdentificationDataIdOneOf {
565
570
  /**
566
571
  * ID of a site visitor that has not logged in to the site.
567
572
  * @format GUID
@@ -583,10 +588,10 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
583
588
  */
584
589
  appId?: string;
585
590
  /** @readonly */
586
- identityType?: WebhookIdentityType;
591
+ identityType?: WebhookIdentityTypeWithLiterals;
587
592
  }
588
593
  /** @oneof */
589
- export interface IdentificationDataIdOneOf {
594
+ interface IdentificationDataIdOneOf {
590
595
  /**
591
596
  * ID of a site visitor that has not logged in to the site.
592
597
  * @format GUID
@@ -608,10 +613,120 @@ export interface IdentificationDataIdOneOf {
608
613
  */
609
614
  appId?: string;
610
615
  }
611
- export declare enum WebhookIdentityType {
616
+ declare enum WebhookIdentityType {
612
617
  UNKNOWN = "UNKNOWN",
613
618
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
614
619
  MEMBER = "MEMBER",
615
620
  WIX_USER = "WIX_USER",
616
621
  APP = "APP"
617
622
  }
623
+ /** @enumType */
624
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
625
+ interface BaseEventMetadata {
626
+ /**
627
+ * App instance ID.
628
+ * @format GUID
629
+ */
630
+ instanceId?: string | null;
631
+ /**
632
+ * Event type.
633
+ * @maxLength 150
634
+ */
635
+ eventType?: string;
636
+ /** The identification type and identity data. */
637
+ identity?: IdentificationData;
638
+ }
639
+ interface EventMetadata extends BaseEventMetadata {
640
+ /**
641
+ * Unique event ID.
642
+ * Allows clients to ignore duplicate webhooks.
643
+ */
644
+ _id?: string;
645
+ /**
646
+ * Assumes actions are also always typed to an entity_type
647
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
648
+ */
649
+ entityFqdn?: string;
650
+ /**
651
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
652
+ * This is although the created/updated/deleted notion is duplication of the oneof types
653
+ * Example: created/updated/deleted/started/completed/email_opened
654
+ */
655
+ slug?: string;
656
+ /** ID of the entity associated with the event. */
657
+ entityId?: string;
658
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
659
+ eventTime?: Date | null;
660
+ /**
661
+ * Whether the event was triggered as a result of a privacy regulation application
662
+ * (for example, GDPR).
663
+ */
664
+ triggeredByAnonymizeRequest?: boolean | null;
665
+ /** If present, indicates the action that triggered the event. */
666
+ originatedFrom?: string | null;
667
+ /**
668
+ * A sequence number defining the order of updates to the underlying entity.
669
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
670
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
671
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
672
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
673
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
674
+ */
675
+ entityEventSequence?: string | null;
676
+ }
677
+ interface RewardCreatedEnvelope {
678
+ entity: Reward;
679
+ metadata: EventMetadata;
680
+ }
681
+ interface RewardDeletedEnvelope {
682
+ metadata: EventMetadata;
683
+ }
684
+ interface RewardUpdatedEnvelope {
685
+ entity: Reward;
686
+ metadata: EventMetadata;
687
+ }
688
+ interface UpdateReward {
689
+ /** Discount details. */
690
+ discountAmount?: DiscountAmount;
691
+ /** Coupon details. */
692
+ couponReward?: CouponReward;
693
+ /**
694
+ * Reward ID.
695
+ * @format GUID
696
+ * @readonly
697
+ */
698
+ _id?: string | null;
699
+ /**
700
+ * Reward name.
701
+ * @minLength 1
702
+ * @maxLength 50
703
+ */
704
+ name?: string;
705
+ /** Whether the reward is active. Default: `FALSE` */
706
+ active?: boolean;
707
+ /** Reward type. */
708
+ type?: RewardTypeWithLiterals;
709
+ /**
710
+ * Revision number, which increments by 1 each time the loyalty reward is updated.
711
+ *
712
+ * To prevent conflicting changes, the current `revision` must be passed when updating the loyalty reward.
713
+ * @readonly
714
+ */
715
+ revision?: string | null;
716
+ /**
717
+ * Date and time the reward was created.
718
+ * @readonly
719
+ */
720
+ _createdDate?: Date | null;
721
+ /**
722
+ * Date and time the reward was last updated.
723
+ * @readonly
724
+ */
725
+ _updatedDate?: Date | null;
726
+ }
727
+ interface ListRewardsOptions {
728
+ /** Pagination options. */
729
+ cursorPaging?: CursorPaging;
730
+ }
731
+
732
+ export { type ListRewardsInTierRequest as $, type ApplicationError as A, type BulkCreateRewardsResponse as B, type CursorQuery as C, type DiscountAmount as D, type BulkGetRewardsRequest as E, type FixedAmountDiscount as F, type Group as G, type RewardsInSite as H, type ItemMetadata as I, type QueryRewardsRequest as J, type CursorQueryPagingMethodOneOf as K, type ListRewardsOptions as L, type Sorting as M, type CursorPaging as N, type CursorPagingMetadata as O, type PercentageDiscount as P, type QueryRewardsResponse as Q, type Reward as R, SortOrder as S, type Cursors as T, type UpdateReward as U, type UpdateRewardRequest as V, WebhookIdentityType as W, type DeleteRewardRequest as X, type DeleteRewardResponse as Y, type ListRewardsRequest as Z, type PagingMetadataV2 as _, type BulkGetRewardsResponse as a, type ListRewardsInTierResponse as a0, type DomainEvent as a1, type DomainEventBodyOneOf as a2, type EntityCreatedEvent as a3, type RestoreInfo as a4, type EntityUpdatedEvent as a5, type EntityDeletedEvent as a6, type ActionEvent as a7, type Empty as a8, type MessageEnvelope as a9, type IdentificationData as aa, type IdentificationDataIdOneOf as ab, type BaseEventMetadata as ac, type EventMetadata as ad, type UpdateRewardResponse as b, type ListRewardsResponse as c, type RewardCreatedEnvelope as d, type RewardDeletedEnvelope as e, type RewardUpdatedEnvelope as f, RewardType as g, type RewardTypeDetailsOneOf as h, type DiscountAmountConfig as i, type CouponReward as j, type CouponRewardDiscountTypeOneOf as k, type CouponRewardScopeOrMinSubtotalOneOf as l, type FixedAmountDiscountConfig as m, type PercentageDiscountConfig as n, type FreeShippingDiscount as o, type FreeShippingDiscountConfig as p, type CouponScope as q, type SpiDiscountAmount as r, type RewardDisabled as s, type CreateRewardRequest as t, type CreateRewardResponse as u, type BulkCreateRewardsRequest as v, type BulkRewardResult as w, type BulkActionMetadata as x, type GetRewardRequest as y, type GetRewardResponse as z };