flexinet-api 0.0.259-prerelease0 → 0.0.263-prerelease0
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/README.md +2 -2
- package/api.ts +1095 -379
- package/dist/api.d.ts +624 -185
- package/dist/api.js +779 -278
- package/dist/esm/api.d.ts +624 -185
- package/dist/esm/api.js +773 -272
- package/package.json +1 -1
package/api.ts
CHANGED
|
@@ -144,12 +144,6 @@ export interface Balance {
|
|
|
144
144
|
* @memberof Balance
|
|
145
145
|
*/
|
|
146
146
|
'id': string;
|
|
147
|
-
/**
|
|
148
|
-
*
|
|
149
|
-
* @type {string}
|
|
150
|
-
* @memberof Balance
|
|
151
|
-
*/
|
|
152
|
-
'kind': string;
|
|
153
147
|
/**
|
|
154
148
|
*
|
|
155
149
|
* @type {number}
|
|
@@ -158,10 +152,10 @@ export interface Balance {
|
|
|
158
152
|
'amount': number;
|
|
159
153
|
/**
|
|
160
154
|
*
|
|
161
|
-
* @type {
|
|
155
|
+
* @type {Beneficiary}
|
|
162
156
|
* @memberof Balance
|
|
163
157
|
*/
|
|
164
|
-
'
|
|
158
|
+
'beneficiary': Beneficiary;
|
|
165
159
|
}
|
|
166
160
|
/**
|
|
167
161
|
*
|
|
@@ -177,10 +171,31 @@ export interface BalanceUpdateRequest {
|
|
|
177
171
|
'amount': number;
|
|
178
172
|
/**
|
|
179
173
|
*
|
|
180
|
-
* @type {
|
|
174
|
+
* @type {BeneficiaryKind}
|
|
181
175
|
* @memberof BalanceUpdateRequest
|
|
182
176
|
*/
|
|
183
|
-
'
|
|
177
|
+
'beneficiaryKind': BeneficiaryKind;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
*
|
|
183
|
+
* @export
|
|
184
|
+
* @interface Beneficiary
|
|
185
|
+
*/
|
|
186
|
+
export interface Beneficiary {
|
|
187
|
+
/**
|
|
188
|
+
*
|
|
189
|
+
* @type {string}
|
|
190
|
+
* @memberof Beneficiary
|
|
191
|
+
*/
|
|
192
|
+
'value': string;
|
|
193
|
+
/**
|
|
194
|
+
*
|
|
195
|
+
* @type {BeneficiaryKind}
|
|
196
|
+
* @memberof Beneficiary
|
|
197
|
+
*/
|
|
198
|
+
'kind': BeneficiaryKind;
|
|
184
199
|
}
|
|
185
200
|
|
|
186
201
|
|
|
@@ -190,12 +205,12 @@ export interface BalanceUpdateRequest {
|
|
|
190
205
|
* @enum {string}
|
|
191
206
|
*/
|
|
192
207
|
|
|
193
|
-
export const
|
|
208
|
+
export const BeneficiaryKind = {
|
|
194
209
|
User: 'user',
|
|
195
210
|
Client: 'client'
|
|
196
211
|
} as const;
|
|
197
212
|
|
|
198
|
-
export type
|
|
213
|
+
export type BeneficiaryKind = typeof BeneficiaryKind[keyof typeof BeneficiaryKind];
|
|
199
214
|
|
|
200
215
|
|
|
201
216
|
/**
|
|
@@ -252,6 +267,31 @@ export interface BulkNotificationsReadRequest {
|
|
|
252
267
|
*/
|
|
253
268
|
'notificationIds': Array<string>;
|
|
254
269
|
}
|
|
270
|
+
/**
|
|
271
|
+
*
|
|
272
|
+
* @export
|
|
273
|
+
* @interface CallbackOrder
|
|
274
|
+
*/
|
|
275
|
+
export interface CallbackOrder {
|
|
276
|
+
/**
|
|
277
|
+
*
|
|
278
|
+
* @type {Order}
|
|
279
|
+
* @memberof CallbackOrder
|
|
280
|
+
*/
|
|
281
|
+
'order'?: Order;
|
|
282
|
+
/**
|
|
283
|
+
*
|
|
284
|
+
* @type {string}
|
|
285
|
+
* @memberof CallbackOrder
|
|
286
|
+
*/
|
|
287
|
+
'id'?: string;
|
|
288
|
+
/**
|
|
289
|
+
*
|
|
290
|
+
* @type {string}
|
|
291
|
+
* @memberof CallbackOrder
|
|
292
|
+
*/
|
|
293
|
+
'status'?: string;
|
|
294
|
+
}
|
|
255
295
|
/**
|
|
256
296
|
*
|
|
257
297
|
* @export
|
|
@@ -360,6 +400,19 @@ export const Condition = {
|
|
|
360
400
|
export type Condition = typeof Condition[keyof typeof Condition];
|
|
361
401
|
|
|
362
402
|
|
|
403
|
+
/**
|
|
404
|
+
*
|
|
405
|
+
* @export
|
|
406
|
+
* @interface CreateOrderRequest
|
|
407
|
+
*/
|
|
408
|
+
export interface CreateOrderRequest {
|
|
409
|
+
/**
|
|
410
|
+
*
|
|
411
|
+
* @type {OrderCreationRequest}
|
|
412
|
+
* @memberof CreateOrderRequest
|
|
413
|
+
*/
|
|
414
|
+
'tag'?: OrderCreationRequest;
|
|
415
|
+
}
|
|
363
416
|
/**
|
|
364
417
|
*
|
|
365
418
|
* @export
|
|
@@ -561,6 +614,25 @@ export type EventCreationRequestKindEnum = typeof EventCreationRequestKindEnum[k
|
|
|
561
614
|
*/
|
|
562
615
|
export type EventCreationRequestDetails = object;
|
|
563
616
|
|
|
617
|
+
/**
|
|
618
|
+
*
|
|
619
|
+
* @export
|
|
620
|
+
* @interface Item
|
|
621
|
+
*/
|
|
622
|
+
export interface Item {
|
|
623
|
+
/**
|
|
624
|
+
*
|
|
625
|
+
* @type {number}
|
|
626
|
+
* @memberof Item
|
|
627
|
+
*/
|
|
628
|
+
'qty': number;
|
|
629
|
+
/**
|
|
630
|
+
*
|
|
631
|
+
* @type {Product}
|
|
632
|
+
* @memberof Item
|
|
633
|
+
*/
|
|
634
|
+
'product': Product;
|
|
635
|
+
}
|
|
564
636
|
/**
|
|
565
637
|
*
|
|
566
638
|
* @export
|
|
@@ -777,6 +849,114 @@ export const NotificationStatus = {
|
|
|
777
849
|
export type NotificationStatus = typeof NotificationStatus[keyof typeof NotificationStatus];
|
|
778
850
|
|
|
779
851
|
|
|
852
|
+
/**
|
|
853
|
+
*
|
|
854
|
+
* @export
|
|
855
|
+
* @interface Order
|
|
856
|
+
*/
|
|
857
|
+
export interface Order {
|
|
858
|
+
/**
|
|
859
|
+
*
|
|
860
|
+
* @type {Balance}
|
|
861
|
+
* @memberof Order
|
|
862
|
+
*/
|
|
863
|
+
'balance': Balance;
|
|
864
|
+
/**
|
|
865
|
+
*
|
|
866
|
+
* @type {Array<Item>}
|
|
867
|
+
* @memberof Order
|
|
868
|
+
*/
|
|
869
|
+
'items': Array<Item>;
|
|
870
|
+
/**
|
|
871
|
+
*
|
|
872
|
+
* @type {string}
|
|
873
|
+
* @memberof Order
|
|
874
|
+
*/
|
|
875
|
+
'id'?: string;
|
|
876
|
+
/**
|
|
877
|
+
*
|
|
878
|
+
* @type {string}
|
|
879
|
+
* @memberof Order
|
|
880
|
+
*/
|
|
881
|
+
'createdAt'?: string;
|
|
882
|
+
/**
|
|
883
|
+
*
|
|
884
|
+
* @type {string}
|
|
885
|
+
* @memberof Order
|
|
886
|
+
*/
|
|
887
|
+
'kind'?: OrderKindEnum;
|
|
888
|
+
/**
|
|
889
|
+
*
|
|
890
|
+
* @type {string}
|
|
891
|
+
* @memberof Order
|
|
892
|
+
*/
|
|
893
|
+
'source'?: string;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
export const OrderKindEnum = {
|
|
897
|
+
Webshop: 'webshop',
|
|
898
|
+
Promotions: 'promotions'
|
|
899
|
+
} as const;
|
|
900
|
+
|
|
901
|
+
export type OrderKindEnum = typeof OrderKindEnum[keyof typeof OrderKindEnum];
|
|
902
|
+
|
|
903
|
+
/**
|
|
904
|
+
*
|
|
905
|
+
* @export
|
|
906
|
+
* @interface OrderCreationRequest
|
|
907
|
+
*/
|
|
908
|
+
export interface OrderCreationRequest {
|
|
909
|
+
/**
|
|
910
|
+
*
|
|
911
|
+
* @type {string}
|
|
912
|
+
* @memberof OrderCreationRequest
|
|
913
|
+
*/
|
|
914
|
+
'balanceID': string;
|
|
915
|
+
/**
|
|
916
|
+
*
|
|
917
|
+
* @type {Array<OrderItemCreationRequest>}
|
|
918
|
+
* @memberof OrderCreationRequest
|
|
919
|
+
*/
|
|
920
|
+
'items': Array<OrderItemCreationRequest>;
|
|
921
|
+
}
|
|
922
|
+
/**
|
|
923
|
+
*
|
|
924
|
+
* @export
|
|
925
|
+
* @interface OrderItemCreationRequest
|
|
926
|
+
*/
|
|
927
|
+
export interface OrderItemCreationRequest {
|
|
928
|
+
/**
|
|
929
|
+
*
|
|
930
|
+
* @type {number}
|
|
931
|
+
* @memberof OrderItemCreationRequest
|
|
932
|
+
*/
|
|
933
|
+
'qty': number;
|
|
934
|
+
/**
|
|
935
|
+
*
|
|
936
|
+
* @type {string}
|
|
937
|
+
* @memberof OrderItemCreationRequest
|
|
938
|
+
*/
|
|
939
|
+
'productId': string;
|
|
940
|
+
}
|
|
941
|
+
/**
|
|
942
|
+
*
|
|
943
|
+
* @export
|
|
944
|
+
* @interface OrderListResponse
|
|
945
|
+
*/
|
|
946
|
+
export interface OrderListResponse {
|
|
947
|
+
/**
|
|
948
|
+
*
|
|
949
|
+
* @type {Array<Order>}
|
|
950
|
+
* @memberof OrderListResponse
|
|
951
|
+
*/
|
|
952
|
+
'orders': Array<Order>;
|
|
953
|
+
/**
|
|
954
|
+
* This is the pagination token
|
|
955
|
+
* @type {string}
|
|
956
|
+
* @memberof OrderListResponse
|
|
957
|
+
*/
|
|
958
|
+
'nextToken'?: string;
|
|
959
|
+
}
|
|
780
960
|
/**
|
|
781
961
|
*
|
|
782
962
|
* @export
|
|
@@ -864,10 +1044,10 @@ export interface Product {
|
|
|
864
1044
|
'source': string;
|
|
865
1045
|
/**
|
|
866
1046
|
*
|
|
867
|
-
* @type {Array<
|
|
1047
|
+
* @type {Array<Segment>}
|
|
868
1048
|
* @memberof Product
|
|
869
1049
|
*/
|
|
870
|
-
'segments': Array<
|
|
1050
|
+
'segments': Array<Segment>;
|
|
871
1051
|
/**
|
|
872
1052
|
*
|
|
873
1053
|
* @type {ProductKind}
|
|
@@ -996,10 +1176,10 @@ export interface ProductCreationRequest {
|
|
|
996
1176
|
'source': string;
|
|
997
1177
|
/**
|
|
998
1178
|
*
|
|
999
|
-
* @type {Array<
|
|
1179
|
+
* @type {Array<Segment>}
|
|
1000
1180
|
* @memberof ProductCreationRequest
|
|
1001
1181
|
*/
|
|
1002
|
-
'segments': Array<
|
|
1182
|
+
'segments': Array<Segment>;
|
|
1003
1183
|
/**
|
|
1004
1184
|
*
|
|
1005
1185
|
* @type {ProductKind}
|
|
@@ -1282,10 +1462,10 @@ export interface Progress {
|
|
|
1282
1462
|
'state': ProgressState;
|
|
1283
1463
|
/**
|
|
1284
1464
|
*
|
|
1285
|
-
* @type {
|
|
1465
|
+
* @type {Beneficiary}
|
|
1286
1466
|
* @memberof Progress
|
|
1287
1467
|
*/
|
|
1288
|
-
'beneficiary':
|
|
1468
|
+
'beneficiary': Beneficiary;
|
|
1289
1469
|
/**
|
|
1290
1470
|
*
|
|
1291
1471
|
* @type {number}
|
|
@@ -1354,10 +1534,10 @@ export interface Promotion {
|
|
|
1354
1534
|
'description': string;
|
|
1355
1535
|
/**
|
|
1356
1536
|
*
|
|
1357
|
-
* @type {
|
|
1537
|
+
* @type {BeneficiaryKind}
|
|
1358
1538
|
* @memberof Promotion
|
|
1359
1539
|
*/
|
|
1360
|
-
'
|
|
1540
|
+
'beneficiaryKind'?: BeneficiaryKind;
|
|
1361
1541
|
/**
|
|
1362
1542
|
*
|
|
1363
1543
|
* @type {Array<string>}
|
|
@@ -1475,6 +1655,19 @@ export interface Promotion {
|
|
|
1475
1655
|
}
|
|
1476
1656
|
|
|
1477
1657
|
|
|
1658
|
+
/**
|
|
1659
|
+
*
|
|
1660
|
+
* @export
|
|
1661
|
+
* @interface PromotionClaimRequest
|
|
1662
|
+
*/
|
|
1663
|
+
export interface PromotionClaimRequest {
|
|
1664
|
+
/**
|
|
1665
|
+
*
|
|
1666
|
+
* @type {string}
|
|
1667
|
+
* @memberof PromotionClaimRequest
|
|
1668
|
+
*/
|
|
1669
|
+
'userId': string;
|
|
1670
|
+
}
|
|
1478
1671
|
/**
|
|
1479
1672
|
*
|
|
1480
1673
|
* @export
|
|
@@ -1495,10 +1688,10 @@ export interface PromotionRequest {
|
|
|
1495
1688
|
'description': string;
|
|
1496
1689
|
/**
|
|
1497
1690
|
*
|
|
1498
|
-
* @type {
|
|
1691
|
+
* @type {BeneficiaryKind}
|
|
1499
1692
|
* @memberof PromotionRequest
|
|
1500
1693
|
*/
|
|
1501
|
-
'
|
|
1694
|
+
'beneficiaryKind': BeneficiaryKind;
|
|
1502
1695
|
/**
|
|
1503
1696
|
*
|
|
1504
1697
|
* @type {Target}
|
|
@@ -1607,20 +1800,6 @@ export interface PromotionsResponse {
|
|
|
1607
1800
|
*/
|
|
1608
1801
|
'nextToken'?: string;
|
|
1609
1802
|
}
|
|
1610
|
-
/**
|
|
1611
|
-
*
|
|
1612
|
-
* @export
|
|
1613
|
-
* @enum {string}
|
|
1614
|
-
*/
|
|
1615
|
-
|
|
1616
|
-
export const ReceiverKind = {
|
|
1617
|
-
User: 'user',
|
|
1618
|
-
Client: 'client'
|
|
1619
|
-
} as const;
|
|
1620
|
-
|
|
1621
|
-
export type ReceiverKind = typeof ReceiverKind[keyof typeof ReceiverKind];
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
1803
|
/**
|
|
1625
1804
|
*
|
|
1626
1805
|
* @export
|
|
@@ -2257,10 +2436,10 @@ export interface Transaction {
|
|
|
2257
2436
|
'amount': number;
|
|
2258
2437
|
/**
|
|
2259
2438
|
*
|
|
2260
|
-
* @type {
|
|
2439
|
+
* @type {Beneficiary}
|
|
2261
2440
|
* @memberof Transaction
|
|
2262
2441
|
*/
|
|
2263
|
-
'
|
|
2442
|
+
'beneficiary': Beneficiary;
|
|
2264
2443
|
/**
|
|
2265
2444
|
*
|
|
2266
2445
|
* @type {string}
|
|
@@ -2296,12 +2475,6 @@ export interface TransactionsResponse {
|
|
|
2296
2475
|
* @memberof TransactionsResponse
|
|
2297
2476
|
*/
|
|
2298
2477
|
'transactions': Array<Transaction>;
|
|
2299
|
-
/**
|
|
2300
|
-
* This is the previous pagination token
|
|
2301
|
-
* @type {string}
|
|
2302
|
-
* @memberof TransactionsResponse
|
|
2303
|
-
*/
|
|
2304
|
-
'previousToken'?: string;
|
|
2305
2478
|
/**
|
|
2306
2479
|
* This is the pagination token
|
|
2307
2480
|
* @type {string}
|
|
@@ -2571,7 +2744,7 @@ export interface Webhook {
|
|
|
2571
2744
|
*/
|
|
2572
2745
|
|
|
2573
2746
|
export const WebhookKind = {
|
|
2574
|
-
|
|
2747
|
+
Order: 'order'
|
|
2575
2748
|
} as const;
|
|
2576
2749
|
|
|
2577
2750
|
export type WebhookKind = typeof WebhookKind[keyof typeof WebhookKind];
|
|
@@ -2802,13 +2975,16 @@ export const BalanceApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
2802
2975
|
/**
|
|
2803
2976
|
* Get balance
|
|
2804
2977
|
* @summary Get balance
|
|
2805
|
-
* @param {string}
|
|
2978
|
+
* @param {string} beneficiaryValue This is the beneficiary value
|
|
2979
|
+
* @param {BeneficiaryKind} kind This is the beneficiary kind
|
|
2806
2980
|
* @param {*} [options] Override http request option.
|
|
2807
2981
|
* @throws {RequiredError}
|
|
2808
2982
|
*/
|
|
2809
|
-
getBalance: async (
|
|
2810
|
-
// verify required parameter '
|
|
2811
|
-
assertParamExists('getBalance', '
|
|
2983
|
+
getBalance: async (beneficiaryValue: string, kind: BeneficiaryKind, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
2984
|
+
// verify required parameter 'beneficiaryValue' is not null or undefined
|
|
2985
|
+
assertParamExists('getBalance', 'beneficiaryValue', beneficiaryValue)
|
|
2986
|
+
// verify required parameter 'kind' is not null or undefined
|
|
2987
|
+
assertParamExists('getBalance', 'kind', kind)
|
|
2812
2988
|
const localVarPath = `/balances`;
|
|
2813
2989
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2814
2990
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -2825,8 +3001,12 @@ export const BalanceApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
2825
3001
|
// http bearer authentication required
|
|
2826
3002
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
2827
3003
|
|
|
2828
|
-
if (
|
|
2829
|
-
localVarQueryParameter['
|
|
3004
|
+
if (beneficiaryValue !== undefined) {
|
|
3005
|
+
localVarQueryParameter['beneficiaryValue'] = beneficiaryValue;
|
|
3006
|
+
}
|
|
3007
|
+
|
|
3008
|
+
if (kind !== undefined) {
|
|
3009
|
+
localVarQueryParameter['kind'] = kind;
|
|
2830
3010
|
}
|
|
2831
3011
|
|
|
2832
3012
|
|
|
@@ -2843,16 +3023,16 @@ export const BalanceApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
2843
3023
|
/**
|
|
2844
3024
|
* Transfer balance
|
|
2845
3025
|
* @summary Transfer balance
|
|
2846
|
-
* @param {string}
|
|
3026
|
+
* @param {string} beneficiaryValue ID of the beneficiary where we want to update balance.
|
|
2847
3027
|
* @param {BalanceUpdateRequest} [balanceUpdateRequest]
|
|
2848
3028
|
* @param {*} [options] Override http request option.
|
|
2849
3029
|
* @throws {RequiredError}
|
|
2850
3030
|
*/
|
|
2851
|
-
transferBalance: async (
|
|
2852
|
-
// verify required parameter '
|
|
2853
|
-
assertParamExists('transferBalance', '
|
|
2854
|
-
const localVarPath = `/balances/{
|
|
2855
|
-
.replace(`{${"
|
|
3031
|
+
transferBalance: async (beneficiaryValue: string, balanceUpdateRequest?: BalanceUpdateRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3032
|
+
// verify required parameter 'beneficiaryValue' is not null or undefined
|
|
3033
|
+
assertParamExists('transferBalance', 'beneficiaryValue', beneficiaryValue)
|
|
3034
|
+
const localVarPath = `/balances/{beneficiaryValue}/transfer`
|
|
3035
|
+
.replace(`{${"beneficiaryValue"}}`, encodeURIComponent(String(beneficiaryValue)));
|
|
2856
3036
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2857
3037
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2858
3038
|
let baseOptions;
|
|
@@ -2881,16 +3061,16 @@ export const BalanceApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
2881
3061
|
/**
|
|
2882
3062
|
* Manually update balance. Used as manual compensation for out of stock products.
|
|
2883
3063
|
* @summary Manually update balance
|
|
2884
|
-
* @param {string}
|
|
3064
|
+
* @param {string} beneficiaryValue ID of the beneficiary where we want to update balance.
|
|
2885
3065
|
* @param {BalanceUpdateRequest} [balanceUpdateRequest]
|
|
2886
3066
|
* @param {*} [options] Override http request option.
|
|
2887
3067
|
* @throws {RequiredError}
|
|
2888
3068
|
*/
|
|
2889
|
-
updateBalance: async (
|
|
2890
|
-
// verify required parameter '
|
|
2891
|
-
assertParamExists('updateBalance', '
|
|
2892
|
-
const localVarPath = `/balances/{
|
|
2893
|
-
.replace(`{${"
|
|
3069
|
+
updateBalance: async (beneficiaryValue: string, balanceUpdateRequest?: BalanceUpdateRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3070
|
+
// verify required parameter 'beneficiaryValue' is not null or undefined
|
|
3071
|
+
assertParamExists('updateBalance', 'beneficiaryValue', beneficiaryValue)
|
|
3072
|
+
const localVarPath = `/balances/{beneficiaryValue}`
|
|
3073
|
+
.replace(`{${"beneficiaryValue"}}`, encodeURIComponent(String(beneficiaryValue)));
|
|
2894
3074
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2895
3075
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2896
3076
|
let baseOptions;
|
|
@@ -2929,36 +3109,37 @@ export const BalanceApiFp = function(configuration?: Configuration) {
|
|
|
2929
3109
|
/**
|
|
2930
3110
|
* Get balance
|
|
2931
3111
|
* @summary Get balance
|
|
2932
|
-
* @param {string}
|
|
3112
|
+
* @param {string} beneficiaryValue This is the beneficiary value
|
|
3113
|
+
* @param {BeneficiaryKind} kind This is the beneficiary kind
|
|
2933
3114
|
* @param {*} [options] Override http request option.
|
|
2934
3115
|
* @throws {RequiredError}
|
|
2935
3116
|
*/
|
|
2936
|
-
async getBalance(
|
|
2937
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getBalance(
|
|
3117
|
+
async getBalance(beneficiaryValue: string, kind: BeneficiaryKind, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Balance>> {
|
|
3118
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getBalance(beneficiaryValue, kind, options);
|
|
2938
3119
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2939
3120
|
},
|
|
2940
3121
|
/**
|
|
2941
3122
|
* Transfer balance
|
|
2942
3123
|
* @summary Transfer balance
|
|
2943
|
-
* @param {string}
|
|
3124
|
+
* @param {string} beneficiaryValue ID of the beneficiary where we want to update balance.
|
|
2944
3125
|
* @param {BalanceUpdateRequest} [balanceUpdateRequest]
|
|
2945
3126
|
* @param {*} [options] Override http request option.
|
|
2946
3127
|
* @throws {RequiredError}
|
|
2947
3128
|
*/
|
|
2948
|
-
async transferBalance(
|
|
2949
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.transferBalance(
|
|
3129
|
+
async transferBalance(beneficiaryValue: string, balanceUpdateRequest?: BalanceUpdateRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
3130
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.transferBalance(beneficiaryValue, balanceUpdateRequest, options);
|
|
2950
3131
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2951
3132
|
},
|
|
2952
3133
|
/**
|
|
2953
3134
|
* Manually update balance. Used as manual compensation for out of stock products.
|
|
2954
3135
|
* @summary Manually update balance
|
|
2955
|
-
* @param {string}
|
|
3136
|
+
* @param {string} beneficiaryValue ID of the beneficiary where we want to update balance.
|
|
2956
3137
|
* @param {BalanceUpdateRequest} [balanceUpdateRequest]
|
|
2957
3138
|
* @param {*} [options] Override http request option.
|
|
2958
3139
|
* @throws {RequiredError}
|
|
2959
3140
|
*/
|
|
2960
|
-
async updateBalance(
|
|
2961
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.updateBalance(
|
|
3141
|
+
async updateBalance(beneficiaryValue: string, balanceUpdateRequest?: BalanceUpdateRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
3142
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateBalance(beneficiaryValue, balanceUpdateRequest, options);
|
|
2962
3143
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2963
3144
|
},
|
|
2964
3145
|
}
|
|
@@ -2974,34 +3155,35 @@ export const BalanceApiFactory = function (configuration?: Configuration, basePa
|
|
|
2974
3155
|
/**
|
|
2975
3156
|
* Get balance
|
|
2976
3157
|
* @summary Get balance
|
|
2977
|
-
* @param {string}
|
|
3158
|
+
* @param {string} beneficiaryValue This is the beneficiary value
|
|
3159
|
+
* @param {BeneficiaryKind} kind This is the beneficiary kind
|
|
2978
3160
|
* @param {*} [options] Override http request option.
|
|
2979
3161
|
* @throws {RequiredError}
|
|
2980
3162
|
*/
|
|
2981
|
-
getBalance(
|
|
2982
|
-
return localVarFp.getBalance(
|
|
3163
|
+
getBalance(beneficiaryValue: string, kind: BeneficiaryKind, options?: any): AxiosPromise<Balance> {
|
|
3164
|
+
return localVarFp.getBalance(beneficiaryValue, kind, options).then((request) => request(axios, basePath));
|
|
2983
3165
|
},
|
|
2984
3166
|
/**
|
|
2985
3167
|
* Transfer balance
|
|
2986
3168
|
* @summary Transfer balance
|
|
2987
|
-
* @param {string}
|
|
3169
|
+
* @param {string} beneficiaryValue ID of the beneficiary where we want to update balance.
|
|
2988
3170
|
* @param {BalanceUpdateRequest} [balanceUpdateRequest]
|
|
2989
3171
|
* @param {*} [options] Override http request option.
|
|
2990
3172
|
* @throws {RequiredError}
|
|
2991
3173
|
*/
|
|
2992
|
-
transferBalance(
|
|
2993
|
-
return localVarFp.transferBalance(
|
|
3174
|
+
transferBalance(beneficiaryValue: string, balanceUpdateRequest?: BalanceUpdateRequest, options?: any): AxiosPromise<void> {
|
|
3175
|
+
return localVarFp.transferBalance(beneficiaryValue, balanceUpdateRequest, options).then((request) => request(axios, basePath));
|
|
2994
3176
|
},
|
|
2995
3177
|
/**
|
|
2996
3178
|
* Manually update balance. Used as manual compensation for out of stock products.
|
|
2997
3179
|
* @summary Manually update balance
|
|
2998
|
-
* @param {string}
|
|
3180
|
+
* @param {string} beneficiaryValue ID of the beneficiary where we want to update balance.
|
|
2999
3181
|
* @param {BalanceUpdateRequest} [balanceUpdateRequest]
|
|
3000
3182
|
* @param {*} [options] Override http request option.
|
|
3001
3183
|
* @throws {RequiredError}
|
|
3002
3184
|
*/
|
|
3003
|
-
updateBalance(
|
|
3004
|
-
return localVarFp.updateBalance(
|
|
3185
|
+
updateBalance(beneficiaryValue: string, balanceUpdateRequest?: BalanceUpdateRequest, options?: any): AxiosPromise<void> {
|
|
3186
|
+
return localVarFp.updateBalance(beneficiaryValue, balanceUpdateRequest, options).then((request) => request(axios, basePath));
|
|
3005
3187
|
},
|
|
3006
3188
|
};
|
|
3007
3189
|
};
|
|
@@ -3016,39 +3198,40 @@ export class BalanceApi extends BaseAPI {
|
|
|
3016
3198
|
/**
|
|
3017
3199
|
* Get balance
|
|
3018
3200
|
* @summary Get balance
|
|
3019
|
-
* @param {string}
|
|
3201
|
+
* @param {string} beneficiaryValue This is the beneficiary value
|
|
3202
|
+
* @param {BeneficiaryKind} kind This is the beneficiary kind
|
|
3020
3203
|
* @param {*} [options] Override http request option.
|
|
3021
3204
|
* @throws {RequiredError}
|
|
3022
3205
|
* @memberof BalanceApi
|
|
3023
3206
|
*/
|
|
3024
|
-
public getBalance(
|
|
3025
|
-
return BalanceApiFp(this.configuration).getBalance(
|
|
3207
|
+
public getBalance(beneficiaryValue: string, kind: BeneficiaryKind, options?: AxiosRequestConfig) {
|
|
3208
|
+
return BalanceApiFp(this.configuration).getBalance(beneficiaryValue, kind, options).then((request) => request(this.axios, this.basePath));
|
|
3026
3209
|
}
|
|
3027
3210
|
|
|
3028
3211
|
/**
|
|
3029
3212
|
* Transfer balance
|
|
3030
3213
|
* @summary Transfer balance
|
|
3031
|
-
* @param {string}
|
|
3214
|
+
* @param {string} beneficiaryValue ID of the beneficiary where we want to update balance.
|
|
3032
3215
|
* @param {BalanceUpdateRequest} [balanceUpdateRequest]
|
|
3033
3216
|
* @param {*} [options] Override http request option.
|
|
3034
3217
|
* @throws {RequiredError}
|
|
3035
3218
|
* @memberof BalanceApi
|
|
3036
3219
|
*/
|
|
3037
|
-
public transferBalance(
|
|
3038
|
-
return BalanceApiFp(this.configuration).transferBalance(
|
|
3220
|
+
public transferBalance(beneficiaryValue: string, balanceUpdateRequest?: BalanceUpdateRequest, options?: AxiosRequestConfig) {
|
|
3221
|
+
return BalanceApiFp(this.configuration).transferBalance(beneficiaryValue, balanceUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3039
3222
|
}
|
|
3040
3223
|
|
|
3041
3224
|
/**
|
|
3042
3225
|
* Manually update balance. Used as manual compensation for out of stock products.
|
|
3043
3226
|
* @summary Manually update balance
|
|
3044
|
-
* @param {string}
|
|
3227
|
+
* @param {string} beneficiaryValue ID of the beneficiary where we want to update balance.
|
|
3045
3228
|
* @param {BalanceUpdateRequest} [balanceUpdateRequest]
|
|
3046
3229
|
* @param {*} [options] Override http request option.
|
|
3047
3230
|
* @throws {RequiredError}
|
|
3048
3231
|
* @memberof BalanceApi
|
|
3049
3232
|
*/
|
|
3050
|
-
public updateBalance(
|
|
3051
|
-
return BalanceApiFp(this.configuration).updateBalance(
|
|
3233
|
+
public updateBalance(beneficiaryValue: string, balanceUpdateRequest?: BalanceUpdateRequest, options?: AxiosRequestConfig) {
|
|
3234
|
+
return BalanceApiFp(this.configuration).updateBalance(beneficiaryValue, balanceUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3052
3235
|
}
|
|
3053
3236
|
}
|
|
3054
3237
|
|
|
@@ -4372,24 +4555,20 @@ export class NotificationApi extends BaseAPI {
|
|
|
4372
4555
|
|
|
4373
4556
|
|
|
4374
4557
|
/**
|
|
4375
|
-
*
|
|
4558
|
+
* OrderApi - axios parameter creator
|
|
4376
4559
|
* @export
|
|
4377
4560
|
*/
|
|
4378
|
-
export const
|
|
4561
|
+
export const OrderApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
4379
4562
|
return {
|
|
4380
4563
|
/**
|
|
4381
|
-
*
|
|
4382
|
-
* @summary
|
|
4383
|
-
* @param {
|
|
4384
|
-
* @param {ProductRequestApprovalRequest} [productRequestApprovalRequest]
|
|
4564
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
|
4565
|
+
* @summary Create an order for a product
|
|
4566
|
+
* @param {CreateOrderRequest} [createOrderRequest]
|
|
4385
4567
|
* @param {*} [options] Override http request option.
|
|
4386
4568
|
* @throws {RequiredError}
|
|
4387
4569
|
*/
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
assertParamExists('approveProduct', 'id', id)
|
|
4391
|
-
const localVarPath = `/products/requests/{id}`
|
|
4392
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
4570
|
+
createOrder: async (createOrderRequest?: CreateOrderRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
4571
|
+
const localVarPath = `/users/orders`;
|
|
4393
4572
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4394
4573
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4395
4574
|
let baseOptions;
|
|
@@ -4397,14 +4576,10 @@ export const ProductApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
4397
4576
|
baseOptions = configuration.baseOptions;
|
|
4398
4577
|
}
|
|
4399
4578
|
|
|
4400
|
-
const localVarRequestOptions = { method: '
|
|
4579
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
4401
4580
|
const localVarHeaderParameter = {} as any;
|
|
4402
4581
|
const localVarQueryParameter = {} as any;
|
|
4403
4582
|
|
|
4404
|
-
// authentication jwt required
|
|
4405
|
-
// http bearer authentication required
|
|
4406
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
4407
|
-
|
|
4408
4583
|
|
|
4409
4584
|
|
|
4410
4585
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
@@ -4412,7 +4587,7 @@ export const ProductApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
4412
4587
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4413
4588
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4414
4589
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
4415
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
4590
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createOrderRequest, localVarRequestOptions, configuration)
|
|
4416
4591
|
|
|
4417
4592
|
return {
|
|
4418
4593
|
url: toPathString(localVarUrlObj),
|
|
@@ -4420,14 +4595,17 @@ export const ProductApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
4420
4595
|
};
|
|
4421
4596
|
},
|
|
4422
4597
|
/**
|
|
4423
|
-
*
|
|
4424
|
-
* @summary
|
|
4425
|
-
* @param {
|
|
4598
|
+
* Get order details
|
|
4599
|
+
* @summary Get order details
|
|
4600
|
+
* @param {string} id Order id
|
|
4426
4601
|
* @param {*} [options] Override http request option.
|
|
4427
4602
|
* @throws {RequiredError}
|
|
4428
4603
|
*/
|
|
4429
|
-
|
|
4430
|
-
|
|
4604
|
+
getOrder: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
4605
|
+
// verify required parameter 'id' is not null or undefined
|
|
4606
|
+
assertParamExists('getOrder', 'id', id)
|
|
4607
|
+
const localVarPath = `/orders/{id}`
|
|
4608
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
4431
4609
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4432
4610
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4433
4611
|
let baseOptions;
|
|
@@ -4435,22 +4613,15 @@ export const ProductApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
4435
4613
|
baseOptions = configuration.baseOptions;
|
|
4436
4614
|
}
|
|
4437
4615
|
|
|
4438
|
-
const localVarRequestOptions = { method: '
|
|
4616
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
4439
4617
|
const localVarHeaderParameter = {} as any;
|
|
4440
4618
|
const localVarQueryParameter = {} as any;
|
|
4441
4619
|
|
|
4442
|
-
// authentication jwt required
|
|
4443
|
-
// http bearer authentication required
|
|
4444
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
4445
|
-
|
|
4446
4620
|
|
|
4447
4621
|
|
|
4448
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
4449
|
-
|
|
4450
4622
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4451
4623
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4452
4624
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
4453
|
-
localVarRequestOptions.data = serializeDataIfNeeded(productCreationRequest, localVarRequestOptions, configuration)
|
|
4454
4625
|
|
|
4455
4626
|
return {
|
|
4456
4627
|
url: toPathString(localVarUrlObj),
|
|
@@ -4458,14 +4629,19 @@ export const ProductApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
4458
4629
|
};
|
|
4459
4630
|
},
|
|
4460
4631
|
/**
|
|
4461
|
-
*
|
|
4462
|
-
* @summary
|
|
4463
|
-
* @param {
|
|
4632
|
+
* List existing orders
|
|
4633
|
+
* @summary List existing orders
|
|
4634
|
+
* @param {string} [paginationToken] This is the pagination token
|
|
4635
|
+
* @param {string} [search] Search for product or order
|
|
4636
|
+
* @param {string} [productId] Filter by token
|
|
4637
|
+
* @param {string} [balanceId] Filter by balance
|
|
4638
|
+
* @param {string} [createdAfter] Filter orders created after the specified date
|
|
4639
|
+
* @param {string} [createdBefore] Filter orders created before the specified date
|
|
4464
4640
|
* @param {*} [options] Override http request option.
|
|
4465
4641
|
* @throws {RequiredError}
|
|
4466
4642
|
*/
|
|
4467
|
-
|
|
4468
|
-
const localVarPath = `/
|
|
4643
|
+
listOrders: async (paginationToken?: string, search?: string, productId?: string, balanceId?: string, createdAfter?: string, createdBefore?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
4644
|
+
const localVarPath = `/users/orders`;
|
|
4469
4645
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4470
4646
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4471
4647
|
let baseOptions;
|
|
@@ -4473,39 +4649,361 @@ export const ProductApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
4473
4649
|
baseOptions = configuration.baseOptions;
|
|
4474
4650
|
}
|
|
4475
4651
|
|
|
4476
|
-
const localVarRequestOptions = { method: '
|
|
4652
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
4477
4653
|
const localVarHeaderParameter = {} as any;
|
|
4478
4654
|
const localVarQueryParameter = {} as any;
|
|
4479
4655
|
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4656
|
+
if (paginationToken !== undefined) {
|
|
4657
|
+
localVarQueryParameter['paginationToken'] = paginationToken;
|
|
4658
|
+
}
|
|
4483
4659
|
|
|
4660
|
+
if (search !== undefined) {
|
|
4661
|
+
localVarQueryParameter['search'] = search;
|
|
4662
|
+
}
|
|
4663
|
+
|
|
4664
|
+
if (productId !== undefined) {
|
|
4665
|
+
localVarQueryParameter['productId'] = productId;
|
|
4666
|
+
}
|
|
4667
|
+
|
|
4668
|
+
if (balanceId !== undefined) {
|
|
4669
|
+
localVarQueryParameter['balanceId'] = balanceId;
|
|
4670
|
+
}
|
|
4671
|
+
|
|
4672
|
+
if (createdAfter !== undefined) {
|
|
4673
|
+
localVarQueryParameter['createdAfter'] = (createdAfter as any instanceof Date) ?
|
|
4674
|
+
(createdAfter as any).toISOString() :
|
|
4675
|
+
createdAfter;
|
|
4676
|
+
}
|
|
4677
|
+
|
|
4678
|
+
if (createdBefore !== undefined) {
|
|
4679
|
+
localVarQueryParameter['createdBefore'] = (createdBefore as any instanceof Date) ?
|
|
4680
|
+
(createdBefore as any).toISOString() :
|
|
4681
|
+
createdBefore;
|
|
4682
|
+
}
|
|
4484
4683
|
|
|
4485
|
-
|
|
4486
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
4487
4684
|
|
|
4685
|
+
|
|
4488
4686
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4489
4687
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4490
4688
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
4491
|
-
localVarRequestOptions.data = serializeDataIfNeeded(productRequestCreationRequest, localVarRequestOptions, configuration)
|
|
4492
4689
|
|
|
4493
4690
|
return {
|
|
4494
4691
|
url: toPathString(localVarUrlObj),
|
|
4495
4692
|
options: localVarRequestOptions,
|
|
4496
4693
|
};
|
|
4497
4694
|
},
|
|
4695
|
+
}
|
|
4696
|
+
};
|
|
4697
|
+
|
|
4698
|
+
/**
|
|
4699
|
+
* OrderApi - functional programming interface
|
|
4700
|
+
* @export
|
|
4701
|
+
*/
|
|
4702
|
+
export const OrderApiFp = function(configuration?: Configuration) {
|
|
4703
|
+
const localVarAxiosParamCreator = OrderApiAxiosParamCreator(configuration)
|
|
4704
|
+
return {
|
|
4498
4705
|
/**
|
|
4499
|
-
*
|
|
4500
|
-
* @summary
|
|
4501
|
-
* @param {
|
|
4706
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
|
4707
|
+
* @summary Create an order for a product
|
|
4708
|
+
* @param {CreateOrderRequest} [createOrderRequest]
|
|
4502
4709
|
* @param {*} [options] Override http request option.
|
|
4503
4710
|
* @throws {RequiredError}
|
|
4504
4711
|
*/
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4712
|
+
async createOrder(createOrderRequest?: CreateOrderRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
|
4713
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createOrder(createOrderRequest, options);
|
|
4714
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
4715
|
+
},
|
|
4716
|
+
/**
|
|
4717
|
+
* Get order details
|
|
4718
|
+
* @summary Get order details
|
|
4719
|
+
* @param {string} id Order id
|
|
4720
|
+
* @param {*} [options] Override http request option.
|
|
4721
|
+
* @throws {RequiredError}
|
|
4722
|
+
*/
|
|
4723
|
+
async getOrder(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
|
4724
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrder(id, options);
|
|
4725
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
4726
|
+
},
|
|
4727
|
+
/**
|
|
4728
|
+
* List existing orders
|
|
4729
|
+
* @summary List existing orders
|
|
4730
|
+
* @param {string} [paginationToken] This is the pagination token
|
|
4731
|
+
* @param {string} [search] Search for product or order
|
|
4732
|
+
* @param {string} [productId] Filter by token
|
|
4733
|
+
* @param {string} [balanceId] Filter by balance
|
|
4734
|
+
* @param {string} [createdAfter] Filter orders created after the specified date
|
|
4735
|
+
* @param {string} [createdBefore] Filter orders created before the specified date
|
|
4736
|
+
* @param {*} [options] Override http request option.
|
|
4737
|
+
* @throws {RequiredError}
|
|
4738
|
+
*/
|
|
4739
|
+
async listOrders(paginationToken?: string, search?: string, productId?: string, balanceId?: string, createdAfter?: string, createdBefore?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrderListResponse>> {
|
|
4740
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listOrders(paginationToken, search, productId, balanceId, createdAfter, createdBefore, options);
|
|
4741
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
4742
|
+
},
|
|
4743
|
+
}
|
|
4744
|
+
};
|
|
4745
|
+
|
|
4746
|
+
/**
|
|
4747
|
+
* OrderApi - factory interface
|
|
4748
|
+
* @export
|
|
4749
|
+
*/
|
|
4750
|
+
export const OrderApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
4751
|
+
const localVarFp = OrderApiFp(configuration)
|
|
4752
|
+
return {
|
|
4753
|
+
/**
|
|
4754
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
|
4755
|
+
* @summary Create an order for a product
|
|
4756
|
+
* @param {CreateOrderRequest} [createOrderRequest]
|
|
4757
|
+
* @param {*} [options] Override http request option.
|
|
4758
|
+
* @throws {RequiredError}
|
|
4759
|
+
*/
|
|
4760
|
+
createOrder(createOrderRequest?: CreateOrderRequest, options?: any): AxiosPromise<Order> {
|
|
4761
|
+
return localVarFp.createOrder(createOrderRequest, options).then((request) => request(axios, basePath));
|
|
4762
|
+
},
|
|
4763
|
+
/**
|
|
4764
|
+
* Get order details
|
|
4765
|
+
* @summary Get order details
|
|
4766
|
+
* @param {string} id Order id
|
|
4767
|
+
* @param {*} [options] Override http request option.
|
|
4768
|
+
* @throws {RequiredError}
|
|
4769
|
+
*/
|
|
4770
|
+
getOrder(id: string, options?: any): AxiosPromise<Order> {
|
|
4771
|
+
return localVarFp.getOrder(id, options).then((request) => request(axios, basePath));
|
|
4772
|
+
},
|
|
4773
|
+
/**
|
|
4774
|
+
* List existing orders
|
|
4775
|
+
* @summary List existing orders
|
|
4776
|
+
* @param {string} [paginationToken] This is the pagination token
|
|
4777
|
+
* @param {string} [search] Search for product or order
|
|
4778
|
+
* @param {string} [productId] Filter by token
|
|
4779
|
+
* @param {string} [balanceId] Filter by balance
|
|
4780
|
+
* @param {string} [createdAfter] Filter orders created after the specified date
|
|
4781
|
+
* @param {string} [createdBefore] Filter orders created before the specified date
|
|
4782
|
+
* @param {*} [options] Override http request option.
|
|
4783
|
+
* @throws {RequiredError}
|
|
4784
|
+
*/
|
|
4785
|
+
listOrders(paginationToken?: string, search?: string, productId?: string, balanceId?: string, createdAfter?: string, createdBefore?: string, options?: any): AxiosPromise<OrderListResponse> {
|
|
4786
|
+
return localVarFp.listOrders(paginationToken, search, productId, balanceId, createdAfter, createdBefore, options).then((request) => request(axios, basePath));
|
|
4787
|
+
},
|
|
4788
|
+
};
|
|
4789
|
+
};
|
|
4790
|
+
|
|
4791
|
+
/**
|
|
4792
|
+
* OrderApi - object-oriented interface
|
|
4793
|
+
* @export
|
|
4794
|
+
* @class OrderApi
|
|
4795
|
+
* @extends {BaseAPI}
|
|
4796
|
+
*/
|
|
4797
|
+
export class OrderApi extends BaseAPI {
|
|
4798
|
+
/**
|
|
4799
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
|
4800
|
+
* @summary Create an order for a product
|
|
4801
|
+
* @param {CreateOrderRequest} [createOrderRequest]
|
|
4802
|
+
* @param {*} [options] Override http request option.
|
|
4803
|
+
* @throws {RequiredError}
|
|
4804
|
+
* @memberof OrderApi
|
|
4805
|
+
*/
|
|
4806
|
+
public createOrder(createOrderRequest?: CreateOrderRequest, options?: AxiosRequestConfig) {
|
|
4807
|
+
return OrderApiFp(this.configuration).createOrder(createOrderRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4808
|
+
}
|
|
4809
|
+
|
|
4810
|
+
/**
|
|
4811
|
+
* Get order details
|
|
4812
|
+
* @summary Get order details
|
|
4813
|
+
* @param {string} id Order id
|
|
4814
|
+
* @param {*} [options] Override http request option.
|
|
4815
|
+
* @throws {RequiredError}
|
|
4816
|
+
* @memberof OrderApi
|
|
4817
|
+
*/
|
|
4818
|
+
public getOrder(id: string, options?: AxiosRequestConfig) {
|
|
4819
|
+
return OrderApiFp(this.configuration).getOrder(id, options).then((request) => request(this.axios, this.basePath));
|
|
4820
|
+
}
|
|
4821
|
+
|
|
4822
|
+
/**
|
|
4823
|
+
* List existing orders
|
|
4824
|
+
* @summary List existing orders
|
|
4825
|
+
* @param {string} [paginationToken] This is the pagination token
|
|
4826
|
+
* @param {string} [search] Search for product or order
|
|
4827
|
+
* @param {string} [productId] Filter by token
|
|
4828
|
+
* @param {string} [balanceId] Filter by balance
|
|
4829
|
+
* @param {string} [createdAfter] Filter orders created after the specified date
|
|
4830
|
+
* @param {string} [createdBefore] Filter orders created before the specified date
|
|
4831
|
+
* @param {*} [options] Override http request option.
|
|
4832
|
+
* @throws {RequiredError}
|
|
4833
|
+
* @memberof OrderApi
|
|
4834
|
+
*/
|
|
4835
|
+
public listOrders(paginationToken?: string, search?: string, productId?: string, balanceId?: string, createdAfter?: string, createdBefore?: string, options?: AxiosRequestConfig) {
|
|
4836
|
+
return OrderApiFp(this.configuration).listOrders(paginationToken, search, productId, balanceId, createdAfter, createdBefore, options).then((request) => request(this.axios, this.basePath));
|
|
4837
|
+
}
|
|
4838
|
+
}
|
|
4839
|
+
|
|
4840
|
+
|
|
4841
|
+
|
|
4842
|
+
/**
|
|
4843
|
+
* ProductApi - axios parameter creator
|
|
4844
|
+
* @export
|
|
4845
|
+
*/
|
|
4846
|
+
export const ProductApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
4847
|
+
return {
|
|
4848
|
+
/**
|
|
4849
|
+
* Accept or reject a product by id
|
|
4850
|
+
* @summary Accept or reject a product by id
|
|
4851
|
+
* @param {string} id The product id
|
|
4852
|
+
* @param {ProductRequestApprovalRequest} [productRequestApprovalRequest]
|
|
4853
|
+
* @param {*} [options] Override http request option.
|
|
4854
|
+
* @throws {RequiredError}
|
|
4855
|
+
*/
|
|
4856
|
+
approveProduct: async (id: string, productRequestApprovalRequest?: ProductRequestApprovalRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
4857
|
+
// verify required parameter 'id' is not null or undefined
|
|
4858
|
+
assertParamExists('approveProduct', 'id', id)
|
|
4859
|
+
const localVarPath = `/products/requests/{id}`
|
|
4860
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
4861
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4862
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4863
|
+
let baseOptions;
|
|
4864
|
+
if (configuration) {
|
|
4865
|
+
baseOptions = configuration.baseOptions;
|
|
4866
|
+
}
|
|
4867
|
+
|
|
4868
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
|
4869
|
+
const localVarHeaderParameter = {} as any;
|
|
4870
|
+
const localVarQueryParameter = {} as any;
|
|
4871
|
+
|
|
4872
|
+
// authentication jwt required
|
|
4873
|
+
// http bearer authentication required
|
|
4874
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
4875
|
+
|
|
4876
|
+
|
|
4877
|
+
|
|
4878
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
4879
|
+
|
|
4880
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4881
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4882
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
4883
|
+
localVarRequestOptions.data = serializeDataIfNeeded(productRequestApprovalRequest, localVarRequestOptions, configuration)
|
|
4884
|
+
|
|
4885
|
+
return {
|
|
4886
|
+
url: toPathString(localVarUrlObj),
|
|
4887
|
+
options: localVarRequestOptions,
|
|
4888
|
+
};
|
|
4889
|
+
},
|
|
4890
|
+
/**
|
|
4891
|
+
* Create a new product
|
|
4892
|
+
* @summary Create a new product
|
|
4893
|
+
* @param {ProductCreationRequest | null} [productCreationRequest]
|
|
4894
|
+
* @param {*} [options] Override http request option.
|
|
4895
|
+
* @throws {RequiredError}
|
|
4896
|
+
*/
|
|
4897
|
+
createProduct: async (productCreationRequest?: ProductCreationRequest | null, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
4898
|
+
const localVarPath = `/products`;
|
|
4899
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4900
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4901
|
+
let baseOptions;
|
|
4902
|
+
if (configuration) {
|
|
4903
|
+
baseOptions = configuration.baseOptions;
|
|
4904
|
+
}
|
|
4905
|
+
|
|
4906
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
4907
|
+
const localVarHeaderParameter = {} as any;
|
|
4908
|
+
const localVarQueryParameter = {} as any;
|
|
4909
|
+
|
|
4910
|
+
// authentication jwt required
|
|
4911
|
+
// http bearer authentication required
|
|
4912
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
4913
|
+
|
|
4914
|
+
|
|
4915
|
+
|
|
4916
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
4917
|
+
|
|
4918
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4919
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4920
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
4921
|
+
localVarRequestOptions.data = serializeDataIfNeeded(productCreationRequest, localVarRequestOptions, configuration)
|
|
4922
|
+
|
|
4923
|
+
return {
|
|
4924
|
+
url: toPathString(localVarUrlObj),
|
|
4925
|
+
options: localVarRequestOptions,
|
|
4926
|
+
};
|
|
4927
|
+
},
|
|
4928
|
+
/**
|
|
4929
|
+
* Create a new product request
|
|
4930
|
+
* @summary Create a new product request
|
|
4931
|
+
* @param {ProductRequestCreationRequest} [productRequestCreationRequest]
|
|
4932
|
+
* @param {*} [options] Override http request option.
|
|
4933
|
+
* @throws {RequiredError}
|
|
4934
|
+
*/
|
|
4935
|
+
createProductRequest: async (productRequestCreationRequest?: ProductRequestCreationRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
4936
|
+
const localVarPath = `/products/requests`;
|
|
4937
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4938
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4939
|
+
let baseOptions;
|
|
4940
|
+
if (configuration) {
|
|
4941
|
+
baseOptions = configuration.baseOptions;
|
|
4942
|
+
}
|
|
4943
|
+
|
|
4944
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
4945
|
+
const localVarHeaderParameter = {} as any;
|
|
4946
|
+
const localVarQueryParameter = {} as any;
|
|
4947
|
+
|
|
4948
|
+
// authentication jwt required
|
|
4949
|
+
// http bearer authentication required
|
|
4950
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
4951
|
+
|
|
4952
|
+
|
|
4953
|
+
|
|
4954
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
4955
|
+
|
|
4956
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4957
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4958
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
4959
|
+
localVarRequestOptions.data = serializeDataIfNeeded(productRequestCreationRequest, localVarRequestOptions, configuration)
|
|
4960
|
+
|
|
4961
|
+
return {
|
|
4962
|
+
url: toPathString(localVarUrlObj),
|
|
4963
|
+
options: localVarRequestOptions,
|
|
4964
|
+
};
|
|
4965
|
+
},
|
|
4966
|
+
/**
|
|
4967
|
+
* Create upload URL for product
|
|
4968
|
+
* @summary Create upload URL for product
|
|
4969
|
+
* @param {*} [options] Override http request option.
|
|
4970
|
+
* @throws {RequiredError}
|
|
4971
|
+
*/
|
|
4972
|
+
createUploadURL: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
4973
|
+
const localVarPath = `/products/upload-urls`;
|
|
4974
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4975
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4976
|
+
let baseOptions;
|
|
4977
|
+
if (configuration) {
|
|
4978
|
+
baseOptions = configuration.baseOptions;
|
|
4979
|
+
}
|
|
4980
|
+
|
|
4981
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
4982
|
+
const localVarHeaderParameter = {} as any;
|
|
4983
|
+
const localVarQueryParameter = {} as any;
|
|
4984
|
+
|
|
4985
|
+
|
|
4986
|
+
|
|
4987
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4988
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4989
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
4990
|
+
|
|
4991
|
+
return {
|
|
4992
|
+
url: toPathString(localVarUrlObj),
|
|
4993
|
+
options: localVarRequestOptions,
|
|
4994
|
+
};
|
|
4995
|
+
},
|
|
4996
|
+
/**
|
|
4997
|
+
* Get a product by id
|
|
4998
|
+
* @summary Get a product by id
|
|
4999
|
+
* @param {string} id The product id
|
|
5000
|
+
* @param {*} [options] Override http request option.
|
|
5001
|
+
* @throws {RequiredError}
|
|
5002
|
+
*/
|
|
5003
|
+
getProductById: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
5004
|
+
// verify required parameter 'id' is not null or undefined
|
|
5005
|
+
assertParamExists('getProductById', 'id', id)
|
|
5006
|
+
const localVarPath = `/products/{id}`
|
|
4509
5007
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
4510
5008
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4511
5009
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -4556,9 +5054,53 @@ export const ProductApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
4556
5054
|
const localVarHeaderParameter = {} as any;
|
|
4557
5055
|
const localVarQueryParameter = {} as any;
|
|
4558
5056
|
|
|
4559
|
-
// authentication jwt required
|
|
4560
|
-
// http bearer authentication required
|
|
4561
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
5057
|
+
// authentication jwt required
|
|
5058
|
+
// http bearer authentication required
|
|
5059
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
5060
|
+
|
|
5061
|
+
|
|
5062
|
+
|
|
5063
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5064
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5065
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
5066
|
+
|
|
5067
|
+
return {
|
|
5068
|
+
url: toPathString(localVarUrlObj),
|
|
5069
|
+
options: localVarRequestOptions,
|
|
5070
|
+
};
|
|
5071
|
+
},
|
|
5072
|
+
/**
|
|
5073
|
+
* List existing product requests
|
|
5074
|
+
* @summary List existing product requests
|
|
5075
|
+
* @param {ProductRequestStatus} [status] The product request status
|
|
5076
|
+
* @param {string} [nextToken] This is the pagination token
|
|
5077
|
+
* @param {*} [options] Override http request option.
|
|
5078
|
+
* @throws {RequiredError}
|
|
5079
|
+
*/
|
|
5080
|
+
listProductRequests: async (status?: ProductRequestStatus, nextToken?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
5081
|
+
const localVarPath = `/products/requests`;
|
|
5082
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5083
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5084
|
+
let baseOptions;
|
|
5085
|
+
if (configuration) {
|
|
5086
|
+
baseOptions = configuration.baseOptions;
|
|
5087
|
+
}
|
|
5088
|
+
|
|
5089
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
5090
|
+
const localVarHeaderParameter = {} as any;
|
|
5091
|
+
const localVarQueryParameter = {} as any;
|
|
5092
|
+
|
|
5093
|
+
// authentication jwt required
|
|
5094
|
+
// http bearer authentication required
|
|
5095
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
5096
|
+
|
|
5097
|
+
if (status !== undefined) {
|
|
5098
|
+
localVarQueryParameter['status'] = status;
|
|
5099
|
+
}
|
|
5100
|
+
|
|
5101
|
+
if (nextToken !== undefined) {
|
|
5102
|
+
localVarQueryParameter['nextToken'] = nextToken;
|
|
5103
|
+
}
|
|
4562
5104
|
|
|
4563
5105
|
|
|
4564
5106
|
|
|
@@ -4572,15 +5114,20 @@ export const ProductApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
4572
5114
|
};
|
|
4573
5115
|
},
|
|
4574
5116
|
/**
|
|
4575
|
-
* List existing
|
|
4576
|
-
* @summary List existing
|
|
4577
|
-
* @param {
|
|
5117
|
+
* List existing products
|
|
5118
|
+
* @summary List existing products
|
|
5119
|
+
* @param {ProductKind} [kind] The product kind
|
|
5120
|
+
* @param {string} [search] search string
|
|
5121
|
+
* @param {ProductUsage} [usage] The product usage
|
|
5122
|
+
* @param {ProductStatus} [status] The product status
|
|
5123
|
+
* @param {ProductAvailability} [availability] The product availability
|
|
5124
|
+
* @param {string} [segmentID] The segment ID
|
|
4578
5125
|
* @param {string} [nextToken] This is the pagination token
|
|
4579
5126
|
* @param {*} [options] Override http request option.
|
|
4580
5127
|
* @throws {RequiredError}
|
|
4581
5128
|
*/
|
|
4582
|
-
|
|
4583
|
-
const localVarPath = `/products
|
|
5129
|
+
listProducts: async (kind?: ProductKind, search?: string, usage?: ProductUsage, status?: ProductStatus, availability?: ProductAvailability, segmentID?: string, nextToken?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
5130
|
+
const localVarPath = `/products`;
|
|
4584
5131
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4585
5132
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4586
5133
|
let baseOptions;
|
|
@@ -4596,10 +5143,30 @@ export const ProductApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
4596
5143
|
// http bearer authentication required
|
|
4597
5144
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
4598
5145
|
|
|
5146
|
+
if (kind !== undefined) {
|
|
5147
|
+
localVarQueryParameter['kind'] = kind;
|
|
5148
|
+
}
|
|
5149
|
+
|
|
5150
|
+
if (search !== undefined) {
|
|
5151
|
+
localVarQueryParameter['search'] = search;
|
|
5152
|
+
}
|
|
5153
|
+
|
|
5154
|
+
if (usage !== undefined) {
|
|
5155
|
+
localVarQueryParameter['usage'] = usage;
|
|
5156
|
+
}
|
|
5157
|
+
|
|
4599
5158
|
if (status !== undefined) {
|
|
4600
5159
|
localVarQueryParameter['status'] = status;
|
|
4601
5160
|
}
|
|
4602
5161
|
|
|
5162
|
+
if (availability !== undefined) {
|
|
5163
|
+
localVarQueryParameter['availability'] = availability;
|
|
5164
|
+
}
|
|
5165
|
+
|
|
5166
|
+
if (segmentID !== undefined) {
|
|
5167
|
+
localVarQueryParameter['segmentID'] = segmentID;
|
|
5168
|
+
}
|
|
5169
|
+
|
|
4603
5170
|
if (nextToken !== undefined) {
|
|
4604
5171
|
localVarQueryParameter['nextToken'] = nextToken;
|
|
4605
5172
|
}
|
|
@@ -4701,6 +5268,16 @@ export const ProductApiFp = function(configuration?: Configuration) {
|
|
|
4701
5268
|
const localVarAxiosArgs = await localVarAxiosParamCreator.createProductRequest(productRequestCreationRequest, options);
|
|
4702
5269
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
4703
5270
|
},
|
|
5271
|
+
/**
|
|
5272
|
+
* Create upload URL for product
|
|
5273
|
+
* @summary Create upload URL for product
|
|
5274
|
+
* @param {*} [options] Override http request option.
|
|
5275
|
+
* @throws {RequiredError}
|
|
5276
|
+
*/
|
|
5277
|
+
async createUploadURL(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UploadURLResponse>> {
|
|
5278
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createUploadURL(options);
|
|
5279
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
5280
|
+
},
|
|
4704
5281
|
/**
|
|
4705
5282
|
* Get a product by id
|
|
4706
5283
|
* @summary Get a product by id
|
|
@@ -4735,6 +5312,23 @@ export const ProductApiFp = function(configuration?: Configuration) {
|
|
|
4735
5312
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listProductRequests(status, nextToken, options);
|
|
4736
5313
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
4737
5314
|
},
|
|
5315
|
+
/**
|
|
5316
|
+
* List existing products
|
|
5317
|
+
* @summary List existing products
|
|
5318
|
+
* @param {ProductKind} [kind] The product kind
|
|
5319
|
+
* @param {string} [search] search string
|
|
5320
|
+
* @param {ProductUsage} [usage] The product usage
|
|
5321
|
+
* @param {ProductStatus} [status] The product status
|
|
5322
|
+
* @param {ProductAvailability} [availability] The product availability
|
|
5323
|
+
* @param {string} [segmentID] The segment ID
|
|
5324
|
+
* @param {string} [nextToken] This is the pagination token
|
|
5325
|
+
* @param {*} [options] Override http request option.
|
|
5326
|
+
* @throws {RequiredError}
|
|
5327
|
+
*/
|
|
5328
|
+
async listProducts(kind?: ProductKind, search?: string, usage?: ProductUsage, status?: ProductStatus, availability?: ProductAvailability, segmentID?: string, nextToken?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProductsResponse>> {
|
|
5329
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listProducts(kind, search, usage, status, availability, segmentID, nextToken, options);
|
|
5330
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
5331
|
+
},
|
|
4738
5332
|
/**
|
|
4739
5333
|
* Update a product by id
|
|
4740
5334
|
* @summary Update a product by id
|
|
@@ -4788,6 +5382,15 @@ export const ProductApiFactory = function (configuration?: Configuration, basePa
|
|
|
4788
5382
|
createProductRequest(productRequestCreationRequest?: ProductRequestCreationRequest, options?: any): AxiosPromise<ProductRequest> {
|
|
4789
5383
|
return localVarFp.createProductRequest(productRequestCreationRequest, options).then((request) => request(axios, basePath));
|
|
4790
5384
|
},
|
|
5385
|
+
/**
|
|
5386
|
+
* Create upload URL for product
|
|
5387
|
+
* @summary Create upload URL for product
|
|
5388
|
+
* @param {*} [options] Override http request option.
|
|
5389
|
+
* @throws {RequiredError}
|
|
5390
|
+
*/
|
|
5391
|
+
createUploadURL(options?: any): AxiosPromise<UploadURLResponse> {
|
|
5392
|
+
return localVarFp.createUploadURL(options).then((request) => request(axios, basePath));
|
|
5393
|
+
},
|
|
4791
5394
|
/**
|
|
4792
5395
|
* Get a product by id
|
|
4793
5396
|
* @summary Get a product by id
|
|
@@ -4819,6 +5422,22 @@ export const ProductApiFactory = function (configuration?: Configuration, basePa
|
|
|
4819
5422
|
listProductRequests(status?: ProductRequestStatus, nextToken?: string, options?: any): AxiosPromise<ProductRequestsResponse> {
|
|
4820
5423
|
return localVarFp.listProductRequests(status, nextToken, options).then((request) => request(axios, basePath));
|
|
4821
5424
|
},
|
|
5425
|
+
/**
|
|
5426
|
+
* List existing products
|
|
5427
|
+
* @summary List existing products
|
|
5428
|
+
* @param {ProductKind} [kind] The product kind
|
|
5429
|
+
* @param {string} [search] search string
|
|
5430
|
+
* @param {ProductUsage} [usage] The product usage
|
|
5431
|
+
* @param {ProductStatus} [status] The product status
|
|
5432
|
+
* @param {ProductAvailability} [availability] The product availability
|
|
5433
|
+
* @param {string} [segmentID] The segment ID
|
|
5434
|
+
* @param {string} [nextToken] This is the pagination token
|
|
5435
|
+
* @param {*} [options] Override http request option.
|
|
5436
|
+
* @throws {RequiredError}
|
|
5437
|
+
*/
|
|
5438
|
+
listProducts(kind?: ProductKind, search?: string, usage?: ProductUsage, status?: ProductStatus, availability?: ProductAvailability, segmentID?: string, nextToken?: string, options?: any): AxiosPromise<ProductsResponse> {
|
|
5439
|
+
return localVarFp.listProducts(kind, search, usage, status, availability, segmentID, nextToken, options).then((request) => request(axios, basePath));
|
|
5440
|
+
},
|
|
4822
5441
|
/**
|
|
4823
5442
|
* Update a product by id
|
|
4824
5443
|
* @summary Update a product by id
|
|
@@ -4877,6 +5496,17 @@ export class ProductApi extends BaseAPI {
|
|
|
4877
5496
|
return ProductApiFp(this.configuration).createProductRequest(productRequestCreationRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4878
5497
|
}
|
|
4879
5498
|
|
|
5499
|
+
/**
|
|
5500
|
+
* Create upload URL for product
|
|
5501
|
+
* @summary Create upload URL for product
|
|
5502
|
+
* @param {*} [options] Override http request option.
|
|
5503
|
+
* @throws {RequiredError}
|
|
5504
|
+
* @memberof ProductApi
|
|
5505
|
+
*/
|
|
5506
|
+
public createUploadURL(options?: AxiosRequestConfig) {
|
|
5507
|
+
return ProductApiFp(this.configuration).createUploadURL(options).then((request) => request(this.axios, this.basePath));
|
|
5508
|
+
}
|
|
5509
|
+
|
|
4880
5510
|
/**
|
|
4881
5511
|
* Get a product by id
|
|
4882
5512
|
* @summary Get a product by id
|
|
@@ -4914,6 +5544,24 @@ export class ProductApi extends BaseAPI {
|
|
|
4914
5544
|
return ProductApiFp(this.configuration).listProductRequests(status, nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
4915
5545
|
}
|
|
4916
5546
|
|
|
5547
|
+
/**
|
|
5548
|
+
* List existing products
|
|
5549
|
+
* @summary List existing products
|
|
5550
|
+
* @param {ProductKind} [kind] The product kind
|
|
5551
|
+
* @param {string} [search] search string
|
|
5552
|
+
* @param {ProductUsage} [usage] The product usage
|
|
5553
|
+
* @param {ProductStatus} [status] The product status
|
|
5554
|
+
* @param {ProductAvailability} [availability] The product availability
|
|
5555
|
+
* @param {string} [segmentID] The segment ID
|
|
5556
|
+
* @param {string} [nextToken] This is the pagination token
|
|
5557
|
+
* @param {*} [options] Override http request option.
|
|
5558
|
+
* @throws {RequiredError}
|
|
5559
|
+
* @memberof ProductApi
|
|
5560
|
+
*/
|
|
5561
|
+
public listProducts(kind?: ProductKind, search?: string, usage?: ProductUsage, status?: ProductStatus, availability?: ProductAvailability, segmentID?: string, nextToken?: string, options?: AxiosRequestConfig) {
|
|
5562
|
+
return ProductApiFp(this.configuration).listProducts(kind, search, usage, status, availability, segmentID, nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
5563
|
+
}
|
|
5564
|
+
|
|
4917
5565
|
/**
|
|
4918
5566
|
* Update a product by id
|
|
4919
5567
|
* @summary Update a product by id
|
|
@@ -5096,6 +5744,154 @@ export type ListProgressIntervalEnum = typeof ListProgressIntervalEnum[keyof typ
|
|
|
5096
5744
|
*/
|
|
5097
5745
|
export const PromotionApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
5098
5746
|
return {
|
|
5747
|
+
/**
|
|
5748
|
+
* Claim a promotion by admins
|
|
5749
|
+
* @summary Claim a promotion
|
|
5750
|
+
* @param {string} id Promotion ID
|
|
5751
|
+
* @param {PromotionClaimRequest} [promotionClaimRequest]
|
|
5752
|
+
* @param {*} [options] Override http request option.
|
|
5753
|
+
* @throws {RequiredError}
|
|
5754
|
+
*/
|
|
5755
|
+
claimPromotion: async (id: string, promotionClaimRequest?: PromotionClaimRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
5756
|
+
// verify required parameter 'id' is not null or undefined
|
|
5757
|
+
assertParamExists('claimPromotion', 'id', id)
|
|
5758
|
+
const localVarPath = `/promotions/{id}/claims`
|
|
5759
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
5760
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5761
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5762
|
+
let baseOptions;
|
|
5763
|
+
if (configuration) {
|
|
5764
|
+
baseOptions = configuration.baseOptions;
|
|
5765
|
+
}
|
|
5766
|
+
|
|
5767
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
5768
|
+
const localVarHeaderParameter = {} as any;
|
|
5769
|
+
const localVarQueryParameter = {} as any;
|
|
5770
|
+
|
|
5771
|
+
|
|
5772
|
+
|
|
5773
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
5774
|
+
|
|
5775
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5776
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5777
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
5778
|
+
localVarRequestOptions.data = serializeDataIfNeeded(promotionClaimRequest, localVarRequestOptions, configuration)
|
|
5779
|
+
|
|
5780
|
+
return {
|
|
5781
|
+
url: toPathString(localVarUrlObj),
|
|
5782
|
+
options: localVarRequestOptions,
|
|
5783
|
+
};
|
|
5784
|
+
},
|
|
5785
|
+
/**
|
|
5786
|
+
* Claim a promotion by admins
|
|
5787
|
+
* @summary Claim a promotion
|
|
5788
|
+
* @param {string} id Promotion ID
|
|
5789
|
+
* @param {string} progressID Promotion Progress ID
|
|
5790
|
+
* @param {*} [options] Override http request option.
|
|
5791
|
+
* @throws {RequiredError}
|
|
5792
|
+
*/
|
|
5793
|
+
claimPromotionProgress: async (id: string, progressID: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
5794
|
+
// verify required parameter 'id' is not null or undefined
|
|
5795
|
+
assertParamExists('claimPromotionProgress', 'id', id)
|
|
5796
|
+
// verify required parameter 'progressID' is not null or undefined
|
|
5797
|
+
assertParamExists('claimPromotionProgress', 'progressID', progressID)
|
|
5798
|
+
const localVarPath = `/promotions/{id}/progress/{progressID}/claims`
|
|
5799
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
|
5800
|
+
.replace(`{${"progressID"}}`, encodeURIComponent(String(progressID)));
|
|
5801
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5802
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5803
|
+
let baseOptions;
|
|
5804
|
+
if (configuration) {
|
|
5805
|
+
baseOptions = configuration.baseOptions;
|
|
5806
|
+
}
|
|
5807
|
+
|
|
5808
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
5809
|
+
const localVarHeaderParameter = {} as any;
|
|
5810
|
+
const localVarQueryParameter = {} as any;
|
|
5811
|
+
|
|
5812
|
+
|
|
5813
|
+
|
|
5814
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5815
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5816
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
5817
|
+
|
|
5818
|
+
return {
|
|
5819
|
+
url: toPathString(localVarUrlObj),
|
|
5820
|
+
options: localVarRequestOptions,
|
|
5821
|
+
};
|
|
5822
|
+
},
|
|
5823
|
+
/**
|
|
5824
|
+
* Claim a promotion
|
|
5825
|
+
* @summary Claim a promotion
|
|
5826
|
+
* @param {string} id Promotion ID
|
|
5827
|
+
* @param {string} progressID Promotion Progress ID
|
|
5828
|
+
* @param {*} [options] Override http request option.
|
|
5829
|
+
* @throws {RequiredError}
|
|
5830
|
+
*/
|
|
5831
|
+
claimPromotionUser: async (id: string, progressID: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
5832
|
+
// verify required parameter 'id' is not null or undefined
|
|
5833
|
+
assertParamExists('claimPromotionUser', 'id', id)
|
|
5834
|
+
// verify required parameter 'progressID' is not null or undefined
|
|
5835
|
+
assertParamExists('claimPromotionUser', 'progressID', progressID)
|
|
5836
|
+
const localVarPath = `/users/promotions/{id}/progress/{progressID}/claims`
|
|
5837
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
|
5838
|
+
.replace(`{${"progressID"}}`, encodeURIComponent(String(progressID)));
|
|
5839
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5840
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5841
|
+
let baseOptions;
|
|
5842
|
+
if (configuration) {
|
|
5843
|
+
baseOptions = configuration.baseOptions;
|
|
5844
|
+
}
|
|
5845
|
+
|
|
5846
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
5847
|
+
const localVarHeaderParameter = {} as any;
|
|
5848
|
+
const localVarQueryParameter = {} as any;
|
|
5849
|
+
|
|
5850
|
+
|
|
5851
|
+
|
|
5852
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5853
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5854
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
5855
|
+
|
|
5856
|
+
return {
|
|
5857
|
+
url: toPathString(localVarUrlObj),
|
|
5858
|
+
options: localVarRequestOptions,
|
|
5859
|
+
};
|
|
5860
|
+
},
|
|
5861
|
+
/**
|
|
5862
|
+
* Claim a promotion for all periods
|
|
5863
|
+
* @summary Claim a promotion
|
|
5864
|
+
* @param {string} id Promotion ID
|
|
5865
|
+
* @param {*} [options] Override http request option.
|
|
5866
|
+
* @throws {RequiredError}
|
|
5867
|
+
*/
|
|
5868
|
+
claimPromotionUserAll: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
5869
|
+
// verify required parameter 'id' is not null or undefined
|
|
5870
|
+
assertParamExists('claimPromotionUserAll', 'id', id)
|
|
5871
|
+
const localVarPath = `/users/promotions/{id}/claims`
|
|
5872
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
5873
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5874
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5875
|
+
let baseOptions;
|
|
5876
|
+
if (configuration) {
|
|
5877
|
+
baseOptions = configuration.baseOptions;
|
|
5878
|
+
}
|
|
5879
|
+
|
|
5880
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
5881
|
+
const localVarHeaderParameter = {} as any;
|
|
5882
|
+
const localVarQueryParameter = {} as any;
|
|
5883
|
+
|
|
5884
|
+
|
|
5885
|
+
|
|
5886
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5887
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5888
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
5889
|
+
|
|
5890
|
+
return {
|
|
5891
|
+
url: toPathString(localVarUrlObj),
|
|
5892
|
+
options: localVarRequestOptions,
|
|
5893
|
+
};
|
|
5894
|
+
},
|
|
5099
5895
|
/**
|
|
5100
5896
|
* Configure a promotion
|
|
5101
5897
|
* @summary Create promotion
|
|
@@ -5349,6 +6145,53 @@ export const PromotionApiAxiosParamCreator = function (configuration?: Configura
|
|
|
5349
6145
|
export const PromotionApiFp = function(configuration?: Configuration) {
|
|
5350
6146
|
const localVarAxiosParamCreator = PromotionApiAxiosParamCreator(configuration)
|
|
5351
6147
|
return {
|
|
6148
|
+
/**
|
|
6149
|
+
* Claim a promotion by admins
|
|
6150
|
+
* @summary Claim a promotion
|
|
6151
|
+
* @param {string} id Promotion ID
|
|
6152
|
+
* @param {PromotionClaimRequest} [promotionClaimRequest]
|
|
6153
|
+
* @param {*} [options] Override http request option.
|
|
6154
|
+
* @throws {RequiredError}
|
|
6155
|
+
*/
|
|
6156
|
+
async claimPromotion(id: string, promotionClaimRequest?: PromotionClaimRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
6157
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.claimPromotion(id, promotionClaimRequest, options);
|
|
6158
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
6159
|
+
},
|
|
6160
|
+
/**
|
|
6161
|
+
* Claim a promotion by admins
|
|
6162
|
+
* @summary Claim a promotion
|
|
6163
|
+
* @param {string} id Promotion ID
|
|
6164
|
+
* @param {string} progressID Promotion Progress ID
|
|
6165
|
+
* @param {*} [options] Override http request option.
|
|
6166
|
+
* @throws {RequiredError}
|
|
6167
|
+
*/
|
|
6168
|
+
async claimPromotionProgress(id: string, progressID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
6169
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.claimPromotionProgress(id, progressID, options);
|
|
6170
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
6171
|
+
},
|
|
6172
|
+
/**
|
|
6173
|
+
* Claim a promotion
|
|
6174
|
+
* @summary Claim a promotion
|
|
6175
|
+
* @param {string} id Promotion ID
|
|
6176
|
+
* @param {string} progressID Promotion Progress ID
|
|
6177
|
+
* @param {*} [options] Override http request option.
|
|
6178
|
+
* @throws {RequiredError}
|
|
6179
|
+
*/
|
|
6180
|
+
async claimPromotionUser(id: string, progressID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
6181
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.claimPromotionUser(id, progressID, options);
|
|
6182
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
6183
|
+
},
|
|
6184
|
+
/**
|
|
6185
|
+
* Claim a promotion for all periods
|
|
6186
|
+
* @summary Claim a promotion
|
|
6187
|
+
* @param {string} id Promotion ID
|
|
6188
|
+
* @param {*} [options] Override http request option.
|
|
6189
|
+
* @throws {RequiredError}
|
|
6190
|
+
*/
|
|
6191
|
+
async claimPromotionUserAll(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
6192
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.claimPromotionUserAll(id, options);
|
|
6193
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
6194
|
+
},
|
|
5352
6195
|
/**
|
|
5353
6196
|
* Configure a promotion
|
|
5354
6197
|
* @summary Create promotion
|
|
@@ -5423,6 +6266,49 @@ export const PromotionApiFp = function(configuration?: Configuration) {
|
|
|
5423
6266
|
export const PromotionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
5424
6267
|
const localVarFp = PromotionApiFp(configuration)
|
|
5425
6268
|
return {
|
|
6269
|
+
/**
|
|
6270
|
+
* Claim a promotion by admins
|
|
6271
|
+
* @summary Claim a promotion
|
|
6272
|
+
* @param {string} id Promotion ID
|
|
6273
|
+
* @param {PromotionClaimRequest} [promotionClaimRequest]
|
|
6274
|
+
* @param {*} [options] Override http request option.
|
|
6275
|
+
* @throws {RequiredError}
|
|
6276
|
+
*/
|
|
6277
|
+
claimPromotion(id: string, promotionClaimRequest?: PromotionClaimRequest, options?: any): AxiosPromise<void> {
|
|
6278
|
+
return localVarFp.claimPromotion(id, promotionClaimRequest, options).then((request) => request(axios, basePath));
|
|
6279
|
+
},
|
|
6280
|
+
/**
|
|
6281
|
+
* Claim a promotion by admins
|
|
6282
|
+
* @summary Claim a promotion
|
|
6283
|
+
* @param {string} id Promotion ID
|
|
6284
|
+
* @param {string} progressID Promotion Progress ID
|
|
6285
|
+
* @param {*} [options] Override http request option.
|
|
6286
|
+
* @throws {RequiredError}
|
|
6287
|
+
*/
|
|
6288
|
+
claimPromotionProgress(id: string, progressID: string, options?: any): AxiosPromise<void> {
|
|
6289
|
+
return localVarFp.claimPromotionProgress(id, progressID, options).then((request) => request(axios, basePath));
|
|
6290
|
+
},
|
|
6291
|
+
/**
|
|
6292
|
+
* Claim a promotion
|
|
6293
|
+
* @summary Claim a promotion
|
|
6294
|
+
* @param {string} id Promotion ID
|
|
6295
|
+
* @param {string} progressID Promotion Progress ID
|
|
6296
|
+
* @param {*} [options] Override http request option.
|
|
6297
|
+
* @throws {RequiredError}
|
|
6298
|
+
*/
|
|
6299
|
+
claimPromotionUser(id: string, progressID: string, options?: any): AxiosPromise<void> {
|
|
6300
|
+
return localVarFp.claimPromotionUser(id, progressID, options).then((request) => request(axios, basePath));
|
|
6301
|
+
},
|
|
6302
|
+
/**
|
|
6303
|
+
* Claim a promotion for all periods
|
|
6304
|
+
* @summary Claim a promotion
|
|
6305
|
+
* @param {string} id Promotion ID
|
|
6306
|
+
* @param {*} [options] Override http request option.
|
|
6307
|
+
* @throws {RequiredError}
|
|
6308
|
+
*/
|
|
6309
|
+
claimPromotionUserAll(id: string, options?: any): AxiosPromise<void> {
|
|
6310
|
+
return localVarFp.claimPromotionUserAll(id, options).then((request) => request(axios, basePath));
|
|
6311
|
+
},
|
|
5426
6312
|
/**
|
|
5427
6313
|
* Configure a promotion
|
|
5428
6314
|
* @summary Create promotion
|
|
@@ -5492,6 +6378,57 @@ export const PromotionApiFactory = function (configuration?: Configuration, base
|
|
|
5492
6378
|
* @extends {BaseAPI}
|
|
5493
6379
|
*/
|
|
5494
6380
|
export class PromotionApi extends BaseAPI {
|
|
6381
|
+
/**
|
|
6382
|
+
* Claim a promotion by admins
|
|
6383
|
+
* @summary Claim a promotion
|
|
6384
|
+
* @param {string} id Promotion ID
|
|
6385
|
+
* @param {PromotionClaimRequest} [promotionClaimRequest]
|
|
6386
|
+
* @param {*} [options] Override http request option.
|
|
6387
|
+
* @throws {RequiredError}
|
|
6388
|
+
* @memberof PromotionApi
|
|
6389
|
+
*/
|
|
6390
|
+
public claimPromotion(id: string, promotionClaimRequest?: PromotionClaimRequest, options?: AxiosRequestConfig) {
|
|
6391
|
+
return PromotionApiFp(this.configuration).claimPromotion(id, promotionClaimRequest, options).then((request) => request(this.axios, this.basePath));
|
|
6392
|
+
}
|
|
6393
|
+
|
|
6394
|
+
/**
|
|
6395
|
+
* Claim a promotion by admins
|
|
6396
|
+
* @summary Claim a promotion
|
|
6397
|
+
* @param {string} id Promotion ID
|
|
6398
|
+
* @param {string} progressID Promotion Progress ID
|
|
6399
|
+
* @param {*} [options] Override http request option.
|
|
6400
|
+
* @throws {RequiredError}
|
|
6401
|
+
* @memberof PromotionApi
|
|
6402
|
+
*/
|
|
6403
|
+
public claimPromotionProgress(id: string, progressID: string, options?: AxiosRequestConfig) {
|
|
6404
|
+
return PromotionApiFp(this.configuration).claimPromotionProgress(id, progressID, options).then((request) => request(this.axios, this.basePath));
|
|
6405
|
+
}
|
|
6406
|
+
|
|
6407
|
+
/**
|
|
6408
|
+
* Claim a promotion
|
|
6409
|
+
* @summary Claim a promotion
|
|
6410
|
+
* @param {string} id Promotion ID
|
|
6411
|
+
* @param {string} progressID Promotion Progress ID
|
|
6412
|
+
* @param {*} [options] Override http request option.
|
|
6413
|
+
* @throws {RequiredError}
|
|
6414
|
+
* @memberof PromotionApi
|
|
6415
|
+
*/
|
|
6416
|
+
public claimPromotionUser(id: string, progressID: string, options?: AxiosRequestConfig) {
|
|
6417
|
+
return PromotionApiFp(this.configuration).claimPromotionUser(id, progressID, options).then((request) => request(this.axios, this.basePath));
|
|
6418
|
+
}
|
|
6419
|
+
|
|
6420
|
+
/**
|
|
6421
|
+
* Claim a promotion for all periods
|
|
6422
|
+
* @summary Claim a promotion
|
|
6423
|
+
* @param {string} id Promotion ID
|
|
6424
|
+
* @param {*} [options] Override http request option.
|
|
6425
|
+
* @throws {RequiredError}
|
|
6426
|
+
* @memberof PromotionApi
|
|
6427
|
+
*/
|
|
6428
|
+
public claimPromotionUserAll(id: string, options?: AxiosRequestConfig) {
|
|
6429
|
+
return PromotionApiFp(this.configuration).claimPromotionUserAll(id, options).then((request) => request(this.axios, this.basePath));
|
|
6430
|
+
}
|
|
6431
|
+
|
|
5495
6432
|
/**
|
|
5496
6433
|
* Configure a promotion
|
|
5497
6434
|
* @summary Create promotion
|
|
@@ -5564,225 +6501,6 @@ export class PromotionApi extends BaseAPI {
|
|
|
5564
6501
|
|
|
5565
6502
|
|
|
5566
6503
|
|
|
5567
|
-
/**
|
|
5568
|
-
* RewardApi - axios parameter creator
|
|
5569
|
-
* @export
|
|
5570
|
-
*/
|
|
5571
|
-
export const RewardApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
5572
|
-
return {
|
|
5573
|
-
/**
|
|
5574
|
-
* Create upload URL for reward
|
|
5575
|
-
* @summary Create upload URL for reward
|
|
5576
|
-
* @param {*} [options] Override http request option.
|
|
5577
|
-
* @throws {RequiredError}
|
|
5578
|
-
*/
|
|
5579
|
-
createUploadURL: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
5580
|
-
const localVarPath = `/products/upload-urls`;
|
|
5581
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5582
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5583
|
-
let baseOptions;
|
|
5584
|
-
if (configuration) {
|
|
5585
|
-
baseOptions = configuration.baseOptions;
|
|
5586
|
-
}
|
|
5587
|
-
|
|
5588
|
-
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
5589
|
-
const localVarHeaderParameter = {} as any;
|
|
5590
|
-
const localVarQueryParameter = {} as any;
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5595
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5596
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
5597
|
-
|
|
5598
|
-
return {
|
|
5599
|
-
url: toPathString(localVarUrlObj),
|
|
5600
|
-
options: localVarRequestOptions,
|
|
5601
|
-
};
|
|
5602
|
-
},
|
|
5603
|
-
/**
|
|
5604
|
-
* List existing products
|
|
5605
|
-
* @summary List existing products
|
|
5606
|
-
* @param {ProductKind} [kind] The product kind
|
|
5607
|
-
* @param {string} [search] search string
|
|
5608
|
-
* @param {ProductUsage} [usage] The product usage
|
|
5609
|
-
* @param {ProductStatus} [status] The product status
|
|
5610
|
-
* @param {ProductAvailability} [availability] The product availability
|
|
5611
|
-
* @param {string} [segmentID] The segment ID
|
|
5612
|
-
* @param {string} [nextToken] This is the pagination token
|
|
5613
|
-
* @param {*} [options] Override http request option.
|
|
5614
|
-
* @throws {RequiredError}
|
|
5615
|
-
*/
|
|
5616
|
-
listProducts: async (kind?: ProductKind, search?: string, usage?: ProductUsage, status?: ProductStatus, availability?: ProductAvailability, segmentID?: string, nextToken?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
5617
|
-
const localVarPath = `/products`;
|
|
5618
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5619
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5620
|
-
let baseOptions;
|
|
5621
|
-
if (configuration) {
|
|
5622
|
-
baseOptions = configuration.baseOptions;
|
|
5623
|
-
}
|
|
5624
|
-
|
|
5625
|
-
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
5626
|
-
const localVarHeaderParameter = {} as any;
|
|
5627
|
-
const localVarQueryParameter = {} as any;
|
|
5628
|
-
|
|
5629
|
-
// authentication jwt required
|
|
5630
|
-
// http bearer authentication required
|
|
5631
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
5632
|
-
|
|
5633
|
-
if (kind !== undefined) {
|
|
5634
|
-
localVarQueryParameter['kind'] = kind;
|
|
5635
|
-
}
|
|
5636
|
-
|
|
5637
|
-
if (search !== undefined) {
|
|
5638
|
-
localVarQueryParameter['search'] = search;
|
|
5639
|
-
}
|
|
5640
|
-
|
|
5641
|
-
if (usage !== undefined) {
|
|
5642
|
-
localVarQueryParameter['usage'] = usage;
|
|
5643
|
-
}
|
|
5644
|
-
|
|
5645
|
-
if (status !== undefined) {
|
|
5646
|
-
localVarQueryParameter['status'] = status;
|
|
5647
|
-
}
|
|
5648
|
-
|
|
5649
|
-
if (availability !== undefined) {
|
|
5650
|
-
localVarQueryParameter['availability'] = availability;
|
|
5651
|
-
}
|
|
5652
|
-
|
|
5653
|
-
if (segmentID !== undefined) {
|
|
5654
|
-
localVarQueryParameter['segmentID'] = segmentID;
|
|
5655
|
-
}
|
|
5656
|
-
|
|
5657
|
-
if (nextToken !== undefined) {
|
|
5658
|
-
localVarQueryParameter['nextToken'] = nextToken;
|
|
5659
|
-
}
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5664
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5665
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
5666
|
-
|
|
5667
|
-
return {
|
|
5668
|
-
url: toPathString(localVarUrlObj),
|
|
5669
|
-
options: localVarRequestOptions,
|
|
5670
|
-
};
|
|
5671
|
-
},
|
|
5672
|
-
}
|
|
5673
|
-
};
|
|
5674
|
-
|
|
5675
|
-
/**
|
|
5676
|
-
* RewardApi - functional programming interface
|
|
5677
|
-
* @export
|
|
5678
|
-
*/
|
|
5679
|
-
export const RewardApiFp = function(configuration?: Configuration) {
|
|
5680
|
-
const localVarAxiosParamCreator = RewardApiAxiosParamCreator(configuration)
|
|
5681
|
-
return {
|
|
5682
|
-
/**
|
|
5683
|
-
* Create upload URL for reward
|
|
5684
|
-
* @summary Create upload URL for reward
|
|
5685
|
-
* @param {*} [options] Override http request option.
|
|
5686
|
-
* @throws {RequiredError}
|
|
5687
|
-
*/
|
|
5688
|
-
async createUploadURL(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UploadURLResponse>> {
|
|
5689
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.createUploadURL(options);
|
|
5690
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
5691
|
-
},
|
|
5692
|
-
/**
|
|
5693
|
-
* List existing products
|
|
5694
|
-
* @summary List existing products
|
|
5695
|
-
* @param {ProductKind} [kind] The product kind
|
|
5696
|
-
* @param {string} [search] search string
|
|
5697
|
-
* @param {ProductUsage} [usage] The product usage
|
|
5698
|
-
* @param {ProductStatus} [status] The product status
|
|
5699
|
-
* @param {ProductAvailability} [availability] The product availability
|
|
5700
|
-
* @param {string} [segmentID] The segment ID
|
|
5701
|
-
* @param {string} [nextToken] This is the pagination token
|
|
5702
|
-
* @param {*} [options] Override http request option.
|
|
5703
|
-
* @throws {RequiredError}
|
|
5704
|
-
*/
|
|
5705
|
-
async listProducts(kind?: ProductKind, search?: string, usage?: ProductUsage, status?: ProductStatus, availability?: ProductAvailability, segmentID?: string, nextToken?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProductsResponse>> {
|
|
5706
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.listProducts(kind, search, usage, status, availability, segmentID, nextToken, options);
|
|
5707
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
5708
|
-
},
|
|
5709
|
-
}
|
|
5710
|
-
};
|
|
5711
|
-
|
|
5712
|
-
/**
|
|
5713
|
-
* RewardApi - factory interface
|
|
5714
|
-
* @export
|
|
5715
|
-
*/
|
|
5716
|
-
export const RewardApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
5717
|
-
const localVarFp = RewardApiFp(configuration)
|
|
5718
|
-
return {
|
|
5719
|
-
/**
|
|
5720
|
-
* Create upload URL for reward
|
|
5721
|
-
* @summary Create upload URL for reward
|
|
5722
|
-
* @param {*} [options] Override http request option.
|
|
5723
|
-
* @throws {RequiredError}
|
|
5724
|
-
*/
|
|
5725
|
-
createUploadURL(options?: any): AxiosPromise<UploadURLResponse> {
|
|
5726
|
-
return localVarFp.createUploadURL(options).then((request) => request(axios, basePath));
|
|
5727
|
-
},
|
|
5728
|
-
/**
|
|
5729
|
-
* List existing products
|
|
5730
|
-
* @summary List existing products
|
|
5731
|
-
* @param {ProductKind} [kind] The product kind
|
|
5732
|
-
* @param {string} [search] search string
|
|
5733
|
-
* @param {ProductUsage} [usage] The product usage
|
|
5734
|
-
* @param {ProductStatus} [status] The product status
|
|
5735
|
-
* @param {ProductAvailability} [availability] The product availability
|
|
5736
|
-
* @param {string} [segmentID] The segment ID
|
|
5737
|
-
* @param {string} [nextToken] This is the pagination token
|
|
5738
|
-
* @param {*} [options] Override http request option.
|
|
5739
|
-
* @throws {RequiredError}
|
|
5740
|
-
*/
|
|
5741
|
-
listProducts(kind?: ProductKind, search?: string, usage?: ProductUsage, status?: ProductStatus, availability?: ProductAvailability, segmentID?: string, nextToken?: string, options?: any): AxiosPromise<ProductsResponse> {
|
|
5742
|
-
return localVarFp.listProducts(kind, search, usage, status, availability, segmentID, nextToken, options).then((request) => request(axios, basePath));
|
|
5743
|
-
},
|
|
5744
|
-
};
|
|
5745
|
-
};
|
|
5746
|
-
|
|
5747
|
-
/**
|
|
5748
|
-
* RewardApi - object-oriented interface
|
|
5749
|
-
* @export
|
|
5750
|
-
* @class RewardApi
|
|
5751
|
-
* @extends {BaseAPI}
|
|
5752
|
-
*/
|
|
5753
|
-
export class RewardApi extends BaseAPI {
|
|
5754
|
-
/**
|
|
5755
|
-
* Create upload URL for reward
|
|
5756
|
-
* @summary Create upload URL for reward
|
|
5757
|
-
* @param {*} [options] Override http request option.
|
|
5758
|
-
* @throws {RequiredError}
|
|
5759
|
-
* @memberof RewardApi
|
|
5760
|
-
*/
|
|
5761
|
-
public createUploadURL(options?: AxiosRequestConfig) {
|
|
5762
|
-
return RewardApiFp(this.configuration).createUploadURL(options).then((request) => request(this.axios, this.basePath));
|
|
5763
|
-
}
|
|
5764
|
-
|
|
5765
|
-
/**
|
|
5766
|
-
* List existing products
|
|
5767
|
-
* @summary List existing products
|
|
5768
|
-
* @param {ProductKind} [kind] The product kind
|
|
5769
|
-
* @param {string} [search] search string
|
|
5770
|
-
* @param {ProductUsage} [usage] The product usage
|
|
5771
|
-
* @param {ProductStatus} [status] The product status
|
|
5772
|
-
* @param {ProductAvailability} [availability] The product availability
|
|
5773
|
-
* @param {string} [segmentID] The segment ID
|
|
5774
|
-
* @param {string} [nextToken] This is the pagination token
|
|
5775
|
-
* @param {*} [options] Override http request option.
|
|
5776
|
-
* @throws {RequiredError}
|
|
5777
|
-
* @memberof RewardApi
|
|
5778
|
-
*/
|
|
5779
|
-
public listProducts(kind?: ProductKind, search?: string, usage?: ProductUsage, status?: ProductStatus, availability?: ProductAvailability, segmentID?: string, nextToken?: string, options?: AxiosRequestConfig) {
|
|
5780
|
-
return RewardApiFp(this.configuration).listProducts(kind, search, usage, status, availability, segmentID, nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
5781
|
-
}
|
|
5782
|
-
}
|
|
5783
|
-
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
6504
|
/**
|
|
5787
6505
|
* SegmentApi - axios parameter creator
|
|
5788
6506
|
* @export
|
|
@@ -6455,14 +7173,12 @@ export const TransactionApiAxiosParamCreator = function (configuration?: Configu
|
|
|
6455
7173
|
/**
|
|
6456
7174
|
* List existing transactions
|
|
6457
7175
|
* @summary List existing transactions
|
|
6458
|
-
* @param {string} clientID This is the client ID
|
|
6459
7176
|
* @param {string} [paginationToken] This is the pagination token
|
|
7177
|
+
* @param {string} [clientID] This is the client ID
|
|
6460
7178
|
* @param {*} [options] Override http request option.
|
|
6461
7179
|
* @throws {RequiredError}
|
|
6462
7180
|
*/
|
|
6463
|
-
listTransactions: async (
|
|
6464
|
-
// verify required parameter 'clientID' is not null or undefined
|
|
6465
|
-
assertParamExists('listTransactions', 'clientID', clientID)
|
|
7181
|
+
listTransactions: async (paginationToken?: string, clientID?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
6466
7182
|
const localVarPath = `/transactions`;
|
|
6467
7183
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
6468
7184
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -6511,13 +7227,13 @@ export const TransactionApiFp = function(configuration?: Configuration) {
|
|
|
6511
7227
|
/**
|
|
6512
7228
|
* List existing transactions
|
|
6513
7229
|
* @summary List existing transactions
|
|
6514
|
-
* @param {string} clientID This is the client ID
|
|
6515
7230
|
* @param {string} [paginationToken] This is the pagination token
|
|
7231
|
+
* @param {string} [clientID] This is the client ID
|
|
6516
7232
|
* @param {*} [options] Override http request option.
|
|
6517
7233
|
* @throws {RequiredError}
|
|
6518
7234
|
*/
|
|
6519
|
-
async listTransactions(
|
|
6520
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactions(
|
|
7235
|
+
async listTransactions(paginationToken?: string, clientID?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TransactionsResponse>> {
|
|
7236
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactions(paginationToken, clientID, options);
|
|
6521
7237
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
6522
7238
|
},
|
|
6523
7239
|
}
|
|
@@ -6533,13 +7249,13 @@ export const TransactionApiFactory = function (configuration?: Configuration, ba
|
|
|
6533
7249
|
/**
|
|
6534
7250
|
* List existing transactions
|
|
6535
7251
|
* @summary List existing transactions
|
|
6536
|
-
* @param {string} clientID This is the client ID
|
|
6537
7252
|
* @param {string} [paginationToken] This is the pagination token
|
|
7253
|
+
* @param {string} [clientID] This is the client ID
|
|
6538
7254
|
* @param {*} [options] Override http request option.
|
|
6539
7255
|
* @throws {RequiredError}
|
|
6540
7256
|
*/
|
|
6541
|
-
listTransactions(
|
|
6542
|
-
return localVarFp.listTransactions(
|
|
7257
|
+
listTransactions(paginationToken?: string, clientID?: string, options?: any): AxiosPromise<TransactionsResponse> {
|
|
7258
|
+
return localVarFp.listTransactions(paginationToken, clientID, options).then((request) => request(axios, basePath));
|
|
6543
7259
|
},
|
|
6544
7260
|
};
|
|
6545
7261
|
};
|
|
@@ -6554,14 +7270,14 @@ export class TransactionApi extends BaseAPI {
|
|
|
6554
7270
|
/**
|
|
6555
7271
|
* List existing transactions
|
|
6556
7272
|
* @summary List existing transactions
|
|
6557
|
-
* @param {string} clientID This is the client ID
|
|
6558
7273
|
* @param {string} [paginationToken] This is the pagination token
|
|
7274
|
+
* @param {string} [clientID] This is the client ID
|
|
6559
7275
|
* @param {*} [options] Override http request option.
|
|
6560
7276
|
* @throws {RequiredError}
|
|
6561
7277
|
* @memberof TransactionApi
|
|
6562
7278
|
*/
|
|
6563
|
-
public listTransactions(
|
|
6564
|
-
return TransactionApiFp(this.configuration).listTransactions(
|
|
7279
|
+
public listTransactions(paginationToken?: string, clientID?: string, options?: AxiosRequestConfig) {
|
|
7280
|
+
return TransactionApiFp(this.configuration).listTransactions(paginationToken, clientID, options).then((request) => request(this.axios, this.basePath));
|
|
6565
7281
|
}
|
|
6566
7282
|
}
|
|
6567
7283
|
|