@sp-api-sdk/fba-inventory-api-v1 2.0.7 → 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/fba-inventory-api.js +12 -4
- 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/fba-inventory-api.js +12 -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/fba-inventory-api.d.ts +17 -10
- 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-inventory-summaries-response.d.ts +2 -2
- package/dist/types/src/api-model/models/get-inventory-summaries-result.d.ts +2 -2
- package/dist/types/src/api-model/models/inventory-details.d.ts +3 -3
- package/dist/types/src/api-model/models/inventory-summary.d.ts +1 -1
- package/dist/types/src/api-model/models/researching-quantity.d.ts +1 -1
- package/package.json +4 -4
|
@@ -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.FbaInventoryApi = exports.FbaInventoryApiFactory = exports.FbaInventoryApiFp = exports.FbaInventoryApiAxiosParamCreator = void 0;
|
|
19
|
+
exports.GetInventorySummariesGranularityTypeEnum = exports.FbaInventoryApi = exports.FbaInventoryApiFactory = exports.FbaInventoryApiFp = exports.FbaInventoryApiAxiosParamCreator = void 0;
|
|
20
20
|
const axios_1 = __importDefault(require("axios"));
|
|
21
21
|
// Some imports not used depending on template conditions
|
|
22
22
|
// @ts-ignore
|
|
@@ -31,7 +31,7 @@ const FbaInventoryApiAxiosParamCreator = function (configuration) {
|
|
|
31
31
|
return {
|
|
32
32
|
/**
|
|
33
33
|
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the `startDateTime`, `sellerSkus` and `sellerSku` parameters: - All inventory summaries with available details are returned when the `startDateTime`, `sellerSkus` and `sellerSku` parameters are omitted. - When `startDateTime` is provided, the operation returns inventory summaries that have had changes after the date and time specified. The `sellerSkus` and `sellerSku` parameters are ignored. **Important:** To avoid errors, use both `startDateTime` and `nextToken` to get the next page of inventory summaries that have changed after the date and time specified. - When the `sellerSkus` parameter is provided, the operation returns inventory summaries for only the specified `sellerSkus`. The `sellerSku` parameter is ignored. - When the `sellerSku` parameter is provided, the operation returns inventory summaries for only the specified `sellerSku`. **Note:** The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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).
|
|
34
|
-
* @param {
|
|
34
|
+
* @param {GetInventorySummariesGranularityTypeEnum} granularityType The granularity type for the inventory aggregation level.
|
|
35
35
|
* @param {string} granularityId The granularity ID for the inventory aggregation level.
|
|
36
36
|
* @param {Array<string>} marketplaceIds The marketplace ID for the marketplace for which to return inventory summaries.
|
|
37
37
|
* @param {boolean} [details] true to return inventory summaries with additional summarized inventory details and quantities. Otherwise, returns inventory summaries only (default value).
|
|
@@ -105,7 +105,7 @@ const FbaInventoryApiFp = function (configuration) {
|
|
|
105
105
|
return {
|
|
106
106
|
/**
|
|
107
107
|
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the `startDateTime`, `sellerSkus` and `sellerSku` parameters: - All inventory summaries with available details are returned when the `startDateTime`, `sellerSkus` and `sellerSku` parameters are omitted. - When `startDateTime` is provided, the operation returns inventory summaries that have had changes after the date and time specified. The `sellerSkus` and `sellerSku` parameters are ignored. **Important:** To avoid errors, use both `startDateTime` and `nextToken` to get the next page of inventory summaries that have changed after the date and time specified. - When the `sellerSkus` parameter is provided, the operation returns inventory summaries for only the specified `sellerSkus`. The `sellerSku` parameter is ignored. - When the `sellerSku` parameter is provided, the operation returns inventory summaries for only the specified `sellerSku`. **Note:** The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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).
|
|
108
|
-
* @param {
|
|
108
|
+
* @param {GetInventorySummariesGranularityTypeEnum} granularityType The granularity type for the inventory aggregation level.
|
|
109
109
|
* @param {string} granularityId The granularity ID for the inventory aggregation level.
|
|
110
110
|
* @param {Array<string>} marketplaceIds The marketplace ID for the marketplace for which to return inventory summaries.
|
|
111
111
|
* @param {boolean} [details] true to return inventory summaries with additional summarized inventory details and quantities. Otherwise, returns inventory summaries only (default value).
|
|
@@ -118,7 +118,9 @@ const FbaInventoryApiFp = function (configuration) {
|
|
|
118
118
|
*/
|
|
119
119
|
async getInventorySummaries(granularityType, granularityId, marketplaceIds, details, startDateTime, sellerSkus, sellerSku, nextToken, options) {
|
|
120
120
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getInventorySummaries(granularityType, granularityId, marketplaceIds, details, startDateTime, sellerSkus, sellerSku, nextToken, options);
|
|
121
|
-
|
|
121
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
122
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['FbaInventoryApi.getInventorySummaries']?.[localVarOperationServerIndex]?.url;
|
|
123
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
122
124
|
},
|
|
123
125
|
};
|
|
124
126
|
};
|
|
@@ -161,3 +163,9 @@ class FbaInventoryApi extends base_1.BaseAPI {
|
|
|
161
163
|
}
|
|
162
164
|
}
|
|
163
165
|
exports.FbaInventoryApi = FbaInventoryApi;
|
|
166
|
+
/**
|
|
167
|
+
* @export
|
|
168
|
+
*/
|
|
169
|
+
exports.GetInventorySummariesGranularityTypeEnum = {
|
|
170
|
+
Marketplace: 'Marketplace'
|
|
171
|
+
};
|
|
@@ -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, assertParamExists, setSearchParams, toPathString, createRequestFunction } from '../common';
|
|
18
18
|
// @ts-ignore
|
|
19
|
-
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI } from '../base';
|
|
19
|
+
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, operationServerMap } from '../base';
|
|
20
20
|
/**
|
|
21
21
|
* FbaInventoryApi - axios parameter creator
|
|
22
22
|
* @export
|
|
@@ -25,7 +25,7 @@ export const FbaInventoryApiAxiosParamCreator = function (configuration) {
|
|
|
25
25
|
return {
|
|
26
26
|
/**
|
|
27
27
|
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the `startDateTime`, `sellerSkus` and `sellerSku` parameters: - All inventory summaries with available details are returned when the `startDateTime`, `sellerSkus` and `sellerSku` parameters are omitted. - When `startDateTime` is provided, the operation returns inventory summaries that have had changes after the date and time specified. The `sellerSkus` and `sellerSku` parameters are ignored. **Important:** To avoid errors, use both `startDateTime` and `nextToken` to get the next page of inventory summaries that have changed after the date and time specified. - When the `sellerSkus` parameter is provided, the operation returns inventory summaries for only the specified `sellerSkus`. The `sellerSku` parameter is ignored. - When the `sellerSku` parameter is provided, the operation returns inventory summaries for only the specified `sellerSku`. **Note:** The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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).
|
|
28
|
-
* @param {
|
|
28
|
+
* @param {GetInventorySummariesGranularityTypeEnum} granularityType The granularity type for the inventory aggregation level.
|
|
29
29
|
* @param {string} granularityId The granularity ID for the inventory aggregation level.
|
|
30
30
|
* @param {Array<string>} marketplaceIds The marketplace ID for the marketplace for which to return inventory summaries.
|
|
31
31
|
* @param {boolean} [details] true to return inventory summaries with additional summarized inventory details and quantities. Otherwise, returns inventory summaries only (default value).
|
|
@@ -98,7 +98,7 @@ export const FbaInventoryApiFp = function (configuration) {
|
|
|
98
98
|
return {
|
|
99
99
|
/**
|
|
100
100
|
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the `startDateTime`, `sellerSkus` and `sellerSku` parameters: - All inventory summaries with available details are returned when the `startDateTime`, `sellerSkus` and `sellerSku` parameters are omitted. - When `startDateTime` is provided, the operation returns inventory summaries that have had changes after the date and time specified. The `sellerSkus` and `sellerSku` parameters are ignored. **Important:** To avoid errors, use both `startDateTime` and `nextToken` to get the next page of inventory summaries that have changed after the date and time specified. - When the `sellerSkus` parameter is provided, the operation returns inventory summaries for only the specified `sellerSkus`. The `sellerSku` parameter is ignored. - When the `sellerSku` parameter is provided, the operation returns inventory summaries for only the specified `sellerSku`. **Note:** The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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).
|
|
101
|
-
* @param {
|
|
101
|
+
* @param {GetInventorySummariesGranularityTypeEnum} granularityType The granularity type for the inventory aggregation level.
|
|
102
102
|
* @param {string} granularityId The granularity ID for the inventory aggregation level.
|
|
103
103
|
* @param {Array<string>} marketplaceIds The marketplace ID for the marketplace for which to return inventory summaries.
|
|
104
104
|
* @param {boolean} [details] true to return inventory summaries with additional summarized inventory details and quantities. Otherwise, returns inventory summaries only (default value).
|
|
@@ -111,7 +111,9 @@ export const FbaInventoryApiFp = function (configuration) {
|
|
|
111
111
|
*/
|
|
112
112
|
async getInventorySummaries(granularityType, granularityId, marketplaceIds, details, startDateTime, sellerSkus, sellerSku, nextToken, options) {
|
|
113
113
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getInventorySummaries(granularityType, granularityId, marketplaceIds, details, startDateTime, sellerSkus, sellerSku, nextToken, options);
|
|
114
|
-
|
|
114
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
115
|
+
const localVarOperationServerBasePath = operationServerMap['FbaInventoryApi.getInventorySummaries']?.[localVarOperationServerIndex]?.url;
|
|
116
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
115
117
|
},
|
|
116
118
|
};
|
|
117
119
|
};
|
|
@@ -151,3 +153,9 @@ export class FbaInventoryApi extends BaseAPI {
|
|
|
151
153
|
return FbaInventoryApiFp(this.configuration).getInventorySummaries(requestParameters.granularityType, requestParameters.granularityId, requestParameters.marketplaceIds, requestParameters.details, requestParameters.startDateTime, requestParameters.sellerSkus, requestParameters.sellerSku, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
152
154
|
}
|
|
153
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* @export
|
|
158
|
+
*/
|
|
159
|
+
export const GetInventorySummariesGranularityTypeEnum = {
|
|
160
|
+
Marketplace: 'Marketplace'
|
|
161
|
+
};
|
|
@@ -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,10 +10,10 @@
|
|
|
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 { GetInventorySummariesResponse } from '../models';
|
|
15
|
+
import { type RequestArgs, BaseAPI } from '../base';
|
|
16
|
+
import type { GetInventorySummariesResponse } from '../models';
|
|
17
17
|
/**
|
|
18
18
|
* FbaInventoryApi - axios parameter creator
|
|
19
19
|
* @export
|
|
@@ -21,7 +21,7 @@ import { GetInventorySummariesResponse } from '../models';
|
|
|
21
21
|
export declare const FbaInventoryApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
22
22
|
/**
|
|
23
23
|
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the `startDateTime`, `sellerSkus` and `sellerSku` parameters: - All inventory summaries with available details are returned when the `startDateTime`, `sellerSkus` and `sellerSku` parameters are omitted. - When `startDateTime` is provided, the operation returns inventory summaries that have had changes after the date and time specified. The `sellerSkus` and `sellerSku` parameters are ignored. **Important:** To avoid errors, use both `startDateTime` and `nextToken` to get the next page of inventory summaries that have changed after the date and time specified. - When the `sellerSkus` parameter is provided, the operation returns inventory summaries for only the specified `sellerSkus`. The `sellerSku` parameter is ignored. - When the `sellerSku` parameter is provided, the operation returns inventory summaries for only the specified `sellerSku`. **Note:** The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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).
|
|
24
|
-
* @param {
|
|
24
|
+
* @param {GetInventorySummariesGranularityTypeEnum} granularityType The granularity type for the inventory aggregation level.
|
|
25
25
|
* @param {string} granularityId The granularity ID for the inventory aggregation level.
|
|
26
26
|
* @param {Array<string>} marketplaceIds The marketplace ID for the marketplace for which to return inventory summaries.
|
|
27
27
|
* @param {boolean} [details] true to return inventory summaries with additional summarized inventory details and quantities. Otherwise, returns inventory summaries only (default value).
|
|
@@ -32,7 +32,7 @@ export declare const FbaInventoryApiAxiosParamCreator: (configuration?: Configur
|
|
|
32
32
|
* @param {*} [options] Override http request option.
|
|
33
33
|
* @throws {RequiredError}
|
|
34
34
|
*/
|
|
35
|
-
getInventorySummaries: (granularityType:
|
|
35
|
+
getInventorySummaries: (granularityType: GetInventorySummariesGranularityTypeEnum, granularityId: string, marketplaceIds: Array<string>, details?: boolean, startDateTime?: string, sellerSkus?: Array<string>, sellerSku?: string, nextToken?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
36
36
|
};
|
|
37
37
|
/**
|
|
38
38
|
* FbaInventoryApi - functional programming interface
|
|
@@ -41,7 +41,7 @@ export declare const FbaInventoryApiAxiosParamCreator: (configuration?: Configur
|
|
|
41
41
|
export declare const FbaInventoryApiFp: (configuration?: Configuration) => {
|
|
42
42
|
/**
|
|
43
43
|
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the `startDateTime`, `sellerSkus` and `sellerSku` parameters: - All inventory summaries with available details are returned when the `startDateTime`, `sellerSkus` and `sellerSku` parameters are omitted. - When `startDateTime` is provided, the operation returns inventory summaries that have had changes after the date and time specified. The `sellerSkus` and `sellerSku` parameters are ignored. **Important:** To avoid errors, use both `startDateTime` and `nextToken` to get the next page of inventory summaries that have changed after the date and time specified. - When the `sellerSkus` parameter is provided, the operation returns inventory summaries for only the specified `sellerSkus`. The `sellerSku` parameter is ignored. - When the `sellerSku` parameter is provided, the operation returns inventory summaries for only the specified `sellerSku`. **Note:** The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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).
|
|
44
|
-
* @param {
|
|
44
|
+
* @param {GetInventorySummariesGranularityTypeEnum} granularityType The granularity type for the inventory aggregation level.
|
|
45
45
|
* @param {string} granularityId The granularity ID for the inventory aggregation level.
|
|
46
46
|
* @param {Array<string>} marketplaceIds The marketplace ID for the marketplace for which to return inventory summaries.
|
|
47
47
|
* @param {boolean} [details] true to return inventory summaries with additional summarized inventory details and quantities. Otherwise, returns inventory summaries only (default value).
|
|
@@ -52,7 +52,7 @@ export declare const FbaInventoryApiFp: (configuration?: Configuration) => {
|
|
|
52
52
|
* @param {*} [options] Override http request option.
|
|
53
53
|
* @throws {RequiredError}
|
|
54
54
|
*/
|
|
55
|
-
getInventorySummaries(granularityType:
|
|
55
|
+
getInventorySummaries(granularityType: GetInventorySummariesGranularityTypeEnum, granularityId: string, marketplaceIds: Array<string>, details?: boolean, startDateTime?: string, sellerSkus?: Array<string>, sellerSku?: string, nextToken?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetInventorySummariesResponse>>;
|
|
56
56
|
};
|
|
57
57
|
/**
|
|
58
58
|
* FbaInventoryApi - factory interface
|
|
@@ -65,7 +65,7 @@ export declare const FbaInventoryApiFactory: (configuration?: Configuration, bas
|
|
|
65
65
|
* @param {*} [options] Override http request option.
|
|
66
66
|
* @throws {RequiredError}
|
|
67
67
|
*/
|
|
68
|
-
getInventorySummaries(requestParameters: FbaInventoryApiGetInventorySummariesRequest, options?:
|
|
68
|
+
getInventorySummaries(requestParameters: FbaInventoryApiGetInventorySummariesRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetInventorySummariesResponse>;
|
|
69
69
|
};
|
|
70
70
|
/**
|
|
71
71
|
* Request parameters for getInventorySummaries operation in FbaInventoryApi.
|
|
@@ -78,7 +78,7 @@ export interface FbaInventoryApiGetInventorySummariesRequest {
|
|
|
78
78
|
* @type {'Marketplace'}
|
|
79
79
|
* @memberof FbaInventoryApiGetInventorySummaries
|
|
80
80
|
*/
|
|
81
|
-
readonly granularityType:
|
|
81
|
+
readonly granularityType: GetInventorySummariesGranularityTypeEnum;
|
|
82
82
|
/**
|
|
83
83
|
* The granularity ID for the inventory aggregation level.
|
|
84
84
|
* @type {string}
|
|
@@ -136,5 +136,12 @@ export declare class FbaInventoryApi extends BaseAPI {
|
|
|
136
136
|
* @throws {RequiredError}
|
|
137
137
|
* @memberof FbaInventoryApi
|
|
138
138
|
*/
|
|
139
|
-
getInventorySummaries(requestParameters: FbaInventoryApiGetInventorySummariesRequest, options?:
|
|
139
|
+
getInventorySummaries(requestParameters: FbaInventoryApiGetInventorySummariesRequest, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<GetInventorySummariesResponse, any>>;
|
|
140
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* @export
|
|
143
|
+
*/
|
|
144
|
+
export declare const GetInventorySummariesGranularityTypeEnum: {
|
|
145
|
+
readonly Marketplace: "Marketplace";
|
|
146
|
+
};
|
|
147
|
+
export type GetInventorySummariesGranularityTypeEnum = typeof GetInventorySummariesGranularityTypeEnum[keyof typeof GetInventorySummariesGranularityTypeEnum];
|
|
@@ -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,8 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { GetInventorySummariesResult } from './get-inventory-summaries-result';
|
|
13
|
-
import { Pagination } from './pagination';
|
|
12
|
+
import type { GetInventorySummariesResult } from './get-inventory-summaries-result';
|
|
13
|
+
import type { Pagination } from './pagination';
|
|
14
14
|
/**
|
|
15
15
|
* The Response schema.
|
|
16
16
|
* @export
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { Granularity } from './granularity';
|
|
13
|
-
import { InventorySummary } from './inventory-summary';
|
|
12
|
+
import type { Granularity } from './granularity';
|
|
13
|
+
import type { InventorySummary } from './inventory-summary';
|
|
14
14
|
/**
|
|
15
15
|
* The payload schema for the getInventorySummaries operation.
|
|
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 { ResearchingQuantity } from './researching-quantity';
|
|
13
|
-
import { ReservedQuantity } from './reserved-quantity';
|
|
14
|
-
import { UnfulfillableQuantity } from './unfulfillable-quantity';
|
|
12
|
+
import type { ResearchingQuantity } from './researching-quantity';
|
|
13
|
+
import type { ReservedQuantity } from './reserved-quantity';
|
|
14
|
+
import type { UnfulfillableQuantity } from './unfulfillable-quantity';
|
|
15
15
|
/**
|
|
16
16
|
* Summarized inventory details. This object will not appear if the details parameter in the request is false.
|
|
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 { InventoryDetails } from './inventory-details';
|
|
12
|
+
import type { InventoryDetails } from './inventory-details';
|
|
13
13
|
/**
|
|
14
14
|
* Inventory summary for a specific item.
|
|
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 { ResearchingQuantityEntry } from './researching-quantity-entry';
|
|
12
|
+
import type { ResearchingQuantityEntry } from './researching-quantity-entry';
|
|
13
13
|
/**
|
|
14
14
|
* The number of misplaced or warehouse damaged units that are actively being confirmed at our fulfillment centers.
|
|
15
15
|
* @export
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@sp-api-sdk/fba-inventory-api-v1",
|
|
3
3
|
"author": "Bertrand Marron <bertrand@bizon.solutions>",
|
|
4
4
|
"description": "The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network.",
|
|
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
|
"fba inventory api"
|
|
42
42
|
],
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "5a245a25a9f1765c825e2178668d4b0f4e44689b"
|
|
44
44
|
}
|