@wix/auto_sdk_benefit-programs_items 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) 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-item-items.context.d.ts +15 -0
  11. package/build/cjs/src/benefit-programs-v1-item-items.context.js +21 -0
  12. package/build/cjs/src/benefit-programs-v1-item-items.context.js.map +1 -0
  13. package/build/cjs/src/benefit-programs-v1-item-items.http.d.ts +67 -0
  14. package/build/cjs/src/benefit-programs-v1-item-items.http.js +508 -0
  15. package/build/cjs/src/benefit-programs-v1-item-items.http.js.map +1 -0
  16. package/build/cjs/src/benefit-programs-v1-item-items.meta.d.ts +29 -0
  17. package/build/cjs/src/benefit-programs-v1-item-items.meta.js +237 -0
  18. package/build/cjs/src/benefit-programs-v1-item-items.meta.js.map +1 -0
  19. package/build/cjs/src/benefit-programs-v1-item-items.public.d.ts +121 -0
  20. package/build/cjs/src/benefit-programs-v1-item-items.public.js +76 -0
  21. package/build/cjs/src/benefit-programs-v1-item-items.public.js.map +1 -0
  22. package/build/cjs/src/benefit-programs-v1-item-items.types.d.ts +592 -0
  23. package/build/cjs/src/benefit-programs-v1-item-items.types.js +37 -0
  24. package/build/cjs/src/benefit-programs-v1-item-items.types.js.map +1 -0
  25. package/build/cjs/src/benefit-programs-v1-item-items.universal.d.ts +909 -0
  26. package/build/cjs/src/benefit-programs-v1-item-items.universal.js +487 -0
  27. package/build/cjs/src/benefit-programs-v1-item-items.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-item-items.context.d.ts +15 -0
  39. package/build/es/src/benefit-programs-v1-item-items.context.js +15 -0
  40. package/build/es/src/benefit-programs-v1-item-items.context.js.map +1 -0
  41. package/build/es/src/benefit-programs-v1-item-items.http.d.ts +67 -0
  42. package/build/es/src/benefit-programs-v1-item-items.http.js +494 -0
  43. package/build/es/src/benefit-programs-v1-item-items.http.js.map +1 -0
  44. package/build/es/src/benefit-programs-v1-item-items.meta.d.ts +29 -0
  45. package/build/es/src/benefit-programs-v1-item-items.meta.js +200 -0
  46. package/build/es/src/benefit-programs-v1-item-items.meta.js.map +1 -0
  47. package/build/es/src/benefit-programs-v1-item-items.public.d.ts +121 -0
  48. package/build/es/src/benefit-programs-v1-item-items.public.js +59 -0
  49. package/build/es/src/benefit-programs-v1-item-items.public.js.map +1 -0
  50. package/build/es/src/benefit-programs-v1-item-items.types.d.ts +592 -0
  51. package/build/es/src/benefit-programs-v1-item-items.types.js +34 -0
  52. package/build/es/src/benefit-programs-v1-item-items.types.js.map +1 -0
  53. package/build/es/src/benefit-programs-v1-item-items.universal.d.ts +909 -0
  54. package/build/es/src/benefit-programs-v1-item-items.universal.js +450 -0
  55. package/build/es/src/benefit-programs-v1-item-items.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-item-items.context.d.ts +15 -0
  66. package/build/internal/cjs/src/benefit-programs-v1-item-items.context.js +21 -0
  67. package/build/internal/cjs/src/benefit-programs-v1-item-items.context.js.map +1 -0
  68. package/build/internal/cjs/src/benefit-programs-v1-item-items.http.d.ts +67 -0
  69. package/build/internal/cjs/src/benefit-programs-v1-item-items.http.js +508 -0
  70. package/build/internal/cjs/src/benefit-programs-v1-item-items.http.js.map +1 -0
  71. package/build/internal/cjs/src/benefit-programs-v1-item-items.meta.d.ts +29 -0
  72. package/build/internal/cjs/src/benefit-programs-v1-item-items.meta.js +237 -0
  73. package/build/internal/cjs/src/benefit-programs-v1-item-items.meta.js.map +1 -0
  74. package/build/internal/cjs/src/benefit-programs-v1-item-items.public.d.ts +121 -0
  75. package/build/internal/cjs/src/benefit-programs-v1-item-items.public.js +76 -0
  76. package/build/internal/cjs/src/benefit-programs-v1-item-items.public.js.map +1 -0
  77. package/build/internal/cjs/src/benefit-programs-v1-item-items.types.d.ts +592 -0
  78. package/build/internal/cjs/src/benefit-programs-v1-item-items.types.js +37 -0
  79. package/build/internal/cjs/src/benefit-programs-v1-item-items.types.js.map +1 -0
  80. package/build/internal/cjs/src/benefit-programs-v1-item-items.universal.d.ts +909 -0
  81. package/build/internal/cjs/src/benefit-programs-v1-item-items.universal.js +487 -0
  82. package/build/internal/cjs/src/benefit-programs-v1-item-items.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-item-items.context.d.ts +15 -0
  93. package/build/internal/es/src/benefit-programs-v1-item-items.context.js +15 -0
  94. package/build/internal/es/src/benefit-programs-v1-item-items.context.js.map +1 -0
  95. package/build/internal/es/src/benefit-programs-v1-item-items.http.d.ts +67 -0
  96. package/build/internal/es/src/benefit-programs-v1-item-items.http.js +494 -0
  97. package/build/internal/es/src/benefit-programs-v1-item-items.http.js.map +1 -0
  98. package/build/internal/es/src/benefit-programs-v1-item-items.meta.d.ts +29 -0
  99. package/build/internal/es/src/benefit-programs-v1-item-items.meta.js +200 -0
  100. package/build/internal/es/src/benefit-programs-v1-item-items.meta.js.map +1 -0
  101. package/build/internal/es/src/benefit-programs-v1-item-items.public.d.ts +121 -0
  102. package/build/internal/es/src/benefit-programs-v1-item-items.public.js +59 -0
  103. package/build/internal/es/src/benefit-programs-v1-item-items.public.js.map +1 -0
  104. package/build/internal/es/src/benefit-programs-v1-item-items.types.d.ts +592 -0
  105. package/build/internal/es/src/benefit-programs-v1-item-items.types.js +34 -0
  106. package/build/internal/es/src/benefit-programs-v1-item-items.types.js.map +1 -0
  107. package/build/internal/es/src/benefit-programs-v1-item-items.universal.d.ts +909 -0
  108. package/build/internal/es/src/benefit-programs-v1-item-items.universal.js +450 -0
  109. package/build/internal/es/src/benefit-programs-v1-item-items.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,592 @@
