@wix/auto_sdk_loyalty_rewards 1.0.4 → 1.0.5
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/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/loyalty-v1-reward-rewards.context.d.ts +28 -0
- package/build/cjs/src/loyalty-v1-reward-rewards.context.js +34 -0
- package/build/cjs/src/loyalty-v1-reward-rewards.context.js.map +1 -0
- package/build/cjs/src/loyalty-v1-reward-rewards.http.d.ts +56 -0
- package/build/cjs/src/loyalty-v1-reward-rewards.http.js +464 -0
- package/build/cjs/src/loyalty-v1-reward-rewards.http.js.map +1 -0
- package/build/cjs/src/loyalty-v1-reward-rewards.meta.d.ts +26 -0
- package/build/cjs/src/loyalty-v1-reward-rewards.meta.js +180 -0
- package/build/cjs/src/loyalty-v1-reward-rewards.meta.js.map +1 -0
- package/build/cjs/src/loyalty-v1-reward-rewards.public.d.ts +107 -0
- package/build/cjs/src/loyalty-v1-reward-rewards.public.js +119 -0
- package/build/cjs/src/loyalty-v1-reward-rewards.public.js.map +1 -0
- package/build/{internal/loyalty-v1-reward-rewards.universal-DJFLdOGr.d.mts → cjs/src/loyalty-v1-reward-rewards.types.d.ts} +84 -193
- package/build/cjs/src/loyalty-v1-reward-rewards.types.js +29 -0
- package/build/cjs/src/loyalty-v1-reward-rewards.types.js.map +1 -0
- package/build/cjs/src/loyalty-v1-reward-rewards.universal.d.ts +920 -0
- package/build/cjs/src/loyalty-v1-reward-rewards.universal.js +373 -0
- package/build/cjs/src/loyalty-v1-reward-rewards.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/loyalty-v1-reward-rewards.context.d.ts +28 -0
- package/build/es/src/loyalty-v1-reward-rewards.context.js +28 -0
- package/build/es/src/loyalty-v1-reward-rewards.context.js.map +1 -0
- package/build/es/src/loyalty-v1-reward-rewards.http.d.ts +56 -0
- package/build/es/src/loyalty-v1-reward-rewards.http.js +453 -0
- package/build/es/src/loyalty-v1-reward-rewards.http.js.map +1 -0
- package/build/es/src/loyalty-v1-reward-rewards.meta.d.ts +26 -0
- package/build/es/src/loyalty-v1-reward-rewards.meta.js +146 -0
- package/build/es/src/loyalty-v1-reward-rewards.meta.js.map +1 -0
- package/build/es/src/loyalty-v1-reward-rewards.public.d.ts +107 -0
- package/build/es/src/loyalty-v1-reward-rewards.public.js +105 -0
- package/build/es/src/loyalty-v1-reward-rewards.public.js.map +1 -0
- package/build/{loyalty-v1-reward-rewards.universal-DJFLdOGr.d.mts → es/src/loyalty-v1-reward-rewards.types.d.ts} +84 -193
- package/build/es/src/loyalty-v1-reward-rewards.types.js +26 -0
- package/build/es/src/loyalty-v1-reward-rewards.types.js.map +1 -0
- package/build/es/src/loyalty-v1-reward-rewards.universal.d.ts +920 -0
- package/build/es/src/loyalty-v1-reward-rewards.universal.js +339 -0
- package/build/es/src/loyalty-v1-reward-rewards.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.context.d.ts +28 -0
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.context.js +34 -0
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.context.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.http.d.ts +56 -0
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.http.js +464 -0
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.http.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.meta.d.ts +26 -0
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.meta.js +180 -0
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.meta.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.public.d.ts +107 -0
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.public.js +119 -0
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.public.js.map +1 -0
- package/build/{loyalty-v1-reward-rewards.universal-DJFLdOGr.d.ts → internal/cjs/src/loyalty-v1-reward-rewards.types.d.ts} +84 -193
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.types.js +29 -0
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.types.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.universal.d.ts +920 -0
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.universal.js +373 -0
- package/build/internal/cjs/src/loyalty-v1-reward-rewards.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-reward-rewards.context.d.ts +28 -0
- package/build/internal/es/src/loyalty-v1-reward-rewards.context.js +28 -0
- package/build/internal/es/src/loyalty-v1-reward-rewards.context.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-reward-rewards.http.d.ts +56 -0
- package/build/internal/es/src/loyalty-v1-reward-rewards.http.js +453 -0
- package/build/internal/es/src/loyalty-v1-reward-rewards.http.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-reward-rewards.meta.d.ts +26 -0
- package/build/internal/es/src/loyalty-v1-reward-rewards.meta.js +146 -0
- package/build/internal/es/src/loyalty-v1-reward-rewards.meta.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-reward-rewards.public.d.ts +107 -0
- package/build/internal/es/src/loyalty-v1-reward-rewards.public.js +105 -0
- package/build/internal/es/src/loyalty-v1-reward-rewards.public.js.map +1 -0
- package/build/internal/{loyalty-v1-reward-rewards.universal-DJFLdOGr.d.ts → es/src/loyalty-v1-reward-rewards.types.d.ts} +84 -193
- package/build/internal/es/src/loyalty-v1-reward-rewards.types.js +26 -0
- package/build/internal/es/src/loyalty-v1-reward-rewards.types.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-reward-rewards.universal.d.ts +920 -0
- package/build/internal/es/src/loyalty-v1-reward-rewards.universal.js +339 -0
- package/build/internal/es/src/loyalty-v1-reward-rewards.universal.js.map +1 -0
- package/package.json +11 -12
- package/build/index.d.mts +0 -126
- package/build/index.d.ts +0 -126
- package/build/index.js +0 -834
- package/build/index.js.map +0 -1
- package/build/index.mjs +0 -797
- package/build/index.mjs.map +0 -1
- package/build/internal/index.d.mts +0 -126
- package/build/internal/index.d.ts +0 -126
- package/build/internal/index.js +0 -834
- package/build/internal/index.js.map +0 -1
- package/build/internal/index.mjs +0 -797
- package/build/internal/index.mjs.map +0 -1
- package/build/internal/meta.d.mts +0 -472
- package/build/internal/meta.d.ts +0 -472
- package/build/internal/meta.js +0 -597
- package/build/internal/meta.js.map +0 -1
- package/build/internal/meta.mjs +0 -563
- package/build/internal/meta.mjs.map +0 -1
- package/build/meta.d.mts +0 -472
- package/build/meta.d.ts +0 -472
- package/build/meta.js +0 -597
- package/build/meta.js.map +0 -1
- package/build/meta.mjs +0 -563
- package/build/meta.mjs.map +0 -1
package/build/internal/meta.d.ts
DELETED
|
@@ -1,472 +0,0 @@
|
|
|
1
|
-
import { q as CreateRewardRequest$1, r as CreateRewardResponse$1, s as BulkCreateRewardsRequest$1, B as BulkCreateRewardsResponse$1, v as GetRewardRequest$1, w as GetRewardResponse$1, x as BulkGetRewardsRequest$1, a as BulkGetRewardsResponse$1, z as QueryRewardsRequest$1, Q as QueryRewardsResponse$1, N as UpdateRewardRequest$1, b as UpdateRewardResponse$1, O as DeleteRewardRequest$1, T as DeleteRewardResponse$1, V as ListRewardsRequest$1, c as ListRewardsResponse$1 } from './loyalty-v1-reward-rewards.universal-DJFLdOGr.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* A loyalty reward is an object a customer can redeem with loyalty points.
|
|
5
|
-
* Redeeming a reward then creates a loyalty coupon that the customer can use.
|
|
6
|
-
*/
|
|
7
|
-
interface Reward extends RewardTypeDetailsOneOf {
|
|
8
|
-
/** Discount details. */
|
|
9
|
-
discountAmount?: DiscountAmount;
|
|
10
|
-
/** Coupon details. */
|
|
11
|
-
couponReward?: CouponReward;
|
|
12
|
-
/**
|
|
13
|
-
* Reward ID.
|
|
14
|
-
* @format GUID
|
|
15
|
-
* @readonly
|
|
16
|
-
*/
|
|
17
|
-
id?: string | null;
|
|
18
|
-
/**
|
|
19
|
-
* Reward name.
|
|
20
|
-
* @minLength 1
|
|
21
|
-
* @maxLength 50
|
|
22
|
-
*/
|
|
23
|
-
name?: string;
|
|
24
|
-
/** Whether the reward is active. Default: `FALSE` */
|
|
25
|
-
active?: boolean;
|
|
26
|
-
/** Reward type. */
|
|
27
|
-
type?: RewardType;
|
|
28
|
-
/**
|
|
29
|
-
* Revision number, which increments by 1 each time the loyalty reward is updated.
|
|
30
|
-
*
|
|
31
|
-
* To prevent conflicting changes, the current `revision` must be passed when updating the loyalty reward.
|
|
32
|
-
* @readonly
|
|
33
|
-
*/
|
|
34
|
-
revision?: string | null;
|
|
35
|
-
/**
|
|
36
|
-
* Date and time the reward was created.
|
|
37
|
-
* @readonly
|
|
38
|
-
*/
|
|
39
|
-
createdDate?: Date | null;
|
|
40
|
-
/**
|
|
41
|
-
* Date and time the reward was last updated.
|
|
42
|
-
* @readonly
|
|
43
|
-
*/
|
|
44
|
-
updatedDate?: Date | null;
|
|
45
|
-
}
|
|
46
|
-
/** @oneof */
|
|
47
|
-
interface RewardTypeDetailsOneOf {
|
|
48
|
-
/** Discount details. */
|
|
49
|
-
discountAmount?: DiscountAmount;
|
|
50
|
-
/** Coupon details. */
|
|
51
|
-
couponReward?: CouponReward;
|
|
52
|
-
}
|
|
53
|
-
/** Available reward types. */
|
|
54
|
-
declare enum RewardType {
|
|
55
|
-
/** Undefined reward type. */
|
|
56
|
-
UNDEFINED = "UNDEFINED",
|
|
57
|
-
/** Discount reward. Special flexible reward type used in checkout. */
|
|
58
|
-
DISCOUNT_AMOUNT = "DISCOUNT_AMOUNT",
|
|
59
|
-
/** Coupon reward. [Learn more about coupons.](https://support.wix.com/en/article/using-coupons-as-loyalty-rewards) */
|
|
60
|
-
COUPON_REWARD = "COUPON_REWARD",
|
|
61
|
-
/** For internal use. */
|
|
62
|
-
SPI_DISCOUNT_AMOUNT = "SPI_DISCOUNT_AMOUNT"
|
|
63
|
-
}
|
|
64
|
-
interface DiscountAmount {
|
|
65
|
-
/**
|
|
66
|
-
* Discount details for each tier.
|
|
67
|
-
* @maxSize 21
|
|
68
|
-
*/
|
|
69
|
-
configsByTier?: DiscountAmountConfig[];
|
|
70
|
-
}
|
|
71
|
-
interface DiscountAmountConfig {
|
|
72
|
-
/**
|
|
73
|
-
* Discount amount. Must be a positive value.
|
|
74
|
-
* @format DECIMAL_VALUE
|
|
75
|
-
* @decimalValue options { gt:0, maxScale:2 }
|
|
76
|
-
*/
|
|
77
|
-
amount?: string;
|
|
78
|
-
/**
|
|
79
|
-
* Tier ID, or empty if config applies to the base tier.
|
|
80
|
-
* @format GUID
|
|
81
|
-
*/
|
|
82
|
-
tierId?: string | null;
|
|
83
|
-
/**
|
|
84
|
-
* Amount of points required to redeem the reward.
|
|
85
|
-
* @min 1
|
|
86
|
-
* @max 9999999
|
|
87
|
-
*/
|
|
88
|
-
costInPoints?: number;
|
|
89
|
-
}
|
|
90
|
-
interface CouponReward extends CouponRewardDiscountTypeOneOf, CouponRewardScopeOrMinSubtotalOneOf {
|
|
91
|
-
/** Discount as a fixed amount. */
|
|
92
|
-
fixedAmount?: FixedAmountDiscount;
|
|
93
|
-
/** Discount as a percentage. */
|
|
94
|
-
percentage?: PercentageDiscount;
|
|
95
|
-
/** Free shipping. */
|
|
96
|
-
freeShipping?: FreeShippingDiscount;
|
|
97
|
-
/** Limit the coupon to carts with a subtotal greater than this number. */
|
|
98
|
-
minimumSubtotal?: number;
|
|
99
|
-
/**
|
|
100
|
-
* Specifies the type of line items this coupon will apply to.
|
|
101
|
-
* For more information, see [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values).
|
|
102
|
-
*/
|
|
103
|
-
scope?: CouponScope;
|
|
104
|
-
/** Whether the coupon is limited to one item. */
|
|
105
|
-
limitedToOneItem?: boolean | null;
|
|
106
|
-
/** Whether the coupon also applies to subscriptions. */
|
|
107
|
-
appliesToSubscriptions?: boolean | null;
|
|
108
|
-
/**
|
|
109
|
-
* Specifies the amount of discounted cycles for a subscription item.
|
|
110
|
-
*
|
|
111
|
-
* Can only be set when `appliesToSubscriptions` is `true` and `scope.namespace` is `pricingPlans`.
|
|
112
|
-
* If `discountedCycleCount` is empty, the coupon applies to all available cycles.
|
|
113
|
-
* @min 1
|
|
114
|
-
* @max 999
|
|
115
|
-
*/
|
|
116
|
-
discountedCycleCount?: number | null;
|
|
117
|
-
}
|
|
118
|
-
/** @oneof */
|
|
119
|
-
interface CouponRewardDiscountTypeOneOf {
|
|
120
|
-
/** Discount as a fixed amount. */
|
|
121
|
-
fixedAmount?: FixedAmountDiscount;
|
|
122
|
-
/** Discount as a percentage. */
|
|
123
|
-
percentage?: PercentageDiscount;
|
|
124
|
-
/** Free shipping. */
|
|
125
|
-
freeShipping?: FreeShippingDiscount;
|
|
126
|
-
}
|
|
127
|
-
/** @oneof */
|
|
128
|
-
interface CouponRewardScopeOrMinSubtotalOneOf {
|
|
129
|
-
/** Limit the coupon to carts with a subtotal greater than this number. */
|
|
130
|
-
minimumSubtotal?: number;
|
|
131
|
-
/**
|
|
132
|
-
* Specifies the type of line items this coupon will apply to.
|
|
133
|
-
* For more information, see [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values).
|
|
134
|
-
*/
|
|
135
|
-
scope?: CouponScope;
|
|
136
|
-
}
|
|
137
|
-
interface FixedAmountDiscount {
|
|
138
|
-
/**
|
|
139
|
-
* Discount details for each tier.
|
|
140
|
-
* @minSize 1
|
|
141
|
-
* @maxSize 21
|
|
142
|
-
*/
|
|
143
|
-
configsByTier?: FixedAmountDiscountConfig[];
|
|
144
|
-
}
|
|
145
|
-
interface FixedAmountDiscountConfig {
|
|
146
|
-
/**
|
|
147
|
-
* Tier ID, or empty if config applies to the base tier.
|
|
148
|
-
* @format GUID
|
|
149
|
-
*/
|
|
150
|
-
tierId?: string | null;
|
|
151
|
-
/**
|
|
152
|
-
* Amount of points required to redeem the reward.
|
|
153
|
-
* @min 1
|
|
154
|
-
* @max 9999999
|
|
155
|
-
*/
|
|
156
|
-
costInPoints?: number;
|
|
157
|
-
/** Discount amount. */
|
|
158
|
-
amount?: number;
|
|
159
|
-
}
|
|
160
|
-
interface PercentageDiscount {
|
|
161
|
-
/**
|
|
162
|
-
* Discount details for each tier.
|
|
163
|
-
* @minSize 1
|
|
164
|
-
* @maxSize 21
|
|
165
|
-
*/
|
|
166
|
-
configsByTier?: PercentageDiscountConfig[];
|
|
167
|
-
}
|
|
168
|
-
interface PercentageDiscountConfig {
|
|
169
|
-
/**
|
|
170
|
-
* Tier ID, or empty if config applies to the base tier.
|
|
171
|
-
* @format GUID
|
|
172
|
-
*/
|
|
173
|
-
tierId?: string | null;
|
|
174
|
-
/**
|
|
175
|
-
* Amount of points required to redeem the reward.
|
|
176
|
-
* @min 1
|
|
177
|
-
* @max 9999999
|
|
178
|
-
*/
|
|
179
|
-
costInPoints?: number;
|
|
180
|
-
/** Percentage discount. */
|
|
181
|
-
percentage?: number;
|
|
182
|
-
}
|
|
183
|
-
interface FreeShippingDiscount {
|
|
184
|
-
/**
|
|
185
|
-
* Discount details for each tier.
|
|
186
|
-
* @minSize 1
|
|
187
|
-
* @maxSize 21
|
|
188
|
-
*/
|
|
189
|
-
configsByTier?: FreeShippingDiscountConfig[];
|
|
190
|
-
}
|
|
191
|
-
interface FreeShippingDiscountConfig {
|
|
192
|
-
/**
|
|
193
|
-
* Tier ID, or empty if config applies to the base tier.
|
|
194
|
-
* @format GUID
|
|
195
|
-
*/
|
|
196
|
-
tierId?: string | null;
|
|
197
|
-
/**
|
|
198
|
-
* Amount of points required to redeem the reward.
|
|
199
|
-
* @min 1
|
|
200
|
-
* @max 9999999
|
|
201
|
-
*/
|
|
202
|
-
costInPoints?: number;
|
|
203
|
-
}
|
|
204
|
-
interface CouponScope {
|
|
205
|
-
/**
|
|
206
|
-
* Scope namespace.
|
|
207
|
-
*
|
|
208
|
-
* See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values) for valid namespaces.
|
|
209
|
-
*/
|
|
210
|
-
namespace?: string;
|
|
211
|
-
/**
|
|
212
|
-
* Coupon scope's applied group.
|
|
213
|
-
*
|
|
214
|
-
* See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values) for valid groups.
|
|
215
|
-
*/
|
|
216
|
-
group?: Group;
|
|
217
|
-
}
|
|
218
|
-
interface Group {
|
|
219
|
-
/**
|
|
220
|
-
* Name of coupon scope's group.
|
|
221
|
-
*
|
|
222
|
-
* See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values) for valid groups.
|
|
223
|
-
*/
|
|
224
|
-
name?: string;
|
|
225
|
-
/** Entity ID, if the coupon scope is limited to just one item. */
|
|
226
|
-
entityId?: string | null;
|
|
227
|
-
}
|
|
228
|
-
interface CreateRewardRequest {
|
|
229
|
-
/** Reward to create. */
|
|
230
|
-
reward: Reward;
|
|
231
|
-
}
|
|
232
|
-
interface CreateRewardResponse {
|
|
233
|
-
/** Created reward. */
|
|
234
|
-
reward?: Reward;
|
|
235
|
-
}
|
|
236
|
-
interface BulkCreateRewardsRequest {
|
|
237
|
-
/**
|
|
238
|
-
* Rewards to create.
|
|
239
|
-
* @minSize 1
|
|
240
|
-
* @maxSize 10
|
|
241
|
-
*/
|
|
242
|
-
rewards: Reward[];
|
|
243
|
-
}
|
|
244
|
-
interface BulkCreateRewardsResponse {
|
|
245
|
-
/** Created rewards. */
|
|
246
|
-
results?: BulkRewardResult[];
|
|
247
|
-
/** Total successes and failures of the bulk create rewards action. */
|
|
248
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
249
|
-
}
|
|
250
|
-
interface BulkRewardResult {
|
|
251
|
-
/** Item metadata. */
|
|
252
|
-
itemMetadata?: ItemMetadata;
|
|
253
|
-
/** Created reward. */
|
|
254
|
-
item?: Reward;
|
|
255
|
-
}
|
|
256
|
-
interface ItemMetadata {
|
|
257
|
-
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
258
|
-
id?: string | null;
|
|
259
|
-
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
260
|
-
originalIndex?: number;
|
|
261
|
-
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
262
|
-
success?: boolean;
|
|
263
|
-
/** Details about the error in case of failure. */
|
|
264
|
-
error?: ApplicationError;
|
|
265
|
-
}
|
|
266
|
-
interface ApplicationError {
|
|
267
|
-
/** Error code. */
|
|
268
|
-
code?: string;
|
|
269
|
-
/** Description of the error. */
|
|
270
|
-
description?: string;
|
|
271
|
-
/** Data related to the error. */
|
|
272
|
-
data?: Record<string, any> | null;
|
|
273
|
-
}
|
|
274
|
-
interface BulkActionMetadata {
|
|
275
|
-
/** Number of items that were successfully processed. */
|
|
276
|
-
totalSuccesses?: number;
|
|
277
|
-
/** Number of items that couldn't be processed. */
|
|
278
|
-
totalFailures?: number;
|
|
279
|
-
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
280
|
-
undetailedFailures?: number;
|
|
281
|
-
}
|
|
282
|
-
interface GetRewardRequest {
|
|
283
|
-
/**
|
|
284
|
-
* ID of the reward to retrieve.
|
|
285
|
-
* @format GUID
|
|
286
|
-
*/
|
|
287
|
-
id: string;
|
|
288
|
-
}
|
|
289
|
-
interface GetRewardResponse {
|
|
290
|
-
/** Retrieved reward. */
|
|
291
|
-
reward?: Reward;
|
|
292
|
-
}
|
|
293
|
-
interface BulkGetRewardsRequest {
|
|
294
|
-
}
|
|
295
|
-
interface BulkGetRewardsResponse {
|
|
296
|
-
/** Found rewards per site. */
|
|
297
|
-
rewardsInSite?: RewardsInSite[];
|
|
298
|
-
}
|
|
299
|
-
interface RewardsInSite {
|
|
300
|
-
/**
|
|
301
|
-
* Metasite id.
|
|
302
|
-
* @format GUID
|
|
303
|
-
*/
|
|
304
|
-
metaSiteId?: string;
|
|
305
|
-
/** Rewards. */
|
|
306
|
-
rewards?: Reward[];
|
|
307
|
-
}
|
|
308
|
-
interface QueryRewardsRequest {
|
|
309
|
-
/** Query parameters. */
|
|
310
|
-
query: CursorQuery;
|
|
311
|
-
}
|
|
312
|
-
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
313
|
-
/**
|
|
314
|
-
* Cursor paging options.
|
|
315
|
-
*
|
|
316
|
-
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
317
|
-
*/
|
|
318
|
-
cursorPaging?: CursorPaging;
|
|
319
|
-
/**
|
|
320
|
-
* Filter object.
|
|
321
|
-
*
|
|
322
|
-
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
323
|
-
*/
|
|
324
|
-
filter?: Record<string, any> | null;
|
|
325
|
-
/**
|
|
326
|
-
* Sort object.
|
|
327
|
-
*
|
|
328
|
-
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
329
|
-
* @maxSize 5
|
|
330
|
-
*/
|
|
331
|
-
sort?: Sorting[];
|
|
332
|
-
}
|
|
333
|
-
/** @oneof */
|
|
334
|
-
interface CursorQueryPagingMethodOneOf {
|
|
335
|
-
/**
|
|
336
|
-
* Cursor paging options.
|
|
337
|
-
*
|
|
338
|
-
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
339
|
-
*/
|
|
340
|
-
cursorPaging?: CursorPaging;
|
|
341
|
-
}
|
|
342
|
-
interface Sorting {
|
|
343
|
-
/**
|
|
344
|
-
* Name of the field to sort by.
|
|
345
|
-
* @maxLength 512
|
|
346
|
-
*/
|
|
347
|
-
fieldName?: string;
|
|
348
|
-
/** Sort order. */
|
|
349
|
-
order?: SortOrder;
|
|
350
|
-
}
|
|
351
|
-
declare enum SortOrder {
|
|
352
|
-
ASC = "ASC",
|
|
353
|
-
DESC = "DESC"
|
|
354
|
-
}
|
|
355
|
-
interface CursorPaging {
|
|
356
|
-
/**
|
|
357
|
-
* Maximum number of items to return in the results.
|
|
358
|
-
* @max 100
|
|
359
|
-
*/
|
|
360
|
-
limit?: number | null;
|
|
361
|
-
/**
|
|
362
|
-
* Pointer to the next or previous page in the list of results.
|
|
363
|
-
*
|
|
364
|
-
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
365
|
-
* Not relevant for the first request.
|
|
366
|
-
* @maxLength 16000
|
|
367
|
-
*/
|
|
368
|
-
cursor?: string | null;
|
|
369
|
-
}
|
|
370
|
-
interface QueryRewardsResponse {
|
|
371
|
-
/** Retrieved loyalty rewards. */
|
|
372
|
-
rewards?: Reward[];
|
|
373
|
-
/** Details on the paged set of results returned. */
|
|
374
|
-
pagingMetadata?: CursorPagingMetadata;
|
|
375
|
-
}
|
|
376
|
-
interface CursorPagingMetadata {
|
|
377
|
-
/** Number of items returned in current page. */
|
|
378
|
-
count?: number | null;
|
|
379
|
-
/** Cursor strings that point to the next page, previous page, or both. */
|
|
380
|
-
cursors?: Cursors;
|
|
381
|
-
/**
|
|
382
|
-
* Whether there are more pages to retrieve following the current page.
|
|
383
|
-
*
|
|
384
|
-
* + `true`: Another page of results can be retrieved.
|
|
385
|
-
* + `false`: This is the last page.
|
|
386
|
-
*/
|
|
387
|
-
hasNext?: boolean | null;
|
|
388
|
-
}
|
|
389
|
-
interface Cursors {
|
|
390
|
-
/**
|
|
391
|
-
* Cursor string pointing to the next page in the list of results.
|
|
392
|
-
* @maxLength 16000
|
|
393
|
-
*/
|
|
394
|
-
next?: string | null;
|
|
395
|
-
/**
|
|
396
|
-
* Cursor pointing to the previous page in the list of results.
|
|
397
|
-
* @maxLength 16000
|
|
398
|
-
*/
|
|
399
|
-
prev?: string | null;
|
|
400
|
-
}
|
|
401
|
-
interface UpdateRewardRequest {
|
|
402
|
-
/** Reward information to update. */
|
|
403
|
-
reward: Reward;
|
|
404
|
-
}
|
|
405
|
-
interface UpdateRewardResponse {
|
|
406
|
-
/** Updated reward. */
|
|
407
|
-
reward?: Reward;
|
|
408
|
-
}
|
|
409
|
-
interface DeleteRewardRequest {
|
|
410
|
-
/**
|
|
411
|
-
* ID of the reward to delete.
|
|
412
|
-
* @format GUID
|
|
413
|
-
*/
|
|
414
|
-
id: string;
|
|
415
|
-
/**
|
|
416
|
-
* Revision number, which increments by 1 each time the reward is updated.
|
|
417
|
-
*
|
|
418
|
-
* To prevent conflicting changes, the current `revision` must be passed when deleting the reward.
|
|
419
|
-
*/
|
|
420
|
-
revision?: string;
|
|
421
|
-
}
|
|
422
|
-
interface DeleteRewardResponse {
|
|
423
|
-
}
|
|
424
|
-
interface ListRewardsRequest {
|
|
425
|
-
/** Pagination options. */
|
|
426
|
-
cursorPaging?: CursorPaging;
|
|
427
|
-
}
|
|
428
|
-
interface ListRewardsResponse {
|
|
429
|
-
/** Retrieved loyalty rewards. */
|
|
430
|
-
rewards?: Reward[];
|
|
431
|
-
/** Details on the paged set of results returned. */
|
|
432
|
-
pagingMetadata?: PagingMetadataV2;
|
|
433
|
-
}
|
|
434
|
-
interface PagingMetadataV2 {
|
|
435
|
-
/** Number of items returned in the response. */
|
|
436
|
-
count?: number | null;
|
|
437
|
-
/** Offset that was requested. */
|
|
438
|
-
offset?: number | null;
|
|
439
|
-
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
440
|
-
total?: number | null;
|
|
441
|
-
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
442
|
-
tooManyToCount?: boolean | null;
|
|
443
|
-
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
444
|
-
cursors?: Cursors;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
448
|
-
getUrl: (context: any) => string;
|
|
449
|
-
httpMethod: K;
|
|
450
|
-
path: string;
|
|
451
|
-
pathParams: M;
|
|
452
|
-
__requestType: T;
|
|
453
|
-
__originalRequestType: S;
|
|
454
|
-
__responseType: Q;
|
|
455
|
-
__originalResponseType: R;
|
|
456
|
-
};
|
|
457
|
-
declare function createReward(): __PublicMethodMetaInfo<'POST', {}, CreateRewardRequest$1, CreateRewardRequest, CreateRewardResponse$1, CreateRewardResponse>;
|
|
458
|
-
declare function bulkCreateRewards(): __PublicMethodMetaInfo<'POST', {}, BulkCreateRewardsRequest$1, BulkCreateRewardsRequest, BulkCreateRewardsResponse$1, BulkCreateRewardsResponse>;
|
|
459
|
-
declare function getReward(): __PublicMethodMetaInfo<'GET', {
|
|
460
|
-
id: string;
|
|
461
|
-
}, GetRewardRequest$1, GetRewardRequest, GetRewardResponse$1, GetRewardResponse>;
|
|
462
|
-
declare function bulkGetRewards(): __PublicMethodMetaInfo<'GET', {}, BulkGetRewardsRequest$1, BulkGetRewardsRequest, BulkGetRewardsResponse$1, BulkGetRewardsResponse>;
|
|
463
|
-
declare function queryRewards(): __PublicMethodMetaInfo<'POST', {}, QueryRewardsRequest$1, QueryRewardsRequest, QueryRewardsResponse$1, QueryRewardsResponse>;
|
|
464
|
-
declare function updateReward(): __PublicMethodMetaInfo<'PUT', {
|
|
465
|
-
rewardId: string;
|
|
466
|
-
}, UpdateRewardRequest$1, UpdateRewardRequest, UpdateRewardResponse$1, UpdateRewardResponse>;
|
|
467
|
-
declare function deleteReward(): __PublicMethodMetaInfo<'DELETE', {
|
|
468
|
-
id: string;
|
|
469
|
-
}, DeleteRewardRequest$1, DeleteRewardRequest, DeleteRewardResponse$1, DeleteRewardResponse>;
|
|
470
|
-
declare function listRewards(): __PublicMethodMetaInfo<'GET', {}, ListRewardsRequest$1, ListRewardsRequest, ListRewardsResponse$1, ListRewardsResponse>;
|
|
471
|
-
|
|
472
|
-
export { type __PublicMethodMetaInfo, bulkCreateRewards, bulkGetRewards, createReward, deleteReward, getReward, listRewards, queryRewards, updateReward };
|