@wix/auto_sdk_loyalty_rewards 1.0.7 → 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.
- package/build/index.d.mts +128 -0
- package/build/index.d.ts +128 -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 +128 -0
- package/build/internal/index.d.ts +128 -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-BFnbQRqi.d.mts} +196 -87
- package/build/{cjs/src/loyalty-v1-reward-rewards.types.d.ts → internal/loyalty-v1-reward-rewards.universal-BFnbQRqi.d.ts} +196 -87
- package/build/internal/meta.d.mts +476 -0
- package/build/internal/meta.d.ts +476 -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-BFnbQRqi.d.mts} +196 -87
- package/build/{internal/es/src/loyalty-v1-reward-rewards.types.d.ts → loyalty-v1-reward-rewards.universal-BFnbQRqi.d.ts} +196 -87
- package/build/meta.d.mts +476 -0
- package/build/meta.d.ts +476 -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 -926
- 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 -926
- 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 -926
- 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 -926
- 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. */
|
|
@@ -60,15 +60,15 @@ export declare enum RewardType {
|
|
|
60
60
|
SPI_DISCOUNT_AMOUNT = "SPI_DISCOUNT_AMOUNT"
|
|
61
61
|
}
|
|
62
62
|
/** @enumType */
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
type RewardTypeWithLiterals = RewardType | 'UNDEFINED' | 'DISCOUNT_AMOUNT' | 'COUPON_REWARD' | 'SPI_DISCOUNT_AMOUNT';
|
|
64
|
+
interface DiscountAmount {
|
|
65
65
|
/**
|
|
66
66
|
* Discount details for each tier.
|
|
67
67
|
* @maxSize 21
|
|
68
68
|
*/
|
|
69
69
|
configsByTier?: DiscountAmountConfig[];
|
|
70
70
|
}
|
|
71
|
-
|
|
71
|
+
interface DiscountAmountConfig {
|
|
72
72
|
/**
|
|
73
73
|
* Discount amount. Must be a positive value.
|
|
74
74
|
* @format DECIMAL_VALUE
|
|
@@ -87,7 +87,7 @@ export interface DiscountAmountConfig {
|
|
|
87
87
|
*/
|
|
88
88
|
costInPoints?: number;
|
|
89
89
|
}
|
|
90
|
-
|
|
90
|
+
interface CouponReward extends CouponRewardDiscountTypeOneOf, CouponRewardScopeOrMinSubtotalOneOf {
|
|
91
91
|
/** Discount as a fixed amount. */
|
|
92
92
|
fixedAmount?: FixedAmountDiscount;
|
|
93
93
|
/** Discount as a percentage. */
|
|
@@ -98,25 +98,27 @@ export interface CouponReward extends CouponRewardDiscountTypeOneOf, CouponRewar
|
|
|
98
98
|
minimumSubtotal?: number;
|
|
99
99
|
/**
|
|
100
100
|
* Specifies the type of line items this coupon will apply to.
|
|
101
|
-
*
|
|
101
|
+
*
|
|
102
|
+
* For more information, see the Coupons API.
|
|
102
103
|
*/
|
|
103
104
|
scope?: CouponScope;
|
|
104
105
|
/** Whether the coupon is limited to one item. */
|
|
105
106
|
limitedToOneItem?: boolean | null;
|
|
106
|
-
/** Whether the coupon also applies to subscriptions. */
|
|
107
|
-
appliesToSubscriptions?: boolean | null;
|
|
108
107
|
/**
|
|
109
|
-
*
|
|
108
|
+
* Whether the coupon applies to subscription products.
|
|
110
109
|
*
|
|
111
|
-
*
|
|
112
|
-
|
|
110
|
+
* If set to `true`, the discount will apply to all billing cycles.
|
|
111
|
+
*/
|
|
112
|
+
appliesToSubscriptions?: boolean | null;
|
|
113
|
+
/**
|
|
114
|
+
* Reserved for internal use.
|
|
113
115
|
* @min 1
|
|
114
116
|
* @max 999
|
|
115
117
|
*/
|
|
116
118
|
discountedCycleCount?: number | null;
|
|
117
119
|
}
|
|
118
120
|
/** @oneof */
|
|
119
|
-
|
|
121
|
+
interface CouponRewardDiscountTypeOneOf {
|
|
120
122
|
/** Discount as a fixed amount. */
|
|
121
123
|
fixedAmount?: FixedAmountDiscount;
|
|
122
124
|
/** Discount as a percentage. */
|
|
@@ -125,16 +127,17 @@ export interface CouponRewardDiscountTypeOneOf {
|
|
|
125
127
|
freeShipping?: FreeShippingDiscount;
|
|
126
128
|
}
|
|
127
129
|
/** @oneof */
|
|
128
|
-
|
|
130
|
+
interface CouponRewardScopeOrMinSubtotalOneOf {
|
|
129
131
|
/** Limit the coupon to carts with a subtotal greater than this number. */
|
|
130
132
|
minimumSubtotal?: number;
|
|
131
133
|
/**
|
|
132
134
|
* Specifies the type of line items this coupon will apply to.
|
|
133
|
-
*
|
|
135
|
+
*
|
|
136
|
+
* For more information, see the Coupons API.
|
|
134
137
|
*/
|
|
135
138
|
scope?: CouponScope;
|
|
136
139
|
}
|
|
137
|
-
|
|
140
|
+
interface FixedAmountDiscount {
|
|
138
141
|
/**
|
|
139
142
|
* Discount details for each tier.
|
|
140
143
|
* @minSize 1
|
|
@@ -142,7 +145,7 @@ export interface FixedAmountDiscount {
|
|
|
142
145
|
*/
|
|
143
146
|
configsByTier?: FixedAmountDiscountConfig[];
|
|
144
147
|
}
|
|
145
|
-
|
|
148
|
+
interface FixedAmountDiscountConfig {
|
|
146
149
|
/**
|
|
147
150
|
* Tier ID, or empty if config applies to the base tier.
|
|
148
151
|
* @format GUID
|
|
@@ -157,7 +160,7 @@ export interface FixedAmountDiscountConfig {
|
|
|
157
160
|
/** Discount amount. */
|
|
158
161
|
amount?: number;
|
|
159
162
|
}
|
|
160
|
-
|
|
163
|
+
interface PercentageDiscount {
|
|
161
164
|
/**
|
|
162
165
|
* Discount details for each tier.
|
|
163
166
|
* @minSize 1
|
|
@@ -165,7 +168,7 @@ export interface PercentageDiscount {
|
|
|
165
168
|
*/
|
|
166
169
|
configsByTier?: PercentageDiscountConfig[];
|
|
167
170
|
}
|
|
168
|
-
|
|
171
|
+
interface PercentageDiscountConfig {
|
|
169
172
|
/**
|
|
170
173
|
* Tier ID, or empty if config applies to the base tier.
|
|
171
174
|
* @format GUID
|
|
@@ -180,7 +183,7 @@ export interface PercentageDiscountConfig {
|
|
|
180
183
|
/** Percentage discount. */
|
|
181
184
|
percentage?: number;
|
|
182
185
|
}
|
|
183
|
-
|
|
186
|
+
interface FreeShippingDiscount {
|
|
184
187
|
/**
|
|
185
188
|
* Discount details for each tier.
|
|
186
189
|
* @minSize 1
|
|
@@ -188,7 +191,7 @@ export interface FreeShippingDiscount {
|
|
|
188
191
|
*/
|
|
189
192
|
configsByTier?: FreeShippingDiscountConfig[];
|
|
190
193
|
}
|
|
191
|
-
|
|
194
|
+
interface FreeShippingDiscountConfig {
|
|
192
195
|
/**
|
|
193
196
|
* Tier ID, or empty if config applies to the base tier.
|
|
194
197
|
* @format GUID
|
|
@@ -201,31 +204,31 @@ export interface FreeShippingDiscountConfig {
|
|
|
201
204
|
*/
|
|
202
205
|
costInPoints?: number;
|
|
203
206
|
}
|
|
204
|
-
|
|
207
|
+
interface CouponScope {
|
|
205
208
|
/**
|
|
206
209
|
* Scope namespace.
|
|
207
210
|
*
|
|
208
|
-
* See
|
|
211
|
+
* See the Coupons API for valid namespaces.
|
|
209
212
|
*/
|
|
210
213
|
namespace?: string;
|
|
211
214
|
/**
|
|
212
215
|
* Coupon scope's applied group.
|
|
213
216
|
*
|
|
214
|
-
* See
|
|
217
|
+
* See the Coupons API for valid groups.
|
|
215
218
|
*/
|
|
216
219
|
group?: Group;
|
|
217
220
|
}
|
|
218
|
-
|
|
221
|
+
interface Group {
|
|
219
222
|
/**
|
|
220
223
|
* Name of coupon scope's group.
|
|
221
224
|
*
|
|
222
|
-
* See
|
|
225
|
+
* See the Coupons API for valid groups.
|
|
223
226
|
*/
|
|
224
227
|
name?: string;
|
|
225
228
|
/** Entity ID, if the coupon scope is limited to just one item. */
|
|
226
229
|
entityId?: string | null;
|
|
227
230
|
}
|
|
228
|
-
|
|
231
|
+
interface SpiDiscountAmount {
|
|
229
232
|
/**
|
|
230
233
|
* Discount details for each tier.
|
|
231
234
|
* @maxSize 21
|
|
@@ -237,17 +240,17 @@ export interface SpiDiscountAmount {
|
|
|
237
240
|
*/
|
|
238
241
|
description?: string;
|
|
239
242
|
}
|
|
240
|
-
|
|
243
|
+
interface RewardDisabled {
|
|
241
244
|
}
|
|
242
|
-
|
|
245
|
+
interface CreateRewardRequest {
|
|
243
246
|
/** Reward to create. */
|
|
244
247
|
reward: Reward;
|
|
245
248
|
}
|
|
246
|
-
|
|
249
|
+
interface CreateRewardResponse {
|
|
247
250
|
/** Created reward. */
|
|
248
251
|
reward?: Reward;
|
|
249
252
|
}
|
|
250
|
-
|
|
253
|
+
interface BulkCreateRewardsRequest {
|
|
251
254
|
/**
|
|
252
255
|
* Rewards to create.
|
|
253
256
|
* @minSize 1
|
|
@@ -255,21 +258,21 @@ export interface BulkCreateRewardsRequest {
|
|
|
255
258
|
*/
|
|
256
259
|
rewards: Reward[];
|
|
257
260
|
}
|
|
258
|
-
|
|
261
|
+
interface BulkCreateRewardsResponse {
|
|
259
262
|
/** Created rewards. */
|
|
260
263
|
results?: BulkRewardResult[];
|
|
261
264
|
/** Total successes and failures of the bulk create rewards action. */
|
|
262
265
|
bulkActionMetadata?: BulkActionMetadata;
|
|
263
266
|
}
|
|
264
|
-
|
|
267
|
+
interface BulkRewardResult {
|
|
265
268
|
/** Item metadata. */
|
|
266
269
|
itemMetadata?: ItemMetadata;
|
|
267
270
|
/** Created reward. */
|
|
268
271
|
item?: Reward;
|
|
269
272
|
}
|
|
270
|
-
|
|
273
|
+
interface ItemMetadata {
|
|
271
274
|
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
272
|
-
|
|
275
|
+
_id?: string | null;
|
|
273
276
|
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
274
277
|
originalIndex?: number;
|
|
275
278
|
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
@@ -277,7 +280,7 @@ export interface ItemMetadata {
|
|
|
277
280
|
/** Details about the error in case of failure. */
|
|
278
281
|
error?: ApplicationError;
|
|
279
282
|
}
|
|
280
|
-
|
|
283
|
+
interface ApplicationError {
|
|
281
284
|
/** Error code. */
|
|
282
285
|
code?: string;
|
|
283
286
|
/** Description of the error. */
|
|
@@ -285,7 +288,7 @@ export interface ApplicationError {
|
|
|
285
288
|
/** Data related to the error. */
|
|
286
289
|
data?: Record<string, any> | null;
|
|
287
290
|
}
|
|
288
|
-
|
|
291
|
+
interface BulkActionMetadata {
|
|
289
292
|
/** Number of items that were successfully processed. */
|
|
290
293
|
totalSuccesses?: number;
|
|
291
294
|
/** Number of items that couldn't be processed. */
|
|
@@ -293,24 +296,24 @@ export interface BulkActionMetadata {
|
|
|
293
296
|
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
294
297
|
undetailedFailures?: number;
|
|
295
298
|
}
|
|
296
|
-
|
|
299
|
+
interface GetRewardRequest {
|
|
297
300
|
/**
|
|
298
301
|
* ID of the reward to retrieve.
|
|
299
302
|
* @format GUID
|
|
300
303
|
*/
|
|
301
|
-
|
|
304
|
+
_id: string;
|
|
302
305
|
}
|
|
303
|
-
|
|
306
|
+
interface GetRewardResponse {
|
|
304
307
|
/** Retrieved reward. */
|
|
305
308
|
reward?: Reward;
|
|
306
309
|
}
|
|
307
|
-
|
|
310
|
+
interface BulkGetRewardsRequest {
|
|
308
311
|
}
|
|
309
|
-
|
|
312
|
+
interface BulkGetRewardsResponse {
|
|
310
313
|
/** Found rewards per site. */
|
|
311
314
|
rewardsInSite?: RewardsInSite[];
|
|
312
315
|
}
|
|
313
|
-
|
|
316
|
+
interface RewardsInSite {
|
|
314
317
|
/**
|
|
315
318
|
* Metasite id.
|
|
316
319
|
* @format GUID
|
|
@@ -319,11 +322,11 @@ export interface RewardsInSite {
|
|
|
319
322
|
/** Rewards. */
|
|
320
323
|
rewards?: Reward[];
|
|
321
324
|
}
|
|
322
|
-
|
|
325
|
+
interface QueryRewardsRequest {
|
|
323
326
|
/** Query parameters. */
|
|
324
327
|
query: CursorQuery;
|
|
325
328
|
}
|
|
326
|
-
|
|
329
|
+
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
327
330
|
/**
|
|
328
331
|
* Cursor paging options.
|
|
329
332
|
*
|
|
@@ -345,7 +348,7 @@ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
|
345
348
|
sort?: Sorting[];
|
|
346
349
|
}
|
|
347
350
|
/** @oneof */
|
|
348
|
-
|
|
351
|
+
interface CursorQueryPagingMethodOneOf {
|
|
349
352
|
/**
|
|
350
353
|
* Cursor paging options.
|
|
351
354
|
*
|
|
@@ -353,7 +356,7 @@ export interface CursorQueryPagingMethodOneOf {
|
|
|
353
356
|
*/
|
|
354
357
|
cursorPaging?: CursorPaging;
|
|
355
358
|
}
|
|
356
|
-
|
|
359
|
+
interface Sorting {
|
|
357
360
|
/**
|
|
358
361
|
* Name of the field to sort by.
|
|
359
362
|
* @maxLength 512
|
|
@@ -362,13 +365,13 @@ export interface Sorting {
|
|
|
362
365
|
/** Sort order. */
|
|
363
366
|
order?: SortOrderWithLiterals;
|
|
364
367
|
}
|
|
365
|
-
|
|
368
|
+
declare enum SortOrder {
|
|
366
369
|
ASC = "ASC",
|
|
367
370
|
DESC = "DESC"
|
|
368
371
|
}
|
|
369
372
|
/** @enumType */
|
|
370
|
-
|
|
371
|
-
|
|
373
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
374
|
+
interface CursorPaging {
|
|
372
375
|
/**
|
|
373
376
|
* Maximum number of items to return in the results.
|
|
374
377
|
* @max 100
|
|
@@ -383,13 +386,13 @@ export interface CursorPaging {
|
|
|
383
386
|
*/
|
|
384
387
|
cursor?: string | null;
|
|
385
388
|
}
|
|
386
|
-
|
|
389
|
+
interface QueryRewardsResponse {
|
|
387
390
|
/** Retrieved loyalty rewards. */
|
|
388
391
|
rewards?: Reward[];
|
|
389
392
|
/** Details on the paged set of results returned. */
|
|
390
393
|
pagingMetadata?: CursorPagingMetadata;
|
|
391
394
|
}
|
|
392
|
-
|
|
395
|
+
interface CursorPagingMetadata {
|
|
393
396
|
/** Number of items returned in current page. */
|
|
394
397
|
count?: number | null;
|
|
395
398
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
@@ -402,7 +405,7 @@ export interface CursorPagingMetadata {
|
|
|
402
405
|
*/
|
|
403
406
|
hasNext?: boolean | null;
|
|
404
407
|
}
|
|
405
|
-
|
|
408
|
+
interface Cursors {
|
|
406
409
|
/**
|
|
407
410
|
* Cursor string pointing to the next page in the list of results.
|
|
408
411
|
* @maxLength 16000
|
|
@@ -414,20 +417,20 @@ export interface Cursors {
|
|
|
414
417
|
*/
|
|
415
418
|
prev?: string | null;
|
|
416
419
|
}
|
|
417
|
-
|
|
420
|
+
interface UpdateRewardRequest {
|
|
418
421
|
/** Reward information to update. */
|
|
419
422
|
reward: Reward;
|
|
420
423
|
}
|
|
421
|
-
|
|
424
|
+
interface UpdateRewardResponse {
|
|
422
425
|
/** Updated reward. */
|
|
423
426
|
reward?: Reward;
|
|
424
427
|
}
|
|
425
|
-
|
|
428
|
+
interface DeleteRewardRequest {
|
|
426
429
|
/**
|
|
427
430
|
* ID of the reward to delete.
|
|
428
431
|
* @format GUID
|
|
429
432
|
*/
|
|
430
|
-
|
|
433
|
+
_id: string;
|
|
431
434
|
/**
|
|
432
435
|
* Revision number, which increments by 1 each time the reward is updated.
|
|
433
436
|
*
|
|
@@ -435,19 +438,19 @@ export interface DeleteRewardRequest {
|
|
|
435
438
|
*/
|
|
436
439
|
revision?: string;
|
|
437
440
|
}
|
|
438
|
-
|
|
441
|
+
interface DeleteRewardResponse {
|
|
439
442
|
}
|
|
440
|
-
|
|
443
|
+
interface ListRewardsRequest {
|
|
441
444
|
/** Pagination options. */
|
|
442
445
|
cursorPaging?: CursorPaging;
|
|
443
446
|
}
|
|
444
|
-
|
|
447
|
+
interface ListRewardsResponse {
|
|
445
448
|
/** Retrieved loyalty rewards. */
|
|
446
449
|
rewards?: Reward[];
|
|
447
450
|
/** Details on the paged set of results returned. */
|
|
448
451
|
pagingMetadata?: PagingMetadataV2;
|
|
449
452
|
}
|
|
450
|
-
|
|
453
|
+
interface PagingMetadataV2 {
|
|
451
454
|
/** Number of items returned in the response. */
|
|
452
455
|
count?: number | null;
|
|
453
456
|
/** Offset that was requested. */
|
|
@@ -459,7 +462,7 @@ export interface PagingMetadataV2 {
|
|
|
459
462
|
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
460
463
|
cursors?: Cursors;
|
|
461
464
|
}
|
|
462
|
-
|
|
465
|
+
interface ListRewardsInTierRequest {
|
|
463
466
|
/**
|
|
464
467
|
* Tier id.
|
|
465
468
|
* @format GUID
|
|
@@ -469,13 +472,13 @@ export interface ListRewardsInTierRequest {
|
|
|
469
472
|
/** Pagination options. */
|
|
470
473
|
cursorPaging?: CursorPaging;
|
|
471
474
|
}
|
|
472
|
-
|
|
475
|
+
interface ListRewardsInTierResponse {
|
|
473
476
|
/** Retrieved loyalty rewards. */
|
|
474
477
|
rewards?: Reward[];
|
|
475
478
|
/** Details on the paged set of results returned. */
|
|
476
479
|
pagingMetadata?: PagingMetadataV2;
|
|
477
480
|
}
|
|
478
|
-
|
|
481
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
479
482
|
createdEvent?: EntityCreatedEvent;
|
|
480
483
|
updatedEvent?: EntityUpdatedEvent;
|
|
481
484
|
deletedEvent?: EntityDeletedEvent;
|
|
@@ -484,7 +487,7 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
484
487
|
* Unique event ID.
|
|
485
488
|
* Allows clients to ignore duplicate webhooks.
|
|
486
489
|
*/
|
|
487
|
-
|
|
490
|
+
_id?: string;
|
|
488
491
|
/**
|
|
489
492
|
* Assumes actions are also always typed to an entity_type
|
|
490
493
|
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
@@ -518,38 +521,36 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
518
521
|
entityEventSequence?: string | null;
|
|
519
522
|
}
|
|
520
523
|
/** @oneof */
|
|
521
|
-
|
|
524
|
+
interface DomainEventBodyOneOf {
|
|
522
525
|
createdEvent?: EntityCreatedEvent;
|
|
523
526
|
updatedEvent?: EntityUpdatedEvent;
|
|
524
527
|
deletedEvent?: EntityDeletedEvent;
|
|
525
528
|
actionEvent?: ActionEvent;
|
|
526
529
|
}
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
530
|
-
restoreInfo?: RestoreInfo;
|
|
530
|
+
interface EntityCreatedEvent {
|
|
531
|
+
entity?: string;
|
|
531
532
|
}
|
|
532
|
-
|
|
533
|
+
interface RestoreInfo {
|
|
533
534
|
deletedDate?: Date | null;
|
|
534
535
|
}
|
|
535
|
-
|
|
536
|
+
interface EntityUpdatedEvent {
|
|
536
537
|
/**
|
|
537
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.
|
|
538
539
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
539
540
|
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
540
541
|
*/
|
|
541
|
-
|
|
542
|
+
currentEntity?: string;
|
|
542
543
|
}
|
|
543
|
-
|
|
544
|
+
interface EntityDeletedEvent {
|
|
544
545
|
/** Entity that was deleted */
|
|
545
|
-
|
|
546
|
+
deletedEntity?: string | null;
|
|
546
547
|
}
|
|
547
|
-
|
|
548
|
-
|
|
548
|
+
interface ActionEvent {
|
|
549
|
+
body?: string;
|
|
549
550
|
}
|
|
550
|
-
|
|
551
|
+
interface Empty {
|
|
551
552
|
}
|
|
552
|
-
|
|
553
|
+
interface MessageEnvelope {
|
|
553
554
|
/**
|
|
554
555
|
* App instance ID.
|
|
555
556
|
* @format GUID
|
|
@@ -565,7 +566,7 @@ export interface MessageEnvelope {
|
|
|
565
566
|
/** Stringify payload. */
|
|
566
567
|
data?: string;
|
|
567
568
|
}
|
|
568
|
-
|
|
569
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
569
570
|
/**
|
|
570
571
|
* ID of a site visitor that has not logged in to the site.
|
|
571
572
|
* @format GUID
|
|
@@ -590,7 +591,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
590
591
|
identityType?: WebhookIdentityTypeWithLiterals;
|
|
591
592
|
}
|
|
592
593
|
/** @oneof */
|
|
593
|
-
|
|
594
|
+
interface IdentificationDataIdOneOf {
|
|
594
595
|
/**
|
|
595
596
|
* ID of a site visitor that has not logged in to the site.
|
|
596
597
|
* @format GUID
|
|
@@ -612,7 +613,7 @@ export interface IdentificationDataIdOneOf {
|
|
|
612
613
|
*/
|
|
613
614
|
appId?: string;
|
|
614
615
|
}
|
|
615
|
-
|
|
616
|
+
declare enum WebhookIdentityType {
|
|
616
617
|
UNKNOWN = "UNKNOWN",
|
|
617
618
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
618
619
|
MEMBER = "MEMBER",
|
|
@@ -620,4 +621,112 @@ export declare enum WebhookIdentityType {
|
|
|
620
621
|
APP = "APP"
|
|
621
622
|
}
|
|
622
623
|
/** @enumType */
|
|
623
|
-
|
|
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 };
|