@wix/auto_sdk_benefit-programs_balances 1.0.1 → 1.0.3
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/cjs/src/benefit-programs-v1-balance-balances.context.d.ts +2 -3
- package/build/cjs/src/benefit-programs-v1-balance-balances.context.js +1 -2
- package/build/cjs/src/benefit-programs-v1-balance-balances.context.js.map +1 -1
- package/build/cjs/src/benefit-programs-v1-balance-balances.http.d.ts +14 -17
- package/build/cjs/src/benefit-programs-v1-balance-balances.http.js +15 -51
- package/build/cjs/src/benefit-programs-v1-balance-balances.http.js.map +1 -1
- package/build/cjs/src/benefit-programs-v1-balance-balances.meta.d.ts +0 -1
- package/build/cjs/src/benefit-programs-v1-balance-balances.meta.js +1 -20
- package/build/cjs/src/benefit-programs-v1-balance-balances.meta.js.map +1 -1
- package/build/cjs/src/benefit-programs-v1-balance-balances.public.d.ts +20 -26
- package/build/cjs/src/benefit-programs-v1-balance-balances.public.js +1 -7
- package/build/cjs/src/benefit-programs-v1-balance-balances.public.js.map +1 -1
- package/build/cjs/src/benefit-programs-v1-balance-balances.types.d.ts +78 -147
- package/build/cjs/src/benefit-programs-v1-balance-balances.types.js +4 -5
- package/build/cjs/src/benefit-programs-v1-balance-balances.types.js.map +1 -1
- package/build/cjs/src/benefit-programs-v1-balance-balances.universal.d.ts +105 -231
- package/build/cjs/src/benefit-programs-v1-balance-balances.universal.js +22 -65
- package/build/cjs/src/benefit-programs-v1-balance-balances.universal.js.map +1 -1
- package/build/es/src/benefit-programs-v1-balance-balances.context.d.ts +2 -3
- package/build/es/src/benefit-programs-v1-balance-balances.context.js +1 -2
- package/build/es/src/benefit-programs-v1-balance-balances.context.js.map +1 -1
- package/build/es/src/benefit-programs-v1-balance-balances.http.d.ts +14 -17
- package/build/es/src/benefit-programs-v1-balance-balances.http.js +14 -49
- package/build/es/src/benefit-programs-v1-balance-balances.http.js.map +1 -1
- package/build/es/src/benefit-programs-v1-balance-balances.meta.d.ts +0 -1
- package/build/es/src/benefit-programs-v1-balance-balances.meta.js +0 -18
- package/build/es/src/benefit-programs-v1-balance-balances.meta.js.map +1 -1
- package/build/es/src/benefit-programs-v1-balance-balances.public.d.ts +20 -26
- package/build/es/src/benefit-programs-v1-balance-balances.public.js +1 -6
- package/build/es/src/benefit-programs-v1-balance-balances.public.js.map +1 -1
- package/build/es/src/benefit-programs-v1-balance-balances.types.d.ts +78 -147
- package/build/es/src/benefit-programs-v1-balance-balances.types.js +4 -5
- package/build/es/src/benefit-programs-v1-balance-balances.types.js.map +1 -1
- package/build/es/src/benefit-programs-v1-balance-balances.universal.d.ts +105 -231
- package/build/es/src/benefit-programs-v1-balance-balances.universal.js +21 -63
- package/build/es/src/benefit-programs-v1-balance-balances.universal.js.map +1 -1
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.context.d.ts +2 -3
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.context.js +1 -2
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.context.js.map +1 -1
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.http.d.ts +14 -17
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.http.js +15 -51
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.http.js.map +1 -1
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.meta.d.ts +0 -1
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.meta.js +1 -20
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.meta.js.map +1 -1
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.public.d.ts +20 -26
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.public.js +1 -7
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.public.js.map +1 -1
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.types.d.ts +78 -147
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.types.js +4 -5
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.types.js.map +1 -1
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.universal.d.ts +105 -231
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.universal.js +22 -65
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.universal.js.map +1 -1
- package/build/internal/es/src/benefit-programs-v1-balance-balances.context.d.ts +2 -3
- package/build/internal/es/src/benefit-programs-v1-balance-balances.context.js +1 -2
- package/build/internal/es/src/benefit-programs-v1-balance-balances.context.js.map +1 -1
- package/build/internal/es/src/benefit-programs-v1-balance-balances.http.d.ts +14 -17
- package/build/internal/es/src/benefit-programs-v1-balance-balances.http.js +14 -49
- package/build/internal/es/src/benefit-programs-v1-balance-balances.http.js.map +1 -1
- package/build/internal/es/src/benefit-programs-v1-balance-balances.meta.d.ts +0 -1
- package/build/internal/es/src/benefit-programs-v1-balance-balances.meta.js +0 -18
- package/build/internal/es/src/benefit-programs-v1-balance-balances.meta.js.map +1 -1
- package/build/internal/es/src/benefit-programs-v1-balance-balances.public.d.ts +20 -26
- package/build/internal/es/src/benefit-programs-v1-balance-balances.public.js +1 -6
- package/build/internal/es/src/benefit-programs-v1-balance-balances.public.js.map +1 -1
- package/build/internal/es/src/benefit-programs-v1-balance-balances.types.d.ts +78 -147
- package/build/internal/es/src/benefit-programs-v1-balance-balances.types.js +4 -5
- package/build/internal/es/src/benefit-programs-v1-balance-balances.types.js.map +1 -1
- package/build/internal/es/src/benefit-programs-v1-balance-balances.universal.d.ts +105 -231
- package/build/internal/es/src/benefit-programs-v1-balance-balances.universal.js +21 -63
- package/build/internal/es/src/benefit-programs-v1-balance-balances.universal.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface Balance {
|
|
2
2
|
/**
|
|
3
|
-
* Balance ID
|
|
3
|
+
* Balance ID. This is the same as the associated pool's ID.
|
|
4
4
|
* @format GUID
|
|
5
5
|
* @immutable
|
|
6
6
|
*/
|
|
@@ -22,17 +22,17 @@ export interface Balance {
|
|
|
22
22
|
*/
|
|
23
23
|
updatedDate?: Date | null;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Beneficiary of the associated pool.
|
|
26
26
|
* @readonly
|
|
27
27
|
*/
|
|
28
28
|
beneficiary?: CommonIdentificationData;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Available credits.
|
|
31
31
|
* @readonly
|
|
32
32
|
*/
|
|
33
33
|
amount?: BalanceAmount;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Associated pool information.
|
|
36
36
|
* @readonly
|
|
37
37
|
*/
|
|
38
38
|
poolInfo?: PoolInfo;
|
|
@@ -42,7 +42,7 @@ export interface Balance {
|
|
|
42
42
|
*/
|
|
43
43
|
extendedFields?: ExtendedFields;
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* ID of the transaction associated with the most recent change to the balance.
|
|
46
46
|
* @format GUID
|
|
47
47
|
* @readonly
|
|
48
48
|
*/
|
|
@@ -50,17 +50,17 @@ export interface Balance {
|
|
|
50
50
|
}
|
|
51
51
|
export interface CommonIdentificationData extends CommonIdentificationDataIdOneOf {
|
|
52
52
|
/**
|
|
53
|
-
* ID of a site visitor that
|
|
53
|
+
* ID of a site visitor that hasn't logged in to the site.
|
|
54
54
|
* @format GUID
|
|
55
55
|
*/
|
|
56
56
|
anonymousVisitorId?: string;
|
|
57
57
|
/**
|
|
58
|
-
* ID of a site
|
|
58
|
+
* ID of a site member.
|
|
59
59
|
* @format GUID
|
|
60
60
|
*/
|
|
61
61
|
memberId?: string;
|
|
62
62
|
/**
|
|
63
|
-
* ID of a Wix user
|
|
63
|
+
* ID of a Wix user.
|
|
64
64
|
* @format GUID
|
|
65
65
|
*/
|
|
66
66
|
wixUserId?: string;
|
|
@@ -68,17 +68,17 @@ export interface CommonIdentificationData extends CommonIdentificationDataIdOneO
|
|
|
68
68
|
/** @oneof */
|
|
69
69
|
export interface CommonIdentificationDataIdOneOf {
|
|
70
70
|
/**
|
|
71
|
-
* ID of a site visitor that
|
|
71
|
+
* ID of a site visitor that hasn't logged in to the site.
|
|
72
72
|
* @format GUID
|
|
73
73
|
*/
|
|
74
74
|
anonymousVisitorId?: string;
|
|
75
75
|
/**
|
|
76
|
-
* ID of a site
|
|
76
|
+
* ID of a site member.
|
|
77
77
|
* @format GUID
|
|
78
78
|
*/
|
|
79
79
|
memberId?: string;
|
|
80
80
|
/**
|
|
81
|
-
* ID of a Wix user
|
|
81
|
+
* ID of a Wix user.
|
|
82
82
|
* @format GUID
|
|
83
83
|
*/
|
|
84
84
|
wixUserId?: string;
|
|
@@ -95,7 +95,7 @@ export declare enum IdentityType {
|
|
|
95
95
|
}
|
|
96
96
|
export interface BalanceAmount {
|
|
97
97
|
/**
|
|
98
|
-
*
|
|
98
|
+
* Amount of available credits.
|
|
99
99
|
* @decimalValue options { maxScale:4 }
|
|
100
100
|
* @readonly
|
|
101
101
|
*/
|
|
@@ -104,37 +104,35 @@ export interface BalanceAmount {
|
|
|
104
104
|
export interface PoolInfo {
|
|
105
105
|
/**
|
|
106
106
|
* Pool ID.
|
|
107
|
-
*
|
|
108
|
-
* Represents the ID of the benefit pool linked to this balance.
|
|
109
107
|
* @format GUID
|
|
110
108
|
* @readonly
|
|
111
109
|
*/
|
|
112
110
|
id?: string;
|
|
113
111
|
/**
|
|
114
|
-
*
|
|
112
|
+
* ID of the pool definition the pool was created from.
|
|
115
113
|
* @format GUID
|
|
116
114
|
* @readonly
|
|
117
115
|
*/
|
|
118
116
|
poolDefinitionId?: string | null;
|
|
119
117
|
/**
|
|
120
|
-
*
|
|
118
|
+
* ID of the program definition the pool was created from.
|
|
121
119
|
* @format GUID
|
|
122
120
|
* @readonly
|
|
123
121
|
*/
|
|
124
122
|
programDefinitionId?: string | null;
|
|
125
123
|
/**
|
|
126
|
-
*
|
|
124
|
+
* ID of the program that contains the pool.
|
|
127
125
|
* @format GUID
|
|
128
126
|
* @readonly
|
|
129
127
|
*/
|
|
130
128
|
programId?: string | null;
|
|
131
129
|
/**
|
|
132
|
-
*
|
|
130
|
+
* Available credits.
|
|
133
131
|
* @decimalValue options { gte:0, maxScale:4 }
|
|
134
132
|
*/
|
|
135
133
|
creditAmount?: string | null;
|
|
136
134
|
/**
|
|
137
|
-
*
|
|
135
|
+
* Namespace for your app or site's benefit programs.
|
|
138
136
|
* @minLength 1
|
|
139
137
|
* @maxLength 50
|
|
140
138
|
*/
|
|
@@ -153,7 +151,7 @@ export interface ExtendedFields {
|
|
|
153
151
|
}
|
|
154
152
|
export interface GetBalanceRequest {
|
|
155
153
|
/**
|
|
156
|
-
* ID of the pool
|
|
154
|
+
* ID of the pool associated with the balance to retrieve. This is also the ID of the balance.
|
|
157
155
|
* @format GUID
|
|
158
156
|
*/
|
|
159
157
|
poolId: string;
|
|
@@ -164,17 +162,17 @@ export interface GetBalanceResponse {
|
|
|
164
162
|
}
|
|
165
163
|
export interface ListBalancesRequest {
|
|
166
164
|
/**
|
|
167
|
-
* IDs of the pools
|
|
165
|
+
* List of IDs of the pools associated with the balances to retrieve. These are also the IDs of the balances.
|
|
168
166
|
* @format GUID
|
|
169
167
|
* @maxSize 100
|
|
170
168
|
*/
|
|
171
169
|
poolIds?: string[];
|
|
172
|
-
/** Cursor paging */
|
|
170
|
+
/** Cursor paging. */
|
|
173
171
|
cursorPaging?: CursorPaging;
|
|
174
172
|
}
|
|
175
173
|
export interface CursorPaging {
|
|
176
174
|
/**
|
|
177
|
-
* Maximum number of items to return
|
|
175
|
+
* Maximum number of items to return.
|
|
178
176
|
* @max 100
|
|
179
177
|
*/
|
|
180
178
|
limit?: number | null;
|
|
@@ -189,7 +187,7 @@ export interface CursorPaging {
|
|
|
189
187
|
}
|
|
190
188
|
export interface ListBalancesResponse {
|
|
191
189
|
/**
|
|
192
|
-
*
|
|
190
|
+
* Retrieved balances.
|
|
193
191
|
* @maxSize 100
|
|
194
192
|
*/
|
|
195
193
|
balances?: Balance[];
|
|
@@ -222,24 +220,20 @@ export interface Cursors {
|
|
|
222
220
|
prev?: string | null;
|
|
223
221
|
}
|
|
224
222
|
export interface QueryBalancesRequest {
|
|
225
|
-
/**
|
|
223
|
+
/** Filter, sort, and paging to apply to the query. */
|
|
226
224
|
query?: CursorQuery;
|
|
227
225
|
}
|
|
228
226
|
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
229
227
|
/** 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
228
|
cursorPaging?: CursorPaging;
|
|
231
229
|
/**
|
|
232
|
-
* Filter object
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
* "fieldName2":{"$operator":"value2"}
|
|
236
|
-
* }`
|
|
237
|
-
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
230
|
+
* Filter object.
|
|
231
|
+
* See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)
|
|
232
|
+
* for more information.
|
|
238
233
|
*/
|
|
239
234
|
filter?: Record<string, any> | null;
|
|
240
235
|
/**
|
|
241
|
-
*
|
|
242
|
-
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
236
|
+
* List of sort objects.
|
|
243
237
|
* @maxSize 5
|
|
244
238
|
*/
|
|
245
239
|
sort?: Sorting[];
|
|
@@ -251,11 +245,15 @@ export interface CursorQueryPagingMethodOneOf {
|
|
|
251
245
|
}
|
|
252
246
|
export interface Sorting {
|
|
253
247
|
/**
|
|
254
|
-
*
|
|
248
|
+
* Field to sort by.
|
|
255
249
|
* @maxLength 512
|
|
256
250
|
*/
|
|
257
251
|
fieldName?: string;
|
|
258
|
-
/**
|
|
252
|
+
/**
|
|
253
|
+
* Sort order. Use `ASC` for ascending order or `DESC` for descending order.
|
|
254
|
+
*
|
|
255
|
+
* Default: `ASC`
|
|
256
|
+
*/
|
|
259
257
|
order?: SortOrder;
|
|
260
258
|
}
|
|
261
259
|
export declare enum SortOrder {
|
|
@@ -265,18 +263,18 @@ export declare enum SortOrder {
|
|
|
265
263
|
DESC = "DESC"
|
|
266
264
|
}
|
|
267
265
|
export interface QueryBalancesResponse {
|
|
268
|
-
/** List of balances. */
|
|
266
|
+
/** List of retrieved balances. */
|
|
269
267
|
balances?: Balance[];
|
|
270
268
|
/** Metadata for the paginated results. */
|
|
271
269
|
metadata?: CursorPagingMetadata;
|
|
272
270
|
}
|
|
273
271
|
export interface BalanceChangeBalanceRequest extends BalanceChangeBalanceRequestOperationOneOf {
|
|
274
|
-
/**
|
|
272
|
+
/** Adjust the balance by a specific amount of credits. */
|
|
275
273
|
adjustOptions?: AdjustOptions;
|
|
276
|
-
/**
|
|
274
|
+
/** Set the balance to a specific amount of credits. */
|
|
277
275
|
setOptions?: SetOptions;
|
|
278
276
|
/**
|
|
279
|
-
* ID of the
|
|
277
|
+
* ID of the pool associated with the balance to change. This is also the ID of the balance.
|
|
280
278
|
* @format GUID
|
|
281
279
|
*/
|
|
282
280
|
poolId: string;
|
|
@@ -286,54 +284,37 @@ export interface BalanceChangeBalanceRequest extends BalanceChangeBalanceRequest
|
|
|
286
284
|
* @maxLength 200
|
|
287
285
|
*/
|
|
288
286
|
idempotencyKey: string;
|
|
289
|
-
/**
|
|
290
|
-
* Party requesting the balance change.
|
|
291
|
-
*
|
|
292
|
-
* Possible values could include:
|
|
293
|
-
*
|
|
294
|
-
* + App owner.
|
|
295
|
-
*
|
|
296
|
-
* + Pool beneficiary.
|
|
297
|
-
*
|
|
298
|
-
* + Site admin.
|
|
299
|
-
*/
|
|
287
|
+
/** Identity changing the balance. */
|
|
300
288
|
instructingParty?: CommonIdentificationData;
|
|
301
|
-
/**
|
|
302
|
-
* Specify the type of operation to change the balance. Depending on the selected balance change type, you must use the corresponding `adjustOptions` or `setOptions` parameter.
|
|
303
|
-
*
|
|
304
|
-
* Use `ADJUST` to specify the number of credits to apply to the current balance of the benefit pool.
|
|
305
|
-
* For example, if there is a currently 10 credits, and you use `ADJUST` with an amount of 5, the resulting balance will be 15 credits (10+5) after the adjustment.
|
|
306
|
-
*
|
|
307
|
-
* Use `SET` to change the entire balance to a specified amount.
|
|
308
|
-
* For example, if you apply `SET` with an amount of 10 credits, the resulting balance will be 10 credits, regardless of the initial balance.
|
|
309
|
-
*/
|
|
289
|
+
/** Balance change type. */
|
|
310
290
|
type?: ChangeBalanceRequestType;
|
|
311
|
-
/**
|
|
291
|
+
/** Details to send to the transaction created from this balance change. */
|
|
312
292
|
transactionDetails?: TransactionDetails;
|
|
313
293
|
}
|
|
314
294
|
/** @oneof */
|
|
315
295
|
export interface BalanceChangeBalanceRequestOperationOneOf {
|
|
316
|
-
/**
|
|
296
|
+
/** Adjust the balance by a specific amount of credits. */
|
|
317
297
|
adjustOptions?: AdjustOptions;
|
|
318
|
-
/**
|
|
298
|
+
/** Set the balance to a specific amount of credits. */
|
|
319
299
|
setOptions?: SetOptions;
|
|
320
300
|
}
|
|
321
301
|
export declare enum ChangeBalanceRequestType {
|
|
322
|
-
/** Unknown
|
|
302
|
+
/** Unknown balance change type. */
|
|
323
303
|
UNKNOWN_OPERATION = "UNKNOWN_OPERATION",
|
|
324
|
-
/**
|
|
304
|
+
/** Use with `adjustOptions`. */
|
|
325
305
|
ADJUST = "ADJUST",
|
|
326
|
-
/**
|
|
327
|
-
SET = "SET"
|
|
328
|
-
SET_INITIAL = "SET_INITIAL"
|
|
306
|
+
/** Use with `setOptions`. */
|
|
307
|
+
SET = "SET"
|
|
329
308
|
}
|
|
330
309
|
export interface AdjustOptions {
|
|
331
310
|
/**
|
|
332
|
-
* Amount to
|
|
311
|
+
* Amount to change the balance's available credits by.
|
|
312
|
+
* - To increase the balance, specify a positive number.
|
|
313
|
+
* - To decrease the balance, specify a negative number.
|
|
333
314
|
* @decimalValue options { maxScale:4 }
|
|
334
315
|
*/
|
|
335
316
|
value?: string;
|
|
336
|
-
/**
|
|
317
|
+
/** Beneficiary of the associated pool. */
|
|
337
318
|
beneficiary?: CommonIdentificationData;
|
|
338
319
|
}
|
|
339
320
|
export declare enum LimitRule {
|
|
@@ -348,13 +329,13 @@ export declare enum LimitRule {
|
|
|
348
329
|
}
|
|
349
330
|
export interface SetOptions {
|
|
350
331
|
/**
|
|
351
|
-
*
|
|
332
|
+
* Amount to set the balance's available credits to.
|
|
352
333
|
*
|
|
353
|
-
* If
|
|
334
|
+
* If this is the same as the current value, no transaction is created.
|
|
354
335
|
* @decimalValue options { maxScale:4 }
|
|
355
336
|
*/
|
|
356
337
|
value?: string;
|
|
357
|
-
/**
|
|
338
|
+
/** Beneficiary of the associated pool. */
|
|
358
339
|
beneficiary?: CommonIdentificationData;
|
|
359
340
|
}
|
|
360
341
|
export interface SetInitialOptions {
|
|
@@ -368,20 +349,19 @@ export interface SetInitialOptions {
|
|
|
368
349
|
}
|
|
369
350
|
export interface TransactionDetails {
|
|
370
351
|
/**
|
|
371
|
-
* Item associated with the
|
|
372
|
-
* The redemption of this item triggered the balance adjustment.
|
|
352
|
+
* Item associated with the transaction.
|
|
373
353
|
* @readonly
|
|
374
354
|
*/
|
|
375
355
|
item?: Item;
|
|
376
|
-
/**
|
|
356
|
+
/** Amount of items associated with the transaction. */
|
|
377
357
|
itemCount?: number | null;
|
|
378
358
|
/**
|
|
379
|
-
* Date and time the transaction was
|
|
359
|
+
* Date and time the transaction was created.
|
|
380
360
|
* @readonly
|
|
381
361
|
*/
|
|
382
362
|
effectiveDate?: Date | null;
|
|
383
363
|
/**
|
|
384
|
-
* Reason for the transaction. For example, `Redemption
|
|
364
|
+
* Reason for the transaction. For example, `Redemption`.
|
|
385
365
|
* @readonly
|
|
386
366
|
* @maxLength 256
|
|
387
367
|
*/
|
|
@@ -395,34 +375,35 @@ export interface Item {
|
|
|
395
375
|
*/
|
|
396
376
|
id?: string | null;
|
|
397
377
|
/**
|
|
398
|
-
*
|
|
378
|
+
* Item external ID.
|
|
399
379
|
* @format GUID
|
|
400
380
|
* @readonly
|
|
401
381
|
*/
|
|
402
382
|
externalId?: string | null;
|
|
403
383
|
/**
|
|
404
|
-
* Item category.
|
|
384
|
+
* Item category.
|
|
405
385
|
* @maxLength 20
|
|
406
386
|
* @readonly
|
|
407
387
|
*/
|
|
408
388
|
category?: string | null;
|
|
409
389
|
/**
|
|
390
|
+
* Item set ID.
|
|
410
391
|
* @format GUID
|
|
411
392
|
* @readonly
|
|
412
393
|
*/
|
|
413
394
|
itemSetId?: string | null;
|
|
414
395
|
/**
|
|
415
|
-
* Item
|
|
396
|
+
* Item name.
|
|
416
397
|
* @maxLength 64
|
|
417
398
|
* @readonly
|
|
418
399
|
*/
|
|
419
400
|
displayName?: string | null;
|
|
420
401
|
}
|
|
421
402
|
export interface ChangeBalanceResponse {
|
|
422
|
-
/**
|
|
403
|
+
/** Updated balance. */
|
|
423
404
|
balance?: Balance;
|
|
424
405
|
/**
|
|
425
|
-
* ID of the transaction
|
|
406
|
+
* ID of the transaction associated with this change in balance.
|
|
426
407
|
* @format GUID
|
|
427
408
|
*/
|
|
428
409
|
transactionId?: string | null;
|
|
@@ -451,7 +432,7 @@ export interface BalanceExceededLimits {
|
|
|
451
432
|
}
|
|
452
433
|
export interface BulkChangeBalancesRequest {
|
|
453
434
|
/**
|
|
454
|
-
*
|
|
435
|
+
* List of balances to change.
|
|
455
436
|
* @minSize 1
|
|
456
437
|
* @maxSize 100
|
|
457
438
|
*/
|
|
@@ -461,43 +442,25 @@ export interface BulkChangeBalancesRequest {
|
|
|
461
442
|
* Used to recognize repeated attempts to make the same request.
|
|
462
443
|
* @maxLength 200
|
|
463
444
|
*/
|
|
464
|
-
idempotencyKey
|
|
465
|
-
/** Whether to return the
|
|
445
|
+
idempotencyKey?: string;
|
|
446
|
+
/** Whether to return the full balance entities in the response. */
|
|
466
447
|
returnEntity?: boolean;
|
|
467
448
|
}
|
|
468
449
|
export declare enum Type {
|
|
469
|
-
/** Unknown
|
|
450
|
+
/** Unknown balance change type. */
|
|
470
451
|
UNKNOWN_OPERATION = "UNKNOWN_OPERATION"
|
|
471
452
|
}
|
|
472
453
|
export interface ChangeBalanceRequest extends ChangeBalanceRequestOperationOneOf {
|
|
473
454
|
/**
|
|
474
|
-
* ID of the
|
|
455
|
+
* ID of the pool associated with the balance to change. This is also the ID of the balance.
|
|
475
456
|
* @format GUID
|
|
476
457
|
*/
|
|
477
458
|
poolId?: string;
|
|
478
|
-
/**
|
|
479
|
-
* Party requesting the balance change.
|
|
480
|
-
*
|
|
481
|
-
* Possible values could include:
|
|
482
|
-
*
|
|
483
|
-
* + App owner.
|
|
484
|
-
*
|
|
485
|
-
* + Pool beneficiary.
|
|
486
|
-
*
|
|
487
|
-
* + Site admin.
|
|
488
|
-
*/
|
|
459
|
+
/** Identity changing the balance. */
|
|
489
460
|
instructingParty?: CommonIdentificationData;
|
|
490
|
-
/**
|
|
491
|
-
* Specify the type of operation to change the balance. Depending on the selected balance change type, you must use the corresponding `adjustOptions` or `setOptions` parameter.
|
|
492
|
-
*
|
|
493
|
-
* Use `ADJUST` to specify the number of credits to apply to the current balance of the benefit pool.
|
|
494
|
-
* For example, if there is a currently 10 credits, and you use `ADJUST` with an amount of 5, the resulting balance will be 15 credits (10+5) after the adjustment.
|
|
495
|
-
*
|
|
496
|
-
* Use `SET` to change the entire balance to a specified amount.
|
|
497
|
-
* For example, if you apply `SET` with an amount of 10 credits, the resulting balance will be 10 credits, regardless of the initial balance.
|
|
498
|
-
*/
|
|
461
|
+
/** Balance change type. */
|
|
499
462
|
type?: Type;
|
|
500
|
-
/**
|
|
463
|
+
/** Details to send to the transaction created from this balance change. */
|
|
501
464
|
transactionDetails?: TransactionDetails;
|
|
502
465
|
}
|
|
503
466
|
/** @oneof */
|
|
@@ -505,12 +468,12 @@ export interface ChangeBalanceRequestOperationOneOf {
|
|
|
505
468
|
}
|
|
506
469
|
export interface BulkChangeBalancesResponse {
|
|
507
470
|
/**
|
|
508
|
-
*
|
|
471
|
+
* Updated item and associated metadata.
|
|
509
472
|
* @minSize 1
|
|
510
473
|
* @maxSize 100
|
|
511
474
|
*/
|
|
512
475
|
results?: BulkChangeBalanceResult[];
|
|
513
|
-
/** Metadata
|
|
476
|
+
/** Metadata. */
|
|
514
477
|
bulkActionMetadata?: BulkActionMetadata;
|
|
515
478
|
}
|
|
516
479
|
export interface ItemMetadata {
|
|
@@ -535,9 +498,9 @@ export interface ApplicationError {
|
|
|
535
498
|
data?: Record<string, any> | null;
|
|
536
499
|
}
|
|
537
500
|
export interface BulkChangeBalanceResult {
|
|
538
|
-
/**
|
|
501
|
+
/** Item metadata. */
|
|
539
502
|
itemMetadata?: ItemMetadata;
|
|
540
|
-
/**
|
|
503
|
+
/** Updated item. */
|
|
541
504
|
balance?: Balance;
|
|
542
505
|
}
|
|
543
506
|
export interface BulkActionMetadata {
|
|
@@ -550,7 +513,7 @@ export interface BulkActionMetadata {
|
|
|
550
513
|
}
|
|
551
514
|
export interface RevertBalanceChangeRequest {
|
|
552
515
|
/**
|
|
553
|
-
* ID of the
|
|
516
|
+
* ID of the transaction associated with the balance change to revert.
|
|
554
517
|
* @format GUID
|
|
555
518
|
*/
|
|
556
519
|
transactionId: string;
|
|
@@ -560,22 +523,12 @@ export interface RevertBalanceChangeRequest {
|
|
|
560
523
|
* @maxLength 200
|
|
561
524
|
*/
|
|
562
525
|
idempotencyKey: string;
|
|
563
|
-
/**
|
|
564
|
-
* Party requesting the balance change.
|
|
565
|
-
*
|
|
566
|
-
* Possible values could include:
|
|
567
|
-
*
|
|
568
|
-
* + App owner.
|
|
569
|
-
*
|
|
570
|
-
* + Pool beneficiary.
|
|
571
|
-
*
|
|
572
|
-
* + Site admin.
|
|
573
|
-
*/
|
|
526
|
+
/** Identity reverting the balance change. */
|
|
574
527
|
instructingParty?: CommonIdentificationData;
|
|
575
528
|
}
|
|
576
529
|
export interface RevertBalanceChangeResponse {
|
|
577
530
|
/**
|
|
578
|
-
* ID of the
|
|
531
|
+
* ID of the transaction associated with the balance reversion.
|
|
579
532
|
* @format GUID
|
|
580
533
|
*/
|
|
581
534
|
transactionId?: string | null;
|
|
@@ -792,26 +745,4 @@ export interface QueryBalancesResponseNonNullableFields {
|
|
|
792
745
|
export interface ChangeBalanceResponseNonNullableFields {
|
|
793
746
|
balance?: BalanceNonNullableFields;
|
|
794
747
|
}
|
|
795
|
-
interface ApplicationErrorNonNullableFields {
|
|
796
|
-
code: string;
|
|
797
|
-
description: string;
|
|
798
|
-
}
|
|
799
|
-
interface ItemMetadataNonNullableFields {
|
|
800
|
-
originalIndex: number;
|
|
801
|
-
success: boolean;
|
|
802
|
-
error?: ApplicationErrorNonNullableFields;
|
|
803
|
-
}
|
|
804
|
-
interface BulkChangeBalanceResultNonNullableFields {
|
|
805
|
-
itemMetadata?: ItemMetadataNonNullableFields;
|
|
806
|
-
balance?: BalanceNonNullableFields;
|
|
807
|
-
}
|
|
808
|
-
interface BulkActionMetadataNonNullableFields {
|
|
809
|
-
totalSuccesses: number;
|
|
810
|
-
totalFailures: number;
|
|
811
|
-
undetailedFailures: number;
|
|
812
|
-
}
|
|
813
|
-
export interface BulkChangeBalancesResponseNonNullableFields {
|
|
814
|
-
results: BulkChangeBalanceResultNonNullableFields[];
|
|
815
|
-
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
|
|
816
|
-
}
|
|
817
748
|
export {};
|
|
@@ -18,13 +18,12 @@ export var SortOrder;
|
|
|
18
18
|
})(SortOrder || (SortOrder = {}));
|
|
19
19
|
export var ChangeBalanceRequestType;
|
|
20
20
|
(function (ChangeBalanceRequestType) {
|
|
21
|
-
/** Unknown
|
|
21
|
+
/** Unknown balance change type. */
|
|
22
22
|
ChangeBalanceRequestType["UNKNOWN_OPERATION"] = "UNKNOWN_OPERATION";
|
|
23
|
-
/**
|
|
23
|
+
/** Use with `adjustOptions`. */
|
|
24
24
|
ChangeBalanceRequestType["ADJUST"] = "ADJUST";
|
|
25
|
-
/**
|
|
25
|
+
/** Use with `setOptions`. */
|
|
26
26
|
ChangeBalanceRequestType["SET"] = "SET";
|
|
27
|
-
ChangeBalanceRequestType["SET_INITIAL"] = "SET_INITIAL";
|
|
28
27
|
})(ChangeBalanceRequestType || (ChangeBalanceRequestType = {}));
|
|
29
28
|
export var LimitRule;
|
|
30
29
|
(function (LimitRule) {
|
|
@@ -39,7 +38,7 @@ export var LimitRule;
|
|
|
39
38
|
})(LimitRule || (LimitRule = {}));
|
|
40
39
|
export var Type;
|
|
41
40
|
(function (Type) {
|
|
42
|
-
/** Unknown
|
|
41
|
+
/** Unknown balance change type. */
|
|
43
42
|
Type["UNKNOWN_OPERATION"] = "UNKNOWN_OPERATION";
|
|
44
43
|
})(Type || (Type = {}));
|
|
45
44
|
/** Transaction reversibility results */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"benefit-programs-v1-balance-balances.types.js","sourceRoot":"","sources":["../../../src/benefit-programs-v1-balance-balances.types.ts"],"names":[],"mappings":"AAyFA,MAAM,CAAN,IAAY,YASX;AATD,WAAY,YAAY;IACtB,4CAA4C;IAC5C,mCAAmB,CAAA;IACnB,4CAA4C;IAC5C,uDAAuC,CAAA;IACvC,+BAA+B;IAC/B,iCAAiB,CAAA;IACjB,iEAAiE;IACjE,qCAAqB,CAAA;AACvB,CAAC,EATW,YAAY,KAAZ,YAAY,QASvB;
|
|
1
|
+
{"version":3,"file":"benefit-programs-v1-balance-balances.types.js","sourceRoot":"","sources":["../../../src/benefit-programs-v1-balance-balances.types.ts"],"names":[],"mappings":"AAyFA,MAAM,CAAN,IAAY,YASX;AATD,WAAY,YAAY;IACtB,4CAA4C;IAC5C,mCAAmB,CAAA;IACnB,4CAA4C;IAC5C,uDAAuC,CAAA;IACvC,+BAA+B;IAC/B,iCAAiB,CAAA;IACjB,iEAAiE;IACjE,qCAAqB,CAAA;AACvB,CAAC,EATW,YAAY,KAAZ,YAAY,QASvB;AAmLD,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,4BAA4B;IAC5B,wBAAW,CAAA;IACX,6BAA6B;IAC7B,0BAAa,CAAA;AACf,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB;AA0CD,MAAM,CAAN,IAAY,wBAOX;AAPD,WAAY,wBAAwB;IAClC,mCAAmC;IACnC,mEAAuC,CAAA;IACvC,gCAAgC;IAChC,6CAAiB,CAAA;IACjB,6BAA6B;IAC7B,uCAAW,CAAA;AACb,CAAC,EAPW,wBAAwB,KAAxB,wBAAwB,QAOnC;AAcD,MAAM,CAAN,IAAY,SASX;AATD,WAAY,SAAS;IACnB,yBAAyB;IACzB,sDAAyC,CAAA;IACzC,wDAAwD;IACxD,0BAAa,CAAA;IACb,mMAAmM;IACnM,0CAA6B,CAAA;IAC7B,kTAAkT;IAClT,0CAA6B,CAAA;AAC/B,CAAC,EATW,SAAS,KAAT,SAAS,QASpB;AAgID,MAAM,CAAN,IAAY,IAGX;AAHD,WAAY,IAAI;IACd,mCAAmC;IACnC,+CAAuC,CAAA;AACzC,CAAC,EAHW,IAAI,KAAJ,IAAI,QAGf;AAmID,wCAAwC;AACxC,MAAM,CAAN,IAAY,wBAKX;AALD,WAAY,wBAAwB;IAClC,4CAA4C;IAC5C,mFAAuD,CAAA;IACvD,gFAAgF;IAChF,yFAA6D,CAAA;AAC/D,CAAC,EALW,wBAAwB,KAAxB,wBAAwB,QAKnC;AAmJD,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B"}
|