@wix/auto_sdk_loyalty_rewards 1.0.4 → 1.0.6

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