@wix/auto_sdk_benefit-programs_pools 1.0.21 → 1.0.23

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