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/README.md +2 -2
- package/api.ts +715 -6
- package/dist/api.d.ts +399 -0
- package/dist/api.js +551 -6
- package/dist/esm/api.d.ts +399 -0
- package/dist/esm/api.js +546 -5
- package/package.json +1 -1
package/api.ts
CHANGED
|
@@ -1158,6 +1158,19 @@ export const ProductAvailability = {
|
|
|
1158
1158
|
export type ProductAvailability = typeof ProductAvailability[keyof typeof ProductAvailability];
|
|
1159
1159
|
|
|
1160
1160
|
|
|
1161
|
+
/**
|
|
1162
|
+
*
|
|
1163
|
+
* @export
|
|
1164
|
+
* @interface ProductBulkCreationRequest
|
|
1165
|
+
*/
|
|
1166
|
+
export interface ProductBulkCreationRequest {
|
|
1167
|
+
/**
|
|
1168
|
+
*
|
|
1169
|
+
* @type {Array<ProductCreationRequest>}
|
|
1170
|
+
* @memberof ProductBulkCreationRequest
|
|
1171
|
+
*/
|
|
1172
|
+
'products': Array<ProductCreationRequest>;
|
|
1173
|
+
}
|
|
1161
1174
|
/**
|
|
1162
1175
|
*
|
|
1163
1176
|
* @export
|
|
@@ -2742,6 +2755,111 @@ export interface UserListResponse {
|
|
|
2742
2755
|
*/
|
|
2743
2756
|
'hasMore': boolean;
|
|
2744
2757
|
}
|
|
2758
|
+
/**
|
|
2759
|
+
*
|
|
2760
|
+
* @export
|
|
2761
|
+
* @interface UserPromotion
|
|
2762
|
+
*/
|
|
2763
|
+
export interface UserPromotion {
|
|
2764
|
+
/**
|
|
2765
|
+
*
|
|
2766
|
+
* @type {string}
|
|
2767
|
+
* @memberof UserPromotion
|
|
2768
|
+
*/
|
|
2769
|
+
'id': string;
|
|
2770
|
+
/**
|
|
2771
|
+
*
|
|
2772
|
+
* @type {string}
|
|
2773
|
+
* @memberof UserPromotion
|
|
2774
|
+
*/
|
|
2775
|
+
'name': string;
|
|
2776
|
+
/**
|
|
2777
|
+
*
|
|
2778
|
+
* @type {string}
|
|
2779
|
+
* @memberof UserPromotion
|
|
2780
|
+
*/
|
|
2781
|
+
'description': string;
|
|
2782
|
+
/**
|
|
2783
|
+
*
|
|
2784
|
+
* @type {Target}
|
|
2785
|
+
* @memberof UserPromotion
|
|
2786
|
+
*/
|
|
2787
|
+
'target': Target;
|
|
2788
|
+
/**
|
|
2789
|
+
*
|
|
2790
|
+
* @type {boolean}
|
|
2791
|
+
* @memberof UserPromotion
|
|
2792
|
+
*/
|
|
2793
|
+
'repeatable': boolean;
|
|
2794
|
+
/**
|
|
2795
|
+
*
|
|
2796
|
+
* @type {number}
|
|
2797
|
+
* @memberof UserPromotion
|
|
2798
|
+
*/
|
|
2799
|
+
'repeatCount'?: number;
|
|
2800
|
+
/**
|
|
2801
|
+
*
|
|
2802
|
+
* @type {Array<RuleGroup>}
|
|
2803
|
+
* @memberof UserPromotion
|
|
2804
|
+
*/
|
|
2805
|
+
'ruleGroups': Array<RuleGroup>;
|
|
2806
|
+
/**
|
|
2807
|
+
*
|
|
2808
|
+
* @type {string}
|
|
2809
|
+
* @memberof UserPromotion
|
|
2810
|
+
*/
|
|
2811
|
+
'brandLogoURL': string;
|
|
2812
|
+
/**
|
|
2813
|
+
*
|
|
2814
|
+
* @type {string}
|
|
2815
|
+
* @memberof UserPromotion
|
|
2816
|
+
*/
|
|
2817
|
+
'imageURL': string;
|
|
2818
|
+
/**
|
|
2819
|
+
*
|
|
2820
|
+
* @type {string}
|
|
2821
|
+
* @memberof UserPromotion
|
|
2822
|
+
*/
|
|
2823
|
+
'startAt': string;
|
|
2824
|
+
/**
|
|
2825
|
+
*
|
|
2826
|
+
* @type {string}
|
|
2827
|
+
* @memberof UserPromotion
|
|
2828
|
+
*/
|
|
2829
|
+
'endAt': string;
|
|
2830
|
+
/**
|
|
2831
|
+
*
|
|
2832
|
+
* @type {{ [key: string]: string; }}
|
|
2833
|
+
* @memberof UserPromotion
|
|
2834
|
+
*/
|
|
2835
|
+
'tags': { [key: string]: string; };
|
|
2836
|
+
/**
|
|
2837
|
+
*
|
|
2838
|
+
* @type {Repetition}
|
|
2839
|
+
* @memberof UserPromotion
|
|
2840
|
+
*/
|
|
2841
|
+
'repetition'?: Repetition;
|
|
2842
|
+
/**
|
|
2843
|
+
*
|
|
2844
|
+
* @type {string}
|
|
2845
|
+
* @memberof UserPromotion
|
|
2846
|
+
*/
|
|
2847
|
+
'createdAt': string;
|
|
2848
|
+
/**
|
|
2849
|
+
*
|
|
2850
|
+
* @type {string}
|
|
2851
|
+
* @memberof UserPromotion
|
|
2852
|
+
*/
|
|
2853
|
+
'updatedAt'?: string;
|
|
2854
|
+
/**
|
|
2855
|
+
*
|
|
2856
|
+
* @type {Array<Period>}
|
|
2857
|
+
* @memberof UserPromotion
|
|
2858
|
+
*/
|
|
2859
|
+
'periods'?: Array<Period>;
|
|
2860
|
+
}
|
|
2861
|
+
|
|
2862
|
+
|
|
2745
2863
|
/**
|
|
2746
2864
|
*
|
|
2747
2865
|
* @export
|
|
@@ -3067,6 +3185,40 @@ export const BalanceApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
3067
3185
|
|
|
3068
3186
|
|
|
3069
3187
|
|
|
3188
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3189
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3190
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
3191
|
+
|
|
3192
|
+
return {
|
|
3193
|
+
url: toPathString(localVarUrlObj),
|
|
3194
|
+
options: localVarRequestOptions,
|
|
3195
|
+
};
|
|
3196
|
+
},
|
|
3197
|
+
/**
|
|
3198
|
+
* Get balance for the user
|
|
3199
|
+
* @summary Get balance
|
|
3200
|
+
* @param {*} [options] Override http request option.
|
|
3201
|
+
* @throws {RequiredError}
|
|
3202
|
+
*/
|
|
3203
|
+
getUserBalance: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3204
|
+
const localVarPath = `/users/balances`;
|
|
3205
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3206
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3207
|
+
let baseOptions;
|
|
3208
|
+
if (configuration) {
|
|
3209
|
+
baseOptions = configuration.baseOptions;
|
|
3210
|
+
}
|
|
3211
|
+
|
|
3212
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
3213
|
+
const localVarHeaderParameter = {} as any;
|
|
3214
|
+
const localVarQueryParameter = {} as any;
|
|
3215
|
+
|
|
3216
|
+
// authentication jwt required
|
|
3217
|
+
// http bearer authentication required
|
|
3218
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
3219
|
+
|
|
3220
|
+
|
|
3221
|
+
|
|
3070
3222
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3071
3223
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3072
3224
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -3174,6 +3326,16 @@ export const BalanceApiFp = function(configuration?: Configuration) {
|
|
|
3174
3326
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getBalance(beneficiaryValue, kind, options);
|
|
3175
3327
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3176
3328
|
},
|
|
3329
|
+
/**
|
|
3330
|
+
* Get balance for the user
|
|
3331
|
+
* @summary Get balance
|
|
3332
|
+
* @param {*} [options] Override http request option.
|
|
3333
|
+
* @throws {RequiredError}
|
|
3334
|
+
*/
|
|
3335
|
+
async getUserBalance(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Balance>> {
|
|
3336
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getUserBalance(options);
|
|
3337
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3338
|
+
},
|
|
3177
3339
|
/**
|
|
3178
3340
|
* Transfer balance
|
|
3179
3341
|
* @summary Transfer balance
|
|
@@ -3219,6 +3381,15 @@ export const BalanceApiFactory = function (configuration?: Configuration, basePa
|
|
|
3219
3381
|
getBalance(beneficiaryValue: string, kind: BeneficiaryKind, options?: any): AxiosPromise<Balance> {
|
|
3220
3382
|
return localVarFp.getBalance(beneficiaryValue, kind, options).then((request) => request(axios, basePath));
|
|
3221
3383
|
},
|
|
3384
|
+
/**
|
|
3385
|
+
* Get balance for the user
|
|
3386
|
+
* @summary Get balance
|
|
3387
|
+
* @param {*} [options] Override http request option.
|
|
3388
|
+
* @throws {RequiredError}
|
|
3389
|
+
*/
|
|
3390
|
+
getUserBalance(options?: any): AxiosPromise<Balance> {
|
|
3391
|
+
return localVarFp.getUserBalance(options).then((request) => request(axios, basePath));
|
|
3392
|
+
},
|
|
3222
3393
|
/**
|
|
3223
3394
|
* Transfer balance
|
|
3224
3395
|
* @summary Transfer balance
|
|
@@ -3264,6 +3435,17 @@ export class BalanceApi extends BaseAPI {
|
|
|
3264
3435
|
return BalanceApiFp(this.configuration).getBalance(beneficiaryValue, kind, options).then((request) => request(this.axios, this.basePath));
|
|
3265
3436
|
}
|
|
3266
3437
|
|
|
3438
|
+
/**
|
|
3439
|
+
* Get balance for the user
|
|
3440
|
+
* @summary Get balance
|
|
3441
|
+
* @param {*} [options] Override http request option.
|
|
3442
|
+
* @throws {RequiredError}
|
|
3443
|
+
* @memberof BalanceApi
|
|
3444
|
+
*/
|
|
3445
|
+
public getUserBalance(options?: AxiosRequestConfig) {
|
|
3446
|
+
return BalanceApiFp(this.configuration).getUserBalance(options).then((request) => request(this.axios, this.basePath));
|
|
3447
|
+
}
|
|
3448
|
+
|
|
3267
3449
|
/**
|
|
3268
3450
|
* Transfer balance
|
|
3269
3451
|
* @summary Transfer balance
|
|
@@ -4411,7 +4593,7 @@ export const NotificationApiAxiosParamCreator = function (configuration?: Config
|
|
|
4411
4593
|
bulkMarkNotificationAsRead: async (bulkNotificationsReadRequest: BulkNotificationsReadRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
4412
4594
|
// verify required parameter 'bulkNotificationsReadRequest' is not null or undefined
|
|
4413
4595
|
assertParamExists('bulkMarkNotificationAsRead', 'bulkNotificationsReadRequest', bulkNotificationsReadRequest)
|
|
4414
|
-
const localVarPath = `/notifications/read`;
|
|
4596
|
+
const localVarPath = `/users/notifications/read`;
|
|
4415
4597
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4416
4598
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4417
4599
|
let baseOptions;
|
|
@@ -4447,7 +4629,7 @@ export const NotificationApiAxiosParamCreator = function (configuration?: Config
|
|
|
4447
4629
|
getNotification: async (notificationID: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
4448
4630
|
// verify required parameter 'notificationID' is not null or undefined
|
|
4449
4631
|
assertParamExists('getNotification', 'notificationID', notificationID)
|
|
4450
|
-
const localVarPath = `/notifications/{notificationID}`
|
|
4632
|
+
const localVarPath = `/users/notifications/{notificationID}`
|
|
4451
4633
|
.replace(`{${"notificationID"}}`, encodeURIComponent(String(notificationID)));
|
|
4452
4634
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4453
4635
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -4480,7 +4662,7 @@ export const NotificationApiAxiosParamCreator = function (configuration?: Config
|
|
|
4480
4662
|
* @throws {RequiredError}
|
|
4481
4663
|
*/
|
|
4482
4664
|
listNotifications: async (nextToken?: string, status?: NotificationStatus, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
4483
|
-
const localVarPath = `/notifications`;
|
|
4665
|
+
const localVarPath = `/users/notifications`;
|
|
4484
4666
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4485
4667
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4486
4668
|
let baseOptions;
|
|
@@ -4521,7 +4703,7 @@ export const NotificationApiAxiosParamCreator = function (configuration?: Config
|
|
|
4521
4703
|
markNotificationAsRead: async (notificationID: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
4522
4704
|
// verify required parameter 'notificationID' is not null or undefined
|
|
4523
4705
|
assertParamExists('markNotificationAsRead', 'notificationID', notificationID)
|
|
4524
|
-
const localVarPath = `/notifications/{notificationID}`
|
|
4706
|
+
const localVarPath = `/users/notifications/{notificationID}`
|
|
4525
4707
|
.replace(`{${"notificationID"}}`, encodeURIComponent(String(notificationID)));
|
|
4526
4708
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4527
4709
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -5046,6 +5228,44 @@ export const ProductApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
5046
5228
|
options: localVarRequestOptions,
|
|
5047
5229
|
};
|
|
5048
5230
|
},
|
|
5231
|
+
/**
|
|
5232
|
+
* Get a product by id
|
|
5233
|
+
* @summary Get a product by id
|
|
5234
|
+
* @param {ProductBulkCreationRequest} [productBulkCreationRequest]
|
|
5235
|
+
* @param {*} [options] Override http request option.
|
|
5236
|
+
* @throws {RequiredError}
|
|
5237
|
+
*/
|
|
5238
|
+
bulkCreateProducts: async (productBulkCreationRequest?: ProductBulkCreationRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
5239
|
+
const localVarPath = `/products/bulk`;
|
|
5240
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5241
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5242
|
+
let baseOptions;
|
|
5243
|
+
if (configuration) {
|
|
5244
|
+
baseOptions = configuration.baseOptions;
|
|
5245
|
+
}
|
|
5246
|
+
|
|
5247
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
5248
|
+
const localVarHeaderParameter = {} as any;
|
|
5249
|
+
const localVarQueryParameter = {} as any;
|
|
5250
|
+
|
|
5251
|
+
// authentication jwt required
|
|
5252
|
+
// http bearer authentication required
|
|
5253
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
5254
|
+
|
|
5255
|
+
|
|
5256
|
+
|
|
5257
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
5258
|
+
|
|
5259
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5260
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5261
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
5262
|
+
localVarRequestOptions.data = serializeDataIfNeeded(productBulkCreationRequest, localVarRequestOptions, configuration)
|
|
5263
|
+
|
|
5264
|
+
return {
|
|
5265
|
+
url: toPathString(localVarUrlObj),
|
|
5266
|
+
options: localVarRequestOptions,
|
|
5267
|
+
};
|
|
5268
|
+
},
|
|
5049
5269
|
/**
|
|
5050
5270
|
* Create a new product
|
|
5051
5271
|
* @summary Create a new product
|
|
@@ -5092,7 +5312,7 @@ export const ProductApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
5092
5312
|
* @throws {RequiredError}
|
|
5093
5313
|
*/
|
|
5094
5314
|
createProductRequest: async (productRequestCreationRequest?: ProductRequestCreationRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
5095
|
-
const localVarPath = `/products/requests`;
|
|
5315
|
+
const localVarPath = `/users/products/requests`;
|
|
5096
5316
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5097
5317
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5098
5318
|
let baseOptions;
|
|
@@ -5219,6 +5439,44 @@ export const ProductApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
5219
5439
|
|
|
5220
5440
|
|
|
5221
5441
|
|
|
5442
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5443
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5444
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
5445
|
+
|
|
5446
|
+
return {
|
|
5447
|
+
url: toPathString(localVarUrlObj),
|
|
5448
|
+
options: localVarRequestOptions,
|
|
5449
|
+
};
|
|
5450
|
+
},
|
|
5451
|
+
/**
|
|
5452
|
+
* Get a product by id, if user is allowed to see it
|
|
5453
|
+
* @summary Get a product by id
|
|
5454
|
+
* @param {string} id The product id
|
|
5455
|
+
* @param {*} [options] Override http request option.
|
|
5456
|
+
* @throws {RequiredError}
|
|
5457
|
+
*/
|
|
5458
|
+
getUserProductById: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
5459
|
+
// verify required parameter 'id' is not null or undefined
|
|
5460
|
+
assertParamExists('getUserProductById', 'id', id)
|
|
5461
|
+
const localVarPath = `/users/products/{id}`
|
|
5462
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
5463
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5464
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5465
|
+
let baseOptions;
|
|
5466
|
+
if (configuration) {
|
|
5467
|
+
baseOptions = configuration.baseOptions;
|
|
5468
|
+
}
|
|
5469
|
+
|
|
5470
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
5471
|
+
const localVarHeaderParameter = {} as any;
|
|
5472
|
+
const localVarQueryParameter = {} as any;
|
|
5473
|
+
|
|
5474
|
+
// authentication jwt required
|
|
5475
|
+
// http bearer authentication required
|
|
5476
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
5477
|
+
|
|
5478
|
+
|
|
5479
|
+
|
|
5222
5480
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5223
5481
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5224
5482
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -5415,6 +5673,17 @@ export const ProductApiFp = function(configuration?: Configuration) {
|
|
|
5415
5673
|
const localVarAxiosArgs = await localVarAxiosParamCreator.approveProduct(id, productRequestApprovalRequest, options);
|
|
5416
5674
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
5417
5675
|
},
|
|
5676
|
+
/**
|
|
5677
|
+
* Get a product by id
|
|
5678
|
+
* @summary Get a product by id
|
|
5679
|
+
* @param {ProductBulkCreationRequest} [productBulkCreationRequest]
|
|
5680
|
+
* @param {*} [options] Override http request option.
|
|
5681
|
+
* @throws {RequiredError}
|
|
5682
|
+
*/
|
|
5683
|
+
async bulkCreateProducts(productBulkCreationRequest?: ProductBulkCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Product>>> {
|
|
5684
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.bulkCreateProducts(productBulkCreationRequest, options);
|
|
5685
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
5686
|
+
},
|
|
5418
5687
|
/**
|
|
5419
5688
|
* Create a new product
|
|
5420
5689
|
* @summary Create a new product
|
|
@@ -5469,6 +5738,17 @@ export const ProductApiFp = function(configuration?: Configuration) {
|
|
|
5469
5738
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getProductRequestById(id, options);
|
|
5470
5739
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
5471
5740
|
},
|
|
5741
|
+
/**
|
|
5742
|
+
* Get a product by id, if user is allowed to see it
|
|
5743
|
+
* @summary Get a product by id
|
|
5744
|
+
* @param {string} id The product id
|
|
5745
|
+
* @param {*} [options] Override http request option.
|
|
5746
|
+
* @throws {RequiredError}
|
|
5747
|
+
*/
|
|
5748
|
+
async getUserProductById(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Product>> {
|
|
5749
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getUserProductById(id, options);
|
|
5750
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
5751
|
+
},
|
|
5472
5752
|
/**
|
|
5473
5753
|
* List existing product requests
|
|
5474
5754
|
* @summary List existing product requests
|
|
@@ -5533,6 +5813,16 @@ export const ProductApiFactory = function (configuration?: Configuration, basePa
|
|
|
5533
5813
|
approveProduct(id: string, productRequestApprovalRequest?: ProductRequestApprovalRequest, options?: any): AxiosPromise<ProductRequestApprovalResponse> {
|
|
5534
5814
|
return localVarFp.approveProduct(id, productRequestApprovalRequest, options).then((request) => request(axios, basePath));
|
|
5535
5815
|
},
|
|
5816
|
+
/**
|
|
5817
|
+
* Get a product by id
|
|
5818
|
+
* @summary Get a product by id
|
|
5819
|
+
* @param {ProductBulkCreationRequest} [productBulkCreationRequest]
|
|
5820
|
+
* @param {*} [options] Override http request option.
|
|
5821
|
+
* @throws {RequiredError}
|
|
5822
|
+
*/
|
|
5823
|
+
bulkCreateProducts(productBulkCreationRequest?: ProductBulkCreationRequest, options?: any): AxiosPromise<Array<Product>> {
|
|
5824
|
+
return localVarFp.bulkCreateProducts(productBulkCreationRequest, options).then((request) => request(axios, basePath));
|
|
5825
|
+
},
|
|
5536
5826
|
/**
|
|
5537
5827
|
* Create a new product
|
|
5538
5828
|
* @summary Create a new product
|
|
@@ -5582,6 +5872,16 @@ export const ProductApiFactory = function (configuration?: Configuration, basePa
|
|
|
5582
5872
|
getProductRequestById(id: string, options?: any): AxiosPromise<ProductRequestApprovalResponse> {
|
|
5583
5873
|
return localVarFp.getProductRequestById(id, options).then((request) => request(axios, basePath));
|
|
5584
5874
|
},
|
|
5875
|
+
/**
|
|
5876
|
+
* Get a product by id, if user is allowed to see it
|
|
5877
|
+
* @summary Get a product by id
|
|
5878
|
+
* @param {string} id The product id
|
|
5879
|
+
* @param {*} [options] Override http request option.
|
|
5880
|
+
* @throws {RequiredError}
|
|
5881
|
+
*/
|
|
5882
|
+
getUserProductById(id: string, options?: any): AxiosPromise<Product> {
|
|
5883
|
+
return localVarFp.getUserProductById(id, options).then((request) => request(axios, basePath));
|
|
5884
|
+
},
|
|
5585
5885
|
/**
|
|
5586
5886
|
* List existing product requests
|
|
5587
5887
|
* @summary List existing product requests
|
|
@@ -5645,6 +5945,18 @@ export class ProductApi extends BaseAPI {
|
|
|
5645
5945
|
return ProductApiFp(this.configuration).approveProduct(id, productRequestApprovalRequest, options).then((request) => request(this.axios, this.basePath));
|
|
5646
5946
|
}
|
|
5647
5947
|
|
|
5948
|
+
/**
|
|
5949
|
+
* Get a product by id
|
|
5950
|
+
* @summary Get a product by id
|
|
5951
|
+
* @param {ProductBulkCreationRequest} [productBulkCreationRequest]
|
|
5952
|
+
* @param {*} [options] Override http request option.
|
|
5953
|
+
* @throws {RequiredError}
|
|
5954
|
+
* @memberof ProductApi
|
|
5955
|
+
*/
|
|
5956
|
+
public bulkCreateProducts(productBulkCreationRequest?: ProductBulkCreationRequest, options?: AxiosRequestConfig) {
|
|
5957
|
+
return ProductApiFp(this.configuration).bulkCreateProducts(productBulkCreationRequest, options).then((request) => request(this.axios, this.basePath));
|
|
5958
|
+
}
|
|
5959
|
+
|
|
5648
5960
|
/**
|
|
5649
5961
|
* Create a new product
|
|
5650
5962
|
* @summary Create a new product
|
|
@@ -5705,7 +6017,19 @@ export class ProductApi extends BaseAPI {
|
|
|
5705
6017
|
}
|
|
5706
6018
|
|
|
5707
6019
|
/**
|
|
5708
|
-
*
|
|
6020
|
+
* Get a product by id, if user is allowed to see it
|
|
6021
|
+
* @summary Get a product by id
|
|
6022
|
+
* @param {string} id The product id
|
|
6023
|
+
* @param {*} [options] Override http request option.
|
|
6024
|
+
* @throws {RequiredError}
|
|
6025
|
+
* @memberof ProductApi
|
|
6026
|
+
*/
|
|
6027
|
+
public getUserProductById(id: string, options?: AxiosRequestConfig) {
|
|
6028
|
+
return ProductApiFp(this.configuration).getUserProductById(id, options).then((request) => request(this.axios, this.basePath));
|
|
6029
|
+
}
|
|
6030
|
+
|
|
6031
|
+
/**
|
|
6032
|
+
* List existing product requests
|
|
5709
6033
|
* @summary List existing product requests
|
|
5710
6034
|
* @param {ProductRequestStatus} [status] The product request status
|
|
5711
6035
|
* @param {string} [nextToken] This is the pagination token
|
|
@@ -5813,6 +6137,54 @@ export const ProgressApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
5813
6137
|
|
|
5814
6138
|
|
|
5815
6139
|
|
|
6140
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
6141
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
6142
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
6143
|
+
|
|
6144
|
+
return {
|
|
6145
|
+
url: toPathString(localVarUrlObj),
|
|
6146
|
+
options: localVarRequestOptions,
|
|
6147
|
+
};
|
|
6148
|
+
},
|
|
6149
|
+
/**
|
|
6150
|
+
* List users progress of a promotion
|
|
6151
|
+
* @summary List promotion\'s progress
|
|
6152
|
+
* @param {string} id Promotion ID
|
|
6153
|
+
* @param {number} [periodID] Period ID
|
|
6154
|
+
* @param {string} [nextToken] This is the pagination token
|
|
6155
|
+
* @param {*} [options] Override http request option.
|
|
6156
|
+
* @throws {RequiredError}
|
|
6157
|
+
*/
|
|
6158
|
+
listUserProgress: async (id: string, periodID?: number, nextToken?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
6159
|
+
// verify required parameter 'id' is not null or undefined
|
|
6160
|
+
assertParamExists('listUserProgress', 'id', id)
|
|
6161
|
+
const localVarPath = `/users/promotions/{id}/progress`
|
|
6162
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
6163
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
6164
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
6165
|
+
let baseOptions;
|
|
6166
|
+
if (configuration) {
|
|
6167
|
+
baseOptions = configuration.baseOptions;
|
|
6168
|
+
}
|
|
6169
|
+
|
|
6170
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
6171
|
+
const localVarHeaderParameter = {} as any;
|
|
6172
|
+
const localVarQueryParameter = {} as any;
|
|
6173
|
+
|
|
6174
|
+
// authentication jwt required
|
|
6175
|
+
// http bearer authentication required
|
|
6176
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
6177
|
+
|
|
6178
|
+
if (periodID !== undefined) {
|
|
6179
|
+
localVarQueryParameter['periodID'] = periodID;
|
|
6180
|
+
}
|
|
6181
|
+
|
|
6182
|
+
if (nextToken !== undefined) {
|
|
6183
|
+
localVarQueryParameter['nextToken'] = nextToken;
|
|
6184
|
+
}
|
|
6185
|
+
|
|
6186
|
+
|
|
6187
|
+
|
|
5816
6188
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5817
6189
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5818
6190
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -5848,6 +6220,19 @@ export const ProgressApiFp = function(configuration?: Configuration) {
|
|
|
5848
6220
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listProgress(id, periodID, userID, clientID, interval, nextToken, options);
|
|
5849
6221
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
5850
6222
|
},
|
|
6223
|
+
/**
|
|
6224
|
+
* List users progress of a promotion
|
|
6225
|
+
* @summary List promotion\'s progress
|
|
6226
|
+
* @param {string} id Promotion ID
|
|
6227
|
+
* @param {number} [periodID] Period ID
|
|
6228
|
+
* @param {string} [nextToken] This is the pagination token
|
|
6229
|
+
* @param {*} [options] Override http request option.
|
|
6230
|
+
* @throws {RequiredError}
|
|
6231
|
+
*/
|
|
6232
|
+
async listUserProgress(id: string, periodID?: number, nextToken?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProgressResponse>> {
|
|
6233
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listUserProgress(id, periodID, nextToken, options);
|
|
6234
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
6235
|
+
},
|
|
5851
6236
|
}
|
|
5852
6237
|
};
|
|
5853
6238
|
|
|
@@ -5873,6 +6258,18 @@ export const ProgressApiFactory = function (configuration?: Configuration, baseP
|
|
|
5873
6258
|
listProgress(id: string, periodID?: number, userID?: string, clientID?: string, interval?: ListProgressIntervalEnum, nextToken?: string, options?: any): AxiosPromise<ProgressResponse> {
|
|
5874
6259
|
return localVarFp.listProgress(id, periodID, userID, clientID, interval, nextToken, options).then((request) => request(axios, basePath));
|
|
5875
6260
|
},
|
|
6261
|
+
/**
|
|
6262
|
+
* List users progress of a promotion
|
|
6263
|
+
* @summary List promotion\'s progress
|
|
6264
|
+
* @param {string} id Promotion ID
|
|
6265
|
+
* @param {number} [periodID] Period ID
|
|
6266
|
+
* @param {string} [nextToken] This is the pagination token
|
|
6267
|
+
* @param {*} [options] Override http request option.
|
|
6268
|
+
* @throws {RequiredError}
|
|
6269
|
+
*/
|
|
6270
|
+
listUserProgress(id: string, periodID?: number, nextToken?: string, options?: any): AxiosPromise<ProgressResponse> {
|
|
6271
|
+
return localVarFp.listUserProgress(id, periodID, nextToken, options).then((request) => request(axios, basePath));
|
|
6272
|
+
},
|
|
5876
6273
|
};
|
|
5877
6274
|
};
|
|
5878
6275
|
|
|
@@ -5899,6 +6296,20 @@ export class ProgressApi extends BaseAPI {
|
|
|
5899
6296
|
public listProgress(id: string, periodID?: number, userID?: string, clientID?: string, interval?: ListProgressIntervalEnum, nextToken?: string, options?: AxiosRequestConfig) {
|
|
5900
6297
|
return ProgressApiFp(this.configuration).listProgress(id, periodID, userID, clientID, interval, nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
5901
6298
|
}
|
|
6299
|
+
|
|
6300
|
+
/**
|
|
6301
|
+
* List users progress of a promotion
|
|
6302
|
+
* @summary List promotion\'s progress
|
|
6303
|
+
* @param {string} id Promotion ID
|
|
6304
|
+
* @param {number} [periodID] Period ID
|
|
6305
|
+
* @param {string} [nextToken] This is the pagination token
|
|
6306
|
+
* @param {*} [options] Override http request option.
|
|
6307
|
+
* @throws {RequiredError}
|
|
6308
|
+
* @memberof ProgressApi
|
|
6309
|
+
*/
|
|
6310
|
+
public listUserProgress(id: string, periodID?: number, nextToken?: string, options?: AxiosRequestConfig) {
|
|
6311
|
+
return ProgressApiFp(this.configuration).listUserProgress(id, periodID, nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
6312
|
+
}
|
|
5902
6313
|
}
|
|
5903
6314
|
|
|
5904
6315
|
/**
|
|
@@ -6174,6 +6585,44 @@ export const PromotionApiAxiosParamCreator = function (configuration?: Configura
|
|
|
6174
6585
|
|
|
6175
6586
|
|
|
6176
6587
|
|
|
6588
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
6589
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
6590
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
6591
|
+
|
|
6592
|
+
return {
|
|
6593
|
+
url: toPathString(localVarUrlObj),
|
|
6594
|
+
options: localVarRequestOptions,
|
|
6595
|
+
};
|
|
6596
|
+
},
|
|
6597
|
+
/**
|
|
6598
|
+
* Get promotion by id, if user is allowed to see it
|
|
6599
|
+
* @summary Get promotion
|
|
6600
|
+
* @param {string} id Promotion id
|
|
6601
|
+
* @param {*} [options] Override http request option.
|
|
6602
|
+
* @throws {RequiredError}
|
|
6603
|
+
*/
|
|
6604
|
+
getUserPromotion: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
6605
|
+
// verify required parameter 'id' is not null or undefined
|
|
6606
|
+
assertParamExists('getUserPromotion', 'id', id)
|
|
6607
|
+
const localVarPath = `/users/promotions/{id}`
|
|
6608
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
6609
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
6610
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
6611
|
+
let baseOptions;
|
|
6612
|
+
if (configuration) {
|
|
6613
|
+
baseOptions = configuration.baseOptions;
|
|
6614
|
+
}
|
|
6615
|
+
|
|
6616
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
6617
|
+
const localVarHeaderParameter = {} as any;
|
|
6618
|
+
const localVarQueryParameter = {} as any;
|
|
6619
|
+
|
|
6620
|
+
// authentication jwt required
|
|
6621
|
+
// http bearer authentication required
|
|
6622
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
6623
|
+
|
|
6624
|
+
|
|
6625
|
+
|
|
6177
6626
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
6178
6627
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
6179
6628
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -6257,6 +6706,69 @@ export const PromotionApiAxiosParamCreator = function (configuration?: Configura
|
|
|
6257
6706
|
|
|
6258
6707
|
|
|
6259
6708
|
|
|
6709
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
6710
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
6711
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
6712
|
+
|
|
6713
|
+
return {
|
|
6714
|
+
url: toPathString(localVarUrlObj),
|
|
6715
|
+
options: localVarRequestOptions,
|
|
6716
|
+
};
|
|
6717
|
+
},
|
|
6718
|
+
/**
|
|
6719
|
+
* List users promotions
|
|
6720
|
+
* @summary List promotions
|
|
6721
|
+
* @param {string} [nextToken] This is the pagination token
|
|
6722
|
+
* @param {string} [tags] tags to filter by, format is key1=value1;key2=value2. Should be url encoded.
|
|
6723
|
+
* @param {string} [startAtAfter] start time after time
|
|
6724
|
+
* @param {string} [endAtBefore] end time before time
|
|
6725
|
+
* @param {string} [search] search by name or description
|
|
6726
|
+
* @param {*} [options] Override http request option.
|
|
6727
|
+
* @throws {RequiredError}
|
|
6728
|
+
*/
|
|
6729
|
+
listUserPromotions: async (nextToken?: string, tags?: string, startAtAfter?: string, endAtBefore?: string, search?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
6730
|
+
const localVarPath = `/users/promotions`;
|
|
6731
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
6732
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
6733
|
+
let baseOptions;
|
|
6734
|
+
if (configuration) {
|
|
6735
|
+
baseOptions = configuration.baseOptions;
|
|
6736
|
+
}
|
|
6737
|
+
|
|
6738
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
6739
|
+
const localVarHeaderParameter = {} as any;
|
|
6740
|
+
const localVarQueryParameter = {} as any;
|
|
6741
|
+
|
|
6742
|
+
// authentication jwt required
|
|
6743
|
+
// http bearer authentication required
|
|
6744
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
6745
|
+
|
|
6746
|
+
if (nextToken !== undefined) {
|
|
6747
|
+
localVarQueryParameter['nextToken'] = nextToken;
|
|
6748
|
+
}
|
|
6749
|
+
|
|
6750
|
+
if (tags !== undefined) {
|
|
6751
|
+
localVarQueryParameter['tags'] = tags;
|
|
6752
|
+
}
|
|
6753
|
+
|
|
6754
|
+
if (startAtAfter !== undefined) {
|
|
6755
|
+
localVarQueryParameter['startAtAfter'] = (startAtAfter as any instanceof Date) ?
|
|
6756
|
+
(startAtAfter as any).toISOString() :
|
|
6757
|
+
startAtAfter;
|
|
6758
|
+
}
|
|
6759
|
+
|
|
6760
|
+
if (endAtBefore !== undefined) {
|
|
6761
|
+
localVarQueryParameter['endAtBefore'] = (endAtBefore as any instanceof Date) ?
|
|
6762
|
+
(endAtBefore as any).toISOString() :
|
|
6763
|
+
endAtBefore;
|
|
6764
|
+
}
|
|
6765
|
+
|
|
6766
|
+
if (search !== undefined) {
|
|
6767
|
+
localVarQueryParameter['search'] = search;
|
|
6768
|
+
}
|
|
6769
|
+
|
|
6770
|
+
|
|
6771
|
+
|
|
6260
6772
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
6261
6773
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
6262
6774
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -6400,6 +6912,17 @@ export const PromotionApiFp = function(configuration?: Configuration) {
|
|
|
6400
6912
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getPromotion(id, options);
|
|
6401
6913
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
6402
6914
|
},
|
|
6915
|
+
/**
|
|
6916
|
+
* Get promotion by id, if user is allowed to see it
|
|
6917
|
+
* @summary Get promotion
|
|
6918
|
+
* @param {string} id Promotion id
|
|
6919
|
+
* @param {*} [options] Override http request option.
|
|
6920
|
+
* @throws {RequiredError}
|
|
6921
|
+
*/
|
|
6922
|
+
async getUserPromotion(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserPromotion>> {
|
|
6923
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getUserPromotion(id, options);
|
|
6924
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
6925
|
+
},
|
|
6403
6926
|
/**
|
|
6404
6927
|
* List all promotions
|
|
6405
6928
|
* @summary List promotions
|
|
@@ -6419,6 +6942,21 @@ export const PromotionApiFp = function(configuration?: Configuration) {
|
|
|
6419
6942
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listPromotions(nextToken, tags, segmentId, ownerID, type, startingAfter, endingBefore, clientID, search, options);
|
|
6420
6943
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
6421
6944
|
},
|
|
6945
|
+
/**
|
|
6946
|
+
* List users promotions
|
|
6947
|
+
* @summary List promotions
|
|
6948
|
+
* @param {string} [nextToken] This is the pagination token
|
|
6949
|
+
* @param {string} [tags] tags to filter by, format is key1=value1;key2=value2. Should be url encoded.
|
|
6950
|
+
* @param {string} [startAtAfter] start time after time
|
|
6951
|
+
* @param {string} [endAtBefore] end time before time
|
|
6952
|
+
* @param {string} [search] search by name or description
|
|
6953
|
+
* @param {*} [options] Override http request option.
|
|
6954
|
+
* @throws {RequiredError}
|
|
6955
|
+
*/
|
|
6956
|
+
async listUserPromotions(nextToken?: string, tags?: string, startAtAfter?: string, endAtBefore?: string, search?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PromotionsResponse>> {
|
|
6957
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listUserPromotions(nextToken, tags, startAtAfter, endAtBefore, search, options);
|
|
6958
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
6959
|
+
},
|
|
6422
6960
|
/**
|
|
6423
6961
|
* Update promotion by id
|
|
6424
6962
|
* @summary Update promotion
|
|
@@ -6514,6 +7052,16 @@ export const PromotionApiFactory = function (configuration?: Configuration, base
|
|
|
6514
7052
|
getPromotion(id: string, options?: any): AxiosPromise<Promotion> {
|
|
6515
7053
|
return localVarFp.getPromotion(id, options).then((request) => request(axios, basePath));
|
|
6516
7054
|
},
|
|
7055
|
+
/**
|
|
7056
|
+
* Get promotion by id, if user is allowed to see it
|
|
7057
|
+
* @summary Get promotion
|
|
7058
|
+
* @param {string} id Promotion id
|
|
7059
|
+
* @param {*} [options] Override http request option.
|
|
7060
|
+
* @throws {RequiredError}
|
|
7061
|
+
*/
|
|
7062
|
+
getUserPromotion(id: string, options?: any): AxiosPromise<UserPromotion> {
|
|
7063
|
+
return localVarFp.getUserPromotion(id, options).then((request) => request(axios, basePath));
|
|
7064
|
+
},
|
|
6517
7065
|
/**
|
|
6518
7066
|
* List all promotions
|
|
6519
7067
|
* @summary List promotions
|
|
@@ -6532,6 +7080,20 @@ export const PromotionApiFactory = function (configuration?: Configuration, base
|
|
|
6532
7080
|
listPromotions(nextToken?: string, tags?: string, segmentId?: string, ownerID?: string, type?: PromotionType, startingAfter?: string, endingBefore?: string, clientID?: string, search?: string, options?: any): AxiosPromise<PromotionsResponse> {
|
|
6533
7081
|
return localVarFp.listPromotions(nextToken, tags, segmentId, ownerID, type, startingAfter, endingBefore, clientID, search, options).then((request) => request(axios, basePath));
|
|
6534
7082
|
},
|
|
7083
|
+
/**
|
|
7084
|
+
* List users promotions
|
|
7085
|
+
* @summary List promotions
|
|
7086
|
+
* @param {string} [nextToken] This is the pagination token
|
|
7087
|
+
* @param {string} [tags] tags to filter by, format is key1=value1;key2=value2. Should be url encoded.
|
|
7088
|
+
* @param {string} [startAtAfter] start time after time
|
|
7089
|
+
* @param {string} [endAtBefore] end time before time
|
|
7090
|
+
* @param {string} [search] search by name or description
|
|
7091
|
+
* @param {*} [options] Override http request option.
|
|
7092
|
+
* @throws {RequiredError}
|
|
7093
|
+
*/
|
|
7094
|
+
listUserPromotions(nextToken?: string, tags?: string, startAtAfter?: string, endAtBefore?: string, search?: string, options?: any): AxiosPromise<PromotionsResponse> {
|
|
7095
|
+
return localVarFp.listUserPromotions(nextToken, tags, startAtAfter, endAtBefore, search, options).then((request) => request(axios, basePath));
|
|
7096
|
+
},
|
|
6535
7097
|
/**
|
|
6536
7098
|
* Update promotion by id
|
|
6537
7099
|
* @summary Update promotion
|
|
@@ -6640,6 +7202,18 @@ export class PromotionApi extends BaseAPI {
|
|
|
6640
7202
|
return PromotionApiFp(this.configuration).getPromotion(id, options).then((request) => request(this.axios, this.basePath));
|
|
6641
7203
|
}
|
|
6642
7204
|
|
|
7205
|
+
/**
|
|
7206
|
+
* Get promotion by id, if user is allowed to see it
|
|
7207
|
+
* @summary Get promotion
|
|
7208
|
+
* @param {string} id Promotion id
|
|
7209
|
+
* @param {*} [options] Override http request option.
|
|
7210
|
+
* @throws {RequiredError}
|
|
7211
|
+
* @memberof PromotionApi
|
|
7212
|
+
*/
|
|
7213
|
+
public getUserPromotion(id: string, options?: AxiosRequestConfig) {
|
|
7214
|
+
return PromotionApiFp(this.configuration).getUserPromotion(id, options).then((request) => request(this.axios, this.basePath));
|
|
7215
|
+
}
|
|
7216
|
+
|
|
6643
7217
|
/**
|
|
6644
7218
|
* List all promotions
|
|
6645
7219
|
* @summary List promotions
|
|
@@ -6660,6 +7234,22 @@ export class PromotionApi extends BaseAPI {
|
|
|
6660
7234
|
return PromotionApiFp(this.configuration).listPromotions(nextToken, tags, segmentId, ownerID, type, startingAfter, endingBefore, clientID, search, options).then((request) => request(this.axios, this.basePath));
|
|
6661
7235
|
}
|
|
6662
7236
|
|
|
7237
|
+
/**
|
|
7238
|
+
* List users promotions
|
|
7239
|
+
* @summary List promotions
|
|
7240
|
+
* @param {string} [nextToken] This is the pagination token
|
|
7241
|
+
* @param {string} [tags] tags to filter by, format is key1=value1;key2=value2. Should be url encoded.
|
|
7242
|
+
* @param {string} [startAtAfter] start time after time
|
|
7243
|
+
* @param {string} [endAtBefore] end time before time
|
|
7244
|
+
* @param {string} [search] search by name or description
|
|
7245
|
+
* @param {*} [options] Override http request option.
|
|
7246
|
+
* @throws {RequiredError}
|
|
7247
|
+
* @memberof PromotionApi
|
|
7248
|
+
*/
|
|
7249
|
+
public listUserPromotions(nextToken?: string, tags?: string, startAtAfter?: string, endAtBefore?: string, search?: string, options?: AxiosRequestConfig) {
|
|
7250
|
+
return PromotionApiFp(this.configuration).listUserPromotions(nextToken, tags, startAtAfter, endAtBefore, search, options).then((request) => request(this.axios, this.basePath));
|
|
7251
|
+
}
|
|
7252
|
+
|
|
6663
7253
|
/**
|
|
6664
7254
|
* Update promotion by id
|
|
6665
7255
|
* @summary Update promotion
|
|
@@ -6676,6 +7266,125 @@ export class PromotionApi extends BaseAPI {
|
|
|
6676
7266
|
|
|
6677
7267
|
|
|
6678
7268
|
|
|
7269
|
+
/**
|
|
7270
|
+
* RewardApi - axios parameter creator
|
|
7271
|
+
* @export
|
|
7272
|
+
*/
|
|
7273
|
+
export const RewardApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
7274
|
+
return {
|
|
7275
|
+
/**
|
|
7276
|
+
* List existing products for the user
|
|
7277
|
+
* @summary List existing products
|
|
7278
|
+
* @param {ProductKind} [kind] The product kind
|
|
7279
|
+
* @param {string} [nextToken] This is the pagination token
|
|
7280
|
+
* @param {*} [options] Override http request option.
|
|
7281
|
+
* @throws {RequiredError}
|
|
7282
|
+
*/
|
|
7283
|
+
listUserProducts: async (kind?: ProductKind, nextToken?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
7284
|
+
const localVarPath = `/users/products`;
|
|
7285
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
7286
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
7287
|
+
let baseOptions;
|
|
7288
|
+
if (configuration) {
|
|
7289
|
+
baseOptions = configuration.baseOptions;
|
|
7290
|
+
}
|
|
7291
|
+
|
|
7292
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
7293
|
+
const localVarHeaderParameter = {} as any;
|
|
7294
|
+
const localVarQueryParameter = {} as any;
|
|
7295
|
+
|
|
7296
|
+
// authentication jwt required
|
|
7297
|
+
// http bearer authentication required
|
|
7298
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
7299
|
+
|
|
7300
|
+
if (kind !== undefined) {
|
|
7301
|
+
localVarQueryParameter['kind'] = kind;
|
|
7302
|
+
}
|
|
7303
|
+
|
|
7304
|
+
if (nextToken !== undefined) {
|
|
7305
|
+
localVarQueryParameter['nextToken'] = nextToken;
|
|
7306
|
+
}
|
|
7307
|
+
|
|
7308
|
+
|
|
7309
|
+
|
|
7310
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
7311
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
7312
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
7313
|
+
|
|
7314
|
+
return {
|
|
7315
|
+
url: toPathString(localVarUrlObj),
|
|
7316
|
+
options: localVarRequestOptions,
|
|
7317
|
+
};
|
|
7318
|
+
},
|
|
7319
|
+
}
|
|
7320
|
+
};
|
|
7321
|
+
|
|
7322
|
+
/**
|
|
7323
|
+
* RewardApi - functional programming interface
|
|
7324
|
+
* @export
|
|
7325
|
+
*/
|
|
7326
|
+
export const RewardApiFp = function(configuration?: Configuration) {
|
|
7327
|
+
const localVarAxiosParamCreator = RewardApiAxiosParamCreator(configuration)
|
|
7328
|
+
return {
|
|
7329
|
+
/**
|
|
7330
|
+
* List existing products for the user
|
|
7331
|
+
* @summary List existing products
|
|
7332
|
+
* @param {ProductKind} [kind] The product kind
|
|
7333
|
+
* @param {string} [nextToken] This is the pagination token
|
|
7334
|
+
* @param {*} [options] Override http request option.
|
|
7335
|
+
* @throws {RequiredError}
|
|
7336
|
+
*/
|
|
7337
|
+
async listUserProducts(kind?: ProductKind, nextToken?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProductsResponse>> {
|
|
7338
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listUserProducts(kind, nextToken, options);
|
|
7339
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
7340
|
+
},
|
|
7341
|
+
}
|
|
7342
|
+
};
|
|
7343
|
+
|
|
7344
|
+
/**
|
|
7345
|
+
* RewardApi - factory interface
|
|
7346
|
+
* @export
|
|
7347
|
+
*/
|
|
7348
|
+
export const RewardApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
7349
|
+
const localVarFp = RewardApiFp(configuration)
|
|
7350
|
+
return {
|
|
7351
|
+
/**
|
|
7352
|
+
* List existing products for the user
|
|
7353
|
+
* @summary List existing products
|
|
7354
|
+
* @param {ProductKind} [kind] The product kind
|
|
7355
|
+
* @param {string} [nextToken] This is the pagination token
|
|
7356
|
+
* @param {*} [options] Override http request option.
|
|
7357
|
+
* @throws {RequiredError}
|
|
7358
|
+
*/
|
|
7359
|
+
listUserProducts(kind?: ProductKind, nextToken?: string, options?: any): AxiosPromise<ProductsResponse> {
|
|
7360
|
+
return localVarFp.listUserProducts(kind, nextToken, options).then((request) => request(axios, basePath));
|
|
7361
|
+
},
|
|
7362
|
+
};
|
|
7363
|
+
};
|
|
7364
|
+
|
|
7365
|
+
/**
|
|
7366
|
+
* RewardApi - object-oriented interface
|
|
7367
|
+
* @export
|
|
7368
|
+
* @class RewardApi
|
|
7369
|
+
* @extends {BaseAPI}
|
|
7370
|
+
*/
|
|
7371
|
+
export class RewardApi extends BaseAPI {
|
|
7372
|
+
/**
|
|
7373
|
+
* List existing products for the user
|
|
7374
|
+
* @summary List existing products
|
|
7375
|
+
* @param {ProductKind} [kind] The product kind
|
|
7376
|
+
* @param {string} [nextToken] This is the pagination token
|
|
7377
|
+
* @param {*} [options] Override http request option.
|
|
7378
|
+
* @throws {RequiredError}
|
|
7379
|
+
* @memberof RewardApi
|
|
7380
|
+
*/
|
|
7381
|
+
public listUserProducts(kind?: ProductKind, nextToken?: string, options?: AxiosRequestConfig) {
|
|
7382
|
+
return RewardApiFp(this.configuration).listUserProducts(kind, nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
7383
|
+
}
|
|
7384
|
+
}
|
|
7385
|
+
|
|
7386
|
+
|
|
7387
|
+
|
|
6679
7388
|
/**
|
|
6680
7389
|
* SegmentApi - axios parameter creator
|
|
6681
7390
|
* @export
|