@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
@@ -0,0 +1,782 @@
1
+ import { aa as GetPoolRequest$1, ab as GetPoolResponse$1, ac as UpdatePoolRequest$1, ad as UpdatePoolResponse$1, ag as QueryPoolsRequest$1, al as QueryPoolsResponse$1, ao as RedeemBenefitRequest$1, b as RedeemBenefitResponse$1, aC as CheckBenefitEligibilityRequest$1, c as CheckBenefitEligibilityResponse$1, aH as BulkCheckBenefitEligibilityRequest$1, d as BulkCheckBenefitEligibilityResponse$1, aK as GetEligibleBenefitsRequest$1, e as GetEligibleBenefitsResponse$1, aS as BulkUpdatePoolsRequest$1, g as BulkUpdatePoolsResponse$1 } from './benefit-programs-v1-pool-pools.universal-mZpeDNA1.js';
2
+
3
+ interface Pool {
4
+ /**
5
+ * Pool ID.
6
+ * @format GUID
7
+ * @immutable
8
+ * @readonly
9
+ */
10
+ id?: string | null;
11
+ /**
12
+ * Revision number, which increments by 1 each time the pool is updated.
13
+ * To prevent conflicting changes, the current revision must be passed when updating the pool.
14
+ *
15
+ * Ignored when creating a pool.
16
+ * @readonly
17
+ */
18
+ revision?: string | null;
19
+ /**
20
+ * Date and time the pool was created.
21
+ * @readonly
22
+ */
23
+ createdDate?: Date | null;
24
+ /**
25
+ * Date and time the pool was updated.
26
+ * @readonly
27
+ */
28
+ updatedDate?: Date | null;
29
+ /**
30
+ * ID of the associated pool definition.
31
+ * @format GUID
32
+ * @readonly
33
+ * @immutable
34
+ */
35
+ poolDefinitionId?: string | null;
36
+ /**
37
+ * ID of the associated program definition.
38
+ * @format GUID
39
+ * @readonly
40
+ * @immutable
41
+ */
42
+ programDefinitionId?: string | null;
43
+ /**
44
+ * ID of the program that contains this pool.
45
+ * @format GUID
46
+ * @readonly
47
+ * @immutable
48
+ */
49
+ programId?: string | null;
50
+ /**
51
+ * Pool status.
52
+ * @readonly
53
+ */
54
+ status?: PoolStatusWithLiterals;
55
+ /**
56
+ * Pool beneficiary.
57
+ * @readonly
58
+ * @immutable
59
+ */
60
+ beneficiary?: CommonIdentificationData;
61
+ /** Pool benefits and settings. */
62
+ details?: Details;
63
+ /**
64
+ * Pool name.
65
+ *
66
+ * You may want to use the same name that's used in the associated pool definition.
67
+ * @maxLength 64
68
+ */
69
+ displayName?: string;
70
+ /**
71
+ * 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.
72
+ * @readonly
73
+ * @immutable
74
+ * @minLength 1
75
+ * @maxLength 50
76
+ */
77
+ namespace?: string | null;
78
+ /**
79
+ * Custom field data for the pool object.
80
+ *
81
+ * [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.
82
+ */
83
+ extendedFields?: ExtendedFields;
84
+ /**
85
+ * Associated program definition information.
86
+ * @readonly
87
+ */
88
+ programDefinition?: ProgramDefinitionInfo;
89
+ /**
90
+ * Information about the program containing the pool.
91
+ * @readonly
92
+ */
93
+ program?: PoolProgramInfo;
94
+ /**
95
+ * Version of the pool definition that this pool was created from.
96
+ * @readonly
97
+ */
98
+ poolDefinitionRevision?: string | null;
99
+ /**
100
+ * Number of times this pool has been renewed.
101
+ * @readonly
102
+ */
103
+ renewalCount?: number | null;
104
+ }
105
+ declare enum PoolStatus {
106
+ /** Undefined pool status. */
107
+ UNDEFINED = "UNDEFINED",
108
+ /** Pool is active. */
109
+ ACTIVE = "ACTIVE",
110
+ /** Pool is paused. It can be resumed. */
111
+ PAUSED = "PAUSED",
112
+ /** Pool is ended. It can't be resumed. */
113
+ ENDED = "ENDED",
114
+ /** Pool provisioning is in progress. This status exists for a short time during processing. */
115
+ PROVISIONING = "PROVISIONING",
116
+ /** Pool renewing is in progress. This status exists for a short time during processing. */
117
+ RENEWING = "RENEWING"
118
+ }
119
+ /** @enumType */
120
+ type PoolStatusWithLiterals = PoolStatus | 'UNDEFINED' | 'ACTIVE' | 'PAUSED' | 'ENDED' | 'PROVISIONING' | 'RENEWING';
121
+ interface CommonIdentificationData extends CommonIdentificationDataIdOneOf {
122
+ /**
123
+ * ID of a site visitor that hasn't logged in to the site.
124
+ * @format GUID
125
+ */
126
+ anonymousVisitorId?: string;
127
+ /**
128
+ * ID of a site member.
129
+ * @format GUID
130
+ */
131
+ memberId?: string;
132
+ /**
133
+ * ID of a Wix user.
134
+ * @format GUID
135
+ */
136
+ wixUserId?: string;
137
+ }
138
+ /** @oneof */
139
+ interface CommonIdentificationDataIdOneOf {
140
+ /**
141
+ * ID of a site visitor that hasn't logged in to the site.
142
+ * @format GUID
143
+ */
144
+ anonymousVisitorId?: string;
145
+ /**
146
+ * ID of a site member.
147
+ * @format GUID
148
+ */
149
+ memberId?: string;
150
+ /**
151
+ * ID of a Wix user.
152
+ * @format GUID
153
+ */
154
+ wixUserId?: string;
155
+ }
156
+ interface Details {
157
+ /**
158
+ * List of benefits.
159
+ * @maxSize 10
160
+ */
161
+ benefits?: Benefit[];
162
+ /**
163
+ * Credit settings.
164
+ *
165
+ * If this object is empty, you can't set a price for the benefit.
166
+ */
167
+ creditConfiguration?: CreditConfiguration;
168
+ /** Additional information relating to this object. */
169
+ additionalData?: Record<string, any> | null;
170
+ }
171
+ interface Benefit {
172
+ /**
173
+ * Unique identifier for this benefit.
174
+ *
175
+ * This key is consistent across the pool definition and all associated pools that contain this benefit.
176
+ * @maxLength 64
177
+ */
178
+ benefitKey?: string;
179
+ /**
180
+ * ID that is used to associated items with this benefit.
181
+ * @format GUID
182
+ * @immutable
183
+ * @readonly
184
+ */
185
+ itemSetId?: string | null;
186
+ /**
187
+ * Price of the benefit in credits. The price is the same for all of this benefit's items.
188
+ * @decimalValue options { gte:0, maxScale:4 }
189
+ */
190
+ price?: string | null;
191
+ /** Additional information for this benefit. */
192
+ additionalData?: Record<string, any> | null;
193
+ /**
194
+ * ID of the app providing the benefit items.
195
+ * @format GUID
196
+ * @immutable
197
+ */
198
+ providerAppId?: string | null;
199
+ /**
200
+ * Benefit name.
201
+ * @maxLength 40
202
+ */
203
+ displayName?: string | null;
204
+ /**
205
+ * Benefit description.
206
+ * @maxLength 255
207
+ */
208
+ description?: string | null;
209
+ }
210
+ interface CreditConfiguration {
211
+ /**
212
+ * Initial available amount for associated balances.
213
+ * @decimalValue options { gte:0, maxScale:4 }
214
+ */
215
+ amount?: string;
216
+ /** Rollover settings. */
217
+ rolloverConfiguration?: RolloverConfiguration;
218
+ /**
219
+ * Credit unit display name.
220
+ * @maxLength 32
221
+ */
222
+ unitDisplayName?: string | null;
223
+ }
224
+ interface RolloverConfiguration {
225
+ /** Whether unused credits roll over to a new cycle when a program renews. */
226
+ enabled?: boolean | null;
227
+ /**
228
+ * Maximum number of credits that can roll over to the next cycle when a program renews.
229
+ * @decimalValue options { gte:0, maxScale:4 }
230
+ */
231
+ balanceCap?: string | null;
232
+ }
233
+ interface ExtendedFields {
234
+ /**
235
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
236
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
237
+ *
238
+ * You can only access fields for which you have the appropriate permissions.
239
+ *
240
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
241
+ */
242
+ namespaces?: Record<string, Record<string, any>>;
243
+ }
244
+ interface ProgramDefinitionInfo {
245
+ /**
246
+ * Program definition ID.
247
+ * @format GUID
248
+ * @readonly
249
+ */
250
+ id?: string;
251
+ /**
252
+ * Program definition external ID.
253
+ * @format GUID
254
+ * @readonly
255
+ */
256
+ externalId?: string | null;
257
+ }
258
+ interface PoolProgramInfo {
259
+ /**
260
+ * Program ID.
261
+ * @format GUID
262
+ * @readonly
263
+ */
264
+ id?: string;
265
+ /**
266
+ * Program external ID.
267
+ * @format GUID
268
+ * @readonly
269
+ */
270
+ externalId?: string | null;
271
+ }
272
+ interface ItemReference {
273
+ /**
274
+ * External ID of the item.
275
+ * @format GUID
276
+ */
277
+ externalId?: string;
278
+ /**
279
+ * Item category.
280
+ * @maxLength 20
281
+ */
282
+ category?: string;
283
+ /**
284
+ * ID of the app providing the item.
285
+ * @format GUID
286
+ */
287
+ providerAppId?: string;
288
+ }
289
+ interface GetPoolRequest {
290
+ /**
291
+ * ID of the pool to retrieve.
292
+ * @format GUID
293
+ */
294
+ poolId: string;
295
+ }
296
+ interface GetPoolResponse {
297
+ /** Retrieved pool. */
298
+ pool?: Pool;
299
+ }
300
+ interface UpdatePoolRequest {
301
+ /** Pool to update. */
302
+ pool: Pool;
303
+ }
304
+ interface UpdatePoolResponse {
305
+ /** Updated pool. */
306
+ pool?: Pool;
307
+ }
308
+ interface QueryPoolsRequest {
309
+ /** Filter, sort, and paging to apply to the query. */
310
+ query: CursorQuery;
311
+ }
312
+ interface CursorQuery extends CursorQueryPagingMethodOneOf {
313
+ /** 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`. */
314
+ cursorPaging?: CursorPaging;
315
+ /**
316
+ * Filter object.
317
+ * See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)
318
+ * for more information.
319
+ */
320
+ filter?: Record<string, any> | null;
321
+ /**
322
+ * List of sort objects.
323
+ * @maxSize 5
324
+ */
325
+ sort?: Sorting[];
326
+ }
327
+ /** @oneof */
328
+ interface CursorQueryPagingMethodOneOf {
329
+ /** 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`. */
330
+ cursorPaging?: CursorPaging;
331
+ }
332
+ interface Sorting {
333
+ /**
334
+ * Field to sort by.
335
+ * @maxLength 512
336
+ */
337
+ fieldName?: string;
338
+ /**
339
+ * Sort order. Use `ASC` for ascending order or `DESC` for descending order.
340
+ *
341
+ * Default: `ASC`
342
+ */
343
+ order?: SortOrderWithLiterals;
344
+ }
345
+ declare enum SortOrder {
346
+ /** Ascending sort order. */
347
+ ASC = "ASC",
348
+ /** Descending sort order. */
349
+ DESC = "DESC"
350
+ }
351
+ /** @enumType */
352
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
353
+ interface CursorPaging {
354
+ /**
355
+ * Maximum number of items to return.
356
+ * @max 100
357
+ */
358
+ limit?: number | null;
359
+ /**
360
+ * Pointer to the next or previous page in the list of results.
361
+ *
362
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
363
+ * Not relevant for the first request.
364
+ * @maxLength 16000
365
+ */
366
+ cursor?: string | null;
367
+ }
368
+ interface QueryPoolsResponse {
369
+ /** List of retrieved pools. */
370
+ pools?: Pool[];
371
+ /** Metadata for the paginated results. */
372
+ metadata?: CursorPagingMetadata;
373
+ }
374
+ interface CursorPagingMetadata {
375
+ /** Number of items returned in the response. */
376
+ count?: number | null;
377
+ /** Cursor strings that point to the next page, previous page, or both. */
378
+ cursors?: Cursors;
379
+ /**
380
+ * Whether there are more pages to retrieve following the current page.
381
+ *
382
+ * + `true`: Another page of results can be retrieved.
383
+ * + `false`: This is the last page.
384
+ */
385
+ hasNext?: boolean | null;
386
+ }
387
+ interface Cursors {
388
+ /**
389
+ * Cursor string pointing to the next page in the list of results.
390
+ * @maxLength 16000
391
+ */
392
+ next?: string | null;
393
+ /**
394
+ * Cursor pointing to the previous page in the list of results.
395
+ * @maxLength 16000
396
+ */
397
+ prev?: string | null;
398
+ }
399
+ interface RedeemBenefitRequest {
400
+ /**
401
+ * ID of the pool that contains the benefit to redeem.
402
+ * @format GUID
403
+ */
404
+ poolId: string;
405
+ /** Information about the item to redeem. */
406
+ itemReference: ItemReference;
407
+ /**
408
+ * Key of the benefit to redeem.
409
+ * @maxLength 64
410
+ */
411
+ benefitKey: string;
412
+ /**
413
+ * Amount of items to redeem.
414
+ * @min 1
415
+ */
416
+ count?: number;
417
+ /**
418
+ * Date that the item will be provided to the beneficiary.
419
+ *
420
+ * The pool's associated balance will update immediately. This parameter should be used to manage the logistics of providing the item.
421
+ */
422
+ targetDate?: Date | null;
423
+ /**
424
+ * Unique identifier, generated by the client.
425
+ * Used to recognize repeated attempts to make the same request.
426
+ * @maxLength 200
427
+ */
428
+ idempotencyKey: string;
429
+ /** Additional information. */
430
+ additionalData?: Record<string, any> | null;
431
+ /** Beneficiary of the pool containing the benefit to redeem. */
432
+ beneficiary?: CommonIdentificationData;
433
+ /**
434
+ * 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.
435
+ * @minLength 1
436
+ * @maxLength 50
437
+ */
438
+ namespace: string;
439
+ }
440
+ interface RedeemBenefitResponse {
441
+ /**
442
+ * ID of the transaction recording the associated change in balance.
443
+ * @format GUID
444
+ */
445
+ transactionId?: string;
446
+ }
447
+ interface NotEnoughBalance {
448
+ /**
449
+ * Pool ID.
450
+ * @format GUID
451
+ */
452
+ poolId?: string;
453
+ /** Item reference. */
454
+ itemReference?: ItemReference;
455
+ /**
456
+ * Pool's associated balance amount in credits.
457
+ * @decimalValue options { maxScale:4 }
458
+ */
459
+ availableBalance?: string;
460
+ /**
461
+ * Price of the item in credits.
462
+ * @decimalValue options { maxScale:4 }
463
+ */
464
+ requestedBalance?: string;
465
+ }
466
+ interface PoolNotActive {
467
+ /**
468
+ * Pool ID.
469
+ * @format GUID
470
+ */
471
+ poolId?: string;
472
+ /** Pool status. */
473
+ poolStatus?: PoolStatusWithLiterals;
474
+ }
475
+ interface PoolNotFound {
476
+ /**
477
+ * Pool ID.
478
+ * @format GUID
479
+ */
480
+ poolId?: string;
481
+ }
482
+ interface BenefitNotFound {
483
+ /**
484
+ * Pool ID.
485
+ * @format GUID
486
+ */
487
+ poolId?: string;
488
+ /**
489
+ * Specified benefit key.
490
+ * @format GUID
491
+ */
492
+ benefitKey?: string | null;
493
+ }
494
+ interface CheckBenefitEligibilityRequest {
495
+ /**
496
+ * ID of the pool that the benefit to check belongs to.
497
+ * @format GUID
498
+ */
499
+ poolId: string;
500
+ /**
501
+ * Key of the benefit to check.
502
+ * @maxLength 64
503
+ */
504
+ benefitKey?: string | null;
505
+ /** Information about the item to check. */
506
+ itemReference: ItemReference;
507
+ /**
508
+ * Amount of items to check.
509
+ *
510
+ * Ensures the balance is high enough to redeem this many items.
511
+ * @min 1
512
+ */
513
+ count?: number;
514
+ /**
515
+ * Date that the item will be provided to the beneficiary.
516
+ *
517
+ * This parameter should be used to manage the potential logistics of providing the item.
518
+ */
519
+ targetDate?: Date | null;
520
+ /** Additional information. */
521
+ additionalData?: Record<string, any> | null;
522
+ /** Beneficiary of the pool containing the benefit to check. */
523
+ beneficiary?: CommonIdentificationData;
524
+ /**
525
+ * 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.
526
+ * @minLength 1
527
+ * @maxLength 50
528
+ */
529
+ namespace: string;
530
+ }
531
+ interface CheckBenefitEligibilityResponse {
532
+ /** Result of the eligibility check. */
533
+ result?: EligibilityCheckResult;
534
+ }
535
+ interface EligibilityCheckResult extends EligibilityCheckResultResultOneOf {
536
+ /** Returned when item is eligible to be redeemed. */
537
+ eligibleOptions?: Eligible;
538
+ /** Returned when the pool's associated balance is lower than the cost of redeeming the items. */
539
+ notEnoughBalanceOptions?: NotEnoughBalance;
540
+ /** Returned when the pool isn't active. */
541
+ poolNotActiveOptions?: PoolNotActive;
542
+ /** Returned when invalid benefit details are provided. */
543
+ benefitNotFoundOptions?: BenefitNotFound;
544
+ /** Returned when invalid pool details are provided. */
545
+ poolNotFoundOptions?: PoolNotFound;
546
+ /** Eligibility status. */
547
+ type?: EligibilityCheckResultTypeWithLiterals;
548
+ }
549
+ /** @oneof */
550
+ interface EligibilityCheckResultResultOneOf {
551
+ /** Returned when item is eligible to be redeemed. */
552
+ eligibleOptions?: Eligible;
553
+ /** Returned when the pool's associated balance is lower than the cost of redeeming the items. */
554
+ notEnoughBalanceOptions?: NotEnoughBalance;
555
+ /** Returned when the pool isn't active. */
556
+ poolNotActiveOptions?: PoolNotActive;
557
+ /** Returned when invalid benefit details are provided. */
558
+ benefitNotFoundOptions?: BenefitNotFound;
559
+ /** Returned when invalid pool details are provided. */
560
+ poolNotFoundOptions?: PoolNotFound;
561
+ }
562
+ interface EligibleBenefit {
563
+ /**
564
+ * Pool ID.
565
+ * @format GUID
566
+ * @readonly
567
+ */
568
+ poolId?: string;
569
+ /**
570
+ * Benefit key.
571
+ * @maxLength 64
572
+ */
573
+ benefitKey?: string;
574
+ /** Item reference. */
575
+ itemReference?: ItemReference;
576
+ /**
577
+ * Price of the benefit in credits.
578
+ * @decimalValue options { gte:0, maxScale:4 }
579
+ */
580
+ price?: string | null;
581
+ }
582
+ declare enum EligibilityCheckResultType {
583
+ /** Unknown eligibility. */
584
+ UNKNOWN = "UNKNOWN",
585
+ /** Item is eligible to be redeemed. */
586
+ ELIGIBLE = "ELIGIBLE",
587
+ /** Balance is lower than the cost of redeeming the items. */
588
+ NOT_ENOUGH_BALANCE = "NOT_ENOUGH_BALANCE",
589
+ /** Pool isn't active. */
590
+ POOL_NOT_ACTIVE = "POOL_NOT_ACTIVE",
591
+ /** Invalid benefit details provided. */
592
+ BENEFIT_NOT_FOUND = "BENEFIT_NOT_FOUND",
593
+ /** Invalid pool details provided. */
594
+ POOL_NOT_FOUND = "POOL_NOT_FOUND"
595
+ }
596
+ /** @enumType */
597
+ type EligibilityCheckResultTypeWithLiterals = EligibilityCheckResultType | 'UNKNOWN' | 'ELIGIBLE' | 'NOT_ENOUGH_BALANCE' | 'POOL_NOT_ACTIVE' | 'BENEFIT_NOT_FOUND' | 'POOL_NOT_FOUND';
598
+ interface Eligible {
599
+ /**
600
+ * Benefits that are eligible to be redeemed.
601
+ * @maxSize 100
602
+ */
603
+ eligibleBenefits?: EligibleBenefit[];
604
+ }
605
+ interface BulkCheckBenefitEligibilityRequest {
606
+ /**
607
+ * List of benefits to check.
608
+ * @minSize 1
609
+ * @maxSize 100
610
+ */
611
+ benefitSelectors?: BenefitSelector[];
612
+ /**
613
+ * 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.
614
+ * @minLength 1
615
+ * @maxLength 50
616
+ */
617
+ namespace: string;
618
+ /** Pool beneficiary. */
619
+ beneficiary?: CommonIdentificationData;
620
+ }
621
+ interface BenefitSelector {
622
+ /**
623
+ * ID of the pool that the benefit to check belongs to.
624
+ * @format GUID
625
+ */
626
+ poolId?: string;
627
+ /**
628
+ * Key of the benefit to check.
629
+ * @maxLength 64
630
+ */
631
+ benefitKey?: string | null;
632
+ /** Information about the item to check. */
633
+ itemReference?: ItemReference;
634
+ /**
635
+ * Amount of items to check.
636
+ *
637
+ * Ensures the balance is high enough to redeem this many it
638
+ * @min 1
639
+ */
640
+ count?: number;
641
+ /**
642
+ * Date that the item will be provided to the beneficiary.
643
+ *
644
+ * This parameter should be used to manage the potential logistics of providing the item.
645
+ */
646
+ targetDate?: Date | null;
647
+ /** Additional information. */
648
+ additionalData?: Record<string, any> | null;
649
+ }
650
+ interface BulkCheckBenefitEligibilityResponse {
651
+ /**
652
+ * List of results checking each benefit.
653
+ * @minSize 1
654
+ * @maxSize 100
655
+ */
656
+ results?: BulkEligibilityCheckResult[];
657
+ }
658
+ interface BulkEligibilityCheckResult {
659
+ /** Benefit information specified in API call. */
660
+ benefitSelector?: BenefitSelector;
661
+ /** Result of the eligibility check. */
662
+ result?: EligibilityCheckResult;
663
+ }
664
+ interface GetEligibleBenefitsRequest {
665
+ /** Item reference. */
666
+ itemReference: ItemReference;
667
+ /**
668
+ * Amount of items to check. This ensures the balance is high enough to redeem this many items.
669
+ * @min 1
670
+ */
671
+ count?: number;
672
+ /**
673
+ * Date that the item will be provided to the beneficiary.
674
+ *
675
+ * This parameter should be used to manage the potential logistics of providing the item.
676
+ */
677
+ targetDate?: Date | null;
678
+ /** Additional information. */
679
+ additionalData?: Record<string, any> | null;
680
+ /** Filter request by beneficiary. */
681
+ beneficiary?: CommonIdentificationData;
682
+ /**
683
+ * 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.
684
+ * @minLength 1
685
+ * @maxLength 50
686
+ */
687
+ namespace: string;
688
+ }
689
+ interface GetEligibleBenefitsResponse {
690
+ /** Retrieved benefits that can be redeemed. */
691
+ eligibleBenefits?: EligibleBenefit[];
692
+ }
693
+ interface BulkUpdatePoolsRequest {
694
+ /**
695
+ * Pools to update.
696
+ * @minSize 1
697
+ * @maxSize 100
698
+ */
699
+ pools?: MaskedPool[];
700
+ /**
701
+ * Whether to return the full pool definition entities.
702
+ *
703
+ * Default: `false`
704
+ */
705
+ returnEntity?: boolean;
706
+ }
707
+ interface MaskedPool {
708
+ /** Pool to update. */
709
+ pool?: Pool;
710
+ /** Explicit list of fields to update. */
711
+ fieldMask?: string[];
712
+ }
713
+ interface BulkUpdatePoolsResponse {
714
+ /**
715
+ * List of updated pools and associated metadata.
716
+ * @minSize 1
717
+ * @maxSize 100
718
+ */
719
+ results?: BulkPoolResult[];
720
+ /** Bulk action metadata. */
721
+ bulkActionMetadata?: BulkActionMetadata;
722
+ }
723
+ interface BulkPoolResult {
724
+ /** Pool metadata. */
725
+ poolMetadata?: ItemMetadata;
726
+ /** Pool data. */
727
+ pool?: Pool;
728
+ }
729
+ interface ItemMetadata {
730
+ /**
731
+ * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
732
+ * @format GUID
733
+ */
734
+ id?: string | null;
735
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
736
+ originalIndex?: number;
737
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
738
+ success?: boolean;
739
+ /** Details about the error in case of failure. */
740
+ error?: ApplicationError;
741
+ }
742
+ interface ApplicationError {
743
+ /** Error code. */
744
+ code?: string;
745
+ /** Description of the error. */
746
+ description?: string;
747
+ /** Data related to the error. */
748
+ data?: Record<string, any> | null;
749
+ }
750
+ interface BulkActionMetadata {
751
+ /** Number of items that were successfully processed. */
752
+ totalSuccesses?: number;
753
+ /** Number of items that couldn't be processed. */
754
+ totalFailures?: number;
755
+ /** Number of failures without details because detailed failure threshold was exceeded. */
756
+ undetailedFailures?: number;
757
+ }
758
+
759
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
760
+ getUrl: (context: any) => string;
761
+ httpMethod: K;
762
+ path: string;
763
+ pathParams: M;
764
+ __requestType: T;
765
+ __originalRequestType: S;
766
+ __responseType: Q;
767
+ __originalResponseType: R;
768
+ };
769
+ declare function getPool(): __PublicMethodMetaInfo<'GET', {
770
+ poolId: string;
771
+ }, GetPoolRequest$1, GetPoolRequest, GetPoolResponse$1, GetPoolResponse>;
772
+ declare function updatePool(): __PublicMethodMetaInfo<'PATCH', {
773
+ poolId: string;
774
+ }, UpdatePoolRequest$1, UpdatePoolRequest, UpdatePoolResponse$1, UpdatePoolResponse>;
775
+ declare function queryPools(): __PublicMethodMetaInfo<'POST', {}, QueryPoolsRequest$1, QueryPoolsRequest, QueryPoolsResponse$1, QueryPoolsResponse>;
776
+ declare function redeemBenefit(): __PublicMethodMetaInfo<'POST', {}, RedeemBenefitRequest$1, RedeemBenefitRequest, RedeemBenefitResponse$1, RedeemBenefitResponse>;
777
+ declare function checkBenefitEligibility(): __PublicMethodMetaInfo<'POST', {}, CheckBenefitEligibilityRequest$1, CheckBenefitEligibilityRequest, CheckBenefitEligibilityResponse$1, CheckBenefitEligibilityResponse>;
778
+ declare function bulkCheckBenefitEligibility(): __PublicMethodMetaInfo<'POST', {}, BulkCheckBenefitEligibilityRequest$1, BulkCheckBenefitEligibilityRequest, BulkCheckBenefitEligibilityResponse$1, BulkCheckBenefitEligibilityResponse>;
779
+ declare function getEligibleBenefits(): __PublicMethodMetaInfo<'POST', {}, GetEligibleBenefitsRequest$1, GetEligibleBenefitsRequest, GetEligibleBenefitsResponse$1, GetEligibleBenefitsResponse>;
780
+ declare function bulkUpdatePools(): __PublicMethodMetaInfo<'POST', {}, BulkUpdatePoolsRequest$1, BulkUpdatePoolsRequest, BulkUpdatePoolsResponse$1, BulkUpdatePoolsResponse>;
781
+
782
+ export { type __PublicMethodMetaInfo, bulkCheckBenefitEligibility, bulkUpdatePools, checkBenefitEligibility, getEligibleBenefits, getPool, queryPools, redeemBenefit, updatePool };