@wix/auto_sdk_benefit-programs_pools 1.0.0
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/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/benefit-programs-v1-pool-pools.context.d.ts +12 -0
- package/build/cjs/src/benefit-programs-v1-pool-pools.context.js +28 -0
- package/build/cjs/src/benefit-programs-v1-pool-pools.context.js.map +1 -0
- package/build/cjs/src/benefit-programs-v1-pool-pools.http.d.ts +51 -0
- package/build/cjs/src/benefit-programs-v1-pool-pools.http.js +363 -0
- package/build/cjs/src/benefit-programs-v1-pool-pools.http.js.map +1 -0
- package/build/cjs/src/benefit-programs-v1-pool-pools.meta.d.ts +24 -0
- package/build/cjs/src/benefit-programs-v1-pool-pools.meta.js +180 -0
- package/build/cjs/src/benefit-programs-v1-pool-pools.meta.js.map +1 -0
- package/build/cjs/src/benefit-programs-v1-pool-pools.public.d.ts +93 -0
- package/build/cjs/src/benefit-programs-v1-pool-pools.public.js +68 -0
- package/build/cjs/src/benefit-programs-v1-pool-pools.public.js.map +1 -0
- package/build/cjs/src/benefit-programs-v1-pool-pools.types.d.ts +1434 -0
- package/build/cjs/src/benefit-programs-v1-pool-pools.types.js +148 -0
- package/build/cjs/src/benefit-programs-v1-pool-pools.types.js.map +1 -0
- package/build/cjs/src/benefit-programs-v1-pool-pools.universal.d.ts +1845 -0
- package/build/cjs/src/benefit-programs-v1-pool-pools.universal.js +556 -0
- package/build/cjs/src/benefit-programs-v1-pool-pools.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/benefit-programs-v1-pool-pools.context.d.ts +12 -0
- package/build/es/src/benefit-programs-v1-pool-pools.context.js +12 -0
- package/build/es/src/benefit-programs-v1-pool-pools.context.js.map +1 -0
- package/build/es/src/benefit-programs-v1-pool-pools.http.d.ts +51 -0
- package/build/es/src/benefit-programs-v1-pool-pools.http.js +352 -0
- package/build/es/src/benefit-programs-v1-pool-pools.http.js.map +1 -0
- package/build/es/src/benefit-programs-v1-pool-pools.meta.d.ts +24 -0
- package/build/es/src/benefit-programs-v1-pool-pools.meta.js +146 -0
- package/build/es/src/benefit-programs-v1-pool-pools.meta.js.map +1 -0
- package/build/es/src/benefit-programs-v1-pool-pools.public.d.ts +93 -0
- package/build/es/src/benefit-programs-v1-pool-pools.public.js +44 -0
- package/build/es/src/benefit-programs-v1-pool-pools.public.js.map +1 -0
- package/build/es/src/benefit-programs-v1-pool-pools.types.d.ts +1434 -0
- package/build/es/src/benefit-programs-v1-pool-pools.types.js +145 -0
- package/build/es/src/benefit-programs-v1-pool-pools.types.js.map +1 -0
- package/build/es/src/benefit-programs-v1-pool-pools.universal.d.ts +1845 -0
- package/build/es/src/benefit-programs-v1-pool-pools.universal.js +522 -0
- package/build/es/src/benefit-programs-v1-pool-pools.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.context.d.ts +12 -0
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.context.js +28 -0
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.context.js.map +1 -0
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.http.d.ts +51 -0
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.http.js +363 -0
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.http.js.map +1 -0
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.meta.d.ts +24 -0
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.meta.js +180 -0
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.meta.js.map +1 -0
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.public.d.ts +93 -0
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.public.js +68 -0
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.public.js.map +1 -0
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.types.d.ts +1434 -0
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.types.js +148 -0
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.types.js.map +1 -0
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.universal.d.ts +1845 -0
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.universal.js +556 -0
- package/build/internal/cjs/src/benefit-programs-v1-pool-pools.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/benefit-programs-v1-pool-pools.context.d.ts +12 -0
- package/build/internal/es/src/benefit-programs-v1-pool-pools.context.js +12 -0
- package/build/internal/es/src/benefit-programs-v1-pool-pools.context.js.map +1 -0
- package/build/internal/es/src/benefit-programs-v1-pool-pools.http.d.ts +51 -0
- package/build/internal/es/src/benefit-programs-v1-pool-pools.http.js +352 -0
- package/build/internal/es/src/benefit-programs-v1-pool-pools.http.js.map +1 -0
- package/build/internal/es/src/benefit-programs-v1-pool-pools.meta.d.ts +24 -0
- package/build/internal/es/src/benefit-programs-v1-pool-pools.meta.js +146 -0
- package/build/internal/es/src/benefit-programs-v1-pool-pools.meta.js.map +1 -0
- package/build/internal/es/src/benefit-programs-v1-pool-pools.public.d.ts +93 -0
- package/build/internal/es/src/benefit-programs-v1-pool-pools.public.js +44 -0
- package/build/internal/es/src/benefit-programs-v1-pool-pools.public.js.map +1 -0
- package/build/internal/es/src/benefit-programs-v1-pool-pools.types.d.ts +1434 -0
- package/build/internal/es/src/benefit-programs-v1-pool-pools.types.js +145 -0
- package/build/internal/es/src/benefit-programs-v1-pool-pools.types.js.map +1 -0
- package/build/internal/es/src/benefit-programs-v1-pool-pools.universal.d.ts +1845 -0
- package/build/internal/es/src/benefit-programs-v1-pool-pools.universal.js +522 -0
- package/build/internal/es/src/benefit-programs-v1-pool-pools.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,1434 @@
|
|
|
1
|
+
export interface Pool {
|
|
2
|
+
/**
|
|
3
|
+
* Pool ID.
|
|
4
|
+
* @readonly
|
|
5
|
+
*/
|
|
6
|
+
id?: string | null;
|
|
7
|
+
/**
|
|
8
|
+
* Revision number, which increments by 1 each time the pool is updated.
|
|
9
|
+
* To prevent conflicting changes, the current revision must be passed when updating the pool.
|
|
10
|
+
*
|
|
11
|
+
* Ignored when creating a pool.
|
|
12
|
+
* @readonly
|
|
13
|
+
*/
|
|
14
|
+
revision?: string | null;
|
|
15
|
+
/**
|
|
16
|
+
* Date and time the pool was created.
|
|
17
|
+
* @readonly
|
|
18
|
+
*/
|
|
19
|
+
createdDate?: Date | null;
|
|
20
|
+
/**
|
|
21
|
+
* Date and time the pool was updated.
|
|
22
|
+
* @readonly
|
|
23
|
+
*/
|
|
24
|
+
updatedDate?: Date | null;
|
|
25
|
+
/**
|
|
26
|
+
* Pool definition from which this benefit pool was created.
|
|
27
|
+
* @readonly
|
|
28
|
+
*/
|
|
29
|
+
poolDefinitionId?: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* Program definition from which this benefit pool was provisioned.
|
|
32
|
+
* @readonly
|
|
33
|
+
*/
|
|
34
|
+
programDefinitionId?: string | null;
|
|
35
|
+
/**
|
|
36
|
+
* ID of the program to which this benefit pool is associated.
|
|
37
|
+
* @readonly
|
|
38
|
+
*/
|
|
39
|
+
programId?: string | null;
|
|
40
|
+
/**
|
|
41
|
+
* Benefit pool status.
|
|
42
|
+
* @readonly
|
|
43
|
+
*/
|
|
44
|
+
status?: PoolStatus;
|
|
45
|
+
/** Benefit pool owner. */
|
|
46
|
+
beneficiary?: CommonIdentificationData;
|
|
47
|
+
/**
|
|
48
|
+
* Benefit pool information.
|
|
49
|
+
*
|
|
50
|
+
* Includes the item, policy, and credit configurations.
|
|
51
|
+
*/
|
|
52
|
+
details?: Details;
|
|
53
|
+
/**
|
|
54
|
+
* Pool name.
|
|
55
|
+
*
|
|
56
|
+
* It's recommended to keep the same as the associated pool definition's `displayName`.
|
|
57
|
+
*/
|
|
58
|
+
displayName?: string;
|
|
59
|
+
/** External system that is the source of the program creation. For example, `wix-pricing-plans`, `wix-loyalty`. */
|
|
60
|
+
namespace?: string | null;
|
|
61
|
+
/**
|
|
62
|
+
* Custom field data for the pool object.
|
|
63
|
+
* [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.
|
|
64
|
+
*/
|
|
65
|
+
extendedFields?: ExtendedFields;
|
|
66
|
+
/**
|
|
67
|
+
* Program definition information.
|
|
68
|
+
* @readonly
|
|
69
|
+
*/
|
|
70
|
+
programDefinition?: ProgramDefinitionInfo;
|
|
71
|
+
/**
|
|
72
|
+
* Program information.
|
|
73
|
+
* @readonly
|
|
74
|
+
*/
|
|
75
|
+
program?: ProgramInfo;
|
|
76
|
+
/**
|
|
77
|
+
* Version of the associated pool definition at the this benefit pool was created.
|
|
78
|
+
*
|
|
79
|
+
* `poolDefinition.revision`.
|
|
80
|
+
* @readonly
|
|
81
|
+
*/
|
|
82
|
+
poolDefinitionRevision?: string | null;
|
|
83
|
+
/**
|
|
84
|
+
* Number of times this benefit pool has been renewed.
|
|
85
|
+
* @readonly
|
|
86
|
+
*/
|
|
87
|
+
renewalCount?: number | null;
|
|
88
|
+
}
|
|
89
|
+
export declare enum PoolStatus {
|
|
90
|
+
UNDEFINED = "UNDEFINED",
|
|
91
|
+
/** Active benefit pool. */
|
|
92
|
+
ACTIVE = "ACTIVE",
|
|
93
|
+
/** Paused benefit pool. */
|
|
94
|
+
PAUSED = "PAUSED",
|
|
95
|
+
/**
|
|
96
|
+
* Inactive benefit pool.
|
|
97
|
+
*
|
|
98
|
+
* Benefits can't be redeemed or reserved.
|
|
99
|
+
*/
|
|
100
|
+
ENDED = "ENDED",
|
|
101
|
+
/** Process state of activating the benefit pool's program. */
|
|
102
|
+
PROVISIONING = "PROVISIONING",
|
|
103
|
+
/**
|
|
104
|
+
* Process state of renewing the benefits.
|
|
105
|
+
* Typically at the start of a new benefit renewal cycle.
|
|
106
|
+
* Result of calling Renew Program API.
|
|
107
|
+
*/
|
|
108
|
+
RENEWING = "RENEWING"
|
|
109
|
+
}
|
|
110
|
+
export interface CommonIdentificationData extends CommonIdentificationDataIdOneOf {
|
|
111
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
112
|
+
anonymousVisitorId?: string;
|
|
113
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
114
|
+
memberId?: string;
|
|
115
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
116
|
+
wixUserId?: string;
|
|
117
|
+
}
|
|
118
|
+
/** @oneof */
|
|
119
|
+
export interface CommonIdentificationDataIdOneOf {
|
|
120
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
121
|
+
anonymousVisitorId?: string;
|
|
122
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
123
|
+
memberId?: string;
|
|
124
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
125
|
+
wixUserId?: string;
|
|
126
|
+
}
|
|
127
|
+
export declare enum IdentityType {
|
|
128
|
+
/** Unknown type. This value is not used. */
|
|
129
|
+
UNKNOWN = "UNKNOWN",
|
|
130
|
+
/** A site visitor who has not logged in. */
|
|
131
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
132
|
+
/** A logged-in site member. */
|
|
133
|
+
MEMBER = "MEMBER",
|
|
134
|
+
/** A Wix account holder, such as a site owner or contributor. */
|
|
135
|
+
WIX_USER = "WIX_USER"
|
|
136
|
+
}
|
|
137
|
+
export interface Details {
|
|
138
|
+
/** Array of benefits, each containing price and policy settings specific to that benefit within the pool. */
|
|
139
|
+
benefits?: Benefit[];
|
|
140
|
+
/**
|
|
141
|
+
* Settings that control the initial credits and renewal cycle configurations of the benefit pool.
|
|
142
|
+
*
|
|
143
|
+
* Default: Benefits may be redeemed without limit.
|
|
144
|
+
*/
|
|
145
|
+
creditConfiguration?: CreditConfiguration;
|
|
146
|
+
/**
|
|
147
|
+
* 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.
|
|
148
|
+
*
|
|
149
|
+
* Policy types may be either:
|
|
150
|
+
*
|
|
151
|
+
* + FIXED INTERVALS: Specifies the timing during the day.
|
|
152
|
+
*
|
|
153
|
+
* + RATE LIMITED: Specifies how many times the benefit can be redeemed within a given renewal cycle.
|
|
154
|
+
*
|
|
155
|
+
* Each selected policy type must have its corresponding policy options. For example, the `fixedInterval` type requires `fixedIntervalOptions` to be included in the parameters.
|
|
156
|
+
*
|
|
157
|
+
* 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.
|
|
158
|
+
*/
|
|
159
|
+
policyExpression?: PolicyExpression;
|
|
160
|
+
/** Additional info set by the benefit provider. */
|
|
161
|
+
additionalData?: Record<string, any> | null;
|
|
162
|
+
}
|
|
163
|
+
export interface Benefit {
|
|
164
|
+
/**
|
|
165
|
+
* An unique identifier for a pool benefit.
|
|
166
|
+
*
|
|
167
|
+
* This key is consistent across the pool definition and all its associated benefit pools.
|
|
168
|
+
*/
|
|
169
|
+
benefitKey?: string;
|
|
170
|
+
/**
|
|
171
|
+
* Represents the associated benefit item that belongs to a benefit pool.
|
|
172
|
+
*
|
|
173
|
+
* This ID is returned when calling Create Item.
|
|
174
|
+
*
|
|
175
|
+
* 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.
|
|
176
|
+
* @readonly
|
|
177
|
+
*/
|
|
178
|
+
itemSetId?: string | null;
|
|
179
|
+
/**
|
|
180
|
+
* Price of the benefit item as expressed in credits.
|
|
181
|
+
* Represents the cost to redeem the benefit.
|
|
182
|
+
*
|
|
183
|
+
* Don't set a price if the `details.creditConfiguration` is empty. Since the benefits have an unlimited redemption limit, they can't have an associated price.
|
|
184
|
+
*/
|
|
185
|
+
price?: string | null;
|
|
186
|
+
/**
|
|
187
|
+
* 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.
|
|
188
|
+
*
|
|
189
|
+
* Overrides the default policies in `benefit.details`.
|
|
190
|
+
*/
|
|
191
|
+
policyExpression?: PolicyExpression;
|
|
192
|
+
/** Additional info that was set by the benefit provider. */
|
|
193
|
+
additionalData?: Record<string, any> | null;
|
|
194
|
+
/** ID of the app providing the benefit. */
|
|
195
|
+
providerAppId?: string | null;
|
|
196
|
+
/** Benefit display name. */
|
|
197
|
+
displayName?: string | null;
|
|
198
|
+
/** Benefit description. */
|
|
199
|
+
description?: string | null;
|
|
200
|
+
}
|
|
201
|
+
export interface PolicyExpression extends PolicyExpressionExpressionOneOf {
|
|
202
|
+
/** Negates the expression. */
|
|
203
|
+
operatorNotOptions?: PolicyExpressionNot;
|
|
204
|
+
/** Combines the expressions with an `AND` operator. */
|
|
205
|
+
operatorAndOptions?: PolicyExpressionAnd;
|
|
206
|
+
/** Combines the expressions with an `OR` operator. */
|
|
207
|
+
operatorOrOptions?: PolicyExpressionOr;
|
|
208
|
+
/** Defines policy terms for benefit redemption. */
|
|
209
|
+
policyOptions?: Policy;
|
|
210
|
+
/**
|
|
211
|
+
* Declare type of policy conditions or settings to use. Use together with the associated policy options to construct policy terms.
|
|
212
|
+
*
|
|
213
|
+
* Different operators can be used to combine multiple policy terms.
|
|
214
|
+
*/
|
|
215
|
+
type?: PolicyExpressionType;
|
|
216
|
+
}
|
|
217
|
+
/** @oneof */
|
|
218
|
+
export interface PolicyExpressionExpressionOneOf {
|
|
219
|
+
/** Negates the expression. */
|
|
220
|
+
operatorNotOptions?: PolicyExpressionNot;
|
|
221
|
+
/** Combines the expressions with an `AND` operator. */
|
|
222
|
+
operatorAndOptions?: PolicyExpressionAnd;
|
|
223
|
+
/** Combines the expressions with an `OR` operator. */
|
|
224
|
+
operatorOrOptions?: PolicyExpressionOr;
|
|
225
|
+
/** Defines policy terms for benefit redemption. */
|
|
226
|
+
policyOptions?: Policy;
|
|
227
|
+
}
|
|
228
|
+
export declare enum PolicyExpressionType {
|
|
229
|
+
UNKNOWN = "UNKNOWN",
|
|
230
|
+
/** Use with associated `operatorNotOptions`. */
|
|
231
|
+
OPERATOR_NOT = "OPERATOR_NOT",
|
|
232
|
+
/** Use with associated `operatorAndOptions`. */
|
|
233
|
+
OPERATOR_AND = "OPERATOR_AND",
|
|
234
|
+
/** Use with associated `operatorOrOptions`. */
|
|
235
|
+
OPERATOR_OR = "OPERATOR_OR",
|
|
236
|
+
/** Use with associated `policyOptions` to define a policy. */
|
|
237
|
+
POLICY = "POLICY"
|
|
238
|
+
}
|
|
239
|
+
export interface PolicyExpressionNot {
|
|
240
|
+
/** Specify policy terms where none of specified policy conditions should be met. Must specify an object with an `expressions` property. */
|
|
241
|
+
expression?: PolicyExpression;
|
|
242
|
+
}
|
|
243
|
+
export interface PolicyExpressionAnd {
|
|
244
|
+
/** Specify policy terms where all policy conditions must be met. Must specify an object with an `expressions` property. */
|
|
245
|
+
expressions?: PolicyExpression[];
|
|
246
|
+
}
|
|
247
|
+
export interface PolicyExpressionOr {
|
|
248
|
+
/** Specify policy terms where at least one of the possible specified policy conditions is met. Must specify an object with an `expressions` property. */
|
|
249
|
+
expressions?: PolicyExpression[];
|
|
250
|
+
}
|
|
251
|
+
export interface Policy extends PolicyPolicyOneOf {
|
|
252
|
+
/** Defines the timing of benefit policy redemption for specific days or hours. */
|
|
253
|
+
fixedIntervalOptions?: FixedIntervalPolicy;
|
|
254
|
+
/** Sets a limit on the number of times a benefit can be redeemed within a given renewal cycle. */
|
|
255
|
+
rateLimitedOptions?: RateLimitedPolicy;
|
|
256
|
+
/** Custom policy definition that is controlled by the CustomPolicyProvider. */
|
|
257
|
+
customOptions?: CustomPolicy;
|
|
258
|
+
/** Specific policy setting. Use together with its associated policy type options. For example, a fixed interval policy type should include a `fixedIntervalOptions` parameter. */
|
|
259
|
+
type?: Type;
|
|
260
|
+
}
|
|
261
|
+
/** @oneof */
|
|
262
|
+
export interface PolicyPolicyOneOf {
|
|
263
|
+
/** Defines the timing of benefit policy redemption for specific days or hours. */
|
|
264
|
+
fixedIntervalOptions?: FixedIntervalPolicy;
|
|
265
|
+
/** Sets a limit on the number of times a benefit can be redeemed within a given renewal cycle. */
|
|
266
|
+
rateLimitedOptions?: RateLimitedPolicy;
|
|
267
|
+
/** Custom policy definition that is controlled by the CustomPolicyProvider. */
|
|
268
|
+
customOptions?: CustomPolicy;
|
|
269
|
+
}
|
|
270
|
+
export declare enum Type {
|
|
271
|
+
/** Unknown policy type. */
|
|
272
|
+
UNKNOWN = "UNKNOWN",
|
|
273
|
+
/** Fixed interval policy type. */
|
|
274
|
+
FIXED_INTERVAL = "FIXED_INTERVAL",
|
|
275
|
+
/** Rate limited policy type. */
|
|
276
|
+
RATE_LIMITED = "RATE_LIMITED",
|
|
277
|
+
CUSTOM = "CUSTOM"
|
|
278
|
+
}
|
|
279
|
+
export interface FixedIntervalPolicy {
|
|
280
|
+
/** Weekday that this interval starts from. If this field is set, then `toWeekDay` must also be set. */
|
|
281
|
+
fromWeekDay?: WeekDay;
|
|
282
|
+
/** Weekday that this interval ends at. If this field is set, then `fromWeekDay` must also be set. */
|
|
283
|
+
toWeekDay?: WeekDay;
|
|
284
|
+
/** Hour that this interval starts from. If this field is set, then `toHour` must also be set. */
|
|
285
|
+
fromHour?: number | null;
|
|
286
|
+
/** Hour that this interval ends at. If this field is set, then `fromHour` must also be set. */
|
|
287
|
+
toHour?: number | null;
|
|
288
|
+
/** Minute that this interval starts from. If this field is set, then `toMinute` must also be set. */
|
|
289
|
+
fromMinute?: number | null;
|
|
290
|
+
/** Minute that this interval ends at. If this field is set, then `fromMinute` must also be set. */
|
|
291
|
+
toMinute?: number | null;
|
|
292
|
+
}
|
|
293
|
+
export declare enum WeekDay {
|
|
294
|
+
/** Unknown weekday. */
|
|
295
|
+
UNKNOWN = "UNKNOWN",
|
|
296
|
+
/** Monday. */
|
|
297
|
+
MONDAY = "MONDAY",
|
|
298
|
+
/** Tuesday. */
|
|
299
|
+
TUESDAY = "TUESDAY",
|
|
300
|
+
/** Wednesday. */
|
|
301
|
+
WEDNESDAY = "WEDNESDAY",
|
|
302
|
+
/** Thursday. */
|
|
303
|
+
THURSDAY = "THURSDAY",
|
|
304
|
+
/** Friday. */
|
|
305
|
+
FRIDAY = "FRIDAY",
|
|
306
|
+
/** Saturday. */
|
|
307
|
+
SATURDAY = "SATURDAY",
|
|
308
|
+
/** Sunday. */
|
|
309
|
+
SUNDAY = "SUNDAY"
|
|
310
|
+
}
|
|
311
|
+
export interface RateLimitedPolicy extends RateLimitedPolicyPeriodOneOf {
|
|
312
|
+
/**
|
|
313
|
+
* Defines the timing of benefit policy redemption for specific days or hours.
|
|
314
|
+
*
|
|
315
|
+
* Used to set the timing policy for a maximum limit of redemptions.
|
|
316
|
+
*/
|
|
317
|
+
fixedIntervalOptions?: FixedIntervalPolicy;
|
|
318
|
+
/** Maximum number of times benefit can be redeemed per renewal cycle. */
|
|
319
|
+
times?: number;
|
|
320
|
+
/** Specific method of setting the benefit limit. `FIXED_INTERVAL` type must be used with its corresponding `fixIntervalPolicyOptions` parameter. */
|
|
321
|
+
type?: RateLimitedPolicyType;
|
|
322
|
+
}
|
|
323
|
+
/** @oneof */
|
|
324
|
+
export interface RateLimitedPolicyPeriodOneOf {
|
|
325
|
+
/**
|
|
326
|
+
* Defines the timing of benefit policy redemption for specific days or hours.
|
|
327
|
+
*
|
|
328
|
+
* Used to set the timing policy for a maximum limit of redemptions.
|
|
329
|
+
*/
|
|
330
|
+
fixedIntervalOptions?: FixedIntervalPolicy;
|
|
331
|
+
}
|
|
332
|
+
export declare enum RateLimitedPolicyType {
|
|
333
|
+
/** Unknown rate limit method. */
|
|
334
|
+
UNKNOWN = "UNKNOWN",
|
|
335
|
+
/** Fixed interval rate limit. The intervals are set using `fixIntervalPolicyOptions`. */
|
|
336
|
+
FIXED_INTERVAL = "FIXED_INTERVAL",
|
|
337
|
+
/** Rate limit is set with `times` field above. */
|
|
338
|
+
PER_CYCLE = "PER_CYCLE"
|
|
339
|
+
}
|
|
340
|
+
/** Custom policy as implemented by the Entitlement Policy Provider */
|
|
341
|
+
export interface CustomPolicy {
|
|
342
|
+
/** References a specific custom policy on the provider's system */
|
|
343
|
+
id?: string;
|
|
344
|
+
/** Custom policy provider id */
|
|
345
|
+
appId?: string | null;
|
|
346
|
+
/** Additional info for this custom policy. It's going to be passed to the policy provider during eligibility checks */
|
|
347
|
+
additionalData?: Record<string, any> | null;
|
|
348
|
+
}
|
|
349
|
+
export interface CreditConfiguration {
|
|
350
|
+
/** The initial total amount of credits available in this benefit pool. */
|
|
351
|
+
amount?: string;
|
|
352
|
+
/** Rollover configuration. */
|
|
353
|
+
rolloverConfiguration?: RolloverConfiguration;
|
|
354
|
+
/** Display name of the unit. */
|
|
355
|
+
unitDisplayName?: string | null;
|
|
356
|
+
}
|
|
357
|
+
export interface RolloverConfiguration {
|
|
358
|
+
/** Determine whether unused credits are rolled over to the new cycle. */
|
|
359
|
+
enabled?: boolean | null;
|
|
360
|
+
/**
|
|
361
|
+
* The maximum amount of credits that can be transferred to the next benefit renewal cycle.
|
|
362
|
+
*
|
|
363
|
+
* If current balance exceeds this cap, no credits will transfer into the next renewal cycle until the balance is within the allowable limit.
|
|
364
|
+
*/
|
|
365
|
+
balanceCap?: string | null;
|
|
366
|
+
}
|
|
367
|
+
export interface ExtendedFields {
|
|
368
|
+
/**
|
|
369
|
+
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
370
|
+
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
371
|
+
*
|
|
372
|
+
* You can only access fields for which you have the appropriate permissions.
|
|
373
|
+
*
|
|
374
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
375
|
+
*/
|
|
376
|
+
namespaces?: Record<string, Record<string, any>>;
|
|
377
|
+
}
|
|
378
|
+
export interface ProgramDefinitionInfo {
|
|
379
|
+
/**
|
|
380
|
+
* ID of the program definition that provisioned the program associated with this benefit pool.
|
|
381
|
+
* @readonly
|
|
382
|
+
*/
|
|
383
|
+
id?: string;
|
|
384
|
+
/**
|
|
385
|
+
* External ID of the program definition that provisioned this program.
|
|
386
|
+
*
|
|
387
|
+
* This identifies the source program definition in the external system.
|
|
388
|
+
* @readonly
|
|
389
|
+
*/
|
|
390
|
+
externalId?: string | null;
|
|
391
|
+
}
|
|
392
|
+
export interface ProgramInfo {
|
|
393
|
+
/**
|
|
394
|
+
* ID of the program associated with this benefit pool.
|
|
395
|
+
* @readonly
|
|
396
|
+
*/
|
|
397
|
+
id?: string;
|
|
398
|
+
/**
|
|
399
|
+
* External ID of the program associated with this benefit pool.
|
|
400
|
+
*
|
|
401
|
+
* This identifies the source program in the external system.
|
|
402
|
+
* @readonly
|
|
403
|
+
*/
|
|
404
|
+
externalId?: string | null;
|
|
405
|
+
}
|
|
406
|
+
export declare enum PoolOrigin {
|
|
407
|
+
/** Unknown pool origin. */
|
|
408
|
+
UNKNOWN = "UNKNOWN",
|
|
409
|
+
/** Benefit pool created by a program provision. */
|
|
410
|
+
PROVISION = "PROVISION",
|
|
411
|
+
/** Benefit pool was created when pool definition was added to program definition. */
|
|
412
|
+
CASCADE = "CASCADE"
|
|
413
|
+
}
|
|
414
|
+
export interface PoolProvisioned {
|
|
415
|
+
/** Pool which has been provisioned */
|
|
416
|
+
pool?: Pool;
|
|
417
|
+
}
|
|
418
|
+
export interface PoolRenewed {
|
|
419
|
+
/** Pool which has been granted */
|
|
420
|
+
pool?: Pool;
|
|
421
|
+
}
|
|
422
|
+
export interface BenefitRedeemed {
|
|
423
|
+
/** Pool which has been redeemed */
|
|
424
|
+
pool?: Pool;
|
|
425
|
+
/** Details of the redemption */
|
|
426
|
+
redemptionDetails?: RedemptionDetails;
|
|
427
|
+
}
|
|
428
|
+
export interface RedemptionDetails {
|
|
429
|
+
/** Id of the redemption transaction */
|
|
430
|
+
transactionId?: string;
|
|
431
|
+
/** Reference of the item that is being redeemed */
|
|
432
|
+
itemReference?: ItemReference;
|
|
433
|
+
/** Number of of items to redeem */
|
|
434
|
+
itemCount?: number;
|
|
435
|
+
/**
|
|
436
|
+
* Date at which the item will be used. Target date does not necessarily equal the redemption date. Credits are redeemed immediately.
|
|
437
|
+
* This date is only used for validations that may be performed by entitlement providers
|
|
438
|
+
*/
|
|
439
|
+
targetDate?: Date | null;
|
|
440
|
+
/** Idempotency key */
|
|
441
|
+
idempotencyKey?: string;
|
|
442
|
+
/** Additional info provided during redemption */
|
|
443
|
+
additionalData?: Record<string, any> | null;
|
|
444
|
+
/** Beneficiary of the entitlement */
|
|
445
|
+
beneficiary?: CommonIdentificationData;
|
|
446
|
+
}
|
|
447
|
+
export interface ItemReference {
|
|
448
|
+
/** External ID of the item. */
|
|
449
|
+
externalId?: string;
|
|
450
|
+
/** Item category. */
|
|
451
|
+
category?: string;
|
|
452
|
+
/** ID of the application providing the benefits. */
|
|
453
|
+
providerAppId?: string;
|
|
454
|
+
}
|
|
455
|
+
export interface PoolPaused {
|
|
456
|
+
/** Pool which has been paused */
|
|
457
|
+
pool?: Pool;
|
|
458
|
+
}
|
|
459
|
+
export interface PoolResumed {
|
|
460
|
+
/** Pool which has been resumed */
|
|
461
|
+
pool?: Pool;
|
|
462
|
+
}
|
|
463
|
+
export interface PoolEnded {
|
|
464
|
+
/** Pool which has been ended */
|
|
465
|
+
pool?: Pool;
|
|
466
|
+
}
|
|
467
|
+
export interface BenefitReserved {
|
|
468
|
+
/** Pool which was used to perform this transaction */
|
|
469
|
+
pool?: Pool;
|
|
470
|
+
/** Details of the redemption */
|
|
471
|
+
redemptionDetails?: RedemptionDetails;
|
|
472
|
+
}
|
|
473
|
+
export interface BenefitReservationCanceled {
|
|
474
|
+
/** Pool which was used to perform this transaction */
|
|
475
|
+
pool?: Pool;
|
|
476
|
+
/** Id of the canceled reservation transaction */
|
|
477
|
+
transactionId?: string;
|
|
478
|
+
}
|
|
479
|
+
export interface BenefitReservationReleased {
|
|
480
|
+
/** Pool which was used to perform this transaction */
|
|
481
|
+
pool?: Pool;
|
|
482
|
+
/** Id of the released reservation transaction */
|
|
483
|
+
transactionId?: string;
|
|
484
|
+
}
|
|
485
|
+
export interface CreatePoolRequest {
|
|
486
|
+
/** Pool to be created. */
|
|
487
|
+
pool?: Pool;
|
|
488
|
+
}
|
|
489
|
+
export interface CreatePoolResponse {
|
|
490
|
+
/** Created pool. */
|
|
491
|
+
pool?: Pool;
|
|
492
|
+
}
|
|
493
|
+
export interface GetPoolRequest {
|
|
494
|
+
/** ID of the pool to retrieve. */
|
|
495
|
+
poolId: string;
|
|
496
|
+
}
|
|
497
|
+
export interface GetPoolResponse {
|
|
498
|
+
/** Retrieved pool. */
|
|
499
|
+
pool?: Pool;
|
|
500
|
+
}
|
|
501
|
+
export interface UpdatePoolRequest {
|
|
502
|
+
/** Pool to be updated. */
|
|
503
|
+
pool: Pool;
|
|
504
|
+
}
|
|
505
|
+
export interface UpdatePoolResponse {
|
|
506
|
+
/** Updated pool. */
|
|
507
|
+
pool?: Pool;
|
|
508
|
+
}
|
|
509
|
+
export interface DeletePoolRequest {
|
|
510
|
+
/** ID of the pool to delete. */
|
|
511
|
+
poolId?: string;
|
|
512
|
+
}
|
|
513
|
+
export interface DeletePoolResponse {
|
|
514
|
+
}
|
|
515
|
+
export interface QueryPoolsRequest {
|
|
516
|
+
/** Query to select pools. */
|
|
517
|
+
query: CursorQuery;
|
|
518
|
+
}
|
|
519
|
+
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
520
|
+
/** 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`. */
|
|
521
|
+
cursorPaging?: CursorPaging;
|
|
522
|
+
/**
|
|
523
|
+
* Filter object in the following format:
|
|
524
|
+
* `"filter" : {
|
|
525
|
+
* "fieldName1": "value1",
|
|
526
|
+
* "fieldName2":{"$operator":"value2"}
|
|
527
|
+
* }`
|
|
528
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
529
|
+
*/
|
|
530
|
+
filter?: Record<string, any> | null;
|
|
531
|
+
/**
|
|
532
|
+
* Sort object in the following format:
|
|
533
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
534
|
+
*/
|
|
535
|
+
sort?: Sorting[];
|
|
536
|
+
}
|
|
537
|
+
/** @oneof */
|
|
538
|
+
export interface CursorQueryPagingMethodOneOf {
|
|
539
|
+
/** 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`. */
|
|
540
|
+
cursorPaging?: CursorPaging;
|
|
541
|
+
}
|
|
542
|
+
export interface Sorting {
|
|
543
|
+
/** Name of the field to sort by. */
|
|
544
|
+
fieldName?: string;
|
|
545
|
+
/** Sort order. */
|
|
546
|
+
order?: SortOrder;
|
|
547
|
+
}
|
|
548
|
+
export declare enum SortOrder {
|
|
549
|
+
/** Ascending sort order. */
|
|
550
|
+
ASC = "ASC",
|
|
551
|
+
/** Descending sort order. */
|
|
552
|
+
DESC = "DESC"
|
|
553
|
+
}
|
|
554
|
+
export interface CursorPaging {
|
|
555
|
+
/** Maximum number of items to return in the results. */
|
|
556
|
+
limit?: number | null;
|
|
557
|
+
/**
|
|
558
|
+
* Pointer to the next or previous page in the list of results.
|
|
559
|
+
*
|
|
560
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
561
|
+
* Not relevant for the first request.
|
|
562
|
+
*/
|
|
563
|
+
cursor?: string | null;
|
|
564
|
+
}
|
|
565
|
+
export interface QueryPoolsResponse {
|
|
566
|
+
/** List of pools. */
|
|
567
|
+
pools?: Pool[];
|
|
568
|
+
/** Metadata for the paginated results. */
|
|
569
|
+
metadata?: CursorPagingMetadata;
|
|
570
|
+
}
|
|
571
|
+
export interface CursorPagingMetadata {
|
|
572
|
+
/** Number of items returned in the response. */
|
|
573
|
+
count?: number | null;
|
|
574
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
575
|
+
cursors?: Cursors;
|
|
576
|
+
/**
|
|
577
|
+
* Whether there are more pages to retrieve following the current page.
|
|
578
|
+
*
|
|
579
|
+
* + `true`: Another page of results can be retrieved.
|
|
580
|
+
* + `false`: This is the last page.
|
|
581
|
+
*/
|
|
582
|
+
hasNext?: boolean | null;
|
|
583
|
+
}
|
|
584
|
+
export interface Cursors {
|
|
585
|
+
/** Cursor string pointing to the next page in the list of results. */
|
|
586
|
+
next?: string | null;
|
|
587
|
+
/** Cursor pointing to the previous page in the list of results. */
|
|
588
|
+
prev?: string | null;
|
|
589
|
+
}
|
|
590
|
+
export interface RedeemBenefitRequest {
|
|
591
|
+
/** ID of the benefit pool being redeemed. */
|
|
592
|
+
poolId: string;
|
|
593
|
+
/** Reference of the benefit item that is being redeemed. */
|
|
594
|
+
itemReference: ItemReference;
|
|
595
|
+
/**
|
|
596
|
+
* Key of the specific benefit to be redeemed.
|
|
597
|
+
*
|
|
598
|
+
* This needs to be specified to ensure the correct benefit is redeemed.
|
|
599
|
+
*/
|
|
600
|
+
benefitKey: string;
|
|
601
|
+
/** Number of of items to redeem. */
|
|
602
|
+
count?: number;
|
|
603
|
+
/**
|
|
604
|
+
* Date when the benefit item will be used.
|
|
605
|
+
*
|
|
606
|
+
* While credit balance is adjusted immediately upon the redemption request, the target date may be set for a later time than the date of the request.
|
|
607
|
+
*
|
|
608
|
+
* Used for the app providing the benefit items to manage the logistics associated with the item.
|
|
609
|
+
*/
|
|
610
|
+
targetDate?: Date | null;
|
|
611
|
+
/**
|
|
612
|
+
* Unique identifier, generated by the client.
|
|
613
|
+
* Used to recognize repeated attempts to make the same request.
|
|
614
|
+
*/
|
|
615
|
+
idempotencyKey: string;
|
|
616
|
+
/** Additional information. */
|
|
617
|
+
additionalData?: Record<string, any> | null;
|
|
618
|
+
/** Benefit pool owner. */
|
|
619
|
+
beneficiary?: CommonIdentificationData;
|
|
620
|
+
/**
|
|
621
|
+
* Module that is the source of the benefit pool creation.
|
|
622
|
+
*
|
|
623
|
+
* Must match the previously defined namespace in the associated pool definition.
|
|
624
|
+
*/
|
|
625
|
+
namespace: string;
|
|
626
|
+
}
|
|
627
|
+
export interface RedeemBenefitResponse {
|
|
628
|
+
/** Id of the resulting transaction. */
|
|
629
|
+
transactionId?: string;
|
|
630
|
+
}
|
|
631
|
+
export interface NotEnoughBalance {
|
|
632
|
+
/** Pool ID */
|
|
633
|
+
poolId?: string;
|
|
634
|
+
/** Item reference */
|
|
635
|
+
itemReference?: ItemReference;
|
|
636
|
+
/** Price of the item expressed in credits */
|
|
637
|
+
availableBalance?: string;
|
|
638
|
+
/** Price of the item expressed in credits */
|
|
639
|
+
requestedBalance?: string;
|
|
640
|
+
}
|
|
641
|
+
export interface PolicyExpressionEvaluatedToFalse {
|
|
642
|
+
/** Pool ID */
|
|
643
|
+
poolId?: string;
|
|
644
|
+
/** Item reference */
|
|
645
|
+
itemReference?: ItemReference;
|
|
646
|
+
/** Failure details */
|
|
647
|
+
failureDetails?: FailureDetails[];
|
|
648
|
+
}
|
|
649
|
+
export interface FailureDetails {
|
|
650
|
+
/** Failure code */
|
|
651
|
+
code?: string;
|
|
652
|
+
/** Failure message */
|
|
653
|
+
message?: string | null;
|
|
654
|
+
/** Policy id */
|
|
655
|
+
policyId?: string | null;
|
|
656
|
+
/** App that owns the policy */
|
|
657
|
+
appId?: string | null;
|
|
658
|
+
/** Information provided by the policy */
|
|
659
|
+
errorData?: Record<string, any> | null;
|
|
660
|
+
}
|
|
661
|
+
export interface PoolNotActive {
|
|
662
|
+
/** Pool ID */
|
|
663
|
+
poolId?: string;
|
|
664
|
+
/** Pool status */
|
|
665
|
+
poolStatus?: PoolStatus;
|
|
666
|
+
}
|
|
667
|
+
export interface PoolNotFound {
|
|
668
|
+
/** Pool ID */
|
|
669
|
+
poolId?: string;
|
|
670
|
+
}
|
|
671
|
+
export interface BenefitAlreadyRedeemed {
|
|
672
|
+
/** Pool ID */
|
|
673
|
+
poolId?: string;
|
|
674
|
+
/** Idempotency key of the request that failed */
|
|
675
|
+
idempotencyKey?: string;
|
|
676
|
+
}
|
|
677
|
+
export interface BenefitNotFound {
|
|
678
|
+
/** Pool ID */
|
|
679
|
+
poolId?: string;
|
|
680
|
+
/** Key of the referenced benefit, if provided */
|
|
681
|
+
benefitKey?: string | null;
|
|
682
|
+
}
|
|
683
|
+
export interface ReserveBenefitRequest {
|
|
684
|
+
/** Id of the pool that is being redeemed from */
|
|
685
|
+
poolId?: string;
|
|
686
|
+
/** Reference of the item that is being redeemed. */
|
|
687
|
+
itemReference?: ItemReference;
|
|
688
|
+
/**
|
|
689
|
+
* Key of the benefit to be redeemed, associated with a particular benefit.
|
|
690
|
+
*
|
|
691
|
+
* This key must be specified to ensure the correct benefit is redeemed.
|
|
692
|
+
*
|
|
693
|
+
* Default: The first eligible benefit in the benefit pool will be redeemed.
|
|
694
|
+
*/
|
|
695
|
+
benefitKey?: string | null;
|
|
696
|
+
/** Number of items to redeem. */
|
|
697
|
+
count?: number;
|
|
698
|
+
/**
|
|
699
|
+
* Date when the benefit item will be used.
|
|
700
|
+
*
|
|
701
|
+
* While the credit balance is adjusted immediately upon the redemption request, the target date may be set for a later time than the date of the request.
|
|
702
|
+
*
|
|
703
|
+
* Used for the app providing the benefit items to manage the logistics associated with the item.
|
|
704
|
+
*/
|
|
705
|
+
targetDate?: Date | null;
|
|
706
|
+
/** Idempotency key */
|
|
707
|
+
idempotencyKey?: string;
|
|
708
|
+
/** Additional info */
|
|
709
|
+
additionalData?: Record<string, any> | null;
|
|
710
|
+
/** Benefit pool owner. */
|
|
711
|
+
beneficiary?: CommonIdentificationData;
|
|
712
|
+
/**
|
|
713
|
+
* Module that is the source of the benefit pool creation.
|
|
714
|
+
*
|
|
715
|
+
* This value must correspond with the previously defined namespace established when creating the associated pool definition.
|
|
716
|
+
*
|
|
717
|
+
* It ensures efficient processing and management of pools and benefits.
|
|
718
|
+
*/
|
|
719
|
+
namespace?: string;
|
|
720
|
+
}
|
|
721
|
+
export interface ReserveBenefitResponse {
|
|
722
|
+
/** Id of the transaction that was created as a result of this request */
|
|
723
|
+
transactionId?: string;
|
|
724
|
+
}
|
|
725
|
+
export interface CancelBenefitReservationRequest {
|
|
726
|
+
/** Id of the transaction that was created as a result of this request */
|
|
727
|
+
transactionId?: string;
|
|
728
|
+
}
|
|
729
|
+
export interface CancelBenefitReservationResponse {
|
|
730
|
+
/** Id of the transaction that was created as a result of this request */
|
|
731
|
+
transactionId?: string;
|
|
732
|
+
}
|
|
733
|
+
export interface ReleaseBenefitReservationRequest {
|
|
734
|
+
/** Id of the transaction that was created as a result of this request */
|
|
735
|
+
transactionId?: string;
|
|
736
|
+
}
|
|
737
|
+
export interface ReleaseBenefitReservationResponse {
|
|
738
|
+
/** Id of the transaction that was created as a result of this request */
|
|
739
|
+
transactionId?: string;
|
|
740
|
+
}
|
|
741
|
+
export interface CheckBenefitEligibilityRequest {
|
|
742
|
+
/** ID of the benefit pool to check eligibility against. */
|
|
743
|
+
poolId: string;
|
|
744
|
+
/**
|
|
745
|
+
* Key of the benefit to be redeemed, associated with a particular benefit.
|
|
746
|
+
*
|
|
747
|
+
* This key must be specified to ensure the correct benefit is redeemed.
|
|
748
|
+
*
|
|
749
|
+
* Default: The first eligible benefit in the benefit pool will be redeemed.
|
|
750
|
+
*/
|
|
751
|
+
benefitKey?: string | null;
|
|
752
|
+
/** Reference of the item for which to check benefit's eligibility. */
|
|
753
|
+
itemReference: ItemReference;
|
|
754
|
+
/**
|
|
755
|
+
* Number of items for which to check eligibility.
|
|
756
|
+
*
|
|
757
|
+
* This number will be evaluated against the policies and credit balance of the benefit pool to determine if sufficient funds are met for the specified number of items.
|
|
758
|
+
*/
|
|
759
|
+
count?: number;
|
|
760
|
+
/**
|
|
761
|
+
* Date when the benefit item will be used.
|
|
762
|
+
*
|
|
763
|
+
* While credit balance is adjusted immediately upon the redemption request, the target date may be set for a later time than the date of the request.
|
|
764
|
+
*
|
|
765
|
+
* Used for the app providing the benefit items to manage the logistics associated with the item.
|
|
766
|
+
*/
|
|
767
|
+
targetDate?: Date | null;
|
|
768
|
+
/** Additional info */
|
|
769
|
+
additionalData?: Record<string, any> | null;
|
|
770
|
+
/** Benefit pool owner. */
|
|
771
|
+
beneficiary?: CommonIdentificationData;
|
|
772
|
+
/**
|
|
773
|
+
* Module that is the source of the benefit pool creation.
|
|
774
|
+
*
|
|
775
|
+
* This value must correspond with the previously defined namespace established when creating the associated pool definition.
|
|
776
|
+
*
|
|
777
|
+
* It ensures efficient processing and management of pools and benefits.
|
|
778
|
+
*/
|
|
779
|
+
namespace: string;
|
|
780
|
+
}
|
|
781
|
+
export interface CheckBenefitEligibilityResponse {
|
|
782
|
+
/**
|
|
783
|
+
* Result of the eligibility check. Includes the benefit's eligibility.
|
|
784
|
+
*
|
|
785
|
+
* If the benefit is not eligible for redemption, provides a reason for ineligiblity.
|
|
786
|
+
*/
|
|
787
|
+
result?: EligibilityCheckResult;
|
|
788
|
+
}
|
|
789
|
+
export interface EligibilityCheckResult extends EligibilityCheckResultResultOneOf {
|
|
790
|
+
/** Set when eligibility check passed. */
|
|
791
|
+
eligibleOptions?: Eligible;
|
|
792
|
+
/** Set when balance is insufficient. */
|
|
793
|
+
notEnoughBalanceOptions?: NotEnoughBalance;
|
|
794
|
+
/** Set when policy expression evaluates to false. */
|
|
795
|
+
policyExpressionEvaluatedToFalseOptions?: PolicyExpressionEvaluatedToFalse;
|
|
796
|
+
/** Set when pool is inactive. */
|
|
797
|
+
poolNotActiveOptions?: PoolNotActive;
|
|
798
|
+
/** Set when benefit can't be found. */
|
|
799
|
+
benefitNotFoundOptions?: BenefitNotFound;
|
|
800
|
+
/** Set when pool can't be found. */
|
|
801
|
+
poolNotFoundOptions?: PoolNotFound;
|
|
802
|
+
/** Eligibility status. */
|
|
803
|
+
type?: EligibilityCheckResultType;
|
|
804
|
+
}
|
|
805
|
+
/** @oneof */
|
|
806
|
+
export interface EligibilityCheckResultResultOneOf {
|
|
807
|
+
/** Set when eligibility check passed. */
|
|
808
|
+
eligibleOptions?: Eligible;
|
|
809
|
+
/** Set when balance is insufficient. */
|
|
810
|
+
notEnoughBalanceOptions?: NotEnoughBalance;
|
|
811
|
+
/** Set when policy expression evaluates to false. */
|
|
812
|
+
policyExpressionEvaluatedToFalseOptions?: PolicyExpressionEvaluatedToFalse;
|
|
813
|
+
/** Set when pool is inactive. */
|
|
814
|
+
poolNotActiveOptions?: PoolNotActive;
|
|
815
|
+
/** Set when benefit can't be found. */
|
|
816
|
+
benefitNotFoundOptions?: BenefitNotFound;
|
|
817
|
+
/** Set when pool can't be found. */
|
|
818
|
+
poolNotFoundOptions?: PoolNotFound;
|
|
819
|
+
}
|
|
820
|
+
export interface EligibleBenefit {
|
|
821
|
+
/**
|
|
822
|
+
* Pool ID
|
|
823
|
+
* @readonly
|
|
824
|
+
*/
|
|
825
|
+
poolId?: string;
|
|
826
|
+
/** Key of the specific benefit. */
|
|
827
|
+
benefitKey?: string;
|
|
828
|
+
/** Item reference */
|
|
829
|
+
itemReference?: ItemReference;
|
|
830
|
+
/** Price of the item expressed in credits */
|
|
831
|
+
price?: string | null;
|
|
832
|
+
}
|
|
833
|
+
export declare enum EligibilityCheckResultType {
|
|
834
|
+
/** Unknown pool eligibility. */
|
|
835
|
+
UNKNOWN = "UNKNOWN",
|
|
836
|
+
/** Eligible pool. */
|
|
837
|
+
ELIGIBLE = "ELIGIBLE",
|
|
838
|
+
/** Insufficient pool balance. */
|
|
839
|
+
NOT_ENOUGH_BALANCE = "NOT_ENOUGH_BALANCE",
|
|
840
|
+
/** Policy is false. */
|
|
841
|
+
POLICY_EXPRESSION_EVALUATED_TO_FALSE = "POLICY_EXPRESSION_EVALUATED_TO_FALSE",
|
|
842
|
+
/** Inactive pool. */
|
|
843
|
+
POOL_NOT_ACTIVE = "POOL_NOT_ACTIVE",
|
|
844
|
+
/** Invalid benefit. */
|
|
845
|
+
BENEFIT_NOT_FOUND = "BENEFIT_NOT_FOUND",
|
|
846
|
+
/** Invalid pool. */
|
|
847
|
+
POOL_NOT_FOUND = "POOL_NOT_FOUND"
|
|
848
|
+
}
|
|
849
|
+
export interface Eligible {
|
|
850
|
+
/** Eligible benefits. */
|
|
851
|
+
eligibleBenefits?: EligibleBenefit[];
|
|
852
|
+
}
|
|
853
|
+
export interface BulkCheckBenefitEligibilityRequest {
|
|
854
|
+
/** Benefits to check eligibility. */
|
|
855
|
+
benefitSelectors?: BenefitSelector[];
|
|
856
|
+
/**
|
|
857
|
+
* Module that is the source of the benefit pool creation.
|
|
858
|
+
*
|
|
859
|
+
* This value must correspond with the previously defined namespace established when creating the associated pool definition.
|
|
860
|
+
*
|
|
861
|
+
* It ensures efficient processing and management of pools and benefits.
|
|
862
|
+
*/
|
|
863
|
+
namespace: string;
|
|
864
|
+
/** Benefit pool owner. */
|
|
865
|
+
beneficiary?: CommonIdentificationData;
|
|
866
|
+
}
|
|
867
|
+
export interface BenefitSelector {
|
|
868
|
+
/** ID of the pool to check for eligibility. */
|
|
869
|
+
poolId?: string;
|
|
870
|
+
/** ID of the benefit to check for eligibility. */
|
|
871
|
+
benefitKey?: string | null;
|
|
872
|
+
/** Reference of the item for which to check benefit's eligibility. */
|
|
873
|
+
itemReference?: ItemReference;
|
|
874
|
+
/**
|
|
875
|
+
* Number of items for which to check eligibility.
|
|
876
|
+
*
|
|
877
|
+
* This number will be evaluated against the policies and credit balance of the benefit pool to determine if sufficient funds are met for the specified number of items.
|
|
878
|
+
*/
|
|
879
|
+
count?: number;
|
|
880
|
+
/**
|
|
881
|
+
* Date when the benefit item will be used.
|
|
882
|
+
*
|
|
883
|
+
* While credit balance is adjusted immediately upon the redemption request, the target date may be set for a later time than the date of the request.
|
|
884
|
+
*
|
|
885
|
+
* Used for the app providing the benefit items to manage the logistics associated with the item.
|
|
886
|
+
*/
|
|
887
|
+
targetDate?: Date | null;
|
|
888
|
+
/** Additional info */
|
|
889
|
+
additionalData?: Record<string, any> | null;
|
|
890
|
+
}
|
|
891
|
+
export interface BulkCheckBenefitEligibilityResponse {
|
|
892
|
+
/** List of results for pool benefit eligibility. */
|
|
893
|
+
results?: BulkEligibilityCheckResult[];
|
|
894
|
+
}
|
|
895
|
+
export interface BulkEligibilityCheckResult {
|
|
896
|
+
/** Retrieved information for each benefit pool. */
|
|
897
|
+
benefitSelector?: BenefitSelector;
|
|
898
|
+
/** Outcome of the eligibility check. */
|
|
899
|
+
result?: EligibilityCheckResult;
|
|
900
|
+
}
|
|
901
|
+
export interface GetEligibleBenefitsRequest {
|
|
902
|
+
/** Reference of the item for which all eligible pools will be returned. */
|
|
903
|
+
itemReference: ItemReference;
|
|
904
|
+
/**
|
|
905
|
+
* Number of items for which to check eligibility.
|
|
906
|
+
*
|
|
907
|
+
* This number will be evaluated against the policies and credit balance of the benefit pool to determine if sufficient funds are met for the specified number of items.
|
|
908
|
+
*/
|
|
909
|
+
count?: number;
|
|
910
|
+
/**
|
|
911
|
+
* Date when the benefit item will be used.
|
|
912
|
+
*
|
|
913
|
+
* While credit balance is adjusted immediately upon the redemption request, the target date may be set for a later time than the date of the request.
|
|
914
|
+
*
|
|
915
|
+
* Used for the app providing the benefit items to manage the logistics associated with the item.
|
|
916
|
+
*/
|
|
917
|
+
targetDate?: Date | null;
|
|
918
|
+
/** Additional information. */
|
|
919
|
+
additionalData?: Record<string, any> | null;
|
|
920
|
+
/** Benefit pool owner. */
|
|
921
|
+
beneficiary?: CommonIdentificationData;
|
|
922
|
+
/**
|
|
923
|
+
* Module that is the source of the benefit pool creation.
|
|
924
|
+
*
|
|
925
|
+
* This value must correspond with the previously defined namespace established when creating the associated pool definition.
|
|
926
|
+
*
|
|
927
|
+
* It ensures efficient processing and management of pools and benefits.
|
|
928
|
+
*/
|
|
929
|
+
namespace: string;
|
|
930
|
+
}
|
|
931
|
+
export interface GetEligibleBenefitsResponse {
|
|
932
|
+
/** Retrieved eligible benefits. */
|
|
933
|
+
eligibleBenefits?: EligibleBenefit[];
|
|
934
|
+
}
|
|
935
|
+
export interface ListPoolsRequest {
|
|
936
|
+
/** The filter */
|
|
937
|
+
filter?: Filter;
|
|
938
|
+
/** Cursor paging */
|
|
939
|
+
cursorPaging?: CursorPaging;
|
|
940
|
+
}
|
|
941
|
+
export declare enum ListPoolsRequestType {
|
|
942
|
+
UNKNOWN_FILTER = "UNKNOWN_FILTER",
|
|
943
|
+
BY_ITEM_REFERENCE = "BY_ITEM_REFERENCE"
|
|
944
|
+
}
|
|
945
|
+
export interface ByItemReference {
|
|
946
|
+
/** A list of filters */
|
|
947
|
+
filters?: ByItemReferenceFilter[];
|
|
948
|
+
/** Beneficiary of the pool */
|
|
949
|
+
beneficiary?: CommonIdentificationData;
|
|
950
|
+
/** Returns pools that are in the following statuses */
|
|
951
|
+
poolStatuses?: PoolStatus[];
|
|
952
|
+
}
|
|
953
|
+
export interface ByItemReferenceFilter {
|
|
954
|
+
/** Reference of the item */
|
|
955
|
+
itemReference?: ItemReference;
|
|
956
|
+
}
|
|
957
|
+
export interface Filter extends FilterFilterOneOf {
|
|
958
|
+
/** A list of filters by reference */
|
|
959
|
+
byItemReferenceOptions?: ByItemReference;
|
|
960
|
+
/** Type of the filter */
|
|
961
|
+
type?: ListPoolsRequestType;
|
|
962
|
+
/**
|
|
963
|
+
* Module that is the source of the benefit pool creation.
|
|
964
|
+
*
|
|
965
|
+
* This value must correspond with the previously defined namespace established when creating the associated pool definition.
|
|
966
|
+
*
|
|
967
|
+
* It ensures efficient processing and management of pools and benefits.
|
|
968
|
+
*/
|
|
969
|
+
namespace?: string;
|
|
970
|
+
}
|
|
971
|
+
/** @oneof */
|
|
972
|
+
export interface FilterFilterOneOf {
|
|
973
|
+
/** A list of filters by reference */
|
|
974
|
+
byItemReferenceOptions?: ByItemReference;
|
|
975
|
+
}
|
|
976
|
+
export interface ListPoolsResponse {
|
|
977
|
+
/** The retrieved pools */
|
|
978
|
+
pools?: PoolWithItems[];
|
|
979
|
+
/** Paging information */
|
|
980
|
+
metadata?: CursorPagingMetadata;
|
|
981
|
+
}
|
|
982
|
+
export interface PoolWithItems {
|
|
983
|
+
/** The pool */
|
|
984
|
+
pool?: Pool;
|
|
985
|
+
/** The items in the pool */
|
|
986
|
+
itemReference?: ItemReference[];
|
|
987
|
+
}
|
|
988
|
+
export interface BulkUpdatePoolsRequest {
|
|
989
|
+
/** Pools to update. */
|
|
990
|
+
pools?: MaskedPool[];
|
|
991
|
+
/**
|
|
992
|
+
* Whether to return the full pool definition entities.
|
|
993
|
+
*
|
|
994
|
+
* Default: `false`
|
|
995
|
+
*/
|
|
996
|
+
returnEntity?: boolean;
|
|
997
|
+
}
|
|
998
|
+
export interface MaskedPool {
|
|
999
|
+
/** Pool to update. */
|
|
1000
|
+
pool?: Pool;
|
|
1001
|
+
/** Explicit list of fields to update. */
|
|
1002
|
+
fieldMask?: string[];
|
|
1003
|
+
}
|
|
1004
|
+
export interface BulkUpdatePoolsResponse {
|
|
1005
|
+
/**
|
|
1006
|
+
* List of results for each pool.
|
|
1007
|
+
*
|
|
1008
|
+
* Includes the pool, pool metadata, and whether the update was successful.
|
|
1009
|
+
*/
|
|
1010
|
+
results?: BulkPoolResult[];
|
|
1011
|
+
/** Bulk action metadata. */
|
|
1012
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
1013
|
+
}
|
|
1014
|
+
export interface BulkPoolResult {
|
|
1015
|
+
/** Pool metadata. */
|
|
1016
|
+
poolMetadata?: ItemMetadata;
|
|
1017
|
+
/** Only exists if `returnEntity` was set to true in the request */
|
|
1018
|
+
pool?: Pool;
|
|
1019
|
+
}
|
|
1020
|
+
export interface ItemMetadata {
|
|
1021
|
+
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
1022
|
+
id?: string | null;
|
|
1023
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
1024
|
+
originalIndex?: number;
|
|
1025
|
+
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
1026
|
+
success?: boolean;
|
|
1027
|
+
/** Details about the error in case of failure. */
|
|
1028
|
+
error?: ApplicationError;
|
|
1029
|
+
}
|
|
1030
|
+
export interface ApplicationError {
|
|
1031
|
+
/** Error code. */
|
|
1032
|
+
code?: string;
|
|
1033
|
+
/** Description of the error. */
|
|
1034
|
+
description?: string;
|
|
1035
|
+
/** Data related to the error. */
|
|
1036
|
+
data?: Record<string, any> | null;
|
|
1037
|
+
}
|
|
1038
|
+
export interface BulkActionMetadata {
|
|
1039
|
+
/** Number of items that were successfully processed. */
|
|
1040
|
+
totalSuccesses?: number;
|
|
1041
|
+
/** Number of items that couldn't be processed. */
|
|
1042
|
+
totalFailures?: number;
|
|
1043
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
1044
|
+
undetailedFailures?: number;
|
|
1045
|
+
}
|
|
1046
|
+
export interface ProvisionPoolsForProgramRequest {
|
|
1047
|
+
/** Reference of the template that is used to provision the pools */
|
|
1048
|
+
poolDefinitionLookupId?: PoolDefinitionLookupId;
|
|
1049
|
+
/** Program that the provisioned pools are part of */
|
|
1050
|
+
programId?: string;
|
|
1051
|
+
}
|
|
1052
|
+
export interface PoolDefinitionLookupId extends PoolDefinitionLookupIdIdOneOf {
|
|
1053
|
+
/** Pool definition ID. */
|
|
1054
|
+
poolDefinitionId?: string;
|
|
1055
|
+
/** Program definition ID. */
|
|
1056
|
+
programDefinitionId?: string;
|
|
1057
|
+
}
|
|
1058
|
+
/** @oneof */
|
|
1059
|
+
export interface PoolDefinitionLookupIdIdOneOf {
|
|
1060
|
+
/** Pool definition ID. */
|
|
1061
|
+
poolDefinitionId?: string;
|
|
1062
|
+
/** Program definition ID. */
|
|
1063
|
+
programDefinitionId?: string;
|
|
1064
|
+
}
|
|
1065
|
+
export interface ProvisionPoolsForProgramResponse extends ProvisionPoolsForProgramResponseResultOneOf {
|
|
1066
|
+
/** Sync result */
|
|
1067
|
+
syncOptions?: SyncResult;
|
|
1068
|
+
/** Async result */
|
|
1069
|
+
asyncOptions?: AsyncResult;
|
|
1070
|
+
/** Job ID of the program provision associated with this pool. */
|
|
1071
|
+
jobId?: string;
|
|
1072
|
+
/** Type of the result */
|
|
1073
|
+
type?: ProvisionPoolsForProgramResponseType;
|
|
1074
|
+
}
|
|
1075
|
+
/** @oneof */
|
|
1076
|
+
export interface ProvisionPoolsForProgramResponseResultOneOf {
|
|
1077
|
+
/** Sync result */
|
|
1078
|
+
syncOptions?: SyncResult;
|
|
1079
|
+
/** Async result */
|
|
1080
|
+
asyncOptions?: AsyncResult;
|
|
1081
|
+
}
|
|
1082
|
+
export declare enum ProvisionPoolsForProgramResponseType {
|
|
1083
|
+
/** Unknown result type */
|
|
1084
|
+
UNKNOWN = "UNKNOWN",
|
|
1085
|
+
/** Sync result */
|
|
1086
|
+
SYNC = "SYNC",
|
|
1087
|
+
/** Async result */
|
|
1088
|
+
ASYNC = "ASYNC"
|
|
1089
|
+
}
|
|
1090
|
+
export interface SyncResult {
|
|
1091
|
+
/** Indicates if the operation was successful */
|
|
1092
|
+
success?: boolean;
|
|
1093
|
+
}
|
|
1094
|
+
export interface AsyncResult {
|
|
1095
|
+
/** Job ID of the program provision associated with this pool. */
|
|
1096
|
+
jobId?: string;
|
|
1097
|
+
}
|
|
1098
|
+
export interface InvalidPoolDefinitionReference {
|
|
1099
|
+
/** Reference of the template that didn't find any pool definitions */
|
|
1100
|
+
poolDefinitionLookupId?: PoolDefinitionLookupId;
|
|
1101
|
+
}
|
|
1102
|
+
export interface RenewPoolsForProgramRequest {
|
|
1103
|
+
/** Package of pools to grant. Package id should be the same that was used to provision programs. */
|
|
1104
|
+
programId?: string;
|
|
1105
|
+
}
|
|
1106
|
+
export interface RenewPoolsForProgramResponse {
|
|
1107
|
+
/** Job id of the renewal job */
|
|
1108
|
+
jobId?: string;
|
|
1109
|
+
}
|
|
1110
|
+
export interface UpdatePoolStatusRequest extends UpdatePoolStatusRequestPoolSelectorOneOf {
|
|
1111
|
+
/** Pool selector by pool definition id and program definition id */
|
|
1112
|
+
byPoolDefinitionIdAndProgramDefinitionIdOptions?: ByPoolDefinitionIdAndProgramDefinitionIdOptions;
|
|
1113
|
+
/** Pool selector by program id */
|
|
1114
|
+
byProgramIdOptions?: ByProgramIdOptions;
|
|
1115
|
+
/** New pool status */
|
|
1116
|
+
status?: PoolStatus;
|
|
1117
|
+
/** Pool selector type */
|
|
1118
|
+
poolSelectorType?: PoolSelectorType;
|
|
1119
|
+
}
|
|
1120
|
+
/** @oneof */
|
|
1121
|
+
export interface UpdatePoolStatusRequestPoolSelectorOneOf {
|
|
1122
|
+
/** Pool selector by pool definition id and program definition id */
|
|
1123
|
+
byPoolDefinitionIdAndProgramDefinitionIdOptions?: ByPoolDefinitionIdAndProgramDefinitionIdOptions;
|
|
1124
|
+
/** Pool selector by program id */
|
|
1125
|
+
byProgramIdOptions?: ByProgramIdOptions;
|
|
1126
|
+
}
|
|
1127
|
+
export declare enum PoolSelectorType {
|
|
1128
|
+
UNKNOWN_SELECTOR = "UNKNOWN_SELECTOR",
|
|
1129
|
+
BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID = "BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID",
|
|
1130
|
+
BY_PROGRAM_ID = "BY_PROGRAM_ID"
|
|
1131
|
+
}
|
|
1132
|
+
export interface ByPoolDefinitionIdAndProgramDefinitionIdOptions {
|
|
1133
|
+
/** Pool definition id */
|
|
1134
|
+
poolDefinitionId?: string;
|
|
1135
|
+
/** Program definition id */
|
|
1136
|
+
programDefinitionId?: string | null;
|
|
1137
|
+
}
|
|
1138
|
+
export interface ByProgramIdOptions {
|
|
1139
|
+
/** Program id */
|
|
1140
|
+
programId?: string;
|
|
1141
|
+
/** Additional data that gets added to the event once the async job completes */
|
|
1142
|
+
additionalData?: Record<string, any> | null;
|
|
1143
|
+
}
|
|
1144
|
+
export interface UpdatePoolStatusResponse {
|
|
1145
|
+
/** Job ID of the program provision associated with this pool. */
|
|
1146
|
+
jobId?: string;
|
|
1147
|
+
}
|
|
1148
|
+
export interface CountNumberOfPoolsInProvisioningStatusRequest {
|
|
1149
|
+
/** Program id */
|
|
1150
|
+
programId?: string;
|
|
1151
|
+
}
|
|
1152
|
+
export interface CountNumberOfPoolsInProvisioningStatusResponse {
|
|
1153
|
+
/** Number of pools in provisioning status */
|
|
1154
|
+
count?: number;
|
|
1155
|
+
}
|
|
1156
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
1157
|
+
createdEvent?: EntityCreatedEvent;
|
|
1158
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
1159
|
+
deletedEvent?: EntityDeletedEvent;
|
|
1160
|
+
actionEvent?: ActionEvent;
|
|
1161
|
+
/**
|
|
1162
|
+
* Unique event ID.
|
|
1163
|
+
* Allows clients to ignore duplicate webhooks.
|
|
1164
|
+
*/
|
|
1165
|
+
id?: string;
|
|
1166
|
+
/**
|
|
1167
|
+
* Assumes actions are also always typed to an entity_type
|
|
1168
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
1169
|
+
*/
|
|
1170
|
+
entityFqdn?: string;
|
|
1171
|
+
/**
|
|
1172
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
1173
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
1174
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
1175
|
+
*/
|
|
1176
|
+
slug?: string;
|
|
1177
|
+
/** ID of the entity associated with the event. */
|
|
1178
|
+
entityId?: string;
|
|
1179
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
1180
|
+
eventTime?: Date | null;
|
|
1181
|
+
/**
|
|
1182
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
1183
|
+
* (for example, GDPR).
|
|
1184
|
+
*/
|
|
1185
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
1186
|
+
/** If present, indicates the action that triggered the event. */
|
|
1187
|
+
originatedFrom?: string | null;
|
|
1188
|
+
/**
|
|
1189
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
1190
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
1191
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
1192
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
1193
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
1194
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
1195
|
+
*/
|
|
1196
|
+
entityEventSequence?: string | null;
|
|
1197
|
+
}
|
|
1198
|
+
/** @oneof */
|
|
1199
|
+
export interface DomainEventBodyOneOf {
|
|
1200
|
+
createdEvent?: EntityCreatedEvent;
|
|
1201
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
1202
|
+
deletedEvent?: EntityDeletedEvent;
|
|
1203
|
+
actionEvent?: ActionEvent;
|
|
1204
|
+
}
|
|
1205
|
+
export interface EntityCreatedEvent {
|
|
1206
|
+
entityAsJson?: string;
|
|
1207
|
+
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
1208
|
+
restoreInfo?: RestoreInfo;
|
|
1209
|
+
}
|
|
1210
|
+
export interface RestoreInfo {
|
|
1211
|
+
deletedDate?: Date | null;
|
|
1212
|
+
}
|
|
1213
|
+
export interface EntityUpdatedEvent {
|
|
1214
|
+
/**
|
|
1215
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
1216
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
1217
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
1218
|
+
*/
|
|
1219
|
+
currentEntityAsJson?: string;
|
|
1220
|
+
}
|
|
1221
|
+
export interface EntityDeletedEvent {
|
|
1222
|
+
/** Entity that was deleted */
|
|
1223
|
+
deletedEntityAsJson?: string | null;
|
|
1224
|
+
}
|
|
1225
|
+
export interface ActionEvent {
|
|
1226
|
+
bodyAsJson?: string;
|
|
1227
|
+
}
|
|
1228
|
+
export interface MessageEnvelope {
|
|
1229
|
+
/** App instance ID. */
|
|
1230
|
+
instanceId?: string | null;
|
|
1231
|
+
/** Event type. */
|
|
1232
|
+
eventType?: string;
|
|
1233
|
+
/** The identification type and identity data. */
|
|
1234
|
+
identity?: IdentificationData;
|
|
1235
|
+
/** Stringify payload. */
|
|
1236
|
+
data?: string;
|
|
1237
|
+
}
|
|
1238
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1239
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
1240
|
+
anonymousVisitorId?: string;
|
|
1241
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
1242
|
+
memberId?: string;
|
|
1243
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1244
|
+
wixUserId?: string;
|
|
1245
|
+
/** ID of an app. */
|
|
1246
|
+
appId?: string;
|
|
1247
|
+
/** @readonly */
|
|
1248
|
+
identityType?: WebhookIdentityType;
|
|
1249
|
+
}
|
|
1250
|
+
/** @oneof */
|
|
1251
|
+
export interface IdentificationDataIdOneOf {
|
|
1252
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
1253
|
+
anonymousVisitorId?: string;
|
|
1254
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
1255
|
+
memberId?: string;
|
|
1256
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1257
|
+
wixUserId?: string;
|
|
1258
|
+
/** ID of an app. */
|
|
1259
|
+
appId?: string;
|
|
1260
|
+
}
|
|
1261
|
+
export declare enum WebhookIdentityType {
|
|
1262
|
+
UNKNOWN = "UNKNOWN",
|
|
1263
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1264
|
+
MEMBER = "MEMBER",
|
|
1265
|
+
WIX_USER = "WIX_USER",
|
|
1266
|
+
APP = "APP"
|
|
1267
|
+
}
|
|
1268
|
+
interface CommonIdentificationDataNonNullableFields {
|
|
1269
|
+
anonymousVisitorId: string;
|
|
1270
|
+
memberId: string;
|
|
1271
|
+
wixUserId: string;
|
|
1272
|
+
identityType: IdentityType;
|
|
1273
|
+
}
|
|
1274
|
+
interface PolicyExpressionNotNonNullableFields {
|
|
1275
|
+
expression?: PolicyExpressionNonNullableFields;
|
|
1276
|
+
}
|
|
1277
|
+
interface PolicyExpressionAndNonNullableFields {
|
|
1278
|
+
expressions: PolicyExpressionNonNullableFields[];
|
|
1279
|
+
}
|
|
1280
|
+
interface PolicyExpressionOrNonNullableFields {
|
|
1281
|
+
expressions: PolicyExpressionNonNullableFields[];
|
|
1282
|
+
}
|
|
1283
|
+
interface FixedIntervalPolicyNonNullableFields {
|
|
1284
|
+
fromWeekDay: WeekDay;
|
|
1285
|
+
toWeekDay: WeekDay;
|
|
1286
|
+
}
|
|
1287
|
+
interface RateLimitedPolicyNonNullableFields {
|
|
1288
|
+
fixedIntervalOptions?: FixedIntervalPolicyNonNullableFields;
|
|
1289
|
+
times: number;
|
|
1290
|
+
type: RateLimitedPolicyType;
|
|
1291
|
+
}
|
|
1292
|
+
interface CustomPolicyNonNullableFields {
|
|
1293
|
+
id: string;
|
|
1294
|
+
}
|
|
1295
|
+
interface PolicyNonNullableFields {
|
|
1296
|
+
fixedIntervalOptions?: FixedIntervalPolicyNonNullableFields;
|
|
1297
|
+
rateLimitedOptions?: RateLimitedPolicyNonNullableFields;
|
|
1298
|
+
customOptions?: CustomPolicyNonNullableFields;
|
|
1299
|
+
type: Type;
|
|
1300
|
+
}
|
|
1301
|
+
interface PolicyExpressionNonNullableFields {
|
|
1302
|
+
operatorNotOptions?: PolicyExpressionNotNonNullableFields;
|
|
1303
|
+
operatorAndOptions?: PolicyExpressionAndNonNullableFields;
|
|
1304
|
+
operatorOrOptions?: PolicyExpressionOrNonNullableFields;
|
|
1305
|
+
policyOptions?: PolicyNonNullableFields;
|
|
1306
|
+
type: PolicyExpressionType;
|
|
1307
|
+
}
|
|
1308
|
+
interface BenefitNonNullableFields {
|
|
1309
|
+
benefitKey: string;
|
|
1310
|
+
policyExpression?: PolicyExpressionNonNullableFields;
|
|
1311
|
+
}
|
|
1312
|
+
interface CreditConfigurationNonNullableFields {
|
|
1313
|
+
amount: string;
|
|
1314
|
+
}
|
|
1315
|
+
interface DetailsNonNullableFields {
|
|
1316
|
+
benefits: BenefitNonNullableFields[];
|
|
1317
|
+
creditConfiguration?: CreditConfigurationNonNullableFields;
|
|
1318
|
+
policyExpression?: PolicyExpressionNonNullableFields;
|
|
1319
|
+
}
|
|
1320
|
+
interface ProgramDefinitionInfoNonNullableFields {
|
|
1321
|
+
id: string;
|
|
1322
|
+
}
|
|
1323
|
+
interface ProgramInfoNonNullableFields {
|
|
1324
|
+
id: string;
|
|
1325
|
+
}
|
|
1326
|
+
interface PoolNonNullableFields {
|
|
1327
|
+
status: PoolStatus;
|
|
1328
|
+
beneficiary?: CommonIdentificationDataNonNullableFields;
|
|
1329
|
+
details?: DetailsNonNullableFields;
|
|
1330
|
+
displayName: string;
|
|
1331
|
+
programDefinition?: ProgramDefinitionInfoNonNullableFields;
|
|
1332
|
+
program?: ProgramInfoNonNullableFields;
|
|
1333
|
+
previousStatus: PoolStatus;
|
|
1334
|
+
origin: PoolOrigin;
|
|
1335
|
+
}
|
|
1336
|
+
export interface GetPoolResponseNonNullableFields {
|
|
1337
|
+
pool?: PoolNonNullableFields;
|
|
1338
|
+
}
|
|
1339
|
+
export interface UpdatePoolResponseNonNullableFields {
|
|
1340
|
+
pool?: PoolNonNullableFields;
|
|
1341
|
+
}
|
|
1342
|
+
export interface QueryPoolsResponseNonNullableFields {
|
|
1343
|
+
pools: PoolNonNullableFields[];
|
|
1344
|
+
}
|
|
1345
|
+
export interface RedeemBenefitResponseNonNullableFields {
|
|
1346
|
+
transactionId: string;
|
|
1347
|
+
}
|
|
1348
|
+
interface ItemReferenceNonNullableFields {
|
|
1349
|
+
externalId: string;
|
|
1350
|
+
category: string;
|
|
1351
|
+
providerAppId: string;
|
|
1352
|
+
}
|
|
1353
|
+
interface EligibleBenefitNonNullableFields {
|
|
1354
|
+
poolId: string;
|
|
1355
|
+
benefitKey: string;
|
|
1356
|
+
itemReference?: ItemReferenceNonNullableFields;
|
|
1357
|
+
}
|
|
1358
|
+
interface EligibleNonNullableFields {
|
|
1359
|
+
eligibleBenefits: EligibleBenefitNonNullableFields[];
|
|
1360
|
+
}
|
|
1361
|
+
interface NotEnoughBalanceNonNullableFields {
|
|
1362
|
+
poolId: string;
|
|
1363
|
+
itemReference?: ItemReferenceNonNullableFields;
|
|
1364
|
+
availableBalance: string;
|
|
1365
|
+
requestedBalance: string;
|
|
1366
|
+
}
|
|
1367
|
+
interface FailureDetailsNonNullableFields {
|
|
1368
|
+
code: string;
|
|
1369
|
+
}
|
|
1370
|
+
interface PolicyExpressionEvaluatedToFalseNonNullableFields {
|
|
1371
|
+
poolId: string;
|
|
1372
|
+
itemReference?: ItemReferenceNonNullableFields;
|
|
1373
|
+
failureDetails: FailureDetailsNonNullableFields[];
|
|
1374
|
+
}
|
|
1375
|
+
interface PoolNotActiveNonNullableFields {
|
|
1376
|
+
poolId: string;
|
|
1377
|
+
poolStatus: PoolStatus;
|
|
1378
|
+
}
|
|
1379
|
+
interface BenefitNotFoundNonNullableFields {
|
|
1380
|
+
poolId: string;
|
|
1381
|
+
}
|
|
1382
|
+
interface PoolNotFoundNonNullableFields {
|
|
1383
|
+
poolId: string;
|
|
1384
|
+
}
|
|
1385
|
+
interface EligibilityCheckResultNonNullableFields {
|
|
1386
|
+
eligibleOptions?: EligibleNonNullableFields;
|
|
1387
|
+
notEnoughBalanceOptions?: NotEnoughBalanceNonNullableFields;
|
|
1388
|
+
policyExpressionEvaluatedToFalseOptions?: PolicyExpressionEvaluatedToFalseNonNullableFields;
|
|
1389
|
+
poolNotActiveOptions?: PoolNotActiveNonNullableFields;
|
|
1390
|
+
benefitNotFoundOptions?: BenefitNotFoundNonNullableFields;
|
|
1391
|
+
poolNotFoundOptions?: PoolNotFoundNonNullableFields;
|
|
1392
|
+
type: EligibilityCheckResultType;
|
|
1393
|
+
}
|
|
1394
|
+
export interface CheckBenefitEligibilityResponseNonNullableFields {
|
|
1395
|
+
result?: EligibilityCheckResultNonNullableFields;
|
|
1396
|
+
}
|
|
1397
|
+
interface BenefitSelectorNonNullableFields {
|
|
1398
|
+
poolId: string;
|
|
1399
|
+
itemReference?: ItemReferenceNonNullableFields;
|
|
1400
|
+
count: number;
|
|
1401
|
+
}
|
|
1402
|
+
interface BulkEligibilityCheckResultNonNullableFields {
|
|
1403
|
+
benefitSelector?: BenefitSelectorNonNullableFields;
|
|
1404
|
+
result?: EligibilityCheckResultNonNullableFields;
|
|
1405
|
+
}
|
|
1406
|
+
export interface BulkCheckBenefitEligibilityResponseNonNullableFields {
|
|
1407
|
+
results: BulkEligibilityCheckResultNonNullableFields[];
|
|
1408
|
+
}
|
|
1409
|
+
export interface GetEligibleBenefitsResponseNonNullableFields {
|
|
1410
|
+
eligibleBenefits: EligibleBenefitNonNullableFields[];
|
|
1411
|
+
}
|
|
1412
|
+
interface ApplicationErrorNonNullableFields {
|
|
1413
|
+
code: string;
|
|
1414
|
+
description: string;
|
|
1415
|
+
}
|
|
1416
|
+
interface ItemMetadataNonNullableFields {
|
|
1417
|
+
originalIndex: number;
|
|
1418
|
+
success: boolean;
|
|
1419
|
+
error?: ApplicationErrorNonNullableFields;
|
|
1420
|
+
}
|
|
1421
|
+
interface BulkPoolResultNonNullableFields {
|
|
1422
|
+
poolMetadata?: ItemMetadataNonNullableFields;
|
|
1423
|
+
pool?: PoolNonNullableFields;
|
|
1424
|
+
}
|
|
1425
|
+
interface BulkActionMetadataNonNullableFields {
|
|
1426
|
+
totalSuccesses: number;
|
|
1427
|
+
totalFailures: number;
|
|
1428
|
+
undetailedFailures: number;
|
|
1429
|
+
}
|
|
1430
|
+
export interface BulkUpdatePoolsResponseNonNullableFields {
|
|
1431
|
+
results: BulkPoolResultNonNullableFields[];
|
|
1432
|
+
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
|
|
1433
|
+
}
|
|
1434
|
+
export {};
|