1
+ export interface Item {
2
+ /**
3
+ * Benefit item ID.
4
+ * @readonly
5
+ */
6
+ id?: string | null;
7
+ /**
8
+ * Revision number, which increments by 1 each time the benefit item is updated.
9
+ * To prevent conflicting changes, the current revision must be passed when updating the item.
10
+ *
11
+ * Ignored when creating an item.
12
+ * @readonly
13
+ */
14
+ revision?: string | null;
15
+ /**
16
+ * Date and time the item was created.
17
+ * @readonly
18
+ */
19
+ createdDate?: Date | null;
20
+ /**
21
+ * Date and time the item was updated.
22
+ * @readonly
23
+ */
24
+ updatedDate?: Date | null;
25
+ /**
26
+ * External item ID assigned by the provider of the items.
27
+ *
28
+ * For example, if the benefit items are products, this ID corresponds to the specific product ID in the supplier's system.
29
+ */
30
+ externalId?: string;
31
+ /** Item category. Groups benefit items together for organization and management purposes. For example, classes, posts, groups. */
32
+ category?: string | null;
33
+ /**
34
+ * ID that is a shared reference between a benefit pool and a specific item.
35
+ *
36
+ * This ID is returned when calling the Create Pool Definition method in the Pool Definitions API.
37
+ *
38
+ * It is used to link the specific benefit item to its corresponding location within the benefit pool.
39
+ */
40
+ itemSetId?: string;
41
+ /** Display name of the item. For example, a concert ticket or an exercise session with a personal trainer. */
42
+ displayName?: string | null;
43
+ /**
44
+ * ID of the application providing the benefit item.
45
+ *
46
+ * ID of the external application supplying the items. Each item's external ID is unique to its respective provider's application.
47
+ */
48
+ providerAppId?: string | null;
49
+ /**
50
+ * Custom field data for the item object.
51
+ * [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.
52
+ */
53
+ extendedFields?: ExtendedFields;
54
+ /**
55
+ * Module name of the item provider's application that originated the items.
56
+ *
57
+ * For example, `store-inventory` or `fitness-resources`.
58
+ */
59
+ namespace?: string | null;
60
+ }
61
+ export interface ExtendedFields {
62
+ /**
63
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
64
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
65
+ *
66
+ * You can only access fields for which you have the appropriate permissions.
67
+ *
68
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
69
+ */
70
+ namespaces?: Record<string, Record<string, any>>;
71
+ }
72
+ export interface ItemsCloned {
73
+ /** ID of the pool that had its items provisioned */
74
+ itemSetId?: string;
75
+ }
76
+ export interface CreateItemRequest {
77
+ /** Item to create. */
78
+ item: Item;
79
+ }
80
+ export interface CreateItemResponse {
81
+ /** Created item. */
82
+ item?: Item;
83
+ }
84
+ export interface BulkCreateItemsRequest {
85
+ /** Items to be created. */
86
+ items: Item[];
87
+ /**
88
+ * Whether to return the full item entities.
89
+ *
90
+ * Default: `false`
91
+ */
92
+ returnEntity?: boolean;
93
+ }
94
+ export interface BulkCreateItemsResponse {
95
+ /**
96
+ * List of results for each item.
97
+ *
98
+ * Includes the item and whether the operation was successful.
99
+ */
100
+ results?: BulkItemResult[];
101
+ /** Bulk action metadata. */
102
+ bulkActionMetadata?: BulkActionMetadata;
103
+ }
104
+ export interface BulkItemResult {
105
+ /** Item metadata. */
106
+ itemMetadata?: ItemMetadata;
107
+ /** Item. */
108
+ item?: Item;
109
+ }
110
+ export interface ItemMetadata {
111
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
112
+ id?: string | null;
113
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
114
+ originalIndex?: number;
115
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
116
+ success?: boolean;
117
+ /** Details about the error in case of failure. */
118
+ error?: ApplicationError;
119
+ }
120
+ export interface ApplicationError {
121
+ /** Error code. */
122
+ code?: string;
123
+ /** Description of the error. */
124
+ description?: string;
125
+ /** Data related to the error. */
126
+ data?: Record<string, any> | null;
127
+ }
128
+ export interface BulkActionMetadata {
129
+ /** Number of items that were successfully processed. */
130
+ totalSuccesses?: number;
131
+ /** Number of items that couldn't be processed. */
132
+ totalFailures?: number;
133
+ /** Number of failures without details because detailed failure threshold was exceeded. */
134
+ undetailedFailures?: number;
135
+ }
136
+ export interface DeleteItemRequest {
137
+ /** Item ID. */
138
+ itemId: string;
139
+ }
140
+ export interface DeleteItemResponse {
141
+ }
142
+ export interface BulkDeleteItemsRequest {
143
+ /** ID of the items to delete. */
144
+ itemIds: string[];
145
+ }
146
+ export interface BulkDeleteItemsResponse {
147
+ /**
148
+ * List of results for each item.
149
+ *
150
+ * Includes the item and whether the deletion was successful.
151
+ */
152
+ results?: BulkItemResult[];
153
+ /** Bulk action metadata. */
154
+ bulkActionMetadata?: BulkActionMetadata;
155
+ }
156
+ export interface BulkDeleteItemsByFilterRequest {
157
+ /** Sub-module name of the item provider's application that originated the items. */
158
+ namespace: string;
159
+ /** Filter options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */
160
+ filter?: Record<string, any> | null;
161
+ }
162
+ export interface BulkDeleteItemsByFilterResponse {
163
+ /**
164
+ * Job ID. Use the Async Job API to retrieve bulk delete results.
165
+ *
166
+ * Specify this job ID in the Get Async Job method to retrieve job details and metadata.
167
+ */
168
+ jobId?: string;
169
+ }
170
+ export interface UpdateItemRequest {
171
+ /** Item to be updated. */
172
+ item: Item;
173
+ }
174
+ export interface UpdateItemResponse {
175
+ /** Updated item. */
176
+ item?: Item;
177
+ }
178
+ export interface BulkUpdateItemsRequest {
179
+ /** Items to update. */
180
+ items?: MaskedItem[];
181
+ /**
182
+ * Whether to return the full item entities.
183
+ *
184
+ * Default: `false`
185
+ */
186
+ returnEntity?: boolean;
187
+ }
188
+ export interface MaskedItem {
189
+ /** Item to update. */
190
+ item?: Item;
191
+ /** Explicit list of fields to update. */
192
+ fieldMask?: string[];
193
+ }
194
+ export interface BulkUpdateItemsResponse {
195
+ /** Items that were updated. */
196
+ results?: BulkItemResult[];
197
+ /** Bulk action metadata. */
198
+ bulkActionMetadata?: BulkActionMetadata;
199
+ }
200
+ export interface GetItemRequest {
201
+ /** ID of the item to retrieve. */
202
+ itemId: string;
203
+ }
204
+ export interface GetItemResponse {
205
+ /** Retrieved item. */
206
+ item?: Item;
207
+ }
208
+ export interface ListItemsRequest {
209
+ /** Filter. */
210
+ filter?: Filter;
211
+ /** Cursor paging */
212
+ cursorPaging?: CursorPaging;
213
+ }
214
+ export declare enum Type {
215
+ /** Unknown filter type. */
216
+ UNKNOWN_FILTER = "UNKNOWN_FILTER",
217
+ /**
218
+ * Filter the list by `itemSetId` and a reference to the item.
219
+ *
220
+ * Retrieve a list of a benefit item in a specific benefit pool.
221
+ *
222
+ * The items must be referenced by their `providerAppId`.
223
+ * The `externalId` can be included for additional specificity of an item, but can only be used with its corresponding `providerAppId`.
224
+ */
225
+ BY_ITEM_SET_ID_AND_REFERENCE = "BY_ITEM_SET_ID_AND_REFERENCE",
226
+ /**
227
+ * Filter the list by reference to the item.
228
+ *
229
+ * Retrieve a list of a benefit item in all benefit pools.
230
+ */
231
+ BY_REFERENCE = "BY_REFERENCE"
232
+ }
233
+ export interface ByItemSetIdAndReference {
234
+ /** Filter list. */
235
+ filters?: ByItemSetIdAndReferenceFilter[];
236
+ }
237
+ export interface ByItemSetIdAndReferenceFilter {
238
+ /** ID that is a shared reference between a benefit pool and a specific item. */
239
+ itemSetId?: string;
240
+ /** External item ID assigned by the provider of the items. */
241
+ externalId?: string;
242
+ /** Item category. Groups benefit items together for organization and management purposes. For example, classes, posts, groups. */
243
+ category?: string;
244
+ /** ID of the external application supplying the items. */
245
+ providerAppId?: string;
246
+ }
247
+ export interface ByReference {
248
+ /** Filter list. */
249
+ filters?: ByReferenceFilter[];
250
+ }
251
+ export interface ByReferenceFilter {
252
+ /** External item ID assigned by the provider of the items. */
253
+ externalId?: string;
254
+ /** Item category. Groups benefit items together for organization and management purposes. For example, classes, posts, groups. */
255
+ category?: string;
256
+ /** ID of the external application supplying the items. */
257
+ providerAppId?: string;
258
+ }
259
+ export interface Filter extends FilterFilterOneOf {
260
+ /**
261
+ * Filter the list by `itemSetId` and a reference to the item.
262
+ *
263
+ * Retrieve a list of benefit items in a specific benefit pool.
264
+ *
265
+ * The items must be referenced by their `providerAppId`.
266
+ * The `externalId` can be included for additional specificity of an item, but can only be used with its corresponding `providerAppId`.
267
+ */
268
+ byItemSetIdAndReferenceOptions?: ByItemSetIdAndReference;
269
+ /**
270
+ * Filter the list by reference to the item.
271
+ *
272
+ * Retrieve a list of a benefit item in all benefit pools.
273
+ */
274
+ byReferenceOptions?: ByReference;
275
+ /** Filter type. */
276
+ type?: Type;
277
+ /** Filter items by the item's namespace. */
278
+ namespace?: string;
279
+ }
280
+ /** @oneof */
281
+ export interface FilterFilterOneOf {
282
+ /**
283
+ * Filter the list by `itemSetId` and a reference to the item.
284
+ *
285
+ * Retrieve a list of benefit items in a specific benefit pool.
286
+ *
287
+ * The items must be referenced by their `providerAppId`.
288
+ * The `externalId` can be included for additional specificity of an item, but can only be used with its corresponding `providerAppId`.
289
+ */
290
+ byItemSetIdAndReferenceOptions?: ByItemSetIdAndReference;
291
+ /**
292
+ * Filter the list by reference to the item.
293
+ *
294
+ * Retrieve a list of a benefit item in all benefit pools.
295
+ */
296
+ byReferenceOptions?: ByReference;
297
+ }
298
+ export interface CursorPaging {
299
+ /** Maximum number of items to return in the results. */
300
+ limit?: number | null;
301
+ /**
302
+ * Pointer to the next or previous page in the list of results.
303
+ *
304
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
305
+ * Not relevant for the first request.
306
+ */
307
+ cursor?: string | null;
308
+ }
309
+ export interface ListItemsResponse {
310
+ /** Items. */
311
+ items?: Item[];
312
+ /** Metadata for paginated results. */
313
+ metadata?: CursorPagingMetadata;
314
+ }
315
+ export interface CursorPagingMetadata {
316
+ /** Number of items returned in the response. */
317
+ count?: number | null;
318
+ /** Cursor strings that point to the next page, previous page, or both. */
319
+ cursors?: Cursors;
320
+ /**
321
+ * Whether there are more pages to retrieve following the current page.
322
+ *
323
+ * + `true`: Another page of results can be retrieved.
324
+ * + `false`: This is the last page.
325
+ */
326
+ hasNext?: boolean | null;
327
+ }
328
+ export interface Cursors {
329
+ /** Cursor string pointing to the next page in the list of results. */
330
+ next?: string | null;
331
+ /** Cursor pointing to the previous page in the list of results. */
332
+ prev?: string | null;
333
+ }
334
+ export interface QueryItemsRequest {
335
+ /** Query to select benefit items. */
336
+ query?: CursorQuery;
337
+ }
338
+ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
339
+ /** 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`. */
340
+ cursorPaging?: CursorPaging;
341
+ /**
342
+ * Filter object in the following format:
343
+ * `"filter" : {
344
+ * "fieldName1": "value1",
345
+ * "fieldName2":{"$operator":"value2"}
346
+ * }`
347
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
348
+ */
349
+ filter?: Record<string, any> | null;
350
+ /**
351
+ * Sort object in the following format:
352
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
353
+ */
354
+ sort?: Sorting[];
355
+ }
356
+ /** @oneof */
357
+ export interface CursorQueryPagingMethodOneOf {
358
+ /** 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`. */
359
+ cursorPaging?: CursorPaging;
360
+ }
361
+ export interface Sorting {
362
+ /** Name of the field to sort by. */
363
+ fieldName?: string;
364
+ /** Sort order. */
365
+ order?: SortOrder;
366
+ }
367
+ export declare enum SortOrder {
368
+ ASC = "ASC",
369
+ DESC = "DESC"
370
+ }
371
+ export interface QueryItemsResponse {
372
+ /** List of items. */
373
+ items?: Item[];
374
+ /** Metadata for paginated results. */
375
+ metadata?: CursorPagingMetadata;
376
+ }
377
+ export interface CountItemsRequest {
378
+ /**
379
+ * Items to count.
380
+ *
381
+ * Filter options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language).
382
+ */
383
+ filter?: Record<string, any> | null;
384
+ }
385
+ export interface CountItemsResponse {
386
+ /** Number of items. */
387
+ count?: number;
388
+ }
389
+ export interface CloneItemsRequest {
390
+ /** Id of the item set to be cloned */
391
+ itemSetId?: string;
392
+ }
393
+ export interface CloneItemsResponse {
394
+ /** Id of the item set that these items were added to */
395
+ clonedItemSetId?: string;
396
+ /** Id of the job that is cloning the item set */
397
+ cloneJobId?: string;
398
+ }
399
+ export interface BulkCloneItemSetsRequest {
400
+ /** Id of the item sets to be cloned */
401
+ itemSetIds?: string[];
402
+ }
403
+ export interface BulkCloneItemSetsResponse {
404
+ /** Results */
405
+ results?: BulkCloneItemSetsResult[];
406
+ /** Bulk action metadata */
407
+ bulkActionMetadata?: BulkActionMetadata;
408
+ /** Id of the job that is cloning the item set */
409
+ jobId?: string;
410
+ }
411
+ export interface BulkCloneItemSetsResult {
412
+ /** Item metadata */
413
+ itemMetadata?: ItemMetadata;
414
+ /** Id of the item set that these items were added to */
415
+ clonedItemSetId?: string;
416
+ }
417
+ export interface AllocateItemSetsRequest {
418
+ /** Number of sets to allocate */
419
+ numberOfSets?: number;
420
+ }
421
+ export interface AllocateItemSetsResponse {
422
+ /** ID that is a shared reference between a benefit pool and a specific item. */
423
+ itemSetIds?: string[];
424
+ }
425
+ export interface DomainEvent extends DomainEventBodyOneOf {
426
+ createdEvent?: EntityCreatedEvent;
427
+ updatedEvent?: EntityUpdatedEvent;
428
+ deletedEvent?: EntityDeletedEvent;
429
+ actionEvent?: ActionEvent;
430
+ /**
431
+ * Unique event ID.
432
+ * Allows clients to ignore duplicate webhooks.
433
+ */
434
+ id?: string;
435
+ /**
436
+ * Assumes actions are also always typed to an entity_type
437
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
438
+ */
439
+ entityFqdn?: string;
440
+ /**
441
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
442
+ * This is although the created/updated/deleted notion is duplication of the oneof types
443
+ * Example: created/updated/deleted/started/completed/email_opened
444
+ */
445
+ slug?: string;
446
+ /** ID of the entity associated with the event. */
447
+ entityId?: string;
448
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
449
+ eventTime?: Date | null;
450
+ /**
451
+ * Whether the event was triggered as a result of a privacy regulation application
452
+ * (for example, GDPR).
453
+ */
454
+ triggeredByAnonymizeRequest?: boolean | null;
455
+ /** If present, indicates the action that triggered the event. */
456
+ originatedFrom?: string | null;
457
+ /**
458
+ * A sequence number defining the order of updates to the underlying entity.
459
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
460
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
461
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
462
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
463
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
464
+ */
465
+ entityEventSequence?: string | null;
466
+ }
467
+ /** @oneof */
468
+ export interface DomainEventBodyOneOf {
469
+ createdEvent?: EntityCreatedEvent;
470
+ updatedEvent?: EntityUpdatedEvent;
471
+ deletedEvent?: EntityDeletedEvent;
472
+ actionEvent?: ActionEvent;
473
+ }
474
+ export interface EntityCreatedEvent {
475
+ entityAsJson?: string;
476
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
477
+ restoreInfo?: RestoreInfo;
478
+ }
479
+ export interface RestoreInfo {
480
+ deletedDate?: Date | null;
481
+ }
482
+ export interface EntityUpdatedEvent {
483
+ /**
484
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
485
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
486
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
487
+ */
488
+ currentEntityAsJson?: string;
489
+ }
490
+ export interface EntityDeletedEvent {
491
+ /** Entity that was deleted */
492
+ deletedEntityAsJson?: string | null;
493
+ }
494
+ export interface ActionEvent {
495
+ bodyAsJson?: string;
496
+ }
497
+ export interface MessageEnvelope {
498
+ /** App instance ID. */
499
+ instanceId?: string | null;
500
+ /** Event type. */
501
+ eventType?: string;
502
+ /** The identification type and identity data. */
503
+ identity?: IdentificationData;
504
+ /** Stringify payload. */
505
+ data?: string;
506
+ }
507
+ export interface IdentificationData extends IdentificationDataIdOneOf {
508
+ /** ID of a site visitor that has not logged in to the site. */
509
+ anonymousVisitorId?: string;
510
+ /** ID of a site visitor that has logged in to the site. */
511
+ memberId?: string;
512
+ /** ID of a Wix user (site owner, contributor, etc.). */
513
+ wixUserId?: string;
514
+ /** ID of an app. */
515
+ appId?: string;
516
+ /** @readonly */
517
+ identityType?: WebhookIdentityType;
518
+ }
519
+ /** @oneof */
520
+ export interface IdentificationDataIdOneOf {
521
+ /** ID of a site visitor that has not logged in to the site. */
522
+ anonymousVisitorId?: string;
523
+ /** ID of a site visitor that has logged in to the site. */
524
+ memberId?: string;
525
+ /** ID of a Wix user (site owner, contributor, etc.). */
526
+ wixUserId?: string;
527
+ /** ID of an app. */
528
+ appId?: string;
529
+ }
530
+ export declare enum WebhookIdentityType {
531
+ UNKNOWN = "UNKNOWN",
532
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
533
+ MEMBER = "MEMBER",
534
+ WIX_USER = "WIX_USER",
535
+ APP = "APP"
536
+ }
537
+ interface ItemNonNullableFields {
538
+ externalId: string;
539
+ itemSetId: string;
540
+ }
541
+ export interface CreateItemResponseNonNullableFields {
542
+ item?: ItemNonNullableFields;
543
+ }
544
+ interface ApplicationErrorNonNullableFields {
545
+ code: string;
546
+ description: string;
547
+ }
548
+ interface ItemMetadataNonNullableFields {
549
+ originalIndex: number;
550
+ success: boolean;
551
+ error?: ApplicationErrorNonNullableFields;
552
+ }
553
+ interface BulkItemResultNonNullableFields {
554
+ itemMetadata?: ItemMetadataNonNullableFields;
555
+ item?: ItemNonNullableFields;
556
+ }
557
+ interface BulkActionMetadataNonNullableFields {
558
+ totalSuccesses: number;
559
+ totalFailures: number;
560
+ undetailedFailures: number;
561
+ }
562
+ export interface BulkCreateItemsResponseNonNullableFields {
563
+ results: BulkItemResultNonNullableFields[];
564
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
565
+ }
566
+ export interface BulkDeleteItemsResponseNonNullableFields {
567
+ results: BulkItemResultNonNullableFields[];
568
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
569
+ }
570
+ export interface BulkDeleteItemsByFilterResponseNonNullableFields {
571
+ jobId: string;
572
+ }
573
+ export interface UpdateItemResponseNonNullableFields {
574
+ item?: ItemNonNullableFields;
575
+ }
576
+ export interface BulkUpdateItemsResponseNonNullableFields {
577
+ results: BulkItemResultNonNullableFields[];
578
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
579
+ }
580
+ export interface GetItemResponseNonNullableFields {
581
+ item?: ItemNonNullableFields;
582
+ }
583
+ export interface ListItemsResponseNonNullableFields {
584
+ items: ItemNonNullableFields[];
585
+ }
586
+ export interface QueryItemsResponseNonNullableFields {
587
+ items: ItemNonNullableFields[];
588
+ }
589
+ export interface CountItemsResponseNonNullableFields {
590
+ count: number;
591
+ }
592
+ export {};
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebhookIdentityType = exports.SortOrder = exports.Type = void 0;
4
+ var Type;
5
+ (function (Type) {
6
+ /** Unknown filter type. */
7
+ Type["UNKNOWN_FILTER"] = "UNKNOWN_FILTER";
8
+ /**
9
+ * Filter the list by `itemSetId` and a reference to the item.
10
+ *
11
+ * Retrieve a list of a benefit item in a specific benefit pool.
12
+ *
13
+ * The items must be referenced by their `providerAppId`.
14
+ * The `externalId` can be included for additional specificity of an item, but can only be used with its corresponding `providerAppId`.
15
+ */
16
+ Type["BY_ITEM_SET_ID_AND_REFERENCE"] = "BY_ITEM_SET_ID_AND_REFERENCE";
17
+ /**
18
+ * Filter the list by reference to the item.
19
+ *
20
+ * Retrieve a list of a benefit item in all benefit pools.
21
+ */
22
+ Type["BY_REFERENCE"] = "BY_REFERENCE";
23
+ })(Type || (exports.Type = Type = {}));
24
+ var SortOrder;
25
+ (function (SortOrder) {
26
+ SortOrder["ASC"] = "ASC";
27
+ SortOrder["DESC"] = "DESC";
28
+ })(SortOrder || (exports.SortOrder = SortOrder = {}));
29
+ var WebhookIdentityType;
30
+ (function (WebhookIdentityType) {
31
+ WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
32
+ WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
33
+ WebhookIdentityType["MEMBER"] = "MEMBER";
34
+ WebhookIdentityType["WIX_USER"] = "WIX_USER";
35
+ WebhookIdentityType["APP"] = "APP";
36
+ })(WebhookIdentityType || (exports.WebhookIdentityType = WebhookIdentityType = {}));
37
+ //# sourceMappingURL=benefit-programs-v1-item-items.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"benefit-programs-v1-item-items.types.js","sourceRoot":"","sources":["../../../../src/benefit-programs-v1-item-items.types.ts"],"names":[],"mappings":";;;AA6OA,IAAY,IAkBX;AAlBD,WAAY,IAAI;IACd,2BAA2B;IAC3B,yCAAiC,CAAA;IACjC;;;;;;;OAOG;IACH,qEAA6D,CAAA;IAC7D;;;;OAIG;IACH,qCAA6B,CAAA;AAC/B,CAAC,EAlBW,IAAI,oBAAJ,IAAI,QAkBf;AAsJD,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAqLD,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,mCAAnB,mBAAmB,QAM9B"}