@wix/auto_sdk_loyalty_rewards 1.0.1 → 1.0.3
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/cjs/src/loyalty-v1-reward-rewards.types.d.ts +152 -34
- package/build/cjs/src/loyalty-v1-reward-rewards.types.js.map +1 -1
- package/build/cjs/src/loyalty-v1-reward-rewards.universal.d.ts +172 -38
- package/build/cjs/src/loyalty-v1-reward-rewards.universal.js +3 -0
- package/build/cjs/src/loyalty-v1-reward-rewards.universal.js.map +1 -1
- package/build/es/src/loyalty-v1-reward-rewards.types.d.ts +152 -34
- package/build/es/src/loyalty-v1-reward-rewards.types.js.map +1 -1
- package/build/es/src/loyalty-v1-reward-rewards.universal.d.ts +172 -38
- package/build/es/src/loyalty-v1-reward-rewards.universal.js +3 -0
- package/build/es/src/loyalty-v1-reward-rewards.universal.js.map +1 -1
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.types.d.ts +152 -34
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.types.js.map +1 -1
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.universal.d.ts +172 -38
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.universal.js +3 -0
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.universal.js.map +1 -1
- package/build/internal/es/src/loyalty-v1-reward-rewards.types.d.ts +152 -34
- package/build/internal/es/src/loyalty-v1-reward-rewards.types.js.map +1 -1
- package/build/internal/es/src/loyalty-v1-reward-rewards.universal.d.ts +172 -38
- package/build/internal/es/src/loyalty-v1-reward-rewards.universal.js +3 -0
- package/build/internal/es/src/loyalty-v1-reward-rewards.universal.js.map +1 -1
- package/package.json +4 -4
|
@@ -9,10 +9,15 @@ export interface Reward extends RewardTypeDetailsOneOf {
|
|
|
9
9
|
couponReward?: CouponReward;
|
|
10
10
|
/**
|
|
11
11
|
* Reward ID.
|
|
12
|
+
* @format GUID
|
|
12
13
|
* @readonly
|
|
13
14
|
*/
|
|
14
15
|
id?: string | null;
|
|
15
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Reward name.
|
|
18
|
+
* @minLength 1
|
|
19
|
+
* @maxLength 50
|
|
20
|
+
*/
|
|
16
21
|
name?: string;
|
|
17
22
|
/** Whether the reward is active. Default: `FALSE` */
|
|
18
23
|
active?: boolean;
|
|
@@ -55,15 +60,29 @@ export declare enum RewardType {
|
|
|
55
60
|
SPI_DISCOUNT_AMOUNT = "SPI_DISCOUNT_AMOUNT"
|
|
56
61
|
}
|
|
57
62
|
export interface DiscountAmount {
|
|
58
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* Discount details for each tier.
|
|
65
|
+
* @maxSize 21
|
|
66
|
+
*/
|
|
59
67
|
configsByTier?: DiscountAmountConfig[];
|
|
60
68
|
}
|
|
61
69
|
export interface DiscountAmountConfig {
|
|
62
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* Discount amount. Must be a positive value.
|
|
72
|
+
* @format DECIMAL_VALUE
|
|
73
|
+
* @decimalValue options { gt:0, maxScale:2 }
|
|
74
|
+
*/
|
|
63
75
|
amount?: string;
|
|
64
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* Tier ID, or empty if config applies to the base tier.
|
|
78
|
+
* @format GUID
|
|
79
|
+
*/
|
|
65
80
|
tierId?: string | null;
|
|
66
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* Amount of points required to redeem the reward.
|
|
83
|
+
* @min 1
|
|
84
|
+
* @max 9999999
|
|
85
|
+
*/
|
|
67
86
|
costInPoints?: number;
|
|
68
87
|
}
|
|
69
88
|
export interface CouponReward extends CouponRewardDiscountTypeOneOf, CouponRewardScopeOrMinSubtotalOneOf {
|
|
@@ -89,6 +108,8 @@ export interface CouponReward extends CouponRewardDiscountTypeOneOf, CouponRewar
|
|
|
89
108
|
*
|
|
90
109
|
* Can only be set when `appliesToSubscriptions` is `true` and `scope.namespace` is `pricingPlans`.
|
|
91
110
|
* If `discountedCycleCount` is empty, the coupon applies to all available cycles.
|
|
111
|
+
* @min 1
|
|
112
|
+
* @max 999
|
|
92
113
|
*/
|
|
93
114
|
discountedCycleCount?: number | null;
|
|
94
115
|
}
|
|
@@ -112,37 +133,70 @@ export interface CouponRewardScopeOrMinSubtotalOneOf {
|
|
|
112
133
|
scope?: CouponScope;
|
|
113
134
|
}
|
|
114
135
|
export interface FixedAmountDiscount {
|
|
115
|
-
/**
|
|
136
|
+
/**
|
|
137
|
+
* Discount details for each tier.
|
|
138
|
+
* @minSize 1
|
|
139
|
+
* @maxSize 21
|
|
140
|
+
*/
|
|
116
141
|
configsByTier?: FixedAmountDiscountConfig[];
|
|
117
142
|
}
|
|
118
143
|
export interface FixedAmountDiscountConfig {
|
|
119
|
-
/**
|
|
144
|
+
/**
|
|
145
|
+
* Tier ID, or empty if config applies to the base tier.
|
|
146
|
+
* @format GUID
|
|
147
|
+
*/
|
|
120
148
|
tierId?: string | null;
|
|
121
|
-
/**
|
|
149
|
+
/**
|
|
150
|
+
* Amount of points required to redeem the reward.
|
|
151
|
+
* @min 1
|
|
152
|
+
* @max 9999999
|
|
153
|
+
*/
|
|
122
154
|
costInPoints?: number;
|
|
123
155
|
/** Discount amount. */
|
|
124
156
|
amount?: number;
|
|
125
157
|
}
|
|
126
158
|
export interface PercentageDiscount {
|
|
127
|
-
/**
|
|
159
|
+
/**
|
|
160
|
+
* Discount details for each tier.
|
|
161
|
+
* @minSize 1
|
|
162
|
+
* @maxSize 21
|
|
163
|
+
*/
|
|
128
164
|
configsByTier?: PercentageDiscountConfig[];
|
|
129
165
|
}
|
|
130
166
|
export interface PercentageDiscountConfig {
|
|
131
|
-
/**
|
|
167
|
+
/**
|
|
168
|
+
* Tier ID, or empty if config applies to the base tier.
|
|
169
|
+
* @format GUID
|
|
170
|
+
*/
|
|
132
171
|
tierId?: string | null;
|
|
133
|
-
/**
|
|
172
|
+
/**
|
|
173
|
+
* Amount of points required to redeem the reward.
|
|
174
|
+
* @min 1
|
|
175
|
+
* @max 9999999
|
|
176
|
+
*/
|
|
134
177
|
costInPoints?: number;
|
|
135
178
|
/** Percentage discount. */
|
|
136
179
|
percentage?: number;
|
|
137
180
|
}
|
|
138
181
|
export interface FreeShippingDiscount {
|
|
139
|
-
/**
|
|
182
|
+
/**
|
|
183
|
+
* Discount details for each tier.
|
|
184
|
+
* @minSize 1
|
|
185
|
+
* @maxSize 21
|
|
186
|
+
*/
|
|
140
187
|
configsByTier?: FreeShippingDiscountConfig[];
|
|
141
188
|
}
|
|
142
189
|
export interface FreeShippingDiscountConfig {
|
|
143
|
-
/**
|
|
190
|
+
/**
|
|
191
|
+
* Tier ID, or empty if config applies to the base tier.
|
|
192
|
+
* @format GUID
|
|
193
|
+
*/
|
|
144
194
|
tierId?: string | null;
|
|
145
|
-
/**
|
|
195
|
+
/**
|
|
196
|
+
* Amount of points required to redeem the reward.
|
|
197
|
+
* @min 1
|
|
198
|
+
* @max 9999999
|
|
199
|
+
*/
|
|
146
200
|
costInPoints?: number;
|
|
147
201
|
}
|
|
148
202
|
export interface CouponScope {
|
|
@@ -170,9 +224,15 @@ export interface Group {
|
|
|
170
224
|
entityId?: string | null;
|
|
171
225
|
}
|
|
172
226
|
export interface SpiDiscountAmount {
|
|
173
|
-
/**
|
|
227
|
+
/**
|
|
228
|
+
* Discount details for each tier.
|
|
229
|
+
* @maxSize 21
|
|
230
|
+
*/
|
|
174
231
|
configsByTier?: DiscountAmountConfig[];
|
|
175
|
-
/**
|
|
232
|
+
/**
|
|
233
|
+
* Description of the SPI discount amount reward. Taken from user input in the SPI config.
|
|
234
|
+
* @maxLength 200
|
|
235
|
+
*/
|
|
176
236
|
description?: string;
|
|
177
237
|
}
|
|
178
238
|
export interface RewardDisabled {
|
|
@@ -186,7 +246,11 @@ export interface CreateRewardResponse {
|
|
|
186
246
|
reward?: Reward;
|
|
187
247
|
}
|
|
188
248
|
export interface BulkCreateRewardsRequest {
|
|
189
|
-
/**
|
|
249
|
+
/**
|
|
250
|
+
* Rewards to create.
|
|
251
|
+
* @minSize 1
|
|
252
|
+
* @maxSize 10
|
|
253
|
+
*/
|
|
190
254
|
rewards: Reward[];
|
|
191
255
|
}
|
|
192
256
|
export interface BulkCreateRewardsResponse {
|
|
@@ -228,7 +292,10 @@ export interface BulkActionMetadata {
|
|
|
228
292
|
undetailedFailures?: number;
|
|
229
293
|
}
|
|
230
294
|
export interface GetRewardRequest {
|
|
231
|
-
/**
|
|
295
|
+
/**
|
|
296
|
+
* ID of the reward to retrieve.
|
|
297
|
+
* @format GUID
|
|
298
|
+
*/
|
|
232
299
|
id: string;
|
|
233
300
|
}
|
|
234
301
|
export interface GetRewardResponse {
|
|
@@ -242,7 +309,10 @@ export interface BulkGetRewardsResponse {
|
|
|
242
309
|
rewardsInSite?: RewardsInSite[];
|
|
243
310
|
}
|
|
244
311
|
export interface RewardsInSite {
|
|
245
|
-
/**
|
|
312
|
+
/**
|
|
313
|
+
* Metasite id.
|
|
314
|
+
* @format GUID
|
|
315
|
+
*/
|
|
246
316
|
metaSiteId?: string;
|
|
247
317
|
/** Rewards. */
|
|
248
318
|
rewards?: Reward[];
|
|
@@ -268,6 +338,7 @@ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
|
268
338
|
* Sort object.
|
|
269
339
|
*
|
|
270
340
|
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
341
|
+
* @maxSize 5
|
|
271
342
|
*/
|
|
272
343
|
sort?: Sorting[];
|
|
273
344
|
}
|
|
@@ -281,7 +352,10 @@ export interface CursorQueryPagingMethodOneOf {
|
|
|
281
352
|
cursorPaging?: CursorPaging;
|
|
282
353
|
}
|
|
283
354
|
export interface Sorting {
|
|
284
|
-
/**
|
|
355
|
+
/**
|
|
356
|
+
* Name of the field to sort by.
|
|
357
|
+
* @maxLength 512
|
|
358
|
+
*/
|
|
285
359
|
fieldName?: string;
|
|
286
360
|
/** Sort order. */
|
|
287
361
|
order?: SortOrder;
|
|
@@ -291,13 +365,17 @@ export declare enum SortOrder {
|
|
|
291
365
|
DESC = "DESC"
|
|
292
366
|
}
|
|
293
367
|
export interface CursorPaging {
|
|
294
|
-
/**
|
|
368
|
+
/**
|
|
369
|
+
* Maximum number of items to return in the results.
|
|
370
|
+
* @max 100
|
|
371
|
+
*/
|
|
295
372
|
limit?: number | null;
|
|
296
373
|
/**
|
|
297
374
|
* Pointer to the next or previous page in the list of results.
|
|
298
375
|
*
|
|
299
376
|
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
300
377
|
* Not relevant for the first request.
|
|
378
|
+
* @maxLength 16000
|
|
301
379
|
*/
|
|
302
380
|
cursor?: string | null;
|
|
303
381
|
}
|
|
@@ -321,9 +399,15 @@ export interface CursorPagingMetadata {
|
|
|
321
399
|
hasNext?: boolean | null;
|
|
322
400
|
}
|
|
323
401
|
export interface Cursors {
|
|
324
|
-
/**
|
|
402
|
+
/**
|
|
403
|
+
* Cursor string pointing to the next page in the list of results.
|
|
404
|
+
* @maxLength 16000
|
|
405
|
+
*/
|
|
325
406
|
next?: string | null;
|
|
326
|
-
/**
|
|
407
|
+
/**
|
|
408
|
+
* Cursor pointing to the previous page in the list of results.
|
|
409
|
+
* @maxLength 16000
|
|
410
|
+
*/
|
|
327
411
|
prev?: string | null;
|
|
328
412
|
}
|
|
329
413
|
export interface UpdateRewardRequest {
|
|
@@ -335,7 +419,10 @@ export interface UpdateRewardResponse {
|
|
|
335
419
|
reward?: Reward;
|
|
336
420
|
}
|
|
337
421
|
export interface DeleteRewardRequest {
|
|
338
|
-
/**
|
|
422
|
+
/**
|
|
423
|
+
* ID of the reward to delete.
|
|
424
|
+
* @format GUID
|
|
425
|
+
*/
|
|
339
426
|
id: string;
|
|
340
427
|
/**
|
|
341
428
|
* Revision number, which increments by 1 each time the reward is updated.
|
|
@@ -371,6 +458,7 @@ export interface PagingMetadataV2 {
|
|
|
371
458
|
export interface ListRewardsInTierRequest {
|
|
372
459
|
/**
|
|
373
460
|
* Tier id.
|
|
461
|
+
* @format GUID
|
|
374
462
|
* @readonly
|
|
375
463
|
*/
|
|
376
464
|
tierId?: string | null;
|
|
@@ -458,9 +546,15 @@ export interface ActionEvent {
|
|
|
458
546
|
export interface Empty {
|
|
459
547
|
}
|
|
460
548
|
export interface MessageEnvelope {
|
|
461
|
-
/**
|
|
549
|
+
/**
|
|
550
|
+
* App instance ID.
|
|
551
|
+
* @format GUID
|
|
552
|
+
*/
|
|
462
553
|
instanceId?: string | null;
|
|
463
|
-
/**
|
|
554
|
+
/**
|
|
555
|
+
* Event type.
|
|
556
|
+
* @maxLength 150
|
|
557
|
+
*/
|
|
464
558
|
eventType?: string;
|
|
465
559
|
/** The identification type and identity data. */
|
|
466
560
|
identity?: IdentificationData;
|
|
@@ -468,26 +562,50 @@ export interface MessageEnvelope {
|
|
|
468
562
|
data?: string;
|
|
469
563
|
}
|
|
470
564
|
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
471
|
-
/**
|
|
565
|
+
/**
|
|
566
|
+
* ID of a site visitor that has not logged in to the site.
|
|
567
|
+
* @format GUID
|
|
568
|
+
*/
|
|
472
569
|
anonymousVisitorId?: string;
|
|
473
|
-
/**
|
|
570
|
+
/**
|
|
571
|
+
* ID of a site visitor that has logged in to the site.
|
|
572
|
+
* @format GUID
|
|
573
|
+
*/
|
|
474
574
|
memberId?: string;
|
|
475
|
-
/**
|
|
575
|
+
/**
|
|
576
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
577
|
+
* @format GUID
|
|
578
|
+
*/
|
|
476
579
|
wixUserId?: string;
|
|
477
|
-
/**
|
|
580
|
+
/**
|
|
581
|
+
* ID of an app.
|
|
582
|
+
* @format GUID
|
|
583
|
+
*/
|
|
478
584
|
appId?: string;
|
|
479
585
|
/** @readonly */
|
|
480
586
|
identityType?: WebhookIdentityType;
|
|
481
587
|
}
|
|
482
588
|
/** @oneof */
|
|
483
589
|
export interface IdentificationDataIdOneOf {
|
|
484
|
-
/**
|
|
590
|
+
/**
|
|
591
|
+
* ID of a site visitor that has not logged in to the site.
|
|
592
|
+
* @format GUID
|
|
593
|
+
*/
|
|
485
594
|
anonymousVisitorId?: string;
|
|
486
|
-
/**
|
|
595
|
+
/**
|
|
596
|
+
* ID of a site visitor that has logged in to the site.
|
|
597
|
+
* @format GUID
|
|
598
|
+
*/
|
|
487
599
|
memberId?: string;
|
|
488
|
-
/**
|
|
600
|
+
/**
|
|
601
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
602
|
+
* @format GUID
|
|
603
|
+
*/
|
|
489
604
|
wixUserId?: string;
|
|
490
|
-
/**
|
|
605
|
+
/**
|
|
606
|
+
* ID of an app.
|
|
607
|
+
* @format GUID
|
|
608
|
+
*/
|
|
491
609
|
appId?: string;
|
|
492
610
|
}
|
|
493
611
|
export declare enum WebhookIdentityType {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loyalty-v1-reward-rewards.types.js","sourceRoot":"","sources":["../../../src/loyalty-v1-reward-rewards.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loyalty-v1-reward-rewards.types.js","sourceRoot":"","sources":["../../../src/loyalty-v1-reward-rewards.types.ts"],"names":[],"mappings":"AAoDA,8BAA8B;AAC9B,MAAM,CAAN,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,KAAV,UAAU,QASrB;AA+UD,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AA4QD,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B"}
|