@wix/auto_sdk_benefit-programs_balances 1.0.7 → 1.0.9

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