flexinet-api 0.0.819-prerelease0 → 0.0.822-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 +262 -0
- package/dist/api.d.ts +161 -0
- package/dist/api.js +196 -3
- package/dist/esm/api.d.ts +161 -0
- package/dist/esm/api.js +189 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## flexinet-api@0.0.
|
|
1
|
+
## flexinet-api@0.0.822-prerelease0
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install flexinet-api@0.0.
|
|
39
|
+
npm install flexinet-api@0.0.822-prerelease0 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
package/api.ts
CHANGED
|
@@ -979,6 +979,12 @@ export interface MetricsAggregation {
|
|
|
979
979
|
* @memberof MetricsAggregation
|
|
980
980
|
*/
|
|
981
981
|
'perPeriod': { [key: string]: MetricsCollection; };
|
|
982
|
+
/**
|
|
983
|
+
*
|
|
984
|
+
* @type {{ [key: string]: PerRuleGroupMetricsCollection; }}
|
|
985
|
+
* @memberof MetricsAggregation
|
|
986
|
+
*/
|
|
987
|
+
'perRuleGroup': { [key: string]: PerRuleGroupMetricsCollection; };
|
|
982
988
|
/**
|
|
983
989
|
*
|
|
984
990
|
* @type {MetricsCollection}
|
|
@@ -1325,6 +1331,25 @@ export interface OrderListResponse {
|
|
|
1325
1331
|
*/
|
|
1326
1332
|
'nextToken'?: string;
|
|
1327
1333
|
}
|
|
1334
|
+
/**
|
|
1335
|
+
*
|
|
1336
|
+
* @export
|
|
1337
|
+
* @interface PerRuleGroupMetricsCollection
|
|
1338
|
+
*/
|
|
1339
|
+
export interface PerRuleGroupMetricsCollection {
|
|
1340
|
+
/**
|
|
1341
|
+
*
|
|
1342
|
+
* @type {{ [key: string]: MetricsCollection; }}
|
|
1343
|
+
* @memberof PerRuleGroupMetricsCollection
|
|
1344
|
+
*/
|
|
1345
|
+
'perPeriod': { [key: string]: MetricsCollection; };
|
|
1346
|
+
/**
|
|
1347
|
+
*
|
|
1348
|
+
* @type {MetricsCollection}
|
|
1349
|
+
* @memberof PerRuleGroupMetricsCollection
|
|
1350
|
+
*/
|
|
1351
|
+
'total': MetricsCollection;
|
|
1352
|
+
}
|
|
1328
1353
|
/**
|
|
1329
1354
|
*
|
|
1330
1355
|
* @export
|
|
@@ -2482,6 +2507,41 @@ export const Repetition = {
|
|
|
2482
2507
|
export type Repetition = typeof Repetition[keyof typeof Repetition];
|
|
2483
2508
|
|
|
2484
2509
|
|
|
2510
|
+
/**
|
|
2511
|
+
*
|
|
2512
|
+
* @export
|
|
2513
|
+
* @interface ReportResponse
|
|
2514
|
+
*/
|
|
2515
|
+
export interface ReportResponse {
|
|
2516
|
+
/**
|
|
2517
|
+
*
|
|
2518
|
+
* @type {string}
|
|
2519
|
+
* @memberof ReportResponse
|
|
2520
|
+
*/
|
|
2521
|
+
'url': string;
|
|
2522
|
+
}
|
|
2523
|
+
/**
|
|
2524
|
+
*
|
|
2525
|
+
* @export
|
|
2526
|
+
* @interface ReportTypesResponse
|
|
2527
|
+
*/
|
|
2528
|
+
export interface ReportTypesResponse {
|
|
2529
|
+
/**
|
|
2530
|
+
*
|
|
2531
|
+
* @type {Array<string>}
|
|
2532
|
+
* @memberof ReportTypesResponse
|
|
2533
|
+
*/
|
|
2534
|
+
'types': Array<ReportTypesResponseTypesEnum>;
|
|
2535
|
+
}
|
|
2536
|
+
|
|
2537
|
+
export const ReportTypesResponseTypesEnum = {
|
|
2538
|
+
Progress: 'progress',
|
|
2539
|
+
Promotions: 'promotions',
|
|
2540
|
+
PromotionsExpanded: 'promotions_expanded'
|
|
2541
|
+
} as const;
|
|
2542
|
+
|
|
2543
|
+
export type ReportTypesResponseTypesEnum = typeof ReportTypesResponseTypesEnum[keyof typeof ReportTypesResponseTypesEnum];
|
|
2544
|
+
|
|
2485
2545
|
/**
|
|
2486
2546
|
* @type Rule
|
|
2487
2547
|
* @export
|
|
@@ -9474,6 +9534,208 @@ export class PromotionApi extends BaseAPI {
|
|
|
9474
9534
|
|
|
9475
9535
|
|
|
9476
9536
|
|
|
9537
|
+
/**
|
|
9538
|
+
* ReportApi - axios parameter creator
|
|
9539
|
+
* @export
|
|
9540
|
+
*/
|
|
9541
|
+
export const ReportApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
9542
|
+
return {
|
|
9543
|
+
/**
|
|
9544
|
+
* Generate a report
|
|
9545
|
+
* @summary Generate report
|
|
9546
|
+
* @param {string} type Report type
|
|
9547
|
+
* @param {string} [startDate] Start date for promotions
|
|
9548
|
+
* @param {string} [endDate] End date for promotions
|
|
9549
|
+
* @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
|
|
9550
|
+
* @param {*} [options] Override http request option.
|
|
9551
|
+
* @throws {RequiredError}
|
|
9552
|
+
*/
|
|
9553
|
+
generateReport: async (type: string, startDate?: string, endDate?: string, referenceID?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
9554
|
+
// verify required parameter 'type' is not null or undefined
|
|
9555
|
+
assertParamExists('generateReport', 'type', type)
|
|
9556
|
+
const localVarPath = `/admin/reports/{type}`
|
|
9557
|
+
.replace(`{${"type"}}`, encodeURIComponent(String(type)));
|
|
9558
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
9559
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
9560
|
+
let baseOptions;
|
|
9561
|
+
if (configuration) {
|
|
9562
|
+
baseOptions = configuration.baseOptions;
|
|
9563
|
+
}
|
|
9564
|
+
|
|
9565
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
9566
|
+
const localVarHeaderParameter = {} as any;
|
|
9567
|
+
const localVarQueryParameter = {} as any;
|
|
9568
|
+
|
|
9569
|
+
// authentication systemJWT required
|
|
9570
|
+
// http bearer authentication required
|
|
9571
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
9572
|
+
|
|
9573
|
+
if (startDate !== undefined) {
|
|
9574
|
+
localVarQueryParameter['startDate'] = (startDate as any instanceof Date) ?
|
|
9575
|
+
(startDate as any).toISOString() :
|
|
9576
|
+
startDate;
|
|
9577
|
+
}
|
|
9578
|
+
|
|
9579
|
+
if (endDate !== undefined) {
|
|
9580
|
+
localVarQueryParameter['endDate'] = (endDate as any instanceof Date) ?
|
|
9581
|
+
(endDate as any).toISOString() :
|
|
9582
|
+
endDate;
|
|
9583
|
+
}
|
|
9584
|
+
|
|
9585
|
+
if (referenceID !== undefined) {
|
|
9586
|
+
localVarQueryParameter['referenceID'] = referenceID;
|
|
9587
|
+
}
|
|
9588
|
+
|
|
9589
|
+
|
|
9590
|
+
|
|
9591
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
9592
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
9593
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
9594
|
+
|
|
9595
|
+
return {
|
|
9596
|
+
url: toPathString(localVarUrlObj),
|
|
9597
|
+
options: localVarRequestOptions,
|
|
9598
|
+
};
|
|
9599
|
+
},
|
|
9600
|
+
/**
|
|
9601
|
+
* List of all supported reports
|
|
9602
|
+
* @summary Get report types
|
|
9603
|
+
* @param {*} [options] Override http request option.
|
|
9604
|
+
* @throws {RequiredError}
|
|
9605
|
+
*/
|
|
9606
|
+
getReports: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
9607
|
+
const localVarPath = `/admin/reports`;
|
|
9608
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
9609
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
9610
|
+
let baseOptions;
|
|
9611
|
+
if (configuration) {
|
|
9612
|
+
baseOptions = configuration.baseOptions;
|
|
9613
|
+
}
|
|
9614
|
+
|
|
9615
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
9616
|
+
const localVarHeaderParameter = {} as any;
|
|
9617
|
+
const localVarQueryParameter = {} as any;
|
|
9618
|
+
|
|
9619
|
+
// authentication systemJWT required
|
|
9620
|
+
// http bearer authentication required
|
|
9621
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
9622
|
+
|
|
9623
|
+
|
|
9624
|
+
|
|
9625
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
9626
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
9627
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
9628
|
+
|
|
9629
|
+
return {
|
|
9630
|
+
url: toPathString(localVarUrlObj),
|
|
9631
|
+
options: localVarRequestOptions,
|
|
9632
|
+
};
|
|
9633
|
+
},
|
|
9634
|
+
}
|
|
9635
|
+
};
|
|
9636
|
+
|
|
9637
|
+
/**
|
|
9638
|
+
* ReportApi - functional programming interface
|
|
9639
|
+
* @export
|
|
9640
|
+
*/
|
|
9641
|
+
export const ReportApiFp = function(configuration?: Configuration) {
|
|
9642
|
+
const localVarAxiosParamCreator = ReportApiAxiosParamCreator(configuration)
|
|
9643
|
+
return {
|
|
9644
|
+
/**
|
|
9645
|
+
* Generate a report
|
|
9646
|
+
* @summary Generate report
|
|
9647
|
+
* @param {string} type Report type
|
|
9648
|
+
* @param {string} [startDate] Start date for promotions
|
|
9649
|
+
* @param {string} [endDate] End date for promotions
|
|
9650
|
+
* @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
|
|
9651
|
+
* @param {*} [options] Override http request option.
|
|
9652
|
+
* @throws {RequiredError}
|
|
9653
|
+
*/
|
|
9654
|
+
async generateReport(type: string, startDate?: string, endDate?: string, referenceID?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReportResponse>> {
|
|
9655
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.generateReport(type, startDate, endDate, referenceID, options);
|
|
9656
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
9657
|
+
},
|
|
9658
|
+
/**
|
|
9659
|
+
* List of all supported reports
|
|
9660
|
+
* @summary Get report types
|
|
9661
|
+
* @param {*} [options] Override http request option.
|
|
9662
|
+
* @throws {RequiredError}
|
|
9663
|
+
*/
|
|
9664
|
+
async getReports(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReportTypesResponse>> {
|
|
9665
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getReports(options);
|
|
9666
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
9667
|
+
},
|
|
9668
|
+
}
|
|
9669
|
+
};
|
|
9670
|
+
|
|
9671
|
+
/**
|
|
9672
|
+
* ReportApi - factory interface
|
|
9673
|
+
* @export
|
|
9674
|
+
*/
|
|
9675
|
+
export const ReportApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
9676
|
+
const localVarFp = ReportApiFp(configuration)
|
|
9677
|
+
return {
|
|
9678
|
+
/**
|
|
9679
|
+
* Generate a report
|
|
9680
|
+
* @summary Generate report
|
|
9681
|
+
* @param {string} type Report type
|
|
9682
|
+
* @param {string} [startDate] Start date for promotions
|
|
9683
|
+
* @param {string} [endDate] End date for promotions
|
|
9684
|
+
* @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
|
|
9685
|
+
* @param {*} [options] Override http request option.
|
|
9686
|
+
* @throws {RequiredError}
|
|
9687
|
+
*/
|
|
9688
|
+
generateReport(type: string, startDate?: string, endDate?: string, referenceID?: string, options?: any): AxiosPromise<ReportResponse> {
|
|
9689
|
+
return localVarFp.generateReport(type, startDate, endDate, referenceID, options).then((request) => request(axios, basePath));
|
|
9690
|
+
},
|
|
9691
|
+
/**
|
|
9692
|
+
* List of all supported reports
|
|
9693
|
+
* @summary Get report types
|
|
9694
|
+
* @param {*} [options] Override http request option.
|
|
9695
|
+
* @throws {RequiredError}
|
|
9696
|
+
*/
|
|
9697
|
+
getReports(options?: any): AxiosPromise<ReportTypesResponse> {
|
|
9698
|
+
return localVarFp.getReports(options).then((request) => request(axios, basePath));
|
|
9699
|
+
},
|
|
9700
|
+
};
|
|
9701
|
+
};
|
|
9702
|
+
|
|
9703
|
+
/**
|
|
9704
|
+
* ReportApi - object-oriented interface
|
|
9705
|
+
* @export
|
|
9706
|
+
* @class ReportApi
|
|
9707
|
+
* @extends {BaseAPI}
|
|
9708
|
+
*/
|
|
9709
|
+
export class ReportApi extends BaseAPI {
|
|
9710
|
+
/**
|
|
9711
|
+
* Generate a report
|
|
9712
|
+
* @summary Generate report
|
|
9713
|
+
* @param {string} type Report type
|
|
9714
|
+
* @param {string} [startDate] Start date for promotions
|
|
9715
|
+
* @param {string} [endDate] End date for promotions
|
|
9716
|
+
* @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
|
|
9717
|
+
* @param {*} [options] Override http request option.
|
|
9718
|
+
* @throws {RequiredError}
|
|
9719
|
+
* @memberof ReportApi
|
|
9720
|
+
*/
|
|
9721
|
+
public generateReport(type: string, startDate?: string, endDate?: string, referenceID?: string, options?: AxiosRequestConfig) {
|
|
9722
|
+
return ReportApiFp(this.configuration).generateReport(type, startDate, endDate, referenceID, options).then((request) => request(this.axios, this.basePath));
|
|
9723
|
+
}
|
|
9724
|
+
|
|
9725
|
+
/**
|
|
9726
|
+
* List of all supported reports
|
|
9727
|
+
* @summary Get report types
|
|
9728
|
+
* @param {*} [options] Override http request option.
|
|
9729
|
+
* @throws {RequiredError}
|
|
9730
|
+
* @memberof ReportApi
|
|
9731
|
+
*/
|
|
9732
|
+
public getReports(options?: AxiosRequestConfig) {
|
|
9733
|
+
return ReportApiFp(this.configuration).getReports(options).then((request) => request(this.axios, this.basePath));
|
|
9734
|
+
}
|
|
9735
|
+
}
|
|
9736
|
+
|
|
9737
|
+
|
|
9738
|
+
|
|
9477
9739
|
/**
|
|
9478
9740
|
* SegmentApi - axios parameter creator
|
|
9479
9741
|
* @export
|
package/dist/api.d.ts
CHANGED
|
@@ -918,6 +918,14 @@ export interface MetricsAggregation {
|
|
|
918
918
|
'perPeriod': {
|
|
919
919
|
[key: string]: MetricsCollection;
|
|
920
920
|
};
|
|
921
|
+
/**
|
|
922
|
+
*
|
|
923
|
+
* @type {{ [key: string]: PerRuleGroupMetricsCollection; }}
|
|
924
|
+
* @memberof MetricsAggregation
|
|
925
|
+
*/
|
|
926
|
+
'perRuleGroup': {
|
|
927
|
+
[key: string]: PerRuleGroupMetricsCollection;
|
|
928
|
+
};
|
|
921
929
|
/**
|
|
922
930
|
*
|
|
923
931
|
* @type {MetricsCollection}
|
|
@@ -1244,6 +1252,27 @@ export interface OrderListResponse {
|
|
|
1244
1252
|
*/
|
|
1245
1253
|
'nextToken'?: string;
|
|
1246
1254
|
}
|
|
1255
|
+
/**
|
|
1256
|
+
*
|
|
1257
|
+
* @export
|
|
1258
|
+
* @interface PerRuleGroupMetricsCollection
|
|
1259
|
+
*/
|
|
1260
|
+
export interface PerRuleGroupMetricsCollection {
|
|
1261
|
+
/**
|
|
1262
|
+
*
|
|
1263
|
+
* @type {{ [key: string]: MetricsCollection; }}
|
|
1264
|
+
* @memberof PerRuleGroupMetricsCollection
|
|
1265
|
+
*/
|
|
1266
|
+
'perPeriod': {
|
|
1267
|
+
[key: string]: MetricsCollection;
|
|
1268
|
+
};
|
|
1269
|
+
/**
|
|
1270
|
+
*
|
|
1271
|
+
* @type {MetricsCollection}
|
|
1272
|
+
* @memberof PerRuleGroupMetricsCollection
|
|
1273
|
+
*/
|
|
1274
|
+
'total': MetricsCollection;
|
|
1275
|
+
}
|
|
1247
1276
|
/**
|
|
1248
1277
|
*
|
|
1249
1278
|
* @export
|
|
@@ -2347,6 +2376,38 @@ export declare const Repetition: {
|
|
|
2347
2376
|
readonly Monthly: "monthly";
|
|
2348
2377
|
};
|
|
2349
2378
|
export type Repetition = typeof Repetition[keyof typeof Repetition];
|
|
2379
|
+
/**
|
|
2380
|
+
*
|
|
2381
|
+
* @export
|
|
2382
|
+
* @interface ReportResponse
|
|
2383
|
+
*/
|
|
2384
|
+
export interface ReportResponse {
|
|
2385
|
+
/**
|
|
2386
|
+
*
|
|
2387
|
+
* @type {string}
|
|
2388
|
+
* @memberof ReportResponse
|
|
2389
|
+
*/
|
|
2390
|
+
'url': string;
|
|
2391
|
+
}
|
|
2392
|
+
/**
|
|
2393
|
+
*
|
|
2394
|
+
* @export
|
|
2395
|
+
* @interface ReportTypesResponse
|
|
2396
|
+
*/
|
|
2397
|
+
export interface ReportTypesResponse {
|
|
2398
|
+
/**
|
|
2399
|
+
*
|
|
2400
|
+
* @type {Array<string>}
|
|
2401
|
+
* @memberof ReportTypesResponse
|
|
2402
|
+
*/
|
|
2403
|
+
'types': Array<ReportTypesResponseTypesEnum>;
|
|
2404
|
+
}
|
|
2405
|
+
export declare const ReportTypesResponseTypesEnum: {
|
|
2406
|
+
readonly Progress: "progress";
|
|
2407
|
+
readonly Promotions: "promotions";
|
|
2408
|
+
readonly PromotionsExpanded: "promotions_expanded";
|
|
2409
|
+
};
|
|
2410
|
+
export type ReportTypesResponseTypesEnum = typeof ReportTypesResponseTypesEnum[keyof typeof ReportTypesResponseTypesEnum];
|
|
2350
2411
|
/**
|
|
2351
2412
|
* @type Rule
|
|
2352
2413
|
* @export
|
|
@@ -6417,6 +6478,106 @@ export declare class PromotionApi extends BaseAPI {
|
|
|
6417
6478
|
*/
|
|
6418
6479
|
updatePromotion(id: string, updatePromotionRequest: UpdatePromotionRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Promotion, any>>;
|
|
6419
6480
|
}
|
|
6481
|
+
/**
|
|
6482
|
+
* ReportApi - axios parameter creator
|
|
6483
|
+
* @export
|
|
6484
|
+
*/
|
|
6485
|
+
export declare const ReportApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
6486
|
+
/**
|
|
6487
|
+
* Generate a report
|
|
6488
|
+
* @summary Generate report
|
|
6489
|
+
* @param {string} type Report type
|
|
6490
|
+
* @param {string} [startDate] Start date for promotions
|
|
6491
|
+
* @param {string} [endDate] End date for promotions
|
|
6492
|
+
* @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
|
|
6493
|
+
* @param {*} [options] Override http request option.
|
|
6494
|
+
* @throws {RequiredError}
|
|
6495
|
+
*/
|
|
6496
|
+
generateReport: (type: string, startDate?: string, endDate?: string, referenceID?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
6497
|
+
/**
|
|
6498
|
+
* List of all supported reports
|
|
6499
|
+
* @summary Get report types
|
|
6500
|
+
* @param {*} [options] Override http request option.
|
|
6501
|
+
* @throws {RequiredError}
|
|
6502
|
+
*/
|
|
6503
|
+
getReports: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
6504
|
+
};
|
|
6505
|
+
/**
|
|
6506
|
+
* ReportApi - functional programming interface
|
|
6507
|
+
* @export
|
|
6508
|
+
*/
|
|
6509
|
+
export declare const ReportApiFp: (configuration?: Configuration) => {
|
|
6510
|
+
/**
|
|
6511
|
+
* Generate a report
|
|
6512
|
+
* @summary Generate report
|
|
6513
|
+
* @param {string} type Report type
|
|
6514
|
+
* @param {string} [startDate] Start date for promotions
|
|
6515
|
+
* @param {string} [endDate] End date for promotions
|
|
6516
|
+
* @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
|
|
6517
|
+
* @param {*} [options] Override http request option.
|
|
6518
|
+
* @throws {RequiredError}
|
|
6519
|
+
*/
|
|
6520
|
+
generateReport(type: string, startDate?: string, endDate?: string, referenceID?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReportResponse>>;
|
|
6521
|
+
/**
|
|
6522
|
+
* List of all supported reports
|
|
6523
|
+
* @summary Get report types
|
|
6524
|
+
* @param {*} [options] Override http request option.
|
|
6525
|
+
* @throws {RequiredError}
|
|
6526
|
+
*/
|
|
6527
|
+
getReports(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReportTypesResponse>>;
|
|
6528
|
+
};
|
|
6529
|
+
/**
|
|
6530
|
+
* ReportApi - factory interface
|
|
6531
|
+
* @export
|
|
6532
|
+
*/
|
|
6533
|
+
export declare const ReportApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
6534
|
+
/**
|
|
6535
|
+
* Generate a report
|
|
6536
|
+
* @summary Generate report
|
|
6537
|
+
* @param {string} type Report type
|
|
6538
|
+
* @param {string} [startDate] Start date for promotions
|
|
6539
|
+
* @param {string} [endDate] End date for promotions
|
|
6540
|
+
* @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
|
|
6541
|
+
* @param {*} [options] Override http request option.
|
|
6542
|
+
* @throws {RequiredError}
|
|
6543
|
+
*/
|
|
6544
|
+
generateReport(type: string, startDate?: string, endDate?: string, referenceID?: string, options?: any): AxiosPromise<ReportResponse>;
|
|
6545
|
+
/**
|
|
6546
|
+
* List of all supported reports
|
|
6547
|
+
* @summary Get report types
|
|
6548
|
+
* @param {*} [options] Override http request option.
|
|
6549
|
+
* @throws {RequiredError}
|
|
6550
|
+
*/
|
|
6551
|
+
getReports(options?: any): AxiosPromise<ReportTypesResponse>;
|
|
6552
|
+
};
|
|
6553
|
+
/**
|
|
6554
|
+
* ReportApi - object-oriented interface
|
|
6555
|
+
* @export
|
|
6556
|
+
* @class ReportApi
|
|
6557
|
+
* @extends {BaseAPI}
|
|
6558
|
+
*/
|
|
6559
|
+
export declare class ReportApi extends BaseAPI {
|
|
6560
|
+
/**
|
|
6561
|
+
* Generate a report
|
|
6562
|
+
* @summary Generate report
|
|
6563
|
+
* @param {string} type Report type
|
|
6564
|
+
* @param {string} [startDate] Start date for promotions
|
|
6565
|
+
* @param {string} [endDate] End date for promotions
|
|
6566
|
+
* @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
|
|
6567
|
+
* @param {*} [options] Override http request option.
|
|
6568
|
+
* @throws {RequiredError}
|
|
6569
|
+
* @memberof ReportApi
|
|
6570
|
+
*/
|
|
6571
|
+
generateReport(type: string, startDate?: string, endDate?: string, referenceID?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ReportResponse, any>>;
|
|
6572
|
+
/**
|
|
6573
|
+
* List of all supported reports
|
|
6574
|
+
* @summary Get report types
|
|
6575
|
+
* @param {*} [options] Override http request option.
|
|
6576
|
+
* @throws {RequiredError}
|
|
6577
|
+
* @memberof ReportApi
|
|
6578
|
+
*/
|
|
6579
|
+
getReports(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ReportTypesResponse, any>>;
|
|
6580
|
+
}
|
|
6420
6581
|
/**
|
|
6421
6582
|
* SegmentApi - axios parameter creator
|
|
6422
6583
|
* @export
|
package/dist/api.js
CHANGED
|
@@ -22,9 +22,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
27
|
-
exports.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = exports.TransactionApi = exports.TransactionApiFactory = exports.TransactionApiFp = exports.TransactionApiAxiosParamCreator = exports.TenantApi = exports.TenantApiFactory = exports.TenantApiFp = exports.TenantApiAxiosParamCreator = exports.TagApi = exports.TagApiFactory = exports.TagApiFp = void 0;
|
|
25
|
+
exports.BulkApiFp = exports.BulkApiAxiosParamCreator = exports.BalanceApi = exports.BalanceApiFactory = exports.BalanceApiFp = exports.BalanceApiAxiosParamCreator = exports.AuditApi = exports.AuditApiFactory = exports.AuditApiFp = exports.AuditApiAxiosParamCreator = exports.WebhookKind = exports.UserSource = exports.UserRole = exports.TransactionSource = exports.TransactionKind = exports.TransactionEventKind = exports.TargetMu = exports.TagValidatorType = exports.TagRuleKind = exports.TagDataType = exports.SortDirection = exports.RuleKind = exports.RuleGroupState = exports.ReportTypesResponseTypesEnum = exports.Repetition = exports.PromotionType = exports.PromotionSortByField = exports.ProgressStateAggregation = exports.ProgressState = exports.ProgressInterval = exports.ProductUsage = exports.ProductStatus = exports.ProductRequestStatus = exports.ProductRequestApprovalRequestStatusEnum = exports.ProductKind = exports.ProductAvailability = exports.OrderKindEnum = exports.NotificationStatus = exports.NotificationKind = exports.NotificationChannel = exports.Locale = exports.Feature = exports.EventCreationRequestKindEnum = exports.CustomDealRestrictionPriority = exports.Condition = exports.BonusMu = exports.BeneficiaryKind = exports.AuditLogObjectType = exports.AuditLogActionEnum = exports.ApiKeyKind = void 0;
|
|
26
|
+
exports.ReportApi = exports.ReportApiFactory = exports.ReportApiFp = exports.ReportApiAxiosParamCreator = exports.PromotionApi = exports.PromotionApiFactory = exports.PromotionApiFp = exports.PromotionApiAxiosParamCreator = 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.IntegrationApi = exports.IntegrationApiFactory = exports.IntegrationApiFp = exports.IntegrationApiAxiosParamCreator = exports.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = exports.CustomDealsApi = exports.CustomDealsApiFactory = exports.CustomDealsApiFp = exports.CustomDealsApiAxiosParamCreator = exports.ConfigurationApi = exports.ConfigurationApiFactory = exports.ConfigurationApiFp = exports.ConfigurationApiAxiosParamCreator = exports.ClientApi = exports.ClientApiFactory = exports.ClientApiFp = exports.ClientApiAxiosParamCreator = exports.CategoryApi = exports.CategoryApiFactory = exports.CategoryApiFp = exports.CategoryApiAxiosParamCreator = exports.BulkApi = exports.BulkApiFactory = void 0;
|
|
27
|
+
exports.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = exports.TransactionApi = exports.TransactionApiFactory = exports.TransactionApiFp = exports.TransactionApiAxiosParamCreator = exports.TenantApi = exports.TenantApiFactory = exports.TenantApiFp = exports.TenantApiAxiosParamCreator = exports.TagApi = exports.TagApiFactory = exports.TagApiFp = exports.TagApiAxiosParamCreator = exports.SegmentApi = exports.SegmentApiFactory = exports.SegmentApiFp = exports.SegmentApiAxiosParamCreator = void 0;
|
|
28
28
|
const axios_1 = require("axios");
|
|
29
29
|
// Some imports not used depending on template conditions
|
|
30
30
|
// @ts-ignore
|
|
@@ -258,6 +258,11 @@ exports.Repetition = {
|
|
|
258
258
|
Weekly: 'weekly',
|
|
259
259
|
Monthly: 'monthly'
|
|
260
260
|
};
|
|
261
|
+
exports.ReportTypesResponseTypesEnum = {
|
|
262
|
+
Progress: 'progress',
|
|
263
|
+
Promotions: 'promotions',
|
|
264
|
+
PromotionsExpanded: 'promotions_expanded'
|
|
265
|
+
};
|
|
261
266
|
/**
|
|
262
267
|
*
|
|
263
268
|
* @export
|
|
@@ -5492,6 +5497,194 @@ class PromotionApi extends base_1.BaseAPI {
|
|
|
5492
5497
|
}
|
|
5493
5498
|
}
|
|
5494
5499
|
exports.PromotionApi = PromotionApi;
|
|
5500
|
+
/**
|
|
5501
|
+
* ReportApi - axios parameter creator
|
|
5502
|
+
* @export
|
|
5503
|
+
*/
|
|
5504
|
+
const ReportApiAxiosParamCreator = function (configuration) {
|
|
5505
|
+
return {
|
|
5506
|
+
/**
|
|
5507
|
+
* Generate a report
|
|
5508
|
+
* @summary Generate report
|
|
5509
|
+
* @param {string} type Report type
|
|
5510
|
+
* @param {string} [startDate] Start date for promotions
|
|
5511
|
+
* @param {string} [endDate] End date for promotions
|
|
5512
|
+
* @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
|
|
5513
|
+
* @param {*} [options] Override http request option.
|
|
5514
|
+
* @throws {RequiredError}
|
|
5515
|
+
*/
|
|
5516
|
+
generateReport: (type, startDate, endDate, referenceID, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
5517
|
+
// verify required parameter 'type' is not null or undefined
|
|
5518
|
+
(0, common_1.assertParamExists)('generateReport', 'type', type);
|
|
5519
|
+
const localVarPath = `/admin/reports/{type}`
|
|
5520
|
+
.replace(`{${"type"}}`, encodeURIComponent(String(type)));
|
|
5521
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5522
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
5523
|
+
let baseOptions;
|
|
5524
|
+
if (configuration) {
|
|
5525
|
+
baseOptions = configuration.baseOptions;
|
|
5526
|
+
}
|
|
5527
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
5528
|
+
const localVarHeaderParameter = {};
|
|
5529
|
+
const localVarQueryParameter = {};
|
|
5530
|
+
// authentication systemJWT required
|
|
5531
|
+
// http bearer authentication required
|
|
5532
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
5533
|
+
if (startDate !== undefined) {
|
|
5534
|
+
localVarQueryParameter['startDate'] = (startDate instanceof Date) ?
|
|
5535
|
+
startDate.toISOString() :
|
|
5536
|
+
startDate;
|
|
5537
|
+
}
|
|
5538
|
+
if (endDate !== undefined) {
|
|
5539
|
+
localVarQueryParameter['endDate'] = (endDate instanceof Date) ?
|
|
5540
|
+
endDate.toISOString() :
|
|
5541
|
+
endDate;
|
|
5542
|
+
}
|
|
5543
|
+
if (referenceID !== undefined) {
|
|
5544
|
+
localVarQueryParameter['referenceID'] = referenceID;
|
|
5545
|
+
}
|
|
5546
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
5547
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5548
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
5549
|
+
return {
|
|
5550
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
5551
|
+
options: localVarRequestOptions,
|
|
5552
|
+
};
|
|
5553
|
+
}),
|
|
5554
|
+
/**
|
|
5555
|
+
* List of all supported reports
|
|
5556
|
+
* @summary Get report types
|
|
5557
|
+
* @param {*} [options] Override http request option.
|
|
5558
|
+
* @throws {RequiredError}
|
|
5559
|
+
*/
|
|
5560
|
+
getReports: (options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
5561
|
+
const localVarPath = `/admin/reports`;
|
|
5562
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5563
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
5564
|
+
let baseOptions;
|
|
5565
|
+
if (configuration) {
|
|
5566
|
+
baseOptions = configuration.baseOptions;
|
|
5567
|
+
}
|
|
5568
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
5569
|
+
const localVarHeaderParameter = {};
|
|
5570
|
+
const localVarQueryParameter = {};
|
|
5571
|
+
// authentication systemJWT required
|
|
5572
|
+
// http bearer authentication required
|
|
5573
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
5574
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
5575
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5576
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
5577
|
+
return {
|
|
5578
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
5579
|
+
options: localVarRequestOptions,
|
|
5580
|
+
};
|
|
5581
|
+
}),
|
|
5582
|
+
};
|
|
5583
|
+
};
|
|
5584
|
+
exports.ReportApiAxiosParamCreator = ReportApiAxiosParamCreator;
|
|
5585
|
+
/**
|
|
5586
|
+
* ReportApi - functional programming interface
|
|
5587
|
+
* @export
|
|
5588
|
+
*/
|
|
5589
|
+
const ReportApiFp = function (configuration) {
|
|
5590
|
+
const localVarAxiosParamCreator = (0, exports.ReportApiAxiosParamCreator)(configuration);
|
|
5591
|
+
return {
|
|
5592
|
+
/**
|
|
5593
|
+
* Generate a report
|
|
5594
|
+
* @summary Generate report
|
|
5595
|
+
* @param {string} type Report type
|
|
5596
|
+
* @param {string} [startDate] Start date for promotions
|
|
5597
|
+
* @param {string} [endDate] End date for promotions
|
|
5598
|
+
* @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
|
|
5599
|
+
* @param {*} [options] Override http request option.
|
|
5600
|
+
* @throws {RequiredError}
|
|
5601
|
+
*/
|
|
5602
|
+
generateReport(type, startDate, endDate, referenceID, options) {
|
|
5603
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5604
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.generateReport(type, startDate, endDate, referenceID, options);
|
|
5605
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
5606
|
+
});
|
|
5607
|
+
},
|
|
5608
|
+
/**
|
|
5609
|
+
* List of all supported reports
|
|
5610
|
+
* @summary Get report types
|
|
5611
|
+
* @param {*} [options] Override http request option.
|
|
5612
|
+
* @throws {RequiredError}
|
|
5613
|
+
*/
|
|
5614
|
+
getReports(options) {
|
|
5615
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5616
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getReports(options);
|
|
5617
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
5618
|
+
});
|
|
5619
|
+
},
|
|
5620
|
+
};
|
|
5621
|
+
};
|
|
5622
|
+
exports.ReportApiFp = ReportApiFp;
|
|
5623
|
+
/**
|
|
5624
|
+
* ReportApi - factory interface
|
|
5625
|
+
* @export
|
|
5626
|
+
*/
|
|
5627
|
+
const ReportApiFactory = function (configuration, basePath, axios) {
|
|
5628
|
+
const localVarFp = (0, exports.ReportApiFp)(configuration);
|
|
5629
|
+
return {
|
|
5630
|
+
/**
|
|
5631
|
+
* Generate a report
|
|
5632
|
+
* @summary Generate report
|
|
5633
|
+
* @param {string} type Report type
|
|
5634
|
+
* @param {string} [startDate] Start date for promotions
|
|
5635
|
+
* @param {string} [endDate] End date for promotions
|
|
5636
|
+
* @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
|
|
5637
|
+
* @param {*} [options] Override http request option.
|
|
5638
|
+
* @throws {RequiredError}
|
|
5639
|
+
*/
|
|
5640
|
+
generateReport(type, startDate, endDate, referenceID, options) {
|
|
5641
|
+
return localVarFp.generateReport(type, startDate, endDate, referenceID, options).then((request) => request(axios, basePath));
|
|
5642
|
+
},
|
|
5643
|
+
/**
|
|
5644
|
+
* List of all supported reports
|
|
5645
|
+
* @summary Get report types
|
|
5646
|
+
* @param {*} [options] Override http request option.
|
|
5647
|
+
* @throws {RequiredError}
|
|
5648
|
+
*/
|
|
5649
|
+
getReports(options) {
|
|
5650
|
+
return localVarFp.getReports(options).then((request) => request(axios, basePath));
|
|
5651
|
+
},
|
|
5652
|
+
};
|
|
5653
|
+
};
|
|
5654
|
+
exports.ReportApiFactory = ReportApiFactory;
|
|
5655
|
+
/**
|
|
5656
|
+
* ReportApi - object-oriented interface
|
|
5657
|
+
* @export
|
|
5658
|
+
* @class ReportApi
|
|
5659
|
+
* @extends {BaseAPI}
|
|
5660
|
+
*/
|
|
5661
|
+
class ReportApi extends base_1.BaseAPI {
|
|
5662
|
+
/**
|
|
5663
|
+
* Generate a report
|
|
5664
|
+
* @summary Generate report
|
|
5665
|
+
* @param {string} type Report type
|
|
5666
|
+
* @param {string} [startDate] Start date for promotions
|
|
5667
|
+
* @param {string} [endDate] End date for promotions
|
|
5668
|
+
* @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
|
|
5669
|
+
* @param {*} [options] Override http request option.
|
|
5670
|
+
* @throws {RequiredError}
|
|
5671
|
+
* @memberof ReportApi
|
|
5672
|
+
*/
|
|
5673
|
+
generateReport(type, startDate, endDate, referenceID, options) {
|
|
5674
|
+
return (0, exports.ReportApiFp)(this.configuration).generateReport(type, startDate, endDate, referenceID, options).then((request) => request(this.axios, this.basePath));
|
|
5675
|
+
}
|
|
5676
|
+
/**
|
|
5677
|
+
* List of all supported reports
|
|
5678
|
+
* @summary Get report types
|
|
5679
|
+
* @param {*} [options] Override http request option.
|
|
5680
|
+
* @throws {RequiredError}
|
|
5681
|
+
* @memberof ReportApi
|
|
5682
|
+
*/
|
|
5683
|
+
getReports(options) {
|
|
5684
|
+
return (0, exports.ReportApiFp)(this.configuration).getReports(options).then((request) => request(this.axios, this.basePath));
|
|
5685
|
+
}
|
|
5686
|
+
}
|
|
5687
|
+
exports.ReportApi = ReportApi;
|
|
5495
5688
|
/**
|
|
5496
5689
|
* SegmentApi - axios parameter creator
|
|
5497
5690
|
* @export
|
package/dist/esm/api.d.ts
CHANGED
|
@@ -918,6 +918,14 @@ export interface MetricsAggregation {
|
|
|
918
918
|
'perPeriod': {
|
|
919
919
|
[key: string]: MetricsCollection;
|
|
920
920
|
};
|
|
921
|
+
/**
|
|
922
|
+
*
|
|
923
|
+
* @type {{ [key: string]: PerRuleGroupMetricsCollection; }}
|
|
924
|
+
* @memberof MetricsAggregation
|
|
925
|
+
*/
|
|
926
|
+
'perRuleGroup': {
|
|
927
|
+
[key: string]: PerRuleGroupMetricsCollection;
|
|
928
|
+
};
|
|
921
929
|
/**
|
|
922
930
|
*
|
|
923
931
|
* @type {MetricsCollection}
|
|
@@ -1244,6 +1252,27 @@ export interface OrderListResponse {
|
|
|
1244
1252
|
*/
|
|
1245
1253
|
'nextToken'?: string;
|
|
1246
1254
|
}
|
|
1255
|
+
/**
|
|
1256
|
+
*
|
|
1257
|
+
* @export
|
|
1258
|
+
* @interface PerRuleGroupMetricsCollection
|
|
1259
|
+
*/
|
|
1260
|
+
export interface PerRuleGroupMetricsCollection {
|
|
1261
|
+
/**
|
|
1262
|
+
*
|
|
1263
|
+
* @type {{ [key: string]: MetricsCollection; }}
|
|
1264
|
+
* @memberof PerRuleGroupMetricsCollection
|
|
1265
|
+
*/
|
|
1266
|
+
'perPeriod': {
|
|
1267
|
+
[key: string]: MetricsCollection;
|
|
1268
|
+
};
|
|
1269
|
+
/**
|
|
1270
|
+
*
|
|
1271
|
+
* @type {MetricsCollection}
|
|
1272
|
+
* @memberof PerRuleGroupMetricsCollection
|
|
1273
|
+
*/
|
|
1274
|
+
'total': MetricsCollection;
|
|
1275
|
+
}
|
|
1247
1276
|
/**
|
|
1248
1277
|
*
|
|
1249
1278
|
* @export
|
|
@@ -2347,6 +2376,38 @@ export declare const Repetition: {
|
|
|
2347
2376
|
readonly Monthly: "monthly";
|
|
2348
2377
|
};
|
|
2349
2378
|
export type Repetition = typeof Repetition[keyof typeof Repetition];
|
|
2379
|
+
/**
|
|
2380
|
+
*
|
|
2381
|
+
* @export
|
|
2382
|
+
* @interface ReportResponse
|
|
2383
|
+
*/
|
|
2384
|
+
export interface ReportResponse {
|
|
2385
|
+
/**
|
|
2386
|
+
*
|
|
2387
|
+
* @type {string}
|
|
2388
|
+
* @memberof ReportResponse
|
|
2389
|
+
*/
|
|
2390
|
+
'url': string;
|
|
2391
|
+
}
|
|
2392
|
+
/**
|
|
2393
|
+
*
|
|
2394
|
+
* @export
|
|
2395
|
+
* @interface ReportTypesResponse
|
|
2396
|
+
*/
|
|
2397
|
+
export interface ReportTypesResponse {
|
|
2398
|
+
/**
|
|
2399
|
+
*
|
|
2400
|
+
* @type {Array<string>}
|
|
2401
|
+
* @memberof ReportTypesResponse
|
|
2402
|
+
*/
|
|
2403
|
+
'types': Array<ReportTypesResponseTypesEnum>;
|
|
2404
|
+
}
|
|
2405
|
+
export declare const ReportTypesResponseTypesEnum: {
|
|
2406
|
+
readonly Progress: "progress";
|
|
2407
|
+
readonly Promotions: "promotions";
|
|
2408
|
+
readonly PromotionsExpanded: "promotions_expanded";
|
|
2409
|
+
};
|
|
2410
|
+
export type ReportTypesResponseTypesEnum = typeof ReportTypesResponseTypesEnum[keyof typeof ReportTypesResponseTypesEnum];
|
|
2350
2411
|
/**
|
|
2351
2412
|
* @type Rule
|
|
2352
2413
|
* @export
|
|
@@ -6417,6 +6478,106 @@ export declare class PromotionApi extends BaseAPI {
|
|
|
6417
6478
|
*/
|
|
6418
6479
|
updatePromotion(id: string, updatePromotionRequest: UpdatePromotionRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Promotion, any>>;
|
|
6419
6480
|
}
|
|
6481
|
+
/**
|
|
6482
|
+
* ReportApi - axios parameter creator
|
|
6483
|
+
* @export
|
|
6484
|
+
*/
|
|
6485
|
+
export declare const ReportApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
6486
|
+
/**
|
|
6487
|
+
* Generate a report
|
|
6488
|
+
* @summary Generate report
|
|
6489
|
+
* @param {string} type Report type
|
|
6490
|
+
* @param {string} [startDate] Start date for promotions
|
|
6491
|
+
* @param {string} [endDate] End date for promotions
|
|
6492
|
+
* @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
|
|
6493
|
+
* @param {*} [options] Override http request option.
|
|
6494
|
+
* @throws {RequiredError}
|
|
6495
|
+
*/
|
|
6496
|
+
generateReport: (type: string, startDate?: string, endDate?: string, referenceID?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
6497
|
+
/**
|
|
6498
|
+
* List of all supported reports
|
|
6499
|
+
* @summary Get report types
|
|
6500
|
+
* @param {*} [options] Override http request option.
|
|
6501
|
+
* @throws {RequiredError}
|
|
6502
|
+
*/
|
|
6503
|
+
getReports: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
6504
|
+
};
|
|
6505
|
+
/**
|
|
6506
|
+
* ReportApi - functional programming interface
|
|
6507
|
+
* @export
|
|
6508
|
+
*/
|
|
6509
|
+
export declare const ReportApiFp: (configuration?: Configuration) => {
|
|
6510
|
+
/**
|
|
6511
|
+
* Generate a report
|
|
6512
|
+
* @summary Generate report
|
|
6513
|
+
* @param {string} type Report type
|
|
6514
|
+
* @param {string} [startDate] Start date for promotions
|
|
6515
|
+
* @param {string} [endDate] End date for promotions
|
|
6516
|
+
* @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
|
|
6517
|
+
* @param {*} [options] Override http request option.
|
|
6518
|
+
* @throws {RequiredError}
|
|
6519
|
+
*/
|
|
6520
|
+
generateReport(type: string, startDate?: string, endDate?: string, referenceID?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReportResponse>>;
|
|
6521
|
+
/**
|
|
6522
|
+
* List of all supported reports
|
|
6523
|
+
* @summary Get report types
|
|
6524
|
+
* @param {*} [options] Override http request option.
|
|
6525
|
+
* @throws {RequiredError}
|
|
6526
|
+
*/
|
|
6527
|
+
getReports(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReportTypesResponse>>;
|
|
6528
|
+
};
|
|
6529
|
+
/**
|
|
6530
|
+
* ReportApi - factory interface
|
|
6531
|
+
* @export
|
|
6532
|
+
*/
|
|
6533
|
+
export declare const ReportApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
6534
|
+
/**
|
|
6535
|
+
* Generate a report
|
|
6536
|
+
* @summary Generate report
|
|
6537
|
+
* @param {string} type Report type
|
|
6538
|
+
* @param {string} [startDate] Start date for promotions
|
|
6539
|
+
* @param {string} [endDate] End date for promotions
|
|
6540
|
+
* @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
|
|
6541
|
+
* @param {*} [options] Override http request option.
|
|
6542
|
+
* @throws {RequiredError}
|
|
6543
|
+
*/
|
|
6544
|
+
generateReport(type: string, startDate?: string, endDate?: string, referenceID?: string, options?: any): AxiosPromise<ReportResponse>;
|
|
6545
|
+
/**
|
|
6546
|
+
* List of all supported reports
|
|
6547
|
+
* @summary Get report types
|
|
6548
|
+
* @param {*} [options] Override http request option.
|
|
6549
|
+
* @throws {RequiredError}
|
|
6550
|
+
*/
|
|
6551
|
+
getReports(options?: any): AxiosPromise<ReportTypesResponse>;
|
|
6552
|
+
};
|
|
6553
|
+
/**
|
|
6554
|
+
* ReportApi - object-oriented interface
|
|
6555
|
+
* @export
|
|
6556
|
+
* @class ReportApi
|
|
6557
|
+
* @extends {BaseAPI}
|
|
6558
|
+
*/
|
|
6559
|
+
export declare class ReportApi extends BaseAPI {
|
|
6560
|
+
/**
|
|
6561
|
+
* Generate a report
|
|
6562
|
+
* @summary Generate report
|
|
6563
|
+
* @param {string} type Report type
|
|
6564
|
+
* @param {string} [startDate] Start date for promotions
|
|
6565
|
+
* @param {string} [endDate] End date for promotions
|
|
6566
|
+
* @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
|
|
6567
|
+
* @param {*} [options] Override http request option.
|
|
6568
|
+
* @throws {RequiredError}
|
|
6569
|
+
* @memberof ReportApi
|
|
6570
|
+
*/
|
|
6571
|
+
generateReport(type: string, startDate?: string, endDate?: string, referenceID?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ReportResponse, any>>;
|
|
6572
|
+
/**
|
|
6573
|
+
* List of all supported reports
|
|
6574
|
+
* @summary Get report types
|
|
6575
|
+
* @param {*} [options] Override http request option.
|
|
6576
|
+
* @throws {RequiredError}
|
|
6577
|
+
* @memberof ReportApi
|
|
6578
|
+
*/
|
|
6579
|
+
getReports(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ReportTypesResponse, any>>;
|
|
6580
|
+
}
|
|
6420
6581
|
/**
|
|
6421
6582
|
* SegmentApi - axios parameter creator
|
|
6422
6583
|
* @export
|
package/dist/esm/api.js
CHANGED
|
@@ -253,6 +253,11 @@ export const Repetition = {
|
|
|
253
253
|
Weekly: 'weekly',
|
|
254
254
|
Monthly: 'monthly'
|
|
255
255
|
};
|
|
256
|
+
export const ReportTypesResponseTypesEnum = {
|
|
257
|
+
Progress: 'progress',
|
|
258
|
+
Promotions: 'promotions',
|
|
259
|
+
PromotionsExpanded: 'promotions_expanded'
|
|
260
|
+
};
|
|
256
261
|
/**
|
|
257
262
|
*
|
|
258
263
|
* @export
|
|
@@ -5431,6 +5436,190 @@ export class PromotionApi extends BaseAPI {
|
|
|
5431
5436
|
return PromotionApiFp(this.configuration).updatePromotion(id, updatePromotionRequest, options).then((request) => request(this.axios, this.basePath));
|
|
5432
5437
|
}
|
|
5433
5438
|
}
|
|
5439
|
+
/**
|
|
5440
|
+
* ReportApi - axios parameter creator
|
|
5441
|
+
* @export
|
|
5442
|
+
*/
|
|
5443
|
+
export const ReportApiAxiosParamCreator = function (configuration) {
|
|
5444
|
+
return {
|
|
5445
|
+
/**
|
|
5446
|
+
* Generate a report
|
|
5447
|
+
* @summary Generate report
|
|
5448
|
+
* @param {string} type Report type
|
|
5449
|
+
* @param {string} [startDate] Start date for promotions
|
|
5450
|
+
* @param {string} [endDate] End date for promotions
|
|
5451
|
+
* @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
|
|
5452
|
+
* @param {*} [options] Override http request option.
|
|
5453
|
+
* @throws {RequiredError}
|
|
5454
|
+
*/
|
|
5455
|
+
generateReport: (type, startDate, endDate, referenceID, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
5456
|
+
// verify required parameter 'type' is not null or undefined
|
|
5457
|
+
assertParamExists('generateReport', 'type', type);
|
|
5458
|
+
const localVarPath = `/admin/reports/{type}`
|
|
5459
|
+
.replace(`{${"type"}}`, encodeURIComponent(String(type)));
|
|
5460
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5461
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5462
|
+
let baseOptions;
|
|
5463
|
+
if (configuration) {
|
|
5464
|
+
baseOptions = configuration.baseOptions;
|
|
5465
|
+
}
|
|
5466
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
5467
|
+
const localVarHeaderParameter = {};
|
|
5468
|
+
const localVarQueryParameter = {};
|
|
5469
|
+
// authentication systemJWT required
|
|
5470
|
+
// http bearer authentication required
|
|
5471
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
5472
|
+
if (startDate !== undefined) {
|
|
5473
|
+
localVarQueryParameter['startDate'] = (startDate instanceof Date) ?
|
|
5474
|
+
startDate.toISOString() :
|
|
5475
|
+
startDate;
|
|
5476
|
+
}
|
|
5477
|
+
if (endDate !== undefined) {
|
|
5478
|
+
localVarQueryParameter['endDate'] = (endDate instanceof Date) ?
|
|
5479
|
+
endDate.toISOString() :
|
|
5480
|
+
endDate;
|
|
5481
|
+
}
|
|
5482
|
+
if (referenceID !== undefined) {
|
|
5483
|
+
localVarQueryParameter['referenceID'] = referenceID;
|
|
5484
|
+
}
|
|
5485
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5486
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5487
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
5488
|
+
return {
|
|
5489
|
+
url: toPathString(localVarUrlObj),
|
|
5490
|
+
options: localVarRequestOptions,
|
|
5491
|
+
};
|
|
5492
|
+
}),
|
|
5493
|
+
/**
|
|
5494
|
+
* List of all supported reports
|
|
5495
|
+
* @summary Get report types
|
|
5496
|
+
* @param {*} [options] Override http request option.
|
|
5497
|
+
* @throws {RequiredError}
|
|
5498
|
+
*/
|
|
5499
|
+
getReports: (options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
5500
|
+
const localVarPath = `/admin/reports`;
|
|
5501
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5502
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5503
|
+
let baseOptions;
|
|
5504
|
+
if (configuration) {
|
|
5505
|
+
baseOptions = configuration.baseOptions;
|
|
5506
|
+
}
|
|
5507
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
5508
|
+
const localVarHeaderParameter = {};
|
|
5509
|
+
const localVarQueryParameter = {};
|
|
5510
|
+
// authentication systemJWT required
|
|
5511
|
+
// http bearer authentication required
|
|
5512
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
5513
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5514
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5515
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
5516
|
+
return {
|
|
5517
|
+
url: toPathString(localVarUrlObj),
|
|
5518
|
+
options: localVarRequestOptions,
|
|
5519
|
+
};
|
|
5520
|
+
}),
|
|
5521
|
+
};
|
|
5522
|
+
};
|
|
5523
|
+
/**
|
|
5524
|
+
* ReportApi - functional programming interface
|
|
5525
|
+
* @export
|
|
5526
|
+
*/
|
|
5527
|
+
export const ReportApiFp = function (configuration) {
|
|
5528
|
+
const localVarAxiosParamCreator = ReportApiAxiosParamCreator(configuration);
|
|
5529
|
+
return {
|
|
5530
|
+
/**
|
|
5531
|
+
* Generate a report
|
|
5532
|
+
* @summary Generate report
|
|
5533
|
+
* @param {string} type Report type
|
|
5534
|
+
* @param {string} [startDate] Start date for promotions
|
|
5535
|
+
* @param {string} [endDate] End date for promotions
|
|
5536
|
+
* @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
|
|
5537
|
+
* @param {*} [options] Override http request option.
|
|
5538
|
+
* @throws {RequiredError}
|
|
5539
|
+
*/
|
|
5540
|
+
generateReport(type, startDate, endDate, referenceID, options) {
|
|
5541
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5542
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.generateReport(type, startDate, endDate, referenceID, options);
|
|
5543
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
5544
|
+
});
|
|
5545
|
+
},
|
|
5546
|
+
/**
|
|
5547
|
+
* List of all supported reports
|
|
5548
|
+
* @summary Get report types
|
|
5549
|
+
* @param {*} [options] Override http request option.
|
|
5550
|
+
* @throws {RequiredError}
|
|
5551
|
+
*/
|
|
5552
|
+
getReports(options) {
|
|
5553
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5554
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getReports(options);
|
|
5555
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
5556
|
+
});
|
|
5557
|
+
},
|
|
5558
|
+
};
|
|
5559
|
+
};
|
|
5560
|
+
/**
|
|
5561
|
+
* ReportApi - factory interface
|
|
5562
|
+
* @export
|
|
5563
|
+
*/
|
|
5564
|
+
export const ReportApiFactory = function (configuration, basePath, axios) {
|
|
5565
|
+
const localVarFp = ReportApiFp(configuration);
|
|
5566
|
+
return {
|
|
5567
|
+
/**
|
|
5568
|
+
* Generate a report
|
|
5569
|
+
* @summary Generate report
|
|
5570
|
+
* @param {string} type Report type
|
|
5571
|
+
* @param {string} [startDate] Start date for promotions
|
|
5572
|
+
* @param {string} [endDate] End date for promotions
|
|
5573
|
+
* @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
|
|
5574
|
+
* @param {*} [options] Override http request option.
|
|
5575
|
+
* @throws {RequiredError}
|
|
5576
|
+
*/
|
|
5577
|
+
generateReport(type, startDate, endDate, referenceID, options) {
|
|
5578
|
+
return localVarFp.generateReport(type, startDate, endDate, referenceID, options).then((request) => request(axios, basePath));
|
|
5579
|
+
},
|
|
5580
|
+
/**
|
|
5581
|
+
* List of all supported reports
|
|
5582
|
+
* @summary Get report types
|
|
5583
|
+
* @param {*} [options] Override http request option.
|
|
5584
|
+
* @throws {RequiredError}
|
|
5585
|
+
*/
|
|
5586
|
+
getReports(options) {
|
|
5587
|
+
return localVarFp.getReports(options).then((request) => request(axios, basePath));
|
|
5588
|
+
},
|
|
5589
|
+
};
|
|
5590
|
+
};
|
|
5591
|
+
/**
|
|
5592
|
+
* ReportApi - object-oriented interface
|
|
5593
|
+
* @export
|
|
5594
|
+
* @class ReportApi
|
|
5595
|
+
* @extends {BaseAPI}
|
|
5596
|
+
*/
|
|
5597
|
+
export class ReportApi extends BaseAPI {
|
|
5598
|
+
/**
|
|
5599
|
+
* Generate a report
|
|
5600
|
+
* @summary Generate report
|
|
5601
|
+
* @param {string} type Report type
|
|
5602
|
+
* @param {string} [startDate] Start date for promotions
|
|
5603
|
+
* @param {string} [endDate] End date for promotions
|
|
5604
|
+
* @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
|
|
5605
|
+
* @param {*} [options] Override http request option.
|
|
5606
|
+
* @throws {RequiredError}
|
|
5607
|
+
* @memberof ReportApi
|
|
5608
|
+
*/
|
|
5609
|
+
generateReport(type, startDate, endDate, referenceID, options) {
|
|
5610
|
+
return ReportApiFp(this.configuration).generateReport(type, startDate, endDate, referenceID, options).then((request) => request(this.axios, this.basePath));
|
|
5611
|
+
}
|
|
5612
|
+
/**
|
|
5613
|
+
* List of all supported reports
|
|
5614
|
+
* @summary Get report types
|
|
5615
|
+
* @param {*} [options] Override http request option.
|
|
5616
|
+
* @throws {RequiredError}
|
|
5617
|
+
* @memberof ReportApi
|
|
5618
|
+
*/
|
|
5619
|
+
getReports(options) {
|
|
5620
|
+
return ReportApiFp(this.configuration).getReports(options).then((request) => request(this.axios, this.basePath));
|
|
5621
|
+
}
|
|
5622
|
+
}
|
|
5434
5623
|
/**
|
|
5435
5624
|
* SegmentApi - axios parameter creator
|
|
5436
5625
|
* @export
|