@wix/auto_sdk_benefit-programs_pools 1.0.15 → 1.0.17

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