@sp-api-sdk/sales-api-v1 1.9.4 → 1.9.5

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.
@@ -85,7 +85,7 @@ const SalesApiAxiosParamCreator = function (configuration) {
85
85
  if (sku !== undefined) {
86
86
  localVarQueryParameter['sku'] = sku;
87
87
  }
88
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
88
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
89
89
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
90
90
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
91
91
  return {
@@ -81,7 +81,7 @@ export const SalesApiAxiosParamCreator = function (configuration) {
81
81
  if (sku !== undefined) {
82
82
  localVarQueryParameter['sku'] = sku;
83
83
  }
84
- setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
84
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
85
85
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
86
86
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
87
87
  return {
@@ -9,7 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { AxiosPromise, AxiosInstance } from 'axios';
12
+ import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
13
  import { Configuration } from '../configuration';
14
14
  import { RequestArgs, BaseAPI } from '../base';
15
15
  import { GetOrderMetricsResponse } from '../models';
@@ -32,7 +32,7 @@ export declare const SalesApiAxiosParamCreator: (configuration?: Configuration |
32
32
  * @param {*} [options] Override http request option.
33
33
  * @throws {RequiredError}
34
34
  */
35
- getOrderMetrics: (marketplaceIds: Array<string>, interval: string, granularity: 'Hour' | 'Day' | 'Week' | 'Month' | 'Year' | 'Total', granularityTimeZone?: string | undefined, buyerType?: "B2B" | "B2C" | "All" | undefined, fulfillmentNetwork?: string | undefined, firstDayOfWeek?: "Monday" | "Sunday" | undefined, asin?: string | undefined, sku?: string | undefined, options?: any) => Promise<RequestArgs>;
35
+ getOrderMetrics: (marketplaceIds: Array<string>, interval: string, granularity: 'Hour' | 'Day' | 'Week' | 'Month' | 'Year' | 'Total', granularityTimeZone?: string | undefined, buyerType?: "B2B" | "B2C" | "All" | undefined, fulfillmentNetwork?: string | undefined, firstDayOfWeek?: "Monday" | "Sunday" | undefined, asin?: string | undefined, sku?: string | undefined, options?: AxiosRequestConfig) => Promise<RequestArgs>;
36
36
  };
37
37
  /**
38
38
  * SalesApi - functional programming interface
@@ -53,7 +53,7 @@ export declare const SalesApiFp: (configuration?: Configuration | undefined) =>
53
53
  * @param {*} [options] Override http request option.
54
54
  * @throws {RequiredError}
55
55
  */
56
- getOrderMetrics(marketplaceIds: Array<string>, interval: string, granularity: 'Hour' | 'Day' | 'Week' | 'Month' | 'Year' | 'Total', granularityTimeZone?: string | undefined, buyerType?: "B2B" | "B2C" | "All" | undefined, fulfillmentNetwork?: string | undefined, firstDayOfWeek?: "Monday" | "Sunday" | undefined, asin?: string | undefined, sku?: string | undefined, options?: any): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<GetOrderMetricsResponse>>;
56
+ getOrderMetrics(marketplaceIds: Array<string>, interval: string, granularity: 'Hour' | 'Day' | 'Week' | 'Month' | 'Year' | 'Total', granularityTimeZone?: string | undefined, buyerType?: "B2B" | "B2C" | "All" | undefined, fulfillmentNetwork?: string | undefined, firstDayOfWeek?: "Monday" | "Sunday" | undefined, asin?: string | undefined, sku?: string | undefined, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<GetOrderMetricsResponse>>;
57
57
  };
58
58
  /**
59
59
  * SalesApi - factory interface
@@ -151,5 +151,5 @@ export declare class SalesApi extends BaseAPI {
151
151
  * @throws {RequiredError}
152
152
  * @memberof SalesApi
153
153
  */
154
- getOrderMetrics(requestParameters: SalesApiGetOrderMetricsRequest, options?: any): Promise<import("axios").AxiosResponse<GetOrderMetricsResponse, any>>;
154
+ getOrderMetrics(requestParameters: SalesApiGetOrderMetricsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetOrderMetricsResponse, any>>;
155
155
  }
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { Configuration } from "./configuration";
13
- import { AxiosInstance } from 'axios';
13
+ import { AxiosInstance, AxiosRequestConfig } from 'axios';
14
14
  export declare const BASE_PATH: string;
15
15
  /**
16
16
  *
@@ -29,7 +29,7 @@ export declare const COLLECTION_FORMATS: {
29
29
  */
30
30
  export interface RequestArgs {
31
31
  url: string;
32
- options: any;
32
+ options: AxiosRequestConfig;
33
33
  }
34
34
  /**
35
35
  *
@@ -11,7 +11,7 @@
11
11
  */
12
12
  import { Configuration } from "./configuration";
13
13
  import { RequestArgs } from "./base";
14
- import { AxiosInstance } from 'axios';
14
+ import { AxiosInstance, AxiosResponse } from 'axios';
15
15
  /**
16
16
  *
17
17
  * @export
@@ -62,4 +62,4 @@ export declare const toPathString: (url: URL) => string;
62
62
  *
63
63
  * @export
64
64
  */
65
- export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration | undefined) => (axios?: AxiosInstance, basePath?: string) => Promise<import("axios").AxiosResponse<any, any>>;
65
+ export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration | undefined) => <T = unknown, R = AxiosResponse<T, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
@@ -21,11 +21,11 @@ export interface GetOrderMetricsResponse {
21
21
  * @type {Array<OrderMetricsInterval>}
22
22
  * @memberof GetOrderMetricsResponse
23
23
  */
24
- payload?: Array<OrderMetricsInterval>;
24
+ 'payload'?: Array<OrderMetricsInterval>;
25
25
  /**
26
26
  * A list of error responses returned when a request is unsuccessful.
27
27
  * @type {Array<Error>}
28
28
  * @memberof GetOrderMetricsResponse
29
29
  */
30
- errors?: Array<Error>;
30
+ 'errors'?: Array<Error>;
31
31
  }
@@ -20,17 +20,17 @@ export interface ModelError {
20
20
  * @type {string}
21
21
  * @memberof ModelError
22
22
  */
23
- code: string;
23
+ 'code': string;
24
24
  /**
25
25
  * A message that describes the error condition in a human-readable form.
26
26
  * @type {string}
27
27
  * @memberof ModelError
28
28
  */
29
- message: string;
29
+ 'message': string;
30
30
  /**
31
31
  * Additional details that can help the caller understand or fix the issue.
32
32
  * @type {string}
33
33
  * @memberof ModelError
34
34
  */
35
- details?: string;
35
+ 'details'?: string;
36
36
  }
@@ -20,11 +20,11 @@ export interface Money {
20
20
  * @type {string}
21
21
  * @memberof Money
22
22
  */
23
- currencyCode: string;
23
+ 'currencyCode': string;
24
24
  /**
25
25
  * A decimal number with no loss of precision. Useful when precision loss is unnaceptable, as with currencies. Follows RFC7159 for number representation.
26
26
  * @type {string}
27
27
  * @memberof Money
28
28
  */
29
- amount: string;
29
+ 'amount': string;
30
30
  }
@@ -21,35 +21,35 @@ export interface OrderMetricsInterval {
21
21
  * @type {string}
22
22
  * @memberof OrderMetricsInterval
23
23
  */
24
- interval: string;
24
+ 'interval': string;
25
25
  /**
26
26
  * The number of units in orders based on the specified filters.
27
27
  * @type {number}
28
28
  * @memberof OrderMetricsInterval
29
29
  */
30
- unitCount: number;
30
+ 'unitCount': number;
31
31
  /**
32
32
  * The number of order items based on the specified filters.
33
33
  * @type {number}
34
34
  * @memberof OrderMetricsInterval
35
35
  */
36
- orderItemCount: number;
36
+ 'orderItemCount': number;
37
37
  /**
38
38
  * The number of orders based on the specified filters.
39
39
  * @type {number}
40
40
  * @memberof OrderMetricsInterval
41
41
  */
42
- orderCount: number;
42
+ 'orderCount': number;
43
43
  /**
44
44
  *
45
45
  * @type {Money}
46
46
  * @memberof OrderMetricsInterval
47
47
  */
48
- averageUnitPrice: Money;
48
+ 'averageUnitPrice': Money;
49
49
  /**
50
50
  *
51
51
  * @type {Money}
52
52
  * @memberof OrderMetricsInterval
53
53
  */
54
- totalSales: Money;
54
+ 'totalSales': Money;
55
55
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@sp-api-sdk/sales-api-v1",
3
3
  "author": "Vincent Mesquita <vincent.mesquita@bizon.solutions>",
4
4
  "description": "The Selling Partner API for Sales provides APIs related to sales performance.",
5
- "version": "1.9.4",
5
+ "version": "1.9.5",
6
6
  "main": "dist/cjs/index.js",
7
7
  "module": "dist/es/index.js",
8
8
  "types": "dist/types/index.d.ts",
@@ -50,5 +50,5 @@
50
50
  "sp sdk",
51
51
  "sales api"
52
52
  ],
53
- "gitHead": "a91680c9bce217db7412c5ad7c17aa6e918ada8e"
53
+ "gitHead": "d4f265d3c6a4e05e45025a46effa023a56a54e9c"
54
54
  }