@wix/auto_sdk_loyalty_rewards 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.d.mts +126 -0
- package/build/index.d.ts +126 -0
- package/build/index.js +834 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +797 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/index.d.mts +126 -0
- package/build/internal/index.d.ts +126 -0
- package/build/internal/index.js +834 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +797 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/{es/src/loyalty-v1-reward-rewards.types.d.ts → internal/loyalty-v1-reward-rewards.universal-DJFLdOGr.d.mts} +186 -177
- package/build/{cjs/src/loyalty-v1-reward-rewards.types.d.ts → internal/loyalty-v1-reward-rewards.universal-DJFLdOGr.d.ts} +186 -177
- package/build/internal/meta.d.mts +472 -0
- package/build/internal/meta.d.ts +472 -0
- package/build/internal/meta.js +597 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +563 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/{internal/cjs/src/loyalty-v1-reward-rewards.types.d.ts → loyalty-v1-reward-rewards.universal-DJFLdOGr.d.mts} +186 -177
- package/build/{internal/es/src/loyalty-v1-reward-rewards.types.d.ts → loyalty-v1-reward-rewards.universal-DJFLdOGr.d.ts} +186 -177
- package/build/meta.d.mts +472 -0
- package/build/meta.d.ts +472 -0
- package/build/meta.js +597 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +563 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +13 -12
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/loyalty-v1-reward-rewards.context.d.ts +0 -28
- package/build/cjs/src/loyalty-v1-reward-rewards.context.js +0 -34
- package/build/cjs/src/loyalty-v1-reward-rewards.context.js.map +0 -1
- package/build/cjs/src/loyalty-v1-reward-rewards.http.d.ts +0 -56
- package/build/cjs/src/loyalty-v1-reward-rewards.http.js +0 -464
- package/build/cjs/src/loyalty-v1-reward-rewards.http.js.map +0 -1
- package/build/cjs/src/loyalty-v1-reward-rewards.meta.d.ts +0 -26
- package/build/cjs/src/loyalty-v1-reward-rewards.meta.js +0 -180
- package/build/cjs/src/loyalty-v1-reward-rewards.meta.js.map +0 -1
- package/build/cjs/src/loyalty-v1-reward-rewards.public.d.ts +0 -107
- package/build/cjs/src/loyalty-v1-reward-rewards.public.js +0 -119
- package/build/cjs/src/loyalty-v1-reward-rewards.public.js.map +0 -1
- package/build/cjs/src/loyalty-v1-reward-rewards.types.js +0 -29
- package/build/cjs/src/loyalty-v1-reward-rewards.types.js.map +0 -1
- package/build/cjs/src/loyalty-v1-reward-rewards.universal.d.ts +0 -1007
- package/build/cjs/src/loyalty-v1-reward-rewards.universal.js +0 -373
- package/build/cjs/src/loyalty-v1-reward-rewards.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/package.json +0 -3
- package/build/es/src/loyalty-v1-reward-rewards.context.d.ts +0 -28
- package/build/es/src/loyalty-v1-reward-rewards.context.js +0 -28
- package/build/es/src/loyalty-v1-reward-rewards.context.js.map +0 -1
- package/build/es/src/loyalty-v1-reward-rewards.http.d.ts +0 -56
- package/build/es/src/loyalty-v1-reward-rewards.http.js +0 -453
- package/build/es/src/loyalty-v1-reward-rewards.http.js.map +0 -1
- package/build/es/src/loyalty-v1-reward-rewards.meta.d.ts +0 -26
- package/build/es/src/loyalty-v1-reward-rewards.meta.js +0 -146
- package/build/es/src/loyalty-v1-reward-rewards.meta.js.map +0 -1
- package/build/es/src/loyalty-v1-reward-rewards.public.d.ts +0 -107
- package/build/es/src/loyalty-v1-reward-rewards.public.js +0 -105
- package/build/es/src/loyalty-v1-reward-rewards.public.js.map +0 -1
- package/build/es/src/loyalty-v1-reward-rewards.types.js +0 -26
- package/build/es/src/loyalty-v1-reward-rewards.types.js.map +0 -1
- package/build/es/src/loyalty-v1-reward-rewards.universal.d.ts +0 -1007
- package/build/es/src/loyalty-v1-reward-rewards.universal.js +0 -339
- package/build/es/src/loyalty-v1-reward-rewards.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.context.d.ts +0 -28
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.context.js +0 -34
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.context.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.http.d.ts +0 -56
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.http.js +0 -464
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.http.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.meta.d.ts +0 -26
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.meta.js +0 -180
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.meta.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.public.d.ts +0 -107
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.public.js +0 -119
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.public.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.types.js +0 -29
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.types.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.universal.d.ts +0 -1007
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.universal.js +0 -373
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-reward-rewards.context.d.ts +0 -28
- package/build/internal/es/src/loyalty-v1-reward-rewards.context.js +0 -28
- package/build/internal/es/src/loyalty-v1-reward-rewards.context.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-reward-rewards.http.d.ts +0 -56
- package/build/internal/es/src/loyalty-v1-reward-rewards.http.js +0 -453
- package/build/internal/es/src/loyalty-v1-reward-rewards.http.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-reward-rewards.meta.d.ts +0 -26
- package/build/internal/es/src/loyalty-v1-reward-rewards.meta.js +0 -146
- package/build/internal/es/src/loyalty-v1-reward-rewards.meta.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-reward-rewards.public.d.ts +0 -107
- package/build/internal/es/src/loyalty-v1-reward-rewards.public.js +0 -105
- package/build/internal/es/src/loyalty-v1-reward-rewards.public.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-reward-rewards.types.js +0 -26
- package/build/internal/es/src/loyalty-v1-reward-rewards.types.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-reward-rewards.universal.d.ts +0 -1007
- package/build/internal/es/src/loyalty-v1-reward-rewards.universal.js +0 -339
- 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
|
-
|
|
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
|
-
|
|
15
|
+
_id?: string | null;
|
|
16
16
|
/**
|
|
17
17
|
* Reward name.
|
|
18
18
|
* @minLength 1
|
|
@@ -34,22 +34,22 @@ export interface Reward extends RewardTypeDetailsOneOf {
|
|
|
34
34
|
* Date and time the reward was created.
|
|
35
35
|
* @readonly
|
|
36
36
|
*/
|
|
37
|
-
|
|
37
|
+
_createdDate?: Date | null;
|
|
38
38
|
/**
|
|
39
39
|
* Date and time the reward was last updated.
|
|
40
40
|
* @readonly
|
|
41
41
|
*/
|
|
42
|
-
|
|
42
|
+
_updatedDate?: Date | null;
|
|
43
43
|
}
|
|
44
44
|
/** @oneof */
|
|
45
|
-
|
|
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
|
-
|
|
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,14 @@ export declare enum RewardType {
|
|
|
59
59
|
/** For internal use. */
|
|
60
60
|
SPI_DISCOUNT_AMOUNT = "SPI_DISCOUNT_AMOUNT"
|
|
61
61
|
}
|
|
62
|
-
|
|
62
|
+
interface DiscountAmount {
|
|
63
63
|
/**
|
|
64
64
|
* Discount details for each tier.
|
|
65
65
|
* @maxSize 21
|
|
66
66
|
*/
|
|
67
67
|
configsByTier?: DiscountAmountConfig[];
|
|
68
68
|
}
|
|
69
|
-
|
|
69
|
+
interface DiscountAmountConfig {
|
|
70
70
|
/**
|
|
71
71
|
* Discount amount. Must be a positive value.
|
|
72
72
|
* @format DECIMAL_VALUE
|
|
@@ -85,7 +85,7 @@ export interface DiscountAmountConfig {
|
|
|
85
85
|
*/
|
|
86
86
|
costInPoints?: number;
|
|
87
87
|
}
|
|
88
|
-
|
|
88
|
+
interface CouponReward extends CouponRewardDiscountTypeOneOf, CouponRewardScopeOrMinSubtotalOneOf {
|
|
89
89
|
/** Discount as a fixed amount. */
|
|
90
90
|
fixedAmount?: FixedAmountDiscount;
|
|
91
91
|
/** Discount as a percentage. */
|
|
@@ -96,25 +96,27 @@ export interface CouponReward extends CouponRewardDiscountTypeOneOf, CouponRewar
|
|
|
96
96
|
minimumSubtotal?: number;
|
|
97
97
|
/**
|
|
98
98
|
* Specifies the type of line items this coupon will apply to.
|
|
99
|
-
*
|
|
99
|
+
*
|
|
100
|
+
* For more information, see the Coupons API.
|
|
100
101
|
*/
|
|
101
102
|
scope?: CouponScope;
|
|
102
103
|
/** Whether the coupon is limited to one item. */
|
|
103
104
|
limitedToOneItem?: boolean | null;
|
|
104
|
-
/** Whether the coupon also applies to subscriptions. */
|
|
105
|
-
appliesToSubscriptions?: boolean | null;
|
|
106
105
|
/**
|
|
107
|
-
*
|
|
106
|
+
* Whether the coupon applies to subscription products.
|
|
108
107
|
*
|
|
109
|
-
*
|
|
110
|
-
|
|
108
|
+
* If set to `true`, the discount will apply to all billing cycles.
|
|
109
|
+
*/
|
|
110
|
+
appliesToSubscriptions?: boolean | null;
|
|
111
|
+
/**
|
|
112
|
+
* Reserved for internal use.
|
|
111
113
|
* @min 1
|
|
112
114
|
* @max 999
|
|
113
115
|
*/
|
|
114
116
|
discountedCycleCount?: number | null;
|
|
115
117
|
}
|
|
116
118
|
/** @oneof */
|
|
117
|
-
|
|
119
|
+
interface CouponRewardDiscountTypeOneOf {
|
|
118
120
|
/** Discount as a fixed amount. */
|
|
119
121
|
fixedAmount?: FixedAmountDiscount;
|
|
120
122
|
/** Discount as a percentage. */
|
|
@@ -123,16 +125,17 @@ export interface CouponRewardDiscountTypeOneOf {
|
|
|
123
125
|
freeShipping?: FreeShippingDiscount;
|
|
124
126
|
}
|
|
125
127
|
/** @oneof */
|
|
126
|
-
|
|
128
|
+
interface CouponRewardScopeOrMinSubtotalOneOf {
|
|
127
129
|
/** Limit the coupon to carts with a subtotal greater than this number. */
|
|
128
130
|
minimumSubtotal?: number;
|
|
129
131
|
/**
|
|
130
132
|
* Specifies the type of line items this coupon will apply to.
|
|
131
|
-
*
|
|
133
|
+
*
|
|
134
|
+
* For more information, see the Coupons API.
|
|
132
135
|
*/
|
|
133
136
|
scope?: CouponScope;
|
|
134
137
|
}
|
|
135
|
-
|
|
138
|
+
interface FixedAmountDiscount {
|
|
136
139
|
/**
|
|
137
140
|
* Discount details for each tier.
|
|
138
141
|
* @minSize 1
|
|
@@ -140,7 +143,7 @@ export interface FixedAmountDiscount {
|
|
|
140
143
|
*/
|
|
141
144
|
configsByTier?: FixedAmountDiscountConfig[];
|
|
142
145
|
}
|
|
143
|
-
|
|
146
|
+
interface FixedAmountDiscountConfig {
|
|
144
147
|
/**
|
|
145
148
|
* Tier ID, or empty if config applies to the base tier.
|
|
146
149
|
* @format GUID
|
|
@@ -155,7 +158,7 @@ export interface FixedAmountDiscountConfig {
|
|
|
155
158
|
/** Discount amount. */
|
|
156
159
|
amount?: number;
|
|
157
160
|
}
|
|
158
|
-
|
|
161
|
+
interface PercentageDiscount {
|
|
159
162
|
/**
|
|
160
163
|
* Discount details for each tier.
|
|
161
164
|
* @minSize 1
|
|
@@ -163,7 +166,7 @@ export interface PercentageDiscount {
|
|
|
163
166
|
*/
|
|
164
167
|
configsByTier?: PercentageDiscountConfig[];
|
|
165
168
|
}
|
|
166
|
-
|
|
169
|
+
interface PercentageDiscountConfig {
|
|
167
170
|
/**
|
|
168
171
|
* Tier ID, or empty if config applies to the base tier.
|
|
169
172
|
* @format GUID
|
|
@@ -178,7 +181,7 @@ export interface PercentageDiscountConfig {
|
|
|
178
181
|
/** Percentage discount. */
|
|
179
182
|
percentage?: number;
|
|
180
183
|
}
|
|
181
|
-
|
|
184
|
+
interface FreeShippingDiscount {
|
|
182
185
|
/**
|
|
183
186
|
* Discount details for each tier.
|
|
184
187
|
* @minSize 1
|
|
@@ -186,7 +189,7 @@ export interface FreeShippingDiscount {
|
|
|
186
189
|
*/
|
|
187
190
|
configsByTier?: FreeShippingDiscountConfig[];
|
|
188
191
|
}
|
|
189
|
-
|
|
192
|
+
interface FreeShippingDiscountConfig {
|
|
190
193
|
/**
|
|
191
194
|
* Tier ID, or empty if config applies to the base tier.
|
|
192
195
|
* @format GUID
|
|
@@ -199,31 +202,31 @@ export interface FreeShippingDiscountConfig {
|
|
|
199
202
|
*/
|
|
200
203
|
costInPoints?: number;
|
|
201
204
|
}
|
|
202
|
-
|
|
205
|
+
interface CouponScope {
|
|
203
206
|
/**
|
|
204
207
|
* Scope namespace.
|
|
205
208
|
*
|
|
206
|
-
* See
|
|
209
|
+
* See the Coupons API for valid namespaces.
|
|
207
210
|
*/
|
|
208
211
|
namespace?: string;
|
|
209
212
|
/**
|
|
210
213
|
* Coupon scope's applied group.
|
|
211
214
|
*
|
|
212
|
-
* See
|
|
215
|
+
* See the Coupons API for valid groups.
|
|
213
216
|
*/
|
|
214
217
|
group?: Group;
|
|
215
218
|
}
|
|
216
|
-
|
|
219
|
+
interface Group {
|
|
217
220
|
/**
|
|
218
221
|
* Name of coupon scope's group.
|
|
219
222
|
*
|
|
220
|
-
* See
|
|
223
|
+
* See the Coupons API for valid groups.
|
|
221
224
|
*/
|
|
222
225
|
name?: string;
|
|
223
226
|
/** Entity ID, if the coupon scope is limited to just one item. */
|
|
224
227
|
entityId?: string | null;
|
|
225
228
|
}
|
|
226
|
-
|
|
229
|
+
interface SpiDiscountAmount {
|
|
227
230
|
/**
|
|
228
231
|
* Discount details for each tier.
|
|
229
232
|
* @maxSize 21
|
|
@@ -235,17 +238,17 @@ export interface SpiDiscountAmount {
|
|
|
235
238
|
*/
|
|
236
239
|
description?: string;
|
|
237
240
|
}
|
|
238
|
-
|
|
241
|
+
interface RewardDisabled {
|
|
239
242
|
}
|
|
240
|
-
|
|
243
|
+
interface CreateRewardRequest {
|
|
241
244
|
/** Reward to create. */
|
|
242
245
|
reward: Reward;
|
|
243
246
|
}
|
|
244
|
-
|
|
247
|
+
interface CreateRewardResponse {
|
|
245
248
|
/** Created reward. */
|
|
246
249
|
reward?: Reward;
|
|
247
250
|
}
|
|
248
|
-
|
|
251
|
+
interface BulkCreateRewardsRequest {
|
|
249
252
|
/**
|
|
250
253
|
* Rewards to create.
|
|
251
254
|
* @minSize 1
|
|
@@ -253,21 +256,21 @@ export interface BulkCreateRewardsRequest {
|
|
|
253
256
|
*/
|
|
254
257
|
rewards: Reward[];
|
|
255
258
|
}
|
|
256
|
-
|
|
259
|
+
interface BulkCreateRewardsResponse {
|
|
257
260
|
/** Created rewards. */
|
|
258
261
|
results?: BulkRewardResult[];
|
|
259
262
|
/** Total successes and failures of the bulk create rewards action. */
|
|
260
263
|
bulkActionMetadata?: BulkActionMetadata;
|
|
261
264
|
}
|
|
262
|
-
|
|
265
|
+
interface BulkRewardResult {
|
|
263
266
|
/** Item metadata. */
|
|
264
267
|
itemMetadata?: ItemMetadata;
|
|
265
268
|
/** Created reward. */
|
|
266
269
|
item?: Reward;
|
|
267
270
|
}
|
|
268
|
-
|
|
271
|
+
interface ItemMetadata {
|
|
269
272
|
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
270
|
-
|
|
273
|
+
_id?: string | null;
|
|
271
274
|
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
272
275
|
originalIndex?: number;
|
|
273
276
|
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
@@ -275,7 +278,7 @@ export interface ItemMetadata {
|
|
|
275
278
|
/** Details about the error in case of failure. */
|
|
276
279
|
error?: ApplicationError;
|
|
277
280
|
}
|
|
278
|
-
|
|
281
|
+
interface ApplicationError {
|
|
279
282
|
/** Error code. */
|
|
280
283
|
code?: string;
|
|
281
284
|
/** Description of the error. */
|
|
@@ -283,7 +286,7 @@ export interface ApplicationError {
|
|
|
283
286
|
/** Data related to the error. */
|
|
284
287
|
data?: Record<string, any> | null;
|
|
285
288
|
}
|
|
286
|
-
|
|
289
|
+
interface BulkActionMetadata {
|
|
287
290
|
/** Number of items that were successfully processed. */
|
|
288
291
|
totalSuccesses?: number;
|
|
289
292
|
/** Number of items that couldn't be processed. */
|
|
@@ -291,24 +294,24 @@ export interface BulkActionMetadata {
|
|
|
291
294
|
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
292
295
|
undetailedFailures?: number;
|
|
293
296
|
}
|
|
294
|
-
|
|
297
|
+
interface GetRewardRequest {
|
|
295
298
|
/**
|
|
296
299
|
* ID of the reward to retrieve.
|
|
297
300
|
* @format GUID
|
|
298
301
|
*/
|
|
299
|
-
|
|
302
|
+
_id: string;
|
|
300
303
|
}
|
|
301
|
-
|
|
304
|
+
interface GetRewardResponse {
|
|
302
305
|
/** Retrieved reward. */
|
|
303
306
|
reward?: Reward;
|
|
304
307
|
}
|
|
305
|
-
|
|
308
|
+
interface BulkGetRewardsRequest {
|
|
306
309
|
}
|
|
307
|
-
|
|
310
|
+
interface BulkGetRewardsResponse {
|
|
308
311
|
/** Found rewards per site. */
|
|
309
312
|
rewardsInSite?: RewardsInSite[];
|
|
310
313
|
}
|
|
311
|
-
|
|
314
|
+
interface RewardsInSite {
|
|
312
315
|
/**
|
|
313
316
|
* Metasite id.
|
|
314
317
|
* @format GUID
|
|
@@ -317,11 +320,11 @@ export interface RewardsInSite {
|
|
|
317
320
|
/** Rewards. */
|
|
318
321
|
rewards?: Reward[];
|
|
319
322
|
}
|
|
320
|
-
|
|
323
|
+
interface QueryRewardsRequest {
|
|
321
324
|
/** Query parameters. */
|
|
322
325
|
query: CursorQuery;
|
|
323
326
|
}
|
|
324
|
-
|
|
327
|
+
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
325
328
|
/**
|
|
326
329
|
* Cursor paging options.
|
|
327
330
|
*
|
|
@@ -343,7 +346,7 @@ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
|
343
346
|
sort?: Sorting[];
|
|
344
347
|
}
|
|
345
348
|
/** @oneof */
|
|
346
|
-
|
|
349
|
+
interface CursorQueryPagingMethodOneOf {
|
|
347
350
|
/**
|
|
348
351
|
* Cursor paging options.
|
|
349
352
|
*
|
|
@@ -351,7 +354,7 @@ export interface CursorQueryPagingMethodOneOf {
|
|
|
351
354
|
*/
|
|
352
355
|
cursorPaging?: CursorPaging;
|
|
353
356
|
}
|
|
354
|
-
|
|
357
|
+
interface Sorting {
|
|
355
358
|
/**
|
|
356
359
|
* Name of the field to sort by.
|
|
357
360
|
* @maxLength 512
|
|
@@ -360,11 +363,11 @@ export interface Sorting {
|
|
|
360
363
|
/** Sort order. */
|
|
361
364
|
order?: SortOrder;
|
|
362
365
|
}
|
|
363
|
-
|
|
366
|
+
declare enum SortOrder {
|
|
364
367
|
ASC = "ASC",
|
|
365
368
|
DESC = "DESC"
|
|
366
369
|
}
|
|
367
|
-
|
|
370
|
+
interface CursorPaging {
|
|
368
371
|
/**
|
|
369
372
|
* Maximum number of items to return in the results.
|
|
370
373
|
* @max 100
|
|
@@ -379,13 +382,13 @@ export interface CursorPaging {
|
|
|
379
382
|
*/
|
|
380
383
|
cursor?: string | null;
|
|
381
384
|
}
|
|
382
|
-
|
|
385
|
+
interface QueryRewardsResponse {
|
|
383
386
|
/** Retrieved loyalty rewards. */
|
|
384
387
|
rewards?: Reward[];
|
|
385
388
|
/** Details on the paged set of results returned. */
|
|
386
389
|
pagingMetadata?: CursorPagingMetadata;
|
|
387
390
|
}
|
|
388
|
-
|
|
391
|
+
interface CursorPagingMetadata {
|
|
389
392
|
/** Number of items returned in current page. */
|
|
390
393
|
count?: number | null;
|
|
391
394
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
@@ -398,7 +401,7 @@ export interface CursorPagingMetadata {
|
|
|
398
401
|
*/
|
|
399
402
|
hasNext?: boolean | null;
|
|
400
403
|
}
|
|
401
|
-
|
|
404
|
+
interface Cursors {
|
|
402
405
|
/**
|
|
403
406
|
* Cursor string pointing to the next page in the list of results.
|
|
404
407
|
* @maxLength 16000
|
|
@@ -410,20 +413,20 @@ export interface Cursors {
|
|
|
410
413
|
*/
|
|
411
414
|
prev?: string | null;
|
|
412
415
|
}
|
|
413
|
-
|
|
416
|
+
interface UpdateRewardRequest {
|
|
414
417
|
/** Reward information to update. */
|
|
415
418
|
reward: Reward;
|
|
416
419
|
}
|
|
417
|
-
|
|
420
|
+
interface UpdateRewardResponse {
|
|
418
421
|
/** Updated reward. */
|
|
419
422
|
reward?: Reward;
|
|
420
423
|
}
|
|
421
|
-
|
|
424
|
+
interface DeleteRewardRequest {
|
|
422
425
|
/**
|
|
423
426
|
* ID of the reward to delete.
|
|
424
427
|
* @format GUID
|
|
425
428
|
*/
|
|
426
|
-
|
|
429
|
+
_id: string;
|
|
427
430
|
/**
|
|
428
431
|
* Revision number, which increments by 1 each time the reward is updated.
|
|
429
432
|
*
|
|
@@ -431,19 +434,19 @@ export interface DeleteRewardRequest {
|
|
|
431
434
|
*/
|
|
432
435
|
revision?: string;
|
|
433
436
|
}
|
|
434
|
-
|
|
437
|
+
interface DeleteRewardResponse {
|
|
435
438
|
}
|
|
436
|
-
|
|
439
|
+
interface ListRewardsRequest {
|
|
437
440
|
/** Pagination options. */
|
|
438
441
|
cursorPaging?: CursorPaging;
|
|
439
442
|
}
|
|
440
|
-
|
|
443
|
+
interface ListRewardsResponse {
|
|
441
444
|
/** Retrieved loyalty rewards. */
|
|
442
445
|
rewards?: Reward[];
|
|
443
446
|
/** Details on the paged set of results returned. */
|
|
444
447
|
pagingMetadata?: PagingMetadataV2;
|
|
445
448
|
}
|
|
446
|
-
|
|
449
|
+
interface PagingMetadataV2 {
|
|
447
450
|
/** Number of items returned in the response. */
|
|
448
451
|
count?: number | null;
|
|
449
452
|
/** Offset that was requested. */
|
|
@@ -455,7 +458,7 @@ export interface PagingMetadataV2 {
|
|
|
455
458
|
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
456
459
|
cursors?: Cursors;
|
|
457
460
|
}
|
|
458
|
-
|
|
461
|
+
interface ListRewardsInTierRequest {
|
|
459
462
|
/**
|
|
460
463
|
* Tier id.
|
|
461
464
|
* @format GUID
|
|
@@ -465,13 +468,13 @@ export interface ListRewardsInTierRequest {
|
|
|
465
468
|
/** Pagination options. */
|
|
466
469
|
cursorPaging?: CursorPaging;
|
|
467
470
|
}
|
|
468
|
-
|
|
471
|
+
interface ListRewardsInTierResponse {
|
|
469
472
|
/** Retrieved loyalty rewards. */
|
|
470
473
|
rewards?: Reward[];
|
|
471
474
|
/** Details on the paged set of results returned. */
|
|
472
475
|
pagingMetadata?: PagingMetadataV2;
|
|
473
476
|
}
|
|
474
|
-
|
|
477
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
475
478
|
createdEvent?: EntityCreatedEvent;
|
|
476
479
|
updatedEvent?: EntityUpdatedEvent;
|
|
477
480
|
deletedEvent?: EntityDeletedEvent;
|
|
@@ -480,7 +483,7 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
480
483
|
* Unique event ID.
|
|
481
484
|
* Allows clients to ignore duplicate webhooks.
|
|
482
485
|
*/
|
|
483
|
-
|
|
486
|
+
_id?: string;
|
|
484
487
|
/**
|
|
485
488
|
* Assumes actions are also always typed to an entity_type
|
|
486
489
|
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
@@ -514,38 +517,36 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
514
517
|
entityEventSequence?: string | null;
|
|
515
518
|
}
|
|
516
519
|
/** @oneof */
|
|
517
|
-
|
|
520
|
+
interface DomainEventBodyOneOf {
|
|
518
521
|
createdEvent?: EntityCreatedEvent;
|
|
519
522
|
updatedEvent?: EntityUpdatedEvent;
|
|
520
523
|
deletedEvent?: EntityDeletedEvent;
|
|
521
524
|
actionEvent?: ActionEvent;
|
|
522
525
|
}
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
526
|
-
restoreInfo?: RestoreInfo;
|
|
526
|
+
interface EntityCreatedEvent {
|
|
527
|
+
entity?: string;
|
|
527
528
|
}
|
|
528
|
-
|
|
529
|
+
interface RestoreInfo {
|
|
529
530
|
deletedDate?: Date | null;
|
|
530
531
|
}
|
|
531
|
-
|
|
532
|
+
interface EntityUpdatedEvent {
|
|
532
533
|
/**
|
|
533
534
|
* 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
535
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
535
536
|
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
536
537
|
*/
|
|
537
|
-
|
|
538
|
+
currentEntity?: string;
|
|
538
539
|
}
|
|
539
|
-
|
|
540
|
+
interface EntityDeletedEvent {
|
|
540
541
|
/** Entity that was deleted */
|
|
541
|
-
|
|
542
|
+
deletedEntity?: string | null;
|
|
542
543
|
}
|
|
543
|
-
|
|
544
|
-
|
|
544
|
+
interface ActionEvent {
|
|
545
|
+
body?: string;
|
|
545
546
|
}
|
|
546
|
-
|
|
547
|
+
interface Empty {
|
|
547
548
|
}
|
|
548
|
-
|
|
549
|
+
interface MessageEnvelope {
|
|
549
550
|
/**
|
|
550
551
|
* App instance ID.
|
|
551
552
|
* @format GUID
|
|
@@ -561,7 +562,7 @@ export interface MessageEnvelope {
|
|
|
561
562
|
/** Stringify payload. */
|
|
562
563
|
data?: string;
|
|
563
564
|
}
|
|
564
|
-
|
|
565
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
565
566
|
/**
|
|
566
567
|
* ID of a site visitor that has not logged in to the site.
|
|
567
568
|
* @format GUID
|
|
@@ -586,7 +587,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
586
587
|
identityType?: WebhookIdentityType;
|
|
587
588
|
}
|
|
588
589
|
/** @oneof */
|
|
589
|
-
|
|
590
|
+
interface IdentificationDataIdOneOf {
|
|
590
591
|
/**
|
|
591
592
|
* ID of a site visitor that has not logged in to the site.
|
|
592
593
|
* @format GUID
|
|
@@ -608,110 +609,118 @@ export interface IdentificationDataIdOneOf {
|
|
|
608
609
|
*/
|
|
609
610
|
appId?: string;
|
|
610
611
|
}
|
|
611
|
-
|
|
612
|
+
declare enum WebhookIdentityType {
|
|
612
613
|
UNKNOWN = "UNKNOWN",
|
|
613
614
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
614
615
|
MEMBER = "MEMBER",
|
|
615
616
|
WIX_USER = "WIX_USER",
|
|
616
617
|
APP = "APP"
|
|
617
618
|
}
|
|
618
|
-
interface
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
configsByTier: FixedAmountDiscountConfigNonNullableFields[];
|
|
632
|
-
}
|
|
633
|
-
interface PercentageDiscountConfigNonNullableFields {
|
|
634
|
-
costInPoints: number;
|
|
635
|
-
percentage: number;
|
|
636
|
-
}
|
|
637
|
-
interface PercentageDiscountNonNullableFields {
|
|
638
|
-
configsByTier: PercentageDiscountConfigNonNullableFields[];
|
|
639
|
-
}
|
|
640
|
-
interface FreeShippingDiscountConfigNonNullableFields {
|
|
641
|
-
costInPoints: number;
|
|
642
|
-
}
|
|
643
|
-
interface FreeShippingDiscountNonNullableFields {
|
|
644
|
-
configsByTier: FreeShippingDiscountConfigNonNullableFields[];
|
|
645
|
-
}
|
|
646
|
-
interface GroupNonNullableFields {
|
|
647
|
-
name: string;
|
|
648
|
-
}
|
|
649
|
-
interface CouponScopeNonNullableFields {
|
|
650
|
-
namespace: string;
|
|
651
|
-
group?: GroupNonNullableFields;
|
|
652
|
-
}
|
|
653
|
-
interface CouponRewardNonNullableFields {
|
|
654
|
-
fixedAmount?: FixedAmountDiscountNonNullableFields;
|
|
655
|
-
percentage?: PercentageDiscountNonNullableFields;
|
|
656
|
-
freeShipping?: FreeShippingDiscountNonNullableFields;
|
|
657
|
-
minimumSubtotal: number;
|
|
658
|
-
scope?: CouponScopeNonNullableFields;
|
|
659
|
-
}
|
|
660
|
-
interface SpiDiscountAmountNonNullableFields {
|
|
661
|
-
configsByTier: DiscountAmountConfigNonNullableFields[];
|
|
662
|
-
description: string;
|
|
663
|
-
}
|
|
664
|
-
interface RewardNonNullableFields {
|
|
665
|
-
discountAmount?: DiscountAmountNonNullableFields;
|
|
666
|
-
couponReward?: CouponRewardNonNullableFields;
|
|
667
|
-
spiDiscountAmount?: SpiDiscountAmountNonNullableFields;
|
|
668
|
-
name: string;
|
|
669
|
-
requiredPoints: number;
|
|
670
|
-
active: boolean;
|
|
671
|
-
type: RewardType;
|
|
672
|
-
}
|
|
673
|
-
export interface CreateRewardResponseNonNullableFields {
|
|
674
|
-
reward?: RewardNonNullableFields;
|
|
675
|
-
}
|
|
676
|
-
interface ApplicationErrorNonNullableFields {
|
|
677
|
-
code: string;
|
|
678
|
-
description: string;
|
|
679
|
-
}
|
|
680
|
-
interface ItemMetadataNonNullableFields {
|
|
681
|
-
originalIndex: number;
|
|
682
|
-
success: boolean;
|
|
683
|
-
error?: ApplicationErrorNonNullableFields;
|
|
684
|
-
}
|
|
685
|
-
interface BulkRewardResultNonNullableFields {
|
|
686
|
-
itemMetadata?: ItemMetadataNonNullableFields;
|
|
687
|
-
item?: RewardNonNullableFields;
|
|
688
|
-
}
|
|
689
|
-
interface BulkActionMetadataNonNullableFields {
|
|
690
|
-
totalSuccesses: number;
|
|
691
|
-
totalFailures: number;
|
|
692
|
-
undetailedFailures: number;
|
|
693
|
-
}
|
|
694
|
-
export interface BulkCreateRewardsResponseNonNullableFields {
|
|
695
|
-
results: BulkRewardResultNonNullableFields[];
|
|
696
|
-
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
|
|
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;
|
|
697
632
|
}
|
|
698
|
-
|
|
699
|
-
|
|
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;
|
|
700
670
|
}
|
|
701
|
-
interface
|
|
702
|
-
|
|
703
|
-
|
|
671
|
+
interface RewardCreatedEnvelope {
|
|
672
|
+
entity: Reward;
|
|
673
|
+
metadata: EventMetadata;
|
|
704
674
|
}
|
|
705
|
-
|
|
706
|
-
|
|
675
|
+
interface RewardDeletedEnvelope {
|
|
676
|
+
metadata: EventMetadata;
|
|
707
677
|
}
|
|
708
|
-
|
|
709
|
-
|
|
678
|
+
interface RewardUpdatedEnvelope {
|
|
679
|
+
entity: Reward;
|
|
680
|
+
metadata: EventMetadata;
|
|
710
681
|
}
|
|
711
|
-
|
|
712
|
-
|
|
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;
|
|
713
720
|
}
|
|
714
|
-
|
|
715
|
-
|
|
721
|
+
interface ListRewardsOptions {
|
|
722
|
+
/** Pagination options. */
|
|
723
|
+
cursorPaging?: CursorPaging;
|
|
716
724
|
}
|
|
717
|
-
|
|
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 };
|