flexinet-api 0.0.1148-prerelease0 → 0.0.1155-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 CHANGED
@@ -1,4 +1,4 @@
1
- ## flexinet-api@0.0.1148-prerelease0
1
+ ## flexinet-api@0.0.1155-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.1148-prerelease0 --save
39
+ npm install flexinet-api@0.0.1155-prerelease0 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
package/api.ts CHANGED
@@ -2223,6 +2223,12 @@ export interface Promotion {
2223
2223
  * @memberof Promotion
2224
2224
  */
2225
2225
  'notificationConfig': PromotionNotificationConfig;
2226
+ /**
2227
+ *
2228
+ * @type {PromotionStatus}
2229
+ * @memberof Promotion
2230
+ */
2231
+ 'status'?: PromotionStatus;
2226
2232
  }
2227
2233
 
2228
2234
 
@@ -2446,6 +2452,19 @@ export const PromotionSortByField = {
2446
2452
  export type PromotionSortByField = typeof PromotionSortByField[keyof typeof PromotionSortByField];
2447
2453
 
2448
2454
 
2455
+ /**
2456
+ *
2457
+ * @export
2458
+ * @enum {string}
2459
+ */
2460
+
2461
+ export const PromotionStatus = {
2462
+ Pending: 'pending'
2463
+ } as const;
2464
+
2465
+ export type PromotionStatus = typeof PromotionStatus[keyof typeof PromotionStatus];
2466
+
2467
+
2449
2468
  /**
2450
2469
  *
2451
2470
  * @export
@@ -2521,6 +2540,44 @@ export const Repetition = {
2521
2540
  export type Repetition = typeof Repetition[keyof typeof Repetition];
2522
2541
 
2523
2542
 
2543
+ /**
2544
+ *
2545
+ * @export
2546
+ * @interface ReportCreationRequest
2547
+ */
2548
+ export interface ReportCreationRequest {
2549
+ /**
2550
+ *
2551
+ * @type {string}
2552
+ * @memberof ReportCreationRequest
2553
+ */
2554
+ 'startDate'?: string;
2555
+ /**
2556
+ *
2557
+ * @type {string}
2558
+ * @memberof ReportCreationRequest
2559
+ */
2560
+ 'endDate'?: string;
2561
+ /**
2562
+ *
2563
+ * @type {string}
2564
+ * @memberof ReportCreationRequest
2565
+ */
2566
+ 'referenceID'?: string;
2567
+ }
2568
+ /**
2569
+ *
2570
+ * @export
2571
+ * @interface ReportListResponse
2572
+ */
2573
+ export interface ReportListResponse {
2574
+ /**
2575
+ *
2576
+ * @type {Array<ReportResponse>}
2577
+ * @memberof ReportListResponse
2578
+ */
2579
+ 'reports': Array<ReportResponse>;
2580
+ }
2524
2581
  /**
2525
2582
  *
2526
2583
  * @export
@@ -2532,7 +2589,25 @@ export interface ReportResponse {
2532
2589
  * @type {string}
2533
2590
  * @memberof ReportResponse
2534
2591
  */
2535
- 'url': string;
2592
+ 'name': string;
2593
+ /**
2594
+ *
2595
+ * @type {string}
2596
+ * @memberof ReportResponse
2597
+ */
2598
+ 'url'?: string;
2599
+ /**
2600
+ *
2601
+ * @type {string}
2602
+ * @memberof ReportResponse
2603
+ */
2604
+ 'type': string;
2605
+ /**
2606
+ *
2607
+ * @type {string}
2608
+ * @memberof ReportResponse
2609
+ */
2610
+ 'createdAt': string;
2536
2611
  }
2537
2612
  /**
2538
2613
  *
@@ -3248,7 +3323,7 @@ export interface TargetLevel {
3248
3323
  export const TargetMu = {
3249
3324
  Currency: 'currency',
3250
3325
  Product: 'product',
3251
- Additional: 'additional'
3326
+ AdditionalMu: 'additionalMU'
3252
3327
  } as const;
3253
3328
 
3254
3329
  export type TargetMu = typeof TargetMu[keyof typeof TargetMu];
@@ -9566,13 +9641,11 @@ export const ReportApiAxiosParamCreator = function (configuration?: Configuratio
9566
9641
  * Generate a report
9567
9642
  * @summary Generate report
9568
9643
  * @param {string} type Report type
9569
- * @param {string} [startDate] Start date for promotions
9570
- * @param {string} [endDate] End date for promotions
9571
- * @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
9644
+ * @param {ReportCreationRequest} [reportCreationRequest]
9572
9645
  * @param {*} [options] Override http request option.
9573
9646
  * @throws {RequiredError}
9574
9647
  */
9575
- generateReport: async (type: string, startDate?: string, endDate?: string, referenceID?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
9648
+ generateReport: async (type: string, reportCreationRequest?: ReportCreationRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
9576
9649
  // verify required parameter 'type' is not null or undefined
9577
9650
  assertParamExists('generateReport', 'type', type)
9578
9651
  const localVarPath = `/admin/reports/{type}`
@@ -9584,7 +9657,7 @@ export const ReportApiAxiosParamCreator = function (configuration?: Configuratio
9584
9657
  baseOptions = configuration.baseOptions;
9585
9658
  }
9586
9659
 
9587
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
9660
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
9588
9661
  const localVarHeaderParameter = {} as any;
9589
9662
  const localVarQueryParameter = {} as any;
9590
9663
 
@@ -9592,27 +9665,14 @@ export const ReportApiAxiosParamCreator = function (configuration?: Configuratio
9592
9665
  // http bearer authentication required
9593
9666
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
9594
9667
 
9595
- if (startDate !== undefined) {
9596
- localVarQueryParameter['startDate'] = (startDate as any instanceof Date) ?
9597
- (startDate as any).toISOString() :
9598
- startDate;
9599
- }
9600
-
9601
- if (endDate !== undefined) {
9602
- localVarQueryParameter['endDate'] = (endDate as any instanceof Date) ?
9603
- (endDate as any).toISOString() :
9604
- endDate;
9605
- }
9606
-
9607
- if (referenceID !== undefined) {
9608
- localVarQueryParameter['referenceID'] = referenceID;
9609
- }
9610
-
9611
9668
 
9612
9669
 
9670
+ localVarHeaderParameter['Content-Type'] = 'application/json';
9671
+
9613
9672
  setSearchParams(localVarUrlObj, localVarQueryParameter);
9614
9673
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
9615
9674
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
9675
+ localVarRequestOptions.data = serializeDataIfNeeded(reportCreationRequest, localVarRequestOptions, configuration)
9616
9676
 
9617
9677
  return {
9618
9678
  url: toPathString(localVarUrlObj),
@@ -9644,6 +9704,44 @@ export const ReportApiAxiosParamCreator = function (configuration?: Configuratio
9644
9704
 
9645
9705
 
9646
9706
 
9707
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
9708
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
9709
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
9710
+
9711
+ return {
9712
+ url: toPathString(localVarUrlObj),
9713
+ options: localVarRequestOptions,
9714
+ };
9715
+ },
9716
+ /**
9717
+ * List all generated reports for type
9718
+ * @summary List reports
9719
+ * @param {string} type Report type
9720
+ * @param {*} [options] Override http request option.
9721
+ * @throws {RequiredError}
9722
+ */
9723
+ listReport: async (type: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
9724
+ // verify required parameter 'type' is not null or undefined
9725
+ assertParamExists('listReport', 'type', type)
9726
+ const localVarPath = `/admin/reports/{type}`
9727
+ .replace(`{${"type"}}`, encodeURIComponent(String(type)));
9728
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
9729
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
9730
+ let baseOptions;
9731
+ if (configuration) {
9732
+ baseOptions = configuration.baseOptions;
9733
+ }
9734
+
9735
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
9736
+ const localVarHeaderParameter = {} as any;
9737
+ const localVarQueryParameter = {} as any;
9738
+
9739
+ // authentication systemJWT required
9740
+ // http bearer authentication required
9741
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
9742
+
9743
+
9744
+
9647
9745
  setSearchParams(localVarUrlObj, localVarQueryParameter);
9648
9746
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
9649
9747
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -9667,14 +9765,12 @@ export const ReportApiFp = function(configuration?: Configuration) {
9667
9765
  * Generate a report
9668
9766
  * @summary Generate report
9669
9767
  * @param {string} type Report type
9670
- * @param {string} [startDate] Start date for promotions
9671
- * @param {string} [endDate] End date for promotions
9672
- * @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
9768
+ * @param {ReportCreationRequest} [reportCreationRequest]
9673
9769
  * @param {*} [options] Override http request option.
9674
9770
  * @throws {RequiredError}
9675
9771
  */
9676
- async generateReport(type: string, startDate?: string, endDate?: string, referenceID?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReportResponse>> {
9677
- const localVarAxiosArgs = await localVarAxiosParamCreator.generateReport(type, startDate, endDate, referenceID, options);
9772
+ async generateReport(type: string, reportCreationRequest?: ReportCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReportResponse>> {
9773
+ const localVarAxiosArgs = await localVarAxiosParamCreator.generateReport(type, reportCreationRequest, options);
9678
9774
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
9679
9775
  },
9680
9776
  /**
@@ -9687,6 +9783,17 @@ export const ReportApiFp = function(configuration?: Configuration) {
9687
9783
  const localVarAxiosArgs = await localVarAxiosParamCreator.getReports(options);
9688
9784
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
9689
9785
  },
9786
+ /**
9787
+ * List all generated reports for type
9788
+ * @summary List reports
9789
+ * @param {string} type Report type
9790
+ * @param {*} [options] Override http request option.
9791
+ * @throws {RequiredError}
9792
+ */
9793
+ async listReport(type: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReportListResponse>> {
9794
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listReport(type, options);
9795
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
9796
+ },
9690
9797
  }
9691
9798
  };
9692
9799
 
@@ -9701,14 +9808,12 @@ export const ReportApiFactory = function (configuration?: Configuration, basePat
9701
9808
  * Generate a report
9702
9809
  * @summary Generate report
9703
9810
  * @param {string} type Report type
9704
- * @param {string} [startDate] Start date for promotions
9705
- * @param {string} [endDate] End date for promotions
9706
- * @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
9811
+ * @param {ReportCreationRequest} [reportCreationRequest]
9707
9812
  * @param {*} [options] Override http request option.
9708
9813
  * @throws {RequiredError}
9709
9814
  */
9710
- generateReport(type: string, startDate?: string, endDate?: string, referenceID?: string, options?: any): AxiosPromise<ReportResponse> {
9711
- return localVarFp.generateReport(type, startDate, endDate, referenceID, options).then((request) => request(axios, basePath));
9815
+ generateReport(type: string, reportCreationRequest?: ReportCreationRequest, options?: any): AxiosPromise<ReportResponse> {
9816
+ return localVarFp.generateReport(type, reportCreationRequest, options).then((request) => request(axios, basePath));
9712
9817
  },
9713
9818
  /**
9714
9819
  * List of all supported reports
@@ -9719,6 +9824,16 @@ export const ReportApiFactory = function (configuration?: Configuration, basePat
9719
9824
  getReports(options?: any): AxiosPromise<ReportTypesResponse> {
9720
9825
  return localVarFp.getReports(options).then((request) => request(axios, basePath));
9721
9826
  },
9827
+ /**
9828
+ * List all generated reports for type
9829
+ * @summary List reports
9830
+ * @param {string} type Report type
9831
+ * @param {*} [options] Override http request option.
9832
+ * @throws {RequiredError}
9833
+ */
9834
+ listReport(type: string, options?: any): AxiosPromise<ReportListResponse> {
9835
+ return localVarFp.listReport(type, options).then((request) => request(axios, basePath));
9836
+ },
9722
9837
  };
9723
9838
  };
9724
9839
 
@@ -9733,15 +9848,13 @@ export class ReportApi extends BaseAPI {
9733
9848
  * Generate a report
9734
9849
  * @summary Generate report
9735
9850
  * @param {string} type Report type
9736
- * @param {string} [startDate] Start date for promotions
9737
- * @param {string} [endDate] End date for promotions
9738
- * @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
9851
+ * @param {ReportCreationRequest} [reportCreationRequest]
9739
9852
  * @param {*} [options] Override http request option.
9740
9853
  * @throws {RequiredError}
9741
9854
  * @memberof ReportApi
9742
9855
  */
9743
- public generateReport(type: string, startDate?: string, endDate?: string, referenceID?: string, options?: AxiosRequestConfig) {
9744
- return ReportApiFp(this.configuration).generateReport(type, startDate, endDate, referenceID, options).then((request) => request(this.axios, this.basePath));
9856
+ public generateReport(type: string, reportCreationRequest?: ReportCreationRequest, options?: AxiosRequestConfig) {
9857
+ return ReportApiFp(this.configuration).generateReport(type, reportCreationRequest, options).then((request) => request(this.axios, this.basePath));
9745
9858
  }
9746
9859
 
9747
9860
  /**
@@ -9754,6 +9867,18 @@ export class ReportApi extends BaseAPI {
9754
9867
  public getReports(options?: AxiosRequestConfig) {
9755
9868
  return ReportApiFp(this.configuration).getReports(options).then((request) => request(this.axios, this.basePath));
9756
9869
  }
9870
+
9871
+ /**
9872
+ * List all generated reports for type
9873
+ * @summary List reports
9874
+ * @param {string} type Report type
9875
+ * @param {*} [options] Override http request option.
9876
+ * @throws {RequiredError}
9877
+ * @memberof ReportApi
9878
+ */
9879
+ public listReport(type: string, options?: AxiosRequestConfig) {
9880
+ return ReportApiFp(this.configuration).listReport(type, options).then((request) => request(this.axios, this.basePath));
9881
+ }
9757
9882
  }
9758
9883
 
9759
9884
 
package/dist/api.d.ts CHANGED
@@ -2105,6 +2105,12 @@ export interface Promotion {
2105
2105
  * @memberof Promotion
2106
2106
  */
2107
2107
  'notificationConfig': PromotionNotificationConfig;
2108
+ /**
2109
+ *
2110
+ * @type {PromotionStatus}
2111
+ * @memberof Promotion
2112
+ */
2113
+ 'status'?: PromotionStatus;
2108
2114
  }
2109
2115
  /**
2110
2116
  * @type PromotionBeneficiariesResponse
@@ -2325,6 +2331,15 @@ export declare const PromotionSortByField: {
2325
2331
  readonly EndsAt: "endsAt";
2326
2332
  };
2327
2333
  export type PromotionSortByField = typeof PromotionSortByField[keyof typeof PromotionSortByField];
2334
+ /**
2335
+ *
2336
+ * @export
2337
+ * @enum {string}
2338
+ */
2339
+ export declare const PromotionStatus: {
2340
+ readonly Pending: "pending";
2341
+ };
2342
+ export type PromotionStatus = typeof PromotionStatus[keyof typeof PromotionStatus];
2328
2343
  /**
2329
2344
  *
2330
2345
  * @export
@@ -2390,6 +2405,44 @@ export declare const Repetition: {
2390
2405
  readonly Monthly: "monthly";
2391
2406
  };
2392
2407
  export type Repetition = typeof Repetition[keyof typeof Repetition];
2408
+ /**
2409
+ *
2410
+ * @export
2411
+ * @interface ReportCreationRequest
2412
+ */
2413
+ export interface ReportCreationRequest {
2414
+ /**
2415
+ *
2416
+ * @type {string}
2417
+ * @memberof ReportCreationRequest
2418
+ */
2419
+ 'startDate'?: string;
2420
+ /**
2421
+ *
2422
+ * @type {string}
2423
+ * @memberof ReportCreationRequest
2424
+ */
2425
+ 'endDate'?: string;
2426
+ /**
2427
+ *
2428
+ * @type {string}
2429
+ * @memberof ReportCreationRequest
2430
+ */
2431
+ 'referenceID'?: string;
2432
+ }
2433
+ /**
2434
+ *
2435
+ * @export
2436
+ * @interface ReportListResponse
2437
+ */
2438
+ export interface ReportListResponse {
2439
+ /**
2440
+ *
2441
+ * @type {Array<ReportResponse>}
2442
+ * @memberof ReportListResponse
2443
+ */
2444
+ 'reports': Array<ReportResponse>;
2445
+ }
2393
2446
  /**
2394
2447
  *
2395
2448
  * @export
@@ -2401,7 +2454,25 @@ export interface ReportResponse {
2401
2454
  * @type {string}
2402
2455
  * @memberof ReportResponse
2403
2456
  */
2404
- 'url': string;
2457
+ 'name': string;
2458
+ /**
2459
+ *
2460
+ * @type {string}
2461
+ * @memberof ReportResponse
2462
+ */
2463
+ 'url'?: string;
2464
+ /**
2465
+ *
2466
+ * @type {string}
2467
+ * @memberof ReportResponse
2468
+ */
2469
+ 'type': string;
2470
+ /**
2471
+ *
2472
+ * @type {string}
2473
+ * @memberof ReportResponse
2474
+ */
2475
+ 'createdAt': string;
2405
2476
  }
2406
2477
  /**
2407
2478
  *
@@ -3081,7 +3152,7 @@ export interface TargetLevel {
3081
3152
  export declare const TargetMu: {
3082
3153
  readonly Currency: "currency";
3083
3154
  readonly Product: "product";
3084
- readonly Additional: "additional";
3155
+ readonly AdditionalMu: "additionalMU";
3085
3156
  };
3086
3157
  export type TargetMu = typeof TargetMu[keyof typeof TargetMu];
3087
3158
  /**
@@ -6505,13 +6576,11 @@ export declare const ReportApiAxiosParamCreator: (configuration?: Configuration)
6505
6576
  * Generate a report
6506
6577
  * @summary Generate report
6507
6578
  * @param {string} type Report type
6508
- * @param {string} [startDate] Start date for promotions
6509
- * @param {string} [endDate] End date for promotions
6510
- * @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
6579
+ * @param {ReportCreationRequest} [reportCreationRequest]
6511
6580
  * @param {*} [options] Override http request option.
6512
6581
  * @throws {RequiredError}
6513
6582
  */
6514
- generateReport: (type: string, startDate?: string, endDate?: string, referenceID?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
6583
+ generateReport: (type: string, reportCreationRequest?: ReportCreationRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
6515
6584
  /**
6516
6585
  * List of all supported reports
6517
6586
  * @summary Get report types
@@ -6519,6 +6588,14 @@ export declare const ReportApiAxiosParamCreator: (configuration?: Configuration)
6519
6588
  * @throws {RequiredError}
6520
6589
  */
6521
6590
  getReports: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
6591
+ /**
6592
+ * List all generated reports for type
6593
+ * @summary List reports
6594
+ * @param {string} type Report type
6595
+ * @param {*} [options] Override http request option.
6596
+ * @throws {RequiredError}
6597
+ */
6598
+ listReport: (type: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
6522
6599
  };
6523
6600
  /**
6524
6601
  * ReportApi - functional programming interface
@@ -6529,13 +6606,11 @@ export declare const ReportApiFp: (configuration?: Configuration) => {
6529
6606
  * Generate a report
6530
6607
  * @summary Generate report
6531
6608
  * @param {string} type Report type
6532
- * @param {string} [startDate] Start date for promotions
6533
- * @param {string} [endDate] End date for promotions
6534
- * @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
6609
+ * @param {ReportCreationRequest} [reportCreationRequest]
6535
6610
  * @param {*} [options] Override http request option.
6536
6611
  * @throws {RequiredError}
6537
6612
  */
6538
- generateReport(type: string, startDate?: string, endDate?: string, referenceID?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReportResponse>>;
6613
+ generateReport(type: string, reportCreationRequest?: ReportCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReportResponse>>;
6539
6614
  /**
6540
6615
  * List of all supported reports
6541
6616
  * @summary Get report types
@@ -6543,6 +6618,14 @@ export declare const ReportApiFp: (configuration?: Configuration) => {
6543
6618
  * @throws {RequiredError}
6544
6619
  */
6545
6620
  getReports(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReportTypesResponse>>;
6621
+ /**
6622
+ * List all generated reports for type
6623
+ * @summary List reports
6624
+ * @param {string} type Report type
6625
+ * @param {*} [options] Override http request option.
6626
+ * @throws {RequiredError}
6627
+ */
6628
+ listReport(type: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReportListResponse>>;
6546
6629
  };
6547
6630
  /**
6548
6631
  * ReportApi - factory interface
@@ -6553,13 +6636,11 @@ export declare const ReportApiFactory: (configuration?: Configuration, basePath?
6553
6636
  * Generate a report
6554
6637
  * @summary Generate report
6555
6638
  * @param {string} type Report type
6556
- * @param {string} [startDate] Start date for promotions
6557
- * @param {string} [endDate] End date for promotions
6558
- * @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
6639
+ * @param {ReportCreationRequest} [reportCreationRequest]
6559
6640
  * @param {*} [options] Override http request option.
6560
6641
  * @throws {RequiredError}
6561
6642
  */
6562
- generateReport(type: string, startDate?: string, endDate?: string, referenceID?: string, options?: any): AxiosPromise<ReportResponse>;
6643
+ generateReport(type: string, reportCreationRequest?: ReportCreationRequest, options?: any): AxiosPromise<ReportResponse>;
6563
6644
  /**
6564
6645
  * List of all supported reports
6565
6646
  * @summary Get report types
@@ -6567,6 +6648,14 @@ export declare const ReportApiFactory: (configuration?: Configuration, basePath?
6567
6648
  * @throws {RequiredError}
6568
6649
  */
6569
6650
  getReports(options?: any): AxiosPromise<ReportTypesResponse>;
6651
+ /**
6652
+ * List all generated reports for type
6653
+ * @summary List reports
6654
+ * @param {string} type Report type
6655
+ * @param {*} [options] Override http request option.
6656
+ * @throws {RequiredError}
6657
+ */
6658
+ listReport(type: string, options?: any): AxiosPromise<ReportListResponse>;
6570
6659
  };
6571
6660
  /**
6572
6661
  * ReportApi - object-oriented interface
@@ -6579,14 +6668,12 @@ export declare class ReportApi extends BaseAPI {
6579
6668
  * Generate a report
6580
6669
  * @summary Generate report
6581
6670
  * @param {string} type Report type
6582
- * @param {string} [startDate] Start date for promotions
6583
- * @param {string} [endDate] End date for promotions
6584
- * @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
6671
+ * @param {ReportCreationRequest} [reportCreationRequest]
6585
6672
  * @param {*} [options] Override http request option.
6586
6673
  * @throws {RequiredError}
6587
6674
  * @memberof ReportApi
6588
6675
  */
6589
- generateReport(type: string, startDate?: string, endDate?: string, referenceID?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ReportResponse, any>>;
6676
+ generateReport(type: string, reportCreationRequest?: ReportCreationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ReportResponse, any>>;
6590
6677
  /**
6591
6678
  * List of all supported reports
6592
6679
  * @summary Get report types
@@ -6595,6 +6682,15 @@ export declare class ReportApi extends BaseAPI {
6595
6682
  * @memberof ReportApi
6596
6683
  */
6597
6684
  getReports(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ReportTypesResponse, any>>;
6685
+ /**
6686
+ * List all generated reports for type
6687
+ * @summary List reports
6688
+ * @param {string} type Report type
6689
+ * @param {*} [options] Override http request option.
6690
+ * @throws {RequiredError}
6691
+ * @memberof ReportApi
6692
+ */
6693
+ listReport(type: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ReportListResponse, any>>;
6598
6694
  }
6599
6695
  /**
6600
6696
  * SegmentApi - axios parameter creator
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.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;
25
+ 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.PromotionStatus = 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.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 = exports.BulkApiFp = 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 = exports.ReportApi = void 0;
28
28
  const axios_1 = require("axios");
29
29
  // Some imports not used depending on template conditions
30
30
  // @ts-ignore
@@ -241,6 +241,14 @@ exports.PromotionSortByField = {
241
241
  StartsAt: 'startsAt',
242
242
  EndsAt: 'endsAt'
243
243
  };
244
+ /**
245
+ *
246
+ * @export
247
+ * @enum {string}
248
+ */
249
+ exports.PromotionStatus = {
250
+ Pending: 'pending'
251
+ };
244
252
  /**
245
253
  *
246
254
  * @export
@@ -331,7 +339,7 @@ exports.TagValidatorType = {
331
339
  exports.TargetMu = {
332
340
  Currency: 'currency',
333
341
  Product: 'product',
334
- Additional: 'additional'
342
+ AdditionalMu: 'additionalMU'
335
343
  };
336
344
  /**
337
345
  *
@@ -5516,13 +5524,11 @@ const ReportApiAxiosParamCreator = function (configuration) {
5516
5524
  * Generate a report
5517
5525
  * @summary Generate report
5518
5526
  * @param {string} type Report type
5519
- * @param {string} [startDate] Start date for promotions
5520
- * @param {string} [endDate] End date for promotions
5521
- * @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
5527
+ * @param {ReportCreationRequest} [reportCreationRequest]
5522
5528
  * @param {*} [options] Override http request option.
5523
5529
  * @throws {RequiredError}
5524
5530
  */
5525
- generateReport: (type, startDate, endDate, referenceID, options = {}) => __awaiter(this, void 0, void 0, function* () {
5531
+ generateReport: (type, reportCreationRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
5526
5532
  // verify required parameter 'type' is not null or undefined
5527
5533
  (0, common_1.assertParamExists)('generateReport', 'type', type);
5528
5534
  const localVarPath = `/admin/reports/{type}`
@@ -5533,28 +5539,17 @@ const ReportApiAxiosParamCreator = function (configuration) {
5533
5539
  if (configuration) {
5534
5540
  baseOptions = configuration.baseOptions;
5535
5541
  }
5536
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
5542
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
5537
5543
  const localVarHeaderParameter = {};
5538
5544
  const localVarQueryParameter = {};
5539
5545
  // authentication systemJWT required
5540
5546
  // http bearer authentication required
5541
5547
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
5542
- if (startDate !== undefined) {
5543
- localVarQueryParameter['startDate'] = (startDate instanceof Date) ?
5544
- startDate.toISOString() :
5545
- startDate;
5546
- }
5547
- if (endDate !== undefined) {
5548
- localVarQueryParameter['endDate'] = (endDate instanceof Date) ?
5549
- endDate.toISOString() :
5550
- endDate;
5551
- }
5552
- if (referenceID !== undefined) {
5553
- localVarQueryParameter['referenceID'] = referenceID;
5554
- }
5548
+ localVarHeaderParameter['Content-Type'] = 'application/json';
5555
5549
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
5556
5550
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5557
5551
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
5552
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(reportCreationRequest, localVarRequestOptions, configuration);
5558
5553
  return {
5559
5554
  url: (0, common_1.toPathString)(localVarUrlObj),
5560
5555
  options: localVarRequestOptions,
@@ -5588,6 +5583,38 @@ const ReportApiAxiosParamCreator = function (configuration) {
5588
5583
  options: localVarRequestOptions,
5589
5584
  };
5590
5585
  }),
5586
+ /**
5587
+ * List all generated reports for type
5588
+ * @summary List reports
5589
+ * @param {string} type Report type
5590
+ * @param {*} [options] Override http request option.
5591
+ * @throws {RequiredError}
5592
+ */
5593
+ listReport: (type, options = {}) => __awaiter(this, void 0, void 0, function* () {
5594
+ // verify required parameter 'type' is not null or undefined
5595
+ (0, common_1.assertParamExists)('listReport', 'type', type);
5596
+ const localVarPath = `/admin/reports/{type}`
5597
+ .replace(`{${"type"}}`, encodeURIComponent(String(type)));
5598
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5599
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
5600
+ let baseOptions;
5601
+ if (configuration) {
5602
+ baseOptions = configuration.baseOptions;
5603
+ }
5604
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
5605
+ const localVarHeaderParameter = {};
5606
+ const localVarQueryParameter = {};
5607
+ // authentication systemJWT required
5608
+ // http bearer authentication required
5609
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
5610
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
5611
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5612
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
5613
+ return {
5614
+ url: (0, common_1.toPathString)(localVarUrlObj),
5615
+ options: localVarRequestOptions,
5616
+ };
5617
+ }),
5591
5618
  };
5592
5619
  };
5593
5620
  exports.ReportApiAxiosParamCreator = ReportApiAxiosParamCreator;
@@ -5602,15 +5629,13 @@ const ReportApiFp = function (configuration) {
5602
5629
  * Generate a report
5603
5630
  * @summary Generate report
5604
5631
  * @param {string} type Report type
5605
- * @param {string} [startDate] Start date for promotions
5606
- * @param {string} [endDate] End date for promotions
5607
- * @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
5632
+ * @param {ReportCreationRequest} [reportCreationRequest]
5608
5633
  * @param {*} [options] Override http request option.
5609
5634
  * @throws {RequiredError}
5610
5635
  */
5611
- generateReport(type, startDate, endDate, referenceID, options) {
5636
+ generateReport(type, reportCreationRequest, options) {
5612
5637
  return __awaiter(this, void 0, void 0, function* () {
5613
- const localVarAxiosArgs = yield localVarAxiosParamCreator.generateReport(type, startDate, endDate, referenceID, options);
5638
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.generateReport(type, reportCreationRequest, options);
5614
5639
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
5615
5640
  });
5616
5641
  },
@@ -5626,6 +5651,19 @@ const ReportApiFp = function (configuration) {
5626
5651
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
5627
5652
  });
5628
5653
  },
5654
+ /**
5655
+ * List all generated reports for type
5656
+ * @summary List reports
5657
+ * @param {string} type Report type
5658
+ * @param {*} [options] Override http request option.
5659
+ * @throws {RequiredError}
5660
+ */
5661
+ listReport(type, options) {
5662
+ return __awaiter(this, void 0, void 0, function* () {
5663
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listReport(type, options);
5664
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
5665
+ });
5666
+ },
5629
5667
  };
5630
5668
  };
5631
5669
  exports.ReportApiFp = ReportApiFp;
@@ -5640,14 +5678,12 @@ const ReportApiFactory = function (configuration, basePath, axios) {
5640
5678
  * Generate a report
5641
5679
  * @summary Generate report
5642
5680
  * @param {string} type Report type
5643
- * @param {string} [startDate] Start date for promotions
5644
- * @param {string} [endDate] End date for promotions
5645
- * @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
5681
+ * @param {ReportCreationRequest} [reportCreationRequest]
5646
5682
  * @param {*} [options] Override http request option.
5647
5683
  * @throws {RequiredError}
5648
5684
  */
5649
- generateReport(type, startDate, endDate, referenceID, options) {
5650
- return localVarFp.generateReport(type, startDate, endDate, referenceID, options).then((request) => request(axios, basePath));
5685
+ generateReport(type, reportCreationRequest, options) {
5686
+ return localVarFp.generateReport(type, reportCreationRequest, options).then((request) => request(axios, basePath));
5651
5687
  },
5652
5688
  /**
5653
5689
  * List of all supported reports
@@ -5658,6 +5694,16 @@ const ReportApiFactory = function (configuration, basePath, axios) {
5658
5694
  getReports(options) {
5659
5695
  return localVarFp.getReports(options).then((request) => request(axios, basePath));
5660
5696
  },
5697
+ /**
5698
+ * List all generated reports for type
5699
+ * @summary List reports
5700
+ * @param {string} type Report type
5701
+ * @param {*} [options] Override http request option.
5702
+ * @throws {RequiredError}
5703
+ */
5704
+ listReport(type, options) {
5705
+ return localVarFp.listReport(type, options).then((request) => request(axios, basePath));
5706
+ },
5661
5707
  };
5662
5708
  };
5663
5709
  exports.ReportApiFactory = ReportApiFactory;
@@ -5672,15 +5718,13 @@ class ReportApi extends base_1.BaseAPI {
5672
5718
  * Generate a report
5673
5719
  * @summary Generate report
5674
5720
  * @param {string} type Report type
5675
- * @param {string} [startDate] Start date for promotions
5676
- * @param {string} [endDate] End date for promotions
5677
- * @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
5721
+ * @param {ReportCreationRequest} [reportCreationRequest]
5678
5722
  * @param {*} [options] Override http request option.
5679
5723
  * @throws {RequiredError}
5680
5724
  * @memberof ReportApi
5681
5725
  */
5682
- generateReport(type, startDate, endDate, referenceID, options) {
5683
- return (0, exports.ReportApiFp)(this.configuration).generateReport(type, startDate, endDate, referenceID, options).then((request) => request(this.axios, this.basePath));
5726
+ generateReport(type, reportCreationRequest, options) {
5727
+ return (0, exports.ReportApiFp)(this.configuration).generateReport(type, reportCreationRequest, options).then((request) => request(this.axios, this.basePath));
5684
5728
  }
5685
5729
  /**
5686
5730
  * List of all supported reports
@@ -5692,6 +5736,17 @@ class ReportApi extends base_1.BaseAPI {
5692
5736
  getReports(options) {
5693
5737
  return (0, exports.ReportApiFp)(this.configuration).getReports(options).then((request) => request(this.axios, this.basePath));
5694
5738
  }
5739
+ /**
5740
+ * List all generated reports for type
5741
+ * @summary List reports
5742
+ * @param {string} type Report type
5743
+ * @param {*} [options] Override http request option.
5744
+ * @throws {RequiredError}
5745
+ * @memberof ReportApi
5746
+ */
5747
+ listReport(type, options) {
5748
+ return (0, exports.ReportApiFp)(this.configuration).listReport(type, options).then((request) => request(this.axios, this.basePath));
5749
+ }
5695
5750
  }
5696
5751
  exports.ReportApi = ReportApi;
5697
5752
  /**
package/dist/esm/api.d.ts CHANGED
@@ -2105,6 +2105,12 @@ export interface Promotion {
2105
2105
  * @memberof Promotion
2106
2106
  */
2107
2107
  'notificationConfig': PromotionNotificationConfig;
2108
+ /**
2109
+ *
2110
+ * @type {PromotionStatus}
2111
+ * @memberof Promotion
2112
+ */
2113
+ 'status'?: PromotionStatus;
2108
2114
  }
2109
2115
  /**
2110
2116
  * @type PromotionBeneficiariesResponse
@@ -2325,6 +2331,15 @@ export declare const PromotionSortByField: {
2325
2331
  readonly EndsAt: "endsAt";
2326
2332
  };
2327
2333
  export type PromotionSortByField = typeof PromotionSortByField[keyof typeof PromotionSortByField];
2334
+ /**
2335
+ *
2336
+ * @export
2337
+ * @enum {string}
2338
+ */
2339
+ export declare const PromotionStatus: {
2340
+ readonly Pending: "pending";
2341
+ };
2342
+ export type PromotionStatus = typeof PromotionStatus[keyof typeof PromotionStatus];
2328
2343
  /**
2329
2344
  *
2330
2345
  * @export
@@ -2390,6 +2405,44 @@ export declare const Repetition: {
2390
2405
  readonly Monthly: "monthly";
2391
2406
  };
2392
2407
  export type Repetition = typeof Repetition[keyof typeof Repetition];
2408
+ /**
2409
+ *
2410
+ * @export
2411
+ * @interface ReportCreationRequest
2412
+ */
2413
+ export interface ReportCreationRequest {
2414
+ /**
2415
+ *
2416
+ * @type {string}
2417
+ * @memberof ReportCreationRequest
2418
+ */
2419
+ 'startDate'?: string;
2420
+ /**
2421
+ *
2422
+ * @type {string}
2423
+ * @memberof ReportCreationRequest
2424
+ */
2425
+ 'endDate'?: string;
2426
+ /**
2427
+ *
2428
+ * @type {string}
2429
+ * @memberof ReportCreationRequest
2430
+ */
2431
+ 'referenceID'?: string;
2432
+ }
2433
+ /**
2434
+ *
2435
+ * @export
2436
+ * @interface ReportListResponse
2437
+ */
2438
+ export interface ReportListResponse {
2439
+ /**
2440
+ *
2441
+ * @type {Array<ReportResponse>}
2442
+ * @memberof ReportListResponse
2443
+ */
2444
+ 'reports': Array<ReportResponse>;
2445
+ }
2393
2446
  /**
2394
2447
  *
2395
2448
  * @export
@@ -2401,7 +2454,25 @@ export interface ReportResponse {
2401
2454
  * @type {string}
2402
2455
  * @memberof ReportResponse
2403
2456
  */
2404
- 'url': string;
2457
+ 'name': string;
2458
+ /**
2459
+ *
2460
+ * @type {string}
2461
+ * @memberof ReportResponse
2462
+ */
2463
+ 'url'?: string;
2464
+ /**
2465
+ *
2466
+ * @type {string}
2467
+ * @memberof ReportResponse
2468
+ */
2469
+ 'type': string;
2470
+ /**
2471
+ *
2472
+ * @type {string}
2473
+ * @memberof ReportResponse
2474
+ */
2475
+ 'createdAt': string;
2405
2476
  }
2406
2477
  /**
2407
2478
  *
@@ -3081,7 +3152,7 @@ export interface TargetLevel {
3081
3152
  export declare const TargetMu: {
3082
3153
  readonly Currency: "currency";
3083
3154
  readonly Product: "product";
3084
- readonly Additional: "additional";
3155
+ readonly AdditionalMu: "additionalMU";
3085
3156
  };
3086
3157
  export type TargetMu = typeof TargetMu[keyof typeof TargetMu];
3087
3158
  /**
@@ -6505,13 +6576,11 @@ export declare const ReportApiAxiosParamCreator: (configuration?: Configuration)
6505
6576
  * Generate a report
6506
6577
  * @summary Generate report
6507
6578
  * @param {string} type Report type
6508
- * @param {string} [startDate] Start date for promotions
6509
- * @param {string} [endDate] End date for promotions
6510
- * @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
6579
+ * @param {ReportCreationRequest} [reportCreationRequest]
6511
6580
  * @param {*} [options] Override http request option.
6512
6581
  * @throws {RequiredError}
6513
6582
  */
6514
- generateReport: (type: string, startDate?: string, endDate?: string, referenceID?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
6583
+ generateReport: (type: string, reportCreationRequest?: ReportCreationRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
6515
6584
  /**
6516
6585
  * List of all supported reports
6517
6586
  * @summary Get report types
@@ -6519,6 +6588,14 @@ export declare const ReportApiAxiosParamCreator: (configuration?: Configuration)
6519
6588
  * @throws {RequiredError}
6520
6589
  */
6521
6590
  getReports: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
6591
+ /**
6592
+ * List all generated reports for type
6593
+ * @summary List reports
6594
+ * @param {string} type Report type
6595
+ * @param {*} [options] Override http request option.
6596
+ * @throws {RequiredError}
6597
+ */
6598
+ listReport: (type: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
6522
6599
  };
6523
6600
  /**
6524
6601
  * ReportApi - functional programming interface
@@ -6529,13 +6606,11 @@ export declare const ReportApiFp: (configuration?: Configuration) => {
6529
6606
  * Generate a report
6530
6607
  * @summary Generate report
6531
6608
  * @param {string} type Report type
6532
- * @param {string} [startDate] Start date for promotions
6533
- * @param {string} [endDate] End date for promotions
6534
- * @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
6609
+ * @param {ReportCreationRequest} [reportCreationRequest]
6535
6610
  * @param {*} [options] Override http request option.
6536
6611
  * @throws {RequiredError}
6537
6612
  */
6538
- generateReport(type: string, startDate?: string, endDate?: string, referenceID?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReportResponse>>;
6613
+ generateReport(type: string, reportCreationRequest?: ReportCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReportResponse>>;
6539
6614
  /**
6540
6615
  * List of all supported reports
6541
6616
  * @summary Get report types
@@ -6543,6 +6618,14 @@ export declare const ReportApiFp: (configuration?: Configuration) => {
6543
6618
  * @throws {RequiredError}
6544
6619
  */
6545
6620
  getReports(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReportTypesResponse>>;
6621
+ /**
6622
+ * List all generated reports for type
6623
+ * @summary List reports
6624
+ * @param {string} type Report type
6625
+ * @param {*} [options] Override http request option.
6626
+ * @throws {RequiredError}
6627
+ */
6628
+ listReport(type: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReportListResponse>>;
6546
6629
  };
6547
6630
  /**
6548
6631
  * ReportApi - factory interface
@@ -6553,13 +6636,11 @@ export declare const ReportApiFactory: (configuration?: Configuration, basePath?
6553
6636
  * Generate a report
6554
6637
  * @summary Generate report
6555
6638
  * @param {string} type Report type
6556
- * @param {string} [startDate] Start date for promotions
6557
- * @param {string} [endDate] End date for promotions
6558
- * @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
6639
+ * @param {ReportCreationRequest} [reportCreationRequest]
6559
6640
  * @param {*} [options] Override http request option.
6560
6641
  * @throws {RequiredError}
6561
6642
  */
6562
- generateReport(type: string, startDate?: string, endDate?: string, referenceID?: string, options?: any): AxiosPromise<ReportResponse>;
6643
+ generateReport(type: string, reportCreationRequest?: ReportCreationRequest, options?: any): AxiosPromise<ReportResponse>;
6563
6644
  /**
6564
6645
  * List of all supported reports
6565
6646
  * @summary Get report types
@@ -6567,6 +6648,14 @@ export declare const ReportApiFactory: (configuration?: Configuration, basePath?
6567
6648
  * @throws {RequiredError}
6568
6649
  */
6569
6650
  getReports(options?: any): AxiosPromise<ReportTypesResponse>;
6651
+ /**
6652
+ * List all generated reports for type
6653
+ * @summary List reports
6654
+ * @param {string} type Report type
6655
+ * @param {*} [options] Override http request option.
6656
+ * @throws {RequiredError}
6657
+ */
6658
+ listReport(type: string, options?: any): AxiosPromise<ReportListResponse>;
6570
6659
  };
6571
6660
  /**
6572
6661
  * ReportApi - object-oriented interface
@@ -6579,14 +6668,12 @@ export declare class ReportApi extends BaseAPI {
6579
6668
  * Generate a report
6580
6669
  * @summary Generate report
6581
6670
  * @param {string} type Report type
6582
- * @param {string} [startDate] Start date for promotions
6583
- * @param {string} [endDate] End date for promotions
6584
- * @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
6671
+ * @param {ReportCreationRequest} [reportCreationRequest]
6585
6672
  * @param {*} [options] Override http request option.
6586
6673
  * @throws {RequiredError}
6587
6674
  * @memberof ReportApi
6588
6675
  */
6589
- generateReport(type: string, startDate?: string, endDate?: string, referenceID?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ReportResponse, any>>;
6676
+ generateReport(type: string, reportCreationRequest?: ReportCreationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ReportResponse, any>>;
6590
6677
  /**
6591
6678
  * List of all supported reports
6592
6679
  * @summary Get report types
@@ -6595,6 +6682,15 @@ export declare class ReportApi extends BaseAPI {
6595
6682
  * @memberof ReportApi
6596
6683
  */
6597
6684
  getReports(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ReportTypesResponse, any>>;
6685
+ /**
6686
+ * List all generated reports for type
6687
+ * @summary List reports
6688
+ * @param {string} type Report type
6689
+ * @param {*} [options] Override http request option.
6690
+ * @throws {RequiredError}
6691
+ * @memberof ReportApi
6692
+ */
6693
+ listReport(type: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ReportListResponse, any>>;
6598
6694
  }
6599
6695
  /**
6600
6696
  * SegmentApi - axios parameter creator
package/dist/esm/api.js CHANGED
@@ -236,6 +236,14 @@ export const PromotionSortByField = {
236
236
  StartsAt: 'startsAt',
237
237
  EndsAt: 'endsAt'
238
238
  };
239
+ /**
240
+ *
241
+ * @export
242
+ * @enum {string}
243
+ */
244
+ export const PromotionStatus = {
245
+ Pending: 'pending'
246
+ };
239
247
  /**
240
248
  *
241
249
  * @export
@@ -326,7 +334,7 @@ export const TagValidatorType = {
326
334
  export const TargetMu = {
327
335
  Currency: 'currency',
328
336
  Product: 'product',
329
- Additional: 'additional'
337
+ AdditionalMu: 'additionalMU'
330
338
  };
331
339
  /**
332
340
  *
@@ -5455,13 +5463,11 @@ export const ReportApiAxiosParamCreator = function (configuration) {
5455
5463
  * Generate a report
5456
5464
  * @summary Generate report
5457
5465
  * @param {string} type Report type
5458
- * @param {string} [startDate] Start date for promotions
5459
- * @param {string} [endDate] End date for promotions
5460
- * @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
5466
+ * @param {ReportCreationRequest} [reportCreationRequest]
5461
5467
  * @param {*} [options] Override http request option.
5462
5468
  * @throws {RequiredError}
5463
5469
  */
5464
- generateReport: (type, startDate, endDate, referenceID, options = {}) => __awaiter(this, void 0, void 0, function* () {
5470
+ generateReport: (type, reportCreationRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
5465
5471
  // verify required parameter 'type' is not null or undefined
5466
5472
  assertParamExists('generateReport', 'type', type);
5467
5473
  const localVarPath = `/admin/reports/{type}`
@@ -5472,28 +5478,17 @@ export const ReportApiAxiosParamCreator = function (configuration) {
5472
5478
  if (configuration) {
5473
5479
  baseOptions = configuration.baseOptions;
5474
5480
  }
5475
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
5481
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
5476
5482
  const localVarHeaderParameter = {};
5477
5483
  const localVarQueryParameter = {};
5478
5484
  // authentication systemJWT required
5479
5485
  // http bearer authentication required
5480
5486
  yield setBearerAuthToObject(localVarHeaderParameter, configuration);
5481
- if (startDate !== undefined) {
5482
- localVarQueryParameter['startDate'] = (startDate instanceof Date) ?
5483
- startDate.toISOString() :
5484
- startDate;
5485
- }
5486
- if (endDate !== undefined) {
5487
- localVarQueryParameter['endDate'] = (endDate instanceof Date) ?
5488
- endDate.toISOString() :
5489
- endDate;
5490
- }
5491
- if (referenceID !== undefined) {
5492
- localVarQueryParameter['referenceID'] = referenceID;
5493
- }
5487
+ localVarHeaderParameter['Content-Type'] = 'application/json';
5494
5488
  setSearchParams(localVarUrlObj, localVarQueryParameter);
5495
5489
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5496
5490
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
5491
+ localVarRequestOptions.data = serializeDataIfNeeded(reportCreationRequest, localVarRequestOptions, configuration);
5497
5492
  return {
5498
5493
  url: toPathString(localVarUrlObj),
5499
5494
  options: localVarRequestOptions,
@@ -5527,6 +5522,38 @@ export const ReportApiAxiosParamCreator = function (configuration) {
5527
5522
  options: localVarRequestOptions,
5528
5523
  };
5529
5524
  }),
5525
+ /**
5526
+ * List all generated reports for type
5527
+ * @summary List reports
5528
+ * @param {string} type Report type
5529
+ * @param {*} [options] Override http request option.
5530
+ * @throws {RequiredError}
5531
+ */
5532
+ listReport: (type, options = {}) => __awaiter(this, void 0, void 0, function* () {
5533
+ // verify required parameter 'type' is not null or undefined
5534
+ assertParamExists('listReport', 'type', type);
5535
+ const localVarPath = `/admin/reports/{type}`
5536
+ .replace(`{${"type"}}`, encodeURIComponent(String(type)));
5537
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5538
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5539
+ let baseOptions;
5540
+ if (configuration) {
5541
+ baseOptions = configuration.baseOptions;
5542
+ }
5543
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
5544
+ const localVarHeaderParameter = {};
5545
+ const localVarQueryParameter = {};
5546
+ // authentication systemJWT required
5547
+ // http bearer authentication required
5548
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
5549
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
5550
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5551
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
5552
+ return {
5553
+ url: toPathString(localVarUrlObj),
5554
+ options: localVarRequestOptions,
5555
+ };
5556
+ }),
5530
5557
  };
5531
5558
  };
5532
5559
  /**
@@ -5540,15 +5567,13 @@ export const ReportApiFp = function (configuration) {
5540
5567
  * Generate a report
5541
5568
  * @summary Generate report
5542
5569
  * @param {string} type Report type
5543
- * @param {string} [startDate] Start date for promotions
5544
- * @param {string} [endDate] End date for promotions
5545
- * @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
5570
+ * @param {ReportCreationRequest} [reportCreationRequest]
5546
5571
  * @param {*} [options] Override http request option.
5547
5572
  * @throws {RequiredError}
5548
5573
  */
5549
- generateReport(type, startDate, endDate, referenceID, options) {
5574
+ generateReport(type, reportCreationRequest, options) {
5550
5575
  return __awaiter(this, void 0, void 0, function* () {
5551
- const localVarAxiosArgs = yield localVarAxiosParamCreator.generateReport(type, startDate, endDate, referenceID, options);
5576
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.generateReport(type, reportCreationRequest, options);
5552
5577
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
5553
5578
  });
5554
5579
  },
@@ -5564,6 +5589,19 @@ export const ReportApiFp = function (configuration) {
5564
5589
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
5565
5590
  });
5566
5591
  },
5592
+ /**
5593
+ * List all generated reports for type
5594
+ * @summary List reports
5595
+ * @param {string} type Report type
5596
+ * @param {*} [options] Override http request option.
5597
+ * @throws {RequiredError}
5598
+ */
5599
+ listReport(type, options) {
5600
+ return __awaiter(this, void 0, void 0, function* () {
5601
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listReport(type, options);
5602
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
5603
+ });
5604
+ },
5567
5605
  };
5568
5606
  };
5569
5607
  /**
@@ -5577,14 +5615,12 @@ export const ReportApiFactory = function (configuration, basePath, axios) {
5577
5615
  * Generate a report
5578
5616
  * @summary Generate report
5579
5617
  * @param {string} type Report type
5580
- * @param {string} [startDate] Start date for promotions
5581
- * @param {string} [endDate] End date for promotions
5582
- * @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
5618
+ * @param {ReportCreationRequest} [reportCreationRequest]
5583
5619
  * @param {*} [options] Override http request option.
5584
5620
  * @throws {RequiredError}
5585
5621
  */
5586
- generateReport(type, startDate, endDate, referenceID, options) {
5587
- return localVarFp.generateReport(type, startDate, endDate, referenceID, options).then((request) => request(axios, basePath));
5622
+ generateReport(type, reportCreationRequest, options) {
5623
+ return localVarFp.generateReport(type, reportCreationRequest, options).then((request) => request(axios, basePath));
5588
5624
  },
5589
5625
  /**
5590
5626
  * List of all supported reports
@@ -5595,6 +5631,16 @@ export const ReportApiFactory = function (configuration, basePath, axios) {
5595
5631
  getReports(options) {
5596
5632
  return localVarFp.getReports(options).then((request) => request(axios, basePath));
5597
5633
  },
5634
+ /**
5635
+ * List all generated reports for type
5636
+ * @summary List reports
5637
+ * @param {string} type Report type
5638
+ * @param {*} [options] Override http request option.
5639
+ * @throws {RequiredError}
5640
+ */
5641
+ listReport(type, options) {
5642
+ return localVarFp.listReport(type, options).then((request) => request(axios, basePath));
5643
+ },
5598
5644
  };
5599
5645
  };
5600
5646
  /**
@@ -5608,15 +5654,13 @@ export class ReportApi extends BaseAPI {
5608
5654
  * Generate a report
5609
5655
  * @summary Generate report
5610
5656
  * @param {string} type Report type
5611
- * @param {string} [startDate] Start date for promotions
5612
- * @param {string} [endDate] End date for promotions
5613
- * @param {string} [referenceID] for reports with type promotion, promotion_expanded and progress, filter by promotion ID
5657
+ * @param {ReportCreationRequest} [reportCreationRequest]
5614
5658
  * @param {*} [options] Override http request option.
5615
5659
  * @throws {RequiredError}
5616
5660
  * @memberof ReportApi
5617
5661
  */
5618
- generateReport(type, startDate, endDate, referenceID, options) {
5619
- return ReportApiFp(this.configuration).generateReport(type, startDate, endDate, referenceID, options).then((request) => request(this.axios, this.basePath));
5662
+ generateReport(type, reportCreationRequest, options) {
5663
+ return ReportApiFp(this.configuration).generateReport(type, reportCreationRequest, options).then((request) => request(this.axios, this.basePath));
5620
5664
  }
5621
5665
  /**
5622
5666
  * List of all supported reports
@@ -5628,6 +5672,17 @@ export class ReportApi extends BaseAPI {
5628
5672
  getReports(options) {
5629
5673
  return ReportApiFp(this.configuration).getReports(options).then((request) => request(this.axios, this.basePath));
5630
5674
  }
5675
+ /**
5676
+ * List all generated reports for type
5677
+ * @summary List reports
5678
+ * @param {string} type Report type
5679
+ * @param {*} [options] Override http request option.
5680
+ * @throws {RequiredError}
5681
+ * @memberof ReportApi
5682
+ */
5683
+ listReport(type, options) {
5684
+ return ReportApiFp(this.configuration).listReport(type, options).then((request) => request(this.axios, this.basePath));
5685
+ }
5631
5686
  }
5632
5687
  /**
5633
5688
  * SegmentApi - axios parameter creator
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flexinet-api",
3
- "version": "0.0.1148-prerelease0",
3
+ "version": "0.0.1155-prerelease0",
4
4
  "description": "OpenAPI client for flexinet-api",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {