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/dist/esm/api.js
CHANGED
|
@@ -43,7 +43,7 @@ export const AuditLogObjectType = {
|
|
|
43
43
|
* @export
|
|
44
44
|
* @enum {string}
|
|
45
45
|
*/
|
|
46
|
-
export const
|
|
46
|
+
export const BeneficiaryKind = {
|
|
47
47
|
User: 'user',
|
|
48
48
|
Client: 'client'
|
|
49
49
|
};
|
|
@@ -96,6 +96,10 @@ export const NotificationStatus = {
|
|
|
96
96
|
Unread: 'unread',
|
|
97
97
|
Read: 'read'
|
|
98
98
|
};
|
|
99
|
+
export const OrderKindEnum = {
|
|
100
|
+
Webshop: 'webshop',
|
|
101
|
+
Promotions: 'promotions'
|
|
102
|
+
};
|
|
99
103
|
/**
|
|
100
104
|
*
|
|
101
105
|
* @export
|
|
@@ -164,15 +168,6 @@ export const PromotionType = {
|
|
|
164
168
|
Regular: 'regular',
|
|
165
169
|
CustomDeal: 'custom_deal'
|
|
166
170
|
};
|
|
167
|
-
/**
|
|
168
|
-
*
|
|
169
|
-
* @export
|
|
170
|
-
* @enum {string}
|
|
171
|
-
*/
|
|
172
|
-
export const ReceiverKind = {
|
|
173
|
-
User: 'user',
|
|
174
|
-
Client: 'client'
|
|
175
|
-
};
|
|
176
171
|
/**
|
|
177
172
|
*
|
|
178
173
|
* @export
|
|
@@ -278,7 +273,7 @@ export const UserSource = {
|
|
|
278
273
|
* @enum {string}
|
|
279
274
|
*/
|
|
280
275
|
export const WebhookKind = {
|
|
281
|
-
|
|
276
|
+
Order: 'order'
|
|
282
277
|
};
|
|
283
278
|
/**
|
|
284
279
|
* AuditApi - axios parameter creator
|
|
@@ -469,13 +464,16 @@ export const BalanceApiAxiosParamCreator = function (configuration) {
|
|
|
469
464
|
/**
|
|
470
465
|
* Get balance
|
|
471
466
|
* @summary Get balance
|
|
472
|
-
* @param {string}
|
|
467
|
+
* @param {string} beneficiaryValue This is the beneficiary value
|
|
468
|
+
* @param {BeneficiaryKind} kind This is the beneficiary kind
|
|
473
469
|
* @param {*} [options] Override http request option.
|
|
474
470
|
* @throws {RequiredError}
|
|
475
471
|
*/
|
|
476
|
-
getBalance: (
|
|
477
|
-
// verify required parameter '
|
|
478
|
-
assertParamExists('getBalance', '
|
|
472
|
+
getBalance: (beneficiaryValue, kind, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
473
|
+
// verify required parameter 'beneficiaryValue' is not null or undefined
|
|
474
|
+
assertParamExists('getBalance', 'beneficiaryValue', beneficiaryValue);
|
|
475
|
+
// verify required parameter 'kind' is not null or undefined
|
|
476
|
+
assertParamExists('getBalance', 'kind', kind);
|
|
479
477
|
const localVarPath = `/balances`;
|
|
480
478
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
481
479
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -489,8 +487,11 @@ export const BalanceApiAxiosParamCreator = function (configuration) {
|
|
|
489
487
|
// authentication jwt required
|
|
490
488
|
// http bearer authentication required
|
|
491
489
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
492
|
-
if (
|
|
493
|
-
localVarQueryParameter['
|
|
490
|
+
if (beneficiaryValue !== undefined) {
|
|
491
|
+
localVarQueryParameter['beneficiaryValue'] = beneficiaryValue;
|
|
492
|
+
}
|
|
493
|
+
if (kind !== undefined) {
|
|
494
|
+
localVarQueryParameter['kind'] = kind;
|
|
494
495
|
}
|
|
495
496
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
496
497
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -503,16 +504,16 @@ export const BalanceApiAxiosParamCreator = function (configuration) {
|
|
|
503
504
|
/**
|
|
504
505
|
* Transfer balance
|
|
505
506
|
* @summary Transfer balance
|
|
506
|
-
* @param {string}
|
|
507
|
+
* @param {string} beneficiaryValue ID of the beneficiary where we want to update balance.
|
|
507
508
|
* @param {BalanceUpdateRequest} [balanceUpdateRequest]
|
|
508
509
|
* @param {*} [options] Override http request option.
|
|
509
510
|
* @throws {RequiredError}
|
|
510
511
|
*/
|
|
511
|
-
transferBalance: (
|
|
512
|
-
// verify required parameter '
|
|
513
|
-
assertParamExists('transferBalance', '
|
|
514
|
-
const localVarPath = `/balances/{
|
|
515
|
-
.replace(`{${"
|
|
512
|
+
transferBalance: (beneficiaryValue, balanceUpdateRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
513
|
+
// verify required parameter 'beneficiaryValue' is not null or undefined
|
|
514
|
+
assertParamExists('transferBalance', 'beneficiaryValue', beneficiaryValue);
|
|
515
|
+
const localVarPath = `/balances/{beneficiaryValue}/transfer`
|
|
516
|
+
.replace(`{${"beneficiaryValue"}}`, encodeURIComponent(String(beneficiaryValue)));
|
|
516
517
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
517
518
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
518
519
|
let baseOptions;
|
|
@@ -535,16 +536,16 @@ export const BalanceApiAxiosParamCreator = function (configuration) {
|
|
|
535
536
|
/**
|
|
536
537
|
* Manually update balance. Used as manual compensation for out of stock products.
|
|
537
538
|
* @summary Manually update balance
|
|
538
|
-
* @param {string}
|
|
539
|
+
* @param {string} beneficiaryValue ID of the beneficiary where we want to update balance.
|
|
539
540
|
* @param {BalanceUpdateRequest} [balanceUpdateRequest]
|
|
540
541
|
* @param {*} [options] Override http request option.
|
|
541
542
|
* @throws {RequiredError}
|
|
542
543
|
*/
|
|
543
|
-
updateBalance: (
|
|
544
|
-
// verify required parameter '
|
|
545
|
-
assertParamExists('updateBalance', '
|
|
546
|
-
const localVarPath = `/balances/{
|
|
547
|
-
.replace(`{${"
|
|
544
|
+
updateBalance: (beneficiaryValue, balanceUpdateRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
545
|
+
// verify required parameter 'beneficiaryValue' is not null or undefined
|
|
546
|
+
assertParamExists('updateBalance', 'beneficiaryValue', beneficiaryValue);
|
|
547
|
+
const localVarPath = `/balances/{beneficiaryValue}`
|
|
548
|
+
.replace(`{${"beneficiaryValue"}}`, encodeURIComponent(String(beneficiaryValue)));
|
|
548
549
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
549
550
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
550
551
|
let baseOptions;
|
|
@@ -576,41 +577,42 @@ export const BalanceApiFp = function (configuration) {
|
|
|
576
577
|
/**
|
|
577
578
|
* Get balance
|
|
578
579
|
* @summary Get balance
|
|
579
|
-
* @param {string}
|
|
580
|
+
* @param {string} beneficiaryValue This is the beneficiary value
|
|
581
|
+
* @param {BeneficiaryKind} kind This is the beneficiary kind
|
|
580
582
|
* @param {*} [options] Override http request option.
|
|
581
583
|
* @throws {RequiredError}
|
|
582
584
|
*/
|
|
583
|
-
getBalance(
|
|
585
|
+
getBalance(beneficiaryValue, kind, options) {
|
|
584
586
|
return __awaiter(this, void 0, void 0, function* () {
|
|
585
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getBalance(
|
|
587
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getBalance(beneficiaryValue, kind, options);
|
|
586
588
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
587
589
|
});
|
|
588
590
|
},
|
|
589
591
|
/**
|
|
590
592
|
* Transfer balance
|
|
591
593
|
* @summary Transfer balance
|
|
592
|
-
* @param {string}
|
|
594
|
+
* @param {string} beneficiaryValue ID of the beneficiary where we want to update balance.
|
|
593
595
|
* @param {BalanceUpdateRequest} [balanceUpdateRequest]
|
|
594
596
|
* @param {*} [options] Override http request option.
|
|
595
597
|
* @throws {RequiredError}
|
|
596
598
|
*/
|
|
597
|
-
transferBalance(
|
|
599
|
+
transferBalance(beneficiaryValue, balanceUpdateRequest, options) {
|
|
598
600
|
return __awaiter(this, void 0, void 0, function* () {
|
|
599
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.transferBalance(
|
|
601
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.transferBalance(beneficiaryValue, balanceUpdateRequest, options);
|
|
600
602
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
601
603
|
});
|
|
602
604
|
},
|
|
603
605
|
/**
|
|
604
606
|
* Manually update balance. Used as manual compensation for out of stock products.
|
|
605
607
|
* @summary Manually update balance
|
|
606
|
-
* @param {string}
|
|
608
|
+
* @param {string} beneficiaryValue ID of the beneficiary where we want to update balance.
|
|
607
609
|
* @param {BalanceUpdateRequest} [balanceUpdateRequest]
|
|
608
610
|
* @param {*} [options] Override http request option.
|
|
609
611
|
* @throws {RequiredError}
|
|
610
612
|
*/
|
|
611
|
-
updateBalance(
|
|
613
|
+
updateBalance(beneficiaryValue, balanceUpdateRequest, options) {
|
|
612
614
|
return __awaiter(this, void 0, void 0, function* () {
|
|
613
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateBalance(
|
|
615
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateBalance(beneficiaryValue, balanceUpdateRequest, options);
|
|
614
616
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
615
617
|
});
|
|
616
618
|
},
|
|
@@ -626,34 +628,35 @@ export const BalanceApiFactory = function (configuration, basePath, axios) {
|
|
|
626
628
|
/**
|
|
627
629
|
* Get balance
|
|
628
630
|
* @summary Get balance
|
|
629
|
-
* @param {string}
|
|
631
|
+
* @param {string} beneficiaryValue This is the beneficiary value
|
|
632
|
+
* @param {BeneficiaryKind} kind This is the beneficiary kind
|
|
630
633
|
* @param {*} [options] Override http request option.
|
|
631
634
|
* @throws {RequiredError}
|
|
632
635
|
*/
|
|
633
|
-
getBalance(
|
|
634
|
-
return localVarFp.getBalance(
|
|
636
|
+
getBalance(beneficiaryValue, kind, options) {
|
|
637
|
+
return localVarFp.getBalance(beneficiaryValue, kind, options).then((request) => request(axios, basePath));
|
|
635
638
|
},
|
|
636
639
|
/**
|
|
637
640
|
* Transfer balance
|
|
638
641
|
* @summary Transfer balance
|
|
639
|
-
* @param {string}
|
|
642
|
+
* @param {string} beneficiaryValue ID of the beneficiary where we want to update balance.
|
|
640
643
|
* @param {BalanceUpdateRequest} [balanceUpdateRequest]
|
|
641
644
|
* @param {*} [options] Override http request option.
|
|
642
645
|
* @throws {RequiredError}
|
|
643
646
|
*/
|
|
644
|
-
transferBalance(
|
|
645
|
-
return localVarFp.transferBalance(
|
|
647
|
+
transferBalance(beneficiaryValue, balanceUpdateRequest, options) {
|
|
648
|
+
return localVarFp.transferBalance(beneficiaryValue, balanceUpdateRequest, options).then((request) => request(axios, basePath));
|
|
646
649
|
},
|
|
647
650
|
/**
|
|
648
651
|
* Manually update balance. Used as manual compensation for out of stock products.
|
|
649
652
|
* @summary Manually update balance
|
|
650
|
-
* @param {string}
|
|
653
|
+
* @param {string} beneficiaryValue ID of the beneficiary where we want to update balance.
|
|
651
654
|
* @param {BalanceUpdateRequest} [balanceUpdateRequest]
|
|
652
655
|
* @param {*} [options] Override http request option.
|
|
653
656
|
* @throws {RequiredError}
|
|
654
657
|
*/
|
|
655
|
-
updateBalance(
|
|
656
|
-
return localVarFp.updateBalance(
|
|
658
|
+
updateBalance(beneficiaryValue, balanceUpdateRequest, options) {
|
|
659
|
+
return localVarFp.updateBalance(beneficiaryValue, balanceUpdateRequest, options).then((request) => request(axios, basePath));
|
|
657
660
|
},
|
|
658
661
|
};
|
|
659
662
|
};
|
|
@@ -667,37 +670,38 @@ export class BalanceApi extends BaseAPI {
|
|
|
667
670
|
/**
|
|
668
671
|
* Get balance
|
|
669
672
|
* @summary Get balance
|
|
670
|
-
* @param {string}
|
|
673
|
+
* @param {string} beneficiaryValue This is the beneficiary value
|
|
674
|
+
* @param {BeneficiaryKind} kind This is the beneficiary kind
|
|
671
675
|
* @param {*} [options] Override http request option.
|
|
672
676
|
* @throws {RequiredError}
|
|
673
677
|
* @memberof BalanceApi
|
|
674
678
|
*/
|
|
675
|
-
getBalance(
|
|
676
|
-
return BalanceApiFp(this.configuration).getBalance(
|
|
679
|
+
getBalance(beneficiaryValue, kind, options) {
|
|
680
|
+
return BalanceApiFp(this.configuration).getBalance(beneficiaryValue, kind, options).then((request) => request(this.axios, this.basePath));
|
|
677
681
|
}
|
|
678
682
|
/**
|
|
679
683
|
* Transfer balance
|
|
680
684
|
* @summary Transfer balance
|
|
681
|
-
* @param {string}
|
|
685
|
+
* @param {string} beneficiaryValue ID of the beneficiary where we want to update balance.
|
|
682
686
|
* @param {BalanceUpdateRequest} [balanceUpdateRequest]
|
|
683
687
|
* @param {*} [options] Override http request option.
|
|
684
688
|
* @throws {RequiredError}
|
|
685
689
|
* @memberof BalanceApi
|
|
686
690
|
*/
|
|
687
|
-
transferBalance(
|
|
688
|
-
return BalanceApiFp(this.configuration).transferBalance(
|
|
691
|
+
transferBalance(beneficiaryValue, balanceUpdateRequest, options) {
|
|
692
|
+
return BalanceApiFp(this.configuration).transferBalance(beneficiaryValue, balanceUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
689
693
|
}
|
|
690
694
|
/**
|
|
691
695
|
* Manually update balance. Used as manual compensation for out of stock products.
|
|
692
696
|
* @summary Manually update balance
|
|
693
|
-
* @param {string}
|
|
697
|
+
* @param {string} beneficiaryValue ID of the beneficiary where we want to update balance.
|
|
694
698
|
* @param {BalanceUpdateRequest} [balanceUpdateRequest]
|
|
695
699
|
* @param {*} [options] Override http request option.
|
|
696
700
|
* @throws {RequiredError}
|
|
697
701
|
* @memberof BalanceApi
|
|
698
702
|
*/
|
|
699
|
-
updateBalance(
|
|
700
|
-
return BalanceApiFp(this.configuration).updateBalance(
|
|
703
|
+
updateBalance(beneficiaryValue, balanceUpdateRequest, options) {
|
|
704
|
+
return BalanceApiFp(this.configuration).updateBalance(beneficiaryValue, balanceUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
701
705
|
}
|
|
702
706
|
}
|
|
703
707
|
/**
|
|
@@ -1906,6 +1910,267 @@ export class NotificationApi extends BaseAPI {
|
|
|
1906
1910
|
return NotificationApiFp(this.configuration).markNotificationAsRead(notificationID, options).then((request) => request(this.axios, this.basePath));
|
|
1907
1911
|
}
|
|
1908
1912
|
}
|
|
1913
|
+
/**
|
|
1914
|
+
* OrderApi - axios parameter creator
|
|
1915
|
+
* @export
|
|
1916
|
+
*/
|
|
1917
|
+
export const OrderApiAxiosParamCreator = function (configuration) {
|
|
1918
|
+
return {
|
|
1919
|
+
/**
|
|
1920
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
|
1921
|
+
* @summary Create an order for a product
|
|
1922
|
+
* @param {CreateOrderRequest} [createOrderRequest]
|
|
1923
|
+
* @param {*} [options] Override http request option.
|
|
1924
|
+
* @throws {RequiredError}
|
|
1925
|
+
*/
|
|
1926
|
+
createOrder: (createOrderRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1927
|
+
const localVarPath = `/users/orders`;
|
|
1928
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1929
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1930
|
+
let baseOptions;
|
|
1931
|
+
if (configuration) {
|
|
1932
|
+
baseOptions = configuration.baseOptions;
|
|
1933
|
+
}
|
|
1934
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1935
|
+
const localVarHeaderParameter = {};
|
|
1936
|
+
const localVarQueryParameter = {};
|
|
1937
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1938
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1939
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1940
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1941
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createOrderRequest, localVarRequestOptions, configuration);
|
|
1942
|
+
return {
|
|
1943
|
+
url: toPathString(localVarUrlObj),
|
|
1944
|
+
options: localVarRequestOptions,
|
|
1945
|
+
};
|
|
1946
|
+
}),
|
|
1947
|
+
/**
|
|
1948
|
+
* Get order details
|
|
1949
|
+
* @summary Get order details
|
|
1950
|
+
* @param {string} id Order id
|
|
1951
|
+
* @param {*} [options] Override http request option.
|
|
1952
|
+
* @throws {RequiredError}
|
|
1953
|
+
*/
|
|
1954
|
+
getOrder: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1955
|
+
// verify required parameter 'id' is not null or undefined
|
|
1956
|
+
assertParamExists('getOrder', 'id', id);
|
|
1957
|
+
const localVarPath = `/orders/{id}`
|
|
1958
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1959
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1960
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1961
|
+
let baseOptions;
|
|
1962
|
+
if (configuration) {
|
|
1963
|
+
baseOptions = configuration.baseOptions;
|
|
1964
|
+
}
|
|
1965
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1966
|
+
const localVarHeaderParameter = {};
|
|
1967
|
+
const localVarQueryParameter = {};
|
|
1968
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1969
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1970
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1971
|
+
return {
|
|
1972
|
+
url: toPathString(localVarUrlObj),
|
|
1973
|
+
options: localVarRequestOptions,
|
|
1974
|
+
};
|
|
1975
|
+
}),
|
|
1976
|
+
/**
|
|
1977
|
+
* List existing orders
|
|
1978
|
+
* @summary List existing orders
|
|
1979
|
+
* @param {string} [paginationToken] This is the pagination token
|
|
1980
|
+
* @param {string} [search] Search for product or order
|
|
1981
|
+
* @param {string} [productId] Filter by token
|
|
1982
|
+
* @param {string} [balanceId] Filter by balance
|
|
1983
|
+
* @param {string} [createdAfter] Filter orders created after the specified date
|
|
1984
|
+
* @param {string} [createdBefore] Filter orders created before the specified date
|
|
1985
|
+
* @param {*} [options] Override http request option.
|
|
1986
|
+
* @throws {RequiredError}
|
|
1987
|
+
*/
|
|
1988
|
+
listOrders: (paginationToken, search, productId, balanceId, createdAfter, createdBefore, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1989
|
+
const localVarPath = `/users/orders`;
|
|
1990
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1991
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1992
|
+
let baseOptions;
|
|
1993
|
+
if (configuration) {
|
|
1994
|
+
baseOptions = configuration.baseOptions;
|
|
1995
|
+
}
|
|
1996
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1997
|
+
const localVarHeaderParameter = {};
|
|
1998
|
+
const localVarQueryParameter = {};
|
|
1999
|
+
if (paginationToken !== undefined) {
|
|
2000
|
+
localVarQueryParameter['paginationToken'] = paginationToken;
|
|
2001
|
+
}
|
|
2002
|
+
if (search !== undefined) {
|
|
2003
|
+
localVarQueryParameter['search'] = search;
|
|
2004
|
+
}
|
|
2005
|
+
if (productId !== undefined) {
|
|
2006
|
+
localVarQueryParameter['productId'] = productId;
|
|
2007
|
+
}
|
|
2008
|
+
if (balanceId !== undefined) {
|
|
2009
|
+
localVarQueryParameter['balanceId'] = balanceId;
|
|
2010
|
+
}
|
|
2011
|
+
if (createdAfter !== undefined) {
|
|
2012
|
+
localVarQueryParameter['createdAfter'] = (createdAfter instanceof Date) ?
|
|
2013
|
+
createdAfter.toISOString() :
|
|
2014
|
+
createdAfter;
|
|
2015
|
+
}
|
|
2016
|
+
if (createdBefore !== undefined) {
|
|
2017
|
+
localVarQueryParameter['createdBefore'] = (createdBefore instanceof Date) ?
|
|
2018
|
+
createdBefore.toISOString() :
|
|
2019
|
+
createdBefore;
|
|
2020
|
+
}
|
|
2021
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2022
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2023
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2024
|
+
return {
|
|
2025
|
+
url: toPathString(localVarUrlObj),
|
|
2026
|
+
options: localVarRequestOptions,
|
|
2027
|
+
};
|
|
2028
|
+
}),
|
|
2029
|
+
};
|
|
2030
|
+
};
|
|
2031
|
+
/**
|
|
2032
|
+
* OrderApi - functional programming interface
|
|
2033
|
+
* @export
|
|
2034
|
+
*/
|
|
2035
|
+
export const OrderApiFp = function (configuration) {
|
|
2036
|
+
const localVarAxiosParamCreator = OrderApiAxiosParamCreator(configuration);
|
|
2037
|
+
return {
|
|
2038
|
+
/**
|
|
2039
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
|
2040
|
+
* @summary Create an order for a product
|
|
2041
|
+
* @param {CreateOrderRequest} [createOrderRequest]
|
|
2042
|
+
* @param {*} [options] Override http request option.
|
|
2043
|
+
* @throws {RequiredError}
|
|
2044
|
+
*/
|
|
2045
|
+
createOrder(createOrderRequest, options) {
|
|
2046
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2047
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createOrder(createOrderRequest, options);
|
|
2048
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2049
|
+
});
|
|
2050
|
+
},
|
|
2051
|
+
/**
|
|
2052
|
+
* Get order details
|
|
2053
|
+
* @summary Get order details
|
|
2054
|
+
* @param {string} id Order id
|
|
2055
|
+
* @param {*} [options] Override http request option.
|
|
2056
|
+
* @throws {RequiredError}
|
|
2057
|
+
*/
|
|
2058
|
+
getOrder(id, options) {
|
|
2059
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2060
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrder(id, options);
|
|
2061
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2062
|
+
});
|
|
2063
|
+
},
|
|
2064
|
+
/**
|
|
2065
|
+
* List existing orders
|
|
2066
|
+
* @summary List existing orders
|
|
2067
|
+
* @param {string} [paginationToken] This is the pagination token
|
|
2068
|
+
* @param {string} [search] Search for product or order
|
|
2069
|
+
* @param {string} [productId] Filter by token
|
|
2070
|
+
* @param {string} [balanceId] Filter by balance
|
|
2071
|
+
* @param {string} [createdAfter] Filter orders created after the specified date
|
|
2072
|
+
* @param {string} [createdBefore] Filter orders created before the specified date
|
|
2073
|
+
* @param {*} [options] Override http request option.
|
|
2074
|
+
* @throws {RequiredError}
|
|
2075
|
+
*/
|
|
2076
|
+
listOrders(paginationToken, search, productId, balanceId, createdAfter, createdBefore, options) {
|
|
2077
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2078
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listOrders(paginationToken, search, productId, balanceId, createdAfter, createdBefore, options);
|
|
2079
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2080
|
+
});
|
|
2081
|
+
},
|
|
2082
|
+
};
|
|
2083
|
+
};
|
|
2084
|
+
/**
|
|
2085
|
+
* OrderApi - factory interface
|
|
2086
|
+
* @export
|
|
2087
|
+
*/
|
|
2088
|
+
export const OrderApiFactory = function (configuration, basePath, axios) {
|
|
2089
|
+
const localVarFp = OrderApiFp(configuration);
|
|
2090
|
+
return {
|
|
2091
|
+
/**
|
|
2092
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
|
2093
|
+
* @summary Create an order for a product
|
|
2094
|
+
* @param {CreateOrderRequest} [createOrderRequest]
|
|
2095
|
+
* @param {*} [options] Override http request option.
|
|
2096
|
+
* @throws {RequiredError}
|
|
2097
|
+
*/
|
|
2098
|
+
createOrder(createOrderRequest, options) {
|
|
2099
|
+
return localVarFp.createOrder(createOrderRequest, options).then((request) => request(axios, basePath));
|
|
2100
|
+
},
|
|
2101
|
+
/**
|
|
2102
|
+
* Get order details
|
|
2103
|
+
* @summary Get order details
|
|
2104
|
+
* @param {string} id Order id
|
|
2105
|
+
* @param {*} [options] Override http request option.
|
|
2106
|
+
* @throws {RequiredError}
|
|
2107
|
+
*/
|
|
2108
|
+
getOrder(id, options) {
|
|
2109
|
+
return localVarFp.getOrder(id, options).then((request) => request(axios, basePath));
|
|
2110
|
+
},
|
|
2111
|
+
/**
|
|
2112
|
+
* List existing orders
|
|
2113
|
+
* @summary List existing orders
|
|
2114
|
+
* @param {string} [paginationToken] This is the pagination token
|
|
2115
|
+
* @param {string} [search] Search for product or order
|
|
2116
|
+
* @param {string} [productId] Filter by token
|
|
2117
|
+
* @param {string} [balanceId] Filter by balance
|
|
2118
|
+
* @param {string} [createdAfter] Filter orders created after the specified date
|
|
2119
|
+
* @param {string} [createdBefore] Filter orders created before the specified date
|
|
2120
|
+
* @param {*} [options] Override http request option.
|
|
2121
|
+
* @throws {RequiredError}
|
|
2122
|
+
*/
|
|
2123
|
+
listOrders(paginationToken, search, productId, balanceId, createdAfter, createdBefore, options) {
|
|
2124
|
+
return localVarFp.listOrders(paginationToken, search, productId, balanceId, createdAfter, createdBefore, options).then((request) => request(axios, basePath));
|
|
2125
|
+
},
|
|
2126
|
+
};
|
|
2127
|
+
};
|
|
2128
|
+
/**
|
|
2129
|
+
* OrderApi - object-oriented interface
|
|
2130
|
+
* @export
|
|
2131
|
+
* @class OrderApi
|
|
2132
|
+
* @extends {BaseAPI}
|
|
2133
|
+
*/
|
|
2134
|
+
export class OrderApi extends BaseAPI {
|
|
2135
|
+
/**
|
|
2136
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
|
2137
|
+
* @summary Create an order for a product
|
|
2138
|
+
* @param {CreateOrderRequest} [createOrderRequest]
|
|
2139
|
+
* @param {*} [options] Override http request option.
|
|
2140
|
+
* @throws {RequiredError}
|
|
2141
|
+
* @memberof OrderApi
|
|
2142
|
+
*/
|
|
2143
|
+
createOrder(createOrderRequest, options) {
|
|
2144
|
+
return OrderApiFp(this.configuration).createOrder(createOrderRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2145
|
+
}
|
|
2146
|
+
/**
|
|
2147
|
+
* Get order details
|
|
2148
|
+
* @summary Get order details
|
|
2149
|
+
* @param {string} id Order id
|
|
2150
|
+
* @param {*} [options] Override http request option.
|
|
2151
|
+
* @throws {RequiredError}
|
|
2152
|
+
* @memberof OrderApi
|
|
2153
|
+
*/
|
|
2154
|
+
getOrder(id, options) {
|
|
2155
|
+
return OrderApiFp(this.configuration).getOrder(id, options).then((request) => request(this.axios, this.basePath));
|
|
2156
|
+
}
|
|
2157
|
+
/**
|
|
2158
|
+
* List existing orders
|
|
2159
|
+
* @summary List existing orders
|
|
2160
|
+
* @param {string} [paginationToken] This is the pagination token
|
|
2161
|
+
* @param {string} [search] Search for product or order
|
|
2162
|
+
* @param {string} [productId] Filter by token
|
|
2163
|
+
* @param {string} [balanceId] Filter by balance
|
|
2164
|
+
* @param {string} [createdAfter] Filter orders created after the specified date
|
|
2165
|
+
* @param {string} [createdBefore] Filter orders created before the specified date
|
|
2166
|
+
* @param {*} [options] Override http request option.
|
|
2167
|
+
* @throws {RequiredError}
|
|
2168
|
+
* @memberof OrderApi
|
|
2169
|
+
*/
|
|
2170
|
+
listOrders(paginationToken, search, productId, balanceId, createdAfter, createdBefore, options) {
|
|
2171
|
+
return OrderApiFp(this.configuration).listOrders(paginationToken, search, productId, balanceId, createdAfter, createdBefore, options).then((request) => request(this.axios, this.basePath));
|
|
2172
|
+
}
|
|
2173
|
+
}
|
|
1909
2174
|
/**
|
|
1910
2175
|
* ProductApi - axios parameter creator
|
|
1911
2176
|
* @export
|
|
@@ -2009,6 +2274,31 @@ export const ProductApiAxiosParamCreator = function (configuration) {
|
|
|
2009
2274
|
options: localVarRequestOptions,
|
|
2010
2275
|
};
|
|
2011
2276
|
}),
|
|
2277
|
+
/**
|
|
2278
|
+
* Create upload URL for product
|
|
2279
|
+
* @summary Create upload URL for product
|
|
2280
|
+
* @param {*} [options] Override http request option.
|
|
2281
|
+
* @throws {RequiredError}
|
|
2282
|
+
*/
|
|
2283
|
+
createUploadURL: (options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2284
|
+
const localVarPath = `/products/upload-urls`;
|
|
2285
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2286
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2287
|
+
let baseOptions;
|
|
2288
|
+
if (configuration) {
|
|
2289
|
+
baseOptions = configuration.baseOptions;
|
|
2290
|
+
}
|
|
2291
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2292
|
+
const localVarHeaderParameter = {};
|
|
2293
|
+
const localVarQueryParameter = {};
|
|
2294
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2295
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2296
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2297
|
+
return {
|
|
2298
|
+
url: toPathString(localVarUrlObj),
|
|
2299
|
+
options: localVarRequestOptions,
|
|
2300
|
+
};
|
|
2301
|
+
}),
|
|
2012
2302
|
/**
|
|
2013
2303
|
* Get a product by id
|
|
2014
2304
|
* @summary Get a product by id
|
|
@@ -2109,6 +2399,62 @@ export const ProductApiAxiosParamCreator = function (configuration) {
|
|
|
2109
2399
|
options: localVarRequestOptions,
|
|
2110
2400
|
};
|
|
2111
2401
|
}),
|
|
2402
|
+
/**
|
|
2403
|
+
* List existing products
|
|
2404
|
+
* @summary List existing products
|
|
2405
|
+
* @param {ProductKind} [kind] The product kind
|
|
2406
|
+
* @param {string} [search] search string
|
|
2407
|
+
* @param {ProductUsage} [usage] The product usage
|
|
2408
|
+
* @param {ProductStatus} [status] The product status
|
|
2409
|
+
* @param {ProductAvailability} [availability] The product availability
|
|
2410
|
+
* @param {string} [segmentID] The segment ID
|
|
2411
|
+
* @param {string} [nextToken] This is the pagination token
|
|
2412
|
+
* @param {*} [options] Override http request option.
|
|
2413
|
+
* @throws {RequiredError}
|
|
2414
|
+
*/
|
|
2415
|
+
listProducts: (kind, search, usage, status, availability, segmentID, nextToken, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2416
|
+
const localVarPath = `/products`;
|
|
2417
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2418
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2419
|
+
let baseOptions;
|
|
2420
|
+
if (configuration) {
|
|
2421
|
+
baseOptions = configuration.baseOptions;
|
|
2422
|
+
}
|
|
2423
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2424
|
+
const localVarHeaderParameter = {};
|
|
2425
|
+
const localVarQueryParameter = {};
|
|
2426
|
+
// authentication jwt required
|
|
2427
|
+
// http bearer authentication required
|
|
2428
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
2429
|
+
if (kind !== undefined) {
|
|
2430
|
+
localVarQueryParameter['kind'] = kind;
|
|
2431
|
+
}
|
|
2432
|
+
if (search !== undefined) {
|
|
2433
|
+
localVarQueryParameter['search'] = search;
|
|
2434
|
+
}
|
|
2435
|
+
if (usage !== undefined) {
|
|
2436
|
+
localVarQueryParameter['usage'] = usage;
|
|
2437
|
+
}
|
|
2438
|
+
if (status !== undefined) {
|
|
2439
|
+
localVarQueryParameter['status'] = status;
|
|
2440
|
+
}
|
|
2441
|
+
if (availability !== undefined) {
|
|
2442
|
+
localVarQueryParameter['availability'] = availability;
|
|
2443
|
+
}
|
|
2444
|
+
if (segmentID !== undefined) {
|
|
2445
|
+
localVarQueryParameter['segmentID'] = segmentID;
|
|
2446
|
+
}
|
|
2447
|
+
if (nextToken !== undefined) {
|
|
2448
|
+
localVarQueryParameter['nextToken'] = nextToken;
|
|
2449
|
+
}
|
|
2450
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2451
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2452
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2453
|
+
return {
|
|
2454
|
+
url: toPathString(localVarUrlObj),
|
|
2455
|
+
options: localVarRequestOptions,
|
|
2456
|
+
};
|
|
2457
|
+
}),
|
|
2112
2458
|
/**
|
|
2113
2459
|
* Update a product by id
|
|
2114
2460
|
* @summary Update a product by id
|
|
@@ -2194,15 +2540,27 @@ export const ProductApiFp = function (configuration) {
|
|
|
2194
2540
|
});
|
|
2195
2541
|
},
|
|
2196
2542
|
/**
|
|
2197
|
-
*
|
|
2198
|
-
* @summary
|
|
2199
|
-
* @param {string} id The product id
|
|
2543
|
+
* Create upload URL for product
|
|
2544
|
+
* @summary Create upload URL for product
|
|
2200
2545
|
* @param {*} [options] Override http request option.
|
|
2201
2546
|
* @throws {RequiredError}
|
|
2202
2547
|
*/
|
|
2203
|
-
|
|
2548
|
+
createUploadURL(options) {
|
|
2204
2549
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2205
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
2550
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createUploadURL(options);
|
|
2551
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2552
|
+
});
|
|
2553
|
+
},
|
|
2554
|
+
/**
|
|
2555
|
+
* Get a product by id
|
|
2556
|
+
* @summary Get a product by id
|
|
2557
|
+
* @param {string} id The product id
|
|
2558
|
+
* @param {*} [options] Override http request option.
|
|
2559
|
+
* @throws {RequiredError}
|
|
2560
|
+
*/
|
|
2561
|
+
getProductById(id, options) {
|
|
2562
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2563
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getProductById(id, options);
|
|
2206
2564
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2207
2565
|
});
|
|
2208
2566
|
},
|
|
@@ -2233,6 +2591,25 @@ export const ProductApiFp = function (configuration) {
|
|
|
2233
2591
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2234
2592
|
});
|
|
2235
2593
|
},
|
|
2594
|
+
/**
|
|
2595
|
+
* List existing products
|
|
2596
|
+
* @summary List existing products
|
|
2597
|
+
* @param {ProductKind} [kind] The product kind
|
|
2598
|
+
* @param {string} [search] search string
|
|
2599
|
+
* @param {ProductUsage} [usage] The product usage
|
|
2600
|
+
* @param {ProductStatus} [status] The product status
|
|
2601
|
+
* @param {ProductAvailability} [availability] The product availability
|
|
2602
|
+
* @param {string} [segmentID] The segment ID
|
|
2603
|
+
* @param {string} [nextToken] This is the pagination token
|
|
2604
|
+
* @param {*} [options] Override http request option.
|
|
2605
|
+
* @throws {RequiredError}
|
|
2606
|
+
*/
|
|
2607
|
+
listProducts(kind, search, usage, status, availability, segmentID, nextToken, options) {
|
|
2608
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2609
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listProducts(kind, search, usage, status, availability, segmentID, nextToken, options);
|
|
2610
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2611
|
+
});
|
|
2612
|
+
},
|
|
2236
2613
|
/**
|
|
2237
2614
|
* Update a product by id
|
|
2238
2615
|
* @summary Update a product by id
|
|
@@ -2287,6 +2664,15 @@ export const ProductApiFactory = function (configuration, basePath, axios) {
|
|
|
2287
2664
|
createProductRequest(productRequestCreationRequest, options) {
|
|
2288
2665
|
return localVarFp.createProductRequest(productRequestCreationRequest, options).then((request) => request(axios, basePath));
|
|
2289
2666
|
},
|
|
2667
|
+
/**
|
|
2668
|
+
* Create upload URL for product
|
|
2669
|
+
* @summary Create upload URL for product
|
|
2670
|
+
* @param {*} [options] Override http request option.
|
|
2671
|
+
* @throws {RequiredError}
|
|
2672
|
+
*/
|
|
2673
|
+
createUploadURL(options) {
|
|
2674
|
+
return localVarFp.createUploadURL(options).then((request) => request(axios, basePath));
|
|
2675
|
+
},
|
|
2290
2676
|
/**
|
|
2291
2677
|
* Get a product by id
|
|
2292
2678
|
* @summary Get a product by id
|
|
@@ -2318,6 +2704,22 @@ export const ProductApiFactory = function (configuration, basePath, axios) {
|
|
|
2318
2704
|
listProductRequests(status, nextToken, options) {
|
|
2319
2705
|
return localVarFp.listProductRequests(status, nextToken, options).then((request) => request(axios, basePath));
|
|
2320
2706
|
},
|
|
2707
|
+
/**
|
|
2708
|
+
* List existing products
|
|
2709
|
+
* @summary List existing products
|
|
2710
|
+
* @param {ProductKind} [kind] The product kind
|
|
2711
|
+
* @param {string} [search] search string
|
|
2712
|
+
* @param {ProductUsage} [usage] The product usage
|
|
2713
|
+
* @param {ProductStatus} [status] The product status
|
|
2714
|
+
* @param {ProductAvailability} [availability] The product availability
|
|
2715
|
+
* @param {string} [segmentID] The segment ID
|
|
2716
|
+
* @param {string} [nextToken] This is the pagination token
|
|
2717
|
+
* @param {*} [options] Override http request option.
|
|
2718
|
+
* @throws {RequiredError}
|
|
2719
|
+
*/
|
|
2720
|
+
listProducts(kind, search, usage, status, availability, segmentID, nextToken, options) {
|
|
2721
|
+
return localVarFp.listProducts(kind, search, usage, status, availability, segmentID, nextToken, options).then((request) => request(axios, basePath));
|
|
2722
|
+
},
|
|
2321
2723
|
/**
|
|
2322
2724
|
* Update a product by id
|
|
2323
2725
|
* @summary Update a product by id
|
|
@@ -2372,6 +2774,16 @@ export class ProductApi extends BaseAPI {
|
|
|
2372
2774
|
createProductRequest(productRequestCreationRequest, options) {
|
|
2373
2775
|
return ProductApiFp(this.configuration).createProductRequest(productRequestCreationRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2374
2776
|
}
|
|
2777
|
+
/**
|
|
2778
|
+
* Create upload URL for product
|
|
2779
|
+
* @summary Create upload URL for product
|
|
2780
|
+
* @param {*} [options] Override http request option.
|
|
2781
|
+
* @throws {RequiredError}
|
|
2782
|
+
* @memberof ProductApi
|
|
2783
|
+
*/
|
|
2784
|
+
createUploadURL(options) {
|
|
2785
|
+
return ProductApiFp(this.configuration).createUploadURL(options).then((request) => request(this.axios, this.basePath));
|
|
2786
|
+
}
|
|
2375
2787
|
/**
|
|
2376
2788
|
* Get a product by id
|
|
2377
2789
|
* @summary Get a product by id
|
|
@@ -2406,6 +2818,23 @@ export class ProductApi extends BaseAPI {
|
|
|
2406
2818
|
listProductRequests(status, nextToken, options) {
|
|
2407
2819
|
return ProductApiFp(this.configuration).listProductRequests(status, nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
2408
2820
|
}
|
|
2821
|
+
/**
|
|
2822
|
+
* List existing products
|
|
2823
|
+
* @summary List existing products
|
|
2824
|
+
* @param {ProductKind} [kind] The product kind
|
|
2825
|
+
* @param {string} [search] search string
|
|
2826
|
+
* @param {ProductUsage} [usage] The product usage
|
|
2827
|
+
* @param {ProductStatus} [status] The product status
|
|
2828
|
+
* @param {ProductAvailability} [availability] The product availability
|
|
2829
|
+
* @param {string} [segmentID] The segment ID
|
|
2830
|
+
* @param {string} [nextToken] This is the pagination token
|
|
2831
|
+
* @param {*} [options] Override http request option.
|
|
2832
|
+
* @throws {RequiredError}
|
|
2833
|
+
* @memberof ProductApi
|
|
2834
|
+
*/
|
|
2835
|
+
listProducts(kind, search, usage, status, availability, segmentID, nextToken, options) {
|
|
2836
|
+
return ProductApiFp(this.configuration).listProducts(kind, search, usage, status, availability, segmentID, nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
2837
|
+
}
|
|
2409
2838
|
/**
|
|
2410
2839
|
* Update a product by id
|
|
2411
2840
|
* @summary Update a product by id
|
|
@@ -2569,6 +2998,133 @@ export const ListProgressIntervalEnum = {
|
|
|
2569
2998
|
*/
|
|
2570
2999
|
export const PromotionApiAxiosParamCreator = function (configuration) {
|
|
2571
3000
|
return {
|
|
3001
|
+
/**
|
|
3002
|
+
* Claim a promotion by admins
|
|
3003
|
+
* @summary Claim a promotion
|
|
3004
|
+
* @param {string} id Promotion ID
|
|
3005
|
+
* @param {PromotionClaimRequest} [promotionClaimRequest]
|
|
3006
|
+
* @param {*} [options] Override http request option.
|
|
3007
|
+
* @throws {RequiredError}
|
|
3008
|
+
*/
|
|
3009
|
+
claimPromotion: (id, promotionClaimRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
3010
|
+
// verify required parameter 'id' is not null or undefined
|
|
3011
|
+
assertParamExists('claimPromotion', 'id', id);
|
|
3012
|
+
const localVarPath = `/promotions/{id}/claims`
|
|
3013
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
3014
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3015
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3016
|
+
let baseOptions;
|
|
3017
|
+
if (configuration) {
|
|
3018
|
+
baseOptions = configuration.baseOptions;
|
|
3019
|
+
}
|
|
3020
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
3021
|
+
const localVarHeaderParameter = {};
|
|
3022
|
+
const localVarQueryParameter = {};
|
|
3023
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3024
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3025
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3026
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3027
|
+
localVarRequestOptions.data = serializeDataIfNeeded(promotionClaimRequest, localVarRequestOptions, configuration);
|
|
3028
|
+
return {
|
|
3029
|
+
url: toPathString(localVarUrlObj),
|
|
3030
|
+
options: localVarRequestOptions,
|
|
3031
|
+
};
|
|
3032
|
+
}),
|
|
3033
|
+
/**
|
|
3034
|
+
* Claim a promotion by admins
|
|
3035
|
+
* @summary Claim a promotion
|
|
3036
|
+
* @param {string} id Promotion ID
|
|
3037
|
+
* @param {string} progressID Promotion Progress ID
|
|
3038
|
+
* @param {*} [options] Override http request option.
|
|
3039
|
+
* @throws {RequiredError}
|
|
3040
|
+
*/
|
|
3041
|
+
claimPromotionProgress: (id, progressID, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
3042
|
+
// verify required parameter 'id' is not null or undefined
|
|
3043
|
+
assertParamExists('claimPromotionProgress', 'id', id);
|
|
3044
|
+
// verify required parameter 'progressID' is not null or undefined
|
|
3045
|
+
assertParamExists('claimPromotionProgress', 'progressID', progressID);
|
|
3046
|
+
const localVarPath = `/promotions/{id}/progress/{progressID}/claims`
|
|
3047
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
|
3048
|
+
.replace(`{${"progressID"}}`, encodeURIComponent(String(progressID)));
|
|
3049
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3050
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3051
|
+
let baseOptions;
|
|
3052
|
+
if (configuration) {
|
|
3053
|
+
baseOptions = configuration.baseOptions;
|
|
3054
|
+
}
|
|
3055
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
3056
|
+
const localVarHeaderParameter = {};
|
|
3057
|
+
const localVarQueryParameter = {};
|
|
3058
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3059
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3060
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3061
|
+
return {
|
|
3062
|
+
url: toPathString(localVarUrlObj),
|
|
3063
|
+
options: localVarRequestOptions,
|
|
3064
|
+
};
|
|
3065
|
+
}),
|
|
3066
|
+
/**
|
|
3067
|
+
* Claim a promotion
|
|
3068
|
+
* @summary Claim a promotion
|
|
3069
|
+
* @param {string} id Promotion ID
|
|
3070
|
+
* @param {string} progressID Promotion Progress ID
|
|
3071
|
+
* @param {*} [options] Override http request option.
|
|
3072
|
+
* @throws {RequiredError}
|
|
3073
|
+
*/
|
|
3074
|
+
claimPromotionUser: (id, progressID, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
3075
|
+
// verify required parameter 'id' is not null or undefined
|
|
3076
|
+
assertParamExists('claimPromotionUser', 'id', id);
|
|
3077
|
+
// verify required parameter 'progressID' is not null or undefined
|
|
3078
|
+
assertParamExists('claimPromotionUser', 'progressID', progressID);
|
|
3079
|
+
const localVarPath = `/users/promotions/{id}/progress/{progressID}/claims`
|
|
3080
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
|
3081
|
+
.replace(`{${"progressID"}}`, encodeURIComponent(String(progressID)));
|
|
3082
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3083
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3084
|
+
let baseOptions;
|
|
3085
|
+
if (configuration) {
|
|
3086
|
+
baseOptions = configuration.baseOptions;
|
|
3087
|
+
}
|
|
3088
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
3089
|
+
const localVarHeaderParameter = {};
|
|
3090
|
+
const localVarQueryParameter = {};
|
|
3091
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3092
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3093
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3094
|
+
return {
|
|
3095
|
+
url: toPathString(localVarUrlObj),
|
|
3096
|
+
options: localVarRequestOptions,
|
|
3097
|
+
};
|
|
3098
|
+
}),
|
|
3099
|
+
/**
|
|
3100
|
+
* Claim a promotion for all periods
|
|
3101
|
+
* @summary Claim a promotion
|
|
3102
|
+
* @param {string} id Promotion ID
|
|
3103
|
+
* @param {*} [options] Override http request option.
|
|
3104
|
+
* @throws {RequiredError}
|
|
3105
|
+
*/
|
|
3106
|
+
claimPromotionUserAll: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
3107
|
+
// verify required parameter 'id' is not null or undefined
|
|
3108
|
+
assertParamExists('claimPromotionUserAll', 'id', id);
|
|
3109
|
+
const localVarPath = `/users/promotions/{id}/claims`
|
|
3110
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
3111
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3112
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3113
|
+
let baseOptions;
|
|
3114
|
+
if (configuration) {
|
|
3115
|
+
baseOptions = configuration.baseOptions;
|
|
3116
|
+
}
|
|
3117
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
3118
|
+
const localVarHeaderParameter = {};
|
|
3119
|
+
const localVarQueryParameter = {};
|
|
3120
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3121
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3122
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3123
|
+
return {
|
|
3124
|
+
url: toPathString(localVarUrlObj),
|
|
3125
|
+
options: localVarRequestOptions,
|
|
3126
|
+
};
|
|
3127
|
+
}),
|
|
2572
3128
|
/**
|
|
2573
3129
|
* Configure a promotion
|
|
2574
3130
|
* @summary Create promotion
|
|
@@ -2780,6 +3336,61 @@ export const PromotionApiAxiosParamCreator = function (configuration) {
|
|
|
2780
3336
|
export const PromotionApiFp = function (configuration) {
|
|
2781
3337
|
const localVarAxiosParamCreator = PromotionApiAxiosParamCreator(configuration);
|
|
2782
3338
|
return {
|
|
3339
|
+
/**
|
|
3340
|
+
* Claim a promotion by admins
|
|
3341
|
+
* @summary Claim a promotion
|
|
3342
|
+
* @param {string} id Promotion ID
|
|
3343
|
+
* @param {PromotionClaimRequest} [promotionClaimRequest]
|
|
3344
|
+
* @param {*} [options] Override http request option.
|
|
3345
|
+
* @throws {RequiredError}
|
|
3346
|
+
*/
|
|
3347
|
+
claimPromotion(id, promotionClaimRequest, options) {
|
|
3348
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3349
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.claimPromotion(id, promotionClaimRequest, options);
|
|
3350
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3351
|
+
});
|
|
3352
|
+
},
|
|
3353
|
+
/**
|
|
3354
|
+
* Claim a promotion by admins
|
|
3355
|
+
* @summary Claim a promotion
|
|
3356
|
+
* @param {string} id Promotion ID
|
|
3357
|
+
* @param {string} progressID Promotion Progress ID
|
|
3358
|
+
* @param {*} [options] Override http request option.
|
|
3359
|
+
* @throws {RequiredError}
|
|
3360
|
+
*/
|
|
3361
|
+
claimPromotionProgress(id, progressID, options) {
|
|
3362
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3363
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.claimPromotionProgress(id, progressID, options);
|
|
3364
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3365
|
+
});
|
|
3366
|
+
},
|
|
3367
|
+
/**
|
|
3368
|
+
* Claim a promotion
|
|
3369
|
+
* @summary Claim a promotion
|
|
3370
|
+
* @param {string} id Promotion ID
|
|
3371
|
+
* @param {string} progressID Promotion Progress ID
|
|
3372
|
+
* @param {*} [options] Override http request option.
|
|
3373
|
+
* @throws {RequiredError}
|
|
3374
|
+
*/
|
|
3375
|
+
claimPromotionUser(id, progressID, options) {
|
|
3376
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3377
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.claimPromotionUser(id, progressID, options);
|
|
3378
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3379
|
+
});
|
|
3380
|
+
},
|
|
3381
|
+
/**
|
|
3382
|
+
* Claim a promotion for all periods
|
|
3383
|
+
* @summary Claim a promotion
|
|
3384
|
+
* @param {string} id Promotion ID
|
|
3385
|
+
* @param {*} [options] Override http request option.
|
|
3386
|
+
* @throws {RequiredError}
|
|
3387
|
+
*/
|
|
3388
|
+
claimPromotionUserAll(id, options) {
|
|
3389
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3390
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.claimPromotionUserAll(id, options);
|
|
3391
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3392
|
+
});
|
|
3393
|
+
},
|
|
2783
3394
|
/**
|
|
2784
3395
|
* Configure a promotion
|
|
2785
3396
|
* @summary Create promotion
|
|
@@ -2863,6 +3474,49 @@ export const PromotionApiFp = function (configuration) {
|
|
|
2863
3474
|
export const PromotionApiFactory = function (configuration, basePath, axios) {
|
|
2864
3475
|
const localVarFp = PromotionApiFp(configuration);
|
|
2865
3476
|
return {
|
|
3477
|
+
/**
|
|
3478
|
+
* Claim a promotion by admins
|
|
3479
|
+
* @summary Claim a promotion
|
|
3480
|
+
* @param {string} id Promotion ID
|
|
3481
|
+
* @param {PromotionClaimRequest} [promotionClaimRequest]
|
|
3482
|
+
* @param {*} [options] Override http request option.
|
|
3483
|
+
* @throws {RequiredError}
|
|
3484
|
+
*/
|
|
3485
|
+
claimPromotion(id, promotionClaimRequest, options) {
|
|
3486
|
+
return localVarFp.claimPromotion(id, promotionClaimRequest, options).then((request) => request(axios, basePath));
|
|
3487
|
+
},
|
|
3488
|
+
/**
|
|
3489
|
+
* Claim a promotion by admins
|
|
3490
|
+
* @summary Claim a promotion
|
|
3491
|
+
* @param {string} id Promotion ID
|
|
3492
|
+
* @param {string} progressID Promotion Progress ID
|
|
3493
|
+
* @param {*} [options] Override http request option.
|
|
3494
|
+
* @throws {RequiredError}
|
|
3495
|
+
*/
|
|
3496
|
+
claimPromotionProgress(id, progressID, options) {
|
|
3497
|
+
return localVarFp.claimPromotionProgress(id, progressID, options).then((request) => request(axios, basePath));
|
|
3498
|
+
},
|
|
3499
|
+
/**
|
|
3500
|
+
* Claim a promotion
|
|
3501
|
+
* @summary Claim a promotion
|
|
3502
|
+
* @param {string} id Promotion ID
|
|
3503
|
+
* @param {string} progressID Promotion Progress ID
|
|
3504
|
+
* @param {*} [options] Override http request option.
|
|
3505
|
+
* @throws {RequiredError}
|
|
3506
|
+
*/
|
|
3507
|
+
claimPromotionUser(id, progressID, options) {
|
|
3508
|
+
return localVarFp.claimPromotionUser(id, progressID, options).then((request) => request(axios, basePath));
|
|
3509
|
+
},
|
|
3510
|
+
/**
|
|
3511
|
+
* Claim a promotion for all periods
|
|
3512
|
+
* @summary Claim a promotion
|
|
3513
|
+
* @param {string} id Promotion ID
|
|
3514
|
+
* @param {*} [options] Override http request option.
|
|
3515
|
+
* @throws {RequiredError}
|
|
3516
|
+
*/
|
|
3517
|
+
claimPromotionUserAll(id, options) {
|
|
3518
|
+
return localVarFp.claimPromotionUserAll(id, options).then((request) => request(axios, basePath));
|
|
3519
|
+
},
|
|
2866
3520
|
/**
|
|
2867
3521
|
* Configure a promotion
|
|
2868
3522
|
* @summary Create promotion
|
|
@@ -2931,6 +3585,53 @@ export const PromotionApiFactory = function (configuration, basePath, axios) {
|
|
|
2931
3585
|
* @extends {BaseAPI}
|
|
2932
3586
|
*/
|
|
2933
3587
|
export class PromotionApi extends BaseAPI {
|
|
3588
|
+
/**
|
|
3589
|
+
* Claim a promotion by admins
|
|
3590
|
+
* @summary Claim a promotion
|
|
3591
|
+
* @param {string} id Promotion ID
|
|
3592
|
+
* @param {PromotionClaimRequest} [promotionClaimRequest]
|
|
3593
|
+
* @param {*} [options] Override http request option.
|
|
3594
|
+
* @throws {RequiredError}
|
|
3595
|
+
* @memberof PromotionApi
|
|
3596
|
+
*/
|
|
3597
|
+
claimPromotion(id, promotionClaimRequest, options) {
|
|
3598
|
+
return PromotionApiFp(this.configuration).claimPromotion(id, promotionClaimRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3599
|
+
}
|
|
3600
|
+
/**
|
|
3601
|
+
* Claim a promotion by admins
|
|
3602
|
+
* @summary Claim a promotion
|
|
3603
|
+
* @param {string} id Promotion ID
|
|
3604
|
+
* @param {string} progressID Promotion Progress ID
|
|
3605
|
+
* @param {*} [options] Override http request option.
|
|
3606
|
+
* @throws {RequiredError}
|
|
3607
|
+
* @memberof PromotionApi
|
|
3608
|
+
*/
|
|
3609
|
+
claimPromotionProgress(id, progressID, options) {
|
|
3610
|
+
return PromotionApiFp(this.configuration).claimPromotionProgress(id, progressID, options).then((request) => request(this.axios, this.basePath));
|
|
3611
|
+
}
|
|
3612
|
+
/**
|
|
3613
|
+
* Claim a promotion
|
|
3614
|
+
* @summary Claim a promotion
|
|
3615
|
+
* @param {string} id Promotion ID
|
|
3616
|
+
* @param {string} progressID Promotion Progress ID
|
|
3617
|
+
* @param {*} [options] Override http request option.
|
|
3618
|
+
* @throws {RequiredError}
|
|
3619
|
+
* @memberof PromotionApi
|
|
3620
|
+
*/
|
|
3621
|
+
claimPromotionUser(id, progressID, options) {
|
|
3622
|
+
return PromotionApiFp(this.configuration).claimPromotionUser(id, progressID, options).then((request) => request(this.axios, this.basePath));
|
|
3623
|
+
}
|
|
3624
|
+
/**
|
|
3625
|
+
* Claim a promotion for all periods
|
|
3626
|
+
* @summary Claim a promotion
|
|
3627
|
+
* @param {string} id Promotion ID
|
|
3628
|
+
* @param {*} [options] Override http request option.
|
|
3629
|
+
* @throws {RequiredError}
|
|
3630
|
+
* @memberof PromotionApi
|
|
3631
|
+
*/
|
|
3632
|
+
claimPromotionUserAll(id, options) {
|
|
3633
|
+
return PromotionApiFp(this.configuration).claimPromotionUserAll(id, options).then((request) => request(this.axios, this.basePath));
|
|
3634
|
+
}
|
|
2934
3635
|
/**
|
|
2935
3636
|
* Configure a promotion
|
|
2936
3637
|
* @summary Create promotion
|
|
@@ -2996,204 +3697,6 @@ export class PromotionApi extends BaseAPI {
|
|
|
2996
3697
|
return PromotionApiFp(this.configuration).updatePromotion(id, updatePromotionRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2997
3698
|
}
|
|
2998
3699
|
}
|
|
2999
|
-
/**
|
|
3000
|
-
* RewardApi - axios parameter creator
|
|
3001
|
-
* @export
|
|
3002
|
-
*/
|
|
3003
|
-
export const RewardApiAxiosParamCreator = function (configuration) {
|
|
3004
|
-
return {
|
|
3005
|
-
/**
|
|
3006
|
-
* Create upload URL for reward
|
|
3007
|
-
* @summary Create upload URL for reward
|
|
3008
|
-
* @param {*} [options] Override http request option.
|
|
3009
|
-
* @throws {RequiredError}
|
|
3010
|
-
*/
|
|
3011
|
-
createUploadURL: (options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
3012
|
-
const localVarPath = `/products/upload-urls`;
|
|
3013
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3014
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3015
|
-
let baseOptions;
|
|
3016
|
-
if (configuration) {
|
|
3017
|
-
baseOptions = configuration.baseOptions;
|
|
3018
|
-
}
|
|
3019
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
3020
|
-
const localVarHeaderParameter = {};
|
|
3021
|
-
const localVarQueryParameter = {};
|
|
3022
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3023
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3024
|
-
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3025
|
-
return {
|
|
3026
|
-
url: toPathString(localVarUrlObj),
|
|
3027
|
-
options: localVarRequestOptions,
|
|
3028
|
-
};
|
|
3029
|
-
}),
|
|
3030
|
-
/**
|
|
3031
|
-
* List existing products
|
|
3032
|
-
* @summary List existing products
|
|
3033
|
-
* @param {ProductKind} [kind] The product kind
|
|
3034
|
-
* @param {string} [search] search string
|
|
3035
|
-
* @param {ProductUsage} [usage] The product usage
|
|
3036
|
-
* @param {ProductStatus} [status] The product status
|
|
3037
|
-
* @param {ProductAvailability} [availability] The product availability
|
|
3038
|
-
* @param {string} [segmentID] The segment ID
|
|
3039
|
-
* @param {string} [nextToken] This is the pagination token
|
|
3040
|
-
* @param {*} [options] Override http request option.
|
|
3041
|
-
* @throws {RequiredError}
|
|
3042
|
-
*/
|
|
3043
|
-
listProducts: (kind, search, usage, status, availability, segmentID, nextToken, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
3044
|
-
const localVarPath = `/products`;
|
|
3045
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3046
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3047
|
-
let baseOptions;
|
|
3048
|
-
if (configuration) {
|
|
3049
|
-
baseOptions = configuration.baseOptions;
|
|
3050
|
-
}
|
|
3051
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
3052
|
-
const localVarHeaderParameter = {};
|
|
3053
|
-
const localVarQueryParameter = {};
|
|
3054
|
-
// authentication jwt required
|
|
3055
|
-
// http bearer authentication required
|
|
3056
|
-
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3057
|
-
if (kind !== undefined) {
|
|
3058
|
-
localVarQueryParameter['kind'] = kind;
|
|
3059
|
-
}
|
|
3060
|
-
if (search !== undefined) {
|
|
3061
|
-
localVarQueryParameter['search'] = search;
|
|
3062
|
-
}
|
|
3063
|
-
if (usage !== undefined) {
|
|
3064
|
-
localVarQueryParameter['usage'] = usage;
|
|
3065
|
-
}
|
|
3066
|
-
if (status !== undefined) {
|
|
3067
|
-
localVarQueryParameter['status'] = status;
|
|
3068
|
-
}
|
|
3069
|
-
if (availability !== undefined) {
|
|
3070
|
-
localVarQueryParameter['availability'] = availability;
|
|
3071
|
-
}
|
|
3072
|
-
if (segmentID !== undefined) {
|
|
3073
|
-
localVarQueryParameter['segmentID'] = segmentID;
|
|
3074
|
-
}
|
|
3075
|
-
if (nextToken !== undefined) {
|
|
3076
|
-
localVarQueryParameter['nextToken'] = nextToken;
|
|
3077
|
-
}
|
|
3078
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3079
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3080
|
-
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3081
|
-
return {
|
|
3082
|
-
url: toPathString(localVarUrlObj),
|
|
3083
|
-
options: localVarRequestOptions,
|
|
3084
|
-
};
|
|
3085
|
-
}),
|
|
3086
|
-
};
|
|
3087
|
-
};
|
|
3088
|
-
/**
|
|
3089
|
-
* RewardApi - functional programming interface
|
|
3090
|
-
* @export
|
|
3091
|
-
*/
|
|
3092
|
-
export const RewardApiFp = function (configuration) {
|
|
3093
|
-
const localVarAxiosParamCreator = RewardApiAxiosParamCreator(configuration);
|
|
3094
|
-
return {
|
|
3095
|
-
/**
|
|
3096
|
-
* Create upload URL for reward
|
|
3097
|
-
* @summary Create upload URL for reward
|
|
3098
|
-
* @param {*} [options] Override http request option.
|
|
3099
|
-
* @throws {RequiredError}
|
|
3100
|
-
*/
|
|
3101
|
-
createUploadURL(options) {
|
|
3102
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
3103
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.createUploadURL(options);
|
|
3104
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3105
|
-
});
|
|
3106
|
-
},
|
|
3107
|
-
/**
|
|
3108
|
-
* List existing products
|
|
3109
|
-
* @summary List existing products
|
|
3110
|
-
* @param {ProductKind} [kind] The product kind
|
|
3111
|
-
* @param {string} [search] search string
|
|
3112
|
-
* @param {ProductUsage} [usage] The product usage
|
|
3113
|
-
* @param {ProductStatus} [status] The product status
|
|
3114
|
-
* @param {ProductAvailability} [availability] The product availability
|
|
3115
|
-
* @param {string} [segmentID] The segment ID
|
|
3116
|
-
* @param {string} [nextToken] This is the pagination token
|
|
3117
|
-
* @param {*} [options] Override http request option.
|
|
3118
|
-
* @throws {RequiredError}
|
|
3119
|
-
*/
|
|
3120
|
-
listProducts(kind, search, usage, status, availability, segmentID, nextToken, options) {
|
|
3121
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
3122
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.listProducts(kind, search, usage, status, availability, segmentID, nextToken, options);
|
|
3123
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3124
|
-
});
|
|
3125
|
-
},
|
|
3126
|
-
};
|
|
3127
|
-
};
|
|
3128
|
-
/**
|
|
3129
|
-
* RewardApi - factory interface
|
|
3130
|
-
* @export
|
|
3131
|
-
*/
|
|
3132
|
-
export const RewardApiFactory = function (configuration, basePath, axios) {
|
|
3133
|
-
const localVarFp = RewardApiFp(configuration);
|
|
3134
|
-
return {
|
|
3135
|
-
/**
|
|
3136
|
-
* Create upload URL for reward
|
|
3137
|
-
* @summary Create upload URL for reward
|
|
3138
|
-
* @param {*} [options] Override http request option.
|
|
3139
|
-
* @throws {RequiredError}
|
|
3140
|
-
*/
|
|
3141
|
-
createUploadURL(options) {
|
|
3142
|
-
return localVarFp.createUploadURL(options).then((request) => request(axios, basePath));
|
|
3143
|
-
},
|
|
3144
|
-
/**
|
|
3145
|
-
* List existing products
|
|
3146
|
-
* @summary List existing products
|
|
3147
|
-
* @param {ProductKind} [kind] The product kind
|
|
3148
|
-
* @param {string} [search] search string
|
|
3149
|
-
* @param {ProductUsage} [usage] The product usage
|
|
3150
|
-
* @param {ProductStatus} [status] The product status
|
|
3151
|
-
* @param {ProductAvailability} [availability] The product availability
|
|
3152
|
-
* @param {string} [segmentID] The segment ID
|
|
3153
|
-
* @param {string} [nextToken] This is the pagination token
|
|
3154
|
-
* @param {*} [options] Override http request option.
|
|
3155
|
-
* @throws {RequiredError}
|
|
3156
|
-
*/
|
|
3157
|
-
listProducts(kind, search, usage, status, availability, segmentID, nextToken, options) {
|
|
3158
|
-
return localVarFp.listProducts(kind, search, usage, status, availability, segmentID, nextToken, options).then((request) => request(axios, basePath));
|
|
3159
|
-
},
|
|
3160
|
-
};
|
|
3161
|
-
};
|
|
3162
|
-
/**
|
|
3163
|
-
* RewardApi - object-oriented interface
|
|
3164
|
-
* @export
|
|
3165
|
-
* @class RewardApi
|
|
3166
|
-
* @extends {BaseAPI}
|
|
3167
|
-
*/
|
|
3168
|
-
export class RewardApi extends BaseAPI {
|
|
3169
|
-
/**
|
|
3170
|
-
* Create upload URL for reward
|
|
3171
|
-
* @summary Create upload URL for reward
|
|
3172
|
-
* @param {*} [options] Override http request option.
|
|
3173
|
-
* @throws {RequiredError}
|
|
3174
|
-
* @memberof RewardApi
|
|
3175
|
-
*/
|
|
3176
|
-
createUploadURL(options) {
|
|
3177
|
-
return RewardApiFp(this.configuration).createUploadURL(options).then((request) => request(this.axios, this.basePath));
|
|
3178
|
-
}
|
|
3179
|
-
/**
|
|
3180
|
-
* List existing products
|
|
3181
|
-
* @summary List existing products
|
|
3182
|
-
* @param {ProductKind} [kind] The product kind
|
|
3183
|
-
* @param {string} [search] search string
|
|
3184
|
-
* @param {ProductUsage} [usage] The product usage
|
|
3185
|
-
* @param {ProductStatus} [status] The product status
|
|
3186
|
-
* @param {ProductAvailability} [availability] The product availability
|
|
3187
|
-
* @param {string} [segmentID] The segment ID
|
|
3188
|
-
* @param {string} [nextToken] This is the pagination token
|
|
3189
|
-
* @param {*} [options] Override http request option.
|
|
3190
|
-
* @throws {RequiredError}
|
|
3191
|
-
* @memberof RewardApi
|
|
3192
|
-
*/
|
|
3193
|
-
listProducts(kind, search, usage, status, availability, segmentID, nextToken, options) {
|
|
3194
|
-
return RewardApiFp(this.configuration).listProducts(kind, search, usage, status, availability, segmentID, nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
3195
|
-
}
|
|
3196
|
-
}
|
|
3197
3700
|
/**
|
|
3198
3701
|
* SegmentApi - axios parameter creator
|
|
3199
3702
|
* @export
|
|
@@ -3810,14 +4313,12 @@ export const TransactionApiAxiosParamCreator = function (configuration) {
|
|
|
3810
4313
|
/**
|
|
3811
4314
|
* List existing transactions
|
|
3812
4315
|
* @summary List existing transactions
|
|
3813
|
-
* @param {string} clientID This is the client ID
|
|
3814
4316
|
* @param {string} [paginationToken] This is the pagination token
|
|
4317
|
+
* @param {string} [clientID] This is the client ID
|
|
3815
4318
|
* @param {*} [options] Override http request option.
|
|
3816
4319
|
* @throws {RequiredError}
|
|
3817
4320
|
*/
|
|
3818
|
-
listTransactions: (
|
|
3819
|
-
// verify required parameter 'clientID' is not null or undefined
|
|
3820
|
-
assertParamExists('listTransactions', 'clientID', clientID);
|
|
4321
|
+
listTransactions: (paginationToken, clientID, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
3821
4322
|
const localVarPath = `/transactions`;
|
|
3822
4323
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3823
4324
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -3857,14 +4358,14 @@ export const TransactionApiFp = function (configuration) {
|
|
|
3857
4358
|
/**
|
|
3858
4359
|
* List existing transactions
|
|
3859
4360
|
* @summary List existing transactions
|
|
3860
|
-
* @param {string} clientID This is the client ID
|
|
3861
4361
|
* @param {string} [paginationToken] This is the pagination token
|
|
4362
|
+
* @param {string} [clientID] This is the client ID
|
|
3862
4363
|
* @param {*} [options] Override http request option.
|
|
3863
4364
|
* @throws {RequiredError}
|
|
3864
4365
|
*/
|
|
3865
|
-
listTransactions(
|
|
4366
|
+
listTransactions(paginationToken, clientID, options) {
|
|
3866
4367
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3867
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.listTransactions(
|
|
4368
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listTransactions(paginationToken, clientID, options);
|
|
3868
4369
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3869
4370
|
});
|
|
3870
4371
|
},
|
|
@@ -3880,13 +4381,13 @@ export const TransactionApiFactory = function (configuration, basePath, axios) {
|
|
|
3880
4381
|
/**
|
|
3881
4382
|
* List existing transactions
|
|
3882
4383
|
* @summary List existing transactions
|
|
3883
|
-
* @param {string} clientID This is the client ID
|
|
3884
4384
|
* @param {string} [paginationToken] This is the pagination token
|
|
4385
|
+
* @param {string} [clientID] This is the client ID
|
|
3885
4386
|
* @param {*} [options] Override http request option.
|
|
3886
4387
|
* @throws {RequiredError}
|
|
3887
4388
|
*/
|
|
3888
|
-
listTransactions(
|
|
3889
|
-
return localVarFp.listTransactions(
|
|
4389
|
+
listTransactions(paginationToken, clientID, options) {
|
|
4390
|
+
return localVarFp.listTransactions(paginationToken, clientID, options).then((request) => request(axios, basePath));
|
|
3890
4391
|
},
|
|
3891
4392
|
};
|
|
3892
4393
|
};
|
|
@@ -3900,14 +4401,14 @@ export class TransactionApi extends BaseAPI {
|
|
|
3900
4401
|
/**
|
|
3901
4402
|
* List existing transactions
|
|
3902
4403
|
* @summary List existing transactions
|
|
3903
|
-
* @param {string} clientID This is the client ID
|
|
3904
4404
|
* @param {string} [paginationToken] This is the pagination token
|
|
4405
|
+
* @param {string} [clientID] This is the client ID
|
|
3905
4406
|
* @param {*} [options] Override http request option.
|
|
3906
4407
|
* @throws {RequiredError}
|
|
3907
4408
|
* @memberof TransactionApi
|
|
3908
4409
|
*/
|
|
3909
|
-
listTransactions(
|
|
3910
|
-
return TransactionApiFp(this.configuration).listTransactions(
|
|
4410
|
+
listTransactions(paginationToken, clientID, options) {
|
|
4411
|
+
return TransactionApiFp(this.configuration).listTransactions(paginationToken, clientID, options).then((request) => request(this.axios, this.basePath));
|
|
3911
4412
|
}
|
|
3912
4413
|
}
|
|
3913
4414
|
/**
|