@wix/auto_sdk_benefit-programs_pools 1.0.21 → 1.0.23
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/{internal/cjs/src/benefit-programs-v1-pool-pools.universal.d.ts → benefit-programs-v1-pool-pools.universal-mZpeDNA1.d.mts} +156 -323
- package/build/{cjs/src/benefit-programs-v1-pool-pools.universal.d.ts → benefit-programs-v1-pool-pools.universal-mZpeDNA1.d.ts} +156 -323
- package/build/index.d.mts +105 -0
- package/build/index.d.ts +105 -0
- package/build/index.js +952 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +908 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/{es/src/benefit-programs-v1-pool-pools.universal.d.ts → benefit-programs-v1-pool-pools.universal-mZpeDNA1.d.mts} +156 -323
- package/build/{es/src/benefit-programs-v1-pool-pools.universal.d.ts → internal/benefit-programs-v1-pool-pools.universal-mZpeDNA1.d.ts} +156 -323
- package/build/internal/index.d.mts +105 -0
- package/build/internal/index.d.ts +105 -0
- package/build/internal/index.js +952 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +908 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/internal/meta.d.mts +782 -0
- package/build/internal/meta.d.ts +782 -0
- package/build/internal/meta.js +627 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +593 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/meta.d.mts +782 -0
- package/build/meta.d.ts +782 -0
- package/build/meta.js +627 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +593 -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/benefit-programs-v1-pool-pools.context.d.ts +0 -12
- package/build/cjs/src/benefit-programs-v1-pool-pools.context.js +0 -28
- package/build/cjs/src/benefit-programs-v1-pool-pools.context.js.map +0 -1
- package/build/cjs/src/benefit-programs-v1-pool-pools.http.d.ts +0 -56
- package/build/cjs/src/benefit-programs-v1-pool-pools.http.js +0 -494
- package/build/cjs/src/benefit-programs-v1-pool-pools.http.js.map +0 -1
- package/build/cjs/src/benefit-programs-v1-pool-pools.meta.d.ts +0 -24
- package/build/cjs/src/benefit-programs-v1-pool-pools.meta.js +0 -180
- package/build/cjs/src/benefit-programs-v1-pool-pools.meta.js.map +0 -1
- package/build/cjs/src/benefit-programs-v1-pool-pools.public.d.ts +0 -96
- package/build/cjs/src/benefit-programs-v1-pool-pools.public.js +0 -68
- package/build/cjs/src/benefit-programs-v1-pool-pools.public.js.map +0 -1
- package/build/cjs/src/benefit-programs-v1-pool-pools.types.d.ts +0 -1597
- package/build/cjs/src/benefit-programs-v1-pool-pools.types.js +0 -140
- package/build/cjs/src/benefit-programs-v1-pool-pools.types.js.map +0 -1
- package/build/cjs/src/benefit-programs-v1-pool-pools.universal.js +0 -589
- package/build/cjs/src/benefit-programs-v1-pool-pools.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/benefit-programs-v1-pool-pools.context.d.ts +0 -12
- package/build/es/src/benefit-programs-v1-pool-pools.context.js +0 -12
- package/build/es/src/benefit-programs-v1-pool-pools.context.js.map +0 -1
- package/build/es/src/benefit-programs-v1-pool-pools.http.d.ts +0 -56
- package/build/es/src/benefit-programs-v1-pool-pools.http.js +0 -483
- package/build/es/src/benefit-programs-v1-pool-pools.http.js.map +0 -1
- package/build/es/src/benefit-programs-v1-pool-pools.meta.d.ts +0 -24
- package/build/es/src/benefit-programs-v1-pool-pools.meta.js +0 -146
- package/build/es/src/benefit-programs-v1-pool-pools.meta.js.map +0 -1
- package/build/es/src/benefit-programs-v1-pool-pools.public.d.ts +0 -96
- package/build/es/src/benefit-programs-v1-pool-pools.public.js +0 -44
- package/build/es/src/benefit-programs-v1-pool-pools.public.js.map +0 -1
- package/build/es/src/benefit-programs-v1-pool-pools.types.d.ts +0 -1597
- package/build/es/src/benefit-programs-v1-pool-pools.types.js +0 -137
- package/build/es/src/benefit-programs-v1-pool-pools.types.js.map +0 -1
- package/build/es/src/benefit-programs-v1-pool-pools.universal.js +0 -555
- package/build/es/src/benefit-programs-v1-pool-pools.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/benefit-programs-v1-pool-pools.context.d.ts +0 -12
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.context.js +0 -28
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.context.js.map +0 -1
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.http.d.ts +0 -56
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.http.js +0 -494
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.http.js.map +0 -1
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.meta.d.ts +0 -24
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.meta.js +0 -180
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.meta.js.map +0 -1
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.public.d.ts +0 -96
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.public.js +0 -68
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.public.js.map +0 -1
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.types.d.ts +0 -1597
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.types.js +0 -140
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.types.js.map +0 -1
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.universal.js +0 -589
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.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/benefit-programs-v1-pool-pools.context.d.ts +0 -12
- package/build/internal/es/src/benefit-programs-v1-pool-pools.context.js +0 -12
- package/build/internal/es/src/benefit-programs-v1-pool-pools.context.js.map +0 -1
- package/build/internal/es/src/benefit-programs-v1-pool-pools.http.d.ts +0 -56
- package/build/internal/es/src/benefit-programs-v1-pool-pools.http.js +0 -483
- package/build/internal/es/src/benefit-programs-v1-pool-pools.http.js.map +0 -1
- package/build/internal/es/src/benefit-programs-v1-pool-pools.meta.d.ts +0 -24
- package/build/internal/es/src/benefit-programs-v1-pool-pools.meta.js +0 -146
- package/build/internal/es/src/benefit-programs-v1-pool-pools.meta.js.map +0 -1
- package/build/internal/es/src/benefit-programs-v1-pool-pools.public.d.ts +0 -96
- package/build/internal/es/src/benefit-programs-v1-pool-pools.public.js +0 -44
- package/build/internal/es/src/benefit-programs-v1-pool-pools.public.js.map +0 -1
- package/build/internal/es/src/benefit-programs-v1-pool-pools.types.d.ts +0 -1597
- package/build/internal/es/src/benefit-programs-v1-pool-pools.types.js +0 -137
- package/build/internal/es/src/benefit-programs-v1-pool-pools.types.js.map +0 -1
- package/build/internal/es/src/benefit-programs-v1-pool-pools.universal.js +0 -555
- package/build/internal/es/src/benefit-programs-v1-pool-pools.universal.js.map +0 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export interface Pool {
|
|
1
|
+
interface Pool {
|
|
3
2
|
/**
|
|
4
3
|
* Pool ID.
|
|
5
4
|
* @format GUID
|
|
@@ -101,7 +100,7 @@ export interface Pool {
|
|
|
101
100
|
*/
|
|
102
101
|
renewalCount?: number | null;
|
|
103
102
|
}
|
|
104
|
-
|
|
103
|
+
declare enum PoolStatus {
|
|
105
104
|
/** Undefined pool status. */
|
|
106
105
|
UNDEFINED = "UNDEFINED",
|
|
107
106
|
/** Pool is active. */
|
|
@@ -116,8 +115,8 @@ export declare enum PoolStatus {
|
|
|
116
115
|
RENEWING = "RENEWING"
|
|
117
116
|
}
|
|
118
117
|
/** @enumType */
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
type PoolStatusWithLiterals = PoolStatus | 'UNDEFINED' | 'ACTIVE' | 'PAUSED' | 'ENDED' | 'PROVISIONING' | 'RENEWING';
|
|
119
|
+
interface CommonIdentificationData extends CommonIdentificationDataIdOneOf {
|
|
121
120
|
/**
|
|
122
121
|
* ID of a site visitor that hasn't logged in to the site.
|
|
123
122
|
* @format GUID
|
|
@@ -135,7 +134,7 @@ export interface CommonIdentificationData extends CommonIdentificationDataIdOneO
|
|
|
135
134
|
wixUserId?: string;
|
|
136
135
|
}
|
|
137
136
|
/** @oneof */
|
|
138
|
-
|
|
137
|
+
interface CommonIdentificationDataIdOneOf {
|
|
139
138
|
/**
|
|
140
139
|
* ID of a site visitor that hasn't logged in to the site.
|
|
141
140
|
* @format GUID
|
|
@@ -152,7 +151,7 @@ export interface CommonIdentificationDataIdOneOf {
|
|
|
152
151
|
*/
|
|
153
152
|
wixUserId?: string;
|
|
154
153
|
}
|
|
155
|
-
|
|
154
|
+
declare enum IdentityType {
|
|
156
155
|
/** Unknown type. This value is not used. */
|
|
157
156
|
UNKNOWN = "UNKNOWN",
|
|
158
157
|
/** A site visitor who has not logged in. */
|
|
@@ -162,9 +161,7 @@ export declare enum IdentityType {
|
|
|
162
161
|
/** A Wix account holder, such as a site owner or contributor. */
|
|
163
162
|
WIX_USER = "WIX_USER"
|
|
164
163
|
}
|
|
165
|
-
|
|
166
|
-
export type IdentityTypeWithLiterals = IdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER';
|
|
167
|
-
export interface Details {
|
|
164
|
+
interface Details {
|
|
168
165
|
/**
|
|
169
166
|
* List of benefits.
|
|
170
167
|
* @maxSize 10
|
|
@@ -179,7 +176,7 @@ export interface Details {
|
|
|
179
176
|
/** Additional information relating to this object. */
|
|
180
177
|
additionalData?: Record<string, any> | null;
|
|
181
178
|
}
|
|
182
|
-
|
|
179
|
+
interface Benefit {
|
|
183
180
|
/**
|
|
184
181
|
* Unique identifier for this benefit.
|
|
185
182
|
*
|
|
@@ -218,7 +215,7 @@ export interface Benefit {
|
|
|
218
215
|
*/
|
|
219
216
|
description?: string | null;
|
|
220
217
|
}
|
|
221
|
-
|
|
218
|
+
interface PolicyExpression extends PolicyExpressionExpressionOneOf {
|
|
222
219
|
/** Benefits can be redeemed if the expression in this object is not fulfilled. */
|
|
223
220
|
operatorNotOptions?: PolicyExpressionNot;
|
|
224
221
|
/** Benefits can be redeemed if all the expression in this object's array are fulfilled. */
|
|
@@ -231,7 +228,7 @@ export interface PolicyExpression extends PolicyExpressionExpressionOneOf {
|
|
|
231
228
|
type?: PolicyExpressionTypeWithLiterals;
|
|
232
229
|
}
|
|
233
230
|
/** @oneof */
|
|
234
|
-
|
|
231
|
+
interface PolicyExpressionExpressionOneOf {
|
|
235
232
|
/** Benefits can be redeemed if the expression in this object is not fulfilled. */
|
|
236
233
|
operatorNotOptions?: PolicyExpressionNot;
|
|
237
234
|
/** Benefits can be redeemed if all the expression in this object's array are fulfilled. */
|
|
@@ -241,7 +238,7 @@ export interface PolicyExpressionExpressionOneOf {
|
|
|
241
238
|
/** Defines when benefits can be redeemed or how many benefits can be redeemed in a specific time period. */
|
|
242
239
|
policyOptions?: Policy;
|
|
243
240
|
}
|
|
244
|
-
|
|
241
|
+
declare enum PolicyExpressionType {
|
|
245
242
|
UNKNOWN = "UNKNOWN",
|
|
246
243
|
/** Use with `operatorNotOptions`. */
|
|
247
244
|
OPERATOR_NOT = "OPERATOR_NOT",
|
|
@@ -253,12 +250,12 @@ export declare enum PolicyExpressionType {
|
|
|
253
250
|
POLICY = "POLICY"
|
|
254
251
|
}
|
|
255
252
|
/** @enumType */
|
|
256
|
-
|
|
257
|
-
|
|
253
|
+
type PolicyExpressionTypeWithLiterals = PolicyExpressionType | 'UNKNOWN' | 'OPERATOR_NOT' | 'OPERATOR_AND' | 'OPERATOR_OR' | 'POLICY';
|
|
254
|
+
interface PolicyExpressionNot {
|
|
258
255
|
/** Policy expression. If this expression is not fulfilled, benefits can be redeemed. */
|
|
259
256
|
expression?: PolicyExpression;
|
|
260
257
|
}
|
|
261
|
-
|
|
258
|
+
interface PolicyExpressionAnd {
|
|
262
259
|
/**
|
|
263
260
|
* Array of policy expressions. If all expressions are fulfilled, benefits can be redeemed.
|
|
264
261
|
* @minSize 2
|
|
@@ -266,7 +263,7 @@ export interface PolicyExpressionAnd {
|
|
|
266
263
|
*/
|
|
267
264
|
expressions?: PolicyExpression[];
|
|
268
265
|
}
|
|
269
|
-
|
|
266
|
+
interface PolicyExpressionOr {
|
|
270
267
|
/**
|
|
271
268
|
* Array of policy expressions. If at least one expression is fulfilled, benefits can be redeemed.
|
|
272
269
|
* @minSize 2
|
|
@@ -274,7 +271,7 @@ export interface PolicyExpressionOr {
|
|
|
274
271
|
*/
|
|
275
272
|
expressions?: PolicyExpression[];
|
|
276
273
|
}
|
|
277
|
-
|
|
274
|
+
interface Policy extends PolicyPolicyOneOf {
|
|
278
275
|
/**
|
|
279
276
|
* Defines an interval during which the policy expression is fulfilled.
|
|
280
277
|
*
|
|
@@ -289,7 +286,7 @@ export interface Policy extends PolicyPolicyOneOf {
|
|
|
289
286
|
type?: TypeWithLiterals;
|
|
290
287
|
}
|
|
291
288
|
/** @oneof */
|
|
292
|
-
|
|
289
|
+
interface PolicyPolicyOneOf {
|
|
293
290
|
/**
|
|
294
291
|
* Defines an interval during which the policy expression is fulfilled.
|
|
295
292
|
*
|
|
@@ -301,7 +298,7 @@ export interface PolicyPolicyOneOf {
|
|
|
301
298
|
/** Custom policy defined by a different app. */
|
|
302
299
|
customOptions?: CustomPolicy;
|
|
303
300
|
}
|
|
304
|
-
|
|
301
|
+
declare enum Type {
|
|
305
302
|
/** Unknown policy type. */
|
|
306
303
|
UNKNOWN = "UNKNOWN",
|
|
307
304
|
/** Use with `fixedIntervalOptions`. */
|
|
@@ -312,8 +309,8 @@ export declare enum Type {
|
|
|
312
309
|
CUSTOM = "CUSTOM"
|
|
313
310
|
}
|
|
314
311
|
/** @enumType */
|
|
315
|
-
|
|
316
|
-
|
|
312
|
+
type TypeWithLiterals = Type | 'UNKNOWN' | 'FIXED_INTERVAL' | 'RATE_LIMITED' | 'CUSTOM';
|
|
313
|
+
interface FixedIntervalPolicy {
|
|
317
314
|
/** Weekday that this interval starts from. If this field is defined, then `toWeekDay` is required. */
|
|
318
315
|
fromWeekDay?: WeekDayWithLiterals;
|
|
319
316
|
/** Weekday that this interval ends at. If this field is defined, then `fromWeekDay` is required. */
|
|
@@ -339,7 +336,7 @@ export interface FixedIntervalPolicy {
|
|
|
339
336
|
*/
|
|
340
337
|
toMinute?: number | null;
|
|
341
338
|
}
|
|
342
|
-
|
|
339
|
+
declare enum WeekDay {
|
|
343
340
|
/** Unknown weekday. */
|
|
344
341
|
UNKNOWN = "UNKNOWN",
|
|
345
342
|
/** Monday. */
|
|
@@ -358,8 +355,8 @@ export declare enum WeekDay {
|
|
|
358
355
|
SUNDAY = "SUNDAY"
|
|
359
356
|
}
|
|
360
357
|
/** @enumType */
|
|
361
|
-
|
|
362
|
-
|
|
358
|
+
type WeekDayWithLiterals = WeekDay | 'UNKNOWN' | 'MONDAY' | 'TUESDAY' | 'WEDNESDAY' | 'THURSDAY' | 'FRIDAY' | 'SATURDAY' | 'SUNDAY';
|
|
359
|
+
interface RateLimitedPolicy extends RateLimitedPolicyPeriodOneOf {
|
|
363
360
|
/** Fixed interval used to limit benefit redemption. */
|
|
364
361
|
fixedIntervalOptions?: FixedIntervalPolicy;
|
|
365
362
|
/** Maximum number of times a benefit can be redeemed per specified time period. */
|
|
@@ -368,11 +365,11 @@ export interface RateLimitedPolicy extends RateLimitedPolicyPeriodOneOf {
|
|
|
368
365
|
type?: RateLimitedPolicyTypeWithLiterals;
|
|
369
366
|
}
|
|
370
367
|
/** @oneof */
|
|
371
|
-
|
|
368
|
+
interface RateLimitedPolicyPeriodOneOf {
|
|
372
369
|
/** Fixed interval used to limit benefit redemption. */
|
|
373
370
|
fixedIntervalOptions?: FixedIntervalPolicy;
|
|
374
371
|
}
|
|
375
|
-
|
|
372
|
+
declare enum RateLimitedPolicyType {
|
|
376
373
|
/** Unknown rate limit method. */
|
|
377
374
|
UNKNOWN = "UNKNOWN",
|
|
378
375
|
/** Time period is defined using `fixedIntervalOptions`. */
|
|
@@ -381,9 +378,9 @@ export declare enum RateLimitedPolicyType {
|
|
|
381
378
|
PER_CYCLE = "PER_CYCLE"
|
|
382
379
|
}
|
|
383
380
|
/** @enumType */
|
|
384
|
-
|
|
381
|
+
type RateLimitedPolicyTypeWithLiterals = RateLimitedPolicyType | 'UNKNOWN' | 'FIXED_INTERVAL' | 'PER_CYCLE';
|
|
385
382
|
/** Custom policy as implemented by the Entitlement Policy Provider */
|
|
386
|
-
|
|
383
|
+
interface CustomPolicy {
|
|
387
384
|
/**
|
|
388
385
|
* Policy ID.
|
|
389
386
|
* @format GUID
|
|
@@ -397,7 +394,7 @@ export interface CustomPolicy {
|
|
|
397
394
|
/** Additional information for this custom policy. */
|
|
398
395
|
additionalData?: Record<string, any> | null;
|
|
399
396
|
}
|
|
400
|
-
|
|
397
|
+
interface CreditConfiguration {
|
|
401
398
|
/**
|
|
402
399
|
* Initial available amount for associated balances.
|
|
403
400
|
* @decimalValue options { gte:0, maxScale:4 }
|
|
@@ -411,7 +408,7 @@ export interface CreditConfiguration {
|
|
|
411
408
|
*/
|
|
412
409
|
unitDisplayName?: string | null;
|
|
413
410
|
}
|
|
414
|
-
|
|
411
|
+
interface RolloverConfiguration {
|
|
415
412
|
/** Whether unused credits roll over to a new cycle when a program renews. */
|
|
416
413
|
enabled?: boolean | null;
|
|
417
414
|
/**
|
|
@@ -420,7 +417,7 @@ export interface RolloverConfiguration {
|
|
|
420
417
|
*/
|
|
421
418
|
balanceCap?: string | null;
|
|
422
419
|
}
|
|
423
|
-
|
|
420
|
+
interface ExtendedFields {
|
|
424
421
|
/**
|
|
425
422
|
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
426
423
|
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
@@ -431,7 +428,7 @@ export interface ExtendedFields {
|
|
|
431
428
|
*/
|
|
432
429
|
namespaces?: Record<string, Record<string, any>>;
|
|
433
430
|
}
|
|
434
|
-
|
|
431
|
+
interface ProgramDefinitionInfo {
|
|
435
432
|
/**
|
|
436
433
|
* Program definition ID.
|
|
437
434
|
* @format GUID
|
|
@@ -445,7 +442,7 @@ export interface ProgramDefinitionInfo {
|
|
|
445
442
|
*/
|
|
446
443
|
externalId?: string | null;
|
|
447
444
|
}
|
|
448
|
-
|
|
445
|
+
interface PoolProgramInfo {
|
|
449
446
|
/**
|
|
450
447
|
* Program ID.
|
|
451
448
|
* @format GUID
|
|
@@ -459,7 +456,7 @@ export interface PoolProgramInfo {
|
|
|
459
456
|
*/
|
|
460
457
|
externalId?: string | null;
|
|
461
458
|
}
|
|
462
|
-
|
|
459
|
+
declare enum PoolOrigin {
|
|
463
460
|
/** Unknown pool origin. */
|
|
464
461
|
UNKNOWN = "UNKNOWN",
|
|
465
462
|
/** Benefit pool created by a program provision. */
|
|
@@ -468,22 +465,22 @@ export declare enum PoolOrigin {
|
|
|
468
465
|
CASCADE = "CASCADE"
|
|
469
466
|
}
|
|
470
467
|
/** @enumType */
|
|
471
|
-
|
|
472
|
-
|
|
468
|
+
type PoolOriginWithLiterals = PoolOrigin | 'UNKNOWN' | 'PROVISION' | 'CASCADE';
|
|
469
|
+
interface PoolProvisioned {
|
|
473
470
|
/** Pool which has been provisioned */
|
|
474
471
|
pool?: Pool;
|
|
475
472
|
}
|
|
476
|
-
|
|
473
|
+
interface PoolRenewed {
|
|
477
474
|
/** Pool which has been granted */
|
|
478
475
|
pool?: Pool;
|
|
479
476
|
}
|
|
480
|
-
|
|
477
|
+
interface BenefitRedeemed {
|
|
481
478
|
/** Pool which has been redeemed */
|
|
482
479
|
pool?: Pool;
|
|
483
480
|
/** Details of the redemption */
|
|
484
481
|
redemptionDetails?: RedemptionDetails;
|
|
485
482
|
}
|
|
486
|
-
|
|
483
|
+
interface RedemptionDetails {
|
|
487
484
|
/**
|
|
488
485
|
* Id of the redemption transaction
|
|
489
486
|
* @format GUID
|
|
@@ -511,7 +508,7 @@ export interface RedemptionDetails {
|
|
|
511
508
|
/** Beneficiary of the entitlement */
|
|
512
509
|
beneficiary?: CommonIdentificationData;
|
|
513
510
|
}
|
|
514
|
-
|
|
511
|
+
interface ItemReference {
|
|
515
512
|
/**
|
|
516
513
|
* External ID of the item.
|
|
517
514
|
* @format GUID
|
|
@@ -528,25 +525,25 @@ export interface ItemReference {
|
|
|
528
525
|
*/
|
|
529
526
|
providerAppId?: string;
|
|
530
527
|
}
|
|
531
|
-
|
|
528
|
+
interface PoolPaused {
|
|
532
529
|
/** Pool which has been paused */
|
|
533
530
|
pool?: Pool;
|
|
534
531
|
}
|
|
535
|
-
|
|
532
|
+
interface PoolResumed {
|
|
536
533
|
/** Pool which has been resumed */
|
|
537
534
|
pool?: Pool;
|
|
538
535
|
}
|
|
539
|
-
|
|
536
|
+
interface PoolEnded {
|
|
540
537
|
/** Pool which has been ended */
|
|
541
538
|
pool?: Pool;
|
|
542
539
|
}
|
|
543
|
-
|
|
540
|
+
interface BenefitReserved {
|
|
544
541
|
/** Pool which was used to perform this transaction */
|
|
545
542
|
pool?: Pool;
|
|
546
543
|
/** Details of the redemption */
|
|
547
544
|
redemptionDetails?: RedemptionDetails;
|
|
548
545
|
}
|
|
549
|
-
|
|
546
|
+
interface BenefitReservationCanceled {
|
|
550
547
|
/** Pool which was used to perform this transaction */
|
|
551
548
|
pool?: Pool;
|
|
552
549
|
/**
|
|
@@ -555,7 +552,7 @@ export interface BenefitReservationCanceled {
|
|
|
555
552
|
*/
|
|
556
553
|
transactionId?: string;
|
|
557
554
|
}
|
|
558
|
-
|
|
555
|
+
interface BenefitReservationReleased {
|
|
559
556
|
/** Pool which was used to perform this transaction */
|
|
560
557
|
pool?: Pool;
|
|
561
558
|
/**
|
|
@@ -564,7 +561,7 @@ export interface BenefitReservationReleased {
|
|
|
564
561
|
*/
|
|
565
562
|
transactionId?: string;
|
|
566
563
|
}
|
|
567
|
-
|
|
564
|
+
interface PoolProvisionJobFinished {
|
|
568
565
|
/**
|
|
569
566
|
* Program id
|
|
570
567
|
* @format GUID
|
|
@@ -575,7 +572,7 @@ export interface PoolProvisionJobFinished {
|
|
|
575
572
|
/** Origin of the pool */
|
|
576
573
|
origin?: PoolOriginWithLiterals;
|
|
577
574
|
}
|
|
578
|
-
|
|
575
|
+
interface PoolStatusUpdateJobFinished extends PoolStatusUpdateJobFinishedContextOneOf {
|
|
579
576
|
/** The id of the pool definition that is being updated */
|
|
580
577
|
poolDefinitionAndProgramDefinition?: PoolDefinitionAndProgramDefinition;
|
|
581
578
|
/** Update the status of all pools in the program */
|
|
@@ -586,13 +583,13 @@ export interface PoolStatusUpdateJobFinished extends PoolStatusUpdateJobFinished
|
|
|
586
583
|
processedItemCount?: number;
|
|
587
584
|
}
|
|
588
585
|
/** @oneof */
|
|
589
|
-
|
|
586
|
+
interface PoolStatusUpdateJobFinishedContextOneOf {
|
|
590
587
|
/** The id of the pool definition that is being updated */
|
|
591
588
|
poolDefinitionAndProgramDefinition?: PoolDefinitionAndProgramDefinition;
|
|
592
589
|
/** Update the status of all pools in the program */
|
|
593
590
|
programInfo?: ProgramInfo;
|
|
594
591
|
}
|
|
595
|
-
|
|
592
|
+
interface PoolDefinitionAndProgramDefinition {
|
|
596
593
|
/**
|
|
597
594
|
* The id of the pool definition that is being updated
|
|
598
595
|
* @format GUID
|
|
@@ -605,7 +602,7 @@ export interface PoolDefinitionAndProgramDefinition {
|
|
|
605
602
|
*/
|
|
606
603
|
programDefinitionId?: string | null;
|
|
607
604
|
}
|
|
608
|
-
|
|
605
|
+
interface ProgramInfo {
|
|
609
606
|
/**
|
|
610
607
|
* The key of the program that is being updated
|
|
611
608
|
* @format GUID
|
|
@@ -614,47 +611,47 @@ export interface ProgramInfo {
|
|
|
614
611
|
/** Additional data that was provided when the job was submitted */
|
|
615
612
|
additionalData?: Record<string, any> | null;
|
|
616
613
|
}
|
|
617
|
-
|
|
614
|
+
interface CreatePoolRequest {
|
|
618
615
|
/** Pool to be created. */
|
|
619
616
|
pool?: Pool;
|
|
620
617
|
}
|
|
621
|
-
|
|
618
|
+
interface CreatePoolResponse {
|
|
622
619
|
/** Created pool. */
|
|
623
620
|
pool?: Pool;
|
|
624
621
|
}
|
|
625
|
-
|
|
622
|
+
interface GetPoolRequest {
|
|
626
623
|
/**
|
|
627
624
|
* ID of the pool to retrieve.
|
|
628
625
|
* @format GUID
|
|
629
626
|
*/
|
|
630
627
|
poolId: string;
|
|
631
628
|
}
|
|
632
|
-
|
|
629
|
+
interface GetPoolResponse {
|
|
633
630
|
/** Retrieved pool. */
|
|
634
631
|
pool?: Pool;
|
|
635
632
|
}
|
|
636
|
-
|
|
633
|
+
interface UpdatePoolRequest {
|
|
637
634
|
/** Pool to update. */
|
|
638
635
|
pool: Pool;
|
|
639
636
|
}
|
|
640
|
-
|
|
637
|
+
interface UpdatePoolResponse {
|
|
641
638
|
/** Updated pool. */
|
|
642
639
|
pool?: Pool;
|
|
643
640
|
}
|
|
644
|
-
|
|
641
|
+
interface DeletePoolRequest {
|
|
645
642
|
/**
|
|
646
643
|
* ID of the pool to delete.
|
|
647
644
|
* @format GUID
|
|
648
645
|
*/
|
|
649
646
|
poolId?: string;
|
|
650
647
|
}
|
|
651
|
-
|
|
648
|
+
interface DeletePoolResponse {
|
|
652
649
|
}
|
|
653
|
-
|
|
650
|
+
interface QueryPoolsRequest {
|
|
654
651
|
/** Filter, sort, and paging to apply to the query. */
|
|
655
652
|
query: CursorQuery;
|
|
656
653
|
}
|
|
657
|
-
|
|
654
|
+
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
658
655
|
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
659
656
|
cursorPaging?: CursorPaging;
|
|
660
657
|
/**
|
|
@@ -670,11 +667,11 @@ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
|
670
667
|
sort?: Sorting[];
|
|
671
668
|
}
|
|
672
669
|
/** @oneof */
|
|
673
|
-
|
|
670
|
+
interface CursorQueryPagingMethodOneOf {
|
|
674
671
|
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
675
672
|
cursorPaging?: CursorPaging;
|
|
676
673
|
}
|
|
677
|
-
|
|
674
|
+
interface Sorting {
|
|
678
675
|
/**
|
|
679
676
|
* Field to sort by.
|
|
680
677
|
* @maxLength 512
|
|
@@ -687,15 +684,15 @@ export interface Sorting {
|
|
|
687
684
|
*/
|
|
688
685
|
order?: SortOrderWithLiterals;
|
|
689
686
|
}
|
|
690
|
-
|
|
687
|
+
declare enum SortOrder {
|
|
691
688
|
/** Ascending sort order. */
|
|
692
689
|
ASC = "ASC",
|
|
693
690
|
/** Descending sort order. */
|
|
694
691
|
DESC = "DESC"
|
|
695
692
|
}
|
|
696
693
|
/** @enumType */
|
|
697
|
-
|
|
698
|
-
|
|
694
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
695
|
+
interface CursorPaging {
|
|
699
696
|
/**
|
|
700
697
|
* Maximum number of items to return.
|
|
701
698
|
* @max 100
|
|
@@ -710,13 +707,13 @@ export interface CursorPaging {
|
|
|
710
707
|
*/
|
|
711
708
|
cursor?: string | null;
|
|
712
709
|
}
|
|
713
|
-
|
|
710
|
+
interface QueryPoolsResponse {
|
|
714
711
|
/** List of retrieved pools. */
|
|
715
712
|
pools?: Pool[];
|
|
716
713
|
/** Metadata for the paginated results. */
|
|
717
714
|
metadata?: CursorPagingMetadata;
|
|
718
715
|
}
|
|
719
|
-
|
|
716
|
+
interface CursorPagingMetadata {
|
|
720
717
|
/** Number of items returned in the response. */
|
|
721
718
|
count?: number | null;
|
|
722
719
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
@@ -729,7 +726,7 @@ export interface CursorPagingMetadata {
|
|
|
729
726
|
*/
|
|
730
727
|
hasNext?: boolean | null;
|
|
731
728
|
}
|
|
732
|
-
|
|
729
|
+
interface Cursors {
|
|
733
730
|
/**
|
|
734
731
|
* Cursor string pointing to the next page in the list of results.
|
|
735
732
|
* @maxLength 16000
|
|
@@ -741,7 +738,7 @@ export interface Cursors {
|
|
|
741
738
|
*/
|
|
742
739
|
prev?: string | null;
|
|
743
740
|
}
|
|
744
|
-
|
|
741
|
+
interface RedeemBenefitRequest {
|
|
745
742
|
/**
|
|
746
743
|
* ID of the pool that contains the benefit to redeem.
|
|
747
744
|
* @format GUID
|
|
@@ -782,14 +779,14 @@ export interface RedeemBenefitRequest {
|
|
|
782
779
|
*/
|
|
783
780
|
namespace: string;
|
|
784
781
|
}
|
|
785
|
-
|
|
782
|
+
interface RedeemBenefitResponse {
|
|
786
783
|
/**
|
|
787
784
|
* ID of the transaction recording the associated change in balance.
|
|
788
785
|
* @format GUID
|
|
789
786
|
*/
|
|
790
787
|
transactionId?: string;
|
|
791
788
|
}
|
|
792
|
-
|
|
789
|
+
interface NotEnoughBalance {
|
|
793
790
|
/**
|
|
794
791
|
* Pool ID.
|
|
795
792
|
* @format GUID
|
|
@@ -808,7 +805,7 @@ export interface NotEnoughBalance {
|
|
|
808
805
|
*/
|
|
809
806
|
requestedBalance?: string;
|
|
810
807
|
}
|
|
811
|
-
|
|
808
|
+
interface PolicyExpressionEvaluatedToFalse {
|
|
812
809
|
/**
|
|
813
810
|
* Pool ID.
|
|
814
811
|
* @format GUID
|
|
@@ -822,7 +819,7 @@ export interface PolicyExpressionEvaluatedToFalse {
|
|
|
822
819
|
*/
|
|
823
820
|
failureDetails?: FailureDetails[];
|
|
824
821
|
}
|
|
825
|
-
|
|
822
|
+
interface FailureDetails {
|
|
826
823
|
/**
|
|
827
824
|
* Failure code
|
|
828
825
|
* @minLength 1
|
|
@@ -847,7 +844,7 @@ export interface FailureDetails {
|
|
|
847
844
|
/** Information provided by the policy */
|
|
848
845
|
errorData?: Record<string, any> | null;
|
|
849
846
|
}
|
|
850
|
-
|
|
847
|
+
interface PoolNotActive {
|
|
851
848
|
/**
|
|
852
849
|
* Pool ID.
|
|
853
850
|
* @format GUID
|
|
@@ -856,14 +853,14 @@ export interface PoolNotActive {
|
|
|
856
853
|
/** Pool status. */
|
|
857
854
|
poolStatus?: PoolStatusWithLiterals;
|
|
858
855
|
}
|
|
859
|
-
|
|
856
|
+
interface PoolNotFound {
|
|
860
857
|
/**
|
|
861
858
|
* Pool ID.
|
|
862
859
|
* @format GUID
|
|
863
860
|
*/
|
|
864
861
|
poolId?: string;
|
|
865
862
|
}
|
|
866
|
-
|
|
863
|
+
interface BenefitAlreadyRedeemed {
|
|
867
864
|
/**
|
|
868
865
|
* Pool ID
|
|
869
866
|
* @format GUID
|
|
@@ -875,7 +872,7 @@ export interface BenefitAlreadyRedeemed {
|
|
|
875
872
|
*/
|
|
876
873
|
idempotencyKey?: string;
|
|
877
874
|
}
|
|
878
|
-
|
|
875
|
+
interface BenefitNotFound {
|
|
879
876
|
/**
|
|
880
877
|
* Pool ID.
|
|
881
878
|
* @format GUID
|
|
@@ -887,7 +884,7 @@ export interface BenefitNotFound {
|
|
|
887
884
|
*/
|
|
888
885
|
benefitKey?: string | null;
|
|
889
886
|
}
|
|
890
|
-
|
|
887
|
+
interface ReserveBenefitRequest {
|
|
891
888
|
/**
|
|
892
889
|
* Id of the pool that is being redeemed from
|
|
893
890
|
* @format GUID
|
|
@@ -937,42 +934,42 @@ export interface ReserveBenefitRequest {
|
|
|
937
934
|
*/
|
|
938
935
|
namespace?: string;
|
|
939
936
|
}
|
|
940
|
-
|
|
937
|
+
interface ReserveBenefitResponse {
|
|
941
938
|
/**
|
|
942
939
|
* Id of the transaction that was created as a result of this request
|
|
943
940
|
* @format GUID
|
|
944
941
|
*/
|
|
945
942
|
transactionId?: string;
|
|
946
943
|
}
|
|
947
|
-
|
|
944
|
+
interface CancelBenefitReservationRequest {
|
|
948
945
|
/**
|
|
949
946
|
* Id of the transaction that was created as a result of this request
|
|
950
947
|
* @format GUID
|
|
951
948
|
*/
|
|
952
949
|
transactionId?: string;
|
|
953
950
|
}
|
|
954
|
-
|
|
951
|
+
interface CancelBenefitReservationResponse {
|
|
955
952
|
/**
|
|
956
953
|
* Id of the transaction that was created as a result of this request
|
|
957
954
|
* @format GUID
|
|
958
955
|
*/
|
|
959
956
|
transactionId?: string;
|
|
960
957
|
}
|
|
961
|
-
|
|
958
|
+
interface ReleaseBenefitReservationRequest {
|
|
962
959
|
/**
|
|
963
960
|
* Id of the transaction that was created as a result of this request
|
|
964
961
|
* @format GUID
|
|
965
962
|
*/
|
|
966
963
|
transactionId?: string;
|
|
967
964
|
}
|
|
968
|
-
|
|
965
|
+
interface ReleaseBenefitReservationResponse {
|
|
969
966
|
/**
|
|
970
967
|
* Id of the transaction that was created as a result of this request
|
|
971
968
|
* @format GUID
|
|
972
969
|
*/
|
|
973
970
|
transactionId?: string;
|
|
974
971
|
}
|
|
975
|
-
|
|
972
|
+
interface CheckBenefitEligibilityRequest {
|
|
976
973
|
/**
|
|
977
974
|
* ID of the pool that the benefit to check belongs to.
|
|
978
975
|
* @format GUID
|
|
@@ -1009,11 +1006,11 @@ export interface CheckBenefitEligibilityRequest {
|
|
|
1009
1006
|
*/
|
|
1010
1007
|
namespace: string;
|
|
1011
1008
|
}
|
|
1012
|
-
|
|
1009
|
+
interface CheckBenefitEligibilityResponse {
|
|
1013
1010
|
/** Result of the eligibility check. */
|
|
1014
1011
|
result?: EligibilityCheckResult;
|
|
1015
1012
|
}
|
|
1016
|
-
|
|
1013
|
+
interface EligibilityCheckResult extends EligibilityCheckResultResultOneOf {
|
|
1017
1014
|
/** Returned when item is eligible to be redeemed. */
|
|
1018
1015
|
eligibleOptions?: Eligible;
|
|
1019
1016
|
/** Returned when the pool's associated balance is lower than the cost of redeeming the items. */
|
|
@@ -1028,7 +1025,7 @@ export interface EligibilityCheckResult extends EligibilityCheckResultResultOneO
|
|
|
1028
1025
|
type?: EligibilityCheckResultTypeWithLiterals;
|
|
1029
1026
|
}
|
|
1030
1027
|
/** @oneof */
|
|
1031
|
-
|
|
1028
|
+
interface EligibilityCheckResultResultOneOf {
|
|
1032
1029
|
/** Returned when item is eligible to be redeemed. */
|
|
1033
1030
|
eligibleOptions?: Eligible;
|
|
1034
1031
|
/** Returned when the pool's associated balance is lower than the cost of redeeming the items. */
|
|
@@ -1040,7 +1037,7 @@ export interface EligibilityCheckResultResultOneOf {
|
|
|
1040
1037
|
/** Returned when invalid pool details are provided. */
|
|
1041
1038
|
poolNotFoundOptions?: PoolNotFound;
|
|
1042
1039
|
}
|
|
1043
|
-
|
|
1040
|
+
interface EligibleBenefit {
|
|
1044
1041
|
/**
|
|
1045
1042
|
* Pool ID.
|
|
1046
1043
|
* @format GUID
|
|
@@ -1060,7 +1057,7 @@ export interface EligibleBenefit {
|
|
|
1060
1057
|
*/
|
|
1061
1058
|
price?: string | null;
|
|
1062
1059
|
}
|
|
1063
|
-
|
|
1060
|
+
declare enum EligibilityCheckResultType {
|
|
1064
1061
|
/** Unknown eligibility. */
|
|
1065
1062
|
UNKNOWN = "UNKNOWN",
|
|
1066
1063
|
/** Item is eligible to be redeemed. */
|
|
@@ -1075,15 +1072,15 @@ export declare enum EligibilityCheckResultType {
|
|
|
1075
1072
|
POOL_NOT_FOUND = "POOL_NOT_FOUND"
|
|
1076
1073
|
}
|
|
1077
1074
|
/** @enumType */
|
|
1078
|
-
|
|
1079
|
-
|
|
1075
|
+
type EligibilityCheckResultTypeWithLiterals = EligibilityCheckResultType | 'UNKNOWN' | 'ELIGIBLE' | 'NOT_ENOUGH_BALANCE' | 'POOL_NOT_ACTIVE' | 'BENEFIT_NOT_FOUND' | 'POOL_NOT_FOUND';
|
|
1076
|
+
interface Eligible {
|
|
1080
1077
|
/**
|
|
1081
1078
|
* Benefits that are eligible to be redeemed.
|
|
1082
1079
|
* @maxSize 100
|
|
1083
1080
|
*/
|
|
1084
1081
|
eligibleBenefits?: EligibleBenefit[];
|
|
1085
1082
|
}
|
|
1086
|
-
|
|
1083
|
+
interface BulkCheckBenefitEligibilityRequest {
|
|
1087
1084
|
/**
|
|
1088
1085
|
* List of benefits to check.
|
|
1089
1086
|
* @minSize 1
|
|
@@ -1099,7 +1096,7 @@ export interface BulkCheckBenefitEligibilityRequest {
|
|
|
1099
1096
|
/** Pool beneficiary. */
|
|
1100
1097
|
beneficiary?: CommonIdentificationData;
|
|
1101
1098
|
}
|
|
1102
|
-
|
|
1099
|
+
interface BenefitSelector {
|
|
1103
1100
|
/**
|
|
1104
1101
|
* ID of the pool that the benefit to check belongs to.
|
|
1105
1102
|
* @format GUID
|
|
@@ -1128,7 +1125,7 @@ export interface BenefitSelector {
|
|
|
1128
1125
|
/** Additional information. */
|
|
1129
1126
|
additionalData?: Record<string, any> | null;
|
|
1130
1127
|
}
|
|
1131
|
-
|
|
1128
|
+
interface BulkCheckBenefitEligibilityResponse {
|
|
1132
1129
|
/**
|
|
1133
1130
|
* List of results checking each benefit.
|
|
1134
1131
|
* @minSize 1
|
|
@@ -1136,13 +1133,13 @@ export interface BulkCheckBenefitEligibilityResponse {
|
|
|
1136
1133
|
*/
|
|
1137
1134
|
results?: BulkEligibilityCheckResult[];
|
|
1138
1135
|
}
|
|
1139
|
-
|
|
1136
|
+
interface BulkEligibilityCheckResult {
|
|
1140
1137
|
/** Benefit information specified in API call. */
|
|
1141
1138
|
benefitSelector?: BenefitSelector;
|
|
1142
1139
|
/** Result of the eligibility check. */
|
|
1143
1140
|
result?: EligibilityCheckResult;
|
|
1144
1141
|
}
|
|
1145
|
-
|
|
1142
|
+
interface GetEligibleBenefitsRequest {
|
|
1146
1143
|
/** Item reference. */
|
|
1147
1144
|
itemReference: ItemReference;
|
|
1148
1145
|
/**
|
|
@@ -1167,23 +1164,23 @@ export interface GetEligibleBenefitsRequest {
|
|
|
1167
1164
|
*/
|
|
1168
1165
|
namespace: string;
|
|
1169
1166
|
}
|
|
1170
|
-
|
|
1167
|
+
interface GetEligibleBenefitsResponse {
|
|
1171
1168
|
/** Retrieved benefits that can be redeemed. */
|
|
1172
1169
|
eligibleBenefits?: EligibleBenefit[];
|
|
1173
1170
|
}
|
|
1174
|
-
|
|
1171
|
+
interface ListPoolsRequest {
|
|
1175
1172
|
/** The filter */
|
|
1176
1173
|
filter?: Filter;
|
|
1177
1174
|
/** Cursor paging */
|
|
1178
1175
|
cursorPaging?: CursorPaging;
|
|
1179
1176
|
}
|
|
1180
|
-
|
|
1177
|
+
declare enum ListPoolsRequestType {
|
|
1181
1178
|
UNKNOWN_FILTER = "UNKNOWN_FILTER",
|
|
1182
1179
|
BY_ITEM_REFERENCE = "BY_ITEM_REFERENCE"
|
|
1183
1180
|
}
|
|
1184
1181
|
/** @enumType */
|
|
1185
|
-
|
|
1186
|
-
|
|
1182
|
+
type ListPoolsRequestTypeWithLiterals = ListPoolsRequestType | 'UNKNOWN_FILTER' | 'BY_ITEM_REFERENCE';
|
|
1183
|
+
interface ByItemReference {
|
|
1187
1184
|
/**
|
|
1188
1185
|
* A list of filters
|
|
1189
1186
|
* @maxSize 100
|
|
@@ -1197,11 +1194,11 @@ export interface ByItemReference {
|
|
|
1197
1194
|
*/
|
|
1198
1195
|
poolStatuses?: PoolStatusWithLiterals[];
|
|
1199
1196
|
}
|
|
1200
|
-
|
|
1197
|
+
interface ByItemReferenceFilter {
|
|
1201
1198
|
/** Reference of the item */
|
|
1202
1199
|
itemReference?: ItemReference;
|
|
1203
1200
|
}
|
|
1204
|
-
|
|
1201
|
+
interface Filter extends FilterFilterOneOf {
|
|
1205
1202
|
/** A list of filters by reference */
|
|
1206
1203
|
byItemReferenceOptions?: ByItemReference;
|
|
1207
1204
|
/** Type of the filter */
|
|
@@ -1217,11 +1214,11 @@ export interface Filter extends FilterFilterOneOf {
|
|
|
1217
1214
|
namespace?: string;
|
|
1218
1215
|
}
|
|
1219
1216
|
/** @oneof */
|
|
1220
|
-
|
|
1217
|
+
interface FilterFilterOneOf {
|
|
1221
1218
|
/** A list of filters by reference */
|
|
1222
1219
|
byItemReferenceOptions?: ByItemReference;
|
|
1223
1220
|
}
|
|
1224
|
-
|
|
1221
|
+
interface ListPoolsResponse {
|
|
1225
1222
|
/**
|
|
1226
1223
|
* The retrieved pools
|
|
1227
1224
|
* @maxSize 100
|
|
@@ -1230,7 +1227,7 @@ export interface ListPoolsResponse {
|
|
|
1230
1227
|
/** Paging information */
|
|
1231
1228
|
metadata?: CursorPagingMetadata;
|
|
1232
1229
|
}
|
|
1233
|
-
|
|
1230
|
+
interface PoolWithItems {
|
|
1234
1231
|
/** The pool */
|
|
1235
1232
|
pool?: Pool;
|
|
1236
1233
|
/**
|
|
@@ -1239,7 +1236,7 @@ export interface PoolWithItems {
|
|
|
1239
1236
|
*/
|
|
1240
1237
|
itemReference?: ItemReference[];
|
|
1241
1238
|
}
|
|
1242
|
-
|
|
1239
|
+
interface BulkUpdatePoolsRequest {
|
|
1243
1240
|
/**
|
|
1244
1241
|
* Pools to update.
|
|
1245
1242
|
* @minSize 1
|
|
@@ -1253,13 +1250,13 @@ export interface BulkUpdatePoolsRequest {
|
|
|
1253
1250
|
*/
|
|
1254
1251
|
returnEntity?: boolean;
|
|
1255
1252
|
}
|
|
1256
|
-
|
|
1253
|
+
interface MaskedPool {
|
|
1257
1254
|
/** Pool to update. */
|
|
1258
1255
|
pool?: Pool;
|
|
1259
1256
|
/** Explicit list of fields to update. */
|
|
1260
1257
|
fieldMask?: string[];
|
|
1261
1258
|
}
|
|
1262
|
-
|
|
1259
|
+
interface BulkUpdatePoolsResponse {
|
|
1263
1260
|
/**
|
|
1264
1261
|
* List of updated pools and associated metadata.
|
|
1265
1262
|
* @minSize 1
|
|
@@ -1269,13 +1266,13 @@ export interface BulkUpdatePoolsResponse {
|
|
|
1269
1266
|
/** Bulk action metadata. */
|
|
1270
1267
|
bulkActionMetadata?: BulkActionMetadata;
|
|
1271
1268
|
}
|
|
1272
|
-
|
|
1269
|
+
interface BulkPoolResult {
|
|
1273
1270
|
/** Pool metadata. */
|
|
1274
1271
|
poolMetadata?: ItemMetadata;
|
|
1275
1272
|
/** Pool data. */
|
|
1276
1273
|
pool?: Pool;
|
|
1277
1274
|
}
|
|
1278
|
-
|
|
1275
|
+
interface ItemMetadata {
|
|
1279
1276
|
/**
|
|
1280
1277
|
* Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
|
|
1281
1278
|
* @format GUID
|
|
@@ -1288,7 +1285,7 @@ export interface ItemMetadata {
|
|
|
1288
1285
|
/** Details about the error in case of failure. */
|
|
1289
1286
|
error?: ApplicationError;
|
|
1290
1287
|
}
|
|
1291
|
-
|
|
1288
|
+
interface ApplicationError {
|
|
1292
1289
|
/** Error code. */
|
|
1293
1290
|
code?: string;
|
|
1294
1291
|
/** Description of the error. */
|
|
@@ -1296,7 +1293,7 @@ export interface ApplicationError {
|
|
|
1296
1293
|
/** Data related to the error. */
|
|
1297
1294
|
data?: Record<string, any> | null;
|
|
1298
1295
|
}
|
|
1299
|
-
|
|
1296
|
+
interface BulkActionMetadata {
|
|
1300
1297
|
/** Number of items that were successfully processed. */
|
|
1301
1298
|
totalSuccesses?: number;
|
|
1302
1299
|
/** Number of items that couldn't be processed. */
|
|
@@ -1304,7 +1301,7 @@ export interface BulkActionMetadata {
|
|
|
1304
1301
|
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
1305
1302
|
undetailedFailures?: number;
|
|
1306
1303
|
}
|
|
1307
|
-
|
|
1304
|
+
interface ProvisionPoolsForProgramRequest {
|
|
1308
1305
|
/** Reference of the template that is used to provision the pools */
|
|
1309
1306
|
poolDefinitionLookupId?: PoolDefinitionLookupId;
|
|
1310
1307
|
/**
|
|
@@ -1313,7 +1310,7 @@ export interface ProvisionPoolsForProgramRequest {
|
|
|
1313
1310
|
*/
|
|
1314
1311
|
programId?: string;
|
|
1315
1312
|
}
|
|
1316
|
-
|
|
1313
|
+
interface PoolDefinitionLookupId extends PoolDefinitionLookupIdIdOneOf {
|
|
1317
1314
|
/**
|
|
1318
1315
|
* Pool definition ID.
|
|
1319
1316
|
* @format GUID
|
|
@@ -1326,7 +1323,7 @@ export interface PoolDefinitionLookupId extends PoolDefinitionLookupIdIdOneOf {
|
|
|
1326
1323
|
programDefinitionId?: string;
|
|
1327
1324
|
}
|
|
1328
1325
|
/** @oneof */
|
|
1329
|
-
|
|
1326
|
+
interface PoolDefinitionLookupIdIdOneOf {
|
|
1330
1327
|
/**
|
|
1331
1328
|
* Pool definition ID.
|
|
1332
1329
|
* @format GUID
|
|
@@ -1338,7 +1335,7 @@ export interface PoolDefinitionLookupIdIdOneOf {
|
|
|
1338
1335
|
*/
|
|
1339
1336
|
programDefinitionId?: string;
|
|
1340
1337
|
}
|
|
1341
|
-
|
|
1338
|
+
interface ProvisionPoolsForProgramResponse extends ProvisionPoolsForProgramResponseResultOneOf {
|
|
1342
1339
|
/** Sync result */
|
|
1343
1340
|
syncOptions?: SyncResult;
|
|
1344
1341
|
/** Async result */
|
|
@@ -1352,13 +1349,13 @@ export interface ProvisionPoolsForProgramResponse extends ProvisionPoolsForProgr
|
|
|
1352
1349
|
type?: ProvisionPoolsForProgramResponseTypeWithLiterals;
|
|
1353
1350
|
}
|
|
1354
1351
|
/** @oneof */
|
|
1355
|
-
|
|
1352
|
+
interface ProvisionPoolsForProgramResponseResultOneOf {
|
|
1356
1353
|
/** Sync result */
|
|
1357
1354
|
syncOptions?: SyncResult;
|
|
1358
1355
|
/** Async result */
|
|
1359
1356
|
asyncOptions?: AsyncResult;
|
|
1360
1357
|
}
|
|
1361
|
-
|
|
1358
|
+
declare enum ProvisionPoolsForProgramResponseType {
|
|
1362
1359
|
/** Unknown result type */
|
|
1363
1360
|
UNKNOWN = "UNKNOWN",
|
|
1364
1361
|
/** Sync result */
|
|
@@ -1367,37 +1364,37 @@ export declare enum ProvisionPoolsForProgramResponseType {
|
|
|
1367
1364
|
ASYNC = "ASYNC"
|
|
1368
1365
|
}
|
|
1369
1366
|
/** @enumType */
|
|
1370
|
-
|
|
1371
|
-
|
|
1367
|
+
type ProvisionPoolsForProgramResponseTypeWithLiterals = ProvisionPoolsForProgramResponseType | 'UNKNOWN' | 'SYNC' | 'ASYNC';
|
|
1368
|
+
interface SyncResult {
|
|
1372
1369
|
/** Indicates if the operation was successful */
|
|
1373
1370
|
success?: boolean;
|
|
1374
1371
|
}
|
|
1375
|
-
|
|
1372
|
+
interface AsyncResult {
|
|
1376
1373
|
/**
|
|
1377
1374
|
* Job ID of the program provision associated with this pool. Retrieve job details using the Async Job API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/async-jobs/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/async-job/introduction)).
|
|
1378
1375
|
* @format GUID
|
|
1379
1376
|
*/
|
|
1380
1377
|
jobId?: string;
|
|
1381
1378
|
}
|
|
1382
|
-
|
|
1379
|
+
interface InvalidPoolDefinitionReference {
|
|
1383
1380
|
/** Reference of the template that didn't find any pool definitions */
|
|
1384
1381
|
poolDefinitionLookupId?: PoolDefinitionLookupId;
|
|
1385
1382
|
}
|
|
1386
|
-
|
|
1383
|
+
interface RenewPoolsForProgramRequest {
|
|
1387
1384
|
/**
|
|
1388
1385
|
* Package of pools to grant. Package id should be the same that was used to provision programs.
|
|
1389
1386
|
* @format GUID
|
|
1390
1387
|
*/
|
|
1391
1388
|
programId?: string;
|
|
1392
1389
|
}
|
|
1393
|
-
|
|
1390
|
+
interface RenewPoolsForProgramResponse {
|
|
1394
1391
|
/**
|
|
1395
1392
|
* Job id of the renewal job
|
|
1396
1393
|
* @format GUID
|
|
1397
1394
|
*/
|
|
1398
1395
|
jobId?: string;
|
|
1399
1396
|
}
|
|
1400
|
-
|
|
1397
|
+
interface UpdatePoolStatusRequest extends UpdatePoolStatusRequestPoolSelectorOneOf {
|
|
1401
1398
|
/** Pool selector by pool definition id and program definition id */
|
|
1402
1399
|
byPoolDefinitionIdAndProgramDefinitionIdOptions?: ByPoolDefinitionIdAndProgramDefinitionIdOptions;
|
|
1403
1400
|
/** Pool selector by program id */
|
|
@@ -1408,20 +1405,20 @@ export interface UpdatePoolStatusRequest extends UpdatePoolStatusRequestPoolSele
|
|
|
1408
1405
|
poolSelectorType?: PoolSelectorTypeWithLiterals;
|
|
1409
1406
|
}
|
|
1410
1407
|
/** @oneof */
|
|
1411
|
-
|
|
1408
|
+
interface UpdatePoolStatusRequestPoolSelectorOneOf {
|
|
1412
1409
|
/** Pool selector by pool definition id and program definition id */
|
|
1413
1410
|
byPoolDefinitionIdAndProgramDefinitionIdOptions?: ByPoolDefinitionIdAndProgramDefinitionIdOptions;
|
|
1414
1411
|
/** Pool selector by program id */
|
|
1415
1412
|
byProgramIdOptions?: ByProgramIdOptions;
|
|
1416
1413
|
}
|
|
1417
|
-
|
|
1414
|
+
declare enum PoolSelectorType {
|
|
1418
1415
|
UNKNOWN_SELECTOR = "UNKNOWN_SELECTOR",
|
|
1419
1416
|
BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID = "BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID",
|
|
1420
1417
|
BY_PROGRAM_ID = "BY_PROGRAM_ID"
|
|
1421
1418
|
}
|
|
1422
1419
|
/** @enumType */
|
|
1423
|
-
|
|
1424
|
-
|
|
1420
|
+
type PoolSelectorTypeWithLiterals = PoolSelectorType | 'UNKNOWN_SELECTOR' | 'BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID' | 'BY_PROGRAM_ID';
|
|
1421
|
+
interface ByPoolDefinitionIdAndProgramDefinitionIdOptions {
|
|
1425
1422
|
/**
|
|
1426
1423
|
* Pool definition id
|
|
1427
1424
|
* @format GUID
|
|
@@ -1433,7 +1430,7 @@ export interface ByPoolDefinitionIdAndProgramDefinitionIdOptions {
|
|
|
1433
1430
|
*/
|
|
1434
1431
|
programDefinitionId?: string | null;
|
|
1435
1432
|
}
|
|
1436
|
-
|
|
1433
|
+
interface ByProgramIdOptions {
|
|
1437
1434
|
/**
|
|
1438
1435
|
* Program id
|
|
1439
1436
|
* @format GUID
|
|
@@ -1442,25 +1439,25 @@ export interface ByProgramIdOptions {
|
|
|
1442
1439
|
/** Additional data that gets added to the event once the async job completes */
|
|
1443
1440
|
additionalData?: Record<string, any> | null;
|
|
1444
1441
|
}
|
|
1445
|
-
|
|
1442
|
+
interface UpdatePoolStatusResponse {
|
|
1446
1443
|
/**
|
|
1447
1444
|
* Job ID of the program provision associated with this pool. Retrieve job details using the Async Job API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/async-jobs/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/async-job/introduction)).
|
|
1448
1445
|
* @format GUID
|
|
1449
1446
|
*/
|
|
1450
1447
|
jobId?: string;
|
|
1451
1448
|
}
|
|
1452
|
-
|
|
1449
|
+
interface CountNumberOfPoolsInProvisioningStatusRequest {
|
|
1453
1450
|
/**
|
|
1454
1451
|
* Program id
|
|
1455
1452
|
* @format GUID
|
|
1456
1453
|
*/
|
|
1457
1454
|
programId?: string;
|
|
1458
1455
|
}
|
|
1459
|
-
|
|
1456
|
+
interface CountNumberOfPoolsInProvisioningStatusResponse {
|
|
1460
1457
|
/** Number of pools in provisioning status */
|
|
1461
1458
|
count?: number;
|
|
1462
1459
|
}
|
|
1463
|
-
|
|
1460
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
1464
1461
|
createdEvent?: EntityCreatedEvent;
|
|
1465
1462
|
updatedEvent?: EntityUpdatedEvent;
|
|
1466
1463
|
deletedEvent?: EntityDeletedEvent;
|
|
@@ -1495,19 +1492,19 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
1495
1492
|
entityEventSequence?: string | null;
|
|
1496
1493
|
}
|
|
1497
1494
|
/** @oneof */
|
|
1498
|
-
|
|
1495
|
+
interface DomainEventBodyOneOf {
|
|
1499
1496
|
createdEvent?: EntityCreatedEvent;
|
|
1500
1497
|
updatedEvent?: EntityUpdatedEvent;
|
|
1501
1498
|
deletedEvent?: EntityDeletedEvent;
|
|
1502
1499
|
actionEvent?: ActionEvent;
|
|
1503
1500
|
}
|
|
1504
|
-
|
|
1501
|
+
interface EntityCreatedEvent {
|
|
1505
1502
|
entity?: string;
|
|
1506
1503
|
}
|
|
1507
|
-
|
|
1504
|
+
interface RestoreInfo {
|
|
1508
1505
|
deletedDate?: Date | null;
|
|
1509
1506
|
}
|
|
1510
|
-
|
|
1507
|
+
interface EntityUpdatedEvent {
|
|
1511
1508
|
/**
|
|
1512
1509
|
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
1513
1510
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
@@ -1515,14 +1512,14 @@ export interface EntityUpdatedEvent {
|
|
|
1515
1512
|
*/
|
|
1516
1513
|
currentEntity?: string;
|
|
1517
1514
|
}
|
|
1518
|
-
|
|
1515
|
+
interface EntityDeletedEvent {
|
|
1519
1516
|
/** Entity that was deleted. */
|
|
1520
1517
|
deletedEntity?: string | null;
|
|
1521
1518
|
}
|
|
1522
|
-
|
|
1519
|
+
interface ActionEvent {
|
|
1523
1520
|
body?: string;
|
|
1524
1521
|
}
|
|
1525
|
-
|
|
1522
|
+
interface MessageEnvelope {
|
|
1526
1523
|
/**
|
|
1527
1524
|
* App instance ID.
|
|
1528
1525
|
* @format GUID
|
|
@@ -1538,7 +1535,7 @@ export interface MessageEnvelope {
|
|
|
1538
1535
|
/** Stringify payload. */
|
|
1539
1536
|
data?: string;
|
|
1540
1537
|
}
|
|
1541
|
-
|
|
1538
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1542
1539
|
/**
|
|
1543
1540
|
* ID of a site visitor that has not logged in to the site.
|
|
1544
1541
|
* @format GUID
|
|
@@ -1563,7 +1560,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
1563
1560
|
identityType?: WebhookIdentityTypeWithLiterals;
|
|
1564
1561
|
}
|
|
1565
1562
|
/** @oneof */
|
|
1566
|
-
|
|
1563
|
+
interface IdentificationDataIdOneOf {
|
|
1567
1564
|
/**
|
|
1568
1565
|
* ID of a site visitor that has not logged in to the site.
|
|
1569
1566
|
* @format GUID
|
|
@@ -1585,7 +1582,7 @@ export interface IdentificationDataIdOneOf {
|
|
|
1585
1582
|
*/
|
|
1586
1583
|
appId?: string;
|
|
1587
1584
|
}
|
|
1588
|
-
|
|
1585
|
+
declare enum WebhookIdentityType {
|
|
1589
1586
|
UNKNOWN = "UNKNOWN",
|
|
1590
1587
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1591
1588
|
MEMBER = "MEMBER",
|
|
@@ -1593,49 +1590,8 @@ export declare enum WebhookIdentityType {
|
|
|
1593
1590
|
APP = "APP"
|
|
1594
1591
|
}
|
|
1595
1592
|
/** @enumType */
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
/**
|
|
1599
|
-
* Retrieves a pool.
|
|
1600
|
-
* @param poolId - ID of the pool to retrieve.
|
|
1601
|
-
* @public
|
|
1602
|
-
* @documentationMaturity preview
|
|
1603
|
-
* @requiredField poolId
|
|
1604
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_READ
|
|
1605
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1606
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1607
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.READ
|
|
1608
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.READ
|
|
1609
|
-
* @permissionScope Manage Events
|
|
1610
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1611
|
-
* @applicableIdentity APP
|
|
1612
|
-
* @returns Retrieved pool.
|
|
1613
|
-
* @fqn wix.benefit_programs.v1.pool.PoolService.GetPool
|
|
1614
|
-
*/
|
|
1615
|
-
export declare function getPool(poolId: string): Promise<NonNullablePaths<Pool, PoolNonNullablePaths>>;
|
|
1616
|
-
/**
|
|
1617
|
-
* Updates a pool.
|
|
1618
|
-
*
|
|
1619
|
-
* Each time the pool is updated,
|
|
1620
|
-
* `revision` increments by 1.
|
|
1621
|
-
* The current `revision` must be passed when updating the pool.
|
|
1622
|
-
* This ensures you're working with the latest pool
|
|
1623
|
-
* and prevents unintended overwrites.
|
|
1624
|
-
* @param _id - Pool ID.
|
|
1625
|
-
* @public
|
|
1626
|
-
* @documentationMaturity preview
|
|
1627
|
-
* @requiredField _id
|
|
1628
|
-
* @requiredField pool
|
|
1629
|
-
* @requiredField pool.revision
|
|
1630
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_UPDATE
|
|
1631
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1632
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1633
|
-
* @applicableIdentity APP
|
|
1634
|
-
* @returns Updated pool.
|
|
1635
|
-
* @fqn wix.benefit_programs.v1.pool.PoolService.UpdatePool
|
|
1636
|
-
*/
|
|
1637
|
-
export declare function updatePool(_id: string, pool: NonNullablePaths<UpdatePool, `revision`>): Promise<NonNullablePaths<Pool, PoolNonNullablePaths>>;
|
|
1638
|
-
export interface UpdatePool {
|
|
1593
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
1594
|
+
interface UpdatePool {
|
|
1639
1595
|
/**
|
|
1640
1596
|
* Pool ID.
|
|
1641
1597
|
* @format GUID
|
|
@@ -1737,31 +1693,6 @@ export interface UpdatePool {
|
|
|
1737
1693
|
*/
|
|
1738
1694
|
renewalCount?: number | null;
|
|
1739
1695
|
}
|
|
1740
|
-
/**
|
|
1741
|
-
* Creates a query to retrieve a list of pools.
|
|
1742
|
-
*
|
|
1743
|
-
* The Query Pools method builds a query to retrieve a list of pools and returns a `PoolsQueryBuilder` object.
|
|
1744
|
-
*
|
|
1745
|
-
* The returned object contains the query definition, which is used to run the query using the `find()` method.
|
|
1746
|
-
*
|
|
1747
|
-
* You can refine the query by chaining `PoolsQueryBuilder` methods onto the query. `PoolsQueryBuilder` methods enable you to filter, sort, and control the results that Query Pools returns.
|
|
1748
|
-
*
|
|
1749
|
-
* Query Pools has a default paging limit of 50, which you can override.
|
|
1750
|
-
*
|
|
1751
|
-
* For a full description of the item object, see the object returned for the `items` property in `PoolsQueryResult`.
|
|
1752
|
-
* @public
|
|
1753
|
-
* @documentationMaturity preview
|
|
1754
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1755
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1756
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.READ
|
|
1757
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.READ
|
|
1758
|
-
* @permissionScope Manage Events
|
|
1759
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1760
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_READ
|
|
1761
|
-
* @applicableIdentity APP
|
|
1762
|
-
* @fqn wix.benefit_programs.v1.pool.PoolService.QueryPools
|
|
1763
|
-
*/
|
|
1764
|
-
export declare function queryPools(): PoolsQueryBuilder;
|
|
1765
1696
|
interface QueryCursorResult {
|
|
1766
1697
|
cursors: Cursors;
|
|
1767
1698
|
hasNext: () => boolean;
|
|
@@ -1769,13 +1700,13 @@ interface QueryCursorResult {
|
|
|
1769
1700
|
length: number;
|
|
1770
1701
|
pageSize: number;
|
|
1771
1702
|
}
|
|
1772
|
-
|
|
1703
|
+
interface PoolsQueryResult extends QueryCursorResult {
|
|
1773
1704
|
items: Pool[];
|
|
1774
1705
|
query: PoolsQueryBuilder;
|
|
1775
1706
|
next: () => Promise<PoolsQueryResult>;
|
|
1776
1707
|
prev: () => Promise<PoolsQueryResult>;
|
|
1777
1708
|
}
|
|
1778
|
-
|
|
1709
|
+
interface PoolsQueryBuilder {
|
|
1779
1710
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1780
1711
|
* @param value - Value to compare against.
|
|
1781
1712
|
* @documentationMaturity preview
|
|
@@ -1839,28 +1770,7 @@ export interface PoolsQueryBuilder {
|
|
|
1839
1770
|
/** @documentationMaturity preview */
|
|
1840
1771
|
find: () => Promise<PoolsQueryResult>;
|
|
1841
1772
|
}
|
|
1842
|
-
|
|
1843
|
-
* Redeems a specified benefit.
|
|
1844
|
-
*
|
|
1845
|
-
* Calling this method records redemption of the benefit and adjusts the pool's associated balance. You still need to handle providing the beneficiary with the item.
|
|
1846
|
-
* @param poolId - ID of the pool that contains the benefit to redeem.
|
|
1847
|
-
* @public
|
|
1848
|
-
* @documentationMaturity preview
|
|
1849
|
-
* @requiredField options.benefitKey
|
|
1850
|
-
* @requiredField options.idempotencyKey
|
|
1851
|
-
* @requiredField options.itemReference
|
|
1852
|
-
* @requiredField options.itemReference.externalId
|
|
1853
|
-
* @requiredField options.itemReference.providerAppId
|
|
1854
|
-
* @requiredField options.namespace
|
|
1855
|
-
* @requiredField poolId
|
|
1856
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_REDEEM
|
|
1857
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1858
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1859
|
-
* @applicableIdentity APP
|
|
1860
|
-
* @fqn wix.benefit_programs.v1.pool.PoolService.RedeemBenefit
|
|
1861
|
-
*/
|
|
1862
|
-
export declare function redeemBenefit(poolId: string, options?: NonNullablePaths<RedeemBenefitOptions, `benefitKey` | `idempotencyKey` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`>): Promise<NonNullablePaths<RedeemBenefitResponse, `transactionId`>>;
|
|
1863
|
-
export interface RedeemBenefitOptions {
|
|
1773
|
+
interface RedeemBenefitOptions {
|
|
1864
1774
|
/** Information about the item to redeem. */
|
|
1865
1775
|
itemReference: ItemReference;
|
|
1866
1776
|
/**
|
|
@@ -1896,26 +1806,7 @@ export interface RedeemBenefitOptions {
|
|
|
1896
1806
|
*/
|
|
1897
1807
|
namespace: string;
|
|
1898
1808
|
}
|
|
1899
|
-
|
|
1900
|
-
* Checks if a benefit can currently be redeemed.
|
|
1901
|
-
*
|
|
1902
|
-
* To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.
|
|
1903
|
-
* @param poolId - ID of the pool that the benefit to check belongs to.
|
|
1904
|
-
* @public
|
|
1905
|
-
* @documentationMaturity preview
|
|
1906
|
-
* @requiredField options.itemReference
|
|
1907
|
-
* @requiredField options.itemReference.externalId
|
|
1908
|
-
* @requiredField options.itemReference.providerAppId
|
|
1909
|
-
* @requiredField options.namespace
|
|
1910
|
-
* @requiredField poolId
|
|
1911
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_REDEEM
|
|
1912
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1913
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1914
|
-
* @applicableIdentity APP
|
|
1915
|
-
* @fqn wix.benefit_programs.v1.pool.PoolService.CheckBenefitEligibility
|
|
1916
|
-
*/
|
|
1917
|
-
export declare function checkBenefitEligibility(poolId: string, options?: NonNullablePaths<CheckBenefitEligibilityOptions, `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`>): Promise<NonNullablePaths<CheckBenefitEligibilityResponse, `result.eligibleOptions.eligibleBenefits` | `result.eligibleOptions.eligibleBenefits.${number}.poolId` | `result.eligibleOptions.eligibleBenefits.${number}.benefitKey` | `result.eligibleOptions.eligibleBenefits.${number}.itemReference.externalId` | `result.eligibleOptions.eligibleBenefits.${number}.itemReference.category` | `result.eligibleOptions.eligibleBenefits.${number}.itemReference.providerAppId` | `result.notEnoughBalanceOptions.poolId` | `result.notEnoughBalanceOptions.availableBalance` | `result.notEnoughBalanceOptions.requestedBalance` | `result.poolNotActiveOptions.poolId` | `result.poolNotActiveOptions.poolStatus` | `result.benefitNotFoundOptions.poolId` | `result.poolNotFoundOptions.poolId` | `result.type`>>;
|
|
1918
|
-
export interface CheckBenefitEligibilityOptions {
|
|
1809
|
+
interface CheckBenefitEligibilityOptions {
|
|
1919
1810
|
/**
|
|
1920
1811
|
* Key of the benefit to check.
|
|
1921
1812
|
* @maxLength 64
|
|
@@ -1947,27 +1838,7 @@ export interface CheckBenefitEligibilityOptions {
|
|
|
1947
1838
|
*/
|
|
1948
1839
|
namespace: string;
|
|
1949
1840
|
}
|
|
1950
|
-
|
|
1951
|
-
* Checks if benefits can currently be redeemed.
|
|
1952
|
-
*
|
|
1953
|
-
* To be redeemed, a benefit's pool must be active and the associated balance must greater be than the cost of the benefit.
|
|
1954
|
-
*
|
|
1955
|
-
* Each benefit is checked independently. For example, if there is a benefit with a price of 3 credits and a benefit with a price of 4 credits, and there are 5 available credits, both benefits would be returned as eligible, but they can't both be redeemed.
|
|
1956
|
-
* @public
|
|
1957
|
-
* @documentationMaturity preview
|
|
1958
|
-
* @requiredField options.benefitSelectors.itemReference
|
|
1959
|
-
* @requiredField options.benefitSelectors.itemReference.externalId
|
|
1960
|
-
* @requiredField options.benefitSelectors.itemReference.providerAppId
|
|
1961
|
-
* @requiredField options.benefitSelectors.poolId
|
|
1962
|
-
* @requiredField options.namespace
|
|
1963
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_REDEEM
|
|
1964
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1965
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1966
|
-
* @applicableIdentity APP
|
|
1967
|
-
* @fqn wix.benefit_programs.v1.pool.PoolService.BulkCheckBenefitEligibility
|
|
1968
|
-
*/
|
|
1969
|
-
export declare function bulkCheckBenefitEligibility(options?: NonNullablePaths<BulkCheckBenefitEligibilityOptions, `benefitSelectors.${number}.itemReference` | `benefitSelectors.${number}.itemReference.externalId` | `benefitSelectors.${number}.itemReference.providerAppId` | `benefitSelectors.${number}.poolId` | `namespace`>): Promise<NonNullablePaths<BulkCheckBenefitEligibilityResponse, `results` | `results.${number}.benefitSelector.poolId` | `results.${number}.benefitSelector.itemReference.externalId` | `results.${number}.benefitSelector.itemReference.category` | `results.${number}.benefitSelector.itemReference.providerAppId` | `results.${number}.benefitSelector.count` | `results.${number}.result.notEnoughBalanceOptions.poolId` | `results.${number}.result.notEnoughBalanceOptions.availableBalance` | `results.${number}.result.notEnoughBalanceOptions.requestedBalance` | `results.${number}.result.poolNotActiveOptions.poolId` | `results.${number}.result.poolNotActiveOptions.poolStatus` | `results.${number}.result.benefitNotFoundOptions.poolId` | `results.${number}.result.poolNotFoundOptions.poolId` | `results.${number}.result.type`>>;
|
|
1970
|
-
export interface BulkCheckBenefitEligibilityOptions {
|
|
1841
|
+
interface BulkCheckBenefitEligibilityOptions {
|
|
1971
1842
|
/**
|
|
1972
1843
|
* List of benefits to check.
|
|
1973
1844
|
* @minSize 1
|
|
@@ -1983,30 +1854,7 @@ export interface BulkCheckBenefitEligibilityOptions {
|
|
|
1983
1854
|
/** Pool beneficiary. */
|
|
1984
1855
|
beneficiary?: CommonIdentificationData;
|
|
1985
1856
|
}
|
|
1986
|
-
|
|
1987
|
-
* Retrieves benefits that can be redeemed for a specific benefit item.
|
|
1988
|
-
*
|
|
1989
|
-
* Each benefit item can only be linked to 1 benefit in 1 pool definition. However, each pool created from that pool definition contains the same benefits.
|
|
1990
|
-
* This method checks each pool containing a benefit with this benefit item, and returns the benefits that can be redeemed.
|
|
1991
|
-
* @param itemReference - Item reference.
|
|
1992
|
-
* @public
|
|
1993
|
-
* @documentationMaturity preview
|
|
1994
|
-
* @requiredField itemReference
|
|
1995
|
-
* @requiredField itemReference.externalId
|
|
1996
|
-
* @requiredField itemReference.providerAppId
|
|
1997
|
-
* @requiredField options.namespace
|
|
1998
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_READ
|
|
1999
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
2000
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
2001
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.READ
|
|
2002
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.READ
|
|
2003
|
-
* @permissionScope Manage Events
|
|
2004
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
2005
|
-
* @applicableIdentity APP
|
|
2006
|
-
* @fqn wix.benefit_programs.v1.pool.PoolService.GetEligibleBenefits
|
|
2007
|
-
*/
|
|
2008
|
-
export declare function getEligibleBenefits(itemReference: NonNullablePaths<ItemReference, `externalId` | `providerAppId`>, options?: NonNullablePaths<GetEligibleBenefitsOptions, `namespace`>): Promise<NonNullablePaths<GetEligibleBenefitsResponse, `eligibleBenefits` | `eligibleBenefits.${number}.poolId` | `eligibleBenefits.${number}.benefitKey` | `eligibleBenefits.${number}.itemReference.externalId` | `eligibleBenefits.${number}.itemReference.category` | `eligibleBenefits.${number}.itemReference.providerAppId`>>;
|
|
2009
|
-
export interface GetEligibleBenefitsOptions {
|
|
1857
|
+
interface GetEligibleBenefitsOptions {
|
|
2010
1858
|
/**
|
|
2011
1859
|
* Amount of items to check. This ensures the balance is high enough to redeem this many items.
|
|
2012
1860
|
* @min 1
|
|
@@ -2029,23 +1877,7 @@ export interface GetEligibleBenefitsOptions {
|
|
|
2029
1877
|
*/
|
|
2030
1878
|
namespace: string;
|
|
2031
1879
|
}
|
|
2032
|
-
|
|
2033
|
-
* Updates pools.
|
|
2034
|
-
* @public
|
|
2035
|
-
* @documentationMaturity preview
|
|
2036
|
-
* @requiredField options.pools.pool
|
|
2037
|
-
* @requiredField options.pools.pool._id
|
|
2038
|
-
* @requiredField options.pools.pool.revision
|
|
2039
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_UPDATE
|
|
2040
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
2041
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
2042
|
-
* @applicableIdentity APP
|
|
2043
|
-
* @fqn wix.benefit_programs.v1.pool.PoolService.BulkUpdatePools
|
|
2044
|
-
*/
|
|
2045
|
-
export declare function bulkUpdatePools(options?: NonNullablePaths<BulkUpdatePoolsOptions, `pools.${number}.pool` | `pools.${number}.pool._id` | `pools.${number}.pool.revision`>): Promise<NonNullablePaths<BulkUpdatePoolsResponse, `results` | `results.${number}.poolMetadata.originalIndex` | `results.${number}.poolMetadata.success` | `results.${number}.poolMetadata.error.code` | `results.${number}.poolMetadata.error.description` | {
|
|
2046
|
-
[P in PoolNonNullablePaths]: `results.${number}.pool.${P}`;
|
|
2047
|
-
}[PoolNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
|
|
2048
|
-
export interface BulkUpdatePoolsOptions {
|
|
1880
|
+
interface BulkUpdatePoolsOptions {
|
|
2049
1881
|
/**
|
|
2050
1882
|
* Pools to update.
|
|
2051
1883
|
* @minSize 1
|
|
@@ -2059,4 +1891,5 @@ export interface BulkUpdatePoolsOptions {
|
|
|
2059
1891
|
*/
|
|
2060
1892
|
returnEntity?: boolean;
|
|
2061
1893
|
}
|
|
2062
|
-
|
|
1894
|
+
|
|
1895
|
+
export { type PoolEnded as $, type RateLimitedPolicyPeriodOneOf as A, type BulkCheckBenefitEligibilityOptions as B, type CheckBenefitEligibilityOptions as C, type Details as D, EligibilityCheckResultType as E, type FixedIntervalPolicy as F, type GetEligibleBenefitsOptions as G, type CustomPolicy as H, type ItemReference as I, type CreditConfiguration as J, type RolloverConfiguration as K, ListPoolsRequestType as L, type ExtendedFields as M, type ProgramDefinitionInfo as N, type PoolProgramInfo as O, type Pool as P, type PoolProvisioned as Q, type RedeemBenefitOptions as R, SortOrder as S, Type as T, type UpdatePool as U, type PoolRenewed as V, WeekDay as W, type BenefitRedeemed as X, type RedemptionDetails as Y, type PoolPaused as Z, type PoolResumed as _, type PoolsQueryBuilder as a, type ProvisionPoolsForProgramResponse as a$, type BenefitReserved as a0, type BenefitReservationCanceled as a1, type BenefitReservationReleased as a2, type PoolProvisionJobFinished as a3, type PoolStatusUpdateJobFinished as a4, type PoolStatusUpdateJobFinishedContextOneOf as a5, type PoolDefinitionAndProgramDefinition as a6, type ProgramInfo as a7, type CreatePoolRequest as a8, type CreatePoolResponse as a9, type ReleaseBenefitReservationRequest as aA, type ReleaseBenefitReservationResponse as aB, type CheckBenefitEligibilityRequest as aC, type EligibilityCheckResult as aD, type EligibilityCheckResultResultOneOf as aE, type EligibleBenefit as aF, type Eligible as aG, type BulkCheckBenefitEligibilityRequest as aH, type BenefitSelector as aI, type BulkEligibilityCheckResult as aJ, type GetEligibleBenefitsRequest as aK, type ListPoolsRequest as aL, type ByItemReference as aM, type ByItemReferenceFilter as aN, type Filter as aO, type FilterFilterOneOf as aP, type ListPoolsResponse as aQ, type PoolWithItems as aR, type BulkUpdatePoolsRequest as aS, type MaskedPool as aT, type BulkPoolResult as aU, type ItemMetadata as aV, type ApplicationError as aW, type BulkActionMetadata as aX, type ProvisionPoolsForProgramRequest as aY, type PoolDefinitionLookupId as aZ, type PoolDefinitionLookupIdIdOneOf as a_, type GetPoolRequest as aa, type GetPoolResponse as ab, type UpdatePoolRequest as ac, type UpdatePoolResponse as ad, type DeletePoolRequest as ae, type DeletePoolResponse as af, type QueryPoolsRequest as ag, type CursorQuery as ah, type CursorQueryPagingMethodOneOf as ai, type Sorting as aj, type CursorPaging as ak, type QueryPoolsResponse as al, type CursorPagingMetadata as am, type Cursors as an, type RedeemBenefitRequest as ao, type NotEnoughBalance as ap, type PolicyExpressionEvaluatedToFalse as aq, type FailureDetails as ar, type PoolNotActive as as, type PoolNotFound as at, type BenefitAlreadyRedeemed as au, type BenefitNotFound as av, type ReserveBenefitRequest as aw, type ReserveBenefitResponse as ax, type CancelBenefitReservationRequest as ay, type CancelBenefitReservationResponse as az, type RedeemBenefitResponse as b, type ProvisionPoolsForProgramResponseResultOneOf as b0, type SyncResult as b1, type AsyncResult as b2, type InvalidPoolDefinitionReference as b3, type RenewPoolsForProgramRequest as b4, type RenewPoolsForProgramResponse as b5, type UpdatePoolStatusRequest as b6, type UpdatePoolStatusRequestPoolSelectorOneOf as b7, type ByPoolDefinitionIdAndProgramDefinitionIdOptions as b8, type ByProgramIdOptions as b9, type UpdatePoolStatusResponse as ba, type CountNumberOfPoolsInProvisioningStatusRequest as bb, type CountNumberOfPoolsInProvisioningStatusResponse as bc, type DomainEvent as bd, type DomainEventBodyOneOf as be, type EntityCreatedEvent as bf, type RestoreInfo as bg, type EntityUpdatedEvent as bh, type EntityDeletedEvent as bi, type ActionEvent as bj, type MessageEnvelope as bk, type IdentificationData as bl, type IdentificationDataIdOneOf as bm, type PoolsQueryResult as bn, type CheckBenefitEligibilityResponse as c, type BulkCheckBenefitEligibilityResponse as d, type GetEligibleBenefitsResponse as e, type BulkUpdatePoolsOptions as f, type BulkUpdatePoolsResponse as g, PoolStatus as h, IdentityType as i, PolicyExpressionType as j, RateLimitedPolicyType as k, PoolOrigin as l, ProvisionPoolsForProgramResponseType as m, PoolSelectorType as n, WebhookIdentityType as o, type CommonIdentificationData as p, type CommonIdentificationDataIdOneOf as q, type Benefit as r, type PolicyExpression as s, type PolicyExpressionExpressionOneOf as t, type PolicyExpressionNot as u, type PolicyExpressionAnd as v, type PolicyExpressionOr as w, type Policy as x, type PolicyPolicyOneOf as y, type RateLimitedPolicy as z };
|