flexinet-api 0.0.258-prerelease0 → 0.0.260-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 +907 -152
- package/dist/api.d.ts +538 -73
- package/dist/api.js +610 -71
- package/dist/esm/api.d.ts +538 -73
- package/dist/esm/api.js +604 -69
- 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
|
|
@@ -2569,6 +2834,133 @@ export const ListProgressIntervalEnum = {
|
|
|
2569
2834
|
*/
|
|
2570
2835
|
export const PromotionApiAxiosParamCreator = function (configuration) {
|
|
2571
2836
|
return {
|
|
2837
|
+
/**
|
|
2838
|
+
* Claim a promotion by admins
|
|
2839
|
+
* @summary Claim a promotion
|
|
2840
|
+
* @param {string} id Promotion ID
|
|
2841
|
+
* @param {PromotionClaimRequest} [promotionClaimRequest]
|
|
2842
|
+
* @param {*} [options] Override http request option.
|
|
2843
|
+
* @throws {RequiredError}
|
|
2844
|
+
*/
|
|
2845
|
+
claimPromotion: (id, promotionClaimRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2846
|
+
// verify required parameter 'id' is not null or undefined
|
|
2847
|
+
assertParamExists('claimPromotion', 'id', id);
|
|
2848
|
+
const localVarPath = `/promotions/{id}/claims`
|
|
2849
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
2850
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2851
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2852
|
+
let baseOptions;
|
|
2853
|
+
if (configuration) {
|
|
2854
|
+
baseOptions = configuration.baseOptions;
|
|
2855
|
+
}
|
|
2856
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
2857
|
+
const localVarHeaderParameter = {};
|
|
2858
|
+
const localVarQueryParameter = {};
|
|
2859
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2860
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2861
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2862
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2863
|
+
localVarRequestOptions.data = serializeDataIfNeeded(promotionClaimRequest, localVarRequestOptions, configuration);
|
|
2864
|
+
return {
|
|
2865
|
+
url: toPathString(localVarUrlObj),
|
|
2866
|
+
options: localVarRequestOptions,
|
|
2867
|
+
};
|
|
2868
|
+
}),
|
|
2869
|
+
/**
|
|
2870
|
+
* Claim a promotion by admins
|
|
2871
|
+
* @summary Claim a promotion
|
|
2872
|
+
* @param {string} id Promotion ID
|
|
2873
|
+
* @param {string} progressID Promotion Progress ID
|
|
2874
|
+
* @param {*} [options] Override http request option.
|
|
2875
|
+
* @throws {RequiredError}
|
|
2876
|
+
*/
|
|
2877
|
+
claimPromotionProgress: (id, progressID, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2878
|
+
// verify required parameter 'id' is not null or undefined
|
|
2879
|
+
assertParamExists('claimPromotionProgress', 'id', id);
|
|
2880
|
+
// verify required parameter 'progressID' is not null or undefined
|
|
2881
|
+
assertParamExists('claimPromotionProgress', 'progressID', progressID);
|
|
2882
|
+
const localVarPath = `/promotions/{id}/progress/{progressID}/claims`
|
|
2883
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
|
2884
|
+
.replace(`{${"progressID"}}`, encodeURIComponent(String(progressID)));
|
|
2885
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2886
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2887
|
+
let baseOptions;
|
|
2888
|
+
if (configuration) {
|
|
2889
|
+
baseOptions = configuration.baseOptions;
|
|
2890
|
+
}
|
|
2891
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
2892
|
+
const localVarHeaderParameter = {};
|
|
2893
|
+
const localVarQueryParameter = {};
|
|
2894
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2895
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2896
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2897
|
+
return {
|
|
2898
|
+
url: toPathString(localVarUrlObj),
|
|
2899
|
+
options: localVarRequestOptions,
|
|
2900
|
+
};
|
|
2901
|
+
}),
|
|
2902
|
+
/**
|
|
2903
|
+
* Claim a promotion
|
|
2904
|
+
* @summary Claim a promotion
|
|
2905
|
+
* @param {string} id Promotion ID
|
|
2906
|
+
* @param {string} progressID Promotion Progress ID
|
|
2907
|
+
* @param {*} [options] Override http request option.
|
|
2908
|
+
* @throws {RequiredError}
|
|
2909
|
+
*/
|
|
2910
|
+
claimPromotionUser: (id, progressID, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2911
|
+
// verify required parameter 'id' is not null or undefined
|
|
2912
|
+
assertParamExists('claimPromotionUser', 'id', id);
|
|
2913
|
+
// verify required parameter 'progressID' is not null or undefined
|
|
2914
|
+
assertParamExists('claimPromotionUser', 'progressID', progressID);
|
|
2915
|
+
const localVarPath = `/users/promotions/{id}/progress/{progressID}/claims`
|
|
2916
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
|
2917
|
+
.replace(`{${"progressID"}}`, encodeURIComponent(String(progressID)));
|
|
2918
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2919
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2920
|
+
let baseOptions;
|
|
2921
|
+
if (configuration) {
|
|
2922
|
+
baseOptions = configuration.baseOptions;
|
|
2923
|
+
}
|
|
2924
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
2925
|
+
const localVarHeaderParameter = {};
|
|
2926
|
+
const localVarQueryParameter = {};
|
|
2927
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2928
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2929
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2930
|
+
return {
|
|
2931
|
+
url: toPathString(localVarUrlObj),
|
|
2932
|
+
options: localVarRequestOptions,
|
|
2933
|
+
};
|
|
2934
|
+
}),
|
|
2935
|
+
/**
|
|
2936
|
+
* Claim a promotion for all periods
|
|
2937
|
+
* @summary Claim a promotion
|
|
2938
|
+
* @param {string} id Promotion ID
|
|
2939
|
+
* @param {*} [options] Override http request option.
|
|
2940
|
+
* @throws {RequiredError}
|
|
2941
|
+
*/
|
|
2942
|
+
claimPromotionUserAll: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2943
|
+
// verify required parameter 'id' is not null or undefined
|
|
2944
|
+
assertParamExists('claimPromotionUserAll', 'id', id);
|
|
2945
|
+
const localVarPath = `/users/promotions/{id}/claims`
|
|
2946
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
2947
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2948
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2949
|
+
let baseOptions;
|
|
2950
|
+
if (configuration) {
|
|
2951
|
+
baseOptions = configuration.baseOptions;
|
|
2952
|
+
}
|
|
2953
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
2954
|
+
const localVarHeaderParameter = {};
|
|
2955
|
+
const localVarQueryParameter = {};
|
|
2956
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2957
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2958
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2959
|
+
return {
|
|
2960
|
+
url: toPathString(localVarUrlObj),
|
|
2961
|
+
options: localVarRequestOptions,
|
|
2962
|
+
};
|
|
2963
|
+
}),
|
|
2572
2964
|
/**
|
|
2573
2965
|
* Configure a promotion
|
|
2574
2966
|
* @summary Create promotion
|
|
@@ -2780,6 +3172,61 @@ export const PromotionApiAxiosParamCreator = function (configuration) {
|
|
|
2780
3172
|
export const PromotionApiFp = function (configuration) {
|
|
2781
3173
|
const localVarAxiosParamCreator = PromotionApiAxiosParamCreator(configuration);
|
|
2782
3174
|
return {
|
|
3175
|
+
/**
|
|
3176
|
+
* Claim a promotion by admins
|
|
3177
|
+
* @summary Claim a promotion
|
|
3178
|
+
* @param {string} id Promotion ID
|
|
3179
|
+
* @param {PromotionClaimRequest} [promotionClaimRequest]
|
|
3180
|
+
* @param {*} [options] Override http request option.
|
|
3181
|
+
* @throws {RequiredError}
|
|
3182
|
+
*/
|
|
3183
|
+
claimPromotion(id, promotionClaimRequest, options) {
|
|
3184
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3185
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.claimPromotion(id, promotionClaimRequest, options);
|
|
3186
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3187
|
+
});
|
|
3188
|
+
},
|
|
3189
|
+
/**
|
|
3190
|
+
* Claim a promotion by admins
|
|
3191
|
+
* @summary Claim a promotion
|
|
3192
|
+
* @param {string} id Promotion ID
|
|
3193
|
+
* @param {string} progressID Promotion Progress ID
|
|
3194
|
+
* @param {*} [options] Override http request option.
|
|
3195
|
+
* @throws {RequiredError}
|
|
3196
|
+
*/
|
|
3197
|
+
claimPromotionProgress(id, progressID, options) {
|
|
3198
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3199
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.claimPromotionProgress(id, progressID, options);
|
|
3200
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3201
|
+
});
|
|
3202
|
+
},
|
|
3203
|
+
/**
|
|
3204
|
+
* Claim a promotion
|
|
3205
|
+
* @summary Claim a promotion
|
|
3206
|
+
* @param {string} id Promotion ID
|
|
3207
|
+
* @param {string} progressID Promotion Progress ID
|
|
3208
|
+
* @param {*} [options] Override http request option.
|
|
3209
|
+
* @throws {RequiredError}
|
|
3210
|
+
*/
|
|
3211
|
+
claimPromotionUser(id, progressID, options) {
|
|
3212
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3213
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.claimPromotionUser(id, progressID, options);
|
|
3214
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3215
|
+
});
|
|
3216
|
+
},
|
|
3217
|
+
/**
|
|
3218
|
+
* Claim a promotion for all periods
|
|
3219
|
+
* @summary Claim a promotion
|
|
3220
|
+
* @param {string} id Promotion ID
|
|
3221
|
+
* @param {*} [options] Override http request option.
|
|
3222
|
+
* @throws {RequiredError}
|
|
3223
|
+
*/
|
|
3224
|
+
claimPromotionUserAll(id, options) {
|
|
3225
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3226
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.claimPromotionUserAll(id, options);
|
|
3227
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3228
|
+
});
|
|
3229
|
+
},
|
|
2783
3230
|
/**
|
|
2784
3231
|
* Configure a promotion
|
|
2785
3232
|
* @summary Create promotion
|
|
@@ -2863,6 +3310,49 @@ export const PromotionApiFp = function (configuration) {
|
|
|
2863
3310
|
export const PromotionApiFactory = function (configuration, basePath, axios) {
|
|
2864
3311
|
const localVarFp = PromotionApiFp(configuration);
|
|
2865
3312
|
return {
|
|
3313
|
+
/**
|
|
3314
|
+
* Claim a promotion by admins
|
|
3315
|
+
* @summary Claim a promotion
|
|
3316
|
+
* @param {string} id Promotion ID
|
|
3317
|
+
* @param {PromotionClaimRequest} [promotionClaimRequest]
|
|
3318
|
+
* @param {*} [options] Override http request option.
|
|
3319
|
+
* @throws {RequiredError}
|
|
3320
|
+
*/
|
|
3321
|
+
claimPromotion(id, promotionClaimRequest, options) {
|
|
3322
|
+
return localVarFp.claimPromotion(id, promotionClaimRequest, options).then((request) => request(axios, basePath));
|
|
3323
|
+
},
|
|
3324
|
+
/**
|
|
3325
|
+
* Claim a promotion by admins
|
|
3326
|
+
* @summary Claim a promotion
|
|
3327
|
+
* @param {string} id Promotion ID
|
|
3328
|
+
* @param {string} progressID Promotion Progress ID
|
|
3329
|
+
* @param {*} [options] Override http request option.
|
|
3330
|
+
* @throws {RequiredError}
|
|
3331
|
+
*/
|
|
3332
|
+
claimPromotionProgress(id, progressID, options) {
|
|
3333
|
+
return localVarFp.claimPromotionProgress(id, progressID, options).then((request) => request(axios, basePath));
|
|
3334
|
+
},
|
|
3335
|
+
/**
|
|
3336
|
+
* Claim a promotion
|
|
3337
|
+
* @summary Claim a promotion
|
|
3338
|
+
* @param {string} id Promotion ID
|
|
3339
|
+
* @param {string} progressID Promotion Progress ID
|
|
3340
|
+
* @param {*} [options] Override http request option.
|
|
3341
|
+
* @throws {RequiredError}
|
|
3342
|
+
*/
|
|
3343
|
+
claimPromotionUser(id, progressID, options) {
|
|
3344
|
+
return localVarFp.claimPromotionUser(id, progressID, options).then((request) => request(axios, basePath));
|
|
3345
|
+
},
|
|
3346
|
+
/**
|
|
3347
|
+
* Claim a promotion for all periods
|
|
3348
|
+
* @summary Claim a promotion
|
|
3349
|
+
* @param {string} id Promotion ID
|
|
3350
|
+
* @param {*} [options] Override http request option.
|
|
3351
|
+
* @throws {RequiredError}
|
|
3352
|
+
*/
|
|
3353
|
+
claimPromotionUserAll(id, options) {
|
|
3354
|
+
return localVarFp.claimPromotionUserAll(id, options).then((request) => request(axios, basePath));
|
|
3355
|
+
},
|
|
2866
3356
|
/**
|
|
2867
3357
|
* Configure a promotion
|
|
2868
3358
|
* @summary Create promotion
|
|
@@ -2931,6 +3421,53 @@ export const PromotionApiFactory = function (configuration, basePath, axios) {
|
|
|
2931
3421
|
* @extends {BaseAPI}
|
|
2932
3422
|
*/
|
|
2933
3423
|
export class PromotionApi extends BaseAPI {
|
|
3424
|
+
/**
|
|
3425
|
+
* Claim a promotion by admins
|
|
3426
|
+
* @summary Claim a promotion
|
|
3427
|
+
* @param {string} id Promotion ID
|
|
3428
|
+
* @param {PromotionClaimRequest} [promotionClaimRequest]
|
|
3429
|
+
* @param {*} [options] Override http request option.
|
|
3430
|
+
* @throws {RequiredError}
|
|
3431
|
+
* @memberof PromotionApi
|
|
3432
|
+
*/
|
|
3433
|
+
claimPromotion(id, promotionClaimRequest, options) {
|
|
3434
|
+
return PromotionApiFp(this.configuration).claimPromotion(id, promotionClaimRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3435
|
+
}
|
|
3436
|
+
/**
|
|
3437
|
+
* Claim a promotion by admins
|
|
3438
|
+
* @summary Claim a promotion
|
|
3439
|
+
* @param {string} id Promotion ID
|
|
3440
|
+
* @param {string} progressID Promotion Progress ID
|
|
3441
|
+
* @param {*} [options] Override http request option.
|
|
3442
|
+
* @throws {RequiredError}
|
|
3443
|
+
* @memberof PromotionApi
|
|
3444
|
+
*/
|
|
3445
|
+
claimPromotionProgress(id, progressID, options) {
|
|
3446
|
+
return PromotionApiFp(this.configuration).claimPromotionProgress(id, progressID, options).then((request) => request(this.axios, this.basePath));
|
|
3447
|
+
}
|
|
3448
|
+
/**
|
|
3449
|
+
* Claim a promotion
|
|
3450
|
+
* @summary Claim a promotion
|
|
3451
|
+
* @param {string} id Promotion ID
|
|
3452
|
+
* @param {string} progressID Promotion Progress ID
|
|
3453
|
+
* @param {*} [options] Override http request option.
|
|
3454
|
+
* @throws {RequiredError}
|
|
3455
|
+
* @memberof PromotionApi
|
|
3456
|
+
*/
|
|
3457
|
+
claimPromotionUser(id, progressID, options) {
|
|
3458
|
+
return PromotionApiFp(this.configuration).claimPromotionUser(id, progressID, options).then((request) => request(this.axios, this.basePath));
|
|
3459
|
+
}
|
|
3460
|
+
/**
|
|
3461
|
+
* Claim a promotion for all periods
|
|
3462
|
+
* @summary Claim a promotion
|
|
3463
|
+
* @param {string} id Promotion ID
|
|
3464
|
+
* @param {*} [options] Override http request option.
|
|
3465
|
+
* @throws {RequiredError}
|
|
3466
|
+
* @memberof PromotionApi
|
|
3467
|
+
*/
|
|
3468
|
+
claimPromotionUserAll(id, options) {
|
|
3469
|
+
return PromotionApiFp(this.configuration).claimPromotionUserAll(id, options).then((request) => request(this.axios, this.basePath));
|
|
3470
|
+
}
|
|
2934
3471
|
/**
|
|
2935
3472
|
* Configure a promotion
|
|
2936
3473
|
* @summary Create promotion
|
|
@@ -3810,14 +4347,12 @@ export const TransactionApiAxiosParamCreator = function (configuration) {
|
|
|
3810
4347
|
/**
|
|
3811
4348
|
* List existing transactions
|
|
3812
4349
|
* @summary List existing transactions
|
|
3813
|
-
* @param {string} clientID This is the client ID
|
|
3814
4350
|
* @param {string} [paginationToken] This is the pagination token
|
|
4351
|
+
* @param {string} [clientID] This is the client ID
|
|
3815
4352
|
* @param {*} [options] Override http request option.
|
|
3816
4353
|
* @throws {RequiredError}
|
|
3817
4354
|
*/
|
|
3818
|
-
listTransactions: (
|
|
3819
|
-
// verify required parameter 'clientID' is not null or undefined
|
|
3820
|
-
assertParamExists('listTransactions', 'clientID', clientID);
|
|
4355
|
+
listTransactions: (paginationToken, clientID, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
3821
4356
|
const localVarPath = `/transactions`;
|
|
3822
4357
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3823
4358
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -3857,14 +4392,14 @@ export const TransactionApiFp = function (configuration) {
|
|
|
3857
4392
|
/**
|
|
3858
4393
|
* List existing transactions
|
|
3859
4394
|
* @summary List existing transactions
|
|
3860
|
-
* @param {string} clientID This is the client ID
|
|
3861
4395
|
* @param {string} [paginationToken] This is the pagination token
|
|
4396
|
+
* @param {string} [clientID] This is the client ID
|
|
3862
4397
|
* @param {*} [options] Override http request option.
|
|
3863
4398
|
* @throws {RequiredError}
|
|
3864
4399
|
*/
|
|
3865
|
-
listTransactions(
|
|
4400
|
+
listTransactions(paginationToken, clientID, options) {
|
|
3866
4401
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3867
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.listTransactions(
|
|
4402
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listTransactions(paginationToken, clientID, options);
|
|
3868
4403
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3869
4404
|
});
|
|
3870
4405
|
},
|
|
@@ -3880,13 +4415,13 @@ export const TransactionApiFactory = function (configuration, basePath, axios) {
|
|
|
3880
4415
|
/**
|
|
3881
4416
|
* List existing transactions
|
|
3882
4417
|
* @summary List existing transactions
|
|
3883
|
-
* @param {string} clientID This is the client ID
|
|
3884
4418
|
* @param {string} [paginationToken] This is the pagination token
|
|
4419
|
+
* @param {string} [clientID] This is the client ID
|
|
3885
4420
|
* @param {*} [options] Override http request option.
|
|
3886
4421
|
* @throws {RequiredError}
|
|
3887
4422
|
*/
|
|
3888
|
-
listTransactions(
|
|
3889
|
-
return localVarFp.listTransactions(
|
|
4423
|
+
listTransactions(paginationToken, clientID, options) {
|
|
4424
|
+
return localVarFp.listTransactions(paginationToken, clientID, options).then((request) => request(axios, basePath));
|
|
3890
4425
|
},
|
|
3891
4426
|
};
|
|
3892
4427
|
};
|
|
@@ -3900,14 +4435,14 @@ export class TransactionApi extends BaseAPI {
|
|
|
3900
4435
|
/**
|
|
3901
4436
|
* List existing transactions
|
|
3902
4437
|
* @summary List existing transactions
|
|
3903
|
-
* @param {string} clientID This is the client ID
|
|
3904
4438
|
* @param {string} [paginationToken] This is the pagination token
|
|
4439
|
+
* @param {string} [clientID] This is the client ID
|
|
3905
4440
|
* @param {*} [options] Override http request option.
|
|
3906
4441
|
* @throws {RequiredError}
|
|
3907
4442
|
* @memberof TransactionApi
|
|
3908
4443
|
*/
|
|
3909
|
-
listTransactions(
|
|
3910
|
-
return TransactionApiFp(this.configuration).listTransactions(
|
|
4444
|
+
listTransactions(paginationToken, clientID, options) {
|
|
4445
|
+
return TransactionApiFp(this.configuration).listTransactions(paginationToken, clientID, options).then((request) => request(this.axios, this.basePath));
|
|
3911
4446
|
}
|
|
3912
4447
|
}
|
|
3913
4448
|
/**
|