flexinet-api 0.0.292-prerelease0 → 0.0.318-prerelease0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api.js CHANGED
@@ -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
@@ -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
@@ -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
@@ -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);
@@ -2345,6 +2404,37 @@ const ProductApiAxiosParamCreator = function (configuration) {
2345
2404
  options: localVarRequestOptions,
2346
2405
  };
2347
2406
  }),
2407
+ /**
2408
+ * Get a product by id
2409
+ * @summary Get a product by id
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 = `/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
@@ -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;
@@ -2496,6 +2586,38 @@ const ProductApiAxiosParamCreator = function (configuration) {
2496
2586
  options: localVarRequestOptions,
2497
2587
  };
2498
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}`
2600
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2601
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2602
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2603
+ let baseOptions;
2604
+ if (configuration) {
2605
+ baseOptions = configuration.baseOptions;
2606
+ }
2607
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2608
+ const localVarHeaderParameter = {};
2609
+ const localVarQueryParameter = {};
2610
+ // authentication jwt required
2611
+ // http bearer authentication required
2612
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2613
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2614
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2615
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2616
+ return {
2617
+ url: (0, common_1.toPathString)(localVarUrlObj),
2618
+ options: localVarRequestOptions,
2619
+ };
2620
+ }),
2499
2621
  /**
2500
2622
  * List existing product requests
2501
2623
  * @summary List existing product requests
@@ -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
+ * Get a product by id
2782
+ * @summary Get a product by id
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
+ * Get a product by id
2942
+ * @summary Get a product by id
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
+ * Get a product by id
3073
+ * @summary Get a product by id
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
@@ -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
  /**
@@ -3377,6 +3647,38 @@ const PromotionApiAxiosParamCreator = function (configuration) {
3377
3647
  options: localVarRequestOptions,
3378
3648
  };
3379
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}`
3661
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
3662
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3663
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3664
+ let baseOptions;
3665
+ if (configuration) {
3666
+ baseOptions = configuration.baseOptions;
3667
+ }
3668
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3669
+ const localVarHeaderParameter = {};
3670
+ const localVarQueryParameter = {};
3671
+ // authentication jwt required
3672
+ // http bearer authentication required
3673
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3674
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3675
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3676
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3677
+ return {
3678
+ url: (0, common_1.toPathString)(localVarUrlObj),
3679
+ options: localVarRequestOptions,
3680
+ };
3681
+ }),
3380
3682
  /**
3381
3683
  * List all promotions
3382
3684
  * @summary List promotions
@@ -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
@@ -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