@wix/auto_sdk_benefit-programs_balances 1.0.18 → 1.0.20
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.
- package/build/{internal/cjs/src/benefit-programs-v1-balance-balances.universal.d.ts → benefit-programs-v1-balance-balances.universal-1JyWolBK.d.mts} +72 -179
- package/build/{cjs/src/benefit-programs-v1-balance-balances.universal.d.ts → benefit-programs-v1-balance-balances.universal-1JyWolBK.d.ts} +72 -179
- package/build/index.d.mts +72 -0
- package/build/index.d.ts +72 -0
- package/build/index.js +576 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +541 -0
- package/build/index.mjs.map +1 -0
- package/build/{es/src/benefit-programs-v1-balance-balances.universal.d.ts → internal/benefit-programs-v1-balance-balances.universal-1JyWolBK.d.mts} +72 -179
- package/build/internal/{es/src/benefit-programs-v1-balance-balances.universal.d.ts → benefit-programs-v1-balance-balances.universal-1JyWolBK.d.ts} +72 -179
- package/build/internal/index.d.mts +72 -0
- package/build/internal/index.d.ts +72 -0
- package/build/internal/index.js +576 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +541 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/internal/meta.d.mts +437 -0
- package/build/internal/meta.d.ts +437 -0
- package/build/internal/meta.js +391 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +360 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/meta.d.mts +437 -0
- package/build/meta.d.ts +437 -0
- package/build/meta.js +391 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +360 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +12 -11
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/benefit-programs-v1-balance-balances.context.d.ts +0 -9
- package/build/cjs/src/benefit-programs-v1-balance-balances.context.js +0 -19
- package/build/cjs/src/benefit-programs-v1-balance-balances.context.js.map +0 -1
- package/build/cjs/src/benefit-programs-v1-balance-balances.http.d.ts +0 -34
- package/build/cjs/src/benefit-programs-v1-balance-balances.http.js +0 -296
- package/build/cjs/src/benefit-programs-v1-balance-balances.http.js.map +0 -1
- package/build/cjs/src/benefit-programs-v1-balance-balances.meta.d.ts +0 -23
- package/build/cjs/src/benefit-programs-v1-balance-balances.meta.js +0 -123
- package/build/cjs/src/benefit-programs-v1-balance-balances.meta.js.map +0 -1
- package/build/cjs/src/benefit-programs-v1-balance-balances.public.d.ts +0 -66
- package/build/cjs/src/benefit-programs-v1-balance-balances.public.js +0 -44
- package/build/cjs/src/benefit-programs-v1-balance-balances.public.js.map +0 -1
- package/build/cjs/src/benefit-programs-v1-balance-balances.types.d.ts +0 -727
- package/build/cjs/src/benefit-programs-v1-balance-balances.types.js +0 -63
- package/build/cjs/src/benefit-programs-v1-balance-balances.types.js.map +0 -1
- package/build/cjs/src/benefit-programs-v1-balance-balances.universal.js +0 -347
- package/build/cjs/src/benefit-programs-v1-balance-balances.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/package.json +0 -3
- package/build/es/src/benefit-programs-v1-balance-balances.context.d.ts +0 -9
- package/build/es/src/benefit-programs-v1-balance-balances.context.js +0 -9
- package/build/es/src/benefit-programs-v1-balance-balances.context.js.map +0 -1
- package/build/es/src/benefit-programs-v1-balance-balances.http.d.ts +0 -34
- package/build/es/src/benefit-programs-v1-balance-balances.http.js +0 -288
- package/build/es/src/benefit-programs-v1-balance-balances.http.js.map +0 -1
- package/build/es/src/benefit-programs-v1-balance-balances.meta.d.ts +0 -23
- package/build/es/src/benefit-programs-v1-balance-balances.meta.js +0 -92
- package/build/es/src/benefit-programs-v1-balance-balances.meta.js.map +0 -1
- package/build/es/src/benefit-programs-v1-balance-balances.public.d.ts +0 -66
- package/build/es/src/benefit-programs-v1-balance-balances.public.js +0 -29
- package/build/es/src/benefit-programs-v1-balance-balances.public.js.map +0 -1
- package/build/es/src/benefit-programs-v1-balance-balances.types.d.ts +0 -727
- package/build/es/src/benefit-programs-v1-balance-balances.types.js +0 -60
- package/build/es/src/benefit-programs-v1-balance-balances.types.js.map +0 -1
- package/build/es/src/benefit-programs-v1-balance-balances.universal.js +0 -316
- package/build/es/src/benefit-programs-v1-balance-balances.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.context.d.ts +0 -9
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.context.js +0 -19
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.context.js.map +0 -1
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.http.d.ts +0 -34
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.http.js +0 -296
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.http.js.map +0 -1
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.meta.d.ts +0 -23
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.meta.js +0 -123
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.meta.js.map +0 -1
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.public.d.ts +0 -66
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.public.js +0 -44
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.public.js.map +0 -1
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.types.d.ts +0 -727
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.types.js +0 -63
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.types.js.map +0 -1
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.universal.js +0 -347
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/benefit-programs-v1-balance-balances.context.d.ts +0 -9
- package/build/internal/es/src/benefit-programs-v1-balance-balances.context.js +0 -9
- package/build/internal/es/src/benefit-programs-v1-balance-balances.context.js.map +0 -1
- package/build/internal/es/src/benefit-programs-v1-balance-balances.http.d.ts +0 -34
- package/build/internal/es/src/benefit-programs-v1-balance-balances.http.js +0 -288
- package/build/internal/es/src/benefit-programs-v1-balance-balances.http.js.map +0 -1
- package/build/internal/es/src/benefit-programs-v1-balance-balances.meta.d.ts +0 -23
- package/build/internal/es/src/benefit-programs-v1-balance-balances.meta.js +0 -92
- package/build/internal/es/src/benefit-programs-v1-balance-balances.meta.js.map +0 -1
- package/build/internal/es/src/benefit-programs-v1-balance-balances.public.d.ts +0 -66
- package/build/internal/es/src/benefit-programs-v1-balance-balances.public.js +0 -29
- package/build/internal/es/src/benefit-programs-v1-balance-balances.public.js.map +0 -1
- package/build/internal/es/src/benefit-programs-v1-balance-balances.types.d.ts +0 -727
- package/build/internal/es/src/benefit-programs-v1-balance-balances.types.js +0 -60
- package/build/internal/es/src/benefit-programs-v1-balance-balances.types.js.map +0 -1
- package/build/internal/es/src/benefit-programs-v1-balance-balances.universal.js +0 -316
- package/build/internal/es/src/benefit-programs-v1-balance-balances.universal.js.map +0 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export interface Balance {
|
|
1
|
+
interface Balance {
|
|
3
2
|
/**
|
|
4
3
|
* Balance ID. This is the same as the associated pool's ID.
|
|
5
4
|
* @format GUID
|
|
@@ -51,7 +50,7 @@ export interface Balance {
|
|
|
51
50
|
*/
|
|
52
51
|
lastTransactionId?: string | null;
|
|
53
52
|
}
|
|
54
|
-
|
|
53
|
+
interface CommonIdentificationData extends CommonIdentificationDataIdOneOf {
|
|
55
54
|
/**
|
|
56
55
|
* ID of a site visitor that hasn't logged in to the site.
|
|
57
56
|
* @format GUID
|
|
@@ -69,7 +68,7 @@ export interface CommonIdentificationData extends CommonIdentificationDataIdOneO
|
|
|
69
68
|
wixUserId?: string;
|
|
70
69
|
}
|
|
71
70
|
/** @oneof */
|
|
72
|
-
|
|
71
|
+
interface CommonIdentificationDataIdOneOf {
|
|
73
72
|
/**
|
|
74
73
|
* ID of a site visitor that hasn't logged in to the site.
|
|
75
74
|
* @format GUID
|
|
@@ -86,7 +85,7 @@ export interface CommonIdentificationDataIdOneOf {
|
|
|
86
85
|
*/
|
|
87
86
|
wixUserId?: string;
|
|
88
87
|
}
|
|
89
|
-
|
|
88
|
+
declare enum IdentityType {
|
|
90
89
|
/** Unknown type. This value is not used. */
|
|
91
90
|
UNKNOWN = "UNKNOWN",
|
|
92
91
|
/** A site visitor who has not logged in. */
|
|
@@ -96,9 +95,7 @@ export declare enum IdentityType {
|
|
|
96
95
|
/** A Wix account holder, such as a site owner or contributor. */
|
|
97
96
|
WIX_USER = "WIX_USER"
|
|
98
97
|
}
|
|
99
|
-
|
|
100
|
-
export type IdentityTypeWithLiterals = IdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER';
|
|
101
|
-
export interface BalanceAmount {
|
|
98
|
+
interface BalanceAmount {
|
|
102
99
|
/**
|
|
103
100
|
* number of available credits.
|
|
104
101
|
* @decimalValue options { maxScale:4 }
|
|
@@ -106,7 +103,7 @@ export interface BalanceAmount {
|
|
|
106
103
|
*/
|
|
107
104
|
available?: string;
|
|
108
105
|
}
|
|
109
|
-
|
|
106
|
+
interface PoolInfo {
|
|
110
107
|
/**
|
|
111
108
|
* Pool ID.
|
|
112
109
|
* @format GUID
|
|
@@ -140,12 +137,12 @@ export interface PoolInfo {
|
|
|
140
137
|
/**
|
|
141
138
|
* 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.
|
|
142
139
|
* @minLength 1
|
|
143
|
-
* @maxLength
|
|
140
|
+
* @maxLength 20
|
|
144
141
|
* @readonly
|
|
145
142
|
*/
|
|
146
143
|
namespace?: string | null;
|
|
147
144
|
}
|
|
148
|
-
|
|
145
|
+
interface ExtendedFields {
|
|
149
146
|
/**
|
|
150
147
|
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
151
148
|
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
@@ -156,18 +153,18 @@ export interface ExtendedFields {
|
|
|
156
153
|
*/
|
|
157
154
|
namespaces?: Record<string, Record<string, any>>;
|
|
158
155
|
}
|
|
159
|
-
|
|
156
|
+
interface GetBalanceRequest {
|
|
160
157
|
/**
|
|
161
158
|
* ID of the pool associated with the balance to retrieve. This is also the ID of the balance.
|
|
162
159
|
* @format GUID
|
|
163
160
|
*/
|
|
164
161
|
poolId: string;
|
|
165
162
|
}
|
|
166
|
-
|
|
163
|
+
interface GetBalanceResponse {
|
|
167
164
|
/** Retrieved balance. */
|
|
168
165
|
balance?: Balance;
|
|
169
166
|
}
|
|
170
|
-
|
|
167
|
+
interface ListBalancesRequest {
|
|
171
168
|
/**
|
|
172
169
|
* List of IDs of the pools associated with the balances to retrieve. These are also the IDs of the balances.
|
|
173
170
|
* @format GUID
|
|
@@ -177,7 +174,7 @@ export interface ListBalancesRequest {
|
|
|
177
174
|
/** Cursor paging. */
|
|
178
175
|
cursorPaging?: CursorPaging;
|
|
179
176
|
}
|
|
180
|
-
|
|
177
|
+
interface CursorPaging {
|
|
181
178
|
/**
|
|
182
179
|
* Maximum number of items to return.
|
|
183
180
|
* @max 100
|
|
@@ -192,7 +189,7 @@ export interface CursorPaging {
|
|
|
192
189
|
*/
|
|
193
190
|
cursor?: string | null;
|
|
194
191
|
}
|
|
195
|
-
|
|
192
|
+
interface ListBalancesResponse {
|
|
196
193
|
/**
|
|
197
194
|
* Retrieved balances.
|
|
198
195
|
* @maxSize 100
|
|
@@ -201,7 +198,7 @@ export interface ListBalancesResponse {
|
|
|
201
198
|
/** Metadata for paginated results. */
|
|
202
199
|
metadata?: CursorPagingMetadata;
|
|
203
200
|
}
|
|
204
|
-
|
|
201
|
+
interface CursorPagingMetadata {
|
|
205
202
|
/** Number of items returned in the response. */
|
|
206
203
|
count?: number | null;
|
|
207
204
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
@@ -214,7 +211,7 @@ export interface CursorPagingMetadata {
|
|
|
214
211
|
*/
|
|
215
212
|
hasNext?: boolean | null;
|
|
216
213
|
}
|
|
217
|
-
|
|
214
|
+
interface Cursors {
|
|
218
215
|
/**
|
|
219
216
|
* Cursor string pointing to the next page in the list of results.
|
|
220
217
|
* @maxLength 16000
|
|
@@ -226,11 +223,11 @@ export interface Cursors {
|
|
|
226
223
|
*/
|
|
227
224
|
prev?: string | null;
|
|
228
225
|
}
|
|
229
|
-
|
|
226
|
+
interface QueryBalancesRequest {
|
|
230
227
|
/** Filter, sort, and paging to apply to the query. */
|
|
231
228
|
query?: CursorQuery;
|
|
232
229
|
}
|
|
233
|
-
|
|
230
|
+
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
234
231
|
/** 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`. */
|
|
235
232
|
cursorPaging?: CursorPaging;
|
|
236
233
|
/**
|
|
@@ -246,11 +243,11 @@ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
|
246
243
|
sort?: Sorting[];
|
|
247
244
|
}
|
|
248
245
|
/** @oneof */
|
|
249
|
-
|
|
246
|
+
interface CursorQueryPagingMethodOneOf {
|
|
250
247
|
/** 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`. */
|
|
251
248
|
cursorPaging?: CursorPaging;
|
|
252
249
|
}
|
|
253
|
-
|
|
250
|
+
interface Sorting {
|
|
254
251
|
/**
|
|
255
252
|
* Field to sort by.
|
|
256
253
|
* @maxLength 512
|
|
@@ -263,21 +260,21 @@ export interface Sorting {
|
|
|
263
260
|
*/
|
|
264
261
|
order?: SortOrderWithLiterals;
|
|
265
262
|
}
|
|
266
|
-
|
|
263
|
+
declare enum SortOrder {
|
|
267
264
|
/** Ascending sort order. */
|
|
268
265
|
ASC = "ASC",
|
|
269
266
|
/** Descending sort order. */
|
|
270
267
|
DESC = "DESC"
|
|
271
268
|
}
|
|
272
269
|
/** @enumType */
|
|
273
|
-
|
|
274
|
-
|
|
270
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
271
|
+
interface QueryBalancesResponse {
|
|
275
272
|
/** List of retrieved balances. */
|
|
276
273
|
balances?: Balance[];
|
|
277
274
|
/** Metadata for the paginated results. */
|
|
278
275
|
metadata?: CursorPagingMetadata;
|
|
279
276
|
}
|
|
280
|
-
|
|
277
|
+
interface BalanceChangeBalanceRequest extends BalanceChangeBalanceRequestOperationOneOf {
|
|
281
278
|
/** Adjust the balance by a specific number of credits. */
|
|
282
279
|
adjustOptions?: AdjustOptions;
|
|
283
280
|
/** Set the balance to a specific number of credits. */
|
|
@@ -301,13 +298,13 @@ export interface BalanceChangeBalanceRequest extends BalanceChangeBalanceRequest
|
|
|
301
298
|
transactionDetails?: TransactionDetails;
|
|
302
299
|
}
|
|
303
300
|
/** @oneof */
|
|
304
|
-
|
|
301
|
+
interface BalanceChangeBalanceRequestOperationOneOf {
|
|
305
302
|
/** Adjust the balance by a specific number of credits. */
|
|
306
303
|
adjustOptions?: AdjustOptions;
|
|
307
304
|
/** Set the balance to a specific number of credits. */
|
|
308
305
|
setOptions?: SetOptions;
|
|
309
306
|
}
|
|
310
|
-
|
|
307
|
+
declare enum ChangeBalanceRequestType {
|
|
311
308
|
/** Unknown balance change type. */
|
|
312
309
|
UNKNOWN_OPERATION = "UNKNOWN_OPERATION",
|
|
313
310
|
/** Use with `adjustOptions`. */
|
|
@@ -316,8 +313,8 @@ export declare enum ChangeBalanceRequestType {
|
|
|
316
313
|
SET = "SET"
|
|
317
314
|
}
|
|
318
315
|
/** @enumType */
|
|
319
|
-
|
|
320
|
-
|
|
316
|
+
type ChangeBalanceRequestTypeWithLiterals = ChangeBalanceRequestType | 'UNKNOWN_OPERATION' | 'ADJUST' | 'SET';
|
|
317
|
+
interface AdjustOptions {
|
|
321
318
|
/**
|
|
322
319
|
* Amount to change the balance's available credits by.
|
|
323
320
|
* - To increase the balance, specify a positive number.
|
|
@@ -328,7 +325,7 @@ export interface AdjustOptions {
|
|
|
328
325
|
/** Beneficiary of the associated pool. */
|
|
329
326
|
beneficiary?: CommonIdentificationData;
|
|
330
327
|
}
|
|
331
|
-
|
|
328
|
+
declare enum LimitRule {
|
|
332
329
|
/** Unknown limit rule */
|
|
333
330
|
UNKNOWN_LIMIT_RULE = "UNKNOWN_LIMIT_RULE",
|
|
334
331
|
/** If the limit is exceeded, the operation will fail */
|
|
@@ -338,9 +335,7 @@ export declare enum LimitRule {
|
|
|
338
335
|
/** 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. */
|
|
339
336
|
HARD_ENFORCE = "HARD_ENFORCE"
|
|
340
337
|
}
|
|
341
|
-
|
|
342
|
-
export type LimitRuleWithLiterals = LimitRule | 'UNKNOWN_LIMIT_RULE' | 'FAIL' | 'SOFT_ENFORCE' | 'HARD_ENFORCE';
|
|
343
|
-
export interface SetOptions {
|
|
338
|
+
interface SetOptions {
|
|
344
339
|
/**
|
|
345
340
|
* Amount to set the balance's available credits to.
|
|
346
341
|
*
|
|
@@ -351,7 +346,7 @@ export interface SetOptions {
|
|
|
351
346
|
/** Beneficiary of the associated pool. */
|
|
352
347
|
beneficiary?: CommonIdentificationData;
|
|
353
348
|
}
|
|
354
|
-
|
|
349
|
+
interface SetInitialOptions {
|
|
355
350
|
/**
|
|
356
351
|
* Set the available balance to the provided amount.
|
|
357
352
|
* @decimalValue options { maxScale:4 }
|
|
@@ -360,7 +355,7 @@ export interface SetInitialOptions {
|
|
|
360
355
|
/** Benefit pool owner associated with this balance. */
|
|
361
356
|
beneficiary?: CommonIdentificationData;
|
|
362
357
|
}
|
|
363
|
-
|
|
358
|
+
interface TransactionDetails {
|
|
364
359
|
/**
|
|
365
360
|
* Item associated with the transaction.
|
|
366
361
|
* @readonly
|
|
@@ -380,7 +375,7 @@ export interface TransactionDetails {
|
|
|
380
375
|
*/
|
|
381
376
|
reason?: string | null;
|
|
382
377
|
}
|
|
383
|
-
|
|
378
|
+
interface Item {
|
|
384
379
|
/**
|
|
385
380
|
* Item ID.
|
|
386
381
|
* @format GUID
|
|
@@ -412,7 +407,7 @@ export interface Item {
|
|
|
412
407
|
*/
|
|
413
408
|
displayName?: string | null;
|
|
414
409
|
}
|
|
415
|
-
|
|
410
|
+
interface ChangeBalanceResponse {
|
|
416
411
|
/** Updated balance. */
|
|
417
412
|
balance?: Balance;
|
|
418
413
|
/**
|
|
@@ -421,7 +416,7 @@ export interface ChangeBalanceResponse {
|
|
|
421
416
|
*/
|
|
422
417
|
transactionId?: string | null;
|
|
423
418
|
}
|
|
424
|
-
|
|
419
|
+
interface BalanceExceededLimits {
|
|
425
420
|
/** Current balance */
|
|
426
421
|
balance?: BalanceAmount;
|
|
427
422
|
/**
|
|
@@ -443,7 +438,7 @@ export interface BalanceExceededLimits {
|
|
|
443
438
|
*/
|
|
444
439
|
upperLimit?: string | null;
|
|
445
440
|
}
|
|
446
|
-
|
|
441
|
+
interface BulkChangeBalancesRequest {
|
|
447
442
|
/**
|
|
448
443
|
* List of balances to change.
|
|
449
444
|
* @minSize 1
|
|
@@ -459,13 +454,13 @@ export interface BulkChangeBalancesRequest {
|
|
|
459
454
|
/** Whether to return the full balance entities in the response. */
|
|
460
455
|
returnEntity?: boolean;
|
|
461
456
|
}
|
|
462
|
-
|
|
457
|
+
declare enum Type {
|
|
463
458
|
/** Unknown balance change type. */
|
|
464
459
|
UNKNOWN_OPERATION = "UNKNOWN_OPERATION"
|
|
465
460
|
}
|
|
466
461
|
/** @enumType */
|
|
467
|
-
|
|
468
|
-
|
|
462
|
+
type TypeWithLiterals = Type | 'UNKNOWN_OPERATION';
|
|
463
|
+
interface ChangeBalanceRequest extends ChangeBalanceRequestOperationOneOf {
|
|
469
464
|
/**
|
|
470
465
|
* ID of the pool associated with the balance to change. This is also the ID of the balance.
|
|
471
466
|
* @format GUID
|
|
@@ -479,9 +474,9 @@ export interface ChangeBalanceRequest extends ChangeBalanceRequestOperationOneOf
|
|
|
479
474
|
transactionDetails?: TransactionDetails;
|
|
480
475
|
}
|
|
481
476
|
/** @oneof */
|
|
482
|
-
|
|
477
|
+
interface ChangeBalanceRequestOperationOneOf {
|
|
483
478
|
}
|
|
484
|
-
|
|
479
|
+
interface BulkChangeBalancesResponse {
|
|
485
480
|
/**
|
|
486
481
|
* Updated item and associated metadata.
|
|
487
482
|
* @minSize 1
|
|
@@ -491,7 +486,7 @@ export interface BulkChangeBalancesResponse {
|
|
|
491
486
|
/** Metadata. */
|
|
492
487
|
bulkActionMetadata?: BulkActionMetadata;
|
|
493
488
|
}
|
|
494
|
-
|
|
489
|
+
interface ItemMetadata {
|
|
495
490
|
/**
|
|
496
491
|
* Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
|
|
497
492
|
* @format GUID
|
|
@@ -504,7 +499,7 @@ export interface ItemMetadata {
|
|
|
504
499
|
/** Details about the error in case of failure. */
|
|
505
500
|
error?: ApplicationError;
|
|
506
501
|
}
|
|
507
|
-
|
|
502
|
+
interface ApplicationError {
|
|
508
503
|
/** Error code. */
|
|
509
504
|
code?: string;
|
|
510
505
|
/** Description of the error. */
|
|
@@ -512,13 +507,13 @@ export interface ApplicationError {
|
|
|
512
507
|
/** Data related to the error. */
|
|
513
508
|
data?: Record<string, any> | null;
|
|
514
509
|
}
|
|
515
|
-
|
|
510
|
+
interface BulkChangeBalanceResult {
|
|
516
511
|
/** Item metadata. */
|
|
517
512
|
itemMetadata?: ItemMetadata;
|
|
518
513
|
/** Updated item. */
|
|
519
514
|
balance?: Balance;
|
|
520
515
|
}
|
|
521
|
-
|
|
516
|
+
interface BulkActionMetadata {
|
|
522
517
|
/** Number of items that were successfully processed. */
|
|
523
518
|
totalSuccesses?: number;
|
|
524
519
|
/** Number of items that couldn't be processed. */
|
|
@@ -526,7 +521,7 @@ export interface BulkActionMetadata {
|
|
|
526
521
|
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
527
522
|
undetailedFailures?: number;
|
|
528
523
|
}
|
|
529
|
-
|
|
524
|
+
interface RevertBalanceChangeRequest {
|
|
530
525
|
/**
|
|
531
526
|
* ID of the transaction associated with the balance change to revert.
|
|
532
527
|
* @format GUID
|
|
@@ -541,14 +536,14 @@ export interface RevertBalanceChangeRequest {
|
|
|
541
536
|
/** Identity reverting the balance change. */
|
|
542
537
|
instructingParty?: CommonIdentificationData;
|
|
543
538
|
}
|
|
544
|
-
|
|
539
|
+
interface RevertBalanceChangeResponse {
|
|
545
540
|
/**
|
|
546
541
|
* ID of the transaction associated with the balance reversion.
|
|
547
542
|
* @format GUID
|
|
548
543
|
*/
|
|
549
544
|
transactionId?: string | null;
|
|
550
545
|
}
|
|
551
|
-
|
|
546
|
+
interface ChangeAlreadyReverted {
|
|
552
547
|
/**
|
|
553
548
|
* The id of the transaction which was already reverted
|
|
554
549
|
* @format GUID
|
|
@@ -560,7 +555,7 @@ export interface ChangeAlreadyReverted {
|
|
|
560
555
|
*/
|
|
561
556
|
revertedTransactionId?: string;
|
|
562
557
|
}
|
|
563
|
-
|
|
558
|
+
interface NotEnoughBalance {
|
|
564
559
|
/** Current balance */
|
|
565
560
|
balance?: BalanceAmount;
|
|
566
561
|
/**
|
|
@@ -570,27 +565,27 @@ export interface NotEnoughBalance {
|
|
|
570
565
|
*/
|
|
571
566
|
requested?: string;
|
|
572
567
|
}
|
|
573
|
-
|
|
568
|
+
interface GetTransactionReversibilityRequest {
|
|
574
569
|
/**
|
|
575
570
|
* Id of the transaction to get the reversibility
|
|
576
571
|
* @format GUID
|
|
577
572
|
*/
|
|
578
573
|
transactionId?: string;
|
|
579
574
|
}
|
|
580
|
-
|
|
575
|
+
interface GetTransactionReversibilityResponse {
|
|
581
576
|
/** The result of transaction reversibility validation */
|
|
582
577
|
transactionReversibility?: TransactionReversibilityWithLiterals;
|
|
583
578
|
}
|
|
584
579
|
/** Transaction reversibility results */
|
|
585
|
-
|
|
580
|
+
declare enum TransactionReversibility {
|
|
586
581
|
/** Transaction is allowed to be reverted */
|
|
587
582
|
TRANSACTION_IS_REVERSIBLE = "TRANSACTION_IS_REVERSIBLE",
|
|
588
583
|
/** Transaction isn't allowed to be reverted, because it was already reverted */
|
|
589
584
|
TRANSACTION_ALREADY_REVERSED = "TRANSACTION_ALREADY_REVERSED"
|
|
590
585
|
}
|
|
591
586
|
/** @enumType */
|
|
592
|
-
|
|
593
|
-
|
|
587
|
+
type TransactionReversibilityWithLiterals = TransactionReversibility | 'TRANSACTION_IS_REVERSIBLE' | 'TRANSACTION_ALREADY_REVERSED';
|
|
588
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
594
589
|
createdEvent?: EntityCreatedEvent;
|
|
595
590
|
updatedEvent?: EntityUpdatedEvent;
|
|
596
591
|
deletedEvent?: EntityDeletedEvent;
|
|
@@ -625,19 +620,19 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
625
620
|
entityEventSequence?: string | null;
|
|
626
621
|
}
|
|
627
622
|
/** @oneof */
|
|
628
|
-
|
|
623
|
+
interface DomainEventBodyOneOf {
|
|
629
624
|
createdEvent?: EntityCreatedEvent;
|
|
630
625
|
updatedEvent?: EntityUpdatedEvent;
|
|
631
626
|
deletedEvent?: EntityDeletedEvent;
|
|
632
627
|
actionEvent?: ActionEvent;
|
|
633
628
|
}
|
|
634
|
-
|
|
629
|
+
interface EntityCreatedEvent {
|
|
635
630
|
entity?: string;
|
|
636
631
|
}
|
|
637
|
-
|
|
632
|
+
interface RestoreInfo {
|
|
638
633
|
deletedDate?: Date | null;
|
|
639
634
|
}
|
|
640
|
-
|
|
635
|
+
interface EntityUpdatedEvent {
|
|
641
636
|
/**
|
|
642
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.
|
|
643
638
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
@@ -645,14 +640,14 @@ export interface EntityUpdatedEvent {
|
|
|
645
640
|
*/
|
|
646
641
|
currentEntity?: string;
|
|
647
642
|
}
|
|
648
|
-
|
|
643
|
+
interface EntityDeletedEvent {
|
|
649
644
|
/** Entity that was deleted. */
|
|
650
645
|
deletedEntity?: string | null;
|
|
651
646
|
}
|
|
652
|
-
|
|
647
|
+
interface ActionEvent {
|
|
653
648
|
body?: string;
|
|
654
649
|
}
|
|
655
|
-
|
|
650
|
+
interface MessageEnvelope {
|
|
656
651
|
/**
|
|
657
652
|
* App instance ID.
|
|
658
653
|
* @format GUID
|
|
@@ -668,7 +663,7 @@ export interface MessageEnvelope {
|
|
|
668
663
|
/** Stringify payload. */
|
|
669
664
|
data?: string;
|
|
670
665
|
}
|
|
671
|
-
|
|
666
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
672
667
|
/**
|
|
673
668
|
* ID of a site visitor that has not logged in to the site.
|
|
674
669
|
* @format GUID
|
|
@@ -693,7 +688,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
693
688
|
identityType?: WebhookIdentityTypeWithLiterals;
|
|
694
689
|
}
|
|
695
690
|
/** @oneof */
|
|
696
|
-
|
|
691
|
+
interface IdentificationDataIdOneOf {
|
|
697
692
|
/**
|
|
698
693
|
* ID of a site visitor that has not logged in to the site.
|
|
699
694
|
* @format GUID
|
|
@@ -715,7 +710,7 @@ export interface IdentificationDataIdOneOf {
|
|
|
715
710
|
*/
|
|
716
711
|
appId?: string;
|
|
717
712
|
}
|
|
718
|
-
|
|
713
|
+
declare enum WebhookIdentityType {
|
|
719
714
|
UNKNOWN = "UNKNOWN",
|
|
720
715
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
721
716
|
MEMBER = "MEMBER",
|
|
@@ -723,44 +718,8 @@ export declare enum WebhookIdentityType {
|
|
|
723
718
|
APP = "APP"
|
|
724
719
|
}
|
|
725
720
|
/** @enumType */
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
/**
|
|
729
|
-
* Retrieves a balance.
|
|
730
|
-
* @param poolId - ID of the pool associated with the balance to retrieve. This is also the ID of the balance.
|
|
731
|
-
* @public
|
|
732
|
-
* @documentationMaturity preview
|
|
733
|
-
* @requiredField poolId
|
|
734
|
-
* @permissionId BENEFIT_PROGRAMS.BALANCE_READ
|
|
735
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
736
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
737
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.READ
|
|
738
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.READ
|
|
739
|
-
* @permissionScope Manage Events
|
|
740
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
741
|
-
* @applicableIdentity APP
|
|
742
|
-
* @returns Retrieved balance.
|
|
743
|
-
* @fqn wix.benefit_programs.v1.balance.BalanceService.GetBalance
|
|
744
|
-
*/
|
|
745
|
-
export declare function getBalance(poolId: string): Promise<NonNullablePaths<Balance, BalanceNonNullablePaths>>;
|
|
746
|
-
/**
|
|
747
|
-
* Retrieves a list of balances.
|
|
748
|
-
* @public
|
|
749
|
-
* @documentationMaturity preview
|
|
750
|
-
* @permissionId BENEFIT_PROGRAMS.BALANCE_READ
|
|
751
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
752
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
753
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.READ
|
|
754
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.READ
|
|
755
|
-
* @permissionScope Manage Events
|
|
756
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
757
|
-
* @applicableIdentity APP
|
|
758
|
-
* @fqn wix.benefit_programs.v1.balance.BalanceService.ListBalances
|
|
759
|
-
*/
|
|
760
|
-
export declare function listBalances(options?: ListBalancesOptions): Promise<NonNullablePaths<ListBalancesResponse, {
|
|
761
|
-
[P in BalanceNonNullablePaths]: `balances.${number}.${P}`;
|
|
762
|
-
}[BalanceNonNullablePaths]>>;
|
|
763
|
-
export interface ListBalancesOptions {
|
|
721
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
722
|
+
interface ListBalancesOptions {
|
|
764
723
|
/**
|
|
765
724
|
* List of IDs of the pools associated with the balances to retrieve. These are also the IDs of the balances.
|
|
766
725
|
* @format GUID
|
|
@@ -770,31 +729,6 @@ export interface ListBalancesOptions {
|
|
|
770
729
|
/** Cursor paging. */
|
|
771
730
|
cursorPaging?: CursorPaging;
|
|
772
731
|
}
|
|
773
|
-
/**
|
|
774
|
-
* Creates a query to retrieve a list of balances.
|
|
775
|
-
*
|
|
776
|
-
* The Query Balances method builds a query to retrieve a list of balances and returns a `BalancesQueryBuilder` object.
|
|
777
|
-
*
|
|
778
|
-
* The returned object contains the query definition, which is used to run the query using the `find()` method.
|
|
779
|
-
*
|
|
780
|
-
* You can refine the query by chaining `BalancesQueryBuilder` methods onto the query. `BalancesQueryBuilder` methods enable you to filter, sort, and control the results that Query Balances returns.
|
|
781
|
-
*
|
|
782
|
-
* Query Balances has a default paging limit of 50, which you can override.
|
|
783
|
-
*
|
|
784
|
-
* For a full description of the item object, see the object returned for the `items` property in `BalancesQueryResult`.
|
|
785
|
-
* @public
|
|
786
|
-
* @documentationMaturity preview
|
|
787
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
788
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
789
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.READ
|
|
790
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.READ
|
|
791
|
-
* @permissionScope Manage Events
|
|
792
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
793
|
-
* @permissionId BENEFIT_PROGRAMS.BALANCE_READ
|
|
794
|
-
* @applicableIdentity APP
|
|
795
|
-
* @fqn wix.benefit_programs.v1.balance.BalanceService.QueryBalances
|
|
796
|
-
*/
|
|
797
|
-
export declare function queryBalances(): BalancesQueryBuilder;
|
|
798
732
|
interface QueryCursorResult {
|
|
799
733
|
cursors: Cursors;
|
|
800
734
|
hasNext: () => boolean;
|
|
@@ -802,13 +736,13 @@ interface QueryCursorResult {
|
|
|
802
736
|
length: number;
|
|
803
737
|
pageSize: number;
|
|
804
738
|
}
|
|
805
|
-
|
|
739
|
+
interface BalancesQueryResult extends QueryCursorResult {
|
|
806
740
|
items: Balance[];
|
|
807
741
|
query: BalancesQueryBuilder;
|
|
808
742
|
next: () => Promise<BalancesQueryResult>;
|
|
809
743
|
prev: () => Promise<BalancesQueryResult>;
|
|
810
744
|
}
|
|
811
|
-
|
|
745
|
+
interface BalancesQueryBuilder {
|
|
812
746
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
813
747
|
* @param value - Value to compare against.
|
|
814
748
|
* @documentationMaturity preview
|
|
@@ -872,28 +806,7 @@ export interface BalancesQueryBuilder {
|
|
|
872
806
|
/** @documentationMaturity preview */
|
|
873
807
|
find: () => Promise<BalancesQueryResult>;
|
|
874
808
|
}
|
|
875
|
-
|
|
876
|
-
* Changes the number of available credits in a balance.
|
|
877
|
-
*
|
|
878
|
-
* You can adjust or set the number of available credits.
|
|
879
|
-
* @param poolId - ID of the pool associated with the balance to change. This is also the ID of the balance.
|
|
880
|
-
* @param idempotencyKey - Unique identifier, generated by the client.
|
|
881
|
-
* Used to recognize repeated attempts to make the same request.
|
|
882
|
-
* @public
|
|
883
|
-
* @documentationMaturity preview
|
|
884
|
-
* @requiredField idempotencyKey
|
|
885
|
-
* @requiredField options.operation
|
|
886
|
-
* @requiredField poolId
|
|
887
|
-
* @permissionId BENEFIT_PROGRAMS.BALANCE_CHANGE
|
|
888
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
889
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
890
|
-
* @applicableIdentity APP
|
|
891
|
-
* @fqn wix.benefit_programs.v1.balance.BalanceService.ChangeBalance
|
|
892
|
-
*/
|
|
893
|
-
export declare function changeBalance(poolId: string, idempotencyKey: string, options?: ChangeBalanceOptions): Promise<NonNullablePaths<ChangeBalanceResponse, {
|
|
894
|
-
[P in BalanceNonNullablePaths]: `balance.${P}`;
|
|
895
|
-
}[BalanceNonNullablePaths]>>;
|
|
896
|
-
export interface ChangeBalanceOptions extends ChangeBalanceOptionsOperationOneOf {
|
|
809
|
+
interface ChangeBalanceOptions extends ChangeBalanceOptionsOperationOneOf {
|
|
897
810
|
/** Identity changing the balance. */
|
|
898
811
|
instructingParty?: CommonIdentificationData;
|
|
899
812
|
/** Balance change type. */
|
|
@@ -906,35 +819,15 @@ export interface ChangeBalanceOptions extends ChangeBalanceOptionsOperationOneOf
|
|
|
906
819
|
transactionDetails?: TransactionDetails;
|
|
907
820
|
}
|
|
908
821
|
/** @oneof */
|
|
909
|
-
|
|
822
|
+
interface ChangeBalanceOptionsOperationOneOf {
|
|
910
823
|
/** Adjust the balance by a specific number of credits. */
|
|
911
824
|
adjustOptions?: AdjustOptions;
|
|
912
825
|
/** Set the balance to a specific number of credits. */
|
|
913
826
|
setOptions?: SetOptions;
|
|
914
827
|
}
|
|
915
|
-
|
|
916
|
-
* Reverts a transaction created by calling Change Balance.
|
|
917
|
-
*
|
|
918
|
-
* For example, if a transaction increased a balance's available credits by 5,
|
|
919
|
-
* calling Revert Balance Change with the transaction's ID will decrease the balance's available credit by 5.
|
|
920
|
-
*
|
|
921
|
-
* > **Note:** If the Change Balance call set the balance, Revert Transaction reverts the amount the balance changed by, ensuring subsequent balance changes are still reflected after the reversion.
|
|
922
|
-
* @param transactionId - ID of the transaction associated with the balance change to revert.
|
|
923
|
-
* @param idempotencyKey - Unique identifier, generated by the client.
|
|
924
|
-
* Used to recognize repeated attempts to make the same request.
|
|
925
|
-
* @public
|
|
926
|
-
* @documentationMaturity preview
|
|
927
|
-
* @requiredField idempotencyKey
|
|
928
|
-
* @requiredField transactionId
|
|
929
|
-
* @permissionId BENEFIT_PROGRAMS.BALANCE_CHANGE
|
|
930
|
-
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
931
|
-
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
932
|
-
* @applicableIdentity APP
|
|
933
|
-
* @fqn wix.benefit_programs.v1.balance.BalanceService.RevertBalanceChange
|
|
934
|
-
*/
|
|
935
|
-
export declare function revertBalanceChange(transactionId: string, idempotencyKey: string, options?: RevertBalanceChangeOptions): Promise<RevertBalanceChangeResponse>;
|
|
936
|
-
export interface RevertBalanceChangeOptions {
|
|
828
|
+
interface RevertBalanceChangeOptions {
|
|
937
829
|
/** Identity reverting the balance change. */
|
|
938
830
|
instructingParty?: CommonIdentificationData;
|
|
939
831
|
}
|
|
940
|
-
|
|
832
|
+
|
|
833
|
+
export { type DomainEventBodyOneOf as $, type AdjustOptions as A, type Balance as B, type ChangeBalanceOptions as C, type BulkChangeBalancesRequest as D, type ExtendedFields as E, type ChangeBalanceRequest as F, type GetBalanceRequest as G, type ChangeBalanceRequestOperationOneOf as H, IdentityType as I, type BulkChangeBalancesResponse as J, type ItemMetadata as K, type ListBalancesOptions as L, type ApplicationError as M, type BulkChangeBalanceResult as N, type BulkActionMetadata as O, type PoolInfo as P, type QueryBalancesRequest as Q, type RevertBalanceChangeOptions as R, SortOrder as S, Type as T, type RevertBalanceChangeRequest as U, type ChangeAlreadyReverted as V, WebhookIdentityType as W, type NotEnoughBalance as X, type GetTransactionReversibilityRequest as Y, type GetTransactionReversibilityResponse as Z, type DomainEvent as _, type ListBalancesResponse as a, type EntityCreatedEvent as a0, type RestoreInfo as a1, type EntityUpdatedEvent as a2, type EntityDeletedEvent as a3, type ActionEvent as a4, type MessageEnvelope as a5, type IdentificationData as a6, type IdentificationDataIdOneOf as a7, type BalancesQueryResult as a8, type ChangeBalanceOptionsOperationOneOf as a9, type BalancesQueryBuilder as b, type ChangeBalanceResponse as c, type RevertBalanceChangeResponse as d, ChangeBalanceRequestType as e, LimitRule as f, TransactionReversibility as g, type CommonIdentificationData as h, type CommonIdentificationDataIdOneOf as i, type BalanceAmount as j, type GetBalanceResponse as k, type ListBalancesRequest as l, type CursorPaging as m, type CursorPagingMetadata as n, type Cursors as o, type CursorQuery as p, type CursorQueryPagingMethodOneOf as q, type Sorting as r, type QueryBalancesResponse as s, type BalanceChangeBalanceRequest as t, type BalanceChangeBalanceRequestOperationOneOf as u, type SetOptions as v, type SetInitialOptions as w, type TransactionDetails as x, type Item as y, type BalanceExceededLimits as z };
|