flexinet-api 0.0.292-prerelease0 → 0.0.319-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 +761 -52
- package/dist/api.d.ts +399 -0
- package/dist/api.js +597 -52
- package/dist/esm/api.d.ts +399 -0
- package/dist/esm/api.js +592 -51
- package/package.json +1 -1
package/dist/api.js
CHANGED
|
@@ -23,7 +23,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.CustomDealsApiAxiosParamCreator = exports.ConfigurationApi = exports.ConfigurationApiFactory = exports.ConfigurationApiFp = exports.ConfigurationApiAxiosParamCreator = exports.ClientApi = exports.ClientApiFactory = exports.ClientApiFp = exports.ClientApiAxiosParamCreator = exports.CategoryApi = exports.CategoryApiFactory = exports.CategoryApiFp = exports.CategoryApiAxiosParamCreator = 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.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 = exports.DefaultApiAxiosParamCreator = exports.CustomDealsApi = exports.CustomDealsApiFactory = exports.CustomDealsApiFp = 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 = exports.DefaultApiAxiosParamCreator = exports.CustomDealsApi = exports.CustomDealsApiFactory = exports.CustomDealsApiFp = void 0;
|
|
27
27
|
const axios_1 = require("axios");
|
|
28
28
|
// Some imports not used depending on template conditions
|
|
29
29
|
// @ts-ignore
|
|
@@ -298,7 +298,7 @@ const AuditApiAxiosParamCreator = function (configuration) {
|
|
|
298
298
|
(0, common_1.assertParamExists)('listAuditLogs', 'objectType', objectType);
|
|
299
299
|
// verify required parameter 'objectID' is not null or undefined
|
|
300
300
|
(0, common_1.assertParamExists)('listAuditLogs', 'objectID', objectID);
|
|
301
|
-
const localVarPath = `/audit/{objectType}/{objectID}`
|
|
301
|
+
const localVarPath = `/admins/audit/{objectType}/{objectID}`
|
|
302
302
|
.replace(`{${"objectType"}}`, encodeURIComponent(String(objectType)))
|
|
303
303
|
.replace(`{${"objectID"}}`, encodeURIComponent(String(objectID)));
|
|
304
304
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -332,7 +332,7 @@ const AuditApiAxiosParamCreator = function (configuration) {
|
|
|
332
332
|
listUserAuditLogs: (userID, nextToken, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
333
333
|
// verify required parameter 'userID' is not null or undefined
|
|
334
334
|
(0, common_1.assertParamExists)('listUserAuditLogs', 'userID', userID);
|
|
335
|
-
const localVarPath = `/audit/user/{userID}`
|
|
335
|
+
const localVarPath = `/admins/audit/user/{userID}`
|
|
336
336
|
.replace(`{${"userID"}}`, encodeURIComponent(String(userID)));
|
|
337
337
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
338
338
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -482,7 +482,7 @@ const BalanceApiAxiosParamCreator = function (configuration) {
|
|
|
482
482
|
(0, common_1.assertParamExists)('getBalance', 'beneficiaryValue', beneficiaryValue);
|
|
483
483
|
// verify required parameter 'kind' is not null or undefined
|
|
484
484
|
(0, common_1.assertParamExists)('getBalance', 'kind', kind);
|
|
485
|
-
const localVarPath = `/balances`;
|
|
485
|
+
const localVarPath = `/admins/balances`;
|
|
486
486
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
487
487
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
488
488
|
let baseOptions;
|
|
@@ -509,6 +509,34 @@ const BalanceApiAxiosParamCreator = function (configuration) {
|
|
|
509
509
|
options: localVarRequestOptions,
|
|
510
510
|
};
|
|
511
511
|
}),
|
|
512
|
+
/**
|
|
513
|
+
* Get balance for the user
|
|
514
|
+
* @summary Get balance
|
|
515
|
+
* @param {*} [options] Override http request option.
|
|
516
|
+
* @throws {RequiredError}
|
|
517
|
+
*/
|
|
518
|
+
getUserBalance: (options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
519
|
+
const localVarPath = `/users/balances`;
|
|
520
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
521
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
522
|
+
let baseOptions;
|
|
523
|
+
if (configuration) {
|
|
524
|
+
baseOptions = configuration.baseOptions;
|
|
525
|
+
}
|
|
526
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
527
|
+
const localVarHeaderParameter = {};
|
|
528
|
+
const localVarQueryParameter = {};
|
|
529
|
+
// authentication jwt required
|
|
530
|
+
// http bearer authentication required
|
|
531
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
532
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
533
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
534
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
535
|
+
return {
|
|
536
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
537
|
+
options: localVarRequestOptions,
|
|
538
|
+
};
|
|
539
|
+
}),
|
|
512
540
|
/**
|
|
513
541
|
* Transfer balance
|
|
514
542
|
* @summary Transfer balance
|
|
@@ -520,7 +548,7 @@ const BalanceApiAxiosParamCreator = function (configuration) {
|
|
|
520
548
|
transferBalance: (beneficiaryValue, balanceUpdateRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
521
549
|
// verify required parameter 'beneficiaryValue' is not null or undefined
|
|
522
550
|
(0, common_1.assertParamExists)('transferBalance', 'beneficiaryValue', beneficiaryValue);
|
|
523
|
-
const localVarPath = `/balances/{beneficiaryValue}/transfer`
|
|
551
|
+
const localVarPath = `/admins/balances/{beneficiaryValue}/transfer`
|
|
524
552
|
.replace(`{${"beneficiaryValue"}}`, encodeURIComponent(String(beneficiaryValue)));
|
|
525
553
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
526
554
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -552,7 +580,7 @@ const BalanceApiAxiosParamCreator = function (configuration) {
|
|
|
552
580
|
updateBalance: (beneficiaryValue, balanceUpdateRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
553
581
|
// verify required parameter 'beneficiaryValue' is not null or undefined
|
|
554
582
|
(0, common_1.assertParamExists)('updateBalance', 'beneficiaryValue', beneficiaryValue);
|
|
555
|
-
const localVarPath = `/balances/{beneficiaryValue}`
|
|
583
|
+
const localVarPath = `/admins/balances/{beneficiaryValue}`
|
|
556
584
|
.replace(`{${"beneficiaryValue"}}`, encodeURIComponent(String(beneficiaryValue)));
|
|
557
585
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
558
586
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -597,6 +625,18 @@ const BalanceApiFp = function (configuration) {
|
|
|
597
625
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
598
626
|
});
|
|
599
627
|
},
|
|
628
|
+
/**
|
|
629
|
+
* Get balance for the user
|
|
630
|
+
* @summary Get balance
|
|
631
|
+
* @param {*} [options] Override http request option.
|
|
632
|
+
* @throws {RequiredError}
|
|
633
|
+
*/
|
|
634
|
+
getUserBalance(options) {
|
|
635
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
636
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserBalance(options);
|
|
637
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
638
|
+
});
|
|
639
|
+
},
|
|
600
640
|
/**
|
|
601
641
|
* Transfer balance
|
|
602
642
|
* @summary Transfer balance
|
|
@@ -646,6 +686,15 @@ const BalanceApiFactory = function (configuration, basePath, axios) {
|
|
|
646
686
|
getBalance(beneficiaryValue, kind, options) {
|
|
647
687
|
return localVarFp.getBalance(beneficiaryValue, kind, options).then((request) => request(axios, basePath));
|
|
648
688
|
},
|
|
689
|
+
/**
|
|
690
|
+
* Get balance for the user
|
|
691
|
+
* @summary Get balance
|
|
692
|
+
* @param {*} [options] Override http request option.
|
|
693
|
+
* @throws {RequiredError}
|
|
694
|
+
*/
|
|
695
|
+
getUserBalance(options) {
|
|
696
|
+
return localVarFp.getUserBalance(options).then((request) => request(axios, basePath));
|
|
697
|
+
},
|
|
649
698
|
/**
|
|
650
699
|
* Transfer balance
|
|
651
700
|
* @summary Transfer balance
|
|
@@ -690,6 +739,16 @@ class BalanceApi extends base_1.BaseAPI {
|
|
|
690
739
|
getBalance(beneficiaryValue, kind, options) {
|
|
691
740
|
return (0, exports.BalanceApiFp)(this.configuration).getBalance(beneficiaryValue, kind, options).then((request) => request(this.axios, this.basePath));
|
|
692
741
|
}
|
|
742
|
+
/**
|
|
743
|
+
* Get balance for the user
|
|
744
|
+
* @summary Get balance
|
|
745
|
+
* @param {*} [options] Override http request option.
|
|
746
|
+
* @throws {RequiredError}
|
|
747
|
+
* @memberof BalanceApi
|
|
748
|
+
*/
|
|
749
|
+
getUserBalance(options) {
|
|
750
|
+
return (0, exports.BalanceApiFp)(this.configuration).getUserBalance(options).then((request) => request(this.axios, this.basePath));
|
|
751
|
+
}
|
|
693
752
|
/**
|
|
694
753
|
* Transfer balance
|
|
695
754
|
* @summary Transfer balance
|
|
@@ -829,7 +888,7 @@ const ClientApiAxiosParamCreator = function (configuration) {
|
|
|
829
888
|
createClient: (clientCreationRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
830
889
|
// verify required parameter 'clientCreationRequest' is not null or undefined
|
|
831
890
|
(0, common_1.assertParamExists)('createClient', 'clientCreationRequest', clientCreationRequest);
|
|
832
|
-
const localVarPath = `/clients`;
|
|
891
|
+
const localVarPath = `/admins/clients`;
|
|
833
892
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
834
893
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
835
894
|
let baseOptions;
|
|
@@ -862,7 +921,7 @@ const ClientApiAxiosParamCreator = function (configuration) {
|
|
|
862
921
|
getClient: (clientID, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
863
922
|
// verify required parameter 'clientID' is not null or undefined
|
|
864
923
|
(0, common_1.assertParamExists)('getClient', 'clientID', clientID);
|
|
865
|
-
const localVarPath = `/clients/{clientID}`
|
|
924
|
+
const localVarPath = `/admins/clients/{clientID}`
|
|
866
925
|
.replace(`{${"clientID"}}`, encodeURIComponent(String(clientID)));
|
|
867
926
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
868
927
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -893,7 +952,7 @@ const ClientApiAxiosParamCreator = function (configuration) {
|
|
|
893
952
|
* @throws {RequiredError}
|
|
894
953
|
*/
|
|
895
954
|
listClients: (nextToken, search, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
896
|
-
const localVarPath = `/clients`;
|
|
955
|
+
const localVarPath = `/admins/clients`;
|
|
897
956
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
898
957
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
899
958
|
let baseOptions;
|
|
@@ -1073,7 +1132,7 @@ const ConfigurationApiAxiosParamCreator = function (configuration) {
|
|
|
1073
1132
|
createConfiguration: (backofficeConfig, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1074
1133
|
// verify required parameter 'backofficeConfig' is not null or undefined
|
|
1075
1134
|
(0, common_1.assertParamExists)('createConfiguration', 'backofficeConfig', backofficeConfig);
|
|
1076
|
-
const localVarPath = `/configurations`;
|
|
1135
|
+
const localVarPath = `/admins/configurations`;
|
|
1077
1136
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1078
1137
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1079
1138
|
let baseOptions;
|
|
@@ -1105,7 +1164,7 @@ const ConfigurationApiAxiosParamCreator = function (configuration) {
|
|
|
1105
1164
|
* @throws {RequiredError}
|
|
1106
1165
|
*/
|
|
1107
1166
|
listConfigurations: (nextToken, search, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1108
|
-
const localVarPath = `/configurations`;
|
|
1167
|
+
const localVarPath = `/admins/configurations`;
|
|
1109
1168
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1110
1169
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1111
1170
|
let baseOptions;
|
|
@@ -1251,7 +1310,7 @@ const CustomDealsApiAxiosParamCreator = function (configuration) {
|
|
|
1251
1310
|
createCustomDealRestrictions: (customDealRestrictionRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1252
1311
|
// verify required parameter 'customDealRestrictionRequest' is not null or undefined
|
|
1253
1312
|
(0, common_1.assertParamExists)('createCustomDealRestrictions', 'customDealRestrictionRequest', customDealRestrictionRequest);
|
|
1254
|
-
const localVarPath = `/custom-deals/restrictions`;
|
|
1313
|
+
const localVarPath = `/admins/custom-deals/restrictions`;
|
|
1255
1314
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1256
1315
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1257
1316
|
let baseOptions;
|
|
@@ -1278,7 +1337,7 @@ const CustomDealsApiAxiosParamCreator = function (configuration) {
|
|
|
1278
1337
|
* @throws {RequiredError}
|
|
1279
1338
|
*/
|
|
1280
1339
|
listCustomDealRestrictions: (options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1281
|
-
const localVarPath = `/custom-deals/restrictions`;
|
|
1340
|
+
const localVarPath = `/admins/custom-deals/restrictions`;
|
|
1282
1341
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1283
1342
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1284
1343
|
let baseOptions;
|
|
@@ -1406,7 +1465,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
1406
1465
|
* @throws {RequiredError}
|
|
1407
1466
|
*/
|
|
1408
1467
|
generateApiKey: (options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1409
|
-
const localVarPath = `/integrations/apikey`;
|
|
1468
|
+
const localVarPath = `/admins/integrations/apikey`;
|
|
1410
1469
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1411
1470
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1412
1471
|
let baseOptions;
|
|
@@ -1437,7 +1496,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
1437
1496
|
importEvent: (eventCreationRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1438
1497
|
// verify required parameter 'eventCreationRequest' is not null or undefined
|
|
1439
1498
|
(0, common_1.assertParamExists)('importEvent', 'eventCreationRequest', eventCreationRequest);
|
|
1440
|
-
const localVarPath = `/events`;
|
|
1499
|
+
const localVarPath = `/admins/events`;
|
|
1441
1500
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1442
1501
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1443
1502
|
let baseOptions;
|
|
@@ -1467,7 +1526,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
1467
1526
|
* @throws {RequiredError}
|
|
1468
1527
|
*/
|
|
1469
1528
|
listWebhooks: (options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1470
|
-
const localVarPath = `/integrations/webhooks`;
|
|
1529
|
+
const localVarPath = `/admins/integrations/webhooks`;
|
|
1471
1530
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1472
1531
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1473
1532
|
let baseOptions;
|
|
@@ -1498,7 +1557,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
1498
1557
|
setWebhook: (webhook, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1499
1558
|
// verify required parameter 'webhook' is not null or undefined
|
|
1500
1559
|
(0, common_1.assertParamExists)('setWebhook', 'webhook', webhook);
|
|
1501
|
-
const localVarPath = `/integrations/webhooks`;
|
|
1560
|
+
const localVarPath = `/admins/integrations/webhooks`;
|
|
1502
1561
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1503
1562
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1504
1563
|
let baseOptions;
|
|
@@ -1528,7 +1587,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
1528
1587
|
* @throws {RequiredError}
|
|
1529
1588
|
*/
|
|
1530
1589
|
testApiKey: (options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1531
|
-
const localVarPath = `/integrations/apikey`;
|
|
1590
|
+
const localVarPath = `/admins/integrations/apikey`;
|
|
1532
1591
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1533
1592
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1534
1593
|
let baseOptions;
|
|
@@ -1757,7 +1816,7 @@ const NotificationApiAxiosParamCreator = function (configuration) {
|
|
|
1757
1816
|
bulkMarkNotificationAsRead: (bulkNotificationsReadRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1758
1817
|
// verify required parameter 'bulkNotificationsReadRequest' is not null or undefined
|
|
1759
1818
|
(0, common_1.assertParamExists)('bulkMarkNotificationAsRead', 'bulkNotificationsReadRequest', bulkNotificationsReadRequest);
|
|
1760
|
-
const localVarPath = `/notifications/read`;
|
|
1819
|
+
const localVarPath = `/users/notifications/read`;
|
|
1761
1820
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1762
1821
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1763
1822
|
let baseOptions;
|
|
@@ -1787,7 +1846,7 @@ const NotificationApiAxiosParamCreator = function (configuration) {
|
|
|
1787
1846
|
getNotification: (notificationID, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1788
1847
|
// verify required parameter 'notificationID' is not null or undefined
|
|
1789
1848
|
(0, common_1.assertParamExists)('getNotification', 'notificationID', notificationID);
|
|
1790
|
-
const localVarPath = `/notifications/{notificationID}`
|
|
1849
|
+
const localVarPath = `/users/notifications/{notificationID}`
|
|
1791
1850
|
.replace(`{${"notificationID"}}`, encodeURIComponent(String(notificationID)));
|
|
1792
1851
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1793
1852
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -1815,7 +1874,7 @@ const NotificationApiAxiosParamCreator = function (configuration) {
|
|
|
1815
1874
|
* @throws {RequiredError}
|
|
1816
1875
|
*/
|
|
1817
1876
|
listNotifications: (nextToken, status, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1818
|
-
const localVarPath = `/notifications`;
|
|
1877
|
+
const localVarPath = `/users/notifications`;
|
|
1819
1878
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1820
1879
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1821
1880
|
let baseOptions;
|
|
@@ -1849,7 +1908,7 @@ const NotificationApiAxiosParamCreator = function (configuration) {
|
|
|
1849
1908
|
markNotificationAsRead: (notificationID, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1850
1909
|
// verify required parameter 'notificationID' is not null or undefined
|
|
1851
1910
|
(0, common_1.assertParamExists)('markNotificationAsRead', 'notificationID', notificationID);
|
|
1852
|
-
const localVarPath = `/notifications/{notificationID}`
|
|
1911
|
+
const localVarPath = `/users/notifications/{notificationID}`
|
|
1853
1912
|
.replace(`{${"notificationID"}}`, encodeURIComponent(String(notificationID)));
|
|
1854
1913
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1855
1914
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -2083,7 +2142,7 @@ const OrderApiAxiosParamCreator = function (configuration) {
|
|
|
2083
2142
|
getOrder: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2084
2143
|
// verify required parameter 'id' is not null or undefined
|
|
2085
2144
|
(0, common_1.assertParamExists)('getOrder', 'id', id);
|
|
2086
|
-
const localVarPath = `/orders/{id}`
|
|
2145
|
+
const localVarPath = `/users/orders/{id}`
|
|
2087
2146
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
2088
2147
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2089
2148
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -2321,7 +2380,7 @@ const ProductApiAxiosParamCreator = function (configuration) {
|
|
|
2321
2380
|
approveProduct: (id, productRequestApprovalRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2322
2381
|
// verify required parameter 'id' is not null or undefined
|
|
2323
2382
|
(0, common_1.assertParamExists)('approveProduct', 'id', id);
|
|
2324
|
-
const localVarPath = `/products/requests/{id}`
|
|
2383
|
+
const localVarPath = `/admins/products/requests/{id}`
|
|
2325
2384
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
2326
2385
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2327
2386
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -2345,6 +2404,37 @@ const ProductApiAxiosParamCreator = function (configuration) {
|
|
|
2345
2404
|
options: localVarRequestOptions,
|
|
2346
2405
|
};
|
|
2347
2406
|
}),
|
|
2407
|
+
/**
|
|
2408
|
+
* Create multiple products
|
|
2409
|
+
* @summary Create multiple products
|
|
2410
|
+
* @param {ProductBulkCreationRequest} [productBulkCreationRequest]
|
|
2411
|
+
* @param {*} [options] Override http request option.
|
|
2412
|
+
* @throws {RequiredError}
|
|
2413
|
+
*/
|
|
2414
|
+
bulkCreateProducts: (productBulkCreationRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2415
|
+
const localVarPath = `/admins/products/bulk`;
|
|
2416
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2417
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2418
|
+
let baseOptions;
|
|
2419
|
+
if (configuration) {
|
|
2420
|
+
baseOptions = configuration.baseOptions;
|
|
2421
|
+
}
|
|
2422
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
2423
|
+
const localVarHeaderParameter = {};
|
|
2424
|
+
const localVarQueryParameter = {};
|
|
2425
|
+
// authentication jwt required
|
|
2426
|
+
// http bearer authentication required
|
|
2427
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
2428
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2429
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2430
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2431
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2432
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(productBulkCreationRequest, localVarRequestOptions, configuration);
|
|
2433
|
+
return {
|
|
2434
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2435
|
+
options: localVarRequestOptions,
|
|
2436
|
+
};
|
|
2437
|
+
}),
|
|
2348
2438
|
/**
|
|
2349
2439
|
* Create a new product
|
|
2350
2440
|
* @summary Create a new product
|
|
@@ -2353,7 +2443,7 @@ const ProductApiAxiosParamCreator = function (configuration) {
|
|
|
2353
2443
|
* @throws {RequiredError}
|
|
2354
2444
|
*/
|
|
2355
2445
|
createProduct: (productCreationRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2356
|
-
const localVarPath = `/products`;
|
|
2446
|
+
const localVarPath = `/admins/products`;
|
|
2357
2447
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2358
2448
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2359
2449
|
let baseOptions;
|
|
@@ -2384,7 +2474,7 @@ const ProductApiAxiosParamCreator = function (configuration) {
|
|
|
2384
2474
|
* @throws {RequiredError}
|
|
2385
2475
|
*/
|
|
2386
2476
|
createProductRequest: (productRequestCreationRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2387
|
-
const localVarPath = `/products/requests`;
|
|
2477
|
+
const localVarPath = `/users/products/requests`;
|
|
2388
2478
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2389
2479
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2390
2480
|
let baseOptions;
|
|
@@ -2414,7 +2504,7 @@ const ProductApiAxiosParamCreator = function (configuration) {
|
|
|
2414
2504
|
* @throws {RequiredError}
|
|
2415
2505
|
*/
|
|
2416
2506
|
createUploadURL: (options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2417
|
-
const localVarPath = `/products/upload-urls`;
|
|
2507
|
+
const localVarPath = `/admins/products/upload-urls`;
|
|
2418
2508
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2419
2509
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2420
2510
|
let baseOptions;
|
|
@@ -2442,7 +2532,7 @@ const ProductApiAxiosParamCreator = function (configuration) {
|
|
|
2442
2532
|
getProductById: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2443
2533
|
// verify required parameter 'id' is not null or undefined
|
|
2444
2534
|
(0, common_1.assertParamExists)('getProductById', 'id', id);
|
|
2445
|
-
const localVarPath = `/products/{id}`
|
|
2535
|
+
const localVarPath = `/admins/products/{id}`
|
|
2446
2536
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
2447
2537
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2448
2538
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -2474,7 +2564,39 @@ const ProductApiAxiosParamCreator = function (configuration) {
|
|
|
2474
2564
|
getProductRequestById: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2475
2565
|
// verify required parameter 'id' is not null or undefined
|
|
2476
2566
|
(0, common_1.assertParamExists)('getProductRequestById', 'id', id);
|
|
2477
|
-
const localVarPath = `/products/requests/{id}`
|
|
2567
|
+
const localVarPath = `/admins/products/requests/{id}`
|
|
2568
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
2569
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2570
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2571
|
+
let baseOptions;
|
|
2572
|
+
if (configuration) {
|
|
2573
|
+
baseOptions = configuration.baseOptions;
|
|
2574
|
+
}
|
|
2575
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2576
|
+
const localVarHeaderParameter = {};
|
|
2577
|
+
const localVarQueryParameter = {};
|
|
2578
|
+
// authentication jwt required
|
|
2579
|
+
// http bearer authentication required
|
|
2580
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
2581
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2582
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2583
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2584
|
+
return {
|
|
2585
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2586
|
+
options: localVarRequestOptions,
|
|
2587
|
+
};
|
|
2588
|
+
}),
|
|
2589
|
+
/**
|
|
2590
|
+
* Get a product by id, if user is allowed to see it
|
|
2591
|
+
* @summary Get a product by id
|
|
2592
|
+
* @param {string} id The product id
|
|
2593
|
+
* @param {*} [options] Override http request option.
|
|
2594
|
+
* @throws {RequiredError}
|
|
2595
|
+
*/
|
|
2596
|
+
getUserProductById: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2597
|
+
// verify required parameter 'id' is not null or undefined
|
|
2598
|
+
(0, common_1.assertParamExists)('getUserProductById', 'id', id);
|
|
2599
|
+
const localVarPath = `/users/products/{id}`
|
|
2478
2600
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
2479
2601
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2480
2602
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -2505,7 +2627,7 @@ const ProductApiAxiosParamCreator = function (configuration) {
|
|
|
2505
2627
|
* @throws {RequiredError}
|
|
2506
2628
|
*/
|
|
2507
2629
|
listProductRequests: (status, nextToken, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2508
|
-
const localVarPath = `/products/requests`;
|
|
2630
|
+
const localVarPath = `/admins/products/requests`;
|
|
2509
2631
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2510
2632
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2511
2633
|
let baseOptions;
|
|
@@ -2548,7 +2670,7 @@ const ProductApiAxiosParamCreator = function (configuration) {
|
|
|
2548
2670
|
* @throws {RequiredError}
|
|
2549
2671
|
*/
|
|
2550
2672
|
listProducts: (kind, categoryID, search, usage, status, availability, segmentID, nextToken, ids, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2551
|
-
const localVarPath = `/products`;
|
|
2673
|
+
const localVarPath = `/admins/products`;
|
|
2552
2674
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2553
2675
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2554
2676
|
let baseOptions;
|
|
@@ -2607,7 +2729,7 @@ const ProductApiAxiosParamCreator = function (configuration) {
|
|
|
2607
2729
|
updateProduct: (id, productCreationRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2608
2730
|
// verify required parameter 'id' is not null or undefined
|
|
2609
2731
|
(0, common_1.assertParamExists)('updateProduct', 'id', id);
|
|
2610
|
-
const localVarPath = `/products/{id}`
|
|
2732
|
+
const localVarPath = `/admins/products/{id}`
|
|
2611
2733
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
2612
2734
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2613
2735
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -2655,6 +2777,19 @@ const ProductApiFp = function (configuration) {
|
|
|
2655
2777
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
2656
2778
|
});
|
|
2657
2779
|
},
|
|
2780
|
+
/**
|
|
2781
|
+
* Create multiple products
|
|
2782
|
+
* @summary Create multiple products
|
|
2783
|
+
* @param {ProductBulkCreationRequest} [productBulkCreationRequest]
|
|
2784
|
+
* @param {*} [options] Override http request option.
|
|
2785
|
+
* @throws {RequiredError}
|
|
2786
|
+
*/
|
|
2787
|
+
bulkCreateProducts(productBulkCreationRequest, options) {
|
|
2788
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2789
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.bulkCreateProducts(productBulkCreationRequest, options);
|
|
2790
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
2791
|
+
});
|
|
2792
|
+
},
|
|
2658
2793
|
/**
|
|
2659
2794
|
* Create a new product
|
|
2660
2795
|
* @summary Create a new product
|
|
@@ -2719,6 +2854,19 @@ const ProductApiFp = function (configuration) {
|
|
|
2719
2854
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
2720
2855
|
});
|
|
2721
2856
|
},
|
|
2857
|
+
/**
|
|
2858
|
+
* Get a product by id, if user is allowed to see it
|
|
2859
|
+
* @summary Get a product by id
|
|
2860
|
+
* @param {string} id The product id
|
|
2861
|
+
* @param {*} [options] Override http request option.
|
|
2862
|
+
* @throws {RequiredError}
|
|
2863
|
+
*/
|
|
2864
|
+
getUserProductById(id, options) {
|
|
2865
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2866
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserProductById(id, options);
|
|
2867
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
2868
|
+
});
|
|
2869
|
+
},
|
|
2722
2870
|
/**
|
|
2723
2871
|
* List existing product requests
|
|
2724
2872
|
* @summary List existing product requests
|
|
@@ -2789,6 +2937,16 @@ const ProductApiFactory = function (configuration, basePath, axios) {
|
|
|
2789
2937
|
approveProduct(id, productRequestApprovalRequest, options) {
|
|
2790
2938
|
return localVarFp.approveProduct(id, productRequestApprovalRequest, options).then((request) => request(axios, basePath));
|
|
2791
2939
|
},
|
|
2940
|
+
/**
|
|
2941
|
+
* Create multiple products
|
|
2942
|
+
* @summary Create multiple products
|
|
2943
|
+
* @param {ProductBulkCreationRequest} [productBulkCreationRequest]
|
|
2944
|
+
* @param {*} [options] Override http request option.
|
|
2945
|
+
* @throws {RequiredError}
|
|
2946
|
+
*/
|
|
2947
|
+
bulkCreateProducts(productBulkCreationRequest, options) {
|
|
2948
|
+
return localVarFp.bulkCreateProducts(productBulkCreationRequest, options).then((request) => request(axios, basePath));
|
|
2949
|
+
},
|
|
2792
2950
|
/**
|
|
2793
2951
|
* Create a new product
|
|
2794
2952
|
* @summary Create a new product
|
|
@@ -2838,6 +2996,16 @@ const ProductApiFactory = function (configuration, basePath, axios) {
|
|
|
2838
2996
|
getProductRequestById(id, options) {
|
|
2839
2997
|
return localVarFp.getProductRequestById(id, options).then((request) => request(axios, basePath));
|
|
2840
2998
|
},
|
|
2999
|
+
/**
|
|
3000
|
+
* Get a product by id, if user is allowed to see it
|
|
3001
|
+
* @summary Get a product by id
|
|
3002
|
+
* @param {string} id The product id
|
|
3003
|
+
* @param {*} [options] Override http request option.
|
|
3004
|
+
* @throws {RequiredError}
|
|
3005
|
+
*/
|
|
3006
|
+
getUserProductById(id, options) {
|
|
3007
|
+
return localVarFp.getUserProductById(id, options).then((request) => request(axios, basePath));
|
|
3008
|
+
},
|
|
2841
3009
|
/**
|
|
2842
3010
|
* List existing product requests
|
|
2843
3011
|
* @summary List existing product requests
|
|
@@ -2900,6 +3068,17 @@ class ProductApi extends base_1.BaseAPI {
|
|
|
2900
3068
|
approveProduct(id, productRequestApprovalRequest, options) {
|
|
2901
3069
|
return (0, exports.ProductApiFp)(this.configuration).approveProduct(id, productRequestApprovalRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2902
3070
|
}
|
|
3071
|
+
/**
|
|
3072
|
+
* Create multiple products
|
|
3073
|
+
* @summary Create multiple products
|
|
3074
|
+
* @param {ProductBulkCreationRequest} [productBulkCreationRequest]
|
|
3075
|
+
* @param {*} [options] Override http request option.
|
|
3076
|
+
* @throws {RequiredError}
|
|
3077
|
+
* @memberof ProductApi
|
|
3078
|
+
*/
|
|
3079
|
+
bulkCreateProducts(productBulkCreationRequest, options) {
|
|
3080
|
+
return (0, exports.ProductApiFp)(this.configuration).bulkCreateProducts(productBulkCreationRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3081
|
+
}
|
|
2903
3082
|
/**
|
|
2904
3083
|
* Create a new product
|
|
2905
3084
|
* @summary Create a new product
|
|
@@ -2954,6 +3133,17 @@ class ProductApi extends base_1.BaseAPI {
|
|
|
2954
3133
|
getProductRequestById(id, options) {
|
|
2955
3134
|
return (0, exports.ProductApiFp)(this.configuration).getProductRequestById(id, options).then((request) => request(this.axios, this.basePath));
|
|
2956
3135
|
}
|
|
3136
|
+
/**
|
|
3137
|
+
* Get a product by id, if user is allowed to see it
|
|
3138
|
+
* @summary Get a product by id
|
|
3139
|
+
* @param {string} id The product id
|
|
3140
|
+
* @param {*} [options] Override http request option.
|
|
3141
|
+
* @throws {RequiredError}
|
|
3142
|
+
* @memberof ProductApi
|
|
3143
|
+
*/
|
|
3144
|
+
getUserProductById(id, options) {
|
|
3145
|
+
return (0, exports.ProductApiFp)(this.configuration).getUserProductById(id, options).then((request) => request(this.axios, this.basePath));
|
|
3146
|
+
}
|
|
2957
3147
|
/**
|
|
2958
3148
|
* List existing product requests
|
|
2959
3149
|
* @summary List existing product requests
|
|
@@ -3020,7 +3210,7 @@ const ProgressApiAxiosParamCreator = function (configuration) {
|
|
|
3020
3210
|
listProgress: (id, periodID, userID, clientID, interval, nextToken, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
3021
3211
|
// verify required parameter 'id' is not null or undefined
|
|
3022
3212
|
(0, common_1.assertParamExists)('listProgress', 'id', id);
|
|
3023
|
-
const localVarPath = `/promotions/{id}/progress`
|
|
3213
|
+
const localVarPath = `/admins/promotions/{id}/progress`
|
|
3024
3214
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
3025
3215
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3026
3216
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -3057,6 +3247,46 @@ const ProgressApiAxiosParamCreator = function (configuration) {
|
|
|
3057
3247
|
options: localVarRequestOptions,
|
|
3058
3248
|
};
|
|
3059
3249
|
}),
|
|
3250
|
+
/**
|
|
3251
|
+
* List users progress of a promotion
|
|
3252
|
+
* @summary List promotion\'s progress
|
|
3253
|
+
* @param {string} id Promotion ID
|
|
3254
|
+
* @param {number} [periodID] Period ID
|
|
3255
|
+
* @param {string} [nextToken] This is the pagination token
|
|
3256
|
+
* @param {*} [options] Override http request option.
|
|
3257
|
+
* @throws {RequiredError}
|
|
3258
|
+
*/
|
|
3259
|
+
listUserProgress: (id, periodID, nextToken, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
3260
|
+
// verify required parameter 'id' is not null or undefined
|
|
3261
|
+
(0, common_1.assertParamExists)('listUserProgress', 'id', id);
|
|
3262
|
+
const localVarPath = `/users/promotions/{id}/progress`
|
|
3263
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
3264
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3265
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3266
|
+
let baseOptions;
|
|
3267
|
+
if (configuration) {
|
|
3268
|
+
baseOptions = configuration.baseOptions;
|
|
3269
|
+
}
|
|
3270
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
3271
|
+
const localVarHeaderParameter = {};
|
|
3272
|
+
const localVarQueryParameter = {};
|
|
3273
|
+
// authentication jwt required
|
|
3274
|
+
// http bearer authentication required
|
|
3275
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
3276
|
+
if (periodID !== undefined) {
|
|
3277
|
+
localVarQueryParameter['periodID'] = periodID;
|
|
3278
|
+
}
|
|
3279
|
+
if (nextToken !== undefined) {
|
|
3280
|
+
localVarQueryParameter['nextToken'] = nextToken;
|
|
3281
|
+
}
|
|
3282
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3283
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3284
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3285
|
+
return {
|
|
3286
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3287
|
+
options: localVarRequestOptions,
|
|
3288
|
+
};
|
|
3289
|
+
}),
|
|
3060
3290
|
};
|
|
3061
3291
|
};
|
|
3062
3292
|
exports.ProgressApiAxiosParamCreator = ProgressApiAxiosParamCreator;
|
|
@@ -3085,6 +3315,21 @@ const ProgressApiFp = function (configuration) {
|
|
|
3085
3315
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
3086
3316
|
});
|
|
3087
3317
|
},
|
|
3318
|
+
/**
|
|
3319
|
+
* List users progress of a promotion
|
|
3320
|
+
* @summary List promotion\'s progress
|
|
3321
|
+
* @param {string} id Promotion ID
|
|
3322
|
+
* @param {number} [periodID] Period ID
|
|
3323
|
+
* @param {string} [nextToken] This is the pagination token
|
|
3324
|
+
* @param {*} [options] Override http request option.
|
|
3325
|
+
* @throws {RequiredError}
|
|
3326
|
+
*/
|
|
3327
|
+
listUserProgress(id, periodID, nextToken, options) {
|
|
3328
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3329
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listUserProgress(id, periodID, nextToken, options);
|
|
3330
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
3331
|
+
});
|
|
3332
|
+
},
|
|
3088
3333
|
};
|
|
3089
3334
|
};
|
|
3090
3335
|
exports.ProgressApiFp = ProgressApiFp;
|
|
@@ -3110,6 +3355,18 @@ const ProgressApiFactory = function (configuration, basePath, axios) {
|
|
|
3110
3355
|
listProgress(id, periodID, userID, clientID, interval, nextToken, options) {
|
|
3111
3356
|
return localVarFp.listProgress(id, periodID, userID, clientID, interval, nextToken, options).then((request) => request(axios, basePath));
|
|
3112
3357
|
},
|
|
3358
|
+
/**
|
|
3359
|
+
* List users progress of a promotion
|
|
3360
|
+
* @summary List promotion\'s progress
|
|
3361
|
+
* @param {string} id Promotion ID
|
|
3362
|
+
* @param {number} [periodID] Period ID
|
|
3363
|
+
* @param {string} [nextToken] This is the pagination token
|
|
3364
|
+
* @param {*} [options] Override http request option.
|
|
3365
|
+
* @throws {RequiredError}
|
|
3366
|
+
*/
|
|
3367
|
+
listUserProgress(id, periodID, nextToken, options) {
|
|
3368
|
+
return localVarFp.listUserProgress(id, periodID, nextToken, options).then((request) => request(axios, basePath));
|
|
3369
|
+
},
|
|
3113
3370
|
};
|
|
3114
3371
|
};
|
|
3115
3372
|
exports.ProgressApiFactory = ProgressApiFactory;
|
|
@@ -3136,6 +3393,19 @@ class ProgressApi extends base_1.BaseAPI {
|
|
|
3136
3393
|
listProgress(id, periodID, userID, clientID, interval, nextToken, options) {
|
|
3137
3394
|
return (0, exports.ProgressApiFp)(this.configuration).listProgress(id, periodID, userID, clientID, interval, nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
3138
3395
|
}
|
|
3396
|
+
/**
|
|
3397
|
+
* List users progress of a promotion
|
|
3398
|
+
* @summary List promotion\'s progress
|
|
3399
|
+
* @param {string} id Promotion ID
|
|
3400
|
+
* @param {number} [periodID] Period ID
|
|
3401
|
+
* @param {string} [nextToken] This is the pagination token
|
|
3402
|
+
* @param {*} [options] Override http request option.
|
|
3403
|
+
* @throws {RequiredError}
|
|
3404
|
+
* @memberof ProgressApi
|
|
3405
|
+
*/
|
|
3406
|
+
listUserProgress(id, periodID, nextToken, options) {
|
|
3407
|
+
return (0, exports.ProgressApiFp)(this.configuration).listUserProgress(id, periodID, nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
3408
|
+
}
|
|
3139
3409
|
}
|
|
3140
3410
|
exports.ProgressApi = ProgressApi;
|
|
3141
3411
|
/**
|
|
@@ -3164,7 +3434,7 @@ const PromotionApiAxiosParamCreator = function (configuration) {
|
|
|
3164
3434
|
claimPromotion: (id, promotionClaimRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
3165
3435
|
// verify required parameter 'id' is not null or undefined
|
|
3166
3436
|
(0, common_1.assertParamExists)('claimPromotion', 'id', id);
|
|
3167
|
-
const localVarPath = `/promotions/{id}/claims`
|
|
3437
|
+
const localVarPath = `/admins/promotions/{id}/claims`
|
|
3168
3438
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
3169
3439
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3170
3440
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -3198,7 +3468,7 @@ const PromotionApiAxiosParamCreator = function (configuration) {
|
|
|
3198
3468
|
(0, common_1.assertParamExists)('claimPromotionProgress', 'id', id);
|
|
3199
3469
|
// verify required parameter 'progressID' is not null or undefined
|
|
3200
3470
|
(0, common_1.assertParamExists)('claimPromotionProgress', 'progressID', progressID);
|
|
3201
|
-
const localVarPath = `/
|
|
3471
|
+
const localVarPath = `/adminspromotions/{id}/progress/{progressID}/claims`
|
|
3202
3472
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
|
3203
3473
|
.replace(`{${"progressID"}}`, encodeURIComponent(String(progressID)));
|
|
3204
3474
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -3290,7 +3560,7 @@ const PromotionApiAxiosParamCreator = function (configuration) {
|
|
|
3290
3560
|
createPromotion: (promotionRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
3291
3561
|
// verify required parameter 'promotionRequest' is not null or undefined
|
|
3292
3562
|
(0, common_1.assertParamExists)('createPromotion', 'promotionRequest', promotionRequest);
|
|
3293
|
-
const localVarPath = `/promotions`;
|
|
3563
|
+
const localVarPath = `/admins/promotions`;
|
|
3294
3564
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3295
3565
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3296
3566
|
let baseOptions;
|
|
@@ -3323,7 +3593,7 @@ const PromotionApiAxiosParamCreator = function (configuration) {
|
|
|
3323
3593
|
deletePromotion: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
3324
3594
|
// verify required parameter 'id' is not null or undefined
|
|
3325
3595
|
(0, common_1.assertParamExists)('deletePromotion', 'id', id);
|
|
3326
|
-
const localVarPath = `/promotions/{id}`
|
|
3596
|
+
const localVarPath = `/admins/promotions/{id}`
|
|
3327
3597
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
3328
3598
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3329
3599
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -3355,7 +3625,39 @@ const PromotionApiAxiosParamCreator = function (configuration) {
|
|
|
3355
3625
|
getPromotion: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
3356
3626
|
// verify required parameter 'id' is not null or undefined
|
|
3357
3627
|
(0, common_1.assertParamExists)('getPromotion', 'id', id);
|
|
3358
|
-
const localVarPath = `/promotions/{id}`
|
|
3628
|
+
const localVarPath = `/admins/promotions/{id}`
|
|
3629
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
3630
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3631
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3632
|
+
let baseOptions;
|
|
3633
|
+
if (configuration) {
|
|
3634
|
+
baseOptions = configuration.baseOptions;
|
|
3635
|
+
}
|
|
3636
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
3637
|
+
const localVarHeaderParameter = {};
|
|
3638
|
+
const localVarQueryParameter = {};
|
|
3639
|
+
// authentication jwt required
|
|
3640
|
+
// http bearer authentication required
|
|
3641
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
3642
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3643
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3644
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3645
|
+
return {
|
|
3646
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3647
|
+
options: localVarRequestOptions,
|
|
3648
|
+
};
|
|
3649
|
+
}),
|
|
3650
|
+
/**
|
|
3651
|
+
* Get promotion by id, if user is allowed to see it
|
|
3652
|
+
* @summary Get promotion
|
|
3653
|
+
* @param {string} id Promotion id
|
|
3654
|
+
* @param {*} [options] Override http request option.
|
|
3655
|
+
* @throws {RequiredError}
|
|
3656
|
+
*/
|
|
3657
|
+
getUserPromotion: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
3658
|
+
// verify required parameter 'id' is not null or undefined
|
|
3659
|
+
(0, common_1.assertParamExists)('getUserPromotion', 'id', id);
|
|
3660
|
+
const localVarPath = `/users/promotions/{id}`
|
|
3359
3661
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
3360
3662
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3361
3663
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -3393,7 +3695,7 @@ const PromotionApiAxiosParamCreator = function (configuration) {
|
|
|
3393
3695
|
* @throws {RequiredError}
|
|
3394
3696
|
*/
|
|
3395
3697
|
listPromotions: (nextToken, tags, segmentId, ownerID, type, startingAfter, endingBefore, clientID, search, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
3396
|
-
const localVarPath = `/promotions`;
|
|
3698
|
+
const localVarPath = `/admins/promotions`;
|
|
3397
3699
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3398
3700
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3399
3701
|
let baseOptions;
|
|
@@ -3445,6 +3747,58 @@ const PromotionApiAxiosParamCreator = function (configuration) {
|
|
|
3445
3747
|
options: localVarRequestOptions,
|
|
3446
3748
|
};
|
|
3447
3749
|
}),
|
|
3750
|
+
/**
|
|
3751
|
+
* List users promotions
|
|
3752
|
+
* @summary List promotions
|
|
3753
|
+
* @param {string} [nextToken] This is the pagination token
|
|
3754
|
+
* @param {string} [tags] tags to filter by, format is key1=value1;key2=value2. Should be url encoded.
|
|
3755
|
+
* @param {string} [startAtAfter] start time after time
|
|
3756
|
+
* @param {string} [endAtBefore] end time before time
|
|
3757
|
+
* @param {string} [search] search by name or description
|
|
3758
|
+
* @param {*} [options] Override http request option.
|
|
3759
|
+
* @throws {RequiredError}
|
|
3760
|
+
*/
|
|
3761
|
+
listUserPromotions: (nextToken, tags, startAtAfter, endAtBefore, search, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
3762
|
+
const localVarPath = `/users/promotions`;
|
|
3763
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3764
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3765
|
+
let baseOptions;
|
|
3766
|
+
if (configuration) {
|
|
3767
|
+
baseOptions = configuration.baseOptions;
|
|
3768
|
+
}
|
|
3769
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
3770
|
+
const localVarHeaderParameter = {};
|
|
3771
|
+
const localVarQueryParameter = {};
|
|
3772
|
+
// authentication jwt required
|
|
3773
|
+
// http bearer authentication required
|
|
3774
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
3775
|
+
if (nextToken !== undefined) {
|
|
3776
|
+
localVarQueryParameter['nextToken'] = nextToken;
|
|
3777
|
+
}
|
|
3778
|
+
if (tags !== undefined) {
|
|
3779
|
+
localVarQueryParameter['tags'] = tags;
|
|
3780
|
+
}
|
|
3781
|
+
if (startAtAfter !== undefined) {
|
|
3782
|
+
localVarQueryParameter['startAtAfter'] = (startAtAfter instanceof Date) ?
|
|
3783
|
+
startAtAfter.toISOString() :
|
|
3784
|
+
startAtAfter;
|
|
3785
|
+
}
|
|
3786
|
+
if (endAtBefore !== undefined) {
|
|
3787
|
+
localVarQueryParameter['endAtBefore'] = (endAtBefore instanceof Date) ?
|
|
3788
|
+
endAtBefore.toISOString() :
|
|
3789
|
+
endAtBefore;
|
|
3790
|
+
}
|
|
3791
|
+
if (search !== undefined) {
|
|
3792
|
+
localVarQueryParameter['search'] = search;
|
|
3793
|
+
}
|
|
3794
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3795
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3796
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3797
|
+
return {
|
|
3798
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3799
|
+
options: localVarRequestOptions,
|
|
3800
|
+
};
|
|
3801
|
+
}),
|
|
3448
3802
|
/**
|
|
3449
3803
|
* Update promotion by id
|
|
3450
3804
|
* @summary Update promotion
|
|
@@ -3458,7 +3812,7 @@ const PromotionApiAxiosParamCreator = function (configuration) {
|
|
|
3458
3812
|
(0, common_1.assertParamExists)('updatePromotion', 'id', id);
|
|
3459
3813
|
// verify required parameter 'updatePromotionRequest' is not null or undefined
|
|
3460
3814
|
(0, common_1.assertParamExists)('updatePromotion', 'updatePromotionRequest', updatePromotionRequest);
|
|
3461
|
-
const localVarPath = `/promotions/{id}`
|
|
3815
|
+
const localVarPath = `/admins/promotions/{id}`
|
|
3462
3816
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
3463
3817
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3464
3818
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -3586,6 +3940,19 @@ const PromotionApiFp = function (configuration) {
|
|
|
3586
3940
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
3587
3941
|
});
|
|
3588
3942
|
},
|
|
3943
|
+
/**
|
|
3944
|
+
* Get promotion by id, if user is allowed to see it
|
|
3945
|
+
* @summary Get promotion
|
|
3946
|
+
* @param {string} id Promotion id
|
|
3947
|
+
* @param {*} [options] Override http request option.
|
|
3948
|
+
* @throws {RequiredError}
|
|
3949
|
+
*/
|
|
3950
|
+
getUserPromotion(id, options) {
|
|
3951
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3952
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserPromotion(id, options);
|
|
3953
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
3954
|
+
});
|
|
3955
|
+
},
|
|
3589
3956
|
/**
|
|
3590
3957
|
* List all promotions
|
|
3591
3958
|
* @summary List promotions
|
|
@@ -3607,6 +3974,23 @@ const PromotionApiFp = function (configuration) {
|
|
|
3607
3974
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
3608
3975
|
});
|
|
3609
3976
|
},
|
|
3977
|
+
/**
|
|
3978
|
+
* List users promotions
|
|
3979
|
+
* @summary List promotions
|
|
3980
|
+
* @param {string} [nextToken] This is the pagination token
|
|
3981
|
+
* @param {string} [tags] tags to filter by, format is key1=value1;key2=value2. Should be url encoded.
|
|
3982
|
+
* @param {string} [startAtAfter] start time after time
|
|
3983
|
+
* @param {string} [endAtBefore] end time before time
|
|
3984
|
+
* @param {string} [search] search by name or description
|
|
3985
|
+
* @param {*} [options] Override http request option.
|
|
3986
|
+
* @throws {RequiredError}
|
|
3987
|
+
*/
|
|
3988
|
+
listUserPromotions(nextToken, tags, startAtAfter, endAtBefore, search, options) {
|
|
3989
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3990
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listUserPromotions(nextToken, tags, startAtAfter, endAtBefore, search, options);
|
|
3991
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
3992
|
+
});
|
|
3993
|
+
},
|
|
3610
3994
|
/**
|
|
3611
3995
|
* Update promotion by id
|
|
3612
3996
|
* @summary Update promotion
|
|
@@ -3704,6 +4088,16 @@ const PromotionApiFactory = function (configuration, basePath, axios) {
|
|
|
3704
4088
|
getPromotion(id, options) {
|
|
3705
4089
|
return localVarFp.getPromotion(id, options).then((request) => request(axios, basePath));
|
|
3706
4090
|
},
|
|
4091
|
+
/**
|
|
4092
|
+
* Get promotion by id, if user is allowed to see it
|
|
4093
|
+
* @summary Get promotion
|
|
4094
|
+
* @param {string} id Promotion id
|
|
4095
|
+
* @param {*} [options] Override http request option.
|
|
4096
|
+
* @throws {RequiredError}
|
|
4097
|
+
*/
|
|
4098
|
+
getUserPromotion(id, options) {
|
|
4099
|
+
return localVarFp.getUserPromotion(id, options).then((request) => request(axios, basePath));
|
|
4100
|
+
},
|
|
3707
4101
|
/**
|
|
3708
4102
|
* List all promotions
|
|
3709
4103
|
* @summary List promotions
|
|
@@ -3722,6 +4116,20 @@ const PromotionApiFactory = function (configuration, basePath, axios) {
|
|
|
3722
4116
|
listPromotions(nextToken, tags, segmentId, ownerID, type, startingAfter, endingBefore, clientID, search, options) {
|
|
3723
4117
|
return localVarFp.listPromotions(nextToken, tags, segmentId, ownerID, type, startingAfter, endingBefore, clientID, search, options).then((request) => request(axios, basePath));
|
|
3724
4118
|
},
|
|
4119
|
+
/**
|
|
4120
|
+
* List users promotions
|
|
4121
|
+
* @summary List promotions
|
|
4122
|
+
* @param {string} [nextToken] This is the pagination token
|
|
4123
|
+
* @param {string} [tags] tags to filter by, format is key1=value1;key2=value2. Should be url encoded.
|
|
4124
|
+
* @param {string} [startAtAfter] start time after time
|
|
4125
|
+
* @param {string} [endAtBefore] end time before time
|
|
4126
|
+
* @param {string} [search] search by name or description
|
|
4127
|
+
* @param {*} [options] Override http request option.
|
|
4128
|
+
* @throws {RequiredError}
|
|
4129
|
+
*/
|
|
4130
|
+
listUserPromotions(nextToken, tags, startAtAfter, endAtBefore, search, options) {
|
|
4131
|
+
return localVarFp.listUserPromotions(nextToken, tags, startAtAfter, endAtBefore, search, options).then((request) => request(axios, basePath));
|
|
4132
|
+
},
|
|
3725
4133
|
/**
|
|
3726
4134
|
* Update promotion by id
|
|
3727
4135
|
* @summary Update promotion
|
|
@@ -3823,6 +4231,17 @@ class PromotionApi extends base_1.BaseAPI {
|
|
|
3823
4231
|
getPromotion(id, options) {
|
|
3824
4232
|
return (0, exports.PromotionApiFp)(this.configuration).getPromotion(id, options).then((request) => request(this.axios, this.basePath));
|
|
3825
4233
|
}
|
|
4234
|
+
/**
|
|
4235
|
+
* Get promotion by id, if user is allowed to see it
|
|
4236
|
+
* @summary Get promotion
|
|
4237
|
+
* @param {string} id Promotion id
|
|
4238
|
+
* @param {*} [options] Override http request option.
|
|
4239
|
+
* @throws {RequiredError}
|
|
4240
|
+
* @memberof PromotionApi
|
|
4241
|
+
*/
|
|
4242
|
+
getUserPromotion(id, options) {
|
|
4243
|
+
return (0, exports.PromotionApiFp)(this.configuration).getUserPromotion(id, options).then((request) => request(this.axios, this.basePath));
|
|
4244
|
+
}
|
|
3826
4245
|
/**
|
|
3827
4246
|
* List all promotions
|
|
3828
4247
|
* @summary List promotions
|
|
@@ -3842,6 +4261,21 @@ class PromotionApi extends base_1.BaseAPI {
|
|
|
3842
4261
|
listPromotions(nextToken, tags, segmentId, ownerID, type, startingAfter, endingBefore, clientID, search, options) {
|
|
3843
4262
|
return (0, exports.PromotionApiFp)(this.configuration).listPromotions(nextToken, tags, segmentId, ownerID, type, startingAfter, endingBefore, clientID, search, options).then((request) => request(this.axios, this.basePath));
|
|
3844
4263
|
}
|
|
4264
|
+
/**
|
|
4265
|
+
* List users promotions
|
|
4266
|
+
* @summary List promotions
|
|
4267
|
+
* @param {string} [nextToken] This is the pagination token
|
|
4268
|
+
* @param {string} [tags] tags to filter by, format is key1=value1;key2=value2. Should be url encoded.
|
|
4269
|
+
* @param {string} [startAtAfter] start time after time
|
|
4270
|
+
* @param {string} [endAtBefore] end time before time
|
|
4271
|
+
* @param {string} [search] search by name or description
|
|
4272
|
+
* @param {*} [options] Override http request option.
|
|
4273
|
+
* @throws {RequiredError}
|
|
4274
|
+
* @memberof PromotionApi
|
|
4275
|
+
*/
|
|
4276
|
+
listUserPromotions(nextToken, tags, startAtAfter, endAtBefore, search, options) {
|
|
4277
|
+
return (0, exports.PromotionApiFp)(this.configuration).listUserPromotions(nextToken, tags, startAtAfter, endAtBefore, search, options).then((request) => request(this.axios, this.basePath));
|
|
4278
|
+
}
|
|
3845
4279
|
/**
|
|
3846
4280
|
* Update promotion by id
|
|
3847
4281
|
* @summary Update promotion
|
|
@@ -3856,6 +4290,117 @@ class PromotionApi extends base_1.BaseAPI {
|
|
|
3856
4290
|
}
|
|
3857
4291
|
}
|
|
3858
4292
|
exports.PromotionApi = PromotionApi;
|
|
4293
|
+
/**
|
|
4294
|
+
* RewardApi - axios parameter creator
|
|
4295
|
+
* @export
|
|
4296
|
+
*/
|
|
4297
|
+
const RewardApiAxiosParamCreator = function (configuration) {
|
|
4298
|
+
return {
|
|
4299
|
+
/**
|
|
4300
|
+
* List existing products for the user
|
|
4301
|
+
* @summary List existing products
|
|
4302
|
+
* @param {ProductKind} [kind] The product kind
|
|
4303
|
+
* @param {string} [nextToken] This is the pagination token
|
|
4304
|
+
* @param {*} [options] Override http request option.
|
|
4305
|
+
* @throws {RequiredError}
|
|
4306
|
+
*/
|
|
4307
|
+
listUserProducts: (kind, nextToken, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
4308
|
+
const localVarPath = `/users/products`;
|
|
4309
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4310
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
4311
|
+
let baseOptions;
|
|
4312
|
+
if (configuration) {
|
|
4313
|
+
baseOptions = configuration.baseOptions;
|
|
4314
|
+
}
|
|
4315
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
4316
|
+
const localVarHeaderParameter = {};
|
|
4317
|
+
const localVarQueryParameter = {};
|
|
4318
|
+
// authentication jwt required
|
|
4319
|
+
// http bearer authentication required
|
|
4320
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
4321
|
+
if (kind !== undefined) {
|
|
4322
|
+
localVarQueryParameter['kind'] = kind;
|
|
4323
|
+
}
|
|
4324
|
+
if (nextToken !== undefined) {
|
|
4325
|
+
localVarQueryParameter['nextToken'] = nextToken;
|
|
4326
|
+
}
|
|
4327
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
4328
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4329
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4330
|
+
return {
|
|
4331
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
4332
|
+
options: localVarRequestOptions,
|
|
4333
|
+
};
|
|
4334
|
+
}),
|
|
4335
|
+
};
|
|
4336
|
+
};
|
|
4337
|
+
exports.RewardApiAxiosParamCreator = RewardApiAxiosParamCreator;
|
|
4338
|
+
/**
|
|
4339
|
+
* RewardApi - functional programming interface
|
|
4340
|
+
* @export
|
|
4341
|
+
*/
|
|
4342
|
+
const RewardApiFp = function (configuration) {
|
|
4343
|
+
const localVarAxiosParamCreator = (0, exports.RewardApiAxiosParamCreator)(configuration);
|
|
4344
|
+
return {
|
|
4345
|
+
/**
|
|
4346
|
+
* List existing products for the user
|
|
4347
|
+
* @summary List existing products
|
|
4348
|
+
* @param {ProductKind} [kind] The product kind
|
|
4349
|
+
* @param {string} [nextToken] This is the pagination token
|
|
4350
|
+
* @param {*} [options] Override http request option.
|
|
4351
|
+
* @throws {RequiredError}
|
|
4352
|
+
*/
|
|
4353
|
+
listUserProducts(kind, nextToken, options) {
|
|
4354
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4355
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listUserProducts(kind, nextToken, options);
|
|
4356
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
4357
|
+
});
|
|
4358
|
+
},
|
|
4359
|
+
};
|
|
4360
|
+
};
|
|
4361
|
+
exports.RewardApiFp = RewardApiFp;
|
|
4362
|
+
/**
|
|
4363
|
+
* RewardApi - factory interface
|
|
4364
|
+
* @export
|
|
4365
|
+
*/
|
|
4366
|
+
const RewardApiFactory = function (configuration, basePath, axios) {
|
|
4367
|
+
const localVarFp = (0, exports.RewardApiFp)(configuration);
|
|
4368
|
+
return {
|
|
4369
|
+
/**
|
|
4370
|
+
* List existing products for the user
|
|
4371
|
+
* @summary List existing products
|
|
4372
|
+
* @param {ProductKind} [kind] The product kind
|
|
4373
|
+
* @param {string} [nextToken] This is the pagination token
|
|
4374
|
+
* @param {*} [options] Override http request option.
|
|
4375
|
+
* @throws {RequiredError}
|
|
4376
|
+
*/
|
|
4377
|
+
listUserProducts(kind, nextToken, options) {
|
|
4378
|
+
return localVarFp.listUserProducts(kind, nextToken, options).then((request) => request(axios, basePath));
|
|
4379
|
+
},
|
|
4380
|
+
};
|
|
4381
|
+
};
|
|
4382
|
+
exports.RewardApiFactory = RewardApiFactory;
|
|
4383
|
+
/**
|
|
4384
|
+
* RewardApi - object-oriented interface
|
|
4385
|
+
* @export
|
|
4386
|
+
* @class RewardApi
|
|
4387
|
+
* @extends {BaseAPI}
|
|
4388
|
+
*/
|
|
4389
|
+
class RewardApi extends base_1.BaseAPI {
|
|
4390
|
+
/**
|
|
4391
|
+
* List existing products for the user
|
|
4392
|
+
* @summary List existing products
|
|
4393
|
+
* @param {ProductKind} [kind] The product kind
|
|
4394
|
+
* @param {string} [nextToken] This is the pagination token
|
|
4395
|
+
* @param {*} [options] Override http request option.
|
|
4396
|
+
* @throws {RequiredError}
|
|
4397
|
+
* @memberof RewardApi
|
|
4398
|
+
*/
|
|
4399
|
+
listUserProducts(kind, nextToken, options) {
|
|
4400
|
+
return (0, exports.RewardApiFp)(this.configuration).listUserProducts(kind, nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
4401
|
+
}
|
|
4402
|
+
}
|
|
4403
|
+
exports.RewardApi = RewardApi;
|
|
3859
4404
|
/**
|
|
3860
4405
|
* SegmentApi - axios parameter creator
|
|
3861
4406
|
* @export
|
|
@@ -3870,7 +4415,7 @@ const SegmentApiAxiosParamCreator = function (configuration) {
|
|
|
3870
4415
|
* @throws {RequiredError}
|
|
3871
4416
|
*/
|
|
3872
4417
|
createSegment: (createSegmentRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
3873
|
-
const localVarPath = `/segments`;
|
|
4418
|
+
const localVarPath = `/admins/segments`;
|
|
3874
4419
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3875
4420
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3876
4421
|
let baseOptions;
|
|
@@ -3903,7 +4448,7 @@ const SegmentApiAxiosParamCreator = function (configuration) {
|
|
|
3903
4448
|
getSegmentById: (segmentId, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
3904
4449
|
// verify required parameter 'segmentId' is not null or undefined
|
|
3905
4450
|
(0, common_1.assertParamExists)('getSegmentById', 'segmentId', segmentId);
|
|
3906
|
-
const localVarPath = `/segments/{segmentId}`
|
|
4451
|
+
const localVarPath = `/admins/segments/{segmentId}`
|
|
3907
4452
|
.replace(`{${"segmentId"}}`, encodeURIComponent(String(segmentId)));
|
|
3908
4453
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3909
4454
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -3934,7 +4479,7 @@ const SegmentApiAxiosParamCreator = function (configuration) {
|
|
|
3934
4479
|
* @throws {RequiredError}
|
|
3935
4480
|
*/
|
|
3936
4481
|
listSegments: (nextToken, search, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
3937
|
-
const localVarPath = `/segments`;
|
|
4482
|
+
const localVarPath = `/admins/segments`;
|
|
3938
4483
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3939
4484
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3940
4485
|
let baseOptions;
|
|
@@ -4112,7 +4657,7 @@ const TagApiAxiosParamCreator = function (configuration) {
|
|
|
4112
4657
|
* @throws {RequiredError}
|
|
4113
4658
|
*/
|
|
4114
4659
|
createTag: (createTagRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
4115
|
-
const localVarPath = `/tags`;
|
|
4660
|
+
const localVarPath = `/admins/tags`;
|
|
4116
4661
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4117
4662
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
4118
4663
|
let baseOptions;
|
|
@@ -4145,7 +4690,7 @@ const TagApiAxiosParamCreator = function (configuration) {
|
|
|
4145
4690
|
deleteTag: (key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
4146
4691
|
// verify required parameter 'key' is not null or undefined
|
|
4147
4692
|
(0, common_1.assertParamExists)('deleteTag', 'key', key);
|
|
4148
|
-
const localVarPath = `/tags/{key}`
|
|
4693
|
+
const localVarPath = `/admins/tags/{key}`
|
|
4149
4694
|
.replace(`{${"key"}}`, encodeURIComponent(String(key)));
|
|
4150
4695
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4151
4696
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -4177,7 +4722,7 @@ const TagApiAxiosParamCreator = function (configuration) {
|
|
|
4177
4722
|
getTagByKey: (key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
4178
4723
|
// verify required parameter 'key' is not null or undefined
|
|
4179
4724
|
(0, common_1.assertParamExists)('getTagByKey', 'key', key);
|
|
4180
|
-
const localVarPath = `/tags/{key}`
|
|
4725
|
+
const localVarPath = `/admins/tags/{key}`
|
|
4181
4726
|
.replace(`{${"key"}}`, encodeURIComponent(String(key)));
|
|
4182
4727
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4183
4728
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -4207,7 +4752,7 @@ const TagApiAxiosParamCreator = function (configuration) {
|
|
|
4207
4752
|
* @throws {RequiredError}
|
|
4208
4753
|
*/
|
|
4209
4754
|
listTags: (tagKey, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
4210
|
-
const localVarPath = `/tags`;
|
|
4755
|
+
const localVarPath = `/admins/tags`;
|
|
4211
4756
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4212
4757
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
4213
4758
|
let baseOptions;
|
|
@@ -4242,7 +4787,7 @@ const TagApiAxiosParamCreator = function (configuration) {
|
|
|
4242
4787
|
updateTag: (key, createTagRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
4243
4788
|
// verify required parameter 'key' is not null or undefined
|
|
4244
4789
|
(0, common_1.assertParamExists)('updateTag', 'key', key);
|
|
4245
|
-
const localVarPath = `/tags/{key}`
|
|
4790
|
+
const localVarPath = `/admins/tags/{key}`
|
|
4246
4791
|
.replace(`{${"key"}}`, encodeURIComponent(String(key)));
|
|
4247
4792
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4248
4793
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -4486,7 +5031,7 @@ const TransactionApiAxiosParamCreator = function (configuration) {
|
|
|
4486
5031
|
* @throws {RequiredError}
|
|
4487
5032
|
*/
|
|
4488
5033
|
listTransactions: (paginationToken, clientID, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
4489
|
-
const localVarPath = `/transactions`;
|
|
5034
|
+
const localVarPath = `/admins/transactions`;
|
|
4490
5035
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4491
5036
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
4492
5037
|
let baseOptions;
|
|
@@ -4598,7 +5143,7 @@ const UserApiAxiosParamCreator = function (configuration) {
|
|
|
4598
5143
|
getUserByID: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
4599
5144
|
// verify required parameter 'id' is not null or undefined
|
|
4600
5145
|
(0, common_1.assertParamExists)('getUserByID', 'id', id);
|
|
4601
|
-
const localVarPath = `/users/{id}`
|
|
5146
|
+
const localVarPath = `/admins/users/{id}`
|
|
4602
5147
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
4603
5148
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4604
5149
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -4630,7 +5175,7 @@ const UserApiAxiosParamCreator = function (configuration) {
|
|
|
4630
5175
|
getUserSubordinates: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
4631
5176
|
// verify required parameter 'id' is not null or undefined
|
|
4632
5177
|
(0, common_1.assertParamExists)('getUserSubordinates', 'id', id);
|
|
4633
|
-
const localVarPath = `/
|
|
5178
|
+
const localVarPath = `/admins/users/{id}/team`
|
|
4634
5179
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
4635
5180
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4636
5181
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -4665,7 +5210,7 @@ const UserApiAxiosParamCreator = function (configuration) {
|
|
|
4665
5210
|
* @throws {RequiredError}
|
|
4666
5211
|
*/
|
|
4667
5212
|
listUsers: (nextToken, role, search, clientID, userIds, source, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
4668
|
-
const localVarPath = `/users`;
|
|
5213
|
+
const localVarPath = `/admins/users`;
|
|
4669
5214
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4670
5215
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
4671
5216
|
let baseOptions;
|