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/dist/esm/api.js CHANGED
@@ -294,7 +294,7 @@ export const AuditApiAxiosParamCreator = function (configuration) {
294
294
  assertParamExists('listAuditLogs', 'objectType', objectType);
295
295
  // verify required parameter 'objectID' is not null or undefined
296
296
  assertParamExists('listAuditLogs', 'objectID', objectID);
297
- const localVarPath = `/audit/{objectType}/{objectID}`
297
+ const localVarPath = `/admins/audit/{objectType}/{objectID}`
298
298
  .replace(`{${"objectType"}}`, encodeURIComponent(String(objectType)))
299
299
  .replace(`{${"objectID"}}`, encodeURIComponent(String(objectID)));
300
300
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -328,7 +328,7 @@ export const AuditApiAxiosParamCreator = function (configuration) {
328
328
  listUserAuditLogs: (userID, nextToken, options = {}) => __awaiter(this, void 0, void 0, function* () {
329
329
  // verify required parameter 'userID' is not null or undefined
330
330
  assertParamExists('listUserAuditLogs', 'userID', userID);
331
- const localVarPath = `/audit/user/{userID}`
331
+ const localVarPath = `/admins/audit/user/{userID}`
332
332
  .replace(`{${"userID"}}`, encodeURIComponent(String(userID)));
333
333
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
334
334
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -474,7 +474,7 @@ export const BalanceApiAxiosParamCreator = function (configuration) {
474
474
  assertParamExists('getBalance', 'beneficiaryValue', beneficiaryValue);
475
475
  // verify required parameter 'kind' is not null or undefined
476
476
  assertParamExists('getBalance', 'kind', kind);
477
- const localVarPath = `/balances`;
477
+ const localVarPath = `/admins/balances`;
478
478
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
479
479
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
480
480
  let baseOptions;
@@ -501,6 +501,34 @@ export const BalanceApiAxiosParamCreator = function (configuration) {
501
501
  options: localVarRequestOptions,
502
502
  };
503
503
  }),
504
+ /**
505
+ * Get balance for the user
506
+ * @summary Get balance
507
+ * @param {*} [options] Override http request option.
508
+ * @throws {RequiredError}
509
+ */
510
+ getUserBalance: (options = {}) => __awaiter(this, void 0, void 0, function* () {
511
+ const localVarPath = `/users/balances`;
512
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
513
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
514
+ let baseOptions;
515
+ if (configuration) {
516
+ baseOptions = configuration.baseOptions;
517
+ }
518
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
519
+ const localVarHeaderParameter = {};
520
+ const localVarQueryParameter = {};
521
+ // authentication jwt required
522
+ // http bearer authentication required
523
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
524
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
525
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
526
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
527
+ return {
528
+ url: toPathString(localVarUrlObj),
529
+ options: localVarRequestOptions,
530
+ };
531
+ }),
504
532
  /**
505
533
  * Transfer balance
506
534
  * @summary Transfer balance
@@ -512,7 +540,7 @@ export const BalanceApiAxiosParamCreator = function (configuration) {
512
540
  transferBalance: (beneficiaryValue, balanceUpdateRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
513
541
  // verify required parameter 'beneficiaryValue' is not null or undefined
514
542
  assertParamExists('transferBalance', 'beneficiaryValue', beneficiaryValue);
515
- const localVarPath = `/balances/{beneficiaryValue}/transfer`
543
+ const localVarPath = `/admins/balances/{beneficiaryValue}/transfer`
516
544
  .replace(`{${"beneficiaryValue"}}`, encodeURIComponent(String(beneficiaryValue)));
517
545
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
518
546
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -544,7 +572,7 @@ export const BalanceApiAxiosParamCreator = function (configuration) {
544
572
  updateBalance: (beneficiaryValue, balanceUpdateRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
545
573
  // verify required parameter 'beneficiaryValue' is not null or undefined
546
574
  assertParamExists('updateBalance', 'beneficiaryValue', beneficiaryValue);
547
- const localVarPath = `/balances/{beneficiaryValue}`
575
+ const localVarPath = `/admins/balances/{beneficiaryValue}`
548
576
  .replace(`{${"beneficiaryValue"}}`, encodeURIComponent(String(beneficiaryValue)));
549
577
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
550
578
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -588,6 +616,18 @@ export const BalanceApiFp = function (configuration) {
588
616
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
589
617
  });
590
618
  },
619
+ /**
620
+ * Get balance for the user
621
+ * @summary Get balance
622
+ * @param {*} [options] Override http request option.
623
+ * @throws {RequiredError}
624
+ */
625
+ getUserBalance(options) {
626
+ return __awaiter(this, void 0, void 0, function* () {
627
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserBalance(options);
628
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
629
+ });
630
+ },
591
631
  /**
592
632
  * Transfer balance
593
633
  * @summary Transfer balance
@@ -636,6 +676,15 @@ export const BalanceApiFactory = function (configuration, basePath, axios) {
636
676
  getBalance(beneficiaryValue, kind, options) {
637
677
  return localVarFp.getBalance(beneficiaryValue, kind, options).then((request) => request(axios, basePath));
638
678
  },
679
+ /**
680
+ * Get balance for the user
681
+ * @summary Get balance
682
+ * @param {*} [options] Override http request option.
683
+ * @throws {RequiredError}
684
+ */
685
+ getUserBalance(options) {
686
+ return localVarFp.getUserBalance(options).then((request) => request(axios, basePath));
687
+ },
639
688
  /**
640
689
  * Transfer balance
641
690
  * @summary Transfer balance
@@ -679,6 +728,16 @@ export class BalanceApi extends BaseAPI {
679
728
  getBalance(beneficiaryValue, kind, options) {
680
729
  return BalanceApiFp(this.configuration).getBalance(beneficiaryValue, kind, options).then((request) => request(this.axios, this.basePath));
681
730
  }
731
+ /**
732
+ * Get balance for the user
733
+ * @summary Get balance
734
+ * @param {*} [options] Override http request option.
735
+ * @throws {RequiredError}
736
+ * @memberof BalanceApi
737
+ */
738
+ getUserBalance(options) {
739
+ return BalanceApiFp(this.configuration).getUserBalance(options).then((request) => request(this.axios, this.basePath));
740
+ }
682
741
  /**
683
742
  * Transfer balance
684
743
  * @summary Transfer balance
@@ -813,7 +872,7 @@ export const ClientApiAxiosParamCreator = function (configuration) {
813
872
  createClient: (clientCreationRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
814
873
  // verify required parameter 'clientCreationRequest' is not null or undefined
815
874
  assertParamExists('createClient', 'clientCreationRequest', clientCreationRequest);
816
- const localVarPath = `/clients`;
875
+ const localVarPath = `/admins/clients`;
817
876
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
818
877
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
819
878
  let baseOptions;
@@ -846,7 +905,7 @@ export const ClientApiAxiosParamCreator = function (configuration) {
846
905
  getClient: (clientID, options = {}) => __awaiter(this, void 0, void 0, function* () {
847
906
  // verify required parameter 'clientID' is not null or undefined
848
907
  assertParamExists('getClient', 'clientID', clientID);
849
- const localVarPath = `/clients/{clientID}`
908
+ const localVarPath = `/admins/clients/{clientID}`
850
909
  .replace(`{${"clientID"}}`, encodeURIComponent(String(clientID)));
851
910
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
852
911
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -877,7 +936,7 @@ export const ClientApiAxiosParamCreator = function (configuration) {
877
936
  * @throws {RequiredError}
878
937
  */
879
938
  listClients: (nextToken, search, options = {}) => __awaiter(this, void 0, void 0, function* () {
880
- const localVarPath = `/clients`;
939
+ const localVarPath = `/admins/clients`;
881
940
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
882
941
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
883
942
  let baseOptions;
@@ -1053,7 +1112,7 @@ export const ConfigurationApiAxiosParamCreator = function (configuration) {
1053
1112
  createConfiguration: (backofficeConfig, options = {}) => __awaiter(this, void 0, void 0, function* () {
1054
1113
  // verify required parameter 'backofficeConfig' is not null or undefined
1055
1114
  assertParamExists('createConfiguration', 'backofficeConfig', backofficeConfig);
1056
- const localVarPath = `/configurations`;
1115
+ const localVarPath = `/admins/configurations`;
1057
1116
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1058
1117
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1059
1118
  let baseOptions;
@@ -1085,7 +1144,7 @@ export const ConfigurationApiAxiosParamCreator = function (configuration) {
1085
1144
  * @throws {RequiredError}
1086
1145
  */
1087
1146
  listConfigurations: (nextToken, search, options = {}) => __awaiter(this, void 0, void 0, function* () {
1088
- const localVarPath = `/configurations`;
1147
+ const localVarPath = `/admins/configurations`;
1089
1148
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1090
1149
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1091
1150
  let baseOptions;
@@ -1227,7 +1286,7 @@ export const CustomDealsApiAxiosParamCreator = function (configuration) {
1227
1286
  createCustomDealRestrictions: (customDealRestrictionRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
1228
1287
  // verify required parameter 'customDealRestrictionRequest' is not null or undefined
1229
1288
  assertParamExists('createCustomDealRestrictions', 'customDealRestrictionRequest', customDealRestrictionRequest);
1230
- const localVarPath = `/custom-deals/restrictions`;
1289
+ const localVarPath = `/admins/custom-deals/restrictions`;
1231
1290
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1232
1291
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1233
1292
  let baseOptions;
@@ -1254,7 +1313,7 @@ export const CustomDealsApiAxiosParamCreator = function (configuration) {
1254
1313
  * @throws {RequiredError}
1255
1314
  */
1256
1315
  listCustomDealRestrictions: (options = {}) => __awaiter(this, void 0, void 0, function* () {
1257
- const localVarPath = `/custom-deals/restrictions`;
1316
+ const localVarPath = `/admins/custom-deals/restrictions`;
1258
1317
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1259
1318
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1260
1319
  let baseOptions;
@@ -1378,7 +1437,7 @@ export const DefaultApiAxiosParamCreator = function (configuration) {
1378
1437
  * @throws {RequiredError}
1379
1438
  */
1380
1439
  generateApiKey: (options = {}) => __awaiter(this, void 0, void 0, function* () {
1381
- const localVarPath = `/integrations/apikey`;
1440
+ const localVarPath = `/admins/integrations/apikey`;
1382
1441
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1383
1442
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1384
1443
  let baseOptions;
@@ -1409,7 +1468,7 @@ export const DefaultApiAxiosParamCreator = function (configuration) {
1409
1468
  importEvent: (eventCreationRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
1410
1469
  // verify required parameter 'eventCreationRequest' is not null or undefined
1411
1470
  assertParamExists('importEvent', 'eventCreationRequest', eventCreationRequest);
1412
- const localVarPath = `/events`;
1471
+ const localVarPath = `/admins/events`;
1413
1472
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1414
1473
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1415
1474
  let baseOptions;
@@ -1439,7 +1498,7 @@ export const DefaultApiAxiosParamCreator = function (configuration) {
1439
1498
  * @throws {RequiredError}
1440
1499
  */
1441
1500
  listWebhooks: (options = {}) => __awaiter(this, void 0, void 0, function* () {
1442
- const localVarPath = `/integrations/webhooks`;
1501
+ const localVarPath = `/admins/integrations/webhooks`;
1443
1502
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1444
1503
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1445
1504
  let baseOptions;
@@ -1470,7 +1529,7 @@ export const DefaultApiAxiosParamCreator = function (configuration) {
1470
1529
  setWebhook: (webhook, options = {}) => __awaiter(this, void 0, void 0, function* () {
1471
1530
  // verify required parameter 'webhook' is not null or undefined
1472
1531
  assertParamExists('setWebhook', 'webhook', webhook);
1473
- const localVarPath = `/integrations/webhooks`;
1532
+ const localVarPath = `/admins/integrations/webhooks`;
1474
1533
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1475
1534
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1476
1535
  let baseOptions;
@@ -1500,7 +1559,7 @@ export const DefaultApiAxiosParamCreator = function (configuration) {
1500
1559
  * @throws {RequiredError}
1501
1560
  */
1502
1561
  testApiKey: (options = {}) => __awaiter(this, void 0, void 0, function* () {
1503
- const localVarPath = `/integrations/apikey`;
1562
+ const localVarPath = `/admins/integrations/apikey`;
1504
1563
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1505
1564
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1506
1565
  let baseOptions;
@@ -1725,7 +1784,7 @@ export const NotificationApiAxiosParamCreator = function (configuration) {
1725
1784
  bulkMarkNotificationAsRead: (bulkNotificationsReadRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
1726
1785
  // verify required parameter 'bulkNotificationsReadRequest' is not null or undefined
1727
1786
  assertParamExists('bulkMarkNotificationAsRead', 'bulkNotificationsReadRequest', bulkNotificationsReadRequest);
1728
- const localVarPath = `/notifications/read`;
1787
+ const localVarPath = `/users/notifications/read`;
1729
1788
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1730
1789
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1731
1790
  let baseOptions;
@@ -1755,7 +1814,7 @@ export const NotificationApiAxiosParamCreator = function (configuration) {
1755
1814
  getNotification: (notificationID, options = {}) => __awaiter(this, void 0, void 0, function* () {
1756
1815
  // verify required parameter 'notificationID' is not null or undefined
1757
1816
  assertParamExists('getNotification', 'notificationID', notificationID);
1758
- const localVarPath = `/notifications/{notificationID}`
1817
+ const localVarPath = `/users/notifications/{notificationID}`
1759
1818
  .replace(`{${"notificationID"}}`, encodeURIComponent(String(notificationID)));
1760
1819
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1761
1820
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -1783,7 +1842,7 @@ export const NotificationApiAxiosParamCreator = function (configuration) {
1783
1842
  * @throws {RequiredError}
1784
1843
  */
1785
1844
  listNotifications: (nextToken, status, options = {}) => __awaiter(this, void 0, void 0, function* () {
1786
- const localVarPath = `/notifications`;
1845
+ const localVarPath = `/users/notifications`;
1787
1846
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1788
1847
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1789
1848
  let baseOptions;
@@ -1817,7 +1876,7 @@ export const NotificationApiAxiosParamCreator = function (configuration) {
1817
1876
  markNotificationAsRead: (notificationID, options = {}) => __awaiter(this, void 0, void 0, function* () {
1818
1877
  // verify required parameter 'notificationID' is not null or undefined
1819
1878
  assertParamExists('markNotificationAsRead', 'notificationID', notificationID);
1820
- const localVarPath = `/notifications/{notificationID}`
1879
+ const localVarPath = `/users/notifications/{notificationID}`
1821
1880
  .replace(`{${"notificationID"}}`, encodeURIComponent(String(notificationID)));
1822
1881
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1823
1882
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -2047,7 +2106,7 @@ export const OrderApiAxiosParamCreator = function (configuration) {
2047
2106
  getOrder: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
2048
2107
  // verify required parameter 'id' is not null or undefined
2049
2108
  assertParamExists('getOrder', 'id', id);
2050
- const localVarPath = `/orders/{id}`
2109
+ const localVarPath = `/users/orders/{id}`
2051
2110
  .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2052
2111
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2053
2112
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -2281,7 +2340,7 @@ export const ProductApiAxiosParamCreator = function (configuration) {
2281
2340
  approveProduct: (id, productRequestApprovalRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
2282
2341
  // verify required parameter 'id' is not null or undefined
2283
2342
  assertParamExists('approveProduct', 'id', id);
2284
- const localVarPath = `/products/requests/{id}`
2343
+ const localVarPath = `/admins/products/requests/{id}`
2285
2344
  .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2286
2345
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2287
2346
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -2305,6 +2364,37 @@ export const ProductApiAxiosParamCreator = function (configuration) {
2305
2364
  options: localVarRequestOptions,
2306
2365
  };
2307
2366
  }),
2367
+ /**
2368
+ * Create multiple products
2369
+ * @summary Create multiple products
2370
+ * @param {ProductBulkCreationRequest} [productBulkCreationRequest]
2371
+ * @param {*} [options] Override http request option.
2372
+ * @throws {RequiredError}
2373
+ */
2374
+ bulkCreateProducts: (productBulkCreationRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
2375
+ const localVarPath = `/admins/products/bulk`;
2376
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2377
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2378
+ let baseOptions;
2379
+ if (configuration) {
2380
+ baseOptions = configuration.baseOptions;
2381
+ }
2382
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2383
+ const localVarHeaderParameter = {};
2384
+ const localVarQueryParameter = {};
2385
+ // authentication jwt required
2386
+ // http bearer authentication required
2387
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2388
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2389
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2390
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2391
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2392
+ localVarRequestOptions.data = serializeDataIfNeeded(productBulkCreationRequest, localVarRequestOptions, configuration);
2393
+ return {
2394
+ url: toPathString(localVarUrlObj),
2395
+ options: localVarRequestOptions,
2396
+ };
2397
+ }),
2308
2398
  /**
2309
2399
  * Create a new product
2310
2400
  * @summary Create a new product
@@ -2313,7 +2403,7 @@ export const ProductApiAxiosParamCreator = function (configuration) {
2313
2403
  * @throws {RequiredError}
2314
2404
  */
2315
2405
  createProduct: (productCreationRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
2316
- const localVarPath = `/products`;
2406
+ const localVarPath = `/admins/products`;
2317
2407
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2318
2408
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2319
2409
  let baseOptions;
@@ -2344,7 +2434,7 @@ export const ProductApiAxiosParamCreator = function (configuration) {
2344
2434
  * @throws {RequiredError}
2345
2435
  */
2346
2436
  createProductRequest: (productRequestCreationRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
2347
- const localVarPath = `/products/requests`;
2437
+ const localVarPath = `/users/products/requests`;
2348
2438
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2349
2439
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2350
2440
  let baseOptions;
@@ -2374,7 +2464,7 @@ export const ProductApiAxiosParamCreator = function (configuration) {
2374
2464
  * @throws {RequiredError}
2375
2465
  */
2376
2466
  createUploadURL: (options = {}) => __awaiter(this, void 0, void 0, function* () {
2377
- const localVarPath = `/products/upload-urls`;
2467
+ const localVarPath = `/admins/products/upload-urls`;
2378
2468
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2379
2469
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2380
2470
  let baseOptions;
@@ -2402,7 +2492,7 @@ export const ProductApiAxiosParamCreator = function (configuration) {
2402
2492
  getProductById: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
2403
2493
  // verify required parameter 'id' is not null or undefined
2404
2494
  assertParamExists('getProductById', 'id', id);
2405
- const localVarPath = `/products/{id}`
2495
+ const localVarPath = `/admins/products/{id}`
2406
2496
  .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2407
2497
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2408
2498
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -2434,7 +2524,39 @@ export const ProductApiAxiosParamCreator = function (configuration) {
2434
2524
  getProductRequestById: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
2435
2525
  // verify required parameter 'id' is not null or undefined
2436
2526
  assertParamExists('getProductRequestById', 'id', id);
2437
- const localVarPath = `/products/requests/{id}`
2527
+ const localVarPath = `/admins/products/requests/{id}`
2528
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2529
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2530
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2531
+ let baseOptions;
2532
+ if (configuration) {
2533
+ baseOptions = configuration.baseOptions;
2534
+ }
2535
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2536
+ const localVarHeaderParameter = {};
2537
+ const localVarQueryParameter = {};
2538
+ // authentication jwt required
2539
+ // http bearer authentication required
2540
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2541
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2542
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2543
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2544
+ return {
2545
+ url: toPathString(localVarUrlObj),
2546
+ options: localVarRequestOptions,
2547
+ };
2548
+ }),
2549
+ /**
2550
+ * Get a product by id, if user is allowed to see it
2551
+ * @summary Get a product by id
2552
+ * @param {string} id The product id
2553
+ * @param {*} [options] Override http request option.
2554
+ * @throws {RequiredError}
2555
+ */
2556
+ getUserProductById: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
2557
+ // verify required parameter 'id' is not null or undefined
2558
+ assertParamExists('getUserProductById', 'id', id);
2559
+ const localVarPath = `/users/products/{id}`
2438
2560
  .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2439
2561
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2440
2562
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -2465,7 +2587,7 @@ export const ProductApiAxiosParamCreator = function (configuration) {
2465
2587
  * @throws {RequiredError}
2466
2588
  */
2467
2589
  listProductRequests: (status, nextToken, options = {}) => __awaiter(this, void 0, void 0, function* () {
2468
- const localVarPath = `/products/requests`;
2590
+ const localVarPath = `/admins/products/requests`;
2469
2591
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2470
2592
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2471
2593
  let baseOptions;
@@ -2508,7 +2630,7 @@ export const ProductApiAxiosParamCreator = function (configuration) {
2508
2630
  * @throws {RequiredError}
2509
2631
  */
2510
2632
  listProducts: (kind, categoryID, search, usage, status, availability, segmentID, nextToken, ids, options = {}) => __awaiter(this, void 0, void 0, function* () {
2511
- const localVarPath = `/products`;
2633
+ const localVarPath = `/admins/products`;
2512
2634
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2513
2635
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2514
2636
  let baseOptions;
@@ -2567,7 +2689,7 @@ export const ProductApiAxiosParamCreator = function (configuration) {
2567
2689
  updateProduct: (id, productCreationRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
2568
2690
  // verify required parameter 'id' is not null or undefined
2569
2691
  assertParamExists('updateProduct', 'id', id);
2570
- const localVarPath = `/products/{id}`
2692
+ const localVarPath = `/admins/products/{id}`
2571
2693
  .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2572
2694
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2573
2695
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -2614,6 +2736,19 @@ export const ProductApiFp = function (configuration) {
2614
2736
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2615
2737
  });
2616
2738
  },
2739
+ /**
2740
+ * Create multiple products
2741
+ * @summary Create multiple products
2742
+ * @param {ProductBulkCreationRequest} [productBulkCreationRequest]
2743
+ * @param {*} [options] Override http request option.
2744
+ * @throws {RequiredError}
2745
+ */
2746
+ bulkCreateProducts(productBulkCreationRequest, options) {
2747
+ return __awaiter(this, void 0, void 0, function* () {
2748
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.bulkCreateProducts(productBulkCreationRequest, options);
2749
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2750
+ });
2751
+ },
2617
2752
  /**
2618
2753
  * Create a new product
2619
2754
  * @summary Create a new product
@@ -2678,6 +2813,19 @@ export const ProductApiFp = function (configuration) {
2678
2813
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2679
2814
  });
2680
2815
  },
2816
+ /**
2817
+ * Get a product by id, if user is allowed to see it
2818
+ * @summary Get a product by id
2819
+ * @param {string} id The product id
2820
+ * @param {*} [options] Override http request option.
2821
+ * @throws {RequiredError}
2822
+ */
2823
+ getUserProductById(id, options) {
2824
+ return __awaiter(this, void 0, void 0, function* () {
2825
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserProductById(id, options);
2826
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2827
+ });
2828
+ },
2681
2829
  /**
2682
2830
  * List existing product requests
2683
2831
  * @summary List existing product requests
@@ -2747,6 +2895,16 @@ export const ProductApiFactory = function (configuration, basePath, axios) {
2747
2895
  approveProduct(id, productRequestApprovalRequest, options) {
2748
2896
  return localVarFp.approveProduct(id, productRequestApprovalRequest, options).then((request) => request(axios, basePath));
2749
2897
  },
2898
+ /**
2899
+ * Create multiple products
2900
+ * @summary Create multiple products
2901
+ * @param {ProductBulkCreationRequest} [productBulkCreationRequest]
2902
+ * @param {*} [options] Override http request option.
2903
+ * @throws {RequiredError}
2904
+ */
2905
+ bulkCreateProducts(productBulkCreationRequest, options) {
2906
+ return localVarFp.bulkCreateProducts(productBulkCreationRequest, options).then((request) => request(axios, basePath));
2907
+ },
2750
2908
  /**
2751
2909
  * Create a new product
2752
2910
  * @summary Create a new product
@@ -2796,6 +2954,16 @@ export const ProductApiFactory = function (configuration, basePath, axios) {
2796
2954
  getProductRequestById(id, options) {
2797
2955
  return localVarFp.getProductRequestById(id, options).then((request) => request(axios, basePath));
2798
2956
  },
2957
+ /**
2958
+ * Get a product by id, if user is allowed to see it
2959
+ * @summary Get a product by id
2960
+ * @param {string} id The product id
2961
+ * @param {*} [options] Override http request option.
2962
+ * @throws {RequiredError}
2963
+ */
2964
+ getUserProductById(id, options) {
2965
+ return localVarFp.getUserProductById(id, options).then((request) => request(axios, basePath));
2966
+ },
2799
2967
  /**
2800
2968
  * List existing product requests
2801
2969
  * @summary List existing product requests
@@ -2857,6 +3025,17 @@ export class ProductApi extends BaseAPI {
2857
3025
  approveProduct(id, productRequestApprovalRequest, options) {
2858
3026
  return ProductApiFp(this.configuration).approveProduct(id, productRequestApprovalRequest, options).then((request) => request(this.axios, this.basePath));
2859
3027
  }
3028
+ /**
3029
+ * Create multiple products
3030
+ * @summary Create multiple products
3031
+ * @param {ProductBulkCreationRequest} [productBulkCreationRequest]
3032
+ * @param {*} [options] Override http request option.
3033
+ * @throws {RequiredError}
3034
+ * @memberof ProductApi
3035
+ */
3036
+ bulkCreateProducts(productBulkCreationRequest, options) {
3037
+ return ProductApiFp(this.configuration).bulkCreateProducts(productBulkCreationRequest, options).then((request) => request(this.axios, this.basePath));
3038
+ }
2860
3039
  /**
2861
3040
  * Create a new product
2862
3041
  * @summary Create a new product
@@ -2911,6 +3090,17 @@ export class ProductApi extends BaseAPI {
2911
3090
  getProductRequestById(id, options) {
2912
3091
  return ProductApiFp(this.configuration).getProductRequestById(id, options).then((request) => request(this.axios, this.basePath));
2913
3092
  }
3093
+ /**
3094
+ * Get a product by id, if user is allowed to see it
3095
+ * @summary Get a product by id
3096
+ * @param {string} id The product id
3097
+ * @param {*} [options] Override http request option.
3098
+ * @throws {RequiredError}
3099
+ * @memberof ProductApi
3100
+ */
3101
+ getUserProductById(id, options) {
3102
+ return ProductApiFp(this.configuration).getUserProductById(id, options).then((request) => request(this.axios, this.basePath));
3103
+ }
2914
3104
  /**
2915
3105
  * List existing product requests
2916
3106
  * @summary List existing product requests
@@ -2976,7 +3166,7 @@ export const ProgressApiAxiosParamCreator = function (configuration) {
2976
3166
  listProgress: (id, periodID, userID, clientID, interval, nextToken, options = {}) => __awaiter(this, void 0, void 0, function* () {
2977
3167
  // verify required parameter 'id' is not null or undefined
2978
3168
  assertParamExists('listProgress', 'id', id);
2979
- const localVarPath = `/promotions/{id}/progress`
3169
+ const localVarPath = `/admins/promotions/{id}/progress`
2980
3170
  .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2981
3171
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2982
3172
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -3013,6 +3203,46 @@ export const ProgressApiAxiosParamCreator = function (configuration) {
3013
3203
  options: localVarRequestOptions,
3014
3204
  };
3015
3205
  }),
3206
+ /**
3207
+ * List users progress of a promotion
3208
+ * @summary List promotion\'s progress
3209
+ * @param {string} id Promotion ID
3210
+ * @param {number} [periodID] Period ID
3211
+ * @param {string} [nextToken] This is the pagination token
3212
+ * @param {*} [options] Override http request option.
3213
+ * @throws {RequiredError}
3214
+ */
3215
+ listUserProgress: (id, periodID, nextToken, options = {}) => __awaiter(this, void 0, void 0, function* () {
3216
+ // verify required parameter 'id' is not null or undefined
3217
+ assertParamExists('listUserProgress', 'id', id);
3218
+ const localVarPath = `/users/promotions/{id}/progress`
3219
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
3220
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3221
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3222
+ let baseOptions;
3223
+ if (configuration) {
3224
+ baseOptions = configuration.baseOptions;
3225
+ }
3226
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3227
+ const localVarHeaderParameter = {};
3228
+ const localVarQueryParameter = {};
3229
+ // authentication jwt required
3230
+ // http bearer authentication required
3231
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3232
+ if (periodID !== undefined) {
3233
+ localVarQueryParameter['periodID'] = periodID;
3234
+ }
3235
+ if (nextToken !== undefined) {
3236
+ localVarQueryParameter['nextToken'] = nextToken;
3237
+ }
3238
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3239
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3240
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3241
+ return {
3242
+ url: toPathString(localVarUrlObj),
3243
+ options: localVarRequestOptions,
3244
+ };
3245
+ }),
3016
3246
  };
3017
3247
  };
3018
3248
  /**
@@ -3040,6 +3270,21 @@ export const ProgressApiFp = function (configuration) {
3040
3270
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
3041
3271
  });
3042
3272
  },
3273
+ /**
3274
+ * List users progress of a promotion
3275
+ * @summary List promotion\'s progress
3276
+ * @param {string} id Promotion ID
3277
+ * @param {number} [periodID] Period ID
3278
+ * @param {string} [nextToken] This is the pagination token
3279
+ * @param {*} [options] Override http request option.
3280
+ * @throws {RequiredError}
3281
+ */
3282
+ listUserProgress(id, periodID, nextToken, options) {
3283
+ return __awaiter(this, void 0, void 0, function* () {
3284
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listUserProgress(id, periodID, nextToken, options);
3285
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
3286
+ });
3287
+ },
3043
3288
  };
3044
3289
  };
3045
3290
  /**
@@ -3064,6 +3309,18 @@ export const ProgressApiFactory = function (configuration, basePath, axios) {
3064
3309
  listProgress(id, periodID, userID, clientID, interval, nextToken, options) {
3065
3310
  return localVarFp.listProgress(id, periodID, userID, clientID, interval, nextToken, options).then((request) => request(axios, basePath));
3066
3311
  },
3312
+ /**
3313
+ * List users progress of a promotion
3314
+ * @summary List promotion\'s progress
3315
+ * @param {string} id Promotion ID
3316
+ * @param {number} [periodID] Period ID
3317
+ * @param {string} [nextToken] This is the pagination token
3318
+ * @param {*} [options] Override http request option.
3319
+ * @throws {RequiredError}
3320
+ */
3321
+ listUserProgress(id, periodID, nextToken, options) {
3322
+ return localVarFp.listUserProgress(id, periodID, nextToken, options).then((request) => request(axios, basePath));
3323
+ },
3067
3324
  };
3068
3325
  };
3069
3326
  /**
@@ -3089,6 +3346,19 @@ export class ProgressApi extends BaseAPI {
3089
3346
  listProgress(id, periodID, userID, clientID, interval, nextToken, options) {
3090
3347
  return ProgressApiFp(this.configuration).listProgress(id, periodID, userID, clientID, interval, nextToken, options).then((request) => request(this.axios, this.basePath));
3091
3348
  }
3349
+ /**
3350
+ * List users progress of a promotion
3351
+ * @summary List promotion\'s progress
3352
+ * @param {string} id Promotion ID
3353
+ * @param {number} [periodID] Period ID
3354
+ * @param {string} [nextToken] This is the pagination token
3355
+ * @param {*} [options] Override http request option.
3356
+ * @throws {RequiredError}
3357
+ * @memberof ProgressApi
3358
+ */
3359
+ listUserProgress(id, periodID, nextToken, options) {
3360
+ return ProgressApiFp(this.configuration).listUserProgress(id, periodID, nextToken, options).then((request) => request(this.axios, this.basePath));
3361
+ }
3092
3362
  }
3093
3363
  /**
3094
3364
  * @export
@@ -3116,7 +3386,7 @@ export const PromotionApiAxiosParamCreator = function (configuration) {
3116
3386
  claimPromotion: (id, promotionClaimRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
3117
3387
  // verify required parameter 'id' is not null or undefined
3118
3388
  assertParamExists('claimPromotion', 'id', id);
3119
- const localVarPath = `/promotions/{id}/claims`
3389
+ const localVarPath = `/admins/promotions/{id}/claims`
3120
3390
  .replace(`{${"id"}}`, encodeURIComponent(String(id)));
3121
3391
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3122
3392
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -3150,7 +3420,7 @@ export const PromotionApiAxiosParamCreator = function (configuration) {
3150
3420
  assertParamExists('claimPromotionProgress', 'id', id);
3151
3421
  // verify required parameter 'progressID' is not null or undefined
3152
3422
  assertParamExists('claimPromotionProgress', 'progressID', progressID);
3153
- const localVarPath = `/promotions/{id}/progress/{progressID}/claims`
3423
+ const localVarPath = `/adminspromotions/{id}/progress/{progressID}/claims`
3154
3424
  .replace(`{${"id"}}`, encodeURIComponent(String(id)))
3155
3425
  .replace(`{${"progressID"}}`, encodeURIComponent(String(progressID)));
3156
3426
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -3242,7 +3512,7 @@ export const PromotionApiAxiosParamCreator = function (configuration) {
3242
3512
  createPromotion: (promotionRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
3243
3513
  // verify required parameter 'promotionRequest' is not null or undefined
3244
3514
  assertParamExists('createPromotion', 'promotionRequest', promotionRequest);
3245
- const localVarPath = `/promotions`;
3515
+ const localVarPath = `/admins/promotions`;
3246
3516
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3247
3517
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3248
3518
  let baseOptions;
@@ -3275,7 +3545,7 @@ export const PromotionApiAxiosParamCreator = function (configuration) {
3275
3545
  deletePromotion: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
3276
3546
  // verify required parameter 'id' is not null or undefined
3277
3547
  assertParamExists('deletePromotion', 'id', id);
3278
- const localVarPath = `/promotions/{id}`
3548
+ const localVarPath = `/admins/promotions/{id}`
3279
3549
  .replace(`{${"id"}}`, encodeURIComponent(String(id)));
3280
3550
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3281
3551
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -3307,7 +3577,39 @@ export const PromotionApiAxiosParamCreator = function (configuration) {
3307
3577
  getPromotion: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
3308
3578
  // verify required parameter 'id' is not null or undefined
3309
3579
  assertParamExists('getPromotion', 'id', id);
3310
- const localVarPath = `/promotions/{id}`
3580
+ const localVarPath = `/admins/promotions/{id}`
3581
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
3582
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3583
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3584
+ let baseOptions;
3585
+ if (configuration) {
3586
+ baseOptions = configuration.baseOptions;
3587
+ }
3588
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3589
+ const localVarHeaderParameter = {};
3590
+ const localVarQueryParameter = {};
3591
+ // authentication jwt required
3592
+ // http bearer authentication required
3593
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3594
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3595
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3596
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3597
+ return {
3598
+ url: toPathString(localVarUrlObj),
3599
+ options: localVarRequestOptions,
3600
+ };
3601
+ }),
3602
+ /**
3603
+ * Get promotion by id, if user is allowed to see it
3604
+ * @summary Get promotion
3605
+ * @param {string} id Promotion id
3606
+ * @param {*} [options] Override http request option.
3607
+ * @throws {RequiredError}
3608
+ */
3609
+ getUserPromotion: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
3610
+ // verify required parameter 'id' is not null or undefined
3611
+ assertParamExists('getUserPromotion', 'id', id);
3612
+ const localVarPath = `/users/promotions/{id}`
3311
3613
  .replace(`{${"id"}}`, encodeURIComponent(String(id)));
3312
3614
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3313
3615
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -3345,7 +3647,7 @@ export const PromotionApiAxiosParamCreator = function (configuration) {
3345
3647
  * @throws {RequiredError}
3346
3648
  */
3347
3649
  listPromotions: (nextToken, tags, segmentId, ownerID, type, startingAfter, endingBefore, clientID, search, options = {}) => __awaiter(this, void 0, void 0, function* () {
3348
- const localVarPath = `/promotions`;
3650
+ const localVarPath = `/admins/promotions`;
3349
3651
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3350
3652
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3351
3653
  let baseOptions;
@@ -3397,6 +3699,58 @@ export const PromotionApiAxiosParamCreator = function (configuration) {
3397
3699
  options: localVarRequestOptions,
3398
3700
  };
3399
3701
  }),
3702
+ /**
3703
+ * List users promotions
3704
+ * @summary List promotions
3705
+ * @param {string} [nextToken] This is the pagination token
3706
+ * @param {string} [tags] tags to filter by, format is key1=value1;key2=value2. Should be url encoded.
3707
+ * @param {string} [startAtAfter] start time after time
3708
+ * @param {string} [endAtBefore] end time before time
3709
+ * @param {string} [search] search by name or description
3710
+ * @param {*} [options] Override http request option.
3711
+ * @throws {RequiredError}
3712
+ */
3713
+ listUserPromotions: (nextToken, tags, startAtAfter, endAtBefore, search, options = {}) => __awaiter(this, void 0, void 0, function* () {
3714
+ const localVarPath = `/users/promotions`;
3715
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3716
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3717
+ let baseOptions;
3718
+ if (configuration) {
3719
+ baseOptions = configuration.baseOptions;
3720
+ }
3721
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3722
+ const localVarHeaderParameter = {};
3723
+ const localVarQueryParameter = {};
3724
+ // authentication jwt required
3725
+ // http bearer authentication required
3726
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3727
+ if (nextToken !== undefined) {
3728
+ localVarQueryParameter['nextToken'] = nextToken;
3729
+ }
3730
+ if (tags !== undefined) {
3731
+ localVarQueryParameter['tags'] = tags;
3732
+ }
3733
+ if (startAtAfter !== undefined) {
3734
+ localVarQueryParameter['startAtAfter'] = (startAtAfter instanceof Date) ?
3735
+ startAtAfter.toISOString() :
3736
+ startAtAfter;
3737
+ }
3738
+ if (endAtBefore !== undefined) {
3739
+ localVarQueryParameter['endAtBefore'] = (endAtBefore instanceof Date) ?
3740
+ endAtBefore.toISOString() :
3741
+ endAtBefore;
3742
+ }
3743
+ if (search !== undefined) {
3744
+ localVarQueryParameter['search'] = search;
3745
+ }
3746
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3747
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3748
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3749
+ return {
3750
+ url: toPathString(localVarUrlObj),
3751
+ options: localVarRequestOptions,
3752
+ };
3753
+ }),
3400
3754
  /**
3401
3755
  * Update promotion by id
3402
3756
  * @summary Update promotion
@@ -3410,7 +3764,7 @@ export const PromotionApiAxiosParamCreator = function (configuration) {
3410
3764
  assertParamExists('updatePromotion', 'id', id);
3411
3765
  // verify required parameter 'updatePromotionRequest' is not null or undefined
3412
3766
  assertParamExists('updatePromotion', 'updatePromotionRequest', updatePromotionRequest);
3413
- const localVarPath = `/promotions/{id}`
3767
+ const localVarPath = `/admins/promotions/{id}`
3414
3768
  .replace(`{${"id"}}`, encodeURIComponent(String(id)));
3415
3769
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3416
3770
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -3537,6 +3891,19 @@ export const PromotionApiFp = function (configuration) {
3537
3891
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
3538
3892
  });
3539
3893
  },
3894
+ /**
3895
+ * Get promotion by id, if user is allowed to see it
3896
+ * @summary Get promotion
3897
+ * @param {string} id Promotion id
3898
+ * @param {*} [options] Override http request option.
3899
+ * @throws {RequiredError}
3900
+ */
3901
+ getUserPromotion(id, options) {
3902
+ return __awaiter(this, void 0, void 0, function* () {
3903
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserPromotion(id, options);
3904
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
3905
+ });
3906
+ },
3540
3907
  /**
3541
3908
  * List all promotions
3542
3909
  * @summary List promotions
@@ -3558,6 +3925,23 @@ export const PromotionApiFp = function (configuration) {
3558
3925
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
3559
3926
  });
3560
3927
  },
3928
+ /**
3929
+ * List users promotions
3930
+ * @summary List promotions
3931
+ * @param {string} [nextToken] This is the pagination token
3932
+ * @param {string} [tags] tags to filter by, format is key1=value1;key2=value2. Should be url encoded.
3933
+ * @param {string} [startAtAfter] start time after time
3934
+ * @param {string} [endAtBefore] end time before time
3935
+ * @param {string} [search] search by name or description
3936
+ * @param {*} [options] Override http request option.
3937
+ * @throws {RequiredError}
3938
+ */
3939
+ listUserPromotions(nextToken, tags, startAtAfter, endAtBefore, search, options) {
3940
+ return __awaiter(this, void 0, void 0, function* () {
3941
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listUserPromotions(nextToken, tags, startAtAfter, endAtBefore, search, options);
3942
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
3943
+ });
3944
+ },
3561
3945
  /**
3562
3946
  * Update promotion by id
3563
3947
  * @summary Update promotion
@@ -3654,6 +4038,16 @@ export const PromotionApiFactory = function (configuration, basePath, axios) {
3654
4038
  getPromotion(id, options) {
3655
4039
  return localVarFp.getPromotion(id, options).then((request) => request(axios, basePath));
3656
4040
  },
4041
+ /**
4042
+ * Get promotion by id, if user is allowed to see it
4043
+ * @summary Get promotion
4044
+ * @param {string} id Promotion id
4045
+ * @param {*} [options] Override http request option.
4046
+ * @throws {RequiredError}
4047
+ */
4048
+ getUserPromotion(id, options) {
4049
+ return localVarFp.getUserPromotion(id, options).then((request) => request(axios, basePath));
4050
+ },
3657
4051
  /**
3658
4052
  * List all promotions
3659
4053
  * @summary List promotions
@@ -3672,6 +4066,20 @@ export const PromotionApiFactory = function (configuration, basePath, axios) {
3672
4066
  listPromotions(nextToken, tags, segmentId, ownerID, type, startingAfter, endingBefore, clientID, search, options) {
3673
4067
  return localVarFp.listPromotions(nextToken, tags, segmentId, ownerID, type, startingAfter, endingBefore, clientID, search, options).then((request) => request(axios, basePath));
3674
4068
  },
4069
+ /**
4070
+ * List users promotions
4071
+ * @summary List promotions
4072
+ * @param {string} [nextToken] This is the pagination token
4073
+ * @param {string} [tags] tags to filter by, format is key1=value1;key2=value2. Should be url encoded.
4074
+ * @param {string} [startAtAfter] start time after time
4075
+ * @param {string} [endAtBefore] end time before time
4076
+ * @param {string} [search] search by name or description
4077
+ * @param {*} [options] Override http request option.
4078
+ * @throws {RequiredError}
4079
+ */
4080
+ listUserPromotions(nextToken, tags, startAtAfter, endAtBefore, search, options) {
4081
+ return localVarFp.listUserPromotions(nextToken, tags, startAtAfter, endAtBefore, search, options).then((request) => request(axios, basePath));
4082
+ },
3675
4083
  /**
3676
4084
  * Update promotion by id
3677
4085
  * @summary Update promotion
@@ -3772,6 +4180,17 @@ export class PromotionApi extends BaseAPI {
3772
4180
  getPromotion(id, options) {
3773
4181
  return PromotionApiFp(this.configuration).getPromotion(id, options).then((request) => request(this.axios, this.basePath));
3774
4182
  }
4183
+ /**
4184
+ * Get promotion by id, if user is allowed to see it
4185
+ * @summary Get promotion
4186
+ * @param {string} id Promotion id
4187
+ * @param {*} [options] Override http request option.
4188
+ * @throws {RequiredError}
4189
+ * @memberof PromotionApi
4190
+ */
4191
+ getUserPromotion(id, options) {
4192
+ return PromotionApiFp(this.configuration).getUserPromotion(id, options).then((request) => request(this.axios, this.basePath));
4193
+ }
3775
4194
  /**
3776
4195
  * List all promotions
3777
4196
  * @summary List promotions
@@ -3791,6 +4210,21 @@ export class PromotionApi extends BaseAPI {
3791
4210
  listPromotions(nextToken, tags, segmentId, ownerID, type, startingAfter, endingBefore, clientID, search, options) {
3792
4211
  return PromotionApiFp(this.configuration).listPromotions(nextToken, tags, segmentId, ownerID, type, startingAfter, endingBefore, clientID, search, options).then((request) => request(this.axios, this.basePath));
3793
4212
  }
4213
+ /**
4214
+ * List users promotions
4215
+ * @summary List promotions
4216
+ * @param {string} [nextToken] This is the pagination token
4217
+ * @param {string} [tags] tags to filter by, format is key1=value1;key2=value2. Should be url encoded.
4218
+ * @param {string} [startAtAfter] start time after time
4219
+ * @param {string} [endAtBefore] end time before time
4220
+ * @param {string} [search] search by name or description
4221
+ * @param {*} [options] Override http request option.
4222
+ * @throws {RequiredError}
4223
+ * @memberof PromotionApi
4224
+ */
4225
+ listUserPromotions(nextToken, tags, startAtAfter, endAtBefore, search, options) {
4226
+ return PromotionApiFp(this.configuration).listUserPromotions(nextToken, tags, startAtAfter, endAtBefore, search, options).then((request) => request(this.axios, this.basePath));
4227
+ }
3794
4228
  /**
3795
4229
  * Update promotion by id
3796
4230
  * @summary Update promotion
@@ -3804,6 +4238,113 @@ export class PromotionApi extends BaseAPI {
3804
4238
  return PromotionApiFp(this.configuration).updatePromotion(id, updatePromotionRequest, options).then((request) => request(this.axios, this.basePath));
3805
4239
  }
3806
4240
  }
4241
+ /**
4242
+ * RewardApi - axios parameter creator
4243
+ * @export
4244
+ */
4245
+ export const RewardApiAxiosParamCreator = function (configuration) {
4246
+ return {
4247
+ /**
4248
+ * List existing products for the user
4249
+ * @summary List existing products
4250
+ * @param {ProductKind} [kind] The product kind
4251
+ * @param {string} [nextToken] This is the pagination token
4252
+ * @param {*} [options] Override http request option.
4253
+ * @throws {RequiredError}
4254
+ */
4255
+ listUserProducts: (kind, nextToken, options = {}) => __awaiter(this, void 0, void 0, function* () {
4256
+ const localVarPath = `/users/products`;
4257
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4258
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4259
+ let baseOptions;
4260
+ if (configuration) {
4261
+ baseOptions = configuration.baseOptions;
4262
+ }
4263
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
4264
+ const localVarHeaderParameter = {};
4265
+ const localVarQueryParameter = {};
4266
+ // authentication jwt required
4267
+ // http bearer authentication required
4268
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
4269
+ if (kind !== undefined) {
4270
+ localVarQueryParameter['kind'] = kind;
4271
+ }
4272
+ if (nextToken !== undefined) {
4273
+ localVarQueryParameter['nextToken'] = nextToken;
4274
+ }
4275
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4276
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4277
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
4278
+ return {
4279
+ url: toPathString(localVarUrlObj),
4280
+ options: localVarRequestOptions,
4281
+ };
4282
+ }),
4283
+ };
4284
+ };
4285
+ /**
4286
+ * RewardApi - functional programming interface
4287
+ * @export
4288
+ */
4289
+ export const RewardApiFp = function (configuration) {
4290
+ const localVarAxiosParamCreator = RewardApiAxiosParamCreator(configuration);
4291
+ return {
4292
+ /**
4293
+ * List existing products for the user
4294
+ * @summary List existing products
4295
+ * @param {ProductKind} [kind] The product kind
4296
+ * @param {string} [nextToken] This is the pagination token
4297
+ * @param {*} [options] Override http request option.
4298
+ * @throws {RequiredError}
4299
+ */
4300
+ listUserProducts(kind, nextToken, options) {
4301
+ return __awaiter(this, void 0, void 0, function* () {
4302
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listUserProducts(kind, nextToken, options);
4303
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
4304
+ });
4305
+ },
4306
+ };
4307
+ };
4308
+ /**
4309
+ * RewardApi - factory interface
4310
+ * @export
4311
+ */
4312
+ export const RewardApiFactory = function (configuration, basePath, axios) {
4313
+ const localVarFp = RewardApiFp(configuration);
4314
+ return {
4315
+ /**
4316
+ * List existing products for the user
4317
+ * @summary List existing products
4318
+ * @param {ProductKind} [kind] The product kind
4319
+ * @param {string} [nextToken] This is the pagination token
4320
+ * @param {*} [options] Override http request option.
4321
+ * @throws {RequiredError}
4322
+ */
4323
+ listUserProducts(kind, nextToken, options) {
4324
+ return localVarFp.listUserProducts(kind, nextToken, options).then((request) => request(axios, basePath));
4325
+ },
4326
+ };
4327
+ };
4328
+ /**
4329
+ * RewardApi - object-oriented interface
4330
+ * @export
4331
+ * @class RewardApi
4332
+ * @extends {BaseAPI}
4333
+ */
4334
+ export class RewardApi extends BaseAPI {
4335
+ /**
4336
+ * List existing products for the user
4337
+ * @summary List existing products
4338
+ * @param {ProductKind} [kind] The product kind
4339
+ * @param {string} [nextToken] This is the pagination token
4340
+ * @param {*} [options] Override http request option.
4341
+ * @throws {RequiredError}
4342
+ * @memberof RewardApi
4343
+ */
4344
+ listUserProducts(kind, nextToken, options) {
4345
+ return RewardApiFp(this.configuration).listUserProducts(kind, nextToken, options).then((request) => request(this.axios, this.basePath));
4346
+ }
4347
+ }
3807
4348
  /**
3808
4349
  * SegmentApi - axios parameter creator
3809
4350
  * @export
@@ -3818,7 +4359,7 @@ export const SegmentApiAxiosParamCreator = function (configuration) {
3818
4359
  * @throws {RequiredError}
3819
4360
  */
3820
4361
  createSegment: (createSegmentRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
3821
- const localVarPath = `/segments`;
4362
+ const localVarPath = `/admins/segments`;
3822
4363
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3823
4364
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3824
4365
  let baseOptions;
@@ -3851,7 +4392,7 @@ export const SegmentApiAxiosParamCreator = function (configuration) {
3851
4392
  getSegmentById: (segmentId, options = {}) => __awaiter(this, void 0, void 0, function* () {
3852
4393
  // verify required parameter 'segmentId' is not null or undefined
3853
4394
  assertParamExists('getSegmentById', 'segmentId', segmentId);
3854
- const localVarPath = `/segments/{segmentId}`
4395
+ const localVarPath = `/admins/segments/{segmentId}`
3855
4396
  .replace(`{${"segmentId"}}`, encodeURIComponent(String(segmentId)));
3856
4397
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3857
4398
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -3882,7 +4423,7 @@ export const SegmentApiAxiosParamCreator = function (configuration) {
3882
4423
  * @throws {RequiredError}
3883
4424
  */
3884
4425
  listSegments: (nextToken, search, options = {}) => __awaiter(this, void 0, void 0, function* () {
3885
- const localVarPath = `/segments`;
4426
+ const localVarPath = `/admins/segments`;
3886
4427
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3887
4428
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3888
4429
  let baseOptions;
@@ -4056,7 +4597,7 @@ export const TagApiAxiosParamCreator = function (configuration) {
4056
4597
  * @throws {RequiredError}
4057
4598
  */
4058
4599
  createTag: (createTagRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
4059
- const localVarPath = `/tags`;
4600
+ const localVarPath = `/admins/tags`;
4060
4601
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
4061
4602
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4062
4603
  let baseOptions;
@@ -4089,7 +4630,7 @@ export const TagApiAxiosParamCreator = function (configuration) {
4089
4630
  deleteTag: (key, options = {}) => __awaiter(this, void 0, void 0, function* () {
4090
4631
  // verify required parameter 'key' is not null or undefined
4091
4632
  assertParamExists('deleteTag', 'key', key);
4092
- const localVarPath = `/tags/{key}`
4633
+ const localVarPath = `/admins/tags/{key}`
4093
4634
  .replace(`{${"key"}}`, encodeURIComponent(String(key)));
4094
4635
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
4095
4636
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -4121,7 +4662,7 @@ export const TagApiAxiosParamCreator = function (configuration) {
4121
4662
  getTagByKey: (key, options = {}) => __awaiter(this, void 0, void 0, function* () {
4122
4663
  // verify required parameter 'key' is not null or undefined
4123
4664
  assertParamExists('getTagByKey', 'key', key);
4124
- const localVarPath = `/tags/{key}`
4665
+ const localVarPath = `/admins/tags/{key}`
4125
4666
  .replace(`{${"key"}}`, encodeURIComponent(String(key)));
4126
4667
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
4127
4668
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -4151,7 +4692,7 @@ export const TagApiAxiosParamCreator = function (configuration) {
4151
4692
  * @throws {RequiredError}
4152
4693
  */
4153
4694
  listTags: (tagKey, options = {}) => __awaiter(this, void 0, void 0, function* () {
4154
- const localVarPath = `/tags`;
4695
+ const localVarPath = `/admins/tags`;
4155
4696
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
4156
4697
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4157
4698
  let baseOptions;
@@ -4186,7 +4727,7 @@ export const TagApiAxiosParamCreator = function (configuration) {
4186
4727
  updateTag: (key, createTagRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
4187
4728
  // verify required parameter 'key' is not null or undefined
4188
4729
  assertParamExists('updateTag', 'key', key);
4189
- const localVarPath = `/tags/{key}`
4730
+ const localVarPath = `/admins/tags/{key}`
4190
4731
  .replace(`{${"key"}}`, encodeURIComponent(String(key)));
4191
4732
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
4192
4733
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -4426,7 +4967,7 @@ export const TransactionApiAxiosParamCreator = function (configuration) {
4426
4967
  * @throws {RequiredError}
4427
4968
  */
4428
4969
  listTransactions: (paginationToken, clientID, options = {}) => __awaiter(this, void 0, void 0, function* () {
4429
- const localVarPath = `/transactions`;
4970
+ const localVarPath = `/admins/transactions`;
4430
4971
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
4431
4972
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4432
4973
  let baseOptions;
@@ -4534,7 +5075,7 @@ export const UserApiAxiosParamCreator = function (configuration) {
4534
5075
  getUserByID: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
4535
5076
  // verify required parameter 'id' is not null or undefined
4536
5077
  assertParamExists('getUserByID', 'id', id);
4537
- const localVarPath = `/users/{id}`
5078
+ const localVarPath = `/admins/users/{id}`
4538
5079
  .replace(`{${"id"}}`, encodeURIComponent(String(id)));
4539
5080
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
4540
5081
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -4566,7 +5107,7 @@ export const UserApiAxiosParamCreator = function (configuration) {
4566
5107
  getUserSubordinates: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
4567
5108
  // verify required parameter 'id' is not null or undefined
4568
5109
  assertParamExists('getUserSubordinates', 'id', id);
4569
- const localVarPath = `/admin/users/{id}/team`
5110
+ const localVarPath = `/admins/users/{id}/team`
4570
5111
  .replace(`{${"id"}}`, encodeURIComponent(String(id)));
4571
5112
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
4572
5113
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -4601,7 +5142,7 @@ export const UserApiAxiosParamCreator = function (configuration) {
4601
5142
  * @throws {RequiredError}
4602
5143
  */
4603
5144
  listUsers: (nextToken, role, search, clientID, userIds, source, options = {}) => __awaiter(this, void 0, void 0, function* () {
4604
- const localVarPath = `/users`;
5145
+ const localVarPath = `/admins/users`;
4605
5146
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
4606
5147
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4607
5148
  let baseOptions;