@sp-api-sdk/replenishment-api-2022-11-07 2.0.6 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/src/api-model/api/offers-api.js +9 -3
- package/dist/cjs/src/api-model/base.js +7 -2
- package/dist/cjs/src/api-model/common.js +1 -1
- package/dist/cjs/src/api-model/configuration.js +8 -0
- package/dist/es/src/api-model/api/offers-api.js +10 -4
- package/dist/es/src/api-model/base.js +6 -1
- package/dist/es/src/api-model/common.js +1 -1
- package/dist/es/src/api-model/configuration.js +8 -0
- package/dist/types/src/api-model/api/offers-api.d.ts +20 -20
- package/dist/types/src/api-model/base.d.ts +14 -2
- package/dist/types/src/api-model/configuration.d.ts +8 -0
- package/dist/types/src/api-model/models/get-selling-partner-metrics-request.d.ts +5 -5
- package/dist/types/src/api-model/models/get-selling-partner-metrics-response-metric.d.ts +1 -1
- package/dist/types/src/api-model/models/get-selling-partner-metrics-response.d.ts +1 -1
- package/dist/types/src/api-model/models/list-offer-metrics-request-filters.d.ts +4 -4
- package/dist/types/src/api-model/models/list-offer-metrics-request-sort.d.ts +2 -2
- package/dist/types/src/api-model/models/list-offer-metrics-request.d.ts +3 -3
- package/dist/types/src/api-model/models/list-offer-metrics-response-offer.d.ts +1 -1
- package/dist/types/src/api-model/models/list-offer-metrics-response.d.ts +2 -2
- package/dist/types/src/api-model/models/list-offers-request-filters.d.ts +4 -4
- package/dist/types/src/api-model/models/list-offers-request-sort.d.ts +2 -2
- package/dist/types/src/api-model/models/list-offers-request.d.ts +3 -3
- package/dist/types/src/api-model/models/list-offers-response-offer.d.ts +3 -3
- package/dist/types/src/api-model/models/list-offers-response.d.ts +2 -2
- package/dist/types/src/api-model/models/offer-program-configuration-preferences.d.ts +1 -1
- package/dist/types/src/api-model/models/offer-program-configuration-promotions.d.ts +1 -1
- package/dist/types/src/api-model/models/offer-program-configuration.d.ts +3 -3
- package/dist/types/src/api-model/models/preference.d.ts +1 -1
- package/dist/types/src/api-model/models/promotion.d.ts +1 -1
- package/package.json +5 -5
|
@@ -128,7 +128,9 @@ const OffersApiFp = function (configuration) {
|
|
|
128
128
|
*/
|
|
129
129
|
async getSellingPartnerMetrics(body, options) {
|
|
130
130
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getSellingPartnerMetrics(body, options);
|
|
131
|
-
|
|
131
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
132
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['OffersApi.getSellingPartnerMetrics']?.[localVarOperationServerIndex]?.url;
|
|
133
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
132
134
|
},
|
|
133
135
|
/**
|
|
134
136
|
* Returns aggregated replenishment program metrics for a selling partner\'s offers. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
@@ -138,7 +140,9 @@ const OffersApiFp = function (configuration) {
|
|
|
138
140
|
*/
|
|
139
141
|
async listOfferMetrics(body, options) {
|
|
140
142
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listOfferMetrics(body, options);
|
|
141
|
-
|
|
143
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
144
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['OffersApi.listOfferMetrics']?.[localVarOperationServerIndex]?.url;
|
|
145
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
142
146
|
},
|
|
143
147
|
/**
|
|
144
148
|
* Returns the details of a selling partner\'s replenishment program offers. Note that this operation only supports sellers at this time. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
@@ -148,7 +152,9 @@ const OffersApiFp = function (configuration) {
|
|
|
148
152
|
*/
|
|
149
153
|
async listOffers(body, options) {
|
|
150
154
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listOffers(body, options);
|
|
151
|
-
|
|
155
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
156
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['OffersApi.listOffers']?.[localVarOperationServerIndex]?.url;
|
|
157
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
152
158
|
},
|
|
153
159
|
};
|
|
154
160
|
};
|
|
@@ -16,7 +16,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
17
|
};
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
19
|
+
exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
20
20
|
const axios_1 = __importDefault(require("axios"));
|
|
21
21
|
exports.BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
22
22
|
/**
|
|
@@ -43,7 +43,7 @@ class BaseAPI {
|
|
|
43
43
|
this.axios = axios;
|
|
44
44
|
if (configuration) {
|
|
45
45
|
this.configuration = configuration;
|
|
46
|
-
this.basePath = configuration.basePath
|
|
46
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -64,3 +64,8 @@ class RequiredError extends Error {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
exports.RequiredError = RequiredError;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @export
|
|
70
|
+
*/
|
|
71
|
+
exports.operationServerMap = {};
|
|
@@ -138,7 +138,7 @@ exports.toPathString = toPathString;
|
|
|
138
138
|
*/
|
|
139
139
|
const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
140
140
|
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
141
|
-
const axiosRequestArgs = { ...axiosArgs.options, url: (configuration?.basePath
|
|
141
|
+
const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
|
|
142
142
|
return axios.request(axiosRequestArgs);
|
|
143
143
|
};
|
|
144
144
|
};
|
|
@@ -49,6 +49,13 @@ class Configuration {
|
|
|
49
49
|
* @memberof Configuration
|
|
50
50
|
*/
|
|
51
51
|
basePath;
|
|
52
|
+
/**
|
|
53
|
+
* override server index
|
|
54
|
+
*
|
|
55
|
+
* @type {number}
|
|
56
|
+
* @memberof Configuration
|
|
57
|
+
*/
|
|
58
|
+
serverIndex;
|
|
52
59
|
/**
|
|
53
60
|
* base options for axios calls
|
|
54
61
|
*
|
|
@@ -70,6 +77,7 @@ class Configuration {
|
|
|
70
77
|
this.password = param.password;
|
|
71
78
|
this.accessToken = param.accessToken;
|
|
72
79
|
this.basePath = param.basePath;
|
|
80
|
+
this.serverIndex = param.serverIndex;
|
|
73
81
|
this.baseOptions = param.baseOptions;
|
|
74
82
|
this.formDataCtor = param.formDataCtor;
|
|
75
83
|
}
|
|
@@ -16,7 +16,7 @@ import globalAxios from 'axios';
|
|
|
16
16
|
// @ts-ignore
|
|
17
17
|
import { DUMMY_BASE_URL, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
18
18
|
// @ts-ignore
|
|
19
|
-
import { BASE_PATH, BaseAPI } from '../base';
|
|
19
|
+
import { BASE_PATH, BaseAPI, operationServerMap } from '../base';
|
|
20
20
|
/**
|
|
21
21
|
* OffersApi - axios parameter creator
|
|
22
22
|
* @export
|
|
@@ -121,7 +121,9 @@ export const OffersApiFp = function (configuration) {
|
|
|
121
121
|
*/
|
|
122
122
|
async getSellingPartnerMetrics(body, options) {
|
|
123
123
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getSellingPartnerMetrics(body, options);
|
|
124
|
-
|
|
124
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
125
|
+
const localVarOperationServerBasePath = operationServerMap['OffersApi.getSellingPartnerMetrics']?.[localVarOperationServerIndex]?.url;
|
|
126
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
125
127
|
},
|
|
126
128
|
/**
|
|
127
129
|
* Returns aggregated replenishment program metrics for a selling partner\'s offers. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
@@ -131,7 +133,9 @@ export const OffersApiFp = function (configuration) {
|
|
|
131
133
|
*/
|
|
132
134
|
async listOfferMetrics(body, options) {
|
|
133
135
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listOfferMetrics(body, options);
|
|
134
|
-
|
|
136
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
137
|
+
const localVarOperationServerBasePath = operationServerMap['OffersApi.listOfferMetrics']?.[localVarOperationServerIndex]?.url;
|
|
138
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
135
139
|
},
|
|
136
140
|
/**
|
|
137
141
|
* Returns the details of a selling partner\'s replenishment program offers. Note that this operation only supports sellers at this time. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
@@ -141,7 +145,9 @@ export const OffersApiFp = function (configuration) {
|
|
|
141
145
|
*/
|
|
142
146
|
async listOffers(body, options) {
|
|
143
147
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listOffers(body, options);
|
|
144
|
-
|
|
148
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
149
|
+
const localVarOperationServerBasePath = operationServerMap['OffersApi.listOffers']?.[localVarOperationServerIndex]?.url;
|
|
150
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
145
151
|
},
|
|
146
152
|
};
|
|
147
153
|
};
|
|
@@ -37,7 +37,7 @@ export class BaseAPI {
|
|
|
37
37
|
this.axios = axios;
|
|
38
38
|
if (configuration) {
|
|
39
39
|
this.configuration = configuration;
|
|
40
|
-
this.basePath = configuration.basePath
|
|
40
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -56,3 +56,8 @@ export class RequiredError extends Error {
|
|
|
56
56
|
this.name = "RequiredError";
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @export
|
|
62
|
+
*/
|
|
63
|
+
export const operationServerMap = {};
|
|
@@ -127,7 +127,7 @@ export const toPathString = function (url) {
|
|
|
127
127
|
*/
|
|
128
128
|
export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
129
129
|
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
130
|
-
const axiosRequestArgs = { ...axiosArgs.options, url: (configuration?.basePath
|
|
130
|
+
const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
|
|
131
131
|
return axios.request(axiosRequestArgs);
|
|
132
132
|
};
|
|
133
133
|
};
|
|
@@ -46,6 +46,13 @@ export class Configuration {
|
|
|
46
46
|
* @memberof Configuration
|
|
47
47
|
*/
|
|
48
48
|
basePath;
|
|
49
|
+
/**
|
|
50
|
+
* override server index
|
|
51
|
+
*
|
|
52
|
+
* @type {number}
|
|
53
|
+
* @memberof Configuration
|
|
54
|
+
*/
|
|
55
|
+
serverIndex;
|
|
49
56
|
/**
|
|
50
57
|
* base options for axios calls
|
|
51
58
|
*
|
|
@@ -67,6 +74,7 @@ export class Configuration {
|
|
|
67
74
|
this.password = param.password;
|
|
68
75
|
this.accessToken = param.accessToken;
|
|
69
76
|
this.basePath = param.basePath;
|
|
77
|
+
this.serverIndex = param.serverIndex;
|
|
70
78
|
this.baseOptions = param.baseOptions;
|
|
71
79
|
this.formDataCtor = param.formDataCtor;
|
|
72
80
|
}
|
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { Configuration } from '../configuration';
|
|
13
|
-
import type { AxiosPromise, AxiosInstance,
|
|
13
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
14
14
|
import globalAxios from 'axios';
|
|
15
|
-
import { RequestArgs, BaseAPI } from '../base';
|
|
16
|
-
import { GetSellingPartnerMetricsRequest } from '../models';
|
|
17
|
-
import { GetSellingPartnerMetricsResponse } from '../models';
|
|
18
|
-
import { ListOfferMetricsRequest } from '../models';
|
|
19
|
-
import { ListOfferMetricsResponse } from '../models';
|
|
20
|
-
import { ListOffersRequest } from '../models';
|
|
21
|
-
import { ListOffersResponse } from '../models';
|
|
15
|
+
import { type RequestArgs, BaseAPI } from '../base';
|
|
16
|
+
import type { GetSellingPartnerMetricsRequest } from '../models';
|
|
17
|
+
import type { GetSellingPartnerMetricsResponse } from '../models';
|
|
18
|
+
import type { ListOfferMetricsRequest } from '../models';
|
|
19
|
+
import type { ListOfferMetricsResponse } from '../models';
|
|
20
|
+
import type { ListOffersRequest } from '../models';
|
|
21
|
+
import type { ListOffersResponse } from '../models';
|
|
22
22
|
/**
|
|
23
23
|
* OffersApi - axios parameter creator
|
|
24
24
|
* @export
|
|
@@ -30,21 +30,21 @@ export declare const OffersApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
30
30
|
* @param {*} [options] Override http request option.
|
|
31
31
|
* @throws {RequiredError}
|
|
32
32
|
*/
|
|
33
|
-
getSellingPartnerMetrics: (body?: GetSellingPartnerMetricsRequest, options?:
|
|
33
|
+
getSellingPartnerMetrics: (body?: GetSellingPartnerMetricsRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
34
34
|
/**
|
|
35
35
|
* Returns aggregated replenishment program metrics for a selling partner\'s offers. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
36
36
|
* @param {ListOfferMetricsRequest} [body] The request body for the `listOfferMetrics` operation.
|
|
37
37
|
* @param {*} [options] Override http request option.
|
|
38
38
|
* @throws {RequiredError}
|
|
39
39
|
*/
|
|
40
|
-
listOfferMetrics: (body?: ListOfferMetricsRequest, options?:
|
|
40
|
+
listOfferMetrics: (body?: ListOfferMetricsRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
41
41
|
/**
|
|
42
42
|
* Returns the details of a selling partner\'s replenishment program offers. Note that this operation only supports sellers at this time. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
43
43
|
* @param {ListOffersRequest} [body]
|
|
44
44
|
* @param {*} [options] Override http request option.
|
|
45
45
|
* @throws {RequiredError}
|
|
46
46
|
*/
|
|
47
|
-
listOffers: (body?: ListOffersRequest, options?:
|
|
47
|
+
listOffers: (body?: ListOffersRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
48
48
|
};
|
|
49
49
|
/**
|
|
50
50
|
* OffersApi - functional programming interface
|
|
@@ -57,21 +57,21 @@ export declare const OffersApiFp: (configuration?: Configuration) => {
|
|
|
57
57
|
* @param {*} [options] Override http request option.
|
|
58
58
|
* @throws {RequiredError}
|
|
59
59
|
*/
|
|
60
|
-
getSellingPartnerMetrics(body?: GetSellingPartnerMetricsRequest, options?:
|
|
60
|
+
getSellingPartnerMetrics(body?: GetSellingPartnerMetricsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetSellingPartnerMetricsResponse>>;
|
|
61
61
|
/**
|
|
62
62
|
* Returns aggregated replenishment program metrics for a selling partner\'s offers. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
63
63
|
* @param {ListOfferMetricsRequest} [body] The request body for the `listOfferMetrics` operation.
|
|
64
64
|
* @param {*} [options] Override http request option.
|
|
65
65
|
* @throws {RequiredError}
|
|
66
66
|
*/
|
|
67
|
-
listOfferMetrics(body?: ListOfferMetricsRequest, options?:
|
|
67
|
+
listOfferMetrics(body?: ListOfferMetricsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListOfferMetricsResponse>>;
|
|
68
68
|
/**
|
|
69
69
|
* Returns the details of a selling partner\'s replenishment program offers. Note that this operation only supports sellers at this time. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
70
70
|
* @param {ListOffersRequest} [body]
|
|
71
71
|
* @param {*} [options] Override http request option.
|
|
72
72
|
* @throws {RequiredError}
|
|
73
73
|
*/
|
|
74
|
-
listOffers(body?: ListOffersRequest, options?:
|
|
74
|
+
listOffers(body?: ListOffersRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListOffersResponse>>;
|
|
75
75
|
};
|
|
76
76
|
/**
|
|
77
77
|
* OffersApi - factory interface
|
|
@@ -84,21 +84,21 @@ export declare const OffersApiFactory: (configuration?: Configuration, basePath?
|
|
|
84
84
|
* @param {*} [options] Override http request option.
|
|
85
85
|
* @throws {RequiredError}
|
|
86
86
|
*/
|
|
87
|
-
getSellingPartnerMetrics(requestParameters?: OffersApiGetSellingPartnerMetricsRequest, options?:
|
|
87
|
+
getSellingPartnerMetrics(requestParameters?: OffersApiGetSellingPartnerMetricsRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetSellingPartnerMetricsResponse>;
|
|
88
88
|
/**
|
|
89
89
|
* Returns aggregated replenishment program metrics for a selling partner\'s offers. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
90
90
|
* @param {OffersApiListOfferMetricsRequest} requestParameters Request parameters.
|
|
91
91
|
* @param {*} [options] Override http request option.
|
|
92
92
|
* @throws {RequiredError}
|
|
93
93
|
*/
|
|
94
|
-
listOfferMetrics(requestParameters?: OffersApiListOfferMetricsRequest, options?:
|
|
94
|
+
listOfferMetrics(requestParameters?: OffersApiListOfferMetricsRequest, options?: RawAxiosRequestConfig): AxiosPromise<ListOfferMetricsResponse>;
|
|
95
95
|
/**
|
|
96
96
|
* Returns the details of a selling partner\'s replenishment program offers. Note that this operation only supports sellers at this time. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
97
97
|
* @param {OffersApiListOffersRequest} requestParameters Request parameters.
|
|
98
98
|
* @param {*} [options] Override http request option.
|
|
99
99
|
* @throws {RequiredError}
|
|
100
100
|
*/
|
|
101
|
-
listOffers(requestParameters?: OffersApiListOffersRequest, options?:
|
|
101
|
+
listOffers(requestParameters?: OffersApiListOffersRequest, options?: RawAxiosRequestConfig): AxiosPromise<ListOffersResponse>;
|
|
102
102
|
};
|
|
103
103
|
/**
|
|
104
104
|
* Request parameters for getSellingPartnerMetrics operation in OffersApi.
|
|
@@ -153,7 +153,7 @@ export declare class OffersApi extends BaseAPI {
|
|
|
153
153
|
* @throws {RequiredError}
|
|
154
154
|
* @memberof OffersApi
|
|
155
155
|
*/
|
|
156
|
-
getSellingPartnerMetrics(requestParameters?: OffersApiGetSellingPartnerMetricsRequest, options?:
|
|
156
|
+
getSellingPartnerMetrics(requestParameters?: OffersApiGetSellingPartnerMetricsRequest, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<GetSellingPartnerMetricsResponse, any>>;
|
|
157
157
|
/**
|
|
158
158
|
* Returns aggregated replenishment program metrics for a selling partner\'s offers. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
159
159
|
* @param {OffersApiListOfferMetricsRequest} requestParameters Request parameters.
|
|
@@ -161,7 +161,7 @@ export declare class OffersApi extends BaseAPI {
|
|
|
161
161
|
* @throws {RequiredError}
|
|
162
162
|
* @memberof OffersApi
|
|
163
163
|
*/
|
|
164
|
-
listOfferMetrics(requestParameters?: OffersApiListOfferMetricsRequest, options?:
|
|
164
|
+
listOfferMetrics(requestParameters?: OffersApiListOfferMetricsRequest, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<ListOfferMetricsResponse, any>>;
|
|
165
165
|
/**
|
|
166
166
|
* Returns the details of a selling partner\'s replenishment program offers. Note that this operation only supports sellers at this time. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
167
167
|
* @param {OffersApiListOffersRequest} requestParameters Request parameters.
|
|
@@ -169,5 +169,5 @@ export declare class OffersApi extends BaseAPI {
|
|
|
169
169
|
* @throws {RequiredError}
|
|
170
170
|
* @memberof OffersApi
|
|
171
171
|
*/
|
|
172
|
-
listOffers(requestParameters?: OffersApiListOffersRequest, options?:
|
|
172
|
+
listOffers(requestParameters?: OffersApiListOffersRequest, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<ListOffersResponse, any>>;
|
|
173
173
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { Configuration } from './configuration';
|
|
13
|
-
import type { AxiosInstance,
|
|
13
|
+
import type { AxiosInstance, RawAxiosRequestConfig } 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:
|
|
32
|
+
options: RawAxiosRequestConfig;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
@@ -52,3 +52,15 @@ export declare class RequiredError extends Error {
|
|
|
52
52
|
field: string;
|
|
53
53
|
constructor(field: string, msg?: string);
|
|
54
54
|
}
|
|
55
|
+
interface ServerMap {
|
|
56
|
+
[key: string]: {
|
|
57
|
+
url: string;
|
|
58
|
+
description: string;
|
|
59
|
+
}[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @export
|
|
64
|
+
*/
|
|
65
|
+
export declare const operationServerMap: ServerMap;
|
|
66
|
+
export {};
|
|
@@ -15,6 +15,7 @@ export interface ConfigurationParameters {
|
|
|
15
15
|
password?: string;
|
|
16
16
|
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
17
17
|
basePath?: string;
|
|
18
|
+
serverIndex?: number;
|
|
18
19
|
baseOptions?: any;
|
|
19
20
|
formDataCtor?: new () => any;
|
|
20
21
|
}
|
|
@@ -53,6 +54,13 @@ export declare class Configuration {
|
|
|
53
54
|
* @memberof Configuration
|
|
54
55
|
*/
|
|
55
56
|
basePath?: string;
|
|
57
|
+
/**
|
|
58
|
+
* override server index
|
|
59
|
+
*
|
|
60
|
+
* @type {number}
|
|
61
|
+
* @memberof Configuration
|
|
62
|
+
*/
|
|
63
|
+
serverIndex?: number;
|
|
56
64
|
/**
|
|
57
65
|
* base options for axios calls
|
|
58
66
|
*
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { AggregationFrequency } from './aggregation-frequency';
|
|
13
|
-
import { Metric } from './metric';
|
|
14
|
-
import { ProgramType } from './program-type';
|
|
15
|
-
import { TimeInterval } from './time-interval';
|
|
16
|
-
import { TimePeriodType } from './time-period-type';
|
|
12
|
+
import type { AggregationFrequency } from './aggregation-frequency';
|
|
13
|
+
import type { Metric } from './metric';
|
|
14
|
+
import type { ProgramType } from './program-type';
|
|
15
|
+
import type { TimeInterval } from './time-interval';
|
|
16
|
+
import type { TimePeriodType } from './time-period-type';
|
|
17
17
|
/**
|
|
18
18
|
* The request body for the `getSellingPartnerMetrics` operation.
|
|
19
19
|
* @export
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { TimeInterval } from './time-interval';
|
|
12
|
+
import type { TimeInterval } from './time-interval';
|
|
13
13
|
/**
|
|
14
14
|
* An object which contains metric data for a selling partner.
|
|
15
15
|
* @export
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { GetSellingPartnerMetricsResponseMetric } from './get-selling-partner-metrics-response-metric';
|
|
12
|
+
import type { GetSellingPartnerMetricsResponseMetric } from './get-selling-partner-metrics-response-metric';
|
|
13
13
|
/**
|
|
14
14
|
* The response schema for the `getSellingPartnerMetrics` operation.
|
|
15
15
|
* @export
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { AggregationFrequency } from './aggregation-frequency';
|
|
13
|
-
import { ProgramType } from './program-type';
|
|
14
|
-
import { TimeInterval } from './time-interval';
|
|
15
|
-
import { TimePeriodType } from './time-period-type';
|
|
12
|
+
import type { AggregationFrequency } from './aggregation-frequency';
|
|
13
|
+
import type { ProgramType } from './program-type';
|
|
14
|
+
import type { TimeInterval } from './time-interval';
|
|
15
|
+
import type { TimePeriodType } from './time-period-type';
|
|
16
16
|
/**
|
|
17
17
|
* Use these parameters to filter results. Any result must match all provided parameters. For any parameter that is an array, the result must match at least one element in the provided array.
|
|
18
18
|
* @export
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { ListOfferMetricsSortKey } from './list-offer-metrics-sort-key';
|
|
13
|
-
import { SortOrder } from './sort-order';
|
|
12
|
+
import type { ListOfferMetricsSortKey } from './list-offer-metrics-sort-key';
|
|
13
|
+
import type { SortOrder } from './sort-order';
|
|
14
14
|
/**
|
|
15
15
|
* Use these parameters to sort the response.
|
|
16
16
|
* @export
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { ListOfferMetricsRequestFilters } from './list-offer-metrics-request-filters';
|
|
13
|
-
import { ListOfferMetricsRequestPagination } from './list-offer-metrics-request-pagination';
|
|
14
|
-
import { ListOfferMetricsRequestSort } from './list-offer-metrics-request-sort';
|
|
12
|
+
import type { ListOfferMetricsRequestFilters } from './list-offer-metrics-request-filters';
|
|
13
|
+
import type { ListOfferMetricsRequestPagination } from './list-offer-metrics-request-pagination';
|
|
14
|
+
import type { ListOfferMetricsRequestSort } from './list-offer-metrics-request-sort';
|
|
15
15
|
/**
|
|
16
16
|
* The request body for the `listOfferMetrics` operation.
|
|
17
17
|
* @export
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { ListOfferMetricsResponseOffer } from './list-offer-metrics-response-offer';
|
|
13
|
-
import { PaginationResponse } from './pagination-response';
|
|
12
|
+
import type { ListOfferMetricsResponseOffer } from './list-offer-metrics-response-offer';
|
|
13
|
+
import type { PaginationResponse } from './pagination-response';
|
|
14
14
|
/**
|
|
15
15
|
* The response schema for the `listOfferMetrics` operation.
|
|
16
16
|
* @export
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { EligibilityStatus } from './eligibility-status';
|
|
13
|
-
import { Preference } from './preference';
|
|
14
|
-
import { ProgramType } from './program-type';
|
|
15
|
-
import { Promotion } from './promotion';
|
|
12
|
+
import type { EligibilityStatus } from './eligibility-status';
|
|
13
|
+
import type { Preference } from './preference';
|
|
14
|
+
import type { ProgramType } from './program-type';
|
|
15
|
+
import type { Promotion } from './promotion';
|
|
16
16
|
/**
|
|
17
17
|
* Use these parameters to filter results. Any result must match all of the provided parameters. For any parameter that is an array, the result must match at least one element in the provided array.
|
|
18
18
|
* @export
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { ListOffersSortKey } from './list-offers-sort-key';
|
|
13
|
-
import { SortOrder } from './sort-order';
|
|
12
|
+
import type { ListOffersSortKey } from './list-offers-sort-key';
|
|
13
|
+
import type { SortOrder } from './sort-order';
|
|
14
14
|
/**
|
|
15
15
|
* Use these parameters to sort the response.
|
|
16
16
|
* @export
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { ListOffersRequestFilters } from './list-offers-request-filters';
|
|
13
|
-
import { ListOffersRequestPagination } from './list-offers-request-pagination';
|
|
14
|
-
import { ListOffersRequestSort } from './list-offers-request-sort';
|
|
12
|
+
import type { ListOffersRequestFilters } from './list-offers-request-filters';
|
|
13
|
+
import type { ListOffersRequestPagination } from './list-offers-request-pagination';
|
|
14
|
+
import type { ListOffersRequestSort } from './list-offers-request-sort';
|
|
15
15
|
/**
|
|
16
16
|
* The request body for the `listOffers` operation.
|
|
17
17
|
* @export
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { EligibilityStatus } from './eligibility-status';
|
|
13
|
-
import { OfferProgramConfiguration } from './offer-program-configuration';
|
|
14
|
-
import { ProgramType } from './program-type';
|
|
12
|
+
import type { EligibilityStatus } from './eligibility-status';
|
|
13
|
+
import type { OfferProgramConfiguration } from './offer-program-configuration';
|
|
14
|
+
import type { ProgramType } from './program-type';
|
|
15
15
|
/**
|
|
16
16
|
* An object which contains details about an offer.
|
|
17
17
|
* @export
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { ListOffersResponseOffer } from './list-offers-response-offer';
|
|
13
|
-
import { PaginationResponse } from './pagination-response';
|
|
12
|
+
import type { ListOffersResponseOffer } from './list-offers-response-offer';
|
|
13
|
+
import type { PaginationResponse } from './pagination-response';
|
|
14
14
|
/**
|
|
15
15
|
* The response schema for the `listOffers` operation.
|
|
16
16
|
* @export
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { AutoEnrollmentPreference } from './auto-enrollment-preference';
|
|
12
|
+
import type { AutoEnrollmentPreference } from './auto-enrollment-preference';
|
|
13
13
|
/**
|
|
14
14
|
* An object which contains the preferences applied to the offer.
|
|
15
15
|
* @export
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { OfferProgramConfigurationPromotionsDiscountFunding } from './offer-program-configuration-promotions-discount-funding';
|
|
12
|
+
import type { OfferProgramConfigurationPromotionsDiscountFunding } from './offer-program-configuration-promotions-discount-funding';
|
|
13
13
|
/**
|
|
14
14
|
* An object which represents all promotions applied to an offer.
|
|
15
15
|
* @export
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { EnrollmentMethod } from './enrollment-method';
|
|
13
|
-
import { OfferProgramConfigurationPreferences } from './offer-program-configuration-preferences';
|
|
14
|
-
import { OfferProgramConfigurationPromotions } from './offer-program-configuration-promotions';
|
|
12
|
+
import type { EnrollmentMethod } from './enrollment-method';
|
|
13
|
+
import type { OfferProgramConfigurationPreferences } from './offer-program-configuration-preferences';
|
|
14
|
+
import type { OfferProgramConfigurationPromotions } from './offer-program-configuration-promotions';
|
|
15
15
|
/**
|
|
16
16
|
* The offer program configuration contains a set of program properties for an offer.
|
|
17
17
|
* @export
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { AutoEnrollmentPreference } from './auto-enrollment-preference';
|
|
12
|
+
import type { AutoEnrollmentPreference } from './auto-enrollment-preference';
|
|
13
13
|
/**
|
|
14
14
|
* Offer preferences that you can include in the result filter criteria.
|
|
15
15
|
* @export
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { DiscountFunding } from './discount-funding';
|
|
12
|
+
import type { DiscountFunding } from './discount-funding';
|
|
13
13
|
/**
|
|
14
14
|
* Offer promotions to include in the result filter criteria.
|
|
15
15
|
* @export
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sp-api-sdk/replenishment-api-2022-11-07",
|
|
3
|
-
"author": "
|
|
3
|
+
"author": "Bertrand Marron <bertrand@bizon.solutions>",
|
|
4
4
|
"description": "The Selling Partner API for Replenishment (Replenishment API) provides programmatic access to replenishment program metrics and offers. These programs provide recurring delivery of any replenishable item at a frequency chosen by the customer. The Replenishment API is available worldwide wherever Amazon Subscribe & Save is available or is supported. The API is available to vendors and FBA selling partners.",
|
|
5
|
-
"version": "2.0
|
|
5
|
+
"version": "2.1.0",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
7
7
|
"module": "dist/es/index.js",
|
|
8
8
|
"types": "dist/types/index.d.ts",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"dist/**/*.d.ts"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@sp-api-sdk/common": "2.0.
|
|
22
|
-
"axios": "^1.
|
|
21
|
+
"@sp-api-sdk/common": "2.0.8",
|
|
22
|
+
"axios": "^1.7.0"
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"sp sdk",
|
|
41
41
|
"replenishment api"
|
|
42
42
|
],
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "5a245a25a9f1765c825e2178668d4b0f4e44689b"
|
|
44
44
|
}
|