@wix/auto_sdk_benefit-programs_pools 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/build/cjs/src/benefit-programs-v1-pool-pools.http.d.ts +21 -18
  2. package/build/cjs/src/benefit-programs-v1-pool-pools.http.js +21 -18
  3. package/build/cjs/src/benefit-programs-v1-pool-pools.http.js.map +1 -1
  4. package/build/cjs/src/benefit-programs-v1-pool-pools.public.d.ts +22 -21
  5. package/build/cjs/src/benefit-programs-v1-pool-pools.public.js.map +1 -1
  6. package/build/cjs/src/benefit-programs-v1-pool-pools.types.d.ts +185 -275
  7. package/build/cjs/src/benefit-programs-v1-pool-pools.types.js +21 -29
  8. package/build/cjs/src/benefit-programs-v1-pool-pools.types.js.map +1 -1
  9. package/build/cjs/src/benefit-programs-v1-pool-pools.universal.d.ts +244 -366
  10. package/build/cjs/src/benefit-programs-v1-pool-pools.universal.js +43 -50
  11. package/build/cjs/src/benefit-programs-v1-pool-pools.universal.js.map +1 -1
  12. package/build/es/src/benefit-programs-v1-pool-pools.http.d.ts +21 -18
  13. package/build/es/src/benefit-programs-v1-pool-pools.http.js +21 -18
  14. package/build/es/src/benefit-programs-v1-pool-pools.http.js.map +1 -1
  15. package/build/es/src/benefit-programs-v1-pool-pools.public.d.ts +22 -21
  16. package/build/es/src/benefit-programs-v1-pool-pools.public.js.map +1 -1
  17. package/build/es/src/benefit-programs-v1-pool-pools.types.d.ts +185 -275
  18. package/build/es/src/benefit-programs-v1-pool-pools.types.js +21 -29
  19. package/build/es/src/benefit-programs-v1-pool-pools.types.js.map +1 -1
  20. package/build/es/src/benefit-programs-v1-pool-pools.universal.d.ts +244 -366
  21. package/build/es/src/benefit-programs-v1-pool-pools.universal.js +43 -50
  22. package/build/es/src/benefit-programs-v1-pool-pools.universal.js.map +1 -1
  23. package/build/internal/cjs/src/benefit-programs-v1-pool-pools.http.d.ts +21 -18
  24. package/build/internal/cjs/src/benefit-programs-v1-pool-pools.http.js +21 -18
  25. package/build/internal/cjs/src/benefit-programs-v1-pool-pools.http.js.map +1 -1
  26. package/build/internal/cjs/src/benefit-programs-v1-pool-pools.public.d.ts +22 -21
  27. package/build/internal/cjs/src/benefit-programs-v1-pool-pools.public.js.map +1 -1
  28. package/build/internal/cjs/src/benefit-programs-v1-pool-pools.types.d.ts +185 -275
  29. package/build/internal/cjs/src/benefit-programs-v1-pool-pools.types.js +21 -29
  30. package/build/internal/cjs/src/benefit-programs-v1-pool-pools.types.js.map +1 -1
  31. package/build/internal/cjs/src/benefit-programs-v1-pool-pools.universal.d.ts +244 -366
  32. package/build/internal/cjs/src/benefit-programs-v1-pool-pools.universal.js +43 -50
  33. package/build/internal/cjs/src/benefit-programs-v1-pool-pools.universal.js.map +1 -1
  34. package/build/internal/es/src/benefit-programs-v1-pool-pools.http.d.ts +21 -18
  35. package/build/internal/es/src/benefit-programs-v1-pool-pools.http.js +21 -18
  36. package/build/internal/es/src/benefit-programs-v1-pool-pools.http.js.map +1 -1
  37. package/build/internal/es/src/benefit-programs-v1-pool-pools.public.d.ts +22 -21
  38. package/build/internal/es/src/benefit-programs-v1-pool-pools.public.js.map +1 -1
  39. package/build/internal/es/src/benefit-programs-v1-pool-pools.types.d.ts +185 -275
  40. package/build/internal/es/src/benefit-programs-v1-pool-pools.types.js +21 -29
  41. package/build/internal/es/src/benefit-programs-v1-pool-pools.types.js.map +1 -1
  42. package/build/internal/es/src/benefit-programs-v1-pool-pools.universal.d.ts +244 -366
  43. package/build/internal/es/src/benefit-programs-v1-pool-pools.universal.js +43 -50
  44. package/build/internal/es/src/benefit-programs-v1-pool-pools.universal.js.map +1 -1
  45. package/package.json +2 -2
@@ -24,45 +24,41 @@ export interface Pool {
24
24
  */
25
25
  _updatedDate?: Date | null;
26
26
  /**
27
- * Pool definition from which this benefit pool was created.
27
+ * ID of the associated pool definition.
28
28
  * @format GUID
29
29
  * @readonly
30
30
  */
31
31
  poolDefinitionId?: string | null;
32
32
  /**
33
- * Program definition from which this benefit pool was provisioned.
33
+ * ID of the associated program definition.
34
34
  * @format GUID
35
35
  * @readonly
36
36
  */
37
37
  programDefinitionId?: string | null;
38
38
  /**
39
- * ID of the program to which this benefit pool is associated.
39
+ * ID of the program that contains this pool.
40
40
  * @format GUID
41
41
  * @readonly
42
42
  */
43
43
  programId?: string | null;
44
44
  /**
45
- * Benefit pool status.
45
+ * Pool status.
46
46
  * @readonly
47
47
  */
48
48
  status?: PoolStatus;
49
- /** Benefit pool owner. */
49
+ /** Pool beneficiary. */
50
50
  beneficiary?: CommonIdentificationData;
51
- /**
52
- * Benefit pool information.
53
- *
54
- * Includes the item, policy, and credit configurations.
55
- */
51
+ /** Pool benefits and settings. */
56
52
  details?: Details;
57
53
  /**
58
54
  * Pool name.
59
55
  *
60
- * It's recommended to keep the same as the associated pool definition's `displayName`.
56
+ * You may want to use the same name that's used in the associated pool definition.
61
57
  * @maxLength 64
62
58
  */
63
59
  displayName?: string;
64
60
  /**
65
- * External system that is the source of the program creation. For example, `wix-pricing-plans`, `wix-loyalty`.
61
+ * Namespace for your app or site's benefit programs.
66
62
  * @immutable
67
63
  * @minLength 1
68
64
  * @maxLength 50
@@ -70,66 +66,58 @@ export interface Pool {
70
66
  namespace?: string | null;
71
67
  /**
72
68
  * Custom field data for the pool object.
69
+ *
73
70
  * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.
74
71
  */
75
72
  extendedFields?: ExtendedFields;
76
73
  /**
77
- * Program definition information.
74
+ * Associated program definition information.
78
75
  * @readonly
79
76
  */
80
77
  programDefinition?: ProgramDefinitionInfo;
81
78
  /**
82
- * Program information.
79
+ * Information about the program containing the pool.
83
80
  * @readonly
84
81
  */
85
82
  program?: PoolProgramInfo;
86
83
  /**
87
- * Version of the associated pool definition at the this benefit pool was created.
88
- *
89
- * `poolDefinition.revision`.
84
+ * Version of the pool definition that this pool was created from.
90
85
  * @readonly
91
86
  */
92
87
  poolDefinitionRevision?: string | null;
93
88
  /**
94
- * Number of times this benefit pool has been renewed.
89
+ * Number of times this pool has been renewed.
95
90
  * @readonly
96
91
  */
97
92
  renewalCount?: number | null;
98
93
  }
99
94
  export declare enum PoolStatus {
95
+ /** Undefined pool status. */
100
96
  UNDEFINED = "UNDEFINED",
101
- /** Active benefit pool. */
97
+ /** Pool is active. */
102
98
  ACTIVE = "ACTIVE",
103
- /** Paused benefit pool. */
99
+ /** Pool is paused. It can be resumed. */
104
100
  PAUSED = "PAUSED",
105
- /**
106
- * Inactive benefit pool.
107
- *
108
- * Benefits can't be redeemed or reserved.
109
- */
101
+ /** Pool is ended. It can't be resumed. */
110
102
  ENDED = "ENDED",
111
- /** Process state of activating the benefit pool's program. */
103
+ /** Pool is provisioning. This status will be true for a negligible amount of time. */
112
104
  PROVISIONING = "PROVISIONING",
113
- /**
114
- * Process state of renewing the benefits.
115
- * Typically at the start of a new benefit renewal cycle.
116
- * Result of calling Renew Program API.
117
- */
105
+ /** Pool is renewing. This status will be true for a negligible amount of time. */
118
106
  RENEWING = "RENEWING"
119
107
  }
120
108
  export interface CommonIdentificationData extends CommonIdentificationDataIdOneOf {
121
109
  /**
122
- * ID of a site visitor that has not logged in to the site.
110
+ * ID of a site visitor that hasn't logged in to the site.
123
111
  * @format GUID
124
112
  */
125
113
  anonymousVisitorId?: string;
126
114
  /**
127
- * ID of a site visitor that has logged in to the site.
115
+ * ID of a site member.
128
116
  * @format GUID
129
117
  */
130
118
  memberId?: string;
131
119
  /**
132
- * ID of a Wix user (site owner, contributor, etc.).
120
+ * ID of a Wix user.
133
121
  * @format GUID
134
122
  */
135
123
  wixUserId?: string;
@@ -137,17 +125,17 @@ export interface CommonIdentificationData extends CommonIdentificationDataIdOneO
137
125
  /** @oneof */
138
126
  export interface CommonIdentificationDataIdOneOf {
139
127
  /**
140
- * ID of a site visitor that has not logged in to the site.
128
+ * ID of a site visitor that hasn't logged in to the site.
141
129
  * @format GUID
142
130
  */
143
131
  anonymousVisitorId?: string;
144
132
  /**
145
- * ID of a site visitor that has logged in to the site.
133
+ * ID of a site member.
146
134
  * @format GUID
147
135
  */
148
136
  memberId?: string;
149
137
  /**
150
- * ID of a Wix user (site owner, contributor, etc.).
138
+ * ID of a Wix user.
151
139
  * @format GUID
152
140
  */
153
141
  wixUserId?: string;
@@ -164,76 +152,49 @@ export declare enum IdentityType {
164
152
  }
165
153
  export interface Details {
166
154
  /**
167
- * Array of benefits, each containing price and policy settings specific to that benefit within the pool.
155
+ * List of benefits.
168
156
  * @maxSize 10
169
157
  */
170
158
  benefits?: Benefit[];
171
159
  /**
172
- * Settings that control the initial credits and renewal cycle configurations of the benefit pool.
160
+ * Credit settings.
173
161
  *
174
- * Default: Benefits may be redeemed without limit.
162
+ * If this object is empty, you can't set a price for the benefit.
175
163
  */
176
164
  creditConfiguration?: CreditConfiguration;
177
- /**
178
- * Defines the redemption policy for a benefit pool. This includes specifying the days of the week and the hours during which the benefits can be redeemed.
179
- *
180
- * Policy types may be either:
181
- *
182
- * + FIXED INTERVALS: Specifies the timing during the day.
183
- *
184
- * + RATE LIMITED: Specifies how many times the benefit can be redeemed within a given renewal cycle.
185
- *
186
- * Each selected policy type must have its corresponding policy options. For example, the `fixedInterval` type requires `fixedIntervalOptions` to be included in the parameters.
187
- *
188
- * This parameter is the default policy for all the benefits in the benefit pool. It may be overridden for specific benefits in the `details.benefits.policyExpression` parameter.
189
- */
190
- policyExpression?: PolicyExpression;
191
- /** Additional info set by the benefit provider. */
165
+ /** Additional information relating to this object. */
192
166
  additionalData?: Record<string, any> | null;
193
167
  }
194
168
  export interface Benefit {
195
169
  /**
196
- * An unique identifier for a pool benefit.
170
+ * Unique identifier for this benefit.
197
171
  *
198
- * This key is consistent across the pool definition and all its associated benefit pools.
172
+ * This key is consistent across the pool definition and all associated pools that contain this benefit.
199
173
  * @maxLength 64
200
174
  */
201
175
  benefitKey?: string;
202
176
  /**
203
- * Represents the associated benefit item that belongs to a benefit pool.
204
- *
205
- * This ID is returned when calling Create Item.
206
- *
207
- * It is used to link the specific benefit item to its corresponding location within the benefit pool, ensuring proper association between the item and the pool definition.
177
+ * ID that is used to associated items with this benefit.
208
178
  * @format GUID
209
179
  * @immutable
210
180
  * @readonly
211
181
  */
212
182
  itemSetId?: string | null;
213
183
  /**
214
- * Price of the benefit item as expressed in credits.
215
- * Represents the cost to redeem the benefit.
216
- *
217
- * Don't set a price if the `details.creditConfiguration` is empty. Since the benefits have an unlimited redemption limit, they can't have an associated price.
184
+ * Price of the benefit in credits. The price is the same for all of this benefit's items.
218
185
  * @decimalValue options { gte:0, maxScale:4 }
219
186
  */
220
187
  price?: string | null;
221
- /**
222
- * Defines the redemption policy for a specific benefit. This includes specifying the days of the week and the hours during which the benefits can be redeemed.
223
- *
224
- * Overrides the default policies in `benefit.details`.
225
- */
226
- policyExpression?: PolicyExpression;
227
- /** Additional info that was set by the benefit provider. */
188
+ /** Additional information for this benefit. */
228
189
  additionalData?: Record<string, any> | null;
229
190
  /**
230
- * ID of the app providing the benefit.
191
+ * ID of the app providing the benefit items.
231
192
  * @format GUID
232
193
  * @immutable
233
194
  */
234
195
  providerAppId?: string | null;
235
196
  /**
236
- * Benefit display name.
197
+ * Benefit name.
237
198
  * @maxLength 40
238
199
  */
239
200
  displayName?: string | null;
@@ -244,50 +205,46 @@ export interface Benefit {
244
205
  description?: string | null;
245
206
  }
246
207
  export interface PolicyExpression extends PolicyExpressionExpressionOneOf {
247
- /** Negates the expression. */
208
+ /** Benefits can be redeemed if the expression in this object is not fulfilled. */
248
209
  operatorNotOptions?: PolicyExpressionNot;
249
- /** Combines the expressions with an `AND` operator. */
210
+ /** Benefits can be redeemed if all the expression in this object's array are fulfilled. */
250
211
  operatorAndOptions?: PolicyExpressionAnd;
251
- /** Combines the expressions with an `OR` operator. */
212
+ /** Benefits can be redeemed if at least one of the expressions in this object's array is fulfilled. */
252
213
  operatorOrOptions?: PolicyExpressionOr;
253
- /** Defines policy terms for benefit redemption. */
214
+ /** Defines when benefits can be redeemed or how many benefits can be redeemed in a specific time period. */
254
215
  policyOptions?: Policy;
255
- /**
256
- * Declare type of policy conditions or settings to use. Use together with the associated policy options to construct policy terms.
257
- *
258
- * Different operators can be used to combine multiple policy terms.
259
- */
216
+ /** Policy expression type. */
260
217
  type?: PolicyExpressionType;
261
218
  }
262
219
  /** @oneof */
263
220
  export interface PolicyExpressionExpressionOneOf {
264
- /** Negates the expression. */
221
+ /** Benefits can be redeemed if the expression in this object is not fulfilled. */
265
222
  operatorNotOptions?: PolicyExpressionNot;
266
- /** Combines the expressions with an `AND` operator. */
223
+ /** Benefits can be redeemed if all the expression in this object's array are fulfilled. */
267
224
  operatorAndOptions?: PolicyExpressionAnd;
268
- /** Combines the expressions with an `OR` operator. */
225
+ /** Benefits can be redeemed if at least one of the expressions in this object's array is fulfilled. */
269
226
  operatorOrOptions?: PolicyExpressionOr;
270
- /** Defines policy terms for benefit redemption. */
227
+ /** Defines when benefits can be redeemed or how many benefits can be redeemed in a specific time period. */
271
228
  policyOptions?: Policy;
272
229
  }
273
230
  export declare enum PolicyExpressionType {
274
231
  UNKNOWN = "UNKNOWN",
275
- /** Use with associated `operatorNotOptions`. */
232
+ /** Use with `operatorNotOptions`. */
276
233
  OPERATOR_NOT = "OPERATOR_NOT",
277
- /** Use with associated `operatorAndOptions`. */
234
+ /** Use with `operatorAndOptions`. */
278
235
  OPERATOR_AND = "OPERATOR_AND",
279
- /** Use with associated `operatorOrOptions`. */
236
+ /** Use with `operatorOrOptions`. */
280
237
  OPERATOR_OR = "OPERATOR_OR",
281
- /** Use with associated `policyOptions` to define a policy. */
238
+ /** Use with `policyOptions`. */
282
239
  POLICY = "POLICY"
283
240
  }
284
241
  export interface PolicyExpressionNot {
285
- /** Specify policy terms where none of specified policy conditions should be met. Must specify an object with an `expressions` property. */
242
+ /** Policy expression. If this expression is not fulfilled, benefits can be redeemed. */
286
243
  expression?: PolicyExpression;
287
244
  }
288
245
  export interface PolicyExpressionAnd {
289
246
  /**
290
- * Specify policy terms where all policy conditions must be met. Must specify an object with an `expressions` property.
247
+ * Array of policy expressions. If all expressions are fulfilled, benefits can be redeemed.
291
248
  * @minSize 2
292
249
  * @maxSize 10
293
250
  */
@@ -295,62 +252,71 @@ export interface PolicyExpressionAnd {
295
252
  }
296
253
  export interface PolicyExpressionOr {
297
254
  /**
298
- * Specify policy terms where at least one of the possible specified policy conditions is met. Must specify an object with an `expressions` property.
255
+ * Array of policy expressions. If at least one expression is fulfilled, benefits can be redeemed.
299
256
  * @minSize 2
300
257
  * @maxSize 10
301
258
  */
302
259
  expressions?: PolicyExpression[];
303
260
  }
304
261
  export interface Policy extends PolicyPolicyOneOf {
305
- /** Defines the timing of benefit policy redemption for specific days or hours. */
262
+ /**
263
+ * Defines an interval during which the policy expression is fulfilled.
264
+ *
265
+ * If `fromWeekDay` and `toWeekDay` are defined, this interval applies weekly. Otherwise, it applies daily.
266
+ */
306
267
  fixedIntervalOptions?: FixedIntervalPolicy;
307
- /** Sets a limit on the number of times a benefit can be redeemed within a given renewal cycle. */
268
+ /** Maximum amount of times a benefit can be redeemed during a specified time period. */
308
269
  rateLimitedOptions?: RateLimitedPolicy;
309
- /** Custom policy definition that is controlled by the CustomPolicyProvider. */
270
+ /** Custom policy defined by a different app. */
310
271
  customOptions?: CustomPolicy;
311
- /** Specific policy setting. Use together with its associated policy type options. For example, a fixed interval policy type should include a `fixedIntervalOptions` parameter. */
272
+ /** Policy type. */
312
273
  type?: Type;
313
274
  }
314
275
  /** @oneof */
315
276
  export interface PolicyPolicyOneOf {
316
- /** Defines the timing of benefit policy redemption for specific days or hours. */
277
+ /**
278
+ * Defines an interval during which the policy expression is fulfilled.
279
+ *
280
+ * If `fromWeekDay` and `toWeekDay` are defined, this interval applies weekly. Otherwise, it applies daily.
281
+ */
317
282
  fixedIntervalOptions?: FixedIntervalPolicy;
318
- /** Sets a limit on the number of times a benefit can be redeemed within a given renewal cycle. */
283
+ /** Maximum amount of times a benefit can be redeemed during a specified time period. */
319
284
  rateLimitedOptions?: RateLimitedPolicy;
320
- /** Custom policy definition that is controlled by the CustomPolicyProvider. */
285
+ /** Custom policy defined by a different app. */
321
286
  customOptions?: CustomPolicy;
322
287
  }
323
288
  export declare enum Type {
324
289
  /** Unknown policy type. */
325
290
  UNKNOWN = "UNKNOWN",
326
- /** Fixed interval policy type. */
291
+ /** Use with `fixedIntervalOptions`. */
327
292
  FIXED_INTERVAL = "FIXED_INTERVAL",
328
- /** Rate limited policy type. */
293
+ /** Use with `rateLimitedOptions`. */
329
294
  RATE_LIMITED = "RATE_LIMITED",
295
+ /** Use with `customOptions`. */
330
296
  CUSTOM = "CUSTOM"
331
297
  }
332
298
  export interface FixedIntervalPolicy {
333
- /** Weekday that this interval starts from. If this field is set, then `toWeekDay` must also be set. */
299
+ /** Weekday that this interval starts from. If this field is defined, then `toWeekDay` is required. */
334
300
  fromWeekDay?: WeekDay;
335
- /** Weekday that this interval ends at. If this field is set, then `fromWeekDay` must also be set. */
301
+ /** Weekday that this interval ends at. If this field is defined, then `fromWeekDay` is required. */
336
302
  toWeekDay?: WeekDay;
337
303
  /**
338
- * Hour that this interval starts from. If this field is set, then `toHour` must also be set.
304
+ * Hour that this interval starts from. If this field is defined, then `toHour` is required.
339
305
  * @max 23
340
306
  */
341
307
  fromHour?: number | null;
342
308
  /**
343
- * Hour that this interval ends at. If this field is set, then `fromHour` must also be set.
309
+ * Hour that this interval ends at. If this field is defined, then `fromHour` is required.
344
310
  * @max 23
345
311
  */
346
312
  toHour?: number | null;
347
313
  /**
348
- * Minute that this interval starts from. If this field is set, then `toMinute` must also be set.
314
+ * Minute that this interval starts from. If this field is defined, then `toMinute` is required.
349
315
  * @max 59
350
316
  */
351
317
  fromMinute?: number | null;
352
318
  /**
353
- * Minute that this interval ends at. If this field is set, then `fromMinute` must also be set.
319
+ * Minute that this interval ends at. If this field is defined, then `fromMinute` is required.
354
320
  * @max 59
355
321
  */
356
322
  toMinute?: number | null;
@@ -374,70 +340,60 @@ export declare enum WeekDay {
374
340
  SUNDAY = "SUNDAY"
375
341
  }
376
342
  export interface RateLimitedPolicy extends RateLimitedPolicyPeriodOneOf {
377
- /**
378
- * Defines the timing of benefit policy redemption for specific days or hours.
379
- *
380
- * Used to set the timing policy for a maximum limit of redemptions.
381
- */
343
+ /** Fixed interval used to limit benefit redemption. */
382
344
  fixedIntervalOptions?: FixedIntervalPolicy;
383
- /** Maximum number of times benefit can be redeemed per renewal cycle. */
345
+ /** Maximum number of times a benefit can be redeemed per specified time period. */
384
346
  times?: number;
385
- /** Specific method of setting the benefit limit. `FIXED_INTERVAL` type must be used with its corresponding `fixIntervalPolicyOptions` parameter. */
347
+ /** Time period type. */
386
348
  type?: RateLimitedPolicyType;
387
349
  }
388
350
  /** @oneof */
389
351
  export interface RateLimitedPolicyPeriodOneOf {
390
- /**
391
- * Defines the timing of benefit policy redemption for specific days or hours.
392
- *
393
- * Used to set the timing policy for a maximum limit of redemptions.
394
- */
352
+ /** Fixed interval used to limit benefit redemption. */
395
353
  fixedIntervalOptions?: FixedIntervalPolicy;
396
354
  }
397
355
  export declare enum RateLimitedPolicyType {
398
356
  /** Unknown rate limit method. */
399
357
  UNKNOWN = "UNKNOWN",
400
- /** Fixed interval rate limit. The intervals are set using `fixIntervalPolicyOptions`. */
358
+ /** Time period is defined using `fixedIntervalOptions`. */
401
359
  FIXED_INTERVAL = "FIXED_INTERVAL",
402
- /** Rate limit is set with `times` field above. */
360
+ /** Time period is from one program renewal to the next. */
403
361
  PER_CYCLE = "PER_CYCLE"
404
362
  }
405
363
  /** Custom policy as implemented by the Entitlement Policy Provider */
406
364
  export interface CustomPolicy {
407
365
  /**
408
- * References a specific custom policy on the provider's system
366
+ * Policy ID.
409
367
  * @format GUID
410
368
  */
411
369
  _id?: string;
412
370
  /**
413
- * Custom policy provider id
371
+ * ID of the app providing the policy.
414
372
  * @format GUID
415
373
  */
416
374
  appId?: string | null;
417
- /** Additional info for this custom policy. It's going to be passed to the policy provider during eligibility checks */
375
+ /** Additional information for this custom policy. */
418
376
  additionalData?: Record<string, any> | null;
419
377
  }
420
378
  export interface CreditConfiguration {
421
379
  /**
422
- * The initial total amount of credits available in this benefit pool.
380
+ * Initial available amount for associated balances.
423
381
  * @decimalValue options { gte:0, maxScale:4 }
424
382
  */
425
383
  amount?: string;
426
- /** Rollover configuration. */
384
+ /** Rollover settings. */
427
385
  rolloverConfiguration?: RolloverConfiguration;
428
386
  /**
429
- * Display name of the unit.
387
+ * Credit unit display name.
430
388
  * @maxLength 32
431
389
  */
432
390
  unitDisplayName?: string | null;
433
391
  }
434
392
  export interface RolloverConfiguration {
435
- /** Determine whether unused credits are rolled over to the new cycle. */
393
+ /** Whether unused credits rollover to a new cycle when a program renews. */
436
394
  enabled?: boolean | null;
437
395
  /**
438
- * The maximum amount of credits that can be transferred to the next benefit renewal cycle.
439
- *
440
- * If current balance exceeds this cap, no credits will transfer into the next renewal cycle until the balance is within the allowable limit.
396
+ * Maximum amount of credits that can rollover to the next cycle when a program renews.
441
397
  * @decimalValue options { gte:0, maxScale:4 }
442
398
  */
443
399
  balanceCap?: string | null;
@@ -455,15 +411,13 @@ export interface ExtendedFields {
455
411
  }
456
412
  export interface ProgramDefinitionInfo {
457
413
  /**
458
- * ID of the program definition that provisioned the program associated with this benefit pool.
414
+ * Program definition ID.
459
415
  * @format GUID
460
416
  * @readonly
461
417
  */
462
418
  _id?: string;
463
419
  /**
464
- * External ID of the program definition that provisioned this program.
465
- *
466
- * This identifies the source program definition in the external system.
420
+ * Program definition external ID.
467
421
  * @format GUID
468
422
  * @readonly
469
423
  */
@@ -471,15 +425,13 @@ export interface ProgramDefinitionInfo {
471
425
  }
472
426
  export interface PoolProgramInfo {
473
427
  /**
474
- * ID of the program associated with this benefit pool.
428
+ * Program ID.
475
429
  * @format GUID
476
430
  * @readonly
477
431
  */
478
432
  _id?: string;
479
433
  /**
480
- * External ID of the program associated with this benefit pool.
481
- *
482
- * This identifies the source program in the external system.
434
+ * Program external ID.
483
435
  * @format GUID
484
436
  * @readonly
485
437
  */
@@ -547,7 +499,7 @@ export interface ItemReference {
547
499
  */
548
500
  category?: string;
549
501
  /**
550
- * ID of the application providing the benefits.
502
+ * ID of the app providing the item.
551
503
  * @format GUID
552
504
  */
553
505
  providerAppId?: string;
@@ -658,7 +610,7 @@ export interface GetPoolResponse {
658
610
  pool?: Pool;
659
611
  }
660
612
  export interface UpdatePoolRequest {
661
- /** Pool to be updated. */
613
+ /** Pool to update. */
662
614
  pool: Pool;
663
615
  }
664
616
  export interface UpdatePoolResponse {
@@ -675,24 +627,20 @@ export interface DeletePoolRequest {
675
627
  export interface DeletePoolResponse {
676
628
  }
677
629
  export interface QueryPoolsRequest {
678
- /** Query to select pools. */
630
+ /** Filter, sort, and paging to apply to the query. */
679
631
  query: CursorQuery;
680
632
  }
681
633
  export interface CursorQuery extends CursorQueryPagingMethodOneOf {
682
634
  /** 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`. */
683
635
  cursorPaging?: CursorPaging;
684
636
  /**
685
- * Filter object in the following format:
686
- * `"filter" : {
687
- * "fieldName1": "value1",
688
- * "fieldName2":{"$operator":"value2"}
689
- * }`
690
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
637
+ * Filter object.
638
+ * See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)
639
+ * for more information.
691
640
  */
692
641
  filter?: Record<string, any> | null;
693
642
  /**
694
- * Sort object in the following format:
695
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
643
+ * List of sort objects.
696
644
  * @maxSize 5
697
645
  */
698
646
  sort?: Sorting[];
@@ -704,11 +652,15 @@ export interface CursorQueryPagingMethodOneOf {
704
652
  }
705
653
  export interface Sorting {
706
654
  /**
707
- * Name of the field to sort by.
655
+ * Field to sort by.
708
656
  * @maxLength 512
709
657
  */
710
658
  fieldName?: string;
711
- /** Sort order. */
659
+ /**
660
+ * Sort order. Use `ASC` for ascending order or `DESC` for descending order.
661
+ *
662
+ * Default: `ASC`
663
+ */
712
664
  order?: SortOrder;
713
665
  }
714
666
  export declare enum SortOrder {
@@ -719,7 +671,7 @@ export declare enum SortOrder {
719
671
  }
720
672
  export interface CursorPaging {
721
673
  /**
722
- * Maximum number of items to return in the results.
674
+ * Maximum number of items to return.
723
675
  * @max 100
724
676
  */
725
677
  limit?: number | null;
@@ -733,7 +685,7 @@ export interface CursorPaging {
733
685
  cursor?: string | null;
734
686
  }
735
687
  export interface QueryPoolsResponse {
736
- /** List of pools. */
688
+ /** List of retrieved pools. */
737
689
  pools?: Pool[];
738
690
  /** Metadata for the paginated results. */
739
691
  metadata?: CursorPagingMetadata;
@@ -765,30 +717,26 @@ export interface Cursors {
765
717
  }
766
718
  export interface RedeemBenefitRequest {
767
719
  /**
768
- * ID of the benefit pool being redeemed.
720
+ * ID of the pool that benefit to redeem belongs to.
769
721
  * @format GUID
770
722
  */
771
723
  poolId: string;
772
- /** Reference of the benefit item that is being redeemed. */
724
+ /** Information about the item being to redeem. */
773
725
  itemReference: ItemReference;
774
726
  /**
775
- * Key of the specific benefit to be redeemed.
776
- *
777
- * This needs to be specified to ensure the correct benefit is redeemed.
727
+ * Key of the benefit to redeem.
778
728
  * @maxLength 64
779
729
  */
780
730
  benefitKey: string;
781
731
  /**
782
- * Number of of items to redeem.
732
+ * Amount of items to redeem.
783
733
  * @min 1
784
734
  */
785
735
  count?: number;
786
736
  /**
787
- * Date when the benefit item will be used.
788
- *
789
- * While credit balance is adjusted immediately upon the redemption request, the target date may be set for a later time than the date of the request.
737
+ * Date that the item will be provided to the beneficiary.
790
738
  *
791
- * Used for the app providing the benefit items to manage the logistics associated with the item.
739
+ * The pool's associated balance will update immediately. This parameter should be used to manage the logistics of providing the item.
792
740
  */
793
741
  targetDate?: Date | null;
794
742
  /**
@@ -799,12 +747,10 @@ export interface RedeemBenefitRequest {
799
747
  idempotencyKey: string;
800
748
  /** Additional information. */
801
749
  additionalData?: Record<string, any> | null;
802
- /** Benefit pool owner. */
750
+ /** Beneficiary of the pool containing the benefit to redeem. */
803
751
  beneficiary?: CommonIdentificationData;
804
752
  /**
805
- * Module that is the source of the benefit pool creation.
806
- *
807
- * Must match the previously defined namespace in the associated pool definition.
753
+ * Namespace for your app or site's benefit programs.
808
754
  * @minLength 1
809
755
  * @maxLength 50
810
756
  */
@@ -812,40 +758,40 @@ export interface RedeemBenefitRequest {
812
758
  }
813
759
  export interface RedeemBenefitResponse {
814
760
  /**
815
- * Id of the resulting transaction.
761
+ * ID of the transaction recording the associated change in balance.
816
762
  * @format GUID
817
763
  */
818
764
  transactionId?: string;
819
765
  }
820
766
  export interface NotEnoughBalance {
821
767
  /**
822
- * Pool ID
768
+ * Pool ID.
823
769
  * @format GUID
824
770
  */
825
771
  poolId?: string;
826
- /** Item reference */
772
+ /** Item reference. */
827
773
  itemReference?: ItemReference;
828
774
  /**
829
- * Price of the item expressed in credits
775
+ * Pool's associated balance amount in credits.
830
776
  * @decimalValue options { maxScale:4 }
831
777
  */
832
778
  availableBalance?: string;
833
779
  /**
834
- * Price of the item expressed in credits
780
+ * Price of the item in credits.
835
781
  * @decimalValue options { maxScale:4 }
836
782
  */
837
783
  requestedBalance?: string;
838
784
  }
839
785
  export interface PolicyExpressionEvaluatedToFalse {
840
786
  /**
841
- * Pool ID
787
+ * Pool ID.
842
788
  * @format GUID
843
789
  */
844
790
  poolId?: string;
845
- /** Item reference */
791
+ /** Item reference. */
846
792
  itemReference?: ItemReference;
847
793
  /**
848
- * Failure details
794
+ * Failure details.
849
795
  * @maxSize 10
850
796
  */
851
797
  failureDetails?: FailureDetails[];
@@ -877,16 +823,16 @@ export interface FailureDetails {
877
823
  }
878
824
  export interface PoolNotActive {
879
825
  /**
880
- * Pool ID
826
+ * Pool ID.
881
827
  * @format GUID
882
828
  */
883
829
  poolId?: string;
884
- /** Pool status */
830
+ /** Pool status. */
885
831
  poolStatus?: PoolStatus;
886
832
  }
887
833
  export interface PoolNotFound {
888
834
  /**
889
- * Pool ID
835
+ * Pool ID.
890
836
  * @format GUID
891
837
  */
892
838
  poolId?: string;
@@ -905,12 +851,12 @@ export interface BenefitAlreadyRedeemed {
905
851
  }
906
852
  export interface BenefitNotFound {
907
853
  /**
908
- * Pool ID
854
+ * Pool ID.
909
855
  * @format GUID
910
856
  */
911
857
  poolId?: string;
912
858
  /**
913
- * Key of the referenced benefit, if provided
859
+ * Specified benefit key.
914
860
  * @format GUID
915
861
  */
916
862
  benefitKey?: string | null;
@@ -1002,233 +948,199 @@ export interface ReleaseBenefitReservationResponse {
1002
948
  }
1003
949
  export interface CheckBenefitEligibilityRequest {
1004
950
  /**
1005
- * ID of the benefit pool to check eligibility against.
951
+ * ID of the pool that the benefit to check belongs to.
1006
952
  * @format GUID
1007
953
  */
1008
954
  poolId: string;
1009
955
  /**
1010
- * Key of the benefit to be redeemed, associated with a particular benefit.
1011
- *
1012
- * This key must be specified to ensure the correct benefit is redeemed.
1013
- *
1014
- * Default: The first eligible benefit in the benefit pool will be redeemed.
956
+ * Key of the benefit to check.
1015
957
  * @maxLength 64
1016
958
  */
1017
959
  benefitKey?: string | null;
1018
- /** Reference of the item for which to check benefit's eligibility. */
960
+ /** Information about the item to check. */
1019
961
  itemReference: ItemReference;
1020
962
  /**
1021
- * Number of items for which to check eligibility.
963
+ * Amount of items to check.
1022
964
  *
1023
- * This number will be evaluated against the policies and credit balance of the benefit pool to determine if sufficient funds are met for the specified number of items.
965
+ * Ensures the balance is high enough to redeem this many items.
1024
966
  * @min 1
1025
967
  */
1026
968
  count?: number;
1027
969
  /**
1028
- * Date when the benefit item will be used.
970
+ * Date that the item will be provided to the beneficiary.
1029
971
  *
1030
- * While credit balance is adjusted immediately upon the redemption request, the target date may be set for a later time than the date of the request.
1031
- *
1032
- * Used for the app providing the benefit items to manage the logistics associated with the item.
972
+ * This parameter should be used to manage the potential logistics of providing the item.
1033
973
  */
1034
974
  targetDate?: Date | null;
1035
- /** Additional info */
975
+ /** Additional information. */
1036
976
  additionalData?: Record<string, any> | null;
1037
- /** Benefit pool owner. */
977
+ /** Beneficiary of the pool containing the benefit to check. */
1038
978
  beneficiary?: CommonIdentificationData;
1039
979
  /**
1040
- * Module that is the source of the benefit pool creation.
1041
- *
1042
- * This value must correspond with the previously defined namespace established when creating the associated pool definition.
1043
- *
1044
- * It ensures efficient processing and management of pools and benefits.
980
+ * Namespace for your app or site's benefit programs.
1045
981
  * @minLength 1
1046
982
  * @maxLength 50
1047
983
  */
1048
984
  namespace: string;
1049
985
  }
1050
986
  export interface CheckBenefitEligibilityResponse {
1051
- /**
1052
- * Result of the eligibility check. Includes the benefit's eligibility.
1053
- *
1054
- * If the benefit is not eligible for redemption, provides a reason for ineligiblity.
1055
- */
987
+ /** Result of the eligibility check. */
1056
988
  result?: EligibilityCheckResult;
1057
989
  }
1058
990
  export interface EligibilityCheckResult extends EligibilityCheckResultResultOneOf {
1059
- /** Set when eligibility check passed. */
991
+ /** Returned when item is eligible to be redeemed. */
1060
992
  eligibleOptions?: Eligible;
1061
- /** Set when balance is insufficient. */
993
+ /** Returned when the pool's associated balance is lower than the cost of redeeming the items. */
1062
994
  notEnoughBalanceOptions?: NotEnoughBalance;
1063
- /** Set when policy expression evaluates to false. */
1064
- policyExpressionEvaluatedToFalseOptions?: PolicyExpressionEvaluatedToFalse;
1065
- /** Set when pool is inactive. */
995
+ /** Returned when the pool isn't active. */
1066
996
  poolNotActiveOptions?: PoolNotActive;
1067
- /** Set when benefit can't be found. */
997
+ /** Returned when invalid benefit details are provided. */
1068
998
  benefitNotFoundOptions?: BenefitNotFound;
1069
- /** Set when pool can't be found. */
999
+ /** Returned when invalid pool details are provided. */
1070
1000
  poolNotFoundOptions?: PoolNotFound;
1071
1001
  /** Eligibility status. */
1072
1002
  type?: EligibilityCheckResultType;
1073
1003
  }
1074
1004
  /** @oneof */
1075
1005
  export interface EligibilityCheckResultResultOneOf {
1076
- /** Set when eligibility check passed. */
1006
+ /** Returned when item is eligible to be redeemed. */
1077
1007
  eligibleOptions?: Eligible;
1078
- /** Set when balance is insufficient. */
1008
+ /** Returned when the pool's associated balance is lower than the cost of redeeming the items. */
1079
1009
  notEnoughBalanceOptions?: NotEnoughBalance;
1080
- /** Set when policy expression evaluates to false. */
1081
- policyExpressionEvaluatedToFalseOptions?: PolicyExpressionEvaluatedToFalse;
1082
- /** Set when pool is inactive. */
1010
+ /** Returned when the pool isn't active. */
1083
1011
  poolNotActiveOptions?: PoolNotActive;
1084
- /** Set when benefit can't be found. */
1012
+ /** Returned when invalid benefit details are provided. */
1085
1013
  benefitNotFoundOptions?: BenefitNotFound;
1086
- /** Set when pool can't be found. */
1014
+ /** Returned when invalid pool details are provided. */
1087
1015
  poolNotFoundOptions?: PoolNotFound;
1088
1016
  }
1089
1017
  export interface EligibleBenefit {
1090
1018
  /**
1091
- * Pool ID
1019
+ * Pool ID.
1092
1020
  * @format GUID
1093
1021
  * @readonly
1094
1022
  */
1095
1023
  poolId?: string;
1096
1024
  /**
1097
- * Key of the specific benefit.
1025
+ * Benefit key.
1098
1026
  * @maxLength 64
1099
1027
  */
1100
1028
  benefitKey?: string;
1101
- /** Item reference */
1029
+ /** Item reference. */
1102
1030
  itemReference?: ItemReference;
1103
1031
  /**
1104
- * Price of the item expressed in credits
1032
+ * Price of the benefit in credits.
1105
1033
  * @decimalValue options { gte:0, maxScale:4 }
1106
1034
  */
1107
1035
  price?: string | null;
1108
1036
  }
1109
1037
  export declare enum EligibilityCheckResultType {
1110
- /** Unknown pool eligibility. */
1038
+ /** Unknown eligibility. */
1111
1039
  UNKNOWN = "UNKNOWN",
1112
- /** Eligible pool. */
1040
+ /** Item is eligible to be redeemed. */
1113
1041
  ELIGIBLE = "ELIGIBLE",
1114
- /** Insufficient pool balance. */
1042
+ /** Balance is lower than the cost of redeeming the items. */
1115
1043
  NOT_ENOUGH_BALANCE = "NOT_ENOUGH_BALANCE",
1116
- /** Policy is false. */
1117
- POLICY_EXPRESSION_EVALUATED_TO_FALSE = "POLICY_EXPRESSION_EVALUATED_TO_FALSE",
1118
- /** Inactive pool. */
1044
+ /** Pool isn't active. */
1119
1045
  POOL_NOT_ACTIVE = "POOL_NOT_ACTIVE",
1120
- /** Invalid benefit. */
1046
+ /** Invalid benefit details provided. */
1121
1047
  BENEFIT_NOT_FOUND = "BENEFIT_NOT_FOUND",
1122
- /** Invalid pool. */
1048
+ /** Invalid pool details provided. */
1123
1049
  POOL_NOT_FOUND = "POOL_NOT_FOUND"
1124
1050
  }
1125
1051
  export interface Eligible {
1126
1052
  /**
1127
- * Eligible benefits.
1053
+ * Benefits that are eligible to be redeemed.
1128
1054
  * @maxSize 100
1129
1055
  */
1130
1056
  eligibleBenefits?: EligibleBenefit[];
1131
1057
  }
1132
1058
  export interface BulkCheckBenefitEligibilityRequest {
1133
1059
  /**
1134
- * Benefits to check eligibility.
1060
+ * List of benefits to check.
1135
1061
  * @minSize 1
1136
1062
  * @maxSize 100
1137
1063
  */
1138
1064
  benefitSelectors?: BenefitSelector[];
1139
1065
  /**
1140
- * Module that is the source of the benefit pool creation.
1141
- *
1142
- * This value must correspond with the previously defined namespace established when creating the associated pool definition.
1143
- *
1144
- * It ensures efficient processing and management of pools and benefits.
1066
+ * Namespace for your app or site's benefit programs.
1145
1067
  * @minLength 1
1146
1068
  * @maxLength 50
1147
1069
  */
1148
1070
  namespace: string;
1149
- /** Benefit pool owner. */
1071
+ /** Pool beneficiary. */
1150
1072
  beneficiary?: CommonIdentificationData;
1151
1073
  }
1152
1074
  export interface BenefitSelector {
1153
1075
  /**
1154
- * ID of the pool to check for eligibility.
1076
+ * ID of the pool that the benefit to check belongs to.
1155
1077
  * @format GUID
1156
1078
  */
1157
1079
  poolId?: string;
1158
1080
  /**
1159
- * ID of the benefit to check for eligibility.
1081
+ * Key of the benefit to check.
1160
1082
  * @maxLength 64
1161
1083
  */
1162
1084
  benefitKey?: string | null;
1163
- /** Reference of the item for which to check benefit's eligibility. */
1085
+ /** Information about the item to check. */
1164
1086
  itemReference?: ItemReference;
1165
1087
  /**
1166
- * Number of items for which to check eligibility.
1088
+ * Amount of items to check.
1167
1089
  *
1168
- * This number will be evaluated against the policies and credit balance of the benefit pool to determine if sufficient funds are met for the specified number of items.
1090
+ * Ensures the balance is high enough to redeem this many it
1169
1091
  * @min 1
1170
1092
  */
1171
1093
  count?: number;
1172
1094
  /**
1173
- * Date when the benefit item will be used.
1174
- *
1175
- * While credit balance is adjusted immediately upon the redemption request, the target date may be set for a later time than the date of the request.
1095
+ * Date that the item will be provided to the beneficiary.
1176
1096
  *
1177
- * Used for the app providing the benefit items to manage the logistics associated with the item.
1097
+ * This parameter should be used to manage the potential logistics of providing the item.
1178
1098
  */
1179
1099
  targetDate?: Date | null;
1180
- /** Additional info */
1100
+ /** Additional information. */
1181
1101
  additionalData?: Record<string, any> | null;
1182
1102
  }
1183
1103
  export interface BulkCheckBenefitEligibilityResponse {
1184
1104
  /**
1185
- * List of results for pool benefit eligibility.
1105
+ * List of results checking each benefit.
1186
1106
  * @minSize 1
1187
1107
  * @maxSize 100
1188
1108
  */
1189
1109
  results?: BulkEligibilityCheckResult[];
1190
1110
  }
1191
1111
  export interface BulkEligibilityCheckResult {
1192
- /** Retrieved information for each benefit pool. */
1112
+ /** Benefit information specified in API call. */
1193
1113
  benefitSelector?: BenefitSelector;
1194
- /** Outcome of the eligibility check. */
1114
+ /** Result of the eligibility check. */
1195
1115
  result?: EligibilityCheckResult;
1196
1116
  }
1197
1117
  export interface GetEligibleBenefitsRequest {
1198
- /** Reference of the item for which all eligible pools will be returned. */
1118
+ /** Item reference. */
1199
1119
  itemReference: ItemReference;
1200
1120
  /**
1201
- * Number of items for which to check eligibility.
1202
- *
1203
- * This number will be evaluated against the policies and credit balance of the benefit pool to determine if sufficient funds are met for the specified number of items.
1121
+ * Amount of items to check. This ensures the balance is high enough to redeem this many items.
1204
1122
  * @min 1
1205
1123
  */
1206
1124
  count?: number;
1207
1125
  /**
1208
- * Date when the benefit item will be used.
1209
- *
1210
- * While credit balance is adjusted immediately upon the redemption request, the target date may be set for a later time than the date of the request.
1126
+ * Date that the item will be provided to the beneficiary.
1211
1127
  *
1212
- * Used for the app providing the benefit items to manage the logistics associated with the item.
1128
+ * This parameter should be used to manage the potential logistics of providing the item.
1213
1129
  */
1214
1130
  targetDate?: Date | null;
1215
1131
  /** Additional information. */
1216
1132
  additionalData?: Record<string, any> | null;
1217
- /** Benefit pool owner. */
1133
+ /** Filter request by beneficiary. */
1218
1134
  beneficiary?: CommonIdentificationData;
1219
1135
  /**
1220
- * Module that is the source of the benefit pool creation.
1221
- *
1222
- * This value must correspond with the previously defined namespace established when creating the associated pool definition.
1223
- *
1224
- * It ensures efficient processing and management of pools and benefits.
1136
+ * Namespace for your app or site's benefit programs.
1225
1137
  * @minLength 1
1226
1138
  * @maxLength 50
1227
1139
  */
1228
1140
  namespace: string;
1229
1141
  }
1230
1142
  export interface GetEligibleBenefitsResponse {
1231
- /** Retrieved eligible benefits. */
1143
+ /** Retrieved benefits that can be redeemed. */
1232
1144
  eligibleBenefits?: EligibleBenefit[];
1233
1145
  }
1234
1146
  export interface ListPoolsRequest {
@@ -1319,9 +1231,7 @@ export interface MaskedPool {
1319
1231
  }
1320
1232
  export interface BulkUpdatePoolsResponse {
1321
1233
  /**
1322
- * List of results for each pool.
1323
- *
1324
- * Includes the pool, pool metadata, and whether the update was successful.
1234
+ * List of updated pools and associated metadata.
1325
1235
  * @minSize 1
1326
1236
  * @maxSize 100
1327
1237
  */
@@ -1332,7 +1242,7 @@ export interface BulkUpdatePoolsResponse {
1332
1242
  export interface BulkPoolResult {
1333
1243
  /** Pool metadata. */
1334
1244
  poolMetadata?: ItemMetadata;
1335
- /** Only exists if `returnEntity` was set to true in the request */
1245
+ /** Pool data. */
1336
1246
  pool?: Pool;
1337
1247
  }
1338
1248
  export interface ItemMetadata {
@@ -1823,7 +1733,7 @@ export interface BulkUpdatePoolsResponseNonNullableFields {
1823
1733
  bulkActionMetadata?: BulkActionMetadataNonNullableFields;
1824
1734
  }
1825
1735
  /**
1826
- * Retrieves a benefit pool.
1736
+ * Retrieves a pool.
1827
1737
  * @param poolId - ID of the pool to retrieve.
1828
1738
  * @public
1829
1739
  * @documentationMaturity preview
@@ -1841,7 +1751,7 @@ export interface BulkUpdatePoolsResponseNonNullableFields {
1841
1751
  */
1842
1752
  export declare function getPool(poolId: string): Promise<Pool & PoolNonNullableFields>;
1843
1753
  /**
1844
- * Updates a benefit pool.
1754
+ * Updates a pool.
1845
1755
  *
1846
1756
  * Each time the pool is updated,
1847
1757
  * `revision` increments by 1.
@@ -1888,45 +1798,41 @@ export interface UpdatePool {
1888
1798
  */
1889
1799
  _updatedDate?: Date | null;
1890
1800
  /**
1891
- * Pool definition from which this benefit pool was created.
1801
+ * ID of the associated pool definition.
1892
1802
  * @format GUID
1893
1803
  * @readonly
1894
1804
  */
1895
1805
  poolDefinitionId?: string | null;
1896
1806
  /**
1897
- * Program definition from which this benefit pool was provisioned.
1807
+ * ID of the associated program definition.
1898
1808
  * @format GUID
1899
1809
  * @readonly
1900
1810
  */
1901
1811
  programDefinitionId?: string | null;
1902
1812
  /**
1903
- * ID of the program to which this benefit pool is associated.
1813
+ * ID of the program that contains this pool.
1904
1814
  * @format GUID
1905
1815
  * @readonly
1906
1816
  */
1907
1817
  programId?: string | null;
1908
1818
  /**
1909
- * Benefit pool status.
1819
+ * Pool status.
1910
1820
  * @readonly
1911
1821
  */
1912
1822
  status?: PoolStatus;
1913
- /** Benefit pool owner. */
1823
+ /** Pool beneficiary. */
1914
1824
  beneficiary?: CommonIdentificationData;
1915
- /**
1916
- * Benefit pool information.
1917
- *
1918
- * Includes the item, policy, and credit configurations.
1919
- */
1825
+ /** Pool benefits and settings. */
1920
1826
  details?: Details;
1921
1827
  /**
1922
1828
  * Pool name.
1923
1829
  *
1924
- * It's recommended to keep the same as the associated pool definition's `displayName`.
1830
+ * You may want to use the same name that's used in the associated pool definition.
1925
1831
  * @maxLength 64
1926
1832
  */
1927
1833
  displayName?: string;
1928
1834
  /**
1929
- * External system that is the source of the program creation. For example, `wix-pricing-plans`, `wix-loyalty`.
1835
+ * Namespace for your app or site's benefit programs.
1930
1836
  * @immutable
1931
1837
  * @minLength 1
1932
1838
  * @maxLength 50
@@ -1934,28 +1840,27 @@ export interface UpdatePool {
1934
1840
  namespace?: string | null;
1935
1841
  /**
1936
1842
  * Custom field data for the pool object.
1843
+ *
1937
1844
  * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.
1938
1845
  */
1939
1846
  extendedFields?: ExtendedFields;
1940
1847
  /**
1941
- * Program definition information.
1848
+ * Associated program definition information.
1942
1849
  * @readonly
1943
1850
  */
1944
1851
  programDefinition?: ProgramDefinitionInfo;
1945
1852
  /**
1946
- * Program information.
1853
+ * Information about the program containing the pool.
1947
1854
  * @readonly
1948
1855
  */
1949
1856
  program?: PoolProgramInfo;
1950
1857
  /**
1951
- * Version of the associated pool definition at the this benefit pool was created.
1952
- *
1953
- * `poolDefinition.revision`.
1858
+ * Version of the pool definition that this pool was created from.
1954
1859
  * @readonly
1955
1860
  */
1956
1861
  poolDefinitionRevision?: string | null;
1957
1862
  /**
1958
- * Number of times this benefit pool has been renewed.
1863
+ * Number of times this pool has been renewed.
1959
1864
  * @readonly
1960
1865
  */
1961
1866
  renewalCount?: number | null;
@@ -1963,13 +1868,15 @@ export interface UpdatePool {
1963
1868
  /**
1964
1869
  * Creates a query to retrieve a list of pools.
1965
1870
  *
1966
- * The `queryPools()` method builds a query to retrieve a list of pools and returns a `PoolsQueryBuilder` object.
1871
+ * The Query Pools method builds a query to retrieve a list of pools and returns a `PoolsQueryBuilder` object.
1872
+ *
1873
+ * The returned object contains the query definition, which is used to run the query using the `find()` method.
1967
1874
  *
1968
- * The returned object contains the query definition, which is used to run the query using the [`find()`](/pools/pools-query-builder/find) function.
1875
+ * 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.
1969
1876
  *
1970
- * You can refine the query by chaining `PoolsQueryBuilder` methods onto the query. `PoolsQueryBuilder` methods enable you to filter, sort, and control the results that `queryPools()` returns.
1877
+ * Query Pools has a default paging limit of 50, which you can override.
1971
1878
  *
1972
- * The following `PoolsQueryBuilder` functions are supported for `queryPools()`. For a full description of the pool object, see the object returned for the [`items`](/pools/pools-query-result/items) property in `PoolsQueryResult`.
1879
+ * For a full description of the item object, see the object returned for the `items` property in `PoolsQueryResult`.
1973
1880
  * @public
1974
1881
  * @documentationMaturity preview
1975
1882
  * @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
@@ -2061,14 +1968,10 @@ export interface PoolsQueryBuilder {
2061
1968
  find: () => Promise<PoolsQueryResult>;
2062
1969
  }
2063
1970
  /**
2064
- * Redeems a benefit by the pool owner in exchange for available credits from the benefit pool.
2065
- *
2066
- * The mechanism of purchasing specified benefit items.
2067
- *
2068
- * Benefit redemption adjusts the available credits in the pool's balance to reflect the new balance after the transaction.
1971
+ * Redeems a specified benefit.
2069
1972
  *
2070
- * Upon redemption, a new transaction is created, maintaining balance history for the benefit pool.
2071
- * @param poolId - ID of the benefit pool being redeemed.
1973
+ * 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.
1974
+ * @param poolId - ID of the pool that benefit to redeem belongs to.
2072
1975
  * @public
2073
1976
  * @documentationMaturity preview
2074
1977
  * @requiredField options.benefitKey
@@ -2086,26 +1989,22 @@ export interface PoolsQueryBuilder {
2086
1989
  */
2087
1990
  export declare function redeemBenefit(poolId: string, options?: RedeemBenefitOptions): Promise<RedeemBenefitResponse & RedeemBenefitResponseNonNullableFields>;
2088
1991
  export interface RedeemBenefitOptions {
2089
- /** Reference of the benefit item that is being redeemed. */
1992
+ /** Information about the item being to redeem. */
2090
1993
  itemReference: ItemReference;
2091
1994
  /**
2092
- * Key of the specific benefit to be redeemed.
2093
- *
2094
- * This needs to be specified to ensure the correct benefit is redeemed.
1995
+ * Key of the benefit to redeem.
2095
1996
  * @maxLength 64
2096
1997
  */
2097
1998
  benefitKey: string;
2098
1999
  /**
2099
- * Number of of items to redeem.
2000
+ * Amount of items to redeem.
2100
2001
  * @min 1
2101
2002
  */
2102
2003
  count?: number;
2103
2004
  /**
2104
- * Date when the benefit item will be used.
2105
- *
2106
- * While credit balance is adjusted immediately upon the redemption request, the target date may be set for a later time than the date of the request.
2005
+ * Date that the item will be provided to the beneficiary.
2107
2006
  *
2108
- * Used for the app providing the benefit items to manage the logistics associated with the item.
2007
+ * The pool's associated balance will update immediately. This parameter should be used to manage the logistics of providing the item.
2109
2008
  */
2110
2009
  targetDate?: Date | null;
2111
2010
  /**
@@ -2116,22 +2015,20 @@ export interface RedeemBenefitOptions {
2116
2015
  idempotencyKey: string;
2117
2016
  /** Additional information. */
2118
2017
  additionalData?: Record<string, any> | null;
2119
- /** Benefit pool owner. */
2018
+ /** Beneficiary of the pool containing the benefit to redeem. */
2120
2019
  beneficiary?: CommonIdentificationData;
2121
2020
  /**
2122
- * Module that is the source of the benefit pool creation.
2123
- *
2124
- * Must match the previously defined namespace in the associated pool definition.
2021
+ * Namespace for your app or site's benefit programs.
2125
2022
  * @minLength 1
2126
2023
  * @maxLength 50
2127
2024
  */
2128
2025
  namespace: string;
2129
2026
  }
2130
2027
  /**
2131
- * Checks if a benefit can be redeemed based on the current credit status of the benefit pool.
2028
+ * Checks if a benefit can currently be redeemed.
2132
2029
  *
2133
- * Manually verify if their is a sufficient credit balance, and that all policy requirements are met prior to redeeming the benefit.
2134
- * @param poolId - ID of the benefit pool to check eligibility against.
2030
+ * In order to be a redeemed, a benefit's pool must be active and the associated balance must greater than the cost of the benefit.
2031
+ * @param poolId - ID of the pool that the benefit to check belongs to.
2135
2032
  * @public
2136
2033
  * @documentationMaturity preview
2137
2034
  * @requiredField options.itemReference
@@ -2148,50 +2045,40 @@ export interface RedeemBenefitOptions {
2148
2045
  export declare function checkBenefitEligibility(poolId: string, options?: CheckBenefitEligibilityOptions): Promise<CheckBenefitEligibilityResponse & CheckBenefitEligibilityResponseNonNullableFields>;
2149
2046
  export interface CheckBenefitEligibilityOptions {
2150
2047
  /**
2151
- * Key of the benefit to be redeemed, associated with a particular benefit.
2152
- *
2153
- * This key must be specified to ensure the correct benefit is redeemed.
2154
- *
2155
- * Default: The first eligible benefit in the benefit pool will be redeemed.
2048
+ * Key of the benefit to check.
2156
2049
  * @maxLength 64
2157
2050
  */
2158
2051
  benefitKey?: string | null;
2159
- /** Reference of the item for which to check benefit's eligibility. */
2052
+ /** Information about the item to check. */
2160
2053
  itemReference: ItemReference;
2161
2054
  /**
2162
- * Number of items for which to check eligibility.
2055
+ * Amount of items to check.
2163
2056
  *
2164
- * This number will be evaluated against the policies and credit balance of the benefit pool to determine if sufficient funds are met for the specified number of items.
2057
+ * Ensures the balance is high enough to redeem this many items.
2165
2058
  * @min 1
2166
2059
  */
2167
2060
  count?: number;
2168
2061
  /**
2169
- * Date when the benefit item will be used.
2062
+ * Date that the item will be provided to the beneficiary.
2170
2063
  *
2171
- * While credit balance is adjusted immediately upon the redemption request, the target date may be set for a later time than the date of the request.
2172
- *
2173
- * Used for the app providing the benefit items to manage the logistics associated with the item.
2064
+ * This parameter should be used to manage the potential logistics of providing the item.
2174
2065
  */
2175
2066
  targetDate?: Date | null;
2176
- /** Additional info */
2067
+ /** Additional information. */
2177
2068
  additionalData?: Record<string, any> | null;
2178
- /** Benefit pool owner. */
2069
+ /** Beneficiary of the pool containing the benefit to check. */
2179
2070
  beneficiary?: CommonIdentificationData;
2180
2071
  /**
2181
- * Module that is the source of the benefit pool creation.
2182
- *
2183
- * This value must correspond with the previously defined namespace established when creating the associated pool definition.
2184
- *
2185
- * It ensures efficient processing and management of pools and benefits.
2072
+ * Namespace for your app or site's benefit programs.
2186
2073
  * @minLength 1
2187
2074
  * @maxLength 50
2188
2075
  */
2189
2076
  namespace: string;
2190
2077
  }
2191
2078
  /**
2192
- * Checks if multiple benefits can be redeemed based on the current credit balance of the benefit pool.
2079
+ * Checks if benefits can currently be redeemed.
2193
2080
  *
2194
- * Used to manually check if their is a sufficient credit balance, and that all policy requirements are met prior to redeeming the benefits.
2081
+ * In order to be a redeemed, a benefit's pool must be active and the associated balance must greater than the cost of the benefit. Each benefit is checked independently.
2195
2082
  * @public
2196
2083
  * @documentationMaturity preview
2197
2084
  * @requiredField options.benefitSelectors.itemReference
@@ -2208,27 +2095,26 @@ export interface CheckBenefitEligibilityOptions {
2208
2095
  export declare function bulkCheckBenefitEligibility(options?: BulkCheckBenefitEligibilityOptions): Promise<BulkCheckBenefitEligibilityResponse & BulkCheckBenefitEligibilityResponseNonNullableFields>;
2209
2096
  export interface BulkCheckBenefitEligibilityOptions {
2210
2097
  /**
2211
- * Benefits to check eligibility.
2098
+ * List of benefits to check.
2212
2099
  * @minSize 1
2213
2100
  * @maxSize 100
2214
2101
  */
2215
2102
  benefitSelectors?: BenefitSelector[];
2216
2103
  /**
2217
- * Module that is the source of the benefit pool creation.
2218
- *
2219
- * This value must correspond with the previously defined namespace established when creating the associated pool definition.
2220
- *
2221
- * It ensures efficient processing and management of pools and benefits.
2104
+ * Namespace for your app or site's benefit programs.
2222
2105
  * @minLength 1
2223
2106
  * @maxLength 50
2224
2107
  */
2225
2108
  namespace: string;
2226
- /** Benefit pool owner. */
2109
+ /** Pool beneficiary. */
2227
2110
  beneficiary?: CommonIdentificationData;
2228
2111
  }
2229
2112
  /**
2230
- * Retrieve available benefits that can be redeemed based on the current credit balance of the benefit pool.
2231
- * @param itemReference - Reference of the item for which all eligible pools will be returned.
2113
+ * Retrieves benefits that can be redeemed for a specific item.
2114
+ *
2115
+ * Each item can only be linked to 1 benefit in 1 pool definition. However, each pool created from that pool definition contains a benefit with this item.
2116
+ * This method checks each pool containing a benefit with this item, and returns the benefits that can be redeemed.
2117
+ * @param itemReference - Item reference.
2232
2118
  * @public
2233
2119
  * @documentationMaturity preview
2234
2120
  * @requiredField itemReference
@@ -2248,37 +2134,29 @@ export interface BulkCheckBenefitEligibilityOptions {
2248
2134
  export declare function getEligibleBenefits(itemReference: ItemReference, options?: GetEligibleBenefitsOptions): Promise<GetEligibleBenefitsResponse & GetEligibleBenefitsResponseNonNullableFields>;
2249
2135
  export interface GetEligibleBenefitsOptions {
2250
2136
  /**
2251
- * Number of items for which to check eligibility.
2252
- *
2253
- * This number will be evaluated against the policies and credit balance of the benefit pool to determine if sufficient funds are met for the specified number of items.
2137
+ * Amount of items to check. This ensures the balance is high enough to redeem this many items.
2254
2138
  * @min 1
2255
2139
  */
2256
2140
  count?: number;
2257
2141
  /**
2258
- * Date when the benefit item will be used.
2259
- *
2260
- * While credit balance is adjusted immediately upon the redemption request, the target date may be set for a later time than the date of the request.
2142
+ * Date that the item will be provided to the beneficiary.
2261
2143
  *
2262
- * Used for the app providing the benefit items to manage the logistics associated with the item.
2144
+ * This parameter should be used to manage the potential logistics of providing the item.
2263
2145
  */
2264
2146
  targetDate?: Date | null;
2265
2147
  /** Additional information. */
2266
2148
  additionalData?: Record<string, any> | null;
2267
- /** Benefit pool owner. */
2149
+ /** Filter request by beneficiary. */
2268
2150
  beneficiary?: CommonIdentificationData;
2269
2151
  /**
2270
- * Module that is the source of the benefit pool creation.
2271
- *
2272
- * This value must correspond with the previously defined namespace established when creating the associated pool definition.
2273
- *
2274
- * It ensures efficient processing and management of pools and benefits.
2152
+ * Namespace for your app or site's benefit programs.
2275
2153
  * @minLength 1
2276
2154
  * @maxLength 50
2277
2155
  */
2278
2156
  namespace: string;
2279
2157
  }
2280
2158
  /**
2281
- * Updates multiple benefit pools.
2159
+ * Updates pools.
2282
2160
  * @public
2283
2161
  * @documentationMaturity preview
2284
2162
  * @requiredField options.pools.pool