@wix/auto_sdk_benefit-programs_pools 1.0.9 → 1.0.10
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-C7Pd1Zor.d.mts} +144 -309
- package/build/{cjs/src/benefit-programs-v1-pool-pools.universal.d.ts → benefit-programs-v1-pool-pools.universal-C7Pd1Zor.d.ts} +144 -309
- package/build/index.d.mts +105 -0
- package/build/index.d.ts +105 -0
- package/build/index.js +901 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +857 -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-C7Pd1Zor.d.mts} +144 -309
- package/build/{es/src/benefit-programs-v1-pool-pools.universal.d.ts → internal/benefit-programs-v1-pool-pools.universal-C7Pd1Zor.d.ts} +144 -309
- package/build/internal/index.d.mts +105 -0
- package/build/internal/index.d.ts +105 -0
- package/build/internal/index.js +901 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +857 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/internal/meta.d.mts +776 -0
- package/build/internal/meta.d.ts +776 -0
- package/build/internal/meta.js +579 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +545 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/meta.d.mts +776 -0
- package/build/meta.d.ts +776 -0
- package/build/meta.js +579 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +545 -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 -446
- 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 -1579
- 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 -587
- 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 -435
- 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 -1579
- 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 -553
- 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 -446
- 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 -1579
- 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 -587
- 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 -435
- 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 -1579
- 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 -553
- 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. */
|
|
@@ -115,7 +114,7 @@ export declare enum PoolStatus {
|
|
|
115
114
|
/** Pool renewing is in progress. This status exists for a short time during processing. */
|
|
116
115
|
RENEWING = "RENEWING"
|
|
117
116
|
}
|
|
118
|
-
|
|
117
|
+
interface CommonIdentificationData extends CommonIdentificationDataIdOneOf {
|
|
119
118
|
/**
|
|
120
119
|
* ID of a site visitor that hasn't logged in to the site.
|
|
121
120
|
* @format GUID
|
|
@@ -133,7 +132,7 @@ export interface CommonIdentificationData extends CommonIdentificationDataIdOneO
|
|
|
133
132
|
wixUserId?: string;
|
|
134
133
|
}
|
|
135
134
|
/** @oneof */
|
|
136
|
-
|
|
135
|
+
interface CommonIdentificationDataIdOneOf {
|
|
137
136
|
/**
|
|
138
137
|
* ID of a site visitor that hasn't logged in to the site.
|
|
139
138
|
* @format GUID
|
|
@@ -150,7 +149,7 @@ export interface CommonIdentificationDataIdOneOf {
|
|
|
150
149
|
*/
|
|
151
150
|
wixUserId?: string;
|
|
152
151
|
}
|
|
153
|
-
|
|
152
|
+
declare enum IdentityType {
|
|
154
153
|
/** Unknown type. This value is not used. */
|
|
155
154
|
UNKNOWN = "UNKNOWN",
|
|
156
155
|
/** A site visitor who has not logged in. */
|
|
@@ -160,7 +159,7 @@ export declare enum IdentityType {
|
|
|
160
159
|
/** A Wix account holder, such as a site owner or contributor. */
|
|
161
160
|
WIX_USER = "WIX_USER"
|
|
162
161
|
}
|
|
163
|
-
|
|
162
|
+
interface Details {
|
|
164
163
|
/**
|
|
165
164
|
* List of benefits.
|
|
166
165
|
* @maxSize 10
|
|
@@ -175,7 +174,7 @@ export interface Details {
|
|
|
175
174
|
/** Additional information relating to this object. */
|
|
176
175
|
additionalData?: Record<string, any> | null;
|
|
177
176
|
}
|
|
178
|
-
|
|
177
|
+
interface Benefit {
|
|
179
178
|
/**
|
|
180
179
|
* Unique identifier for this benefit.
|
|
181
180
|
*
|
|
@@ -214,7 +213,7 @@ export interface Benefit {
|
|
|
214
213
|
*/
|
|
215
214
|
description?: string | null;
|
|
216
215
|
}
|
|
217
|
-
|
|
216
|
+
interface PolicyExpression extends PolicyExpressionExpressionOneOf {
|
|
218
217
|
/** Benefits can be redeemed if the expression in this object is not fulfilled. */
|
|
219
218
|
operatorNotOptions?: PolicyExpressionNot;
|
|
220
219
|
/** Benefits can be redeemed if all the expression in this object's array are fulfilled. */
|
|
@@ -227,7 +226,7 @@ export interface PolicyExpression extends PolicyExpressionExpressionOneOf {
|
|
|
227
226
|
type?: PolicyExpressionType;
|
|
228
227
|
}
|
|
229
228
|
/** @oneof */
|
|
230
|
-
|
|
229
|
+
interface PolicyExpressionExpressionOneOf {
|
|
231
230
|
/** Benefits can be redeemed if the expression in this object is not fulfilled. */
|
|
232
231
|
operatorNotOptions?: PolicyExpressionNot;
|
|
233
232
|
/** Benefits can be redeemed if all the expression in this object's array are fulfilled. */
|
|
@@ -237,7 +236,7 @@ export interface PolicyExpressionExpressionOneOf {
|
|
|
237
236
|
/** Defines when benefits can be redeemed or how many benefits can be redeemed in a specific time period. */
|
|
238
237
|
policyOptions?: Policy;
|
|
239
238
|
}
|
|
240
|
-
|
|
239
|
+
declare enum PolicyExpressionType {
|
|
241
240
|
UNKNOWN = "UNKNOWN",
|
|
242
241
|
/** Use with `operatorNotOptions`. */
|
|
243
242
|
OPERATOR_NOT = "OPERATOR_NOT",
|
|
@@ -248,11 +247,11 @@ export declare enum PolicyExpressionType {
|
|
|
248
247
|
/** Use with `policyOptions`. */
|
|
249
248
|
POLICY = "POLICY"
|
|
250
249
|
}
|
|
251
|
-
|
|
250
|
+
interface PolicyExpressionNot {
|
|
252
251
|
/** Policy expression. If this expression is not fulfilled, benefits can be redeemed. */
|
|
253
252
|
expression?: PolicyExpression;
|
|
254
253
|
}
|
|
255
|
-
|
|
254
|
+
interface PolicyExpressionAnd {
|
|
256
255
|
/**
|
|
257
256
|
* Array of policy expressions. If all expressions are fulfilled, benefits can be redeemed.
|
|
258
257
|
* @minSize 2
|
|
@@ -260,7 +259,7 @@ export interface PolicyExpressionAnd {
|
|
|
260
259
|
*/
|
|
261
260
|
expressions?: PolicyExpression[];
|
|
262
261
|
}
|
|
263
|
-
|
|
262
|
+
interface PolicyExpressionOr {
|
|
264
263
|
/**
|
|
265
264
|
* Array of policy expressions. If at least one expression is fulfilled, benefits can be redeemed.
|
|
266
265
|
* @minSize 2
|
|
@@ -268,7 +267,7 @@ export interface PolicyExpressionOr {
|
|
|
268
267
|
*/
|
|
269
268
|
expressions?: PolicyExpression[];
|
|
270
269
|
}
|
|
271
|
-
|
|
270
|
+
interface Policy extends PolicyPolicyOneOf {
|
|
272
271
|
/**
|
|
273
272
|
* Defines an interval during which the policy expression is fulfilled.
|
|
274
273
|
*
|
|
@@ -283,7 +282,7 @@ export interface Policy extends PolicyPolicyOneOf {
|
|
|
283
282
|
type?: Type;
|
|
284
283
|
}
|
|
285
284
|
/** @oneof */
|
|
286
|
-
|
|
285
|
+
interface PolicyPolicyOneOf {
|
|
287
286
|
/**
|
|
288
287
|
* Defines an interval during which the policy expression is fulfilled.
|
|
289
288
|
*
|
|
@@ -295,7 +294,7 @@ export interface PolicyPolicyOneOf {
|
|
|
295
294
|
/** Custom policy defined by a different app. */
|
|
296
295
|
customOptions?: CustomPolicy;
|
|
297
296
|
}
|
|
298
|
-
|
|
297
|
+
declare enum Type {
|
|
299
298
|
/** Unknown policy type. */
|
|
300
299
|
UNKNOWN = "UNKNOWN",
|
|
301
300
|
/** Use with `fixedIntervalOptions`. */
|
|
@@ -305,7 +304,7 @@ export declare enum Type {
|
|
|
305
304
|
/** Use with `customOptions`. */
|
|
306
305
|
CUSTOM = "CUSTOM"
|
|
307
306
|
}
|
|
308
|
-
|
|
307
|
+
interface FixedIntervalPolicy {
|
|
309
308
|
/** Weekday that this interval starts from. If this field is defined, then `toWeekDay` is required. */
|
|
310
309
|
fromWeekDay?: WeekDay;
|
|
311
310
|
/** Weekday that this interval ends at. If this field is defined, then `fromWeekDay` is required. */
|
|
@@ -331,7 +330,7 @@ export interface FixedIntervalPolicy {
|
|
|
331
330
|
*/
|
|
332
331
|
toMinute?: number | null;
|
|
333
332
|
}
|
|
334
|
-
|
|
333
|
+
declare enum WeekDay {
|
|
335
334
|
/** Unknown weekday. */
|
|
336
335
|
UNKNOWN = "UNKNOWN",
|
|
337
336
|
/** Monday. */
|
|
@@ -349,7 +348,7 @@ export declare enum WeekDay {
|
|
|
349
348
|
/** Sunday. */
|
|
350
349
|
SUNDAY = "SUNDAY"
|
|
351
350
|
}
|
|
352
|
-
|
|
351
|
+
interface RateLimitedPolicy extends RateLimitedPolicyPeriodOneOf {
|
|
353
352
|
/** Fixed interval used to limit benefit redemption. */
|
|
354
353
|
fixedIntervalOptions?: FixedIntervalPolicy;
|
|
355
354
|
/** Maximum number of times a benefit can be redeemed per specified time period. */
|
|
@@ -358,11 +357,11 @@ export interface RateLimitedPolicy extends RateLimitedPolicyPeriodOneOf {
|
|
|
358
357
|
type?: RateLimitedPolicyType;
|
|
359
358
|
}
|
|
360
359
|
/** @oneof */
|
|
361
|
-
|
|
360
|
+
interface RateLimitedPolicyPeriodOneOf {
|
|
362
361
|
/** Fixed interval used to limit benefit redemption. */
|
|
363
362
|
fixedIntervalOptions?: FixedIntervalPolicy;
|
|
364
363
|
}
|
|
365
|
-
|
|
364
|
+
declare enum RateLimitedPolicyType {
|
|
366
365
|
/** Unknown rate limit method. */
|
|
367
366
|
UNKNOWN = "UNKNOWN",
|
|
368
367
|
/** Time period is defined using `fixedIntervalOptions`. */
|
|
@@ -371,7 +370,7 @@ export declare enum RateLimitedPolicyType {
|
|
|
371
370
|
PER_CYCLE = "PER_CYCLE"
|
|
372
371
|
}
|
|
373
372
|
/** Custom policy as implemented by the Entitlement Policy Provider */
|
|
374
|
-
|
|
373
|
+
interface CustomPolicy {
|
|
375
374
|
/**
|
|
376
375
|
* Policy ID.
|
|
377
376
|
* @format GUID
|
|
@@ -385,7 +384,7 @@ export interface CustomPolicy {
|
|
|
385
384
|
/** Additional information for this custom policy. */
|
|
386
385
|
additionalData?: Record<string, any> | null;
|
|
387
386
|
}
|
|
388
|
-
|
|
387
|
+
interface CreditConfiguration {
|
|
389
388
|
/**
|
|
390
389
|
* Initial available amount for associated balances.
|
|
391
390
|
* @decimalValue options { gte:0, maxScale:4 }
|
|
@@ -399,7 +398,7 @@ export interface CreditConfiguration {
|
|
|
399
398
|
*/
|
|
400
399
|
unitDisplayName?: string | null;
|
|
401
400
|
}
|
|
402
|
-
|
|
401
|
+
interface RolloverConfiguration {
|
|
403
402
|
/** Whether unused credits roll over to a new cycle when a program renews. */
|
|
404
403
|
enabled?: boolean | null;
|
|
405
404
|
/**
|
|
@@ -408,7 +407,7 @@ export interface RolloverConfiguration {
|
|
|
408
407
|
*/
|
|
409
408
|
balanceCap?: string | null;
|
|
410
409
|
}
|
|
411
|
-
|
|
410
|
+
interface ExtendedFields {
|
|
412
411
|
/**
|
|
413
412
|
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
414
413
|
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
@@ -419,7 +418,7 @@ export interface ExtendedFields {
|
|
|
419
418
|
*/
|
|
420
419
|
namespaces?: Record<string, Record<string, any>>;
|
|
421
420
|
}
|
|
422
|
-
|
|
421
|
+
interface ProgramDefinitionInfo {
|
|
423
422
|
/**
|
|
424
423
|
* Program definition ID.
|
|
425
424
|
* @format GUID
|
|
@@ -433,7 +432,7 @@ export interface ProgramDefinitionInfo {
|
|
|
433
432
|
*/
|
|
434
433
|
externalId?: string | null;
|
|
435
434
|
}
|
|
436
|
-
|
|
435
|
+
interface PoolProgramInfo {
|
|
437
436
|
/**
|
|
438
437
|
* Program ID.
|
|
439
438
|
* @format GUID
|
|
@@ -447,7 +446,7 @@ export interface PoolProgramInfo {
|
|
|
447
446
|
*/
|
|
448
447
|
externalId?: string | null;
|
|
449
448
|
}
|
|
450
|
-
|
|
449
|
+
declare enum PoolOrigin {
|
|
451
450
|
/** Unknown pool origin. */
|
|
452
451
|
UNKNOWN = "UNKNOWN",
|
|
453
452
|
/** Benefit pool created by a program provision. */
|
|
@@ -455,21 +454,21 @@ export declare enum PoolOrigin {
|
|
|
455
454
|
/** Benefit pool was created when pool definition was added to program definition. */
|
|
456
455
|
CASCADE = "CASCADE"
|
|
457
456
|
}
|
|
458
|
-
|
|
457
|
+
interface PoolProvisioned {
|
|
459
458
|
/** Pool which has been provisioned */
|
|
460
459
|
pool?: Pool;
|
|
461
460
|
}
|
|
462
|
-
|
|
461
|
+
interface PoolRenewed {
|
|
463
462
|
/** Pool which has been granted */
|
|
464
463
|
pool?: Pool;
|
|
465
464
|
}
|
|
466
|
-
|
|
465
|
+
interface BenefitRedeemed {
|
|
467
466
|
/** Pool which has been redeemed */
|
|
468
467
|
pool?: Pool;
|
|
469
468
|
/** Details of the redemption */
|
|
470
469
|
redemptionDetails?: RedemptionDetails;
|
|
471
470
|
}
|
|
472
|
-
|
|
471
|
+
interface RedemptionDetails {
|
|
473
472
|
/**
|
|
474
473
|
* Id of the redemption transaction
|
|
475
474
|
* @format GUID
|
|
@@ -497,7 +496,7 @@ export interface RedemptionDetails {
|
|
|
497
496
|
/** Beneficiary of the entitlement */
|
|
498
497
|
beneficiary?: CommonIdentificationData;
|
|
499
498
|
}
|
|
500
|
-
|
|
499
|
+
interface ItemReference {
|
|
501
500
|
/**
|
|
502
501
|
* External ID of the item.
|
|
503
502
|
* @format GUID
|
|
@@ -514,25 +513,25 @@ export interface ItemReference {
|
|
|
514
513
|
*/
|
|
515
514
|
providerAppId?: string;
|
|
516
515
|
}
|
|
517
|
-
|
|
516
|
+
interface PoolPaused {
|
|
518
517
|
/** Pool which has been paused */
|
|
519
518
|
pool?: Pool;
|
|
520
519
|
}
|
|
521
|
-
|
|
520
|
+
interface PoolResumed {
|
|
522
521
|
/** Pool which has been resumed */
|
|
523
522
|
pool?: Pool;
|
|
524
523
|
}
|
|
525
|
-
|
|
524
|
+
interface PoolEnded {
|
|
526
525
|
/** Pool which has been ended */
|
|
527
526
|
pool?: Pool;
|
|
528
527
|
}
|
|
529
|
-
|
|
528
|
+
interface BenefitReserved {
|
|
530
529
|
/** Pool which was used to perform this transaction */
|
|
531
530
|
pool?: Pool;
|
|
532
531
|
/** Details of the redemption */
|
|
533
532
|
redemptionDetails?: RedemptionDetails;
|
|
534
533
|
}
|
|
535
|
-
|
|
534
|
+
interface BenefitReservationCanceled {
|
|
536
535
|
/** Pool which was used to perform this transaction */
|
|
537
536
|
pool?: Pool;
|
|
538
537
|
/**
|
|
@@ -541,7 +540,7 @@ export interface BenefitReservationCanceled {
|
|
|
541
540
|
*/
|
|
542
541
|
transactionId?: string;
|
|
543
542
|
}
|
|
544
|
-
|
|
543
|
+
interface BenefitReservationReleased {
|
|
545
544
|
/** Pool which was used to perform this transaction */
|
|
546
545
|
pool?: Pool;
|
|
547
546
|
/**
|
|
@@ -550,7 +549,7 @@ export interface BenefitReservationReleased {
|
|
|
550
549
|
*/
|
|
551
550
|
transactionId?: string;
|
|
552
551
|
}
|
|
553
|
-
|
|
552
|
+
interface PoolProvisionJobFinished {
|
|
554
553
|
/**
|
|
555
554
|
* Program id
|
|
556
555
|
* @format GUID
|
|
@@ -561,7 +560,7 @@ export interface PoolProvisionJobFinished {
|
|
|
561
560
|
/** Origin of the pool */
|
|
562
561
|
origin?: PoolOrigin;
|
|
563
562
|
}
|
|
564
|
-
|
|
563
|
+
interface PoolStatusUpdateJobFinished extends PoolStatusUpdateJobFinishedContextOneOf {
|
|
565
564
|
/** The id of the pool definition that is being updated */
|
|
566
565
|
poolDefinitionAndProgramDefinition?: PoolDefinitionAndProgramDefinition;
|
|
567
566
|
/** Update the status of all pools in the program */
|
|
@@ -572,13 +571,13 @@ export interface PoolStatusUpdateJobFinished extends PoolStatusUpdateJobFinished
|
|
|
572
571
|
processedItemCount?: number;
|
|
573
572
|
}
|
|
574
573
|
/** @oneof */
|
|
575
|
-
|
|
574
|
+
interface PoolStatusUpdateJobFinishedContextOneOf {
|
|
576
575
|
/** The id of the pool definition that is being updated */
|
|
577
576
|
poolDefinitionAndProgramDefinition?: PoolDefinitionAndProgramDefinition;
|
|
578
577
|
/** Update the status of all pools in the program */
|
|
579
578
|
programInfo?: ProgramInfo;
|
|
580
579
|
}
|
|
581
|
-
|
|
580
|
+
interface PoolDefinitionAndProgramDefinition {
|
|
582
581
|
/**
|
|
583
582
|
* The id of the pool definition that is being updated
|
|
584
583
|
* @format GUID
|
|
@@ -591,7 +590,7 @@ export interface PoolDefinitionAndProgramDefinition {
|
|
|
591
590
|
*/
|
|
592
591
|
programDefinitionId?: string | null;
|
|
593
592
|
}
|
|
594
|
-
|
|
593
|
+
interface ProgramInfo {
|
|
595
594
|
/**
|
|
596
595
|
* The key of the program that is being updated
|
|
597
596
|
* @format GUID
|
|
@@ -600,47 +599,47 @@ export interface ProgramInfo {
|
|
|
600
599
|
/** Additional data that was provided when the job was submitted */
|
|
601
600
|
additionalData?: Record<string, any> | null;
|
|
602
601
|
}
|
|
603
|
-
|
|
602
|
+
interface CreatePoolRequest {
|
|
604
603
|
/** Pool to be created. */
|
|
605
604
|
pool?: Pool;
|
|
606
605
|
}
|
|
607
|
-
|
|
606
|
+
interface CreatePoolResponse {
|
|
608
607
|
/** Created pool. */
|
|
609
608
|
pool?: Pool;
|
|
610
609
|
}
|
|
611
|
-
|
|
610
|
+
interface GetPoolRequest {
|
|
612
611
|
/**
|
|
613
612
|
* ID of the pool to retrieve.
|
|
614
613
|
* @format GUID
|
|
615
614
|
*/
|
|
616
615
|
poolId: string;
|
|
617
616
|
}
|
|
618
|
-
|
|
617
|
+
interface GetPoolResponse {
|
|
619
618
|
/** Retrieved pool. */
|
|
620
619
|
pool?: Pool;
|
|
621
620
|
}
|
|
622
|
-
|
|
621
|
+
interface UpdatePoolRequest {
|
|
623
622
|
/** Pool to update. */
|
|
624
623
|
pool: Pool;
|
|
625
624
|
}
|
|
626
|
-
|
|
625
|
+
interface UpdatePoolResponse {
|
|
627
626
|
/** Updated pool. */
|
|
628
627
|
pool?: Pool;
|
|
629
628
|
}
|
|
630
|
-
|
|
629
|
+
interface DeletePoolRequest {
|
|
631
630
|
/**
|
|
632
631
|
* ID of the pool to delete.
|
|
633
632
|
* @format GUID
|
|
634
633
|
*/
|
|
635
634
|
poolId?: string;
|
|
636
635
|
}
|
|
637
|
-
|
|
636
|
+
interface DeletePoolResponse {
|
|
638
637
|
}
|
|
639
|
-
|
|
638
|
+
interface QueryPoolsRequest {
|
|
640
639
|
/** Filter, sort, and paging to apply to the query. */
|
|
641
640
|
query: CursorQuery;
|
|
642
641
|
}
|
|
643
|
-
|
|
642
|
+
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
644
643
|
/** 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`. */
|
|
645
644
|
cursorPaging?: CursorPaging;
|
|
646
645
|
/**
|
|
@@ -656,11 +655,11 @@ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
|
656
655
|
sort?: Sorting[];
|
|
657
656
|
}
|
|
658
657
|
/** @oneof */
|
|
659
|
-
|
|
658
|
+
interface CursorQueryPagingMethodOneOf {
|
|
660
659
|
/** 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`. */
|
|
661
660
|
cursorPaging?: CursorPaging;
|
|
662
661
|
}
|
|
663
|
-
|
|
662
|
+
interface Sorting {
|
|
664
663
|
/**
|
|
665
664
|
* Field to sort by.
|
|
666
665
|
* @maxLength 512
|
|
@@ -673,13 +672,13 @@ export interface Sorting {
|
|
|
673
672
|
*/
|
|
674
673
|
order?: SortOrder;
|
|
675
674
|
}
|
|
676
|
-
|
|
675
|
+
declare enum SortOrder {
|
|
677
676
|
/** Ascending sort order. */
|
|
678
677
|
ASC = "ASC",
|
|
679
678
|
/** Descending sort order. */
|
|
680
679
|
DESC = "DESC"
|
|
681
680
|
}
|
|
682
|
-
|
|
681
|
+
interface CursorPaging {
|
|
683
682
|
/**
|
|
684
683
|
* Maximum number of items to return.
|
|
685
684
|
* @max 100
|
|
@@ -694,13 +693,13 @@ export interface CursorPaging {
|
|
|
694
693
|
*/
|
|
695
694
|
cursor?: string | null;
|
|
696
695
|
}
|
|
697
|
-
|
|
696
|
+
interface QueryPoolsResponse {
|
|
698
697
|
/** List of retrieved pools. */
|
|
699
698
|
pools?: Pool[];
|
|
700
699
|
/** Metadata for the paginated results. */
|
|
701
700
|
metadata?: CursorPagingMetadata;
|
|
702
701
|
}
|
|
703
|
-
|
|
702
|
+
interface CursorPagingMetadata {
|
|
704
703
|
/** Number of items returned in the response. */
|
|
705
704
|
count?: number | null;
|
|
706
705
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
@@ -713,7 +712,7 @@ export interface CursorPagingMetadata {
|
|
|
713
712
|
*/
|
|
714
713
|
hasNext?: boolean | null;
|
|
715
714
|
}
|
|
716
|
-
|
|
715
|
+
interface Cursors {
|
|
717
716
|
/**
|
|
718
717
|
* Cursor string pointing to the next page in the list of results.
|
|
719
718
|
* @maxLength 16000
|
|
@@ -725,7 +724,7 @@ export interface Cursors {
|
|
|
725
724
|
*/
|
|
726
725
|
prev?: string | null;
|
|
727
726
|
}
|
|
728
|
-
|
|
727
|
+
interface RedeemBenefitRequest {
|
|
729
728
|
/**
|
|
730
729
|
* ID of the pool that contains the benefit to redeem.
|
|
731
730
|
* @format GUID
|
|
@@ -766,14 +765,14 @@ export interface RedeemBenefitRequest {
|
|
|
766
765
|
*/
|
|
767
766
|
namespace: string;
|
|
768
767
|
}
|
|
769
|
-
|
|
768
|
+
interface RedeemBenefitResponse {
|
|
770
769
|
/**
|
|
771
770
|
* ID of the transaction recording the associated change in balance.
|
|
772
771
|
* @format GUID
|
|
773
772
|
*/
|
|
774
773
|
transactionId?: string;
|
|
775
774
|
}
|
|
776
|
-
|
|
775
|
+
interface NotEnoughBalance {
|
|
777
776
|
/**
|
|
778
777
|
* Pool ID.
|
|
779
778
|
* @format GUID
|
|
@@ -792,7 +791,7 @@ export interface NotEnoughBalance {
|
|
|
792
791
|
*/
|
|
793
792
|
requestedBalance?: string;
|
|
794
793
|
}
|
|
795
|
-
|
|
794
|
+
interface PolicyExpressionEvaluatedToFalse {
|
|
796
795
|
/**
|
|
797
796
|
* Pool ID.
|
|
798
797
|
* @format GUID
|
|
@@ -806,7 +805,7 @@ export interface PolicyExpressionEvaluatedToFalse {
|
|
|
806
805
|
*/
|
|
807
806
|
failureDetails?: FailureDetails[];
|
|
808
807
|
}
|
|
809
|
-
|
|
808
|
+
interface FailureDetails {
|
|
810
809
|
/**
|
|
811
810
|
* Failure code
|
|
812
811
|
* @minLength 1
|
|
@@ -831,7 +830,7 @@ export interface FailureDetails {
|
|
|
831
830
|
/** Information provided by the policy */
|
|
832
831
|
errorData?: Record<string, any> | null;
|
|
833
832
|
}
|
|
834
|
-
|
|
833
|
+
interface PoolNotActive {
|
|
835
834
|
/**
|
|
836
835
|
* Pool ID.
|
|
837
836
|
* @format GUID
|
|
@@ -840,14 +839,14 @@ export interface PoolNotActive {
|
|
|
840
839
|
/** Pool status. */
|
|
841
840
|
poolStatus?: PoolStatus;
|
|
842
841
|
}
|
|
843
|
-
|
|
842
|
+
interface PoolNotFound {
|
|
844
843
|
/**
|
|
845
844
|
* Pool ID.
|
|
846
845
|
* @format GUID
|
|
847
846
|
*/
|
|
848
847
|
poolId?: string;
|
|
849
848
|
}
|
|
850
|
-
|
|
849
|
+
interface BenefitAlreadyRedeemed {
|
|
851
850
|
/**
|
|
852
851
|
* Pool ID
|
|
853
852
|
* @format GUID
|
|
@@ -859,7 +858,7 @@ export interface BenefitAlreadyRedeemed {
|
|
|
859
858
|
*/
|
|
860
859
|
idempotencyKey?: string;
|
|
861
860
|
}
|
|
862
|
-
|
|
861
|
+
interface BenefitNotFound {
|
|
863
862
|
/**
|
|
864
863
|
* Pool ID.
|
|
865
864
|
* @format GUID
|
|
@@ -871,7 +870,7 @@ export interface BenefitNotFound {
|
|
|
871
870
|
*/
|
|
872
871
|
benefitKey?: string | null;
|
|
873
872
|
}
|
|
874
|
-
|
|
873
|
+
interface ReserveBenefitRequest {
|
|
875
874
|
/**
|
|
876
875
|
* Id of the pool that is being redeemed from
|
|
877
876
|
* @format GUID
|
|
@@ -921,42 +920,42 @@ export interface ReserveBenefitRequest {
|
|
|
921
920
|
*/
|
|
922
921
|
namespace?: string;
|
|
923
922
|
}
|
|
924
|
-
|
|
923
|
+
interface ReserveBenefitResponse {
|
|
925
924
|
/**
|
|
926
925
|
* Id of the transaction that was created as a result of this request
|
|
927
926
|
* @format GUID
|
|
928
927
|
*/
|
|
929
928
|
transactionId?: string;
|
|
930
929
|
}
|
|
931
|
-
|
|
930
|
+
interface CancelBenefitReservationRequest {
|
|
932
931
|
/**
|
|
933
932
|
* Id of the transaction that was created as a result of this request
|
|
934
933
|
* @format GUID
|
|
935
934
|
*/
|
|
936
935
|
transactionId?: string;
|
|
937
936
|
}
|
|
938
|
-
|
|
937
|
+
interface CancelBenefitReservationResponse {
|
|
939
938
|
/**
|
|
940
939
|
* Id of the transaction that was created as a result of this request
|
|
941
940
|
* @format GUID
|
|
942
941
|
*/
|
|
943
942
|
transactionId?: string;
|
|
944
943
|
}
|
|
945
|
-
|
|
944
|
+
interface ReleaseBenefitReservationRequest {
|
|
946
945
|
/**
|
|
947
946
|
* Id of the transaction that was created as a result of this request
|
|
948
947
|
* @format GUID
|
|
949
948
|
*/
|
|
950
949
|
transactionId?: string;
|
|
951
950
|
}
|
|
952
|
-
|
|
951
|
+
interface ReleaseBenefitReservationResponse {
|
|
953
952
|
/**
|
|
954
953
|
* Id of the transaction that was created as a result of this request
|
|
955
954
|
* @format GUID
|
|
956
955
|
*/
|
|
957
956
|
transactionId?: string;
|
|
958
957
|
}
|
|
959
|
-
|
|
958
|
+
interface CheckBenefitEligibilityRequest {
|
|
960
959
|
/**
|
|
961
960
|
* ID of the pool that the benefit to check belongs to.
|
|
962
961
|
* @format GUID
|
|
@@ -993,11 +992,11 @@ export interface CheckBenefitEligibilityRequest {
|
|
|
993
992
|
*/
|
|
994
993
|
namespace: string;
|
|
995
994
|
}
|
|
996
|
-
|
|
995
|
+
interface CheckBenefitEligibilityResponse {
|
|
997
996
|
/** Result of the eligibility check. */
|
|
998
997
|
result?: EligibilityCheckResult;
|
|
999
998
|
}
|
|
1000
|
-
|
|
999
|
+
interface EligibilityCheckResult extends EligibilityCheckResultResultOneOf {
|
|
1001
1000
|
/** Returned when item is eligible to be redeemed. */
|
|
1002
1001
|
eligibleOptions?: Eligible;
|
|
1003
1002
|
/** Returned when the pool's associated balance is lower than the cost of redeeming the items. */
|
|
@@ -1012,7 +1011,7 @@ export interface EligibilityCheckResult extends EligibilityCheckResultResultOneO
|
|
|
1012
1011
|
type?: EligibilityCheckResultType;
|
|
1013
1012
|
}
|
|
1014
1013
|
/** @oneof */
|
|
1015
|
-
|
|
1014
|
+
interface EligibilityCheckResultResultOneOf {
|
|
1016
1015
|
/** Returned when item is eligible to be redeemed. */
|
|
1017
1016
|
eligibleOptions?: Eligible;
|
|
1018
1017
|
/** Returned when the pool's associated balance is lower than the cost of redeeming the items. */
|
|
@@ -1024,7 +1023,7 @@ export interface EligibilityCheckResultResultOneOf {
|
|
|
1024
1023
|
/** Returned when invalid pool details are provided. */
|
|
1025
1024
|
poolNotFoundOptions?: PoolNotFound;
|
|
1026
1025
|
}
|
|
1027
|
-
|
|
1026
|
+
interface EligibleBenefit {
|
|
1028
1027
|
/**
|
|
1029
1028
|
* Pool ID.
|
|
1030
1029
|
* @format GUID
|
|
@@ -1044,7 +1043,7 @@ export interface EligibleBenefit {
|
|
|
1044
1043
|
*/
|
|
1045
1044
|
price?: string | null;
|
|
1046
1045
|
}
|
|
1047
|
-
|
|
1046
|
+
declare enum EligibilityCheckResultType {
|
|
1048
1047
|
/** Unknown eligibility. */
|
|
1049
1048
|
UNKNOWN = "UNKNOWN",
|
|
1050
1049
|
/** Item is eligible to be redeemed. */
|
|
@@ -1058,14 +1057,14 @@ export declare enum EligibilityCheckResultType {
|
|
|
1058
1057
|
/** Invalid pool details provided. */
|
|
1059
1058
|
POOL_NOT_FOUND = "POOL_NOT_FOUND"
|
|
1060
1059
|
}
|
|
1061
|
-
|
|
1060
|
+
interface Eligible {
|
|
1062
1061
|
/**
|
|
1063
1062
|
* Benefits that are eligible to be redeemed.
|
|
1064
1063
|
* @maxSize 100
|
|
1065
1064
|
*/
|
|
1066
1065
|
eligibleBenefits?: EligibleBenefit[];
|
|
1067
1066
|
}
|
|
1068
|
-
|
|
1067
|
+
interface BulkCheckBenefitEligibilityRequest {
|
|
1069
1068
|
/**
|
|
1070
1069
|
* List of benefits to check.
|
|
1071
1070
|
* @minSize 1
|
|
@@ -1081,7 +1080,7 @@ export interface BulkCheckBenefitEligibilityRequest {
|
|
|
1081
1080
|
/** Pool beneficiary. */
|
|
1082
1081
|
beneficiary?: CommonIdentificationData;
|
|
1083
1082
|
}
|
|
1084
|
-
|
|
1083
|
+
interface BenefitSelector {
|
|
1085
1084
|
/**
|
|
1086
1085
|
* ID of the pool that the benefit to check belongs to.
|
|
1087
1086
|
* @format GUID
|
|
@@ -1110,7 +1109,7 @@ export interface BenefitSelector {
|
|
|
1110
1109
|
/** Additional information. */
|
|
1111
1110
|
additionalData?: Record<string, any> | null;
|
|
1112
1111
|
}
|
|
1113
|
-
|
|
1112
|
+
interface BulkCheckBenefitEligibilityResponse {
|
|
1114
1113
|
/**
|
|
1115
1114
|
* List of results checking each benefit.
|
|
1116
1115
|
* @minSize 1
|
|
@@ -1118,13 +1117,13 @@ export interface BulkCheckBenefitEligibilityResponse {
|
|
|
1118
1117
|
*/
|
|
1119
1118
|
results?: BulkEligibilityCheckResult[];
|
|
1120
1119
|
}
|
|
1121
|
-
|
|
1120
|
+
interface BulkEligibilityCheckResult {
|
|
1122
1121
|
/** Benefit information specified in API call. */
|
|
1123
1122
|
benefitSelector?: BenefitSelector;
|
|
1124
1123
|
/** Result of the eligibility check. */
|
|
1125
1124
|
result?: EligibilityCheckResult;
|
|
1126
1125
|
}
|
|
1127
|
-
|
|
1126
|
+
interface GetEligibleBenefitsRequest {
|
|
1128
1127
|
/** Item reference. */
|
|
1129
1128
|
itemReference: ItemReference;
|
|
1130
1129
|
/**
|
|
@@ -1149,21 +1148,21 @@ export interface GetEligibleBenefitsRequest {
|
|
|
1149
1148
|
*/
|
|
1150
1149
|
namespace: string;
|
|
1151
1150
|
}
|
|
1152
|
-
|
|
1151
|
+
interface GetEligibleBenefitsResponse {
|
|
1153
1152
|
/** Retrieved benefits that can be redeemed. */
|
|
1154
1153
|
eligibleBenefits?: EligibleBenefit[];
|
|
1155
1154
|
}
|
|
1156
|
-
|
|
1155
|
+
interface ListPoolsRequest {
|
|
1157
1156
|
/** The filter */
|
|
1158
1157
|
filter?: Filter;
|
|
1159
1158
|
/** Cursor paging */
|
|
1160
1159
|
cursorPaging?: CursorPaging;
|
|
1161
1160
|
}
|
|
1162
|
-
|
|
1161
|
+
declare enum ListPoolsRequestType {
|
|
1163
1162
|
UNKNOWN_FILTER = "UNKNOWN_FILTER",
|
|
1164
1163
|
BY_ITEM_REFERENCE = "BY_ITEM_REFERENCE"
|
|
1165
1164
|
}
|
|
1166
|
-
|
|
1165
|
+
interface ByItemReference {
|
|
1167
1166
|
/**
|
|
1168
1167
|
* A list of filters
|
|
1169
1168
|
* @maxSize 100
|
|
@@ -1177,11 +1176,11 @@ export interface ByItemReference {
|
|
|
1177
1176
|
*/
|
|
1178
1177
|
poolStatuses?: PoolStatus[];
|
|
1179
1178
|
}
|
|
1180
|
-
|
|
1179
|
+
interface ByItemReferenceFilter {
|
|
1181
1180
|
/** Reference of the item */
|
|
1182
1181
|
itemReference?: ItemReference;
|
|
1183
1182
|
}
|
|
1184
|
-
|
|
1183
|
+
interface Filter extends FilterFilterOneOf {
|
|
1185
1184
|
/** A list of filters by reference */
|
|
1186
1185
|
byItemReferenceOptions?: ByItemReference;
|
|
1187
1186
|
/** Type of the filter */
|
|
@@ -1197,11 +1196,11 @@ export interface Filter extends FilterFilterOneOf {
|
|
|
1197
1196
|
namespace?: string;
|
|
1198
1197
|
}
|
|
1199
1198
|
/** @oneof */
|
|
1200
|
-
|
|
1199
|
+
interface FilterFilterOneOf {
|
|
1201
1200
|
/** A list of filters by reference */
|
|
1202
1201
|
byItemReferenceOptions?: ByItemReference;
|
|
1203
1202
|
}
|
|
1204
|
-
|
|
1203
|
+
interface ListPoolsResponse {
|
|
1205
1204
|
/**
|
|
1206
1205
|
* The retrieved pools
|
|
1207
1206
|
* @maxSize 100
|
|
@@ -1210,7 +1209,7 @@ export interface ListPoolsResponse {
|
|
|
1210
1209
|
/** Paging information */
|
|
1211
1210
|
metadata?: CursorPagingMetadata;
|
|
1212
1211
|
}
|
|
1213
|
-
|
|
1212
|
+
interface PoolWithItems {
|
|
1214
1213
|
/** The pool */
|
|
1215
1214
|
pool?: Pool;
|
|
1216
1215
|
/**
|
|
@@ -1219,7 +1218,7 @@ export interface PoolWithItems {
|
|
|
1219
1218
|
*/
|
|
1220
1219
|
itemReference?: ItemReference[];
|
|
1221
1220
|
}
|
|
1222
|
-
|
|
1221
|
+
interface BulkUpdatePoolsRequest {
|
|
1223
1222
|
/**
|
|
1224
1223
|
* Pools to update.
|
|
1225
1224
|
* @minSize 1
|
|
@@ -1233,13 +1232,13 @@ export interface BulkUpdatePoolsRequest {
|
|
|
1233
1232
|
*/
|
|
1234
1233
|
returnEntity?: boolean;
|
|
1235
1234
|
}
|
|
1236
|
-
|
|
1235
|
+
interface MaskedPool {
|
|
1237
1236
|
/** Pool to update. */
|
|
1238
1237
|
pool?: Pool;
|
|
1239
1238
|
/** Explicit list of fields to update. */
|
|
1240
1239
|
fieldMask?: string[];
|
|
1241
1240
|
}
|
|
1242
|
-
|
|
1241
|
+
interface BulkUpdatePoolsResponse {
|
|
1243
1242
|
/**
|
|
1244
1243
|
* List of updated pools and associated metadata.
|
|
1245
1244
|
* @minSize 1
|
|
@@ -1249,13 +1248,13 @@ export interface BulkUpdatePoolsResponse {
|
|
|
1249
1248
|
/** Bulk action metadata. */
|
|
1250
1249
|
bulkActionMetadata?: BulkActionMetadata;
|
|
1251
1250
|
}
|
|
1252
|
-
|
|
1251
|
+
interface BulkPoolResult {
|
|
1253
1252
|
/** Pool metadata. */
|
|
1254
1253
|
poolMetadata?: ItemMetadata;
|
|
1255
1254
|
/** Pool data. */
|
|
1256
1255
|
pool?: Pool;
|
|
1257
1256
|
}
|
|
1258
|
-
|
|
1257
|
+
interface ItemMetadata {
|
|
1259
1258
|
/**
|
|
1260
1259
|
* Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
|
|
1261
1260
|
* @format GUID
|
|
@@ -1268,7 +1267,7 @@ export interface ItemMetadata {
|
|
|
1268
1267
|
/** Details about the error in case of failure. */
|
|
1269
1268
|
error?: ApplicationError;
|
|
1270
1269
|
}
|
|
1271
|
-
|
|
1270
|
+
interface ApplicationError {
|
|
1272
1271
|
/** Error code. */
|
|
1273
1272
|
code?: string;
|
|
1274
1273
|
/** Description of the error. */
|
|
@@ -1276,7 +1275,7 @@ export interface ApplicationError {
|
|
|
1276
1275
|
/** Data related to the error. */
|
|
1277
1276
|
data?: Record<string, any> | null;
|
|
1278
1277
|
}
|
|
1279
|
-
|
|
1278
|
+
interface BulkActionMetadata {
|
|
1280
1279
|
/** Number of items that were successfully processed. */
|
|
1281
1280
|
totalSuccesses?: number;
|
|
1282
1281
|
/** Number of items that couldn't be processed. */
|
|
@@ -1284,7 +1283,7 @@ export interface BulkActionMetadata {
|
|
|
1284
1283
|
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
1285
1284
|
undetailedFailures?: number;
|
|
1286
1285
|
}
|
|
1287
|
-
|
|
1286
|
+
interface ProvisionPoolsForProgramRequest {
|
|
1288
1287
|
/** Reference of the template that is used to provision the pools */
|
|
1289
1288
|
poolDefinitionLookupId?: PoolDefinitionLookupId;
|
|
1290
1289
|
/**
|
|
@@ -1293,7 +1292,7 @@ export interface ProvisionPoolsForProgramRequest {
|
|
|
1293
1292
|
*/
|
|
1294
1293
|
programId?: string;
|
|
1295
1294
|
}
|
|
1296
|
-
|
|
1295
|
+
interface PoolDefinitionLookupId extends PoolDefinitionLookupIdIdOneOf {
|
|
1297
1296
|
/**
|
|
1298
1297
|
* Pool definition ID.
|
|
1299
1298
|
* @format GUID
|
|
@@ -1306,7 +1305,7 @@ export interface PoolDefinitionLookupId extends PoolDefinitionLookupIdIdOneOf {
|
|
|
1306
1305
|
programDefinitionId?: string;
|
|
1307
1306
|
}
|
|
1308
1307
|
/** @oneof */
|
|
1309
|
-
|
|
1308
|
+
interface PoolDefinitionLookupIdIdOneOf {
|
|
1310
1309
|
/**
|
|
1311
1310
|
* Pool definition ID.
|
|
1312
1311
|
* @format GUID
|
|
@@ -1318,7 +1317,7 @@ export interface PoolDefinitionLookupIdIdOneOf {
|
|
|
1318
1317
|
*/
|
|
1319
1318
|
programDefinitionId?: string;
|
|
1320
1319
|
}
|
|
1321
|
-
|
|
1320
|
+
interface ProvisionPoolsForProgramResponse extends ProvisionPoolsForProgramResponseResultOneOf {
|
|
1322
1321
|
/** Sync result */
|
|
1323
1322
|
syncOptions?: SyncResult;
|
|
1324
1323
|
/** Async result */
|
|
@@ -1332,13 +1331,13 @@ export interface ProvisionPoolsForProgramResponse extends ProvisionPoolsForProgr
|
|
|
1332
1331
|
type?: ProvisionPoolsForProgramResponseType;
|
|
1333
1332
|
}
|
|
1334
1333
|
/** @oneof */
|
|
1335
|
-
|
|
1334
|
+
interface ProvisionPoolsForProgramResponseResultOneOf {
|
|
1336
1335
|
/** Sync result */
|
|
1337
1336
|
syncOptions?: SyncResult;
|
|
1338
1337
|
/** Async result */
|
|
1339
1338
|
asyncOptions?: AsyncResult;
|
|
1340
1339
|
}
|
|
1341
|
-
|
|
1340
|
+
declare enum ProvisionPoolsForProgramResponseType {
|
|
1342
1341
|
/** Unknown result type */
|
|
1343
1342
|
UNKNOWN = "UNKNOWN",
|
|
1344
1343
|
/** Sync result */
|
|
@@ -1346,36 +1345,36 @@ export declare enum ProvisionPoolsForProgramResponseType {
|
|
|
1346
1345
|
/** Async result */
|
|
1347
1346
|
ASYNC = "ASYNC"
|
|
1348
1347
|
}
|
|
1349
|
-
|
|
1348
|
+
interface SyncResult {
|
|
1350
1349
|
/** Indicates if the operation was successful */
|
|
1351
1350
|
success?: boolean;
|
|
1352
1351
|
}
|
|
1353
|
-
|
|
1352
|
+
interface AsyncResult {
|
|
1354
1353
|
/**
|
|
1355
1354
|
* 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)).
|
|
1356
1355
|
* @format GUID
|
|
1357
1356
|
*/
|
|
1358
1357
|
jobId?: string;
|
|
1359
1358
|
}
|
|
1360
|
-
|
|
1359
|
+
interface InvalidPoolDefinitionReference {
|
|
1361
1360
|
/** Reference of the template that didn't find any pool definitions */
|
|
1362
1361
|
poolDefinitionLookupId?: PoolDefinitionLookupId;
|
|
1363
1362
|
}
|
|
1364
|
-
|
|
1363
|
+
interface RenewPoolsForProgramRequest {
|
|
1365
1364
|
/**
|
|
1366
1365
|
* Package of pools to grant. Package id should be the same that was used to provision programs.
|
|
1367
1366
|
* @format GUID
|
|
1368
1367
|
*/
|
|
1369
1368
|
programId?: string;
|
|
1370
1369
|
}
|
|
1371
|
-
|
|
1370
|
+
interface RenewPoolsForProgramResponse {
|
|
1372
1371
|
/**
|
|
1373
1372
|
* Job id of the renewal job
|
|
1374
1373
|
* @format GUID
|
|
1375
1374
|
*/
|
|
1376
1375
|
jobId?: string;
|
|
1377
1376
|
}
|
|
1378
|
-
|
|
1377
|
+
interface UpdatePoolStatusRequest extends UpdatePoolStatusRequestPoolSelectorOneOf {
|
|
1379
1378
|
/** Pool selector by pool definition id and program definition id */
|
|
1380
1379
|
byPoolDefinitionIdAndProgramDefinitionIdOptions?: ByPoolDefinitionIdAndProgramDefinitionIdOptions;
|
|
1381
1380
|
/** Pool selector by program id */
|
|
@@ -1386,18 +1385,18 @@ export interface UpdatePoolStatusRequest extends UpdatePoolStatusRequestPoolSele
|
|
|
1386
1385
|
poolSelectorType?: PoolSelectorType;
|
|
1387
1386
|
}
|
|
1388
1387
|
/** @oneof */
|
|
1389
|
-
|
|
1388
|
+
interface UpdatePoolStatusRequestPoolSelectorOneOf {
|
|
1390
1389
|
/** Pool selector by pool definition id and program definition id */
|
|
1391
1390
|
byPoolDefinitionIdAndProgramDefinitionIdOptions?: ByPoolDefinitionIdAndProgramDefinitionIdOptions;
|
|
1392
1391
|
/** Pool selector by program id */
|
|
1393
1392
|
byProgramIdOptions?: ByProgramIdOptions;
|
|
1394
1393
|
}
|
|
1395
|
-
|
|
1394
|
+
declare enum PoolSelectorType {
|
|
1396
1395
|
UNKNOWN_SELECTOR = "UNKNOWN_SELECTOR",
|
|
1397
1396
|
BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID = "BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID",
|
|
1398
1397
|
BY_PROGRAM_ID = "BY_PROGRAM_ID"
|
|
1399
1398
|
}
|
|
1400
|
-
|
|
1399
|
+
interface ByPoolDefinitionIdAndProgramDefinitionIdOptions {
|
|
1401
1400
|
/**
|
|
1402
1401
|
* Pool definition id
|
|
1403
1402
|
* @format GUID
|
|
@@ -1409,7 +1408,7 @@ export interface ByPoolDefinitionIdAndProgramDefinitionIdOptions {
|
|
|
1409
1408
|
*/
|
|
1410
1409
|
programDefinitionId?: string | null;
|
|
1411
1410
|
}
|
|
1412
|
-
|
|
1411
|
+
interface ByProgramIdOptions {
|
|
1413
1412
|
/**
|
|
1414
1413
|
* Program id
|
|
1415
1414
|
* @format GUID
|
|
@@ -1418,25 +1417,25 @@ export interface ByProgramIdOptions {
|
|
|
1418
1417
|
/** Additional data that gets added to the event once the async job completes */
|
|
1419
1418
|
additionalData?: Record<string, any> | null;
|
|
1420
1419
|
}
|
|
1421
|
-
|
|
1420
|
+
interface UpdatePoolStatusResponse {
|
|
1422
1421
|
/**
|
|
1423
1422
|
* 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)).
|
|
1424
1423
|
* @format GUID
|
|
1425
1424
|
*/
|
|
1426
1425
|
jobId?: string;
|
|
1427
1426
|
}
|
|
1428
|
-
|
|
1427
|
+
interface CountNumberOfPoolsInProvisioningStatusRequest {
|
|
1429
1428
|
/**
|
|
1430
1429
|
* Program id
|
|
1431
1430
|
* @format GUID
|
|
1432
1431
|
*/
|
|
1433
1432
|
programId?: string;
|
|
1434
1433
|
}
|
|
1435
|
-
|
|
1434
|
+
interface CountNumberOfPoolsInProvisioningStatusResponse {
|
|
1436
1435
|
/** Number of pools in provisioning status */
|
|
1437
1436
|
count?: number;
|
|
1438
1437
|
}
|
|
1439
|
-
|
|
1438
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
1440
1439
|
createdEvent?: EntityCreatedEvent;
|
|
1441
1440
|
updatedEvent?: EntityUpdatedEvent;
|
|
1442
1441
|
deletedEvent?: EntityDeletedEvent;
|
|
@@ -1479,19 +1478,19 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
1479
1478
|
entityEventSequence?: string | null;
|
|
1480
1479
|
}
|
|
1481
1480
|
/** @oneof */
|
|
1482
|
-
|
|
1481
|
+
interface DomainEventBodyOneOf {
|
|
1483
1482
|
createdEvent?: EntityCreatedEvent;
|
|
1484
1483
|
updatedEvent?: EntityUpdatedEvent;
|
|
1485
1484
|
deletedEvent?: EntityDeletedEvent;
|
|
1486
1485
|
actionEvent?: ActionEvent;
|
|
1487
1486
|
}
|
|
1488
|
-
|
|
1487
|
+
interface EntityCreatedEvent {
|
|
1489
1488
|
entity?: string;
|
|
1490
1489
|
}
|
|
1491
|
-
|
|
1490
|
+
interface RestoreInfo {
|
|
1492
1491
|
deletedDate?: Date | null;
|
|
1493
1492
|
}
|
|
1494
|
-
|
|
1493
|
+
interface EntityUpdatedEvent {
|
|
1495
1494
|
/**
|
|
1496
1495
|
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
1497
1496
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
@@ -1499,14 +1498,14 @@ export interface EntityUpdatedEvent {
|
|
|
1499
1498
|
*/
|
|
1500
1499
|
currentEntity?: string;
|
|
1501
1500
|
}
|
|
1502
|
-
|
|
1501
|
+
interface EntityDeletedEvent {
|
|
1503
1502
|
/** Entity that was deleted */
|
|
1504
1503
|
deletedEntity?: string | null;
|
|
1505
1504
|
}
|
|
1506
|
-
|
|
1505
|
+
interface ActionEvent {
|
|
1507
1506
|
body?: string;
|
|
1508
1507
|
}
|
|
1509
|
-
|
|
1508
|
+
interface MessageEnvelope {
|
|
1510
1509
|
/**
|
|
1511
1510
|
* App instance ID.
|
|
1512
1511
|
* @format GUID
|
|
@@ -1522,7 +1521,7 @@ export interface MessageEnvelope {
|
|
|
1522
1521
|
/** Stringify payload. */
|
|
1523
1522
|
data?: string;
|
|
1524
1523
|
}
|
|
1525
|
-
|
|
1524
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1526
1525
|
/**
|
|
1527
1526
|
* ID of a site visitor that has not logged in to the site.
|
|
1528
1527
|
* @format GUID
|
|
@@ -1547,7 +1546,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
1547
1546
|
identityType?: WebhookIdentityType;
|
|
1548
1547
|
}
|
|
1549
1548
|
/** @oneof */
|
|
1550
|
-
|
|
1549
|
+
interface IdentificationDataIdOneOf {
|
|
1551
1550
|
/**
|
|
1552
1551
|
* ID of a site visitor that has not logged in to the site.
|
|
1553
1552
|
* @format GUID
|
|
@@ -1569,55 +1568,14 @@ export interface IdentificationDataIdOneOf {
|
|
|
1569
1568
|
*/
|
|
1570
1569
|
appId?: string;
|
|
1571
1570
|
}
|
|
1572
|
-
|
|
1571
|
+
declare enum WebhookIdentityType {
|
|
1573
1572
|
UNKNOWN = "UNKNOWN",
|
|
1574
1573
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1575
1574
|
MEMBER = "MEMBER",
|
|
1576
1575
|
WIX_USER = "WIX_USER",
|
|
1577
1576
|
APP = "APP"
|
|
1578
1577
|
}
|
|
1579
|
-
|
|
1580
|
-
/**
|
|
1581
|
-
* Retrieves a pool.
|
|
1582
|
-
* @param poolId - ID of the pool to retrieve.
|
|
1583
|
-
* @public
|
|
1584
|
-
* @documentationMaturity preview
|
|
1585
|
-
* @requiredField poolId
|
|
1586
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_READ
|
|
1587
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1588
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1589
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.READ
|
|
1590
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.READ
|
|
1591
|
-
* @permissionScope Manage Events
|
|
1592
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1593
|
-
* @applicableIdentity APP
|
|
1594
|
-
* @returns Retrieved pool.
|
|
1595
|
-
* @fqn wix.benefit_programs.v1.pool.PoolService.GetPool
|
|
1596
|
-
*/
|
|
1597
|
-
export declare function getPool(poolId: string): Promise<NonNullablePaths<Pool, PoolNonNullablePaths>>;
|
|
1598
|
-
/**
|
|
1599
|
-
* Updates a pool.
|
|
1600
|
-
*
|
|
1601
|
-
* Each time the pool is updated,
|
|
1602
|
-
* `revision` increments by 1.
|
|
1603
|
-
* The current `revision` must be passed when updating the pool.
|
|
1604
|
-
* This ensures you're working with the latest pool
|
|
1605
|
-
* and prevents unintended overwrites.
|
|
1606
|
-
* @param _id - Pool ID.
|
|
1607
|
-
* @public
|
|
1608
|
-
* @documentationMaturity preview
|
|
1609
|
-
* @requiredField _id
|
|
1610
|
-
* @requiredField pool
|
|
1611
|
-
* @requiredField pool.revision
|
|
1612
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_UPDATE
|
|
1613
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1614
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1615
|
-
* @applicableIdentity APP
|
|
1616
|
-
* @returns Updated pool.
|
|
1617
|
-
* @fqn wix.benefit_programs.v1.pool.PoolService.UpdatePool
|
|
1618
|
-
*/
|
|
1619
|
-
export declare function updatePool(_id: string, pool: NonNullablePaths<UpdatePool, `revision`>): Promise<NonNullablePaths<Pool, PoolNonNullablePaths>>;
|
|
1620
|
-
export interface UpdatePool {
|
|
1578
|
+
interface UpdatePool {
|
|
1621
1579
|
/**
|
|
1622
1580
|
* Pool ID.
|
|
1623
1581
|
* @format GUID
|
|
@@ -1719,31 +1677,6 @@ export interface UpdatePool {
|
|
|
1719
1677
|
*/
|
|
1720
1678
|
renewalCount?: number | null;
|
|
1721
1679
|
}
|
|
1722
|
-
/**
|
|
1723
|
-
* Creates a query to retrieve a list of pools.
|
|
1724
|
-
*
|
|
1725
|
-
* The Query Pools method builds a query to retrieve a list of pools and returns a `PoolsQueryBuilder` object.
|
|
1726
|
-
*
|
|
1727
|
-
* The returned object contains the query definition, which is used to run the query using the `find()` method.
|
|
1728
|
-
*
|
|
1729
|
-
* 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.
|
|
1730
|
-
*
|
|
1731
|
-
* Query Pools has a default paging limit of 50, which you can override.
|
|
1732
|
-
*
|
|
1733
|
-
* For a full description of the item object, see the object returned for the `items` property in `PoolsQueryResult`.
|
|
1734
|
-
* @public
|
|
1735
|
-
* @documentationMaturity preview
|
|
1736
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1737
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1738
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.READ
|
|
1739
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.READ
|
|
1740
|
-
* @permissionScope Manage Events
|
|
1741
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1742
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_READ
|
|
1743
|
-
* @applicableIdentity APP
|
|
1744
|
-
* @fqn wix.benefit_programs.v1.pool.PoolService.QueryPools
|
|
1745
|
-
*/
|
|
1746
|
-
export declare function queryPools(): PoolsQueryBuilder;
|
|
1747
1680
|
interface QueryCursorResult {
|
|
1748
1681
|
cursors: Cursors;
|
|
1749
1682
|
hasNext: () => boolean;
|
|
@@ -1751,13 +1684,13 @@ interface QueryCursorResult {
|
|
|
1751
1684
|
length: number;
|
|
1752
1685
|
pageSize: number;
|
|
1753
1686
|
}
|
|
1754
|
-
|
|
1687
|
+
interface PoolsQueryResult extends QueryCursorResult {
|
|
1755
1688
|
items: Pool[];
|
|
1756
1689
|
query: PoolsQueryBuilder;
|
|
1757
1690
|
next: () => Promise<PoolsQueryResult>;
|
|
1758
1691
|
prev: () => Promise<PoolsQueryResult>;
|
|
1759
1692
|
}
|
|
1760
|
-
|
|
1693
|
+
interface PoolsQueryBuilder {
|
|
1761
1694
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1762
1695
|
* @param value - Value to compare against.
|
|
1763
1696
|
* @documentationMaturity preview
|
|
@@ -1821,28 +1754,7 @@ export interface PoolsQueryBuilder {
|
|
|
1821
1754
|
/** @documentationMaturity preview */
|
|
1822
1755
|
find: () => Promise<PoolsQueryResult>;
|
|
1823
1756
|
}
|
|
1824
|
-
|
|
1825
|
-
* Redeems a specified benefit.
|
|
1826
|
-
*
|
|
1827
|
-
* 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.
|
|
1828
|
-
* @param poolId - ID of the pool that contains the benefit to redeem.
|
|
1829
|
-
* @public
|
|
1830
|
-
* @documentationMaturity preview
|
|
1831
|
-
* @requiredField options.benefitKey
|
|
1832
|
-
* @requiredField options.idempotencyKey
|
|
1833
|
-
* @requiredField options.itemReference
|
|
1834
|
-
* @requiredField options.itemReference.externalId
|
|
1835
|
-
* @requiredField options.itemReference.providerAppId
|
|
1836
|
-
* @requiredField options.namespace
|
|
1837
|
-
* @requiredField poolId
|
|
1838
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_REDEEM
|
|
1839
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1840
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1841
|
-
* @applicableIdentity APP
|
|
1842
|
-
* @fqn wix.benefit_programs.v1.pool.PoolService.RedeemBenefit
|
|
1843
|
-
*/
|
|
1844
|
-
export declare function redeemBenefit(poolId: string, options?: NonNullablePaths<RedeemBenefitOptions, `benefitKey` | `idempotencyKey` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`>): Promise<NonNullablePaths<RedeemBenefitResponse, `transactionId`>>;
|
|
1845
|
-
export interface RedeemBenefitOptions {
|
|
1757
|
+
interface RedeemBenefitOptions {
|
|
1846
1758
|
/** Information about the item to redeem. */
|
|
1847
1759
|
itemReference: ItemReference;
|
|
1848
1760
|
/**
|
|
@@ -1878,26 +1790,7 @@ export interface RedeemBenefitOptions {
|
|
|
1878
1790
|
*/
|
|
1879
1791
|
namespace: string;
|
|
1880
1792
|
}
|
|
1881
|
-
|
|
1882
|
-
* Checks if a benefit can currently be redeemed.
|
|
1883
|
-
*
|
|
1884
|
-
* To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.
|
|
1885
|
-
* @param poolId - ID of the pool that the benefit to check belongs to.
|
|
1886
|
-
* @public
|
|
1887
|
-
* @documentationMaturity preview
|
|
1888
|
-
* @requiredField options.itemReference
|
|
1889
|
-
* @requiredField options.itemReference.externalId
|
|
1890
|
-
* @requiredField options.itemReference.providerAppId
|
|
1891
|
-
* @requiredField options.namespace
|
|
1892
|
-
* @requiredField poolId
|
|
1893
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_REDEEM
|
|
1894
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1895
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1896
|
-
* @applicableIdentity APP
|
|
1897
|
-
* @fqn wix.benefit_programs.v1.pool.PoolService.CheckBenefitEligibility
|
|
1898
|
-
*/
|
|
1899
|
-
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`>>;
|
|
1900
|
-
export interface CheckBenefitEligibilityOptions {
|
|
1793
|
+
interface CheckBenefitEligibilityOptions {
|
|
1901
1794
|
/**
|
|
1902
1795
|
* Key of the benefit to check.
|
|
1903
1796
|
* @maxLength 64
|
|
@@ -1929,27 +1822,7 @@ export interface CheckBenefitEligibilityOptions {
|
|
|
1929
1822
|
*/
|
|
1930
1823
|
namespace: string;
|
|
1931
1824
|
}
|
|
1932
|
-
|
|
1933
|
-
* Checks if benefits can currently be redeemed.
|
|
1934
|
-
*
|
|
1935
|
-
* To be redeemed, a benefit's pool must be active and the associated balance must greater be than the cost of the benefit.
|
|
1936
|
-
*
|
|
1937
|
-
* 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.
|
|
1938
|
-
* @public
|
|
1939
|
-
* @documentationMaturity preview
|
|
1940
|
-
* @requiredField options.benefitSelectors.itemReference
|
|
1941
|
-
* @requiredField options.benefitSelectors.itemReference.externalId
|
|
1942
|
-
* @requiredField options.benefitSelectors.itemReference.providerAppId
|
|
1943
|
-
* @requiredField options.benefitSelectors.poolId
|
|
1944
|
-
* @requiredField options.namespace
|
|
1945
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_REDEEM
|
|
1946
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1947
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1948
|
-
* @applicableIdentity APP
|
|
1949
|
-
* @fqn wix.benefit_programs.v1.pool.PoolService.BulkCheckBenefitEligibility
|
|
1950
|
-
*/
|
|
1951
|
-
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.eligibleOptions.eligibleBenefits` | `results.${number}.result.eligibleOptions.eligibleBenefits.${number}.poolId` | `results.${number}.result.eligibleOptions.eligibleBenefits.${number}.benefitKey` | `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`>>;
|
|
1952
|
-
export interface BulkCheckBenefitEligibilityOptions {
|
|
1825
|
+
interface BulkCheckBenefitEligibilityOptions {
|
|
1953
1826
|
/**
|
|
1954
1827
|
* List of benefits to check.
|
|
1955
1828
|
* @minSize 1
|
|
@@ -1965,30 +1838,7 @@ export interface BulkCheckBenefitEligibilityOptions {
|
|
|
1965
1838
|
/** Pool beneficiary. */
|
|
1966
1839
|
beneficiary?: CommonIdentificationData;
|
|
1967
1840
|
}
|
|
1968
|
-
|
|
1969
|
-
* Retrieves benefits that can be redeemed for a specific benefit item.
|
|
1970
|
-
*
|
|
1971
|
-
* 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.
|
|
1972
|
-
* This method checks each pool containing a benefit with this benefit item, and returns the benefits that can be redeemed.
|
|
1973
|
-
* @param itemReference - Item reference.
|
|
1974
|
-
* @public
|
|
1975
|
-
* @documentationMaturity preview
|
|
1976
|
-
* @requiredField itemReference
|
|
1977
|
-
* @requiredField itemReference.externalId
|
|
1978
|
-
* @requiredField itemReference.providerAppId
|
|
1979
|
-
* @requiredField options.namespace
|
|
1980
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_READ
|
|
1981
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1982
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1983
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.READ
|
|
1984
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.READ
|
|
1985
|
-
* @permissionScope Manage Events
|
|
1986
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1987
|
-
* @applicableIdentity APP
|
|
1988
|
-
* @fqn wix.benefit_programs.v1.pool.PoolService.GetEligibleBenefits
|
|
1989
|
-
*/
|
|
1990
|
-
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`>>;
|
|
1991
|
-
export interface GetEligibleBenefitsOptions {
|
|
1841
|
+
interface GetEligibleBenefitsOptions {
|
|
1992
1842
|
/**
|
|
1993
1843
|
* Amount of items to check. This ensures the balance is high enough to redeem this many items.
|
|
1994
1844
|
* @min 1
|
|
@@ -2011,23 +1861,7 @@ export interface GetEligibleBenefitsOptions {
|
|
|
2011
1861
|
*/
|
|
2012
1862
|
namespace: string;
|
|
2013
1863
|
}
|
|
2014
|
-
|
|
2015
|
-
* Updates pools.
|
|
2016
|
-
* @public
|
|
2017
|
-
* @documentationMaturity preview
|
|
2018
|
-
* @requiredField options.pools.pool
|
|
2019
|
-
* @requiredField options.pools.pool._id
|
|
2020
|
-
* @requiredField options.pools.pool.revision
|
|
2021
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_UPDATE
|
|
2022
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
2023
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
2024
|
-
* @applicableIdentity APP
|
|
2025
|
-
* @fqn wix.benefit_programs.v1.pool.PoolService.BulkUpdatePools
|
|
2026
|
-
*/
|
|
2027
|
-
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` | {
|
|
2028
|
-
[P in PoolNonNullablePaths]: `results.${number}.pool.${P}`;
|
|
2029
|
-
}[PoolNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
|
|
2030
|
-
export interface BulkUpdatePoolsOptions {
|
|
1864
|
+
interface BulkUpdatePoolsOptions {
|
|
2031
1865
|
/**
|
|
2032
1866
|
* Pools to update.
|
|
2033
1867
|
* @minSize 1
|
|
@@ -2041,4 +1875,5 @@ export interface BulkUpdatePoolsOptions {
|
|
|
2041
1875
|
*/
|
|
2042
1876
|
returnEntity?: boolean;
|
|
2043
1877
|
}
|
|
2044
|
-
|
|
1878
|
+
|
|
1879
|
+
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 };
|