flexinet-api 0.0.259-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/dist/api.js CHANGED
@@ -22,8 +22,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.DefaultApiAxiosParamCreator = exports.CustomDealsApi = exports.CustomDealsApiFactory = exports.CustomDealsApiFp = exports.CustomDealsApiAxiosParamCreator = exports.ConfigurationApi = exports.ConfigurationApiFactory = exports.ConfigurationApiFp = exports.ConfigurationApiAxiosParamCreator = exports.ClientApi = exports.ClientApiFactory = exports.ClientApiFp = exports.ClientApiAxiosParamCreator = exports.BalanceApi = exports.BalanceApiFactory = exports.BalanceApiFp = exports.BalanceApiAxiosParamCreator = exports.AuditApi = exports.AuditApiFactory = exports.AuditApiFp = exports.AuditApiAxiosParamCreator = exports.WebhookKind = exports.UserSource = exports.UserRole = exports.TransactionKind = exports.TargetMu = exports.TagValidatorType = exports.TagRuleKind = exports.TagDataType = exports.RuleKind = exports.RuleGroupState = exports.Repetition = exports.ReceiverKind = exports.PromotionType = exports.ProgressState = exports.ProductUsage = exports.ProductStatus = exports.ProductRequestStatus = exports.ProductRequestApprovalRequestStatusEnum = exports.ProductKind = exports.ProductAvailability = exports.NotificationStatus = exports.NotificationKind = exports.EventCreationRequestKindEnum = exports.CustomDealRestrictionPriority = exports.Condition = exports.BonusMu = exports.Beneficiary = exports.AuditLogObjectType = exports.AuditLogActionEnum = void 0;
26
- exports.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = exports.TransactionApi = exports.TransactionApiFactory = exports.TransactionApiFp = exports.TransactionApiAxiosParamCreator = exports.TagApi = exports.TagApiFactory = exports.TagApiFp = exports.TagApiAxiosParamCreator = exports.SegmentApi = exports.SegmentApiFactory = exports.SegmentApiFp = exports.SegmentApiAxiosParamCreator = exports.RewardApi = exports.RewardApiFactory = exports.RewardApiFp = exports.RewardApiAxiosParamCreator = exports.PromotionApi = exports.PromotionApiFactory = exports.PromotionApiFp = exports.PromotionApiAxiosParamCreator = exports.ListProgressIntervalEnum = exports.ProgressApi = exports.ProgressApiFactory = exports.ProgressApiFp = exports.ProgressApiAxiosParamCreator = exports.ProductApi = exports.ProductApiFactory = exports.ProductApiFp = exports.ProductApiAxiosParamCreator = exports.NotificationApi = exports.NotificationApiFactory = exports.NotificationApiFp = exports.NotificationApiAxiosParamCreator = exports.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = void 0;
25
+ exports.DefaultApiAxiosParamCreator = exports.CustomDealsApi = exports.CustomDealsApiFactory = exports.CustomDealsApiFp = exports.CustomDealsApiAxiosParamCreator = exports.ConfigurationApi = exports.ConfigurationApiFactory = exports.ConfigurationApiFp = exports.ConfigurationApiAxiosParamCreator = exports.ClientApi = exports.ClientApiFactory = exports.ClientApiFp = exports.ClientApiAxiosParamCreator = exports.BalanceApi = exports.BalanceApiFactory = exports.BalanceApiFp = exports.BalanceApiAxiosParamCreator = exports.AuditApi = exports.AuditApiFactory = exports.AuditApiFp = exports.AuditApiAxiosParamCreator = exports.WebhookKind = exports.UserSource = exports.UserRole = exports.TransactionKind = exports.TargetMu = exports.TagValidatorType = exports.TagRuleKind = exports.TagDataType = exports.RuleKind = exports.RuleGroupState = exports.Repetition = exports.PromotionType = exports.ProgressState = exports.ProductUsage = exports.ProductStatus = exports.ProductRequestStatus = exports.ProductRequestApprovalRequestStatusEnum = exports.ProductKind = exports.ProductAvailability = exports.OrderKindEnum = exports.NotificationStatus = exports.NotificationKind = exports.EventCreationRequestKindEnum = exports.CustomDealRestrictionPriority = exports.Condition = exports.BonusMu = exports.BeneficiaryKind = exports.AuditLogObjectType = exports.AuditLogActionEnum = void 0;
26
+ exports.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = exports.TransactionApi = exports.TransactionApiFactory = exports.TransactionApiFp = exports.TransactionApiAxiosParamCreator = exports.TagApi = exports.TagApiFactory = exports.TagApiFp = exports.TagApiAxiosParamCreator = exports.SegmentApi = exports.SegmentApiFactory = exports.SegmentApiFp = exports.SegmentApiAxiosParamCreator = exports.RewardApi = exports.RewardApiFactory = exports.RewardApiFp = exports.RewardApiAxiosParamCreator = exports.PromotionApi = exports.PromotionApiFactory = exports.PromotionApiFp = exports.PromotionApiAxiosParamCreator = exports.ListProgressIntervalEnum = exports.ProgressApi = exports.ProgressApiFactory = exports.ProgressApiFp = exports.ProgressApiAxiosParamCreator = exports.ProductApi = exports.ProductApiFactory = exports.ProductApiFp = exports.ProductApiAxiosParamCreator = exports.OrderApi = exports.OrderApiFactory = exports.OrderApiFp = exports.OrderApiAxiosParamCreator = exports.NotificationApi = exports.NotificationApiFactory = exports.NotificationApiFp = exports.NotificationApiAxiosParamCreator = exports.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = void 0;
27
27
  const axios_1 = require("axios");
28
28
  // Some imports not used depending on template conditions
29
29
  // @ts-ignore
@@ -47,7 +47,7 @@ exports.AuditLogObjectType = {
47
47
  * @export
48
48
  * @enum {string}
49
49
  */
50
- exports.Beneficiary = {
50
+ exports.BeneficiaryKind = {
51
51
  User: 'user',
52
52
  Client: 'client'
53
53
  };
@@ -100,6 +100,10 @@ exports.NotificationStatus = {
100
100
  Unread: 'unread',
101
101
  Read: 'read'
102
102
  };
103
+ exports.OrderKindEnum = {
104
+ Webshop: 'webshop',
105
+ Promotions: 'promotions'
106
+ };
103
107
  /**
104
108
  *
105
109
  * @export
@@ -168,15 +172,6 @@ exports.PromotionType = {
168
172
  Regular: 'regular',
169
173
  CustomDeal: 'custom_deal'
170
174
  };
171
- /**
172
- *
173
- * @export
174
- * @enum {string}
175
- */
176
- exports.ReceiverKind = {
177
- User: 'user',
178
- Client: 'client'
179
- };
180
175
  /**
181
176
  *
182
177
  * @export
@@ -282,7 +277,7 @@ exports.UserSource = {
282
277
  * @enum {string}
283
278
  */
284
279
  exports.WebhookKind = {
285
- Product: 'product'
280
+ Order: 'order'
286
281
  };
287
282
  /**
288
283
  * AuditApi - axios parameter creator
@@ -477,13 +472,16 @@ const BalanceApiAxiosParamCreator = function (configuration) {
477
472
  /**
478
473
  * Get balance
479
474
  * @summary Get balance
480
- * @param {string} receiver This is the receiver
475
+ * @param {string} beneficiaryValue This is the beneficiary value
476
+ * @param {BeneficiaryKind} kind This is the beneficiary kind
481
477
  * @param {*} [options] Override http request option.
482
478
  * @throws {RequiredError}
483
479
  */
484
- getBalance: (receiver, options = {}) => __awaiter(this, void 0, void 0, function* () {
485
- // verify required parameter 'receiver' is not null or undefined
486
- (0, common_1.assertParamExists)('getBalance', 'receiver', receiver);
480
+ getBalance: (beneficiaryValue, kind, options = {}) => __awaiter(this, void 0, void 0, function* () {
481
+ // verify required parameter 'beneficiaryValue' is not null or undefined
482
+ (0, common_1.assertParamExists)('getBalance', 'beneficiaryValue', beneficiaryValue);
483
+ // verify required parameter 'kind' is not null or undefined
484
+ (0, common_1.assertParamExists)('getBalance', 'kind', kind);
487
485
  const localVarPath = `/balances`;
488
486
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
489
487
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -497,8 +495,11 @@ const BalanceApiAxiosParamCreator = function (configuration) {
497
495
  // authentication jwt required
498
496
  // http bearer authentication required
499
497
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
500
- if (receiver !== undefined) {
501
- localVarQueryParameter['receiver'] = receiver;
498
+ if (beneficiaryValue !== undefined) {
499
+ localVarQueryParameter['beneficiaryValue'] = beneficiaryValue;
500
+ }
501
+ if (kind !== undefined) {
502
+ localVarQueryParameter['kind'] = kind;
502
503
  }
503
504
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
504
505
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -511,16 +512,16 @@ const BalanceApiAxiosParamCreator = function (configuration) {
511
512
  /**
512
513
  * Transfer balance
513
514
  * @summary Transfer balance
514
- * @param {string} receiverID ID of the receiver where we want to update balance.
515
+ * @param {string} beneficiaryValue ID of the beneficiary where we want to update balance.
515
516
  * @param {BalanceUpdateRequest} [balanceUpdateRequest]
516
517
  * @param {*} [options] Override http request option.
517
518
  * @throws {RequiredError}
518
519
  */
519
- transferBalance: (receiverID, balanceUpdateRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
520
- // verify required parameter 'receiverID' is not null or undefined
521
- (0, common_1.assertParamExists)('transferBalance', 'receiverID', receiverID);
522
- const localVarPath = `/balances/{receiverID}/transfer`
523
- .replace(`{${"receiverID"}}`, encodeURIComponent(String(receiverID)));
520
+ transferBalance: (beneficiaryValue, balanceUpdateRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
521
+ // verify required parameter 'beneficiaryValue' is not null or undefined
522
+ (0, common_1.assertParamExists)('transferBalance', 'beneficiaryValue', beneficiaryValue);
523
+ const localVarPath = `/balances/{beneficiaryValue}/transfer`
524
+ .replace(`{${"beneficiaryValue"}}`, encodeURIComponent(String(beneficiaryValue)));
524
525
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
525
526
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
526
527
  let baseOptions;
@@ -543,16 +544,16 @@ const BalanceApiAxiosParamCreator = function (configuration) {
543
544
  /**
544
545
  * Manually update balance. Used as manual compensation for out of stock products.
545
546
  * @summary Manually update balance
546
- * @param {string} receiverID ID of the receiver where we want to update balance.
547
+ * @param {string} beneficiaryValue ID of the beneficiary where we want to update balance.
547
548
  * @param {BalanceUpdateRequest} [balanceUpdateRequest]
548
549
  * @param {*} [options] Override http request option.
549
550
  * @throws {RequiredError}
550
551
  */
551
- updateBalance: (receiverID, balanceUpdateRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
552
- // verify required parameter 'receiverID' is not null or undefined
553
- (0, common_1.assertParamExists)('updateBalance', 'receiverID', receiverID);
554
- const localVarPath = `/balances/{receiverID}`
555
- .replace(`{${"receiverID"}}`, encodeURIComponent(String(receiverID)));
552
+ updateBalance: (beneficiaryValue, balanceUpdateRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
553
+ // verify required parameter 'beneficiaryValue' is not null or undefined
554
+ (0, common_1.assertParamExists)('updateBalance', 'beneficiaryValue', beneficiaryValue);
555
+ const localVarPath = `/balances/{beneficiaryValue}`
556
+ .replace(`{${"beneficiaryValue"}}`, encodeURIComponent(String(beneficiaryValue)));
556
557
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
557
558
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
558
559
  let baseOptions;
@@ -585,41 +586,42 @@ const BalanceApiFp = function (configuration) {
585
586
  /**
586
587
  * Get balance
587
588
  * @summary Get balance
588
- * @param {string} receiver This is the receiver
589
+ * @param {string} beneficiaryValue This is the beneficiary value
590
+ * @param {BeneficiaryKind} kind This is the beneficiary kind
589
591
  * @param {*} [options] Override http request option.
590
592
  * @throws {RequiredError}
591
593
  */
592
- getBalance(receiver, options) {
594
+ getBalance(beneficiaryValue, kind, options) {
593
595
  return __awaiter(this, void 0, void 0, function* () {
594
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getBalance(receiver, options);
596
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getBalance(beneficiaryValue, kind, options);
595
597
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
596
598
  });
597
599
  },
598
600
  /**
599
601
  * Transfer balance
600
602
  * @summary Transfer balance
601
- * @param {string} receiverID ID of the receiver where we want to update balance.
603
+ * @param {string} beneficiaryValue ID of the beneficiary where we want to update balance.
602
604
  * @param {BalanceUpdateRequest} [balanceUpdateRequest]
603
605
  * @param {*} [options] Override http request option.
604
606
  * @throws {RequiredError}
605
607
  */
606
- transferBalance(receiverID, balanceUpdateRequest, options) {
608
+ transferBalance(beneficiaryValue, balanceUpdateRequest, options) {
607
609
  return __awaiter(this, void 0, void 0, function* () {
608
- const localVarAxiosArgs = yield localVarAxiosParamCreator.transferBalance(receiverID, balanceUpdateRequest, options);
610
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.transferBalance(beneficiaryValue, balanceUpdateRequest, options);
609
611
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
610
612
  });
611
613
  },
612
614
  /**
613
615
  * Manually update balance. Used as manual compensation for out of stock products.
614
616
  * @summary Manually update balance
615
- * @param {string} receiverID ID of the receiver where we want to update balance.
617
+ * @param {string} beneficiaryValue ID of the beneficiary where we want to update balance.
616
618
  * @param {BalanceUpdateRequest} [balanceUpdateRequest]
617
619
  * @param {*} [options] Override http request option.
618
620
  * @throws {RequiredError}
619
621
  */
620
- updateBalance(receiverID, balanceUpdateRequest, options) {
622
+ updateBalance(beneficiaryValue, balanceUpdateRequest, options) {
621
623
  return __awaiter(this, void 0, void 0, function* () {
622
- const localVarAxiosArgs = yield localVarAxiosParamCreator.updateBalance(receiverID, balanceUpdateRequest, options);
624
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateBalance(beneficiaryValue, balanceUpdateRequest, options);
623
625
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
624
626
  });
625
627
  },
@@ -636,34 +638,35 @@ const BalanceApiFactory = function (configuration, basePath, axios) {
636
638
  /**
637
639
  * Get balance
638
640
  * @summary Get balance
639
- * @param {string} receiver This is the receiver
641
+ * @param {string} beneficiaryValue This is the beneficiary value
642
+ * @param {BeneficiaryKind} kind This is the beneficiary kind
640
643
  * @param {*} [options] Override http request option.
641
644
  * @throws {RequiredError}
642
645
  */
643
- getBalance(receiver, options) {
644
- return localVarFp.getBalance(receiver, options).then((request) => request(axios, basePath));
646
+ getBalance(beneficiaryValue, kind, options) {
647
+ return localVarFp.getBalance(beneficiaryValue, kind, options).then((request) => request(axios, basePath));
645
648
  },
646
649
  /**
647
650
  * Transfer balance
648
651
  * @summary Transfer balance
649
- * @param {string} receiverID ID of the receiver where we want to update balance.
652
+ * @param {string} beneficiaryValue ID of the beneficiary where we want to update balance.
650
653
  * @param {BalanceUpdateRequest} [balanceUpdateRequest]
651
654
  * @param {*} [options] Override http request option.
652
655
  * @throws {RequiredError}
653
656
  */
654
- transferBalance(receiverID, balanceUpdateRequest, options) {
655
- return localVarFp.transferBalance(receiverID, balanceUpdateRequest, options).then((request) => request(axios, basePath));
657
+ transferBalance(beneficiaryValue, balanceUpdateRequest, options) {
658
+ return localVarFp.transferBalance(beneficiaryValue, balanceUpdateRequest, options).then((request) => request(axios, basePath));
656
659
  },
657
660
  /**
658
661
  * Manually update balance. Used as manual compensation for out of stock products.
659
662
  * @summary Manually update balance
660
- * @param {string} receiverID ID of the receiver where we want to update balance.
663
+ * @param {string} beneficiaryValue ID of the beneficiary where we want to update balance.
661
664
  * @param {BalanceUpdateRequest} [balanceUpdateRequest]
662
665
  * @param {*} [options] Override http request option.
663
666
  * @throws {RequiredError}
664
667
  */
665
- updateBalance(receiverID, balanceUpdateRequest, options) {
666
- return localVarFp.updateBalance(receiverID, balanceUpdateRequest, options).then((request) => request(axios, basePath));
668
+ updateBalance(beneficiaryValue, balanceUpdateRequest, options) {
669
+ return localVarFp.updateBalance(beneficiaryValue, balanceUpdateRequest, options).then((request) => request(axios, basePath));
667
670
  },
668
671
  };
669
672
  };
@@ -678,37 +681,38 @@ class BalanceApi extends base_1.BaseAPI {
678
681
  /**
679
682
  * Get balance
680
683
  * @summary Get balance
681
- * @param {string} receiver This is the receiver
684
+ * @param {string} beneficiaryValue This is the beneficiary value
685
+ * @param {BeneficiaryKind} kind This is the beneficiary kind
682
686
  * @param {*} [options] Override http request option.
683
687
  * @throws {RequiredError}
684
688
  * @memberof BalanceApi
685
689
  */
686
- getBalance(receiver, options) {
687
- return (0, exports.BalanceApiFp)(this.configuration).getBalance(receiver, options).then((request) => request(this.axios, this.basePath));
690
+ getBalance(beneficiaryValue, kind, options) {
691
+ return (0, exports.BalanceApiFp)(this.configuration).getBalance(beneficiaryValue, kind, options).then((request) => request(this.axios, this.basePath));
688
692
  }
689
693
  /**
690
694
  * Transfer balance
691
695
  * @summary Transfer balance
692
- * @param {string} receiverID ID of the receiver where we want to update balance.
696
+ * @param {string} beneficiaryValue ID of the beneficiary where we want to update balance.
693
697
  * @param {BalanceUpdateRequest} [balanceUpdateRequest]
694
698
  * @param {*} [options] Override http request option.
695
699
  * @throws {RequiredError}
696
700
  * @memberof BalanceApi
697
701
  */
698
- transferBalance(receiverID, balanceUpdateRequest, options) {
699
- return (0, exports.BalanceApiFp)(this.configuration).transferBalance(receiverID, balanceUpdateRequest, options).then((request) => request(this.axios, this.basePath));
702
+ transferBalance(beneficiaryValue, balanceUpdateRequest, options) {
703
+ return (0, exports.BalanceApiFp)(this.configuration).transferBalance(beneficiaryValue, balanceUpdateRequest, options).then((request) => request(this.axios, this.basePath));
700
704
  }
701
705
  /**
702
706
  * Manually update balance. Used as manual compensation for out of stock products.
703
707
  * @summary Manually update balance
704
- * @param {string} receiverID ID of the receiver where we want to update balance.
708
+ * @param {string} beneficiaryValue ID of the beneficiary where we want to update balance.
705
709
  * @param {BalanceUpdateRequest} [balanceUpdateRequest]
706
710
  * @param {*} [options] Override http request option.
707
711
  * @throws {RequiredError}
708
712
  * @memberof BalanceApi
709
713
  */
710
- updateBalance(receiverID, balanceUpdateRequest, options) {
711
- return (0, exports.BalanceApiFp)(this.configuration).updateBalance(receiverID, balanceUpdateRequest, options).then((request) => request(this.axios, this.basePath));
714
+ updateBalance(beneficiaryValue, balanceUpdateRequest, options) {
715
+ return (0, exports.BalanceApiFp)(this.configuration).updateBalance(beneficiaryValue, balanceUpdateRequest, options).then((request) => request(this.axios, this.basePath));
712
716
  }
713
717
  }
714
718
  exports.BalanceApi = BalanceApi;
@@ -1938,6 +1942,271 @@ class NotificationApi extends base_1.BaseAPI {
1938
1942
  }
1939
1943
  }
1940
1944
  exports.NotificationApi = NotificationApi;
1945
+ /**
1946
+ * OrderApi - axios parameter creator
1947
+ * @export
1948
+ */
1949
+ const OrderApiAxiosParamCreator = function (configuration) {
1950
+ return {
1951
+ /**
1952
+ * Create a product order. If successful the value of the product will be deducted from the used balance.
1953
+ * @summary Create an order for a product
1954
+ * @param {CreateOrderRequest} [createOrderRequest]
1955
+ * @param {*} [options] Override http request option.
1956
+ * @throws {RequiredError}
1957
+ */
1958
+ createOrder: (createOrderRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
1959
+ const localVarPath = `/users/orders`;
1960
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1961
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1962
+ let baseOptions;
1963
+ if (configuration) {
1964
+ baseOptions = configuration.baseOptions;
1965
+ }
1966
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1967
+ const localVarHeaderParameter = {};
1968
+ const localVarQueryParameter = {};
1969
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1970
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1971
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1972
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1973
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createOrderRequest, localVarRequestOptions, configuration);
1974
+ return {
1975
+ url: (0, common_1.toPathString)(localVarUrlObj),
1976
+ options: localVarRequestOptions,
1977
+ };
1978
+ }),
1979
+ /**
1980
+ * Get order details
1981
+ * @summary Get order details
1982
+ * @param {string} id Order id
1983
+ * @param {*} [options] Override http request option.
1984
+ * @throws {RequiredError}
1985
+ */
1986
+ getOrder: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
1987
+ // verify required parameter 'id' is not null or undefined
1988
+ (0, common_1.assertParamExists)('getOrder', 'id', id);
1989
+ const localVarPath = `/orders/{id}`
1990
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1991
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1992
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1993
+ let baseOptions;
1994
+ if (configuration) {
1995
+ baseOptions = configuration.baseOptions;
1996
+ }
1997
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1998
+ const localVarHeaderParameter = {};
1999
+ const localVarQueryParameter = {};
2000
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2001
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2002
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2003
+ return {
2004
+ url: (0, common_1.toPathString)(localVarUrlObj),
2005
+ options: localVarRequestOptions,
2006
+ };
2007
+ }),
2008
+ /**
2009
+ * List existing orders
2010
+ * @summary List existing orders
2011
+ * @param {string} [paginationToken] This is the pagination token
2012
+ * @param {string} [search] Search for product or order
2013
+ * @param {string} [productId] Filter by token
2014
+ * @param {string} [balanceId] Filter by balance
2015
+ * @param {string} [createdAfter] Filter orders created after the specified date
2016
+ * @param {string} [createdBefore] Filter orders created before the specified date
2017
+ * @param {*} [options] Override http request option.
2018
+ * @throws {RequiredError}
2019
+ */
2020
+ listOrders: (paginationToken, search, productId, balanceId, createdAfter, createdBefore, options = {}) => __awaiter(this, void 0, void 0, function* () {
2021
+ const localVarPath = `/users/orders`;
2022
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2023
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2024
+ let baseOptions;
2025
+ if (configuration) {
2026
+ baseOptions = configuration.baseOptions;
2027
+ }
2028
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2029
+ const localVarHeaderParameter = {};
2030
+ const localVarQueryParameter = {};
2031
+ if (paginationToken !== undefined) {
2032
+ localVarQueryParameter['paginationToken'] = paginationToken;
2033
+ }
2034
+ if (search !== undefined) {
2035
+ localVarQueryParameter['search'] = search;
2036
+ }
2037
+ if (productId !== undefined) {
2038
+ localVarQueryParameter['productId'] = productId;
2039
+ }
2040
+ if (balanceId !== undefined) {
2041
+ localVarQueryParameter['balanceId'] = balanceId;
2042
+ }
2043
+ if (createdAfter !== undefined) {
2044
+ localVarQueryParameter['createdAfter'] = (createdAfter instanceof Date) ?
2045
+ createdAfter.toISOString() :
2046
+ createdAfter;
2047
+ }
2048
+ if (createdBefore !== undefined) {
2049
+ localVarQueryParameter['createdBefore'] = (createdBefore instanceof Date) ?
2050
+ createdBefore.toISOString() :
2051
+ createdBefore;
2052
+ }
2053
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2054
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2055
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2056
+ return {
2057
+ url: (0, common_1.toPathString)(localVarUrlObj),
2058
+ options: localVarRequestOptions,
2059
+ };
2060
+ }),
2061
+ };
2062
+ };
2063
+ exports.OrderApiAxiosParamCreator = OrderApiAxiosParamCreator;
2064
+ /**
2065
+ * OrderApi - functional programming interface
2066
+ * @export
2067
+ */
2068
+ const OrderApiFp = function (configuration) {
2069
+ const localVarAxiosParamCreator = (0, exports.OrderApiAxiosParamCreator)(configuration);
2070
+ return {
2071
+ /**
2072
+ * Create a product order. If successful the value of the product will be deducted from the used balance.
2073
+ * @summary Create an order for a product
2074
+ * @param {CreateOrderRequest} [createOrderRequest]
2075
+ * @param {*} [options] Override http request option.
2076
+ * @throws {RequiredError}
2077
+ */
2078
+ createOrder(createOrderRequest, options) {
2079
+ return __awaiter(this, void 0, void 0, function* () {
2080
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createOrder(createOrderRequest, options);
2081
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
2082
+ });
2083
+ },
2084
+ /**
2085
+ * Get order details
2086
+ * @summary Get order details
2087
+ * @param {string} id Order id
2088
+ * @param {*} [options] Override http request option.
2089
+ * @throws {RequiredError}
2090
+ */
2091
+ getOrder(id, options) {
2092
+ return __awaiter(this, void 0, void 0, function* () {
2093
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrder(id, options);
2094
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
2095
+ });
2096
+ },
2097
+ /**
2098
+ * List existing orders
2099
+ * @summary List existing orders
2100
+ * @param {string} [paginationToken] This is the pagination token
2101
+ * @param {string} [search] Search for product or order
2102
+ * @param {string} [productId] Filter by token
2103
+ * @param {string} [balanceId] Filter by balance
2104
+ * @param {string} [createdAfter] Filter orders created after the specified date
2105
+ * @param {string} [createdBefore] Filter orders created before the specified date
2106
+ * @param {*} [options] Override http request option.
2107
+ * @throws {RequiredError}
2108
+ */
2109
+ listOrders(paginationToken, search, productId, balanceId, createdAfter, createdBefore, options) {
2110
+ return __awaiter(this, void 0, void 0, function* () {
2111
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listOrders(paginationToken, search, productId, balanceId, createdAfter, createdBefore, options);
2112
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
2113
+ });
2114
+ },
2115
+ };
2116
+ };
2117
+ exports.OrderApiFp = OrderApiFp;
2118
+ /**
2119
+ * OrderApi - factory interface
2120
+ * @export
2121
+ */
2122
+ const OrderApiFactory = function (configuration, basePath, axios) {
2123
+ const localVarFp = (0, exports.OrderApiFp)(configuration);
2124
+ return {
2125
+ /**
2126
+ * Create a product order. If successful the value of the product will be deducted from the used balance.
2127
+ * @summary Create an order for a product
2128
+ * @param {CreateOrderRequest} [createOrderRequest]
2129
+ * @param {*} [options] Override http request option.
2130
+ * @throws {RequiredError}
2131
+ */
2132
+ createOrder(createOrderRequest, options) {
2133
+ return localVarFp.createOrder(createOrderRequest, options).then((request) => request(axios, basePath));
2134
+ },
2135
+ /**
2136
+ * Get order details
2137
+ * @summary Get order details
2138
+ * @param {string} id Order id
2139
+ * @param {*} [options] Override http request option.
2140
+ * @throws {RequiredError}
2141
+ */
2142
+ getOrder(id, options) {
2143
+ return localVarFp.getOrder(id, options).then((request) => request(axios, basePath));
2144
+ },
2145
+ /**
2146
+ * List existing orders
2147
+ * @summary List existing orders
2148
+ * @param {string} [paginationToken] This is the pagination token
2149
+ * @param {string} [search] Search for product or order
2150
+ * @param {string} [productId] Filter by token
2151
+ * @param {string} [balanceId] Filter by balance
2152
+ * @param {string} [createdAfter] Filter orders created after the specified date
2153
+ * @param {string} [createdBefore] Filter orders created before the specified date
2154
+ * @param {*} [options] Override http request option.
2155
+ * @throws {RequiredError}
2156
+ */
2157
+ listOrders(paginationToken, search, productId, balanceId, createdAfter, createdBefore, options) {
2158
+ return localVarFp.listOrders(paginationToken, search, productId, balanceId, createdAfter, createdBefore, options).then((request) => request(axios, basePath));
2159
+ },
2160
+ };
2161
+ };
2162
+ exports.OrderApiFactory = OrderApiFactory;
2163
+ /**
2164
+ * OrderApi - object-oriented interface
2165
+ * @export
2166
+ * @class OrderApi
2167
+ * @extends {BaseAPI}
2168
+ */
2169
+ class OrderApi extends base_1.BaseAPI {
2170
+ /**
2171
+ * Create a product order. If successful the value of the product will be deducted from the used balance.
2172
+ * @summary Create an order for a product
2173
+ * @param {CreateOrderRequest} [createOrderRequest]
2174
+ * @param {*} [options] Override http request option.
2175
+ * @throws {RequiredError}
2176
+ * @memberof OrderApi
2177
+ */
2178
+ createOrder(createOrderRequest, options) {
2179
+ return (0, exports.OrderApiFp)(this.configuration).createOrder(createOrderRequest, options).then((request) => request(this.axios, this.basePath));
2180
+ }
2181
+ /**
2182
+ * Get order details
2183
+ * @summary Get order details
2184
+ * @param {string} id Order id
2185
+ * @param {*} [options] Override http request option.
2186
+ * @throws {RequiredError}
2187
+ * @memberof OrderApi
2188
+ */
2189
+ getOrder(id, options) {
2190
+ return (0, exports.OrderApiFp)(this.configuration).getOrder(id, options).then((request) => request(this.axios, this.basePath));
2191
+ }
2192
+ /**
2193
+ * List existing orders
2194
+ * @summary List existing orders
2195
+ * @param {string} [paginationToken] This is the pagination token
2196
+ * @param {string} [search] Search for product or order
2197
+ * @param {string} [productId] Filter by token
2198
+ * @param {string} [balanceId] Filter by balance
2199
+ * @param {string} [createdAfter] Filter orders created after the specified date
2200
+ * @param {string} [createdBefore] Filter orders created before the specified date
2201
+ * @param {*} [options] Override http request option.
2202
+ * @throws {RequiredError}
2203
+ * @memberof OrderApi
2204
+ */
2205
+ listOrders(paginationToken, search, productId, balanceId, createdAfter, createdBefore, options) {
2206
+ return (0, exports.OrderApiFp)(this.configuration).listOrders(paginationToken, search, productId, balanceId, createdAfter, createdBefore, options).then((request) => request(this.axios, this.basePath));
2207
+ }
2208
+ }
2209
+ exports.OrderApi = OrderApi;
1941
2210
  /**
1942
2211
  * ProductApi - axios parameter creator
1943
2212
  * @export
@@ -2609,6 +2878,133 @@ exports.ListProgressIntervalEnum = {
2609
2878
  */
2610
2879
  const PromotionApiAxiosParamCreator = function (configuration) {
2611
2880
  return {
2881
+ /**
2882
+ * Claim a promotion by admins
2883
+ * @summary Claim a promotion
2884
+ * @param {string} id Promotion ID
2885
+ * @param {PromotionClaimRequest} [promotionClaimRequest]
2886
+ * @param {*} [options] Override http request option.
2887
+ * @throws {RequiredError}
2888
+ */
2889
+ claimPromotion: (id, promotionClaimRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
2890
+ // verify required parameter 'id' is not null or undefined
2891
+ (0, common_1.assertParamExists)('claimPromotion', 'id', id);
2892
+ const localVarPath = `/promotions/{id}/claims`
2893
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2894
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2895
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2896
+ let baseOptions;
2897
+ if (configuration) {
2898
+ baseOptions = configuration.baseOptions;
2899
+ }
2900
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2901
+ const localVarHeaderParameter = {};
2902
+ const localVarQueryParameter = {};
2903
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2904
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2905
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2906
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2907
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(promotionClaimRequest, localVarRequestOptions, configuration);
2908
+ return {
2909
+ url: (0, common_1.toPathString)(localVarUrlObj),
2910
+ options: localVarRequestOptions,
2911
+ };
2912
+ }),
2913
+ /**
2914
+ * Claim a promotion by admins
2915
+ * @summary Claim a promotion
2916
+ * @param {string} id Promotion ID
2917
+ * @param {string} progressID Promotion Progress ID
2918
+ * @param {*} [options] Override http request option.
2919
+ * @throws {RequiredError}
2920
+ */
2921
+ claimPromotionProgress: (id, progressID, options = {}) => __awaiter(this, void 0, void 0, function* () {
2922
+ // verify required parameter 'id' is not null or undefined
2923
+ (0, common_1.assertParamExists)('claimPromotionProgress', 'id', id);
2924
+ // verify required parameter 'progressID' is not null or undefined
2925
+ (0, common_1.assertParamExists)('claimPromotionProgress', 'progressID', progressID);
2926
+ const localVarPath = `/promotions/{id}/progress/{progressID}/claims`
2927
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
2928
+ .replace(`{${"progressID"}}`, encodeURIComponent(String(progressID)));
2929
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2930
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2931
+ let baseOptions;
2932
+ if (configuration) {
2933
+ baseOptions = configuration.baseOptions;
2934
+ }
2935
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2936
+ const localVarHeaderParameter = {};
2937
+ const localVarQueryParameter = {};
2938
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2939
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2940
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2941
+ return {
2942
+ url: (0, common_1.toPathString)(localVarUrlObj),
2943
+ options: localVarRequestOptions,
2944
+ };
2945
+ }),
2946
+ /**
2947
+ * Claim a promotion
2948
+ * @summary Claim a promotion
2949
+ * @param {string} id Promotion ID
2950
+ * @param {string} progressID Promotion Progress ID
2951
+ * @param {*} [options] Override http request option.
2952
+ * @throws {RequiredError}
2953
+ */
2954
+ claimPromotionUser: (id, progressID, options = {}) => __awaiter(this, void 0, void 0, function* () {
2955
+ // verify required parameter 'id' is not null or undefined
2956
+ (0, common_1.assertParamExists)('claimPromotionUser', 'id', id);
2957
+ // verify required parameter 'progressID' is not null or undefined
2958
+ (0, common_1.assertParamExists)('claimPromotionUser', 'progressID', progressID);
2959
+ const localVarPath = `/users/promotions/{id}/progress/{progressID}/claims`
2960
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
2961
+ .replace(`{${"progressID"}}`, encodeURIComponent(String(progressID)));
2962
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2963
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2964
+ let baseOptions;
2965
+ if (configuration) {
2966
+ baseOptions = configuration.baseOptions;
2967
+ }
2968
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2969
+ const localVarHeaderParameter = {};
2970
+ const localVarQueryParameter = {};
2971
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2972
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2973
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2974
+ return {
2975
+ url: (0, common_1.toPathString)(localVarUrlObj),
2976
+ options: localVarRequestOptions,
2977
+ };
2978
+ }),
2979
+ /**
2980
+ * Claim a promotion for all periods
2981
+ * @summary Claim a promotion
2982
+ * @param {string} id Promotion ID
2983
+ * @param {*} [options] Override http request option.
2984
+ * @throws {RequiredError}
2985
+ */
2986
+ claimPromotionUserAll: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
2987
+ // verify required parameter 'id' is not null or undefined
2988
+ (0, common_1.assertParamExists)('claimPromotionUserAll', 'id', id);
2989
+ const localVarPath = `/users/promotions/{id}/claims`
2990
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2991
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2992
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2993
+ let baseOptions;
2994
+ if (configuration) {
2995
+ baseOptions = configuration.baseOptions;
2996
+ }
2997
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2998
+ const localVarHeaderParameter = {};
2999
+ const localVarQueryParameter = {};
3000
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3001
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3002
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3003
+ return {
3004
+ url: (0, common_1.toPathString)(localVarUrlObj),
3005
+ options: localVarRequestOptions,
3006
+ };
3007
+ }),
2612
3008
  /**
2613
3009
  * Configure a promotion
2614
3010
  * @summary Create promotion
@@ -2821,6 +3217,61 @@ exports.PromotionApiAxiosParamCreator = PromotionApiAxiosParamCreator;
2821
3217
  const PromotionApiFp = function (configuration) {
2822
3218
  const localVarAxiosParamCreator = (0, exports.PromotionApiAxiosParamCreator)(configuration);
2823
3219
  return {
3220
+ /**
3221
+ * Claim a promotion by admins
3222
+ * @summary Claim a promotion
3223
+ * @param {string} id Promotion ID
3224
+ * @param {PromotionClaimRequest} [promotionClaimRequest]
3225
+ * @param {*} [options] Override http request option.
3226
+ * @throws {RequiredError}
3227
+ */
3228
+ claimPromotion(id, promotionClaimRequest, options) {
3229
+ return __awaiter(this, void 0, void 0, function* () {
3230
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.claimPromotion(id, promotionClaimRequest, options);
3231
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
3232
+ });
3233
+ },
3234
+ /**
3235
+ * Claim a promotion by admins
3236
+ * @summary Claim a promotion
3237
+ * @param {string} id Promotion ID
3238
+ * @param {string} progressID Promotion Progress ID
3239
+ * @param {*} [options] Override http request option.
3240
+ * @throws {RequiredError}
3241
+ */
3242
+ claimPromotionProgress(id, progressID, options) {
3243
+ return __awaiter(this, void 0, void 0, function* () {
3244
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.claimPromotionProgress(id, progressID, options);
3245
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
3246
+ });
3247
+ },
3248
+ /**
3249
+ * Claim a promotion
3250
+ * @summary Claim a promotion
3251
+ * @param {string} id Promotion ID
3252
+ * @param {string} progressID Promotion Progress ID
3253
+ * @param {*} [options] Override http request option.
3254
+ * @throws {RequiredError}
3255
+ */
3256
+ claimPromotionUser(id, progressID, options) {
3257
+ return __awaiter(this, void 0, void 0, function* () {
3258
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.claimPromotionUser(id, progressID, options);
3259
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
3260
+ });
3261
+ },
3262
+ /**
3263
+ * Claim a promotion for all periods
3264
+ * @summary Claim a promotion
3265
+ * @param {string} id Promotion ID
3266
+ * @param {*} [options] Override http request option.
3267
+ * @throws {RequiredError}
3268
+ */
3269
+ claimPromotionUserAll(id, options) {
3270
+ return __awaiter(this, void 0, void 0, function* () {
3271
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.claimPromotionUserAll(id, options);
3272
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
3273
+ });
3274
+ },
2824
3275
  /**
2825
3276
  * Configure a promotion
2826
3277
  * @summary Create promotion
@@ -2905,6 +3356,49 @@ exports.PromotionApiFp = PromotionApiFp;
2905
3356
  const PromotionApiFactory = function (configuration, basePath, axios) {
2906
3357
  const localVarFp = (0, exports.PromotionApiFp)(configuration);
2907
3358
  return {
3359
+ /**
3360
+ * Claim a promotion by admins
3361
+ * @summary Claim a promotion
3362
+ * @param {string} id Promotion ID
3363
+ * @param {PromotionClaimRequest} [promotionClaimRequest]
3364
+ * @param {*} [options] Override http request option.
3365
+ * @throws {RequiredError}
3366
+ */
3367
+ claimPromotion(id, promotionClaimRequest, options) {
3368
+ return localVarFp.claimPromotion(id, promotionClaimRequest, options).then((request) => request(axios, basePath));
3369
+ },
3370
+ /**
3371
+ * Claim a promotion by admins
3372
+ * @summary Claim a promotion
3373
+ * @param {string} id Promotion ID
3374
+ * @param {string} progressID Promotion Progress ID
3375
+ * @param {*} [options] Override http request option.
3376
+ * @throws {RequiredError}
3377
+ */
3378
+ claimPromotionProgress(id, progressID, options) {
3379
+ return localVarFp.claimPromotionProgress(id, progressID, options).then((request) => request(axios, basePath));
3380
+ },
3381
+ /**
3382
+ * Claim a promotion
3383
+ * @summary Claim a promotion
3384
+ * @param {string} id Promotion ID
3385
+ * @param {string} progressID Promotion Progress ID
3386
+ * @param {*} [options] Override http request option.
3387
+ * @throws {RequiredError}
3388
+ */
3389
+ claimPromotionUser(id, progressID, options) {
3390
+ return localVarFp.claimPromotionUser(id, progressID, options).then((request) => request(axios, basePath));
3391
+ },
3392
+ /**
3393
+ * Claim a promotion for all periods
3394
+ * @summary Claim a promotion
3395
+ * @param {string} id Promotion ID
3396
+ * @param {*} [options] Override http request option.
3397
+ * @throws {RequiredError}
3398
+ */
3399
+ claimPromotionUserAll(id, options) {
3400
+ return localVarFp.claimPromotionUserAll(id, options).then((request) => request(axios, basePath));
3401
+ },
2908
3402
  /**
2909
3403
  * Configure a promotion
2910
3404
  * @summary Create promotion
@@ -2974,6 +3468,53 @@ exports.PromotionApiFactory = PromotionApiFactory;
2974
3468
  * @extends {BaseAPI}
2975
3469
  */
2976
3470
  class PromotionApi extends base_1.BaseAPI {
3471
+ /**
3472
+ * Claim a promotion by admins
3473
+ * @summary Claim a promotion
3474
+ * @param {string} id Promotion ID
3475
+ * @param {PromotionClaimRequest} [promotionClaimRequest]
3476
+ * @param {*} [options] Override http request option.
3477
+ * @throws {RequiredError}
3478
+ * @memberof PromotionApi
3479
+ */
3480
+ claimPromotion(id, promotionClaimRequest, options) {
3481
+ return (0, exports.PromotionApiFp)(this.configuration).claimPromotion(id, promotionClaimRequest, options).then((request) => request(this.axios, this.basePath));
3482
+ }
3483
+ /**
3484
+ * Claim a promotion by admins
3485
+ * @summary Claim a promotion
3486
+ * @param {string} id Promotion ID
3487
+ * @param {string} progressID Promotion Progress ID
3488
+ * @param {*} [options] Override http request option.
3489
+ * @throws {RequiredError}
3490
+ * @memberof PromotionApi
3491
+ */
3492
+ claimPromotionProgress(id, progressID, options) {
3493
+ return (0, exports.PromotionApiFp)(this.configuration).claimPromotionProgress(id, progressID, options).then((request) => request(this.axios, this.basePath));
3494
+ }
3495
+ /**
3496
+ * Claim a promotion
3497
+ * @summary Claim a promotion
3498
+ * @param {string} id Promotion ID
3499
+ * @param {string} progressID Promotion Progress ID
3500
+ * @param {*} [options] Override http request option.
3501
+ * @throws {RequiredError}
3502
+ * @memberof PromotionApi
3503
+ */
3504
+ claimPromotionUser(id, progressID, options) {
3505
+ return (0, exports.PromotionApiFp)(this.configuration).claimPromotionUser(id, progressID, options).then((request) => request(this.axios, this.basePath));
3506
+ }
3507
+ /**
3508
+ * Claim a promotion for all periods
3509
+ * @summary Claim a promotion
3510
+ * @param {string} id Promotion ID
3511
+ * @param {*} [options] Override http request option.
3512
+ * @throws {RequiredError}
3513
+ * @memberof PromotionApi
3514
+ */
3515
+ claimPromotionUserAll(id, options) {
3516
+ return (0, exports.PromotionApiFp)(this.configuration).claimPromotionUserAll(id, options).then((request) => request(this.axios, this.basePath));
3517
+ }
2977
3518
  /**
2978
3519
  * Configure a promotion
2979
3520
  * @summary Create promotion
@@ -3866,14 +4407,12 @@ const TransactionApiAxiosParamCreator = function (configuration) {
3866
4407
  /**
3867
4408
  * List existing transactions
3868
4409
  * @summary List existing transactions
3869
- * @param {string} clientID This is the client ID
3870
4410
  * @param {string} [paginationToken] This is the pagination token
4411
+ * @param {string} [clientID] This is the client ID
3871
4412
  * @param {*} [options] Override http request option.
3872
4413
  * @throws {RequiredError}
3873
4414
  */
3874
- listTransactions: (clientID, paginationToken, options = {}) => __awaiter(this, void 0, void 0, function* () {
3875
- // verify required parameter 'clientID' is not null or undefined
3876
- (0, common_1.assertParamExists)('listTransactions', 'clientID', clientID);
4415
+ listTransactions: (paginationToken, clientID, options = {}) => __awaiter(this, void 0, void 0, function* () {
3877
4416
  const localVarPath = `/transactions`;
3878
4417
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3879
4418
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -3914,14 +4453,14 @@ const TransactionApiFp = function (configuration) {
3914
4453
  /**
3915
4454
  * List existing transactions
3916
4455
  * @summary List existing transactions
3917
- * @param {string} clientID This is the client ID
3918
4456
  * @param {string} [paginationToken] This is the pagination token
4457
+ * @param {string} [clientID] This is the client ID
3919
4458
  * @param {*} [options] Override http request option.
3920
4459
  * @throws {RequiredError}
3921
4460
  */
3922
- listTransactions(clientID, paginationToken, options) {
4461
+ listTransactions(paginationToken, clientID, options) {
3923
4462
  return __awaiter(this, void 0, void 0, function* () {
3924
- const localVarAxiosArgs = yield localVarAxiosParamCreator.listTransactions(clientID, paginationToken, options);
4463
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listTransactions(paginationToken, clientID, options);
3925
4464
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
3926
4465
  });
3927
4466
  },
@@ -3938,13 +4477,13 @@ const TransactionApiFactory = function (configuration, basePath, axios) {
3938
4477
  /**
3939
4478
  * List existing transactions
3940
4479
  * @summary List existing transactions
3941
- * @param {string} clientID This is the client ID
3942
4480
  * @param {string} [paginationToken] This is the pagination token
4481
+ * @param {string} [clientID] This is the client ID
3943
4482
  * @param {*} [options] Override http request option.
3944
4483
  * @throws {RequiredError}
3945
4484
  */
3946
- listTransactions(clientID, paginationToken, options) {
3947
- return localVarFp.listTransactions(clientID, paginationToken, options).then((request) => request(axios, basePath));
4485
+ listTransactions(paginationToken, clientID, options) {
4486
+ return localVarFp.listTransactions(paginationToken, clientID, options).then((request) => request(axios, basePath));
3948
4487
  },
3949
4488
  };
3950
4489
  };
@@ -3959,14 +4498,14 @@ class TransactionApi extends base_1.BaseAPI {
3959
4498
  /**
3960
4499
  * List existing transactions
3961
4500
  * @summary List existing transactions
3962
- * @param {string} clientID This is the client ID
3963
4501
  * @param {string} [paginationToken] This is the pagination token
4502
+ * @param {string} [clientID] This is the client ID
3964
4503
  * @param {*} [options] Override http request option.
3965
4504
  * @throws {RequiredError}
3966
4505
  * @memberof TransactionApi
3967
4506
  */
3968
- listTransactions(clientID, paginationToken, options) {
3969
- return (0, exports.TransactionApiFp)(this.configuration).listTransactions(clientID, paginationToken, options).then((request) => request(this.axios, this.basePath));
4507
+ listTransactions(paginationToken, clientID, options) {
4508
+ return (0, exports.TransactionApiFp)(this.configuration).listTransactions(paginationToken, clientID, options).then((request) => request(this.axios, this.basePath));
3970
4509
  }
3971
4510
  }
3972
4511
  exports.TransactionApi = TransactionApi;