@wix/auto_sdk_benefit-programs_balances 1.0.18 → 1.0.19

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-balance-balances.universal.d.ts → benefit-programs-v1-balance-balances.universal-d2IxxB3y.d.mts} +71 -178
  2. package/build/{cjs/src/benefit-programs-v1-balance-balances.universal.d.ts → benefit-programs-v1-balance-balances.universal-d2IxxB3y.d.ts} +71 -178
  3. package/build/index.d.mts +72 -0
  4. package/build/index.d.ts +72 -0
  5. package/build/index.js +576 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +541 -0
  8. package/build/index.mjs.map +1 -0
  9. package/build/{es/src/benefit-programs-v1-balance-balances.universal.d.ts → internal/benefit-programs-v1-balance-balances.universal-d2IxxB3y.d.mts} +71 -178
  10. package/build/internal/{es/src/benefit-programs-v1-balance-balances.universal.d.ts → benefit-programs-v1-balance-balances.universal-d2IxxB3y.d.ts} +71 -178
  11. package/build/internal/index.d.mts +72 -0
  12. package/build/internal/index.d.ts +72 -0
  13. package/build/internal/index.js +576 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +541 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/internal/meta.d.mts +437 -0
  18. package/build/internal/meta.d.ts +437 -0
  19. package/build/internal/meta.js +391 -0
  20. package/build/internal/meta.js.map +1 -0
  21. package/build/internal/meta.mjs +360 -0
  22. package/build/internal/meta.mjs.map +1 -0
  23. package/build/meta.d.mts +437 -0
  24. package/build/meta.d.ts +437 -0
  25. package/build/meta.js +391 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +360 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +12 -11
  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-balance-balances.context.d.ts +0 -9
  40. package/build/cjs/src/benefit-programs-v1-balance-balances.context.js +0 -19
  41. package/build/cjs/src/benefit-programs-v1-balance-balances.context.js.map +0 -1
  42. package/build/cjs/src/benefit-programs-v1-balance-balances.http.d.ts +0 -34
  43. package/build/cjs/src/benefit-programs-v1-balance-balances.http.js +0 -296
  44. package/build/cjs/src/benefit-programs-v1-balance-balances.http.js.map +0 -1
  45. package/build/cjs/src/benefit-programs-v1-balance-balances.meta.d.ts +0 -23
  46. package/build/cjs/src/benefit-programs-v1-balance-balances.meta.js +0 -123
  47. package/build/cjs/src/benefit-programs-v1-balance-balances.meta.js.map +0 -1
  48. package/build/cjs/src/benefit-programs-v1-balance-balances.public.d.ts +0 -66
  49. package/build/cjs/src/benefit-programs-v1-balance-balances.public.js +0 -44
  50. package/build/cjs/src/benefit-programs-v1-balance-balances.public.js.map +0 -1
  51. package/build/cjs/src/benefit-programs-v1-balance-balances.types.d.ts +0 -727
  52. package/build/cjs/src/benefit-programs-v1-balance-balances.types.js +0 -63
  53. package/build/cjs/src/benefit-programs-v1-balance-balances.types.js.map +0 -1
  54. package/build/cjs/src/benefit-programs-v1-balance-balances.universal.js +0 -347
  55. package/build/cjs/src/benefit-programs-v1-balance-balances.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-balance-balances.context.d.ts +0 -9
  67. package/build/es/src/benefit-programs-v1-balance-balances.context.js +0 -9
  68. package/build/es/src/benefit-programs-v1-balance-balances.context.js.map +0 -1
  69. package/build/es/src/benefit-programs-v1-balance-balances.http.d.ts +0 -34
  70. package/build/es/src/benefit-programs-v1-balance-balances.http.js +0 -288
  71. package/build/es/src/benefit-programs-v1-balance-balances.http.js.map +0 -1
  72. package/build/es/src/benefit-programs-v1-balance-balances.meta.d.ts +0 -23
  73. package/build/es/src/benefit-programs-v1-balance-balances.meta.js +0 -92
  74. package/build/es/src/benefit-programs-v1-balance-balances.meta.js.map +0 -1
  75. package/build/es/src/benefit-programs-v1-balance-balances.public.d.ts +0 -66
  76. package/build/es/src/benefit-programs-v1-balance-balances.public.js +0 -29
  77. package/build/es/src/benefit-programs-v1-balance-balances.public.js.map +0 -1
  78. package/build/es/src/benefit-programs-v1-balance-balances.types.d.ts +0 -727
  79. package/build/es/src/benefit-programs-v1-balance-balances.types.js +0 -60
  80. package/build/es/src/benefit-programs-v1-balance-balances.types.js.map +0 -1
  81. package/build/es/src/benefit-programs-v1-balance-balances.universal.js +0 -316
  82. package/build/es/src/benefit-programs-v1-balance-balances.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-balance-balances.context.d.ts +0 -9
  93. package/build/internal/cjs/src/benefit-programs-v1-balance-balances.context.js +0 -19
  94. package/build/internal/cjs/src/benefit-programs-v1-balance-balances.context.js.map +0 -1
  95. package/build/internal/cjs/src/benefit-programs-v1-balance-balances.http.d.ts +0 -34
  96. package/build/internal/cjs/src/benefit-programs-v1-balance-balances.http.js +0 -296
  97. package/build/internal/cjs/src/benefit-programs-v1-balance-balances.http.js.map +0 -1
  98. package/build/internal/cjs/src/benefit-programs-v1-balance-balances.meta.d.ts +0 -23
  99. package/build/internal/cjs/src/benefit-programs-v1-balance-balances.meta.js +0 -123
  100. package/build/internal/cjs/src/benefit-programs-v1-balance-balances.meta.js.map +0 -1
  101. package/build/internal/cjs/src/benefit-programs-v1-balance-balances.public.d.ts +0 -66
  102. package/build/internal/cjs/src/benefit-programs-v1-balance-balances.public.js +0 -44
  103. package/build/internal/cjs/src/benefit-programs-v1-balance-balances.public.js.map +0 -1
  104. package/build/internal/cjs/src/benefit-programs-v1-balance-balances.types.d.ts +0 -727
  105. package/build/internal/cjs/src/benefit-programs-v1-balance-balances.types.js +0 -63
  106. package/build/internal/cjs/src/benefit-programs-v1-balance-balances.types.js.map +0 -1
  107. package/build/internal/cjs/src/benefit-programs-v1-balance-balances.universal.js +0 -347
  108. package/build/internal/cjs/src/benefit-programs-v1-balance-balances.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-balance-balances.context.d.ts +0 -9
  119. package/build/internal/es/src/benefit-programs-v1-balance-balances.context.js +0 -9
  120. package/build/internal/es/src/benefit-programs-v1-balance-balances.context.js.map +0 -1
  121. package/build/internal/es/src/benefit-programs-v1-balance-balances.http.d.ts +0 -34
  122. package/build/internal/es/src/benefit-programs-v1-balance-balances.http.js +0 -288
  123. package/build/internal/es/src/benefit-programs-v1-balance-balances.http.js.map +0 -1
  124. package/build/internal/es/src/benefit-programs-v1-balance-balances.meta.d.ts +0 -23
  125. package/build/internal/es/src/benefit-programs-v1-balance-balances.meta.js +0 -92
  126. package/build/internal/es/src/benefit-programs-v1-balance-balances.meta.js.map +0 -1
  127. package/build/internal/es/src/benefit-programs-v1-balance-balances.public.d.ts +0 -66
  128. package/build/internal/es/src/benefit-programs-v1-balance-balances.public.js +0 -29
  129. package/build/internal/es/src/benefit-programs-v1-balance-balances.public.js.map +0 -1
  130. package/build/internal/es/src/benefit-programs-v1-balance-balances.types.d.ts +0 -727
  131. package/build/internal/es/src/benefit-programs-v1-balance-balances.types.js +0 -60
  132. package/build/internal/es/src/benefit-programs-v1-balance-balances.types.js.map +0 -1
  133. package/build/internal/es/src/benefit-programs-v1-balance-balances.universal.js +0 -316
  134. package/build/internal/es/src/benefit-programs-v1-balance-balances.universal.js.map +0 -1
@@ -1,727 +0,0 @@
1
- export interface Balance {
2
- /**
3
- * Balance ID. This is the same as the associated pool's ID.
4
- * @format GUID
5
- * @immutable
6
- * @readonly
7
- */
8
- id?: string;
9
- /**
10
- * Revision number, which increments by 1 each time the balance is updated.
11
- * To prevent conflicting changes, the current revision must be passed when updating the balance.
12
- * @readonly
13
- */
14
- revision?: string | null;
15
- /**
16
- * Date and time the balance was created.
17
- * @readonly
18
- */
19
- createdDate?: Date | null;
20
- /**
21
- * Date and time the balance was updated.
22
- * @readonly
23
- */
24
- updatedDate?: Date | null;
25
- /**
26
- * Beneficiary of the associated pool.
27
- * @readonly
28
- * @immutable
29
- */
30
- beneficiary?: CommonIdentificationData;
31
- /**
32
- * Available credits.
33
- * @readonly
34
- */
35
- amount?: BalanceAmount;
36
- /**
37
- * Associated pool information.
38
- * @readonly
39
- */
40
- poolInfo?: PoolInfo;
41
- /**
42
- * Custom field data for the balance object.
43
- * [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.
44
- */
45
- extendedFields?: ExtendedFields;
46
- /**
47
- * ID of the transaction associated with the most recent change to the balance.
48
- * @format GUID
49
- * @readonly
50
- */
51
- lastTransactionId?: string | null;
52
- }
53
- export interface CommonIdentificationData extends CommonIdentificationDataIdOneOf {
54
- /**
55
- * ID of a site visitor that hasn't logged in to the site.
56
- * @format GUID
57
- */
58
- anonymousVisitorId?: string;
59
- /**
60
- * ID of a site member.
61
- * @format GUID
62
- */
63
- memberId?: string;
64
- /**
65
- * ID of a Wix user.
66
- * @format GUID
67
- */
68
- wixUserId?: string;
69
- }
70
- /** @oneof */
71
- export interface CommonIdentificationDataIdOneOf {
72
- /**
73
- * ID of a site visitor that hasn't logged in to the site.
74
- * @format GUID
75
- */
76
- anonymousVisitorId?: string;
77
- /**
78
- * ID of a site member.
79
- * @format GUID
80
- */
81
- memberId?: string;
82
- /**
83
- * ID of a Wix user.
84
- * @format GUID
85
- */
86
- wixUserId?: string;
87
- }
88
- export declare enum IdentityType {
89
- /** Unknown type. This value is not used. */
90
- UNKNOWN = "UNKNOWN",
91
- /** A site visitor who has not logged in. */
92
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
93
- /** A logged-in site member. */
94
- MEMBER = "MEMBER",
95
- /** A Wix account holder, such as a site owner or contributor. */
96
- WIX_USER = "WIX_USER"
97
- }
98
- /** @enumType */
99
- export type IdentityTypeWithLiterals = IdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER';
100
- export interface BalanceAmount {
101
- /**
102
- * number of available credits.
103
- * @decimalValue options { maxScale:4 }
104
- * @readonly
105
- */
106
- available?: string;
107
- }
108
- export interface PoolInfo {
109
- /**
110
- * Pool ID.
111
- * @format GUID
112
- * @readonly
113
- */
114
- id?: string;
115
- /**
116
- * ID of the pool definition the pool was created from.
117
- * @format GUID
118
- * @readonly
119
- */
120
- poolDefinitionId?: string | null;
121
- /**
122
- * ID of the program definition the pool was created from.
123
- * @format GUID
124
- * @readonly
125
- */
126
- programDefinitionId?: string | null;
127
- /**
128
- * ID of the program that contains the pool.
129
- * @format GUID
130
- * @readonly
131
- */
132
- programId?: string | null;
133
- /**
134
- * Available credits.
135
- * @decimalValue options { gte:0, maxScale:4 }
136
- * @readonly
137
- */
138
- creditAmount?: string | null;
139
- /**
140
- * 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.
141
- * @minLength 1
142
- * @maxLength 50
143
- * @readonly
144
- */
145
- namespace?: string | null;
146
- }
147
- export interface ExtendedFields {
148
- /**
149
- * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
150
- * The value of each key is structured according to the schema defined when the extended fields were configured.
151
- *
152
- * You can only access fields for which you have the appropriate permissions.
153
- *
154
- * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
155
- */
156
- namespaces?: Record<string, Record<string, any>>;
157
- }
158
- export interface GetBalanceRequest {
159
- /**
160
- * ID of the pool associated with the balance to retrieve. This is also the ID of the balance.
161
- * @format GUID
162
- */
163
- poolId: string;
164
- }
165
- export interface GetBalanceResponse {
166
- /** Retrieved balance. */
167
- balance?: Balance;
168
- }
169
- export interface ListBalancesRequest {
170
- /**
171
- * List of IDs of the pools associated with the balances to retrieve. These are also the IDs of the balances.
172
- * @format GUID
173
- * @maxSize 100
174
- */
175
- poolIds?: string[];
176
- /** Cursor paging. */
177
- cursorPaging?: CursorPaging;
178
- }
179
- export interface CursorPaging {
180
- /**
181
- * Maximum number of items to return.
182
- * @max 100
183
- */
184
- limit?: number | null;
185
- /**
186
- * Pointer to the next or previous page in the list of results.
187
- *
188
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
189
- * Not relevant for the first request.
190
- * @maxLength 16000
191
- */
192
- cursor?: string | null;
193
- }
194
- export interface ListBalancesResponse {
195
- /**
196
- * Retrieved balances.
197
- * @maxSize 100
198
- */
199
- balances?: Balance[];
200
- /** Metadata for paginated results. */
201
- metadata?: CursorPagingMetadata;
202
- }
203
- export interface CursorPagingMetadata {
204
- /** Number of items returned in the response. */
205
- count?: number | null;
206
- /** Cursor strings that point to the next page, previous page, or both. */
207
- cursors?: Cursors;
208
- /**
209
- * Whether there are more pages to retrieve following the current page.
210
- *
211
- * + `true`: Another page of results can be retrieved.
212
- * + `false`: This is the last page.
213
- */
214
- hasNext?: boolean | null;
215
- }
216
- export interface Cursors {
217
- /**
218
- * Cursor string pointing to the next page in the list of results.
219
- * @maxLength 16000
220
- */
221
- next?: string | null;
222
- /**
223
- * Cursor pointing to the previous page in the list of results.
224
- * @maxLength 16000
225
- */
226
- prev?: string | null;
227
- }
228
- export interface QueryBalancesRequest {
229
- /** Filter, sort, and paging to apply to the query. */
230
- query?: CursorQuery;
231
- }
232
- export interface CursorQuery extends CursorQueryPagingMethodOneOf {
233
- /** 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`. */
234
- cursorPaging?: CursorPaging;
235
- /**
236
- * Filter object.
237
- * See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)
238
- * for more information.
239
- */
240
- filter?: Record<string, any> | null;
241
- /**
242
- * List of sort objects.
243
- * @maxSize 5
244
- */
245
- sort?: Sorting[];
246
- }
247
- /** @oneof */
248
- export interface CursorQueryPagingMethodOneOf {
249
- /** 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`. */
250
- cursorPaging?: CursorPaging;
251
- }
252
- export interface Sorting {
253
- /**
254
- * Field to sort by.
255
- * @maxLength 512
256
- */
257
- fieldName?: string;
258
- /**
259
- * Sort order. Use `ASC` for ascending order or `DESC` for descending order.
260
- *
261
- * Default: `ASC`
262
- */
263
- order?: SortOrderWithLiterals;
264
- }
265
- export declare enum SortOrder {
266
- /** Ascending sort order. */
267
- ASC = "ASC",
268
- /** Descending sort order. */
269
- DESC = "DESC"
270
- }
271
- /** @enumType */
272
- export type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
273
- export interface QueryBalancesResponse {
274
- /** List of retrieved balances. */
275
- balances?: Balance[];
276
- /** Metadata for the paginated results. */
277
- metadata?: CursorPagingMetadata;
278
- }
279
- export interface BalanceChangeBalanceRequest extends BalanceChangeBalanceRequestOperationOneOf {
280
- /** Adjust the balance by a specific number of credits. */
281
- adjustOptions?: AdjustOptions;
282
- /** Set the balance to a specific number of credits. */
283
- setOptions?: SetOptions;
284
- /**
285
- * ID of the pool associated with the balance to change. This is also the ID of the balance.
286
- * @format GUID
287
- */
288
- poolId: string;
289
- /**
290
- * Unique identifier, generated by the client.
291
- * Used to recognize repeated attempts to make the same request.
292
- * @maxLength 200
293
- */
294
- idempotencyKey: string;
295
- /** Identity changing the balance. */
296
- instructingParty?: CommonIdentificationData;
297
- /** Balance change type. */
298
- type?: ChangeBalanceRequestTypeWithLiterals;
299
- /** Details to send to the transaction created from this balance change. */
300
- transactionDetails?: TransactionDetails;
301
- }
302
- /** @oneof */
303
- export interface BalanceChangeBalanceRequestOperationOneOf {
304
- /** Adjust the balance by a specific number of credits. */
305
- adjustOptions?: AdjustOptions;
306
- /** Set the balance to a specific number of credits. */
307
- setOptions?: SetOptions;
308
- }
309
- export declare enum ChangeBalanceRequestType {
310
- /** Unknown balance change type. */
311
- UNKNOWN_OPERATION = "UNKNOWN_OPERATION",
312
- /** Use with `adjustOptions`. */
313
- ADJUST = "ADJUST",
314
- /** Use with `setOptions`. */
315
- SET = "SET"
316
- }
317
- /** @enumType */
318
- export type ChangeBalanceRequestTypeWithLiterals = ChangeBalanceRequestType | 'UNKNOWN_OPERATION' | 'ADJUST' | 'SET';
319
- export interface AdjustOptions {
320
- /**
321
- * Amount to change the balance's available credits by.
322
- * - To increase the balance, specify a positive number.
323
- * - To decrease the balance, specify a negative number.
324
- * @decimalValue options { maxScale:4 }
325
- */
326
- value?: string;
327
- /** Beneficiary of the associated pool. */
328
- beneficiary?: CommonIdentificationData;
329
- }
330
- export declare enum LimitRule {
331
- /** Unknown limit rule */
332
- UNKNOWN_LIMIT_RULE = "UNKNOWN_LIMIT_RULE",
333
- /** If the limit is exceeded, the operation will fail */
334
- FAIL = "FAIL",
335
- /** If the limit is exceeded, the operation will succeed but the balance never goes beyond the provided limits. For balance that was already outside of provided limits, it will not be changed. */
336
- SOFT_ENFORCE = "SOFT_ENFORCE",
337
- /** If the limit is exceeded, the operation will succeed but the balance will be adjusted so that it satisfies the provided limits. If the resulting balance is below the lower_limit, it will be set to the lower_limit. If the resulting balance is above the upper_limit, it will be set to the upper_limit. */
338
- HARD_ENFORCE = "HARD_ENFORCE"
339
- }
340
- /** @enumType */
341
- export type LimitRuleWithLiterals = LimitRule | 'UNKNOWN_LIMIT_RULE' | 'FAIL' | 'SOFT_ENFORCE' | 'HARD_ENFORCE';
342
- export interface SetOptions {
343
- /**
344
- * Amount to set the balance's available credits to.
345
- *
346
- * If this is the same as the current value, no transaction is created.
347
- * @decimalValue options { maxScale:4 }
348
- */
349
- value?: string;
350
- /** Beneficiary of the associated pool. */
351
- beneficiary?: CommonIdentificationData;
352
- }
353
- export interface SetInitialOptions {
354
- /**
355
- * Set the available balance to the provided amount.
356
- * @decimalValue options { maxScale:4 }
357
- */
358
- value?: string;
359
- /** Benefit pool owner associated with this balance. */
360
- beneficiary?: CommonIdentificationData;
361
- }
362
- export interface TransactionDetails {
363
- /**
364
- * Item associated with the transaction.
365
- * @readonly
366
- */
367
- item?: Item;
368
- /** Amount of items associated with the transaction. */
369
- itemCount?: number | null;
370
- /**
371
- * Date and time the transaction was created.
372
- * @readonly
373
- */
374
- effectiveDate?: Date | null;
375
- /**
376
- * Reason for the transaction. For example, `Redemption`.
377
- * @readonly
378
- * @maxLength 256
379
- */
380
- reason?: string | null;
381
- }
382
- export interface Item {
383
- /**
384
- * Item ID.
385
- * @format GUID
386
- * @readonly
387
- */
388
- id?: string | null;
389
- /**
390
- * Item external ID.
391
- * @format GUID
392
- * @readonly
393
- */
394
- externalId?: string | null;
395
- /**
396
- * Item category.
397
- * @maxLength 20
398
- * @readonly
399
- */
400
- category?: string | null;
401
- /**
402
- * Item set ID.
403
- * @format GUID
404
- * @readonly
405
- */
406
- itemSetId?: string | null;
407
- /**
408
- * Item name.
409
- * @maxLength 64
410
- * @readonly
411
- */
412
- displayName?: string | null;
413
- }
414
- export interface ChangeBalanceResponse {
415
- /** Updated balance. */
416
- balance?: Balance;
417
- /**
418
- * ID of the transaction associated with this change in balance.
419
- * @format GUID
420
- */
421
- transactionId?: string | null;
422
- }
423
- export interface BalanceExceededLimits {
424
- /** Current balance */
425
- balance?: BalanceAmount;
426
- /**
427
- * The requested amount
428
- * @decimalValue options { maxScale:4 }
429
- * @readonly
430
- */
431
- requested?: string;
432
- /**
433
- * Lower limit
434
- * @decimalValue options { maxScale:4 }
435
- * @readonly
436
- */
437
- lowerLimit?: string | null;
438
- /**
439
- * Upper limit
440
- * @decimalValue options { maxScale:4 }
441
- * @readonly
442
- */
443
- upperLimit?: string | null;
444
- }
445
- export interface BulkChangeBalancesRequest {
446
- /**
447
- * List of balances to change.
448
- * @minSize 1
449
- * @maxSize 100
450
- */
451
- requests?: ChangeBalanceRequest[];
452
- /**
453
- * Unique identifier, generated by the client.
454
- * Used to recognize repeated attempts to make the same request.
455
- * @maxLength 200
456
- */
457
- idempotencyKey?: string;
458
- /** Whether to return the full balance entities in the response. */
459
- returnEntity?: boolean;
460
- }
461
- export declare enum Type {
462
- /** Unknown balance change type. */
463
- UNKNOWN_OPERATION = "UNKNOWN_OPERATION"
464
- }
465
- /** @enumType */
466
- export type TypeWithLiterals = Type | 'UNKNOWN_OPERATION';
467
- export interface ChangeBalanceRequest extends ChangeBalanceRequestOperationOneOf {
468
- /**
469
- * ID of the pool associated with the balance to change. This is also the ID of the balance.
470
- * @format GUID
471
- */
472
- poolId?: string;
473
- /** Identity changing the balance. */
474
- instructingParty?: CommonIdentificationData;
475
- /** Balance change type. */
476
- type?: TypeWithLiterals;
477
- /** Details to send to the transaction created from this balance change. */
478
- transactionDetails?: TransactionDetails;
479
- }
480
- /** @oneof */
481
- export interface ChangeBalanceRequestOperationOneOf {
482
- }
483
- export interface BulkChangeBalancesResponse {
484
- /**
485
- * Updated item and associated metadata.
486
- * @minSize 1
487
- * @maxSize 100
488
- */
489
- results?: BulkChangeBalanceResult[];
490
- /** Metadata. */
491
- bulkActionMetadata?: BulkActionMetadata;
492
- }
493
- export interface ItemMetadata {
494
- /**
495
- * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
496
- * @format GUID
497
- */
498
- id?: string | null;
499
- /** Index of the item within the request array. Allows for correlation between request and response items. */
500
- originalIndex?: number;
501
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
502
- success?: boolean;
503
- /** Details about the error in case of failure. */
504
- error?: ApplicationError;
505
- }
506
- export interface ApplicationError {
507
- /** Error code. */
508
- code?: string;
509
- /** Description of the error. */
510
- description?: string;
511
- /** Data related to the error. */
512
- data?: Record<string, any> | null;
513
- }
514
- export interface BulkChangeBalanceResult {
515
- /** Item metadata. */
516
- itemMetadata?: ItemMetadata;
517
- /** Updated item. */
518
- balance?: Balance;
519
- }
520
- export interface BulkActionMetadata {
521
- /** Number of items that were successfully processed. */
522
- totalSuccesses?: number;
523
- /** Number of items that couldn't be processed. */
524
- totalFailures?: number;
525
- /** Number of failures without details because detailed failure threshold was exceeded. */
526
- undetailedFailures?: number;
527
- }
528
- export interface RevertBalanceChangeRequest {
529
- /**
530
- * ID of the transaction associated with the balance change to revert.
531
- * @format GUID
532
- */
533
- transactionId: string;
534
- /**
535
- * Unique identifier, generated by the client.
536
- * Used to recognize repeated attempts to make the same request.
537
- * @maxLength 200
538
- */
539
- idempotencyKey: string;
540
- /** Identity reverting the balance change. */
541
- instructingParty?: CommonIdentificationData;
542
- }
543
- export interface RevertBalanceChangeResponse {
544
- /**
545
- * ID of the transaction associated with the balance reversion.
546
- * @format GUID
547
- */
548
- transactionId?: string | null;
549
- }
550
- export interface ChangeAlreadyReverted {
551
- /**
552
- * The id of the transaction which was already reverted
553
- * @format GUID
554
- */
555
- originalTransactionId?: string;
556
- /**
557
- * The id of the transaction which reverted the original transaction
558
- * @format GUID
559
- */
560
- revertedTransactionId?: string;
561
- }
562
- export interface NotEnoughBalance {
563
- /** Current balance */
564
- balance?: BalanceAmount;
565
- /**
566
- * The requested amount
567
- * @decimalValue options { maxScale:4 }
568
- * @readonly
569
- */
570
- requested?: string;
571
- }
572
- export interface GetTransactionReversibilityRequest {
573
- /**
574
- * Id of the transaction to get the reversibility
575
- * @format GUID
576
- */
577
- transactionId?: string;
578
- }
579
- export interface GetTransactionReversibilityResponse {
580
- /** The result of transaction reversibility validation */
581
- transactionReversibility?: TransactionReversibilityWithLiterals;
582
- }
583
- /** Transaction reversibility results */
584
- export declare enum TransactionReversibility {
585
- /** Transaction is allowed to be reverted */
586
- TRANSACTION_IS_REVERSIBLE = "TRANSACTION_IS_REVERSIBLE",
587
- /** Transaction isn't allowed to be reverted, because it was already reverted */
588
- TRANSACTION_ALREADY_REVERSED = "TRANSACTION_ALREADY_REVERSED"
589
- }
590
- /** @enumType */
591
- export type TransactionReversibilityWithLiterals = TransactionReversibility | 'TRANSACTION_IS_REVERSIBLE' | 'TRANSACTION_ALREADY_REVERSED';
592
- export interface DomainEvent extends DomainEventBodyOneOf {
593
- createdEvent?: EntityCreatedEvent;
594
- updatedEvent?: EntityUpdatedEvent;
595
- deletedEvent?: EntityDeletedEvent;
596
- actionEvent?: ActionEvent;
597
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
598
- id?: string;
599
- /**
600
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
601
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
602
- */
603
- entityFqdn?: string;
604
- /**
605
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
606
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
607
- */
608
- slug?: string;
609
- /** ID of the entity associated with the event. */
610
- entityId?: string;
611
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
612
- eventTime?: Date | null;
613
- /**
614
- * Whether the event was triggered as a result of a privacy regulation application
615
- * (for example, GDPR).
616
- */
617
- triggeredByAnonymizeRequest?: boolean | null;
618
- /** If present, indicates the action that triggered the event. */
619
- originatedFrom?: string | null;
620
- /**
621
- * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
622
- * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
623
- */
624
- entityEventSequence?: string | null;
625
- }
626
- /** @oneof */
627
- export interface DomainEventBodyOneOf {
628
- createdEvent?: EntityCreatedEvent;
629
- updatedEvent?: EntityUpdatedEvent;
630
- deletedEvent?: EntityDeletedEvent;
631
- actionEvent?: ActionEvent;
632
- }
633
- export interface EntityCreatedEvent {
634
- entityAsJson?: string;
635
- /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
636
- restoreInfo?: RestoreInfo;
637
- }
638
- export interface RestoreInfo {
639
- deletedDate?: Date | null;
640
- }
641
- export interface EntityUpdatedEvent {
642
- /**
643
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
644
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
645
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
646
- */
647
- currentEntityAsJson?: string;
648
- }
649
- export interface EntityDeletedEvent {
650
- /** Entity that was deleted. */
651
- deletedEntityAsJson?: string | null;
652
- }
653
- export interface ActionEvent {
654
- bodyAsJson?: string;
655
- }
656
- export interface MessageEnvelope {
657
- /**
658
- * App instance ID.
659
- * @format GUID
660
- */
661
- instanceId?: string | null;
662
- /**
663
- * Event type.
664
- * @maxLength 150
665
- */
666
- eventType?: string;
667
- /** The identification type and identity data. */
668
- identity?: IdentificationData;
669
- /** Stringify payload. */
670
- data?: string;
671
- }
672
- export interface IdentificationData extends IdentificationDataIdOneOf {
673
- /**
674
- * ID of a site visitor that has not logged in to the site.
675
- * @format GUID
676
- */
677
- anonymousVisitorId?: string;
678
- /**
679
- * ID of a site visitor that has logged in to the site.
680
- * @format GUID
681
- */
682
- memberId?: string;
683
- /**
684
- * ID of a Wix user (site owner, contributor, etc.).
685
- * @format GUID
686
- */
687
- wixUserId?: string;
688
- /**
689
- * ID of an app.
690
- * @format GUID
691
- */
692
- appId?: string;
693
- /** @readonly */
694
- identityType?: WebhookIdentityTypeWithLiterals;
695
- }
696
- /** @oneof */
697
- export interface IdentificationDataIdOneOf {
698
- /**
699
- * ID of a site visitor that has not logged in to the site.
700
- * @format GUID
701
- */
702
- anonymousVisitorId?: string;
703
- /**
704
- * ID of a site visitor that has logged in to the site.
705
- * @format GUID
706
- */
707
- memberId?: string;
708
- /**
709
- * ID of a Wix user (site owner, contributor, etc.).
710
- * @format GUID
711
- */
712
- wixUserId?: string;
713
- /**
714
- * ID of an app.
715
- * @format GUID
716
- */
717
- appId?: string;
718
- }
719
- export declare enum WebhookIdentityType {
720
- UNKNOWN = "UNKNOWN",
721
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
722
- MEMBER = "MEMBER",
723
- WIX_USER = "WIX_USER",
724
- APP = "APP"
725
- }
726
- /** @enumType */
727
- export type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';