@wix/auto_sdk_benefit-programs_pool-definitions 1.0.2 → 1.0.4

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 (49) hide show
  1. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.context.d.ts +1 -1
  2. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.http.d.ts +13 -33
  3. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.http.js +13 -33
  4. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.http.js.map +1 -1
  5. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.public.d.ts +16 -28
  6. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.public.js.map +1 -1
  7. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.types.d.ts +104 -179
  8. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.types.js +12 -23
  9. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.types.js.map +1 -1
  10. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.universal.d.ts +140 -257
  11. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.universal.js +27 -50
  12. package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.universal.js.map +1 -1
  13. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.context.d.ts +1 -1
  14. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.http.d.ts +13 -33
  15. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.http.js +13 -33
  16. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.http.js.map +1 -1
  17. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.public.d.ts +16 -28
  18. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.public.js.map +1 -1
  19. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.types.d.ts +104 -179
  20. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.types.js +12 -23
  21. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.types.js.map +1 -1
  22. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.universal.d.ts +140 -257
  23. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.universal.js +27 -50
  24. package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.universal.js.map +1 -1
  25. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.context.d.ts +1 -1
  26. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.http.d.ts +13 -33
  27. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.http.js +13 -33
  28. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.http.js.map +1 -1
  29. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.public.d.ts +16 -28
  30. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.public.js.map +1 -1
  31. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.types.d.ts +104 -179
  32. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.types.js +12 -23
  33. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.types.js.map +1 -1
  34. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.universal.d.ts +140 -257
  35. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.universal.js +27 -50
  36. package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.universal.js.map +1 -1
  37. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.context.d.ts +1 -1
  38. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.http.d.ts +13 -33
  39. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.http.js +13 -33
  40. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.http.js.map +1 -1
  41. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.public.d.ts +16 -28
  42. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.public.js.map +1 -1
  43. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.types.d.ts +104 -179
  44. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.types.js +12 -23
  45. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.types.js.map +1 -1
  46. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.universal.d.ts +140 -257
  47. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.universal.js +27 -50
  48. package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.universal.js.map +1 -1
  49. package/package.json +2 -2
@@ -24,28 +24,20 @@ export interface PoolDefinition {
24
24
  */
25
25
  _updatedDate?: Date | null;
26
26
  /**
27
- * Name of the pool definition.
27
+ * Pool definition name.
28
28
  * @maxLength 128
29
29
  */
30
30
  displayName?: string;
31
31
  /**
32
- * List of program definitions that are associated with this pool definition.
32
+ * List of program definition IDs that are associated with this pool definition.
33
33
  * @format GUID
34
34
  * @maxSize 100
35
35
  */
36
36
  programDefinitionIds?: string[];
37
- /**
38
- * Benefit pool information.
39
- *
40
- * Includes the item, policy, and credit configurations.
41
- */
37
+ /** Pool definition benefits and settings. */
42
38
  details?: Details;
43
39
  /**
44
- * Application sub-module that represents the source of the pool definition. Specified by the external developer.
45
- *
46
- * This namespace is used to organize and retrieve pool definitions and their associated benefit pools.
47
- *
48
- * It should match the namespace used in the program definitions.
40
+ * Namespace for your app or site's benefit programs.
49
41
  * @immutable
50
42
  * @minLength 1
51
43
  * @maxLength 50
@@ -54,82 +46,55 @@ export interface PoolDefinition {
54
46
  /**
55
47
  * Custom field data for the pool definition object.
56
48
  *
57
- * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.
49
+ * [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.
58
50
  */
59
51
  extendedFields?: ExtendedFields;
60
52
  }
61
53
  export interface Details {
62
54
  /**
63
- * Array of benefits, each containing price and policy settings specific to that benefit within the pool.
55
+ * Array of benefits.
64
56
  * @maxSize 10
65
57
  */
66
58
  benefits?: Benefit[];
67
59
  /**
68
- * Settings that control the initial credits and renewal cycle configurations of the benefit pool.
60
+ * Credit settings.
69
61
  *
70
- * Default: Benefits may be redeemed without limit.
62
+ * If this object is empty, you can't set a price for the benefit.
71
63
  */
72
64
  creditConfiguration?: CreditConfiguration;
73
- /**
74
- * 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.
75
- *
76
- * Policy types may be either:
77
- *
78
- * + FIXED INTERVALS: Specifies the timing during the day.
79
- *
80
- * + RATE LIMITED: Specifies how many times the benefit can be redeemed within a given renewal cycle.
81
- *
82
- * Each selected policy type must have its corresponding policy options. For example, the `fixedInterval` type requires `fixedIntervalOptions` to be included in the parameters.
83
- *
84
- * 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.
85
- */
86
- policyExpression?: PolicyExpression;
87
- /** Additional info set by the benefit provider. */
65
+ /** Additional information relating to this object. */
88
66
  additionalData?: Record<string, any> | null;
89
67
  }
90
68
  export interface Benefit {
91
69
  /**
92
- * An unique identifier for a pool benefit.
70
+ * Unique identifier for this benefit.
93
71
  *
94
- * This key is consistent across the pool definition and all its associated benefit pools.
72
+ * This key is consistent across the pool definition and all associated pools that contain this benefit.
95
73
  * @maxLength 64
96
74
  */
97
75
  benefitKey?: string;
98
76
  /**
99
- * Represents the associated benefit item that belongs to a benefit pool.
100
- *
101
- * This ID is returned when calling Create Item.
102
- *
103
- * 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.
77
+ * ID that is used to associated items with this benefit.
104
78
  * @format GUID
105
79
  * @immutable
106
80
  * @readonly
107
81
  */
108
82
  itemSetId?: string | null;
109
83
  /**
110
- * Price of the benefit item as expressed in credits.
111
- * Represents the cost to redeem the benefit.
112
- *
113
- * 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.
84
+ * Price of the benefit in credits. The price is the same for all of this benefit's items.
114
85
  * @decimalValue options { gte:0, maxScale:4 }
115
86
  */
116
87
  price?: string | null;
117
- /**
118
- * 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.
119
- *
120
- * Overrides the default policies in `benefit.details`.
121
- */
122
- policyExpression?: PolicyExpression;
123
- /** Additional info that was set by the benefit provider. */
88
+ /** Additional information for this benefit. */
124
89
  additionalData?: Record<string, any> | null;
125
90
  /**
126
- * ID of the app providing the benefit.
91
+ * ID of the app providing the benefit items.
127
92
  * @format GUID
128
93
  * @immutable
129
94
  */
130
95
  providerAppId?: string | null;
131
96
  /**
132
- * Benefit display name.
97
+ * Benefit name.
133
98
  * @maxLength 40
134
99
  */
135
100
  displayName?: string | null;
@@ -140,50 +105,46 @@ export interface Benefit {
140
105
  description?: string | null;
141
106
  }
142
107
  export interface PolicyExpression extends PolicyExpressionExpressionOneOf {
143
- /** Negates the expression. */
108
+ /** Benefits can be redeemed if the expression in this object is not fulfilled. */
144
109
  operatorNotOptions?: PolicyExpressionNot;
145
- /** Combines the expressions with an `AND` operator. */
110
+ /** Benefits can be redeemed if all the expression in this object's array are fulfilled. */
146
111
  operatorAndOptions?: PolicyExpressionAnd;
147
- /** Combines the expressions with an `OR` operator. */
112
+ /** Benefits can be redeemed if at least one of the expressions in this object's array is fulfilled. */
148
113
  operatorOrOptions?: PolicyExpressionOr;
149
- /** Defines policy terms for benefit redemption. */
114
+ /** Defines when benefits can be redeemed or how many benefits can be redeemed in a specific time period. */
150
115
  policyOptions?: Policy;
151
- /**
152
- * Declare type of policy conditions or settings to use. Use together with the associated policy options to construct policy terms.
153
- *
154
- * Different operators can be used to combine multiple policy terms.
155
- */
116
+ /** Policy expression type. */
156
117
  type?: PolicyExpressionType;
157
118
  }
158
119
  /** @oneof */
159
120
  export interface PolicyExpressionExpressionOneOf {
160
- /** Negates the expression. */
121
+ /** Benefits can be redeemed if the expression in this object is not fulfilled. */
161
122
  operatorNotOptions?: PolicyExpressionNot;
162
- /** Combines the expressions with an `AND` operator. */
123
+ /** Benefits can be redeemed if all the expression in this object's array are fulfilled. */
163
124
  operatorAndOptions?: PolicyExpressionAnd;
164
- /** Combines the expressions with an `OR` operator. */
125
+ /** Benefits can be redeemed if at least one of the expressions in this object's array is fulfilled. */
165
126
  operatorOrOptions?: PolicyExpressionOr;
166
- /** Defines policy terms for benefit redemption. */
127
+ /** Defines when benefits can be redeemed or how many benefits can be redeemed in a specific time period. */
167
128
  policyOptions?: Policy;
168
129
  }
169
130
  export declare enum PolicyExpressionType {
170
131
  UNKNOWN = "UNKNOWN",
171
- /** Use with associated `operatorNotOptions`. */
132
+ /** Use with `operatorNotOptions`. */
172
133
  OPERATOR_NOT = "OPERATOR_NOT",
173
- /** Use with associated `operatorAndOptions`. */
134
+ /** Use with `operatorAndOptions`. */
174
135
  OPERATOR_AND = "OPERATOR_AND",
175
- /** Use with associated `operatorOrOptions`. */
136
+ /** Use with `operatorOrOptions`. */
176
137
  OPERATOR_OR = "OPERATOR_OR",
177
- /** Use with associated `policyOptions` to define a policy. */
138
+ /** Use with `policyOptions`. */
178
139
  POLICY = "POLICY"
179
140
  }
180
141
  export interface PolicyExpressionNot {
181
- /** Specify policy terms where none of specified policy conditions should be met. Must specify an object with an `expressions` property. */
142
+ /** Policy expression. If this expression is not fulfilled, benefits can be redeemed. */
182
143
  expression?: PolicyExpression;
183
144
  }
184
145
  export interface PolicyExpressionAnd {
185
146
  /**
186
- * Specify policy terms where all policy conditions must be met. Must specify an object with an `expressions` property.
147
+ * Array of policy expressions. If all expressions are fulfilled, benefits can be redeemed.
187
148
  * @minSize 2
188
149
  * @maxSize 10
189
150
  */
@@ -191,62 +152,71 @@ export interface PolicyExpressionAnd {
191
152
  }
192
153
  export interface PolicyExpressionOr {
193
154
  /**
194
- * Specify policy terms where at least one of the possible specified policy conditions is met. Must specify an object with an `expressions` property.
155
+ * Array of policy expressions. If at least one expression is fulfilled, benefits can be redeemed.
195
156
  * @minSize 2
196
157
  * @maxSize 10
197
158
  */
198
159
  expressions?: PolicyExpression[];
199
160
  }
200
161
  export interface Policy extends PolicyPolicyOneOf {
201
- /** Defines the timing of benefit policy redemption for specific days or hours. */
162
+ /**
163
+ * Defines an interval during which the policy expression is fulfilled.
164
+ *
165
+ * If `fromWeekDay` and `toWeekDay` are defined, this interval applies weekly. Otherwise, it applies daily.
166
+ */
202
167
  fixedIntervalOptions?: FixedIntervalPolicy;
203
- /** Sets a limit on the number of times a benefit can be redeemed within a given renewal cycle. */
168
+ /** Maximum amount of times a benefit can be redeemed during a specified time period. */
204
169
  rateLimitedOptions?: RateLimitedPolicy;
205
- /** Custom policy definition that is controlled by the CustomPolicyProvider. */
170
+ /** Custom policy defined by a different app. */
206
171
  customOptions?: CustomPolicy;
207
- /** Specific policy setting. Use together with its associated policy type options. For example, a fixed interval policy type should include a `fixedIntervalOptions` parameter. */
172
+ /** Policy type. */
208
173
  type?: Type;
209
174
  }
210
175
  /** @oneof */
211
176
  export interface PolicyPolicyOneOf {
212
- /** Defines the timing of benefit policy redemption for specific days or hours. */
177
+ /**
178
+ * Defines an interval during which the policy expression is fulfilled.
179
+ *
180
+ * If `fromWeekDay` and `toWeekDay` are defined, this interval applies weekly. Otherwise, it applies daily.
181
+ */
213
182
  fixedIntervalOptions?: FixedIntervalPolicy;
214
- /** Sets a limit on the number of times a benefit can be redeemed within a given renewal cycle. */
183
+ /** Maximum amount of times a benefit can be redeemed during a specified time period. */
215
184
  rateLimitedOptions?: RateLimitedPolicy;
216
- /** Custom policy definition that is controlled by the CustomPolicyProvider. */
185
+ /** Custom policy defined by a different app. */
217
186
  customOptions?: CustomPolicy;
218
187
  }
219
188
  export declare enum Type {
220
189
  /** Unknown policy type. */
221
190
  UNKNOWN = "UNKNOWN",
222
- /** Fixed interval policy type. */
191
+ /** Use with `fixedIntervalOptions`. */
223
192
  FIXED_INTERVAL = "FIXED_INTERVAL",
224
- /** Rate limited policy type. */
193
+ /** Use with `rateLimitedOptions`. */
225
194
  RATE_LIMITED = "RATE_LIMITED",
195
+ /** Use with `customOptions`. */
226
196
  CUSTOM = "CUSTOM"
227
197
  }
228
198
  export interface FixedIntervalPolicy {
229
- /** Weekday that this interval starts from. If this field is set, then `toWeekDay` must also be set. */
199
+ /** Weekday that this interval starts from. If this field is defined, then `toWeekDay` is required. */
230
200
  fromWeekDay?: WeekDay;
231
- /** Weekday that this interval ends at. If this field is set, then `fromWeekDay` must also be set. */
201
+ /** Weekday that this interval ends at. If this field is defined, then `fromWeekDay` is required. */
232
202
  toWeekDay?: WeekDay;
233
203
  /**
234
- * Hour that this interval starts from. If this field is set, then `toHour` must also be set.
204
+ * Hour that this interval starts from. If this field is defined, then `toHour` is required.
235
205
  * @max 23
236
206
  */
237
207
  fromHour?: number | null;
238
208
  /**
239
- * Hour that this interval ends at. If this field is set, then `fromHour` must also be set.
209
+ * Hour that this interval ends at. If this field is defined, then `fromHour` is required.
240
210
  * @max 23
241
211
  */
242
212
  toHour?: number | null;
243
213
  /**
244
- * Minute that this interval starts from. If this field is set, then `toMinute` must also be set.
214
+ * Minute that this interval starts from. If this field is defined, then `toMinute` is required.
245
215
  * @max 59
246
216
  */
247
217
  fromMinute?: number | null;
248
218
  /**
249
- * Minute that this interval ends at. If this field is set, then `fromMinute` must also be set.
219
+ * Minute that this interval ends at. If this field is defined, then `fromMinute` is required.
250
220
  * @max 59
251
221
  */
252
222
  toMinute?: number | null;
@@ -270,70 +240,60 @@ export declare enum WeekDay {
270
240
  SUNDAY = "SUNDAY"
271
241
  }
272
242
  export interface RateLimitedPolicy extends RateLimitedPolicyPeriodOneOf {
273
- /**
274
- * Defines the timing of benefit policy redemption for specific days or hours.
275
- *
276
- * Used to set the timing policy for a maximum limit of redemptions.
277
- */
243
+ /** Fixed interval used to limit benefit redemption. */
278
244
  fixedIntervalOptions?: FixedIntervalPolicy;
279
- /** Maximum number of times benefit can be redeemed per renewal cycle. */
245
+ /** Maximum number of times a benefit can be redeemed per specified time period. */
280
246
  times?: number;
281
- /** Specific method of setting the benefit limit. `FIXED_INTERVAL` type must be used with its corresponding `fixIntervalPolicyOptions` parameter. */
247
+ /** Time period type. */
282
248
  type?: RateLimitedPolicyType;
283
249
  }
284
250
  /** @oneof */
285
251
  export interface RateLimitedPolicyPeriodOneOf {
286
- /**
287
- * Defines the timing of benefit policy redemption for specific days or hours.
288
- *
289
- * Used to set the timing policy for a maximum limit of redemptions.
290
- */
252
+ /** Fixed interval used to limit benefit redemption. */
291
253
  fixedIntervalOptions?: FixedIntervalPolicy;
292
254
  }
293
255
  export declare enum RateLimitedPolicyType {
294
256
  /** Unknown rate limit method. */
295
257
  UNKNOWN = "UNKNOWN",
296
- /** Fixed interval rate limit. The intervals are set using `fixIntervalPolicyOptions`. */
258
+ /** Time period is defined using `fixedIntervalOptions`. */
297
259
  FIXED_INTERVAL = "FIXED_INTERVAL",
298
- /** Rate limit is set with `times` field above. */
260
+ /** Time period is from one program renewal to the next. */
299
261
  PER_CYCLE = "PER_CYCLE"
300
262
  }
301
263
  /** Custom policy as implemented by the Entitlement Policy Provider */
302
264
  export interface CustomPolicy {
303
265
  /**
304
- * References a specific custom policy on the provider's system
266
+ * Policy ID.
305
267
  * @format GUID
306
268
  */
307
269
  _id?: string;
308
270
  /**
309
- * Custom policy provider id
271
+ * ID of the app providing the policy.
310
272
  * @format GUID
311
273
  */
312
274
  appId?: string | null;
313
- /** Additional info for this custom policy. It's going to be passed to the policy provider during eligibility checks */
275
+ /** Additional information for this custom policy. */
314
276
  additionalData?: Record<string, any> | null;
315
277
  }
316
278
  export interface CreditConfiguration {
317
279
  /**
318
- * The initial total amount of credits available in this benefit pool.
280
+ * Initial available amount for associated balances.
319
281
  * @decimalValue options { gte:0, maxScale:4 }
320
282
  */
321
283
  amount?: string;
322
- /** Rollover configuration. */
284
+ /** Rollover settings. */
323
285
  rolloverConfiguration?: RolloverConfiguration;
324
286
  /**
325
- * Display name of the unit.
287
+ * Credit unit display name.
326
288
  * @maxLength 32
327
289
  */
328
290
  unitDisplayName?: string | null;
329
291
  }
330
292
  export interface RolloverConfiguration {
331
- /** Determine whether unused credits are rolled over to the new cycle. */
293
+ /** Whether any amount of unused credits are rolled over to a new cycle when a program renews. */
332
294
  enabled?: boolean | null;
333
295
  /**
334
- * The maximum amount of credits that can be transferred to the next benefit renewal cycle.
335
- *
336
- * If current balance exceeds this cap, no credits will transfer into the next renewal cycle until the balance is within the allowable limit.
296
+ * The maximum amount of credits that can rollover to the next cycle when a program renews.
337
297
  * @decimalValue options { gte:0, maxScale:4 }
338
298
  */
339
299
  balanceCap?: string | null;
@@ -363,23 +323,11 @@ export interface PoolDefinitionAddedToProgramDefinition {
363
323
  export declare enum Cascade {
364
324
  /** Unknown cascade. */
365
325
  UNKNOWN_CASCADE = "UNKNOWN_CASCADE",
366
- /**
367
- * Updates the associated benefit pools to reflect the new or modified pool definition. The benefits will appear in existing programs at the beginning of their next renewal cycle.
368
- *
369
- * Existing programs will be updated in their next renewal cycle.
370
- */
326
+ /** Changes are applied to existing programs and pools when they are next renewed. */
371
327
  NEXT_RENEWAL = "NEXT_RENEWAL",
372
- /**
373
- * Updates the associated benefit pools to reflect the new or modified pool definition immediately.
374
- *
375
- * Existing programs will be updated immediately.
376
- */
328
+ /** Changes are applied to associated programs and pools immediately. */
377
329
  IMMEDIATELY = "IMMEDIATELY",
378
- /**
379
- * Updates the associated benefit pools to reflect the new or modified pool definition the next time the benefit pools are provisioned to a program.
380
- *
381
- * Existing programs will remain unaffected. Only newly purchased programs will display the benefits of this pool definition.
382
- */
330
+ /** Changes are not applied to existing associated programs and pools. They are only applied to future programs and pools. */
383
331
  FUTURE_PROVISIONS = "FUTURE_PROVISIONS"
384
332
  }
385
333
  export interface PoolDefinitionRemovedFromProgramDefinition {
@@ -400,13 +348,18 @@ export interface PoolDefinitionUpdatedProxySupport {
400
348
  /** PoolDefinition before the update */
401
349
  previousPoolDefinition?: PoolDefinition;
402
350
  }
351
+ /** This event is needed to support legacy benefit notification event. Should be only consumed in the proxy. */
352
+ export interface PoolDefinitionDeletedProxySupport {
353
+ /** PoolDefinition which was deleted */
354
+ deletedPoolDefinition?: PoolDefinition;
355
+ }
403
356
  export interface CreatePoolDefinitionRequest {
404
357
  /** Pool definition to create. */
405
358
  poolDefinition: PoolDefinition;
406
359
  /**
407
- * Specifies the timing of updates to associated benefit pools.
408
- * Determines how and when changes are applied to existing and future benefit pools.
409
- * Must be provided if `programDefinitionIds` are included in the `poolDefinition` parameter.
360
+ * Determines when the changes to this pool definition's associated program definitions will be applied to associated programs.
361
+ *
362
+ * Required if the `poolDefinition.programDefinitionIds` parameter is defined.
410
363
  */
411
364
  cascade?: Cascade;
412
365
  }
@@ -422,13 +375,13 @@ export interface BulkCreatePoolDefinitionsRequest {
422
375
  */
423
376
  poolDefinitions: PoolDefinition[];
424
377
  /**
425
- * Specifies the timing of updates to associated benefit pools.
426
- * Determines how and when changes are applied to existing and future benefit pools.
427
- * Must be provided if `programDefinitionIds` are included in the `poolDefinition` parameter.
378
+ * Determines when the changes to these pool definitions' associated program definitions will be applied to associated programs.
379
+ *
380
+ * Required if the `poolDefinition.programDefinitionIds` parameter is defined.
428
381
  */
429
382
  cascade?: Cascade;
430
383
  /**
431
- * Whether to return the full pool definition entities.
384
+ * Whether to return the created pool definitions.
432
385
  *
433
386
  * Default: `false`
434
387
  */
@@ -436,9 +389,7 @@ export interface BulkCreatePoolDefinitionsRequest {
436
389
  }
437
390
  export interface BulkCreatePoolDefinitionsResponse {
438
391
  /**
439
- * List of results for each pool definition.
440
- *
441
- * Includes the pool definition and whether the creation was successful.
392
+ * List of created pool definitions and associated metadata.
442
393
  * @minSize 1
443
394
  * @maxSize 100
444
395
  */
@@ -484,11 +435,7 @@ export interface BulkActionMetadata {
484
435
  export interface UpdatePoolDefinitionRequest {
485
436
  /** Pool definition to update. */
486
437
  poolDefinition: PoolDefinition;
487
- /**
488
- * Specifies the timing of updates to associated benefit pools.
489
- * Determines how and when changes are applied to existing and future benefit pools.
490
- * Required field.
491
- */
438
+ /** *Required.** Determines when the changes to this pool definition and its associated program definitions will be applied to associated programs and pools. */
492
439
  cascade?: Cascade;
493
440
  }
494
441
  export interface UpdatePoolDefinitionResponse {
@@ -502,30 +449,24 @@ export interface BulkUpdatePoolDefinitionsRequest {
502
449
  * @maxSize 100
503
450
  */
504
451
  poolDefinitions?: MaskedPoolDefinition[];
505
- /**
506
- * Specifies the timing of updates to associated benefit pools.
507
- * Determines how and when changes are applied to existing and future benefit pools.
508
- * Required field.
509
- */
452
+ /** *Required.** Determines when the changes to these pool definitions and their associated program definitions will be applied to associated programs and pools. */
510
453
  cascade?: Cascade;
511
454
  /**
512
- * Whether to return the full pool definition entities.
455
+ * Whether to return the updated pool definitions.
513
456
  *
514
457
  * Default: `false`
515
458
  */
516
459
  returnEntity?: boolean;
517
460
  }
518
461
  export interface MaskedPoolDefinition {
519
- /** Pool definition to be updated. */
462
+ /** Pool definition to update. */
520
463
  poolDefinition?: PoolDefinition;
521
464
  /** Explicit list of fields to update. */
522
465
  fieldMask?: string[];
523
466
  }
524
467
  export interface BulkUpdatePoolDefinitionsResponse {
525
468
  /**
526
- * List of results for each pool definition.
527
- *
528
- * Includes the pool definition and whether the update was successful.
469
+ * List of updated pool definitions and associated metadata.
529
470
  * @minSize 1
530
471
  * @maxSize 100
531
472
  */
@@ -539,11 +480,7 @@ export interface DeletePoolDefinitionRequest {
539
480
  * @format GUID
540
481
  */
541
482
  poolDefinitionId: string;
542
- /**
543
- * Defines how the delete operation cascades to related pools.
544
- * Specifies the timing of deletion regarding associated benefit pools.
545
- * Required if the pool definition is associated with any program definition IDs.
546
- */
483
+ /** *Required**. Determines when the changes to this pool definition and its associated program definitions will be applied to associated programs and pools. */
547
484
  cascade?: Cascade;
548
485
  }
549
486
  export interface DeletePoolDefinitionResponse {
@@ -556,17 +493,12 @@ export interface BulkDeletePoolDefinitionsRequest {
556
493
  * @format GUID
557
494
  */
558
495
  poolDefinitionIds: string[];
559
- /**
560
- * Specifies the timing of updates to associated benefit pools.
561
- * Required if any of the pool definitions listed for deletion are associated with a program definition ID.
562
- */
496
+ /** *Required**. Determines when the changes to these pool definitions and their associated program definitions will be applied to associated programs and pools. */
563
497
  cascade?: Cascade;
564
498
  }
565
499
  export interface BulkDeletePoolDefinitionsResponse {
566
500
  /**
567
- * List of results for each pool definition.
568
- *
569
- * Includes the pool definition and whether the deletion was successful.
501
+ * List of deleted pool definitions and associated metadata.
570
502
  * @minSize 1
571
503
  * @maxSize 100
572
504
  */
@@ -586,7 +518,7 @@ export interface GetPoolDefinitionResponse {
586
518
  poolDefinition?: PoolDefinition;
587
519
  }
588
520
  export interface QueryPoolDefinitionsRequest {
589
- /** Query to select pool definitions. */
521
+ /** Filter, sort, and paging to apply to the query. */
590
522
  query?: CursorQuery;
591
523
  }
592
524
  export interface CursorQuery extends CursorQueryPagingMethodOneOf {
@@ -644,7 +576,7 @@ export interface CursorPaging {
644
576
  cursor?: string | null;
645
577
  }
646
578
  export interface QueryPoolDefinitionsResponse {
647
- /** List of pool definitions. */
579
+ /** List of retrieved pool definitions. */
648
580
  poolDefinitions?: PoolDefinition[];
649
581
  /** Metadata for the paginated results. */
650
582
  metadata?: CursorPagingMetadata;
@@ -676,12 +608,12 @@ export interface Cursors {
676
608
  }
677
609
  export interface AddPoolDefinitionToProgramDefinitionRequest {
678
610
  /**
679
- * Pool definition to assign to the program definition.
611
+ * ID of the pool definition to assign to the program definition.
680
612
  * @format GUID
681
613
  */
682
614
  poolDefinitionId: string;
683
615
  /**
684
- * Program definition that the pool definition is assigned to.
616
+ * ID of the program definition to assign the pool definition to.
685
617
  * @format GUID
686
618
  */
687
619
  programDefinitionId: string;
@@ -692,24 +624,21 @@ export interface AddPoolDefinitionToProgramDefinitionRequest {
692
624
  cascade: Cascade;
693
625
  }
694
626
  export interface AddPoolDefinitionToProgramDefinitionResponse {
695
- /** Pool definition. */
627
+ /** Updated pool definition. */
696
628
  poolDefinition?: PoolDefinition;
697
629
  }
698
630
  export interface RemovePoolDefinitionFromProgramDefinitionRequest {
699
631
  /**
700
- * ID of the pool definition to be removed from the program definition.
632
+ * ID of the pool definition to remove from the program definition.
701
633
  * @format GUID
702
634
  */
703
635
  poolDefinitionId: string;
704
636
  /**
705
- * ID of the program definition being removed from the pool definition.
637
+ * ID of the program definition to remove the pool definition from.
706
638
  * @format GUID
707
639
  */
708
640
  programDefinitionId: string;
709
- /**
710
- * Specifies the timing of updates to associated benefit pools.
711
- * Determines how and when changes are applied to existing and future benefit pools.
712
- */
641
+ /** Determines when the changes to this program definition and pool definition will be applied to associated programs and pools. */
713
642
  cascade: Cascade;
714
643
  }
715
644
  export interface RemovePoolDefinitionFromProgramDefinitionResponse {
@@ -718,16 +647,12 @@ export interface RemovePoolDefinitionFromProgramDefinitionResponse {
718
647
  }
719
648
  export interface FindPoolDefinitionsByProgramDefinitionRequest {
720
649
  /**
721
- * ID of the program definition of which its assigned pool definitions are retrieved.
650
+ * ID of the program definition to retrieve its associated pool definitions.
722
651
  * @format GUID
723
652
  */
724
653
  programDefinitionId: string;
725
654
  /**
726
- * Application sub-module that represents the source of the pool definition. Specified by the external developer.
727
- *
728
- * This namespace is used to organize and retrieve pool definitions and their associated benefit pools.
729
- *
730
- * It should match the namespace used in the program definitions.
655
+ * Namespace for your app or site's benefit programs.
731
656
  * @minLength 1
732
657
  * @maxLength 50
733
658
  */
@@ -980,13 +905,7 @@ export interface FindPoolDefinitionsByProgramDefinitionResponseNonNullableFields
980
905
  poolDefinitions: PoolDefinitionNonNullableFields[];
981
906
  }
982
907
  /**
983
- * Creates a new pool definition.
984
- *
985
- * A pool definition can be assigned to multiple program definitions by specifying its program definition ID in the `programDefinitionIds` parameter.
986
- *
987
- * If `programDefinitionIds` included in the request are associated with any active programs, then new benefit pools will be instantly created and added to the programs.
988
- *
989
- * If you specify program definition IDs in the request, you must include the `cascade` parameter, to specify the timing of the update to existing programs.
908
+ * Creates a pool definition.
990
909
  * @param poolDefinition - Pool definition to create.
991
910
  * @public
992
911
  * @documentationMaturity preview
@@ -1006,14 +925,14 @@ export interface FindPoolDefinitionsByProgramDefinitionResponseNonNullableFields
1006
925
  export declare function createPoolDefinition(poolDefinition: PoolDefinition, options?: CreatePoolDefinitionOptions): Promise<PoolDefinition & PoolDefinitionNonNullableFields>;
1007
926
  export interface CreatePoolDefinitionOptions {
1008
927
  /**
1009
- * Specifies the timing of updates to associated benefit pools.
1010
- * Determines how and when changes are applied to existing and future benefit pools.
1011
- * Must be provided if `programDefinitionIds` are included in the `poolDefinition` parameter.
928
+ * Determines when the changes to this pool definition's associated program definitions will be applied to associated programs.
929
+ *
930
+ * Required if the `poolDefinition.programDefinitionIds` parameter is defined.
1012
931
  */
1013
932
  cascade?: Cascade;
1014
933
  }
1015
934
  /**
1016
- * Creates new pool definitions.
935
+ * Creates pool definitions.
1017
936
  * @param poolDefinitions - Pool definitions to create.
1018
937
  * @public
1019
938
  * @documentationMaturity preview
@@ -1032,13 +951,13 @@ export interface CreatePoolDefinitionOptions {
1032
951
  export declare function bulkCreatePoolDefinitions(poolDefinitions: PoolDefinition[], options?: BulkCreatePoolDefinitionsOptions): Promise<BulkCreatePoolDefinitionsResponse & BulkCreatePoolDefinitionsResponseNonNullableFields>;
1033
952
  export interface BulkCreatePoolDefinitionsOptions {
1034
953
  /**
1035
- * Specifies the timing of updates to associated benefit pools.
1036
- * Determines how and when changes are applied to existing and future benefit pools.
1037
- * Must be provided if `programDefinitionIds` are included in the `poolDefinition` parameter.
954
+ * Determines when the changes to these pool definitions' associated program definitions will be applied to associated programs.
955
+ *
956
+ * Required if the `poolDefinition.programDefinitionIds` parameter is defined.
1038
957
  */
1039
958
  cascade?: Cascade;
1040
959
  /**
1041
- * Whether to return the full pool definition entities.
960
+ * Whether to return the created pool definitions.
1042
961
  *
1043
962
  * Default: `false`
1044
963
  */
@@ -1092,28 +1011,20 @@ export interface UpdatePoolDefinition {
1092
1011
  */
1093
1012
  _updatedDate?: Date | null;
1094
1013
  /**
1095
- * Name of the pool definition.
1014
+ * Pool definition name.
1096
1015
  * @maxLength 128
1097
1016
  */
1098
1017
  displayName?: string;
1099
1018
  /**
1100
- * List of program definitions that are associated with this pool definition.
1019
+ * List of program definition IDs that are associated with this pool definition.
1101
1020
  * @format GUID
1102
1021
  * @maxSize 100
1103
1022
  */
1104
1023
  programDefinitionIds?: string[];
1105
- /**
1106
- * Benefit pool information.
1107
- *
1108
- * Includes the item, policy, and credit configurations.
1109
- */
1024
+ /** Pool definition benefits and settings. */
1110
1025
  details?: Details;
1111
1026
  /**
1112
- * Application sub-module that represents the source of the pool definition. Specified by the external developer.
1113
- *
1114
- * This namespace is used to organize and retrieve pool definitions and their associated benefit pools.
1115
- *
1116
- * It should match the namespace used in the program definitions.
1027
+ * Namespace for your app or site's benefit programs.
1117
1028
  * @immutable
1118
1029
  * @minLength 1
1119
1030
  * @maxLength 50
@@ -1122,20 +1033,16 @@ export interface UpdatePoolDefinition {
1122
1033
  /**
1123
1034
  * Custom field data for the pool definition object.
1124
1035
  *
1125
- * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.
1036
+ * [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.
1126
1037
  */
1127
1038
  extendedFields?: ExtendedFields;
1128
1039
  }
1129
1040
  export interface UpdatePoolDefinitionOptions {
1130
- /**
1131
- * Specifies the timing of updates to associated benefit pools.
1132
- * Determines how and when changes are applied to existing and future benefit pools.
1133
- * Required field.
1134
- */
1041
+ /** Required.** Determines when the changes to this pool definition and its associated program definitions will be applied to associated programs and pools. */
1135
1042
  cascade?: Cascade;
1136
1043
  }
1137
1044
  /**
1138
- * Updates multiple pool definitions.
1045
+ * Updates pool definitions.
1139
1046
  * @public
1140
1047
  * @documentationMaturity preview
1141
1048
  * @requiredField options.poolDefinitions.poolDefinition
@@ -1155,14 +1062,10 @@ export interface BulkUpdatePoolDefinitionsOptions {
1155
1062
  * @maxSize 100
1156
1063
  */
1157
1064
  poolDefinitions?: MaskedPoolDefinition[];
1158
- /**
1159
- * Specifies the timing of updates to associated benefit pools.
1160
- * Determines how and when changes are applied to existing and future benefit pools.
1161
- * Required field.
1162
- */
1065
+ /** Required.** Determines when the changes to these pool definitions and their associated program definitions will be applied to associated programs and pools. */
1163
1066
  cascade?: Cascade;
1164
1067
  /**
1165
- * Whether to return the full pool definition entities.
1068
+ * Whether to return the updated pool definitions.
1166
1069
  *
1167
1070
  * Default: `false`
1168
1071
  */
@@ -1182,15 +1085,11 @@ export interface BulkUpdatePoolDefinitionsOptions {
1182
1085
  */
1183
1086
  export declare function deletePoolDefinition(poolDefinitionId: string, options?: DeletePoolDefinitionOptions): Promise<void>;
1184
1087
  export interface DeletePoolDefinitionOptions {
1185
- /**
1186
- * Defines how the delete operation cascades to related pools.
1187
- * Specifies the timing of deletion regarding associated benefit pools.
1188
- * Required if the pool definition is associated with any program definition IDs.
1189
- */
1088
+ /** Required**. Determines when the changes to this pool definition and its associated program definitions will be applied to associated programs and pools. */
1190
1089
  cascade?: Cascade;
1191
1090
  }
1192
1091
  /**
1193
- * Delete multiple pool definitions.
1092
+ * Deletes pool definitions.
1194
1093
  * @param poolDefinitionIds - ID of the pool definitions to delete.
1195
1094
  * @public
1196
1095
  * @documentationMaturity preview
@@ -1203,10 +1102,7 @@ export interface DeletePoolDefinitionOptions {
1203
1102
  */
1204
1103
  export declare function bulkDeletePoolDefinitions(poolDefinitionIds: string[], options?: BulkDeletePoolDefinitionsOptions): Promise<BulkDeletePoolDefinitionsResponse & BulkDeletePoolDefinitionsResponseNonNullableFields>;
1205
1104
  export interface BulkDeletePoolDefinitionsOptions {
1206
- /**
1207
- * Specifies the timing of updates to associated benefit pools.
1208
- * Required if any of the pool definitions listed for deletion are associated with a program definition ID.
1209
- */
1105
+ /** Required**. Determines when the changes to these pool definitions and their associated program definitions will be applied to associated programs and pools. */
1210
1106
  cascade?: Cascade;
1211
1107
  }
1212
1108
  /**
@@ -1231,13 +1127,15 @@ export declare function getPoolDefinition(poolDefinitionId: string): Promise<Poo
1231
1127
  /**
1232
1128
  * Creates a query to retrieve a list of pool definitions.
1233
1129
  *
1234
- * The `queryPoolDefinitions()` method builds a query to retrieve a list of pool definitions and returns a `PoolDefinitionsQueryBuilder` object.
1130
+ * The Query Pool Definitions method builds a query to retrieve a list of pool definitions and returns a `PoolDefinitionsQueryBuilder` object.
1131
+ *
1132
+ * The returned object contains the query definition, which is used to run the query using the `find()` method.
1235
1133
  *
1236
- * The returned object contains the query definition, which is used to run the query using the [`find()`](/pool-definitions/pool-definitions-query-builder/find) function.
1134
+ * You can refine the query by chaining `PoolDefinitionsQueryBuilder` methods onto the query. `PoolDefinitionsQueryBuilder` methods enable you to filter, sort, and control the results that Query Pool Definitions returns.
1237
1135
  *
1238
- * You can refine the query by chaining `PoolDefinitionsQueryBuilder` methods onto the query. `PoolDefinitionsQueryBuilder` methods enable you to filter, sort, and control the results that `queryPoolDefinitions()` returns.
1136
+ * Query Pool Definitions has a default paging limit of 50, which you can override.
1239
1137
  *
1240
- * The following `PoolDefinitionsQueryBuilder` functions are supported for `queryPoolDefinitions()`. For a full description of the pool definition object, see the object returned for the [`items`](/pool-definitions/pool-definitions-query-result/items) property in `PoolDefinitionsQueryResult`.
1138
+ * For a full description of the item object, see the object returned for the `items` property in `PoolDefinitionsQueryResult`.
1241
1139
  * @public
1242
1140
  * @documentationMaturity preview
1243
1141
  * @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
@@ -1335,10 +1233,8 @@ export interface PoolDefinitionsQueryBuilder {
1335
1233
  find: () => Promise<PoolDefinitionsQueryResult>;
1336
1234
  }
1337
1235
  /**
1338
- * Assign a pool definition to a program definition.
1339
- *
1340
- * Links program definitions to existing pool definition so the defined pools will be included in the associated programs when they are provisioned.
1341
- * @param poolDefinitionId - Pool definition to assign to the program definition.
1236
+ * Creates an association between a pool definition and a program definition.
1237
+ * @param poolDefinitionId - ID of the pool definition to assign to the program definition.
1342
1238
  * @public
1343
1239
  * @documentationMaturity preview
1344
1240
  * @requiredField options
@@ -1354,7 +1250,7 @@ export interface PoolDefinitionsQueryBuilder {
1354
1250
  export declare function addPoolDefinitionToProgramDefinition(poolDefinitionId: string, options: AddPoolDefinitionToProgramDefinitionOptions): Promise<AddPoolDefinitionToProgramDefinitionResponse & AddPoolDefinitionToProgramDefinitionResponseNonNullableFields>;
1355
1251
  export interface AddPoolDefinitionToProgramDefinitionOptions {
1356
1252
  /**
1357
- * Program definition that the pool definition is assigned to.
1253
+ * ID of the program definition to assign the pool definition to.
1358
1254
  * @format GUID
1359
1255
  */
1360
1256
  programDefinitionId: string;
@@ -1365,12 +1261,8 @@ export interface AddPoolDefinitionToProgramDefinitionOptions {
1365
1261
  cascade: Cascade;
1366
1262
  }
1367
1263
  /**
1368
- * Unassign a pool definition from a program definition.
1369
- *
1370
- * This action prevents the programs from including the specified benefit pool in future provisioning cycles.
1371
- *
1372
- * Can modify or exclude benefit pools from active programs.
1373
- * @param poolDefinitionId - ID of the pool definition to be removed from the program definition.
1264
+ * Removes the association between a pool definition and a program definition.
1265
+ * @param poolDefinitionId - ID of the pool definition to remove from the program definition.
1374
1266
  * @public
1375
1267
  * @documentationMaturity preview
1376
1268
  * @requiredField options
@@ -1386,21 +1278,16 @@ export interface AddPoolDefinitionToProgramDefinitionOptions {
1386
1278
  export declare function removePoolDefinitionFromProgramDefinition(poolDefinitionId: string, options: RemovePoolDefinitionFromProgramDefinitionOptions): Promise<RemovePoolDefinitionFromProgramDefinitionResponse & RemovePoolDefinitionFromProgramDefinitionResponseNonNullableFields>;
1387
1279
  export interface RemovePoolDefinitionFromProgramDefinitionOptions {
1388
1280
  /**
1389
- * ID of the program definition being removed from the pool definition.
1281
+ * ID of the program definition to remove the pool definition from.
1390
1282
  * @format GUID
1391
1283
  */
1392
1284
  programDefinitionId: string;
1393
- /**
1394
- * Specifies the timing of updates to associated benefit pools.
1395
- * Determines how and when changes are applied to existing and future benefit pools.
1396
- */
1285
+ /** Determines when the changes to this program definition and pool definition will be applied to associated programs and pools. */
1397
1286
  cascade: Cascade;
1398
1287
  }
1399
1288
  /**
1400
1289
  * Retrieve all pool definitions associated with a specific program definition.
1401
- *
1402
- * Find multiple pool definitions that belong to a given program definition.
1403
- * @param programDefinitionId - ID of the program definition of which its assigned pool definitions are retrieved.
1290
+ * @param programDefinitionId - ID of the program definition to retrieve its associated pool definitions.
1404
1291
  * @public
1405
1292
  * @documentationMaturity preview
1406
1293
  * @requiredField options
@@ -1420,11 +1307,7 @@ export interface RemovePoolDefinitionFromProgramDefinitionOptions {
1420
1307
  export declare function findPoolDefinitionsByProgramDefinition(programDefinitionId: string, options: FindPoolDefinitionsByProgramDefinitionOptions): Promise<FindPoolDefinitionsByProgramDefinitionResponse & FindPoolDefinitionsByProgramDefinitionResponseNonNullableFields>;
1421
1308
  export interface FindPoolDefinitionsByProgramDefinitionOptions {
1422
1309
  /**
1423
- * Application sub-module that represents the source of the pool definition. Specified by the external developer.
1424
- *
1425
- * This namespace is used to organize and retrieve pool definitions and their associated benefit pools.
1426
- *
1427
- * It should match the namespace used in the program definitions.
1310
+ * Namespace for your app or site's benefit programs.
1428
1311
  * @minLength 1
1429
1312
  * @maxLength 50
1430
1313
  */