@wix/auto_sdk_benefit-programs_pool-definitions 1.0.19 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.universal.d.ts → benefit-programs-v1-pool-definition-pool-definitions.universal-D9CDI7FG.d.mts} +92 -305
- package/build/{internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.universal.d.ts → benefit-programs-v1-pool-definition-pool-definitions.universal-D9CDI7FG.d.ts} +92 -305
- package/build/index.d.mts +127 -0
- package/build/index.d.ts +127 -0
- package/build/index.js +1057 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +1016 -0
- package/build/index.mjs.map +1 -0
- package/build/{cjs/src/benefit-programs-v1-pool-definition-pool-definitions.universal.d.ts → internal/benefit-programs-v1-pool-definition-pool-definitions.universal-D9CDI7FG.d.mts} +92 -305
- package/build/{es/src/benefit-programs-v1-pool-definition-pool-definitions.universal.d.ts → internal/benefit-programs-v1-pool-definition-pool-definitions.universal-D9CDI7FG.d.ts} +92 -305
- package/build/internal/index.d.mts +127 -0
- package/build/internal/index.d.ts +127 -0
- package/build/internal/index.js +1057 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +1016 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/internal/meta.d.mts +494 -0
- package/build/internal/meta.d.ts +494 -0
- package/build/internal/meta.js +738 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +701 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/meta.d.mts +494 -0
- package/build/meta.d.ts +494 -0
- package/build/meta.js +738 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +701 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +13 -12
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.context.d.ts +0 -15
- package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.context.js +0 -25
- package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.context.js.map +0 -1
- package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.http.d.ts +0 -51
- package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.http.js +0 -528
- package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.http.js.map +0 -1
- package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.meta.d.ts +0 -29
- package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.meta.js +0 -237
- package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.meta.js.map +0 -1
- package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.public.d.ts +0 -115
- package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.public.js +0 -80
- package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.public.js.map +0 -1
- package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.types.d.ts +0 -811
- package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.types.js +0 -81
- package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.types.js.map +0 -1
- package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.universal.js +0 -629
- package/build/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/package.json +0 -3
- package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.context.d.ts +0 -15
- package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.context.js +0 -15
- package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.context.js.map +0 -1
- package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.http.d.ts +0 -51
- package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.http.js +0 -514
- package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.http.js.map +0 -1
- package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.meta.d.ts +0 -29
- package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.meta.js +0 -200
- package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.meta.js.map +0 -1
- package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.public.d.ts +0 -115
- package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.public.js +0 -59
- package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.public.js.map +0 -1
- package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.types.d.ts +0 -811
- package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.types.js +0 -78
- package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.types.js.map +0 -1
- package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.universal.js +0 -592
- package/build/es/src/benefit-programs-v1-pool-definition-pool-definitions.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.context.d.ts +0 -15
- package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.context.js +0 -25
- package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.context.js.map +0 -1
- package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.http.d.ts +0 -51
- package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.http.js +0 -528
- package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.http.js.map +0 -1
- package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.meta.d.ts +0 -29
- package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.meta.js +0 -237
- package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.meta.js.map +0 -1
- package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.public.d.ts +0 -115
- package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.public.js +0 -80
- package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.public.js.map +0 -1
- package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.types.d.ts +0 -811
- package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.types.js +0 -81
- package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.types.js.map +0 -1
- package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.universal.js +0 -629
- package/build/internal/cjs/src/benefit-programs-v1-pool-definition-pool-definitions.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.context.d.ts +0 -15
- package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.context.js +0 -15
- package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.context.js.map +0 -1
- package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.http.d.ts +0 -51
- package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.http.js +0 -514
- package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.http.js.map +0 -1
- package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.meta.d.ts +0 -29
- package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.meta.js +0 -200
- package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.meta.js.map +0 -1
- package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.public.d.ts +0 -115
- package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.public.js +0 -59
- package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.public.js.map +0 -1
- package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.types.d.ts +0 -811
- package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.types.js +0 -78
- package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.types.js.map +0 -1
- package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.universal.js +0 -592
- package/build/internal/es/src/benefit-programs-v1-pool-definition-pool-definitions.universal.js.map +0 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export interface PoolDefinition {
|
|
1
|
+
interface PoolDefinition {
|
|
3
2
|
/**
|
|
4
3
|
* Pool definition ID.
|
|
5
4
|
* @format GUID
|
|
@@ -53,7 +52,7 @@ export interface PoolDefinition {
|
|
|
53
52
|
*/
|
|
54
53
|
extendedFields?: ExtendedFields;
|
|
55
54
|
}
|
|
56
|
-
|
|
55
|
+
interface Details {
|
|
57
56
|
/**
|
|
58
57
|
* List of benefits.
|
|
59
58
|
* @maxSize 10
|
|
@@ -68,7 +67,7 @@ export interface Details {
|
|
|
68
67
|
/** Additional information relating to this object. */
|
|
69
68
|
additionalData?: Record<string, any> | null;
|
|
70
69
|
}
|
|
71
|
-
|
|
70
|
+
interface Benefit {
|
|
72
71
|
/**
|
|
73
72
|
* Unique identifier for this benefit.
|
|
74
73
|
*
|
|
@@ -107,7 +106,7 @@ export interface Benefit {
|
|
|
107
106
|
*/
|
|
108
107
|
description?: string | null;
|
|
109
108
|
}
|
|
110
|
-
|
|
109
|
+
interface PolicyExpression extends PolicyExpressionExpressionOneOf {
|
|
111
110
|
/** Benefits can be redeemed if the expression in this object is not fulfilled. */
|
|
112
111
|
operatorNotOptions?: PolicyExpressionNot;
|
|
113
112
|
/** Benefits can be redeemed if all the expression in this object's array are fulfilled. */
|
|
@@ -120,7 +119,7 @@ export interface PolicyExpression extends PolicyExpressionExpressionOneOf {
|
|
|
120
119
|
type?: PolicyExpressionTypeWithLiterals;
|
|
121
120
|
}
|
|
122
121
|
/** @oneof */
|
|
123
|
-
|
|
122
|
+
interface PolicyExpressionExpressionOneOf {
|
|
124
123
|
/** Benefits can be redeemed if the expression in this object is not fulfilled. */
|
|
125
124
|
operatorNotOptions?: PolicyExpressionNot;
|
|
126
125
|
/** Benefits can be redeemed if all the expression in this object's array are fulfilled. */
|
|
@@ -130,7 +129,7 @@ export interface PolicyExpressionExpressionOneOf {
|
|
|
130
129
|
/** Defines when benefits can be redeemed or how many benefits can be redeemed in a specific time period. */
|
|
131
130
|
policyOptions?: Policy;
|
|
132
131
|
}
|
|
133
|
-
|
|
132
|
+
declare enum PolicyExpressionType {
|
|
134
133
|
UNKNOWN = "UNKNOWN",
|
|
135
134
|
/** Use with `operatorNotOptions`. */
|
|
136
135
|
OPERATOR_NOT = "OPERATOR_NOT",
|
|
@@ -142,12 +141,12 @@ export declare enum PolicyExpressionType {
|
|
|
142
141
|
POLICY = "POLICY"
|
|
143
142
|
}
|
|
144
143
|
/** @enumType */
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
type PolicyExpressionTypeWithLiterals = PolicyExpressionType | 'UNKNOWN' | 'OPERATOR_NOT' | 'OPERATOR_AND' | 'OPERATOR_OR' | 'POLICY';
|
|
145
|
+
interface PolicyExpressionNot {
|
|
147
146
|
/** Policy expression. If this expression is not fulfilled, benefits can be redeemed. */
|
|
148
147
|
expression?: PolicyExpression;
|
|
149
148
|
}
|
|
150
|
-
|
|
149
|
+
interface PolicyExpressionAnd {
|
|
151
150
|
/**
|
|
152
151
|
* Array of policy expressions. If all expressions are fulfilled, benefits can be redeemed.
|
|
153
152
|
* @minSize 2
|
|
@@ -155,7 +154,7 @@ export interface PolicyExpressionAnd {
|
|
|
155
154
|
*/
|
|
156
155
|
expressions?: PolicyExpression[];
|
|
157
156
|
}
|
|
158
|
-
|
|
157
|
+
interface PolicyExpressionOr {
|
|
159
158
|
/**
|
|
160
159
|
* Array of policy expressions. If at least one expression is fulfilled, benefits can be redeemed.
|
|
161
160
|
* @minSize 2
|
|
@@ -163,7 +162,7 @@ export interface PolicyExpressionOr {
|
|
|
163
162
|
*/
|
|
164
163
|
expressions?: PolicyExpression[];
|
|
165
164
|
}
|
|
166
|
-
|
|
165
|
+
interface Policy extends PolicyPolicyOneOf {
|
|
167
166
|
/**
|
|
168
167
|
* Defines an interval during which the policy expression is fulfilled.
|
|
169
168
|
*
|
|
@@ -178,7 +177,7 @@ export interface Policy extends PolicyPolicyOneOf {
|
|
|
178
177
|
type?: TypeWithLiterals;
|
|
179
178
|
}
|
|
180
179
|
/** @oneof */
|
|
181
|
-
|
|
180
|
+
interface PolicyPolicyOneOf {
|
|
182
181
|
/**
|
|
183
182
|
* Defines an interval during which the policy expression is fulfilled.
|
|
184
183
|
*
|
|
@@ -190,7 +189,7 @@ export interface PolicyPolicyOneOf {
|
|
|
190
189
|
/** Custom policy defined by a different app. */
|
|
191
190
|
customOptions?: CustomPolicy;
|
|
192
191
|
}
|
|
193
|
-
|
|
192
|
+
declare enum Type {
|
|
194
193
|
/** Unknown policy type. */
|
|
195
194
|
UNKNOWN = "UNKNOWN",
|
|
196
195
|
/** Use with `fixedIntervalOptions`. */
|
|
@@ -201,8 +200,8 @@ export declare enum Type {
|
|
|
201
200
|
CUSTOM = "CUSTOM"
|
|
202
201
|
}
|
|
203
202
|
/** @enumType */
|
|
204
|
-
|
|
205
|
-
|
|
203
|
+
type TypeWithLiterals = Type | 'UNKNOWN' | 'FIXED_INTERVAL' | 'RATE_LIMITED' | 'CUSTOM';
|
|
204
|
+
interface FixedIntervalPolicy {
|
|
206
205
|
/** Weekday that this interval starts from. If this field is defined, then `toWeekDay` is required. */
|
|
207
206
|
fromWeekDay?: WeekDayWithLiterals;
|
|
208
207
|
/** Weekday that this interval ends at. If this field is defined, then `fromWeekDay` is required. */
|
|
@@ -228,7 +227,7 @@ export interface FixedIntervalPolicy {
|
|
|
228
227
|
*/
|
|
229
228
|
toMinute?: number | null;
|
|
230
229
|
}
|
|
231
|
-
|
|
230
|
+
declare enum WeekDay {
|
|
232
231
|
/** Unknown weekday. */
|
|
233
232
|
UNKNOWN = "UNKNOWN",
|
|
234
233
|
/** Monday. */
|
|
@@ -247,8 +246,8 @@ export declare enum WeekDay {
|
|
|
247
246
|
SUNDAY = "SUNDAY"
|
|
248
247
|
}
|
|
249
248
|
/** @enumType */
|
|
250
|
-
|
|
251
|
-
|
|
249
|
+
type WeekDayWithLiterals = WeekDay | 'UNKNOWN' | 'MONDAY' | 'TUESDAY' | 'WEDNESDAY' | 'THURSDAY' | 'FRIDAY' | 'SATURDAY' | 'SUNDAY';
|
|
250
|
+
interface RateLimitedPolicy extends RateLimitedPolicyPeriodOneOf {
|
|
252
251
|
/** Fixed interval used to limit benefit redemption. */
|
|
253
252
|
fixedIntervalOptions?: FixedIntervalPolicy;
|
|
254
253
|
/** Maximum number of times a benefit can be redeemed per specified time period. */
|
|
@@ -257,11 +256,11 @@ export interface RateLimitedPolicy extends RateLimitedPolicyPeriodOneOf {
|
|
|
257
256
|
type?: RateLimitedPolicyTypeWithLiterals;
|
|
258
257
|
}
|
|
259
258
|
/** @oneof */
|
|
260
|
-
|
|
259
|
+
interface RateLimitedPolicyPeriodOneOf {
|
|
261
260
|
/** Fixed interval used to limit benefit redemption. */
|
|
262
261
|
fixedIntervalOptions?: FixedIntervalPolicy;
|
|
263
262
|
}
|
|
264
|
-
|
|
263
|
+
declare enum RateLimitedPolicyType {
|
|
265
264
|
/** Unknown rate limit method. */
|
|
266
265
|
UNKNOWN = "UNKNOWN",
|
|
267
266
|
/** Time period is defined using `fixedIntervalOptions`. */
|
|
@@ -270,9 +269,9 @@ export declare enum RateLimitedPolicyType {
|
|
|
270
269
|
PER_CYCLE = "PER_CYCLE"
|
|
271
270
|
}
|
|
272
271
|
/** @enumType */
|
|
273
|
-
|
|
272
|
+
type RateLimitedPolicyTypeWithLiterals = RateLimitedPolicyType | 'UNKNOWN' | 'FIXED_INTERVAL' | 'PER_CYCLE';
|
|
274
273
|
/** Custom policy as implemented by the Entitlement Policy Provider */
|
|
275
|
-
|
|
274
|
+
interface CustomPolicy {
|
|
276
275
|
/**
|
|
277
276
|
* Policy ID.
|
|
278
277
|
* @format GUID
|
|
@@ -286,7 +285,7 @@ export interface CustomPolicy {
|
|
|
286
285
|
/** Additional information for this custom policy. */
|
|
287
286
|
additionalData?: Record<string, any> | null;
|
|
288
287
|
}
|
|
289
|
-
|
|
288
|
+
interface CreditConfiguration {
|
|
290
289
|
/**
|
|
291
290
|
* Initial available amount for associated balances.
|
|
292
291
|
* @decimalValue options { gte:0, maxScale:4 }
|
|
@@ -300,7 +299,7 @@ export interface CreditConfiguration {
|
|
|
300
299
|
*/
|
|
301
300
|
unitDisplayName?: string | null;
|
|
302
301
|
}
|
|
303
|
-
|
|
302
|
+
interface RolloverConfiguration {
|
|
304
303
|
/** Whether unused credits roll over to a new cycle when a program renews. */
|
|
305
304
|
enabled?: boolean | null;
|
|
306
305
|
/**
|
|
@@ -309,7 +308,7 @@ export interface RolloverConfiguration {
|
|
|
309
308
|
*/
|
|
310
309
|
balanceCap?: string | null;
|
|
311
310
|
}
|
|
312
|
-
|
|
311
|
+
interface ExtendedFields {
|
|
313
312
|
/**
|
|
314
313
|
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
315
314
|
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
@@ -320,7 +319,7 @@ export interface ExtendedFields {
|
|
|
320
319
|
*/
|
|
321
320
|
namespaces?: Record<string, Record<string, any>>;
|
|
322
321
|
}
|
|
323
|
-
|
|
322
|
+
interface PoolDefinitionAddedToProgramDefinition {
|
|
324
323
|
/** PoolDefinition that was added to the program definition */
|
|
325
324
|
poolDefinition?: PoolDefinition;
|
|
326
325
|
/**
|
|
@@ -331,7 +330,7 @@ export interface PoolDefinitionAddedToProgramDefinition {
|
|
|
331
330
|
/** Type of cascade */
|
|
332
331
|
cascadeType?: CascadeWithLiterals;
|
|
333
332
|
}
|
|
334
|
-
|
|
333
|
+
declare enum Cascade {
|
|
335
334
|
/** Unknown cascade. */
|
|
336
335
|
UNKNOWN_CASCADE = "UNKNOWN_CASCADE",
|
|
337
336
|
/** Changes are applied to existing programs and pools when they are next renewed. */
|
|
@@ -342,8 +341,8 @@ export declare enum Cascade {
|
|
|
342
341
|
FUTURE_PROVISIONS = "FUTURE_PROVISIONS"
|
|
343
342
|
}
|
|
344
343
|
/** @enumType */
|
|
345
|
-
|
|
346
|
-
|
|
344
|
+
type CascadeWithLiterals = Cascade | 'UNKNOWN_CASCADE' | 'NEXT_RENEWAL' | 'IMMEDIATELY' | 'FUTURE_PROVISIONS';
|
|
345
|
+
interface PoolDefinitionRemovedFromProgramDefinition {
|
|
347
346
|
/** PoolDefinition that was removed from the program definition */
|
|
348
347
|
poolDefinition?: PoolDefinition;
|
|
349
348
|
/**
|
|
@@ -355,18 +354,18 @@ export interface PoolDefinitionRemovedFromProgramDefinition {
|
|
|
355
354
|
cascadeType?: CascadeWithLiterals;
|
|
356
355
|
}
|
|
357
356
|
/** This event is needed to support legacy benefit notification event. Should be only consumed in the proxy. */
|
|
358
|
-
|
|
357
|
+
interface PoolDefinitionUpdatedProxySupport {
|
|
359
358
|
/** PoolDefinition after the update */
|
|
360
359
|
currentPoolDefinition?: PoolDefinition;
|
|
361
360
|
/** PoolDefinition before the update */
|
|
362
361
|
previousPoolDefinition?: PoolDefinition;
|
|
363
362
|
}
|
|
364
363
|
/** This event is needed to support legacy benefit notification event. Should be only consumed in the proxy. */
|
|
365
|
-
|
|
364
|
+
interface PoolDefinitionDeletedProxySupport {
|
|
366
365
|
/** PoolDefinition which was deleted */
|
|
367
366
|
deletedPoolDefinition?: PoolDefinition;
|
|
368
367
|
}
|
|
369
|
-
|
|
368
|
+
interface CreatePoolDefinitionRequest {
|
|
370
369
|
/** Pool definition to create. */
|
|
371
370
|
poolDefinition: PoolDefinition;
|
|
372
371
|
/**
|
|
@@ -376,11 +375,11 @@ export interface CreatePoolDefinitionRequest {
|
|
|
376
375
|
*/
|
|
377
376
|
cascade?: CascadeWithLiterals;
|
|
378
377
|
}
|
|
379
|
-
|
|
378
|
+
interface CreatePoolDefinitionResponse {
|
|
380
379
|
/** Created pool definition. */
|
|
381
380
|
poolDefinition?: PoolDefinition;
|
|
382
381
|
}
|
|
383
|
-
|
|
382
|
+
interface BulkCreatePoolDefinitionsRequest {
|
|
384
383
|
/**
|
|
385
384
|
* Pool definitions to create.
|
|
386
385
|
* @minSize 1
|
|
@@ -400,7 +399,7 @@ export interface BulkCreatePoolDefinitionsRequest {
|
|
|
400
399
|
*/
|
|
401
400
|
returnEntity?: boolean;
|
|
402
401
|
}
|
|
403
|
-
|
|
402
|
+
interface BulkCreatePoolDefinitionsResponse {
|
|
404
403
|
/**
|
|
405
404
|
* List of created pool definitions and associated metadata.
|
|
406
405
|
* @minSize 1
|
|
@@ -410,13 +409,13 @@ export interface BulkCreatePoolDefinitionsResponse {
|
|
|
410
409
|
/** Bulk action metadata. */
|
|
411
410
|
bulkActionMetadata?: BulkActionMetadata;
|
|
412
411
|
}
|
|
413
|
-
|
|
412
|
+
interface BulkPoolDefinitionResult {
|
|
414
413
|
/** Item metadata. */
|
|
415
414
|
itemMetadata?: ItemMetadata;
|
|
416
415
|
/** Pool definition. */
|
|
417
416
|
poolDefinition?: PoolDefinition;
|
|
418
417
|
}
|
|
419
|
-
|
|
418
|
+
interface ItemMetadata {
|
|
420
419
|
/**
|
|
421
420
|
* Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
|
|
422
421
|
* @format GUID
|
|
@@ -429,7 +428,7 @@ export interface ItemMetadata {
|
|
|
429
428
|
/** Details about the error in case of failure. */
|
|
430
429
|
error?: ApplicationError;
|
|
431
430
|
}
|
|
432
|
-
|
|
431
|
+
interface ApplicationError {
|
|
433
432
|
/** Error code. */
|
|
434
433
|
code?: string;
|
|
435
434
|
/** Description of the error. */
|
|
@@ -437,7 +436,7 @@ export interface ApplicationError {
|
|
|
437
436
|
/** Data related to the error. */
|
|
438
437
|
data?: Record<string, any> | null;
|
|
439
438
|
}
|
|
440
|
-
|
|
439
|
+
interface BulkActionMetadata {
|
|
441
440
|
/** Number of items that were successfully processed. */
|
|
442
441
|
totalSuccesses?: number;
|
|
443
442
|
/** Number of items that couldn't be processed. */
|
|
@@ -445,17 +444,17 @@ export interface BulkActionMetadata {
|
|
|
445
444
|
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
446
445
|
undetailedFailures?: number;
|
|
447
446
|
}
|
|
448
|
-
|
|
447
|
+
interface UpdatePoolDefinitionRequest {
|
|
449
448
|
/** Pool definition to update. */
|
|
450
449
|
poolDefinition: PoolDefinition;
|
|
451
450
|
/** *Required.** Determines when the changes to this pool definition and program definitions containing it will be applied to associated programs and pools. */
|
|
452
451
|
cascade?: CascadeWithLiterals;
|
|
453
452
|
}
|
|
454
|
-
|
|
453
|
+
interface UpdatePoolDefinitionResponse {
|
|
455
454
|
/** Updated pool definition. */
|
|
456
455
|
poolDefinition?: PoolDefinition;
|
|
457
456
|
}
|
|
458
|
-
|
|
457
|
+
interface BulkUpdatePoolDefinitionsRequest {
|
|
459
458
|
/**
|
|
460
459
|
* Pool definitions to update.
|
|
461
460
|
* @minSize 1
|
|
@@ -471,13 +470,13 @@ export interface BulkUpdatePoolDefinitionsRequest {
|
|
|
471
470
|
*/
|
|
472
471
|
returnEntity?: boolean;
|
|
473
472
|
}
|
|
474
|
-
|
|
473
|
+
interface MaskedPoolDefinition {
|
|
475
474
|
/** Pool definition to update. */
|
|
476
475
|
poolDefinition?: PoolDefinition;
|
|
477
476
|
/** Explicit list of fields to update. */
|
|
478
477
|
fieldMask?: string[];
|
|
479
478
|
}
|
|
480
|
-
|
|
479
|
+
interface BulkUpdatePoolDefinitionsResponse {
|
|
481
480
|
/**
|
|
482
481
|
* List of updated pool definitions and associated metadata.
|
|
483
482
|
* @minSize 1
|
|
@@ -487,7 +486,7 @@ export interface BulkUpdatePoolDefinitionsResponse {
|
|
|
487
486
|
/** Bulk action metadata. */
|
|
488
487
|
bulkActionMetadata?: BulkActionMetadata;
|
|
489
488
|
}
|
|
490
|
-
|
|
489
|
+
interface DeletePoolDefinitionRequest {
|
|
491
490
|
/**
|
|
492
491
|
* ID of the pool definition to delete.
|
|
493
492
|
* @format GUID
|
|
@@ -496,9 +495,9 @@ export interface DeletePoolDefinitionRequest {
|
|
|
496
495
|
/** *Required**. Determines when the changes to this pool definition the program definitions containing it will be applied to associated programs and pools. */
|
|
497
496
|
cascade?: CascadeWithLiterals;
|
|
498
497
|
}
|
|
499
|
-
|
|
498
|
+
interface DeletePoolDefinitionResponse {
|
|
500
499
|
}
|
|
501
|
-
|
|
500
|
+
interface BulkDeletePoolDefinitionsRequest {
|
|
502
501
|
/**
|
|
503
502
|
* List of IDs of the pool definitions to delete.
|
|
504
503
|
* @minSize 1
|
|
@@ -509,7 +508,7 @@ export interface BulkDeletePoolDefinitionsRequest {
|
|
|
509
508
|
/** *Required**. Determines when the changes to these pool definitions the program definitions containing it will be applied to associated programs and pools. */
|
|
510
509
|
cascade?: CascadeWithLiterals;
|
|
511
510
|
}
|
|
512
|
-
|
|
511
|
+
interface BulkDeletePoolDefinitionsResponse {
|
|
513
512
|
/**
|
|
514
513
|
* List of deleted pool definitions and associated metadata.
|
|
515
514
|
* @minSize 1
|
|
@@ -519,22 +518,22 @@ export interface BulkDeletePoolDefinitionsResponse {
|
|
|
519
518
|
/** Bulk action metadata. */
|
|
520
519
|
bulkActionMetadata?: BulkActionMetadata;
|
|
521
520
|
}
|
|
522
|
-
|
|
521
|
+
interface GetPoolDefinitionRequest {
|
|
523
522
|
/**
|
|
524
523
|
* ID of the pool definition to retrieve.
|
|
525
524
|
* @format GUID
|
|
526
525
|
*/
|
|
527
526
|
poolDefinitionId: string;
|
|
528
527
|
}
|
|
529
|
-
|
|
528
|
+
interface GetPoolDefinitionResponse {
|
|
530
529
|
/** Retrieved pool definition. */
|
|
531
530
|
poolDefinition?: PoolDefinition;
|
|
532
531
|
}
|
|
533
|
-
|
|
532
|
+
interface QueryPoolDefinitionsRequest {
|
|
534
533
|
/** Filter, sort, and paging to apply to the query. */
|
|
535
534
|
query?: CursorQuery;
|
|
536
535
|
}
|
|
537
|
-
|
|
536
|
+
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
538
537
|
/** 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`. */
|
|
539
538
|
cursorPaging?: CursorPaging;
|
|
540
539
|
/**
|
|
@@ -550,11 +549,11 @@ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
|
550
549
|
sort?: Sorting[];
|
|
551
550
|
}
|
|
552
551
|
/** @oneof */
|
|
553
|
-
|
|
552
|
+
interface CursorQueryPagingMethodOneOf {
|
|
554
553
|
/** 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`. */
|
|
555
554
|
cursorPaging?: CursorPaging;
|
|
556
555
|
}
|
|
557
|
-
|
|
556
|
+
interface Sorting {
|
|
558
557
|
/**
|
|
559
558
|
* Field to sort by.
|
|
560
559
|
* @maxLength 512
|
|
@@ -567,15 +566,15 @@ export interface Sorting {
|
|
|
567
566
|
*/
|
|
568
567
|
order?: SortOrderWithLiterals;
|
|
569
568
|
}
|
|
570
|
-
|
|
569
|
+
declare enum SortOrder {
|
|
571
570
|
/** Ascending sort order. */
|
|
572
571
|
ASC = "ASC",
|
|
573
572
|
/** Descending sort order. */
|
|
574
573
|
DESC = "DESC"
|
|
575
574
|
}
|
|
576
575
|
/** @enumType */
|
|
577
|
-
|
|
578
|
-
|
|
576
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
577
|
+
interface CursorPaging {
|
|
579
578
|
/**
|
|
580
579
|
* Maximum number of items to return.
|
|
581
580
|
* @max 100
|
|
@@ -590,13 +589,13 @@ export interface CursorPaging {
|
|
|
590
589
|
*/
|
|
591
590
|
cursor?: string | null;
|
|
592
591
|
}
|
|
593
|
-
|
|
592
|
+
interface QueryPoolDefinitionsResponse {
|
|
594
593
|
/** List of retrieved pool definitions. */
|
|
595
594
|
poolDefinitions?: PoolDefinition[];
|
|
596
595
|
/** Metadata for the paginated results. */
|
|
597
596
|
metadata?: CursorPagingMetadata;
|
|
598
597
|
}
|
|
599
|
-
|
|
598
|
+
interface CursorPagingMetadata {
|
|
600
599
|
/** Number of items returned in the response. */
|
|
601
600
|
count?: number | null;
|
|
602
601
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
@@ -609,7 +608,7 @@ export interface CursorPagingMetadata {
|
|
|
609
608
|
*/
|
|
610
609
|
hasNext?: boolean | null;
|
|
611
610
|
}
|
|
612
|
-
|
|
611
|
+
interface Cursors {
|
|
613
612
|
/**
|
|
614
613
|
* Cursor string pointing to the next page in the list of results.
|
|
615
614
|
* @maxLength 16000
|
|
@@ -621,7 +620,7 @@ export interface Cursors {
|
|
|
621
620
|
*/
|
|
622
621
|
prev?: string | null;
|
|
623
622
|
}
|
|
624
|
-
|
|
623
|
+
interface AddPoolDefinitionToProgramDefinitionRequest {
|
|
625
624
|
/**
|
|
626
625
|
* ID of the pool definition to add to the program definition.
|
|
627
626
|
* @format GUID
|
|
@@ -635,11 +634,11 @@ export interface AddPoolDefinitionToProgramDefinitionRequest {
|
|
|
635
634
|
/** Determines when the changes to this program definition and pool definition will be applied to associated programs and pools. */
|
|
636
635
|
cascade: CascadeWithLiterals;
|
|
637
636
|
}
|
|
638
|
-
|
|
637
|
+
interface AddPoolDefinitionToProgramDefinitionResponse {
|
|
639
638
|
/** Updated pool definition. */
|
|
640
639
|
poolDefinition?: PoolDefinition;
|
|
641
640
|
}
|
|
642
|
-
|
|
641
|
+
interface RemovePoolDefinitionFromProgramDefinitionRequest {
|
|
643
642
|
/**
|
|
644
643
|
* ID of the pool definition to remove from the program definition.
|
|
645
644
|
* @format GUID
|
|
@@ -653,11 +652,11 @@ export interface RemovePoolDefinitionFromProgramDefinitionRequest {
|
|
|
653
652
|
/** Determines when the changes to this program definition and pool definition will be applied to associated programs and pools. */
|
|
654
653
|
cascade: CascadeWithLiterals;
|
|
655
654
|
}
|
|
656
|
-
|
|
655
|
+
interface RemovePoolDefinitionFromProgramDefinitionResponse {
|
|
657
656
|
/** Updated pool definition. */
|
|
658
657
|
poolDefinition?: PoolDefinition;
|
|
659
658
|
}
|
|
660
|
-
|
|
659
|
+
interface FindPoolDefinitionsByProgramDefinitionRequest {
|
|
661
660
|
/**
|
|
662
661
|
* ID of the program definition to retrieve its pool definitions.
|
|
663
662
|
* @format GUID
|
|
@@ -670,11 +669,11 @@ export interface FindPoolDefinitionsByProgramDefinitionRequest {
|
|
|
670
669
|
*/
|
|
671
670
|
namespace: string;
|
|
672
671
|
}
|
|
673
|
-
|
|
672
|
+
interface FindPoolDefinitionsByProgramDefinitionResponse {
|
|
674
673
|
/** Retrieved pool definitions. */
|
|
675
674
|
poolDefinitions?: PoolDefinition[];
|
|
676
675
|
}
|
|
677
|
-
|
|
676
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
678
677
|
createdEvent?: EntityCreatedEvent;
|
|
679
678
|
updatedEvent?: EntityUpdatedEvent;
|
|
680
679
|
deletedEvent?: EntityDeletedEvent;
|
|
@@ -709,19 +708,19 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
709
708
|
entityEventSequence?: string | null;
|
|
710
709
|
}
|
|
711
710
|
/** @oneof */
|
|
712
|
-
|
|
711
|
+
interface DomainEventBodyOneOf {
|
|
713
712
|
createdEvent?: EntityCreatedEvent;
|
|
714
713
|
updatedEvent?: EntityUpdatedEvent;
|
|
715
714
|
deletedEvent?: EntityDeletedEvent;
|
|
716
715
|
actionEvent?: ActionEvent;
|
|
717
716
|
}
|
|
718
|
-
|
|
717
|
+
interface EntityCreatedEvent {
|
|
719
718
|
entity?: string;
|
|
720
719
|
}
|
|
721
|
-
|
|
720
|
+
interface RestoreInfo {
|
|
722
721
|
deletedDate?: Date | null;
|
|
723
722
|
}
|
|
724
|
-
|
|
723
|
+
interface EntityUpdatedEvent {
|
|
725
724
|
/**
|
|
726
725
|
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
727
726
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
@@ -729,14 +728,14 @@ export interface EntityUpdatedEvent {
|
|
|
729
728
|
*/
|
|
730
729
|
currentEntity?: string;
|
|
731
730
|
}
|
|
732
|
-
|
|
731
|
+
interface EntityDeletedEvent {
|
|
733
732
|
/** Entity that was deleted. */
|
|
734
733
|
deletedEntity?: string | null;
|
|
735
734
|
}
|
|
736
|
-
|
|
735
|
+
interface ActionEvent {
|
|
737
736
|
body?: string;
|
|
738
737
|
}
|
|
739
|
-
|
|
738
|
+
interface MessageEnvelope {
|
|
740
739
|
/**
|
|
741
740
|
* App instance ID.
|
|
742
741
|
* @format GUID
|
|
@@ -752,7 +751,7 @@ export interface MessageEnvelope {
|
|
|
752
751
|
/** Stringify payload. */
|
|
753
752
|
data?: string;
|
|
754
753
|
}
|
|
755
|
-
|
|
754
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
756
755
|
/**
|
|
757
756
|
* ID of a site visitor that has not logged in to the site.
|
|
758
757
|
* @format GUID
|
|
@@ -777,7 +776,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
777
776
|
identityType?: WebhookIdentityTypeWithLiterals;
|
|
778
777
|
}
|
|
779
778
|
/** @oneof */
|
|
780
|
-
|
|
779
|
+
interface IdentificationDataIdOneOf {
|
|
781
780
|
/**
|
|
782
781
|
* ID of a site visitor that has not logged in to the site.
|
|
783
782
|
* @format GUID
|
|
@@ -799,7 +798,7 @@ export interface IdentificationDataIdOneOf {
|
|
|
799
798
|
*/
|
|
800
799
|
appId?: string;
|
|
801
800
|
}
|
|
802
|
-
|
|
801
|
+
declare enum WebhookIdentityType {
|
|
803
802
|
UNKNOWN = "UNKNOWN",
|
|
804
803
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
805
804
|
MEMBER = "MEMBER",
|
|
@@ -807,28 +806,8 @@ export declare enum WebhookIdentityType {
|
|
|
807
806
|
APP = "APP"
|
|
808
807
|
}
|
|
809
808
|
/** @enumType */
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
/**
|
|
813
|
-
* Creates a pool definition.
|
|
814
|
-
* @param poolDefinition - Pool definition to create.
|
|
815
|
-
* @public
|
|
816
|
-
* @documentationMaturity preview
|
|
817
|
-
* @requiredField poolDefinition
|
|
818
|
-
* @requiredField poolDefinition.details
|
|
819
|
-
* @requiredField poolDefinition.details.benefits
|
|
820
|
-
* @requiredField poolDefinition.details.benefits.benefitKey
|
|
821
|
-
* @requiredField poolDefinition.details.benefits.providerAppId
|
|
822
|
-
* @requiredField poolDefinition.namespace
|
|
823
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_DEFINITION_CREATE
|
|
824
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
825
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
826
|
-
* @applicableIdentity APP
|
|
827
|
-
* @returns Created pool definition.
|
|
828
|
-
* @fqn wix.benefit_programs.v1.pool_definition.PoolDefinitionService.CreatePoolDefinition
|
|
829
|
-
*/
|
|
830
|
-
export declare function createPoolDefinition(poolDefinition: NonNullablePaths<PoolDefinition, `details` | `details.benefits` | `details.benefits.${number}.benefitKey` | `details.benefits.${number}.providerAppId` | `namespace`>, options?: CreatePoolDefinitionOptions): Promise<NonNullablePaths<PoolDefinition, PoolDefinitionNonNullablePaths>>;
|
|
831
|
-
export interface CreatePoolDefinitionOptions {
|
|
809
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
810
|
+
interface CreatePoolDefinitionOptions {
|
|
832
811
|
/**
|
|
833
812
|
* Determines when the changes to the program definitions containing this pool definition will be applied to associated programs.
|
|
834
813
|
*
|
|
@@ -836,27 +815,7 @@ export interface CreatePoolDefinitionOptions {
|
|
|
836
815
|
*/
|
|
837
816
|
cascade?: CascadeWithLiterals;
|
|
838
817
|
}
|
|
839
|
-
|
|
840
|
-
* Creates pool definitions.
|
|
841
|
-
* @param poolDefinitions - Pool definitions to create.
|
|
842
|
-
* @public
|
|
843
|
-
* @documentationMaturity preview
|
|
844
|
-
* @requiredField poolDefinitions
|
|
845
|
-
* @requiredField poolDefinitions.details
|
|
846
|
-
* @requiredField poolDefinitions.details.benefits
|
|
847
|
-
* @requiredField poolDefinitions.details.benefits.benefitKey
|
|
848
|
-
* @requiredField poolDefinitions.details.benefits.providerAppId
|
|
849
|
-
* @requiredField poolDefinitions.namespace
|
|
850
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_DEFINITION_CREATE
|
|
851
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
852
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
853
|
-
* @applicableIdentity APP
|
|
854
|
-
* @fqn wix.benefit_programs.v1.pool_definition.PoolDefinitionService.BulkCreatePoolDefinitions
|
|
855
|
-
*/
|
|
856
|
-
export declare function bulkCreatePoolDefinitions(poolDefinitions: NonNullablePaths<PoolDefinition, `details` | `details.benefits` | `details.benefits.${number}.benefitKey` | `details.benefits.${number}.providerAppId` | `namespace`>[], options?: BulkCreatePoolDefinitionsOptions): Promise<NonNullablePaths<BulkCreatePoolDefinitionsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | {
|
|
857
|
-
[P in PoolDefinitionNonNullablePaths]: `results.${number}.poolDefinition.${P}`;
|
|
858
|
-
}[PoolDefinitionNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
|
|
859
|
-
export interface BulkCreatePoolDefinitionsOptions {
|
|
818
|
+
interface BulkCreatePoolDefinitionsOptions {
|
|
860
819
|
/**
|
|
861
820
|
* Determines when the changes to the program definitions containing these pool definitions will be applied to associated programs.
|
|
862
821
|
*
|
|
@@ -870,29 +829,7 @@ export interface BulkCreatePoolDefinitionsOptions {
|
|
|
870
829
|
*/
|
|
871
830
|
returnEntity?: boolean;
|
|
872
831
|
}
|
|
873
|
-
|
|
874
|
-
* Updates a pool definition.
|
|
875
|
-
*
|
|
876
|
-
* Each time the pool definition is updated,
|
|
877
|
-
* `revision` increments by 1.
|
|
878
|
-
* The current `revision` must be passed when updating the pool definition.
|
|
879
|
-
* This ensures you're working with the latest pool definition
|
|
880
|
-
* and prevents unintended overwrites.
|
|
881
|
-
* @param _id - Pool definition ID.
|
|
882
|
-
* @public
|
|
883
|
-
* @documentationMaturity preview
|
|
884
|
-
* @requiredField _id
|
|
885
|
-
* @requiredField poolDefinition
|
|
886
|
-
* @requiredField poolDefinition.revision
|
|
887
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_DEFINITION_UPDATE
|
|
888
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
889
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
890
|
-
* @applicableIdentity APP
|
|
891
|
-
* @returns Updated pool definition.
|
|
892
|
-
* @fqn wix.benefit_programs.v1.pool_definition.PoolDefinitionService.UpdatePoolDefinition
|
|
893
|
-
*/
|
|
894
|
-
export declare function updatePoolDefinition(_id: string, poolDefinition: NonNullablePaths<UpdatePoolDefinition, `revision`>, options?: UpdatePoolDefinitionOptions): Promise<NonNullablePaths<PoolDefinition, PoolDefinitionNonNullablePaths>>;
|
|
895
|
-
export interface UpdatePoolDefinition {
|
|
832
|
+
interface UpdatePoolDefinition {
|
|
896
833
|
/**
|
|
897
834
|
* Pool definition ID.
|
|
898
835
|
* @format GUID
|
|
@@ -946,27 +883,11 @@ export interface UpdatePoolDefinition {
|
|
|
946
883
|
*/
|
|
947
884
|
extendedFields?: ExtendedFields;
|
|
948
885
|
}
|
|
949
|
-
|
|
886
|
+
interface UpdatePoolDefinitionOptions {
|
|
950
887
|
/** Required.** Determines when the changes to this pool definition and program definitions containing it will be applied to associated programs and pools. */
|
|
951
888
|
cascade?: CascadeWithLiterals;
|
|
952
889
|
}
|
|
953
|
-
|
|
954
|
-
* Updates pool definitions.
|
|
955
|
-
* @public
|
|
956
|
-
* @documentationMaturity preview
|
|
957
|
-
* @requiredField options.poolDefinitions.poolDefinition
|
|
958
|
-
* @requiredField options.poolDefinitions.poolDefinition._id
|
|
959
|
-
* @requiredField options.poolDefinitions.poolDefinition.revision
|
|
960
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_DEFINITION_UPDATE
|
|
961
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
962
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
963
|
-
* @applicableIdentity APP
|
|
964
|
-
* @fqn wix.benefit_programs.v1.pool_definition.PoolDefinitionService.BulkUpdatePoolDefinitions
|
|
965
|
-
*/
|
|
966
|
-
export declare function bulkUpdatePoolDefinitions(options?: NonNullablePaths<BulkUpdatePoolDefinitionsOptions, `poolDefinitions.${number}.poolDefinition` | `poolDefinitions.${number}.poolDefinition._id` | `poolDefinitions.${number}.poolDefinition.revision`>): Promise<NonNullablePaths<BulkUpdatePoolDefinitionsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | {
|
|
967
|
-
[P in PoolDefinitionNonNullablePaths]: `results.${number}.poolDefinition.${P}`;
|
|
968
|
-
}[PoolDefinitionNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
|
|
969
|
-
export interface BulkUpdatePoolDefinitionsOptions {
|
|
890
|
+
interface BulkUpdatePoolDefinitionsOptions {
|
|
970
891
|
/**
|
|
971
892
|
* Pool definitions to update.
|
|
972
893
|
* @minSize 1
|
|
@@ -982,87 +903,14 @@ export interface BulkUpdatePoolDefinitionsOptions {
|
|
|
982
903
|
*/
|
|
983
904
|
returnEntity?: boolean;
|
|
984
905
|
}
|
|
985
|
-
|
|
986
|
-
* Deletes a pool definition.
|
|
987
|
-
* @param poolDefinitionId - ID of the pool definition to delete.
|
|
988
|
-
* @public
|
|
989
|
-
* @documentationMaturity preview
|
|
990
|
-
* @requiredField poolDefinitionId
|
|
991
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_DEFINITION_DELETE
|
|
992
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
993
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
994
|
-
* @applicableIdentity APP
|
|
995
|
-
* @fqn wix.benefit_programs.v1.pool_definition.PoolDefinitionService.DeletePoolDefinition
|
|
996
|
-
*/
|
|
997
|
-
export declare function deletePoolDefinition(poolDefinitionId: string, options?: DeletePoolDefinitionOptions): Promise<void>;
|
|
998
|
-
export interface DeletePoolDefinitionOptions {
|
|
906
|
+
interface DeletePoolDefinitionOptions {
|
|
999
907
|
/** Required**. Determines when the changes to this pool definition the program definitions containing it will be applied to associated programs and pools. */
|
|
1000
908
|
cascade?: CascadeWithLiterals;
|
|
1001
909
|
}
|
|
1002
|
-
|
|
1003
|
-
* Deletes pool definitions.
|
|
1004
|
-
* @param poolDefinitionIds - List of IDs of the pool definitions to delete.
|
|
1005
|
-
* @public
|
|
1006
|
-
* @documentationMaturity preview
|
|
1007
|
-
* @requiredField poolDefinitionIds
|
|
1008
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_DEFINITION_DELETE
|
|
1009
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1010
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1011
|
-
* @applicableIdentity APP
|
|
1012
|
-
* @fqn wix.benefit_programs.v1.pool_definition.PoolDefinitionService.BulkDeletePoolDefinitions
|
|
1013
|
-
*/
|
|
1014
|
-
export declare function bulkDeletePoolDefinitions(poolDefinitionIds: string[], options?: BulkDeletePoolDefinitionsOptions): Promise<NonNullablePaths<BulkDeletePoolDefinitionsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | {
|
|
1015
|
-
[P in PoolDefinitionNonNullablePaths]: `results.${number}.poolDefinition.${P}`;
|
|
1016
|
-
}[PoolDefinitionNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
|
|
1017
|
-
export interface BulkDeletePoolDefinitionsOptions {
|
|
910
|
+
interface BulkDeletePoolDefinitionsOptions {
|
|
1018
911
|
/** Required**. Determines when the changes to these pool definitions the program definitions containing it will be applied to associated programs and pools. */
|
|
1019
912
|
cascade?: CascadeWithLiterals;
|
|
1020
913
|
}
|
|
1021
|
-
/**
|
|
1022
|
-
* Retrieves a pool definition.
|
|
1023
|
-
* @param poolDefinitionId - ID of the pool definition to retrieve.
|
|
1024
|
-
* @public
|
|
1025
|
-
* @documentationMaturity preview
|
|
1026
|
-
* @requiredField poolDefinitionId
|
|
1027
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_DEFINITION_READ
|
|
1028
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1029
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1030
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.READ
|
|
1031
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.READ
|
|
1032
|
-
* @permissionScope Manage Events
|
|
1033
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1034
|
-
* @applicableIdentity APP
|
|
1035
|
-
* @applicableIdentity VISITOR
|
|
1036
|
-
* @returns Retrieved pool definition.
|
|
1037
|
-
* @fqn wix.benefit_programs.v1.pool_definition.PoolDefinitionService.GetPoolDefinition
|
|
1038
|
-
*/
|
|
1039
|
-
export declare function getPoolDefinition(poolDefinitionId: string): Promise<NonNullablePaths<PoolDefinition, PoolDefinitionNonNullablePaths>>;
|
|
1040
|
-
/**
|
|
1041
|
-
* Creates a query to retrieve a list of pool definitions.
|
|
1042
|
-
*
|
|
1043
|
-
* The Query Pool Definitions method builds a query to retrieve a list of pool definitions and returns a `PoolDefinitionsQueryBuilder` object.
|
|
1044
|
-
*
|
|
1045
|
-
* The returned object contains the query definition, which is used to run the query using the `find()` method.
|
|
1046
|
-
*
|
|
1047
|
-
* 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.
|
|
1048
|
-
*
|
|
1049
|
-
* Query Pool Definitions has a default paging limit of 50, which you can override.
|
|
1050
|
-
*
|
|
1051
|
-
* For a full description of the item object, see the object returned for the `items` property in `PoolDefinitionsQueryResult`.
|
|
1052
|
-
* @public
|
|
1053
|
-
* @documentationMaturity preview
|
|
1054
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1055
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1056
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.READ
|
|
1057
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.READ
|
|
1058
|
-
* @permissionScope Manage Events
|
|
1059
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1060
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_DEFINITION_READ
|
|
1061
|
-
* @applicableIdentity APP
|
|
1062
|
-
* @applicableIdentity VISITOR
|
|
1063
|
-
* @fqn wix.benefit_programs.v1.pool_definition.PoolDefinitionService.QueryPoolDefinitions
|
|
1064
|
-
*/
|
|
1065
|
-
export declare function queryPoolDefinitions(): PoolDefinitionsQueryBuilder;
|
|
1066
914
|
interface QueryCursorResult {
|
|
1067
915
|
cursors: Cursors;
|
|
1068
916
|
hasNext: () => boolean;
|
|
@@ -1070,13 +918,13 @@ interface QueryCursorResult {
|
|
|
1070
918
|
length: number;
|
|
1071
919
|
pageSize: number;
|
|
1072
920
|
}
|
|
1073
|
-
|
|
921
|
+
interface PoolDefinitionsQueryResult extends QueryCursorResult {
|
|
1074
922
|
items: PoolDefinition[];
|
|
1075
923
|
query: PoolDefinitionsQueryBuilder;
|
|
1076
924
|
next: () => Promise<PoolDefinitionsQueryResult>;
|
|
1077
925
|
prev: () => Promise<PoolDefinitionsQueryResult>;
|
|
1078
926
|
}
|
|
1079
|
-
|
|
927
|
+
interface PoolDefinitionsQueryBuilder {
|
|
1080
928
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1081
929
|
* @param value - Value to compare against.
|
|
1082
930
|
* @documentationMaturity preview
|
|
@@ -1145,27 +993,7 @@ export interface PoolDefinitionsQueryBuilder {
|
|
|
1145
993
|
/** @documentationMaturity preview */
|
|
1146
994
|
find: () => Promise<PoolDefinitionsQueryResult>;
|
|
1147
995
|
}
|
|
1148
|
-
|
|
1149
|
-
* Adds a pool definition to a program definition.
|
|
1150
|
-
*
|
|
1151
|
-
* Pool definitions can be contained by multiple program definitions, so this doesn't affect other program definitions that contain this pool definition.
|
|
1152
|
-
* @param poolDefinitionId - ID of the pool definition to add to the program definition.
|
|
1153
|
-
* @public
|
|
1154
|
-
* @documentationMaturity preview
|
|
1155
|
-
* @requiredField options
|
|
1156
|
-
* @requiredField options.cascade
|
|
1157
|
-
* @requiredField options.programDefinitionId
|
|
1158
|
-
* @requiredField poolDefinitionId
|
|
1159
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_DEFINITION_UPDATE
|
|
1160
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1161
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1162
|
-
* @applicableIdentity APP
|
|
1163
|
-
* @fqn wix.benefit_programs.v1.pool_definition.PoolDefinitionService.AddPoolDefinitionToProgramDefinition
|
|
1164
|
-
*/
|
|
1165
|
-
export declare function addPoolDefinitionToProgramDefinition(poolDefinitionId: string, options: NonNullablePaths<AddPoolDefinitionToProgramDefinitionOptions, `cascade` | `programDefinitionId`>): Promise<NonNullablePaths<AddPoolDefinitionToProgramDefinitionResponse, {
|
|
1166
|
-
[P in PoolDefinitionNonNullablePaths]: `poolDefinition.${P}`;
|
|
1167
|
-
}[PoolDefinitionNonNullablePaths]>>;
|
|
1168
|
-
export interface AddPoolDefinitionToProgramDefinitionOptions {
|
|
996
|
+
interface AddPoolDefinitionToProgramDefinitionOptions {
|
|
1169
997
|
/**
|
|
1170
998
|
* ID of the program definition to add the pool definition to.
|
|
1171
999
|
* @format GUID
|
|
@@ -1174,27 +1002,7 @@ export interface AddPoolDefinitionToProgramDefinitionOptions {
|
|
|
1174
1002
|
/** Determines when the changes to this program definition and pool definition will be applied to associated programs and pools. */
|
|
1175
1003
|
cascade: CascadeWithLiterals;
|
|
1176
1004
|
}
|
|
1177
|
-
|
|
1178
|
-
* Removes a pool definition from a program definition.
|
|
1179
|
-
*
|
|
1180
|
-
* Pool definitions don't need to be contained by a program definition, so this doesn't affect the usability of this pool definition.
|
|
1181
|
-
* @param poolDefinitionId - ID of the pool definition to remove from the program definition.
|
|
1182
|
-
* @public
|
|
1183
|
-
* @documentationMaturity preview
|
|
1184
|
-
* @requiredField options
|
|
1185
|
-
* @requiredField options.cascade
|
|
1186
|
-
* @requiredField options.programDefinitionId
|
|
1187
|
-
* @requiredField poolDefinitionId
|
|
1188
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_DEFINITION_UPDATE
|
|
1189
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1190
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1191
|
-
* @applicableIdentity APP
|
|
1192
|
-
* @fqn wix.benefit_programs.v1.pool_definition.PoolDefinitionService.RemovePoolDefinitionFromProgramDefinition
|
|
1193
|
-
*/
|
|
1194
|
-
export declare function removePoolDefinitionFromProgramDefinition(poolDefinitionId: string, options: NonNullablePaths<RemovePoolDefinitionFromProgramDefinitionOptions, `cascade` | `programDefinitionId`>): Promise<NonNullablePaths<RemovePoolDefinitionFromProgramDefinitionResponse, {
|
|
1195
|
-
[P in PoolDefinitionNonNullablePaths]: `poolDefinition.${P}`;
|
|
1196
|
-
}[PoolDefinitionNonNullablePaths]>>;
|
|
1197
|
-
export interface RemovePoolDefinitionFromProgramDefinitionOptions {
|
|
1005
|
+
interface RemovePoolDefinitionFromProgramDefinitionOptions {
|
|
1198
1006
|
/**
|
|
1199
1007
|
* ID of the program definition to remove the pool definition from.
|
|
1200
1008
|
* @format GUID
|
|
@@ -1203,29 +1011,7 @@ export interface RemovePoolDefinitionFromProgramDefinitionOptions {
|
|
|
1203
1011
|
/** Determines when the changes to this program definition and pool definition will be applied to associated programs and pools. */
|
|
1204
1012
|
cascade: CascadeWithLiterals;
|
|
1205
1013
|
}
|
|
1206
|
-
|
|
1207
|
-
* Retrieve all a program definition's pool definitions.
|
|
1208
|
-
* @param programDefinitionId - ID of the program definition to retrieve its pool definitions.
|
|
1209
|
-
* @public
|
|
1210
|
-
* @documentationMaturity preview
|
|
1211
|
-
* @requiredField options
|
|
1212
|
-
* @requiredField options.namespace
|
|
1213
|
-
* @requiredField programDefinitionId
|
|
1214
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_DEFINITION_READ
|
|
1215
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1216
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
1217
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.READ
|
|
1218
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.READ
|
|
1219
|
-
* @permissionScope Manage Events
|
|
1220
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1221
|
-
* @applicableIdentity APP
|
|
1222
|
-
* @applicableIdentity VISITOR
|
|
1223
|
-
* @fqn wix.benefit_programs.v1.pool_definition.PoolDefinitionService.FindPoolDefinitionsByProgramDefinition
|
|
1224
|
-
*/
|
|
1225
|
-
export declare function findPoolDefinitionsByProgramDefinition(programDefinitionId: string, options: NonNullablePaths<FindPoolDefinitionsByProgramDefinitionOptions, `namespace`>): Promise<NonNullablePaths<FindPoolDefinitionsByProgramDefinitionResponse, {
|
|
1226
|
-
[P in PoolDefinitionNonNullablePaths]: `poolDefinitions.${number}.${P}`;
|
|
1227
|
-
}[PoolDefinitionNonNullablePaths]>>;
|
|
1228
|
-
export interface FindPoolDefinitionsByProgramDefinitionOptions {
|
|
1014
|
+
interface FindPoolDefinitionsByProgramDefinitionOptions {
|
|
1229
1015
|
/**
|
|
1230
1016
|
* Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.
|
|
1231
1017
|
* @minLength 1
|
|
@@ -1233,4 +1019,5 @@ export interface FindPoolDefinitionsByProgramDefinitionOptions {
|
|
|
1233
1019
|
*/
|
|
1234
1020
|
namespace: string;
|
|
1235
1021
|
}
|
|
1236
|
-
|
|
1022
|
+
|
|
1023
|
+
export { type UpdatePoolDefinitionResponse as $, type AddPoolDefinitionToProgramDefinitionOptions as A, type BulkCreatePoolDefinitionsOptions as B, type CreatePoolDefinitionOptions as C, type DeletePoolDefinitionOptions as D, type CustomPolicy as E, type FindPoolDefinitionsByProgramDefinitionOptions as F, type CreditConfiguration as G, type RolloverConfiguration as H, type ExtendedFields as I, type PoolDefinitionAddedToProgramDefinition as J, type PoolDefinitionRemovedFromProgramDefinition as K, type PoolDefinitionUpdatedProxySupport as L, type PoolDefinitionDeletedProxySupport as M, type CreatePoolDefinitionRequest as N, type CreatePoolDefinitionResponse as O, type PoolDefinition as P, type BulkCreatePoolDefinitionsRequest as Q, type RemovePoolDefinitionFromProgramDefinitionOptions as R, SortOrder as S, Type as T, type UpdatePoolDefinition as U, type BulkPoolDefinitionResult as V, WeekDay as W, type ItemMetadata as X, type ApplicationError as Y, type BulkActionMetadata as Z, type UpdatePoolDefinitionRequest as _, type BulkCreatePoolDefinitionsResponse as a, type BulkUpdatePoolDefinitionsRequest as a0, type MaskedPoolDefinition as a1, type DeletePoolDefinitionRequest as a2, type DeletePoolDefinitionResponse as a3, type BulkDeletePoolDefinitionsRequest as a4, type GetPoolDefinitionRequest as a5, type GetPoolDefinitionResponse as a6, type QueryPoolDefinitionsRequest as a7, type CursorQuery as a8, type CursorQueryPagingMethodOneOf as a9, type Sorting as aa, type CursorPaging as ab, type QueryPoolDefinitionsResponse as ac, type CursorPagingMetadata as ad, type Cursors as ae, type AddPoolDefinitionToProgramDefinitionRequest as af, type RemovePoolDefinitionFromProgramDefinitionRequest as ag, type FindPoolDefinitionsByProgramDefinitionRequest as ah, type DomainEvent as ai, type DomainEventBodyOneOf as aj, type EntityCreatedEvent as ak, type RestoreInfo as al, type EntityUpdatedEvent as am, type EntityDeletedEvent as an, type ActionEvent as ao, type MessageEnvelope as ap, type IdentificationData as aq, type IdentificationDataIdOneOf as ar, type PoolDefinitionsQueryResult as as, type UpdatePoolDefinitionOptions as b, type BulkUpdatePoolDefinitionsOptions as c, type BulkUpdatePoolDefinitionsResponse as d, type BulkDeletePoolDefinitionsOptions as e, type BulkDeletePoolDefinitionsResponse as f, type PoolDefinitionsQueryBuilder as g, type AddPoolDefinitionToProgramDefinitionResponse as h, type RemovePoolDefinitionFromProgramDefinitionResponse as i, type FindPoolDefinitionsByProgramDefinitionResponse as j, PolicyExpressionType as k, RateLimitedPolicyType as l, Cascade as m, WebhookIdentityType as n, type Details as o, type Benefit as p, type PolicyExpression as q, type PolicyExpressionExpressionOneOf as r, type PolicyExpressionNot as s, type PolicyExpressionAnd as t, type PolicyExpressionOr as u, type Policy as v, type PolicyPolicyOneOf as w, type FixedIntervalPolicy as x, type RateLimitedPolicy as y, type RateLimitedPolicyPeriodOneOf as z };
|