@sp-api-sdk/fba-inventory-api-v1 1.8.7 → 1.9.3
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 +38 -15
- package/dist/cjs/src/api-model/api/fba-inventory-api.js +4 -4
- package/dist/cjs/src/client.js +14 -11
- package/dist/es/src/api-model/api/fba-inventory-api.js +4 -4
- package/dist/es/src/client.js +14 -11
- package/dist/types/src/api-model/api/fba-inventory-api.d.ts +5 -5
- package/dist/types/src/api-model/common.d.ts +1 -1
- package/dist/types/src/client.d.ts +4 -4
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network. Today this API is available only in the North America region. In 2021 we plan to release this API in the Europe and Far East regions.
|
|
4
4
|
|
|
5
|
+
[](https://www.npmjs.com/package/@sp-api-sdk/fba-inventory-api-v1)
|
|
6
|
+
[](https://github.com/xojs/xo)
|
|
7
|
+
|
|
8
|
+
## Documentation
|
|
9
|
+
|
|
10
|
+
Learn more about this Selling Partner API by visiting the [official documentation](https://github.com/amzn/selling-partner-api-docs/tree/main/references/fba-inventory-api/fbaInventory.md).
|
|
11
|
+
|
|
12
|
+
Also, see the [generated documentation](https://bizon.github.io/selling-partner-api-sdk/modules/_sp_api_sdk_fba_inventory_api_v1.html) for this API client.
|
|
13
|
+
|
|
5
14
|
## Installing
|
|
6
15
|
|
|
7
16
|
```sh
|
|
@@ -19,26 +28,25 @@ import {SellingPartnerApiAuth} from '@sp-api-sdk/auth'
|
|
|
19
28
|
import {FbaInventoryApiClient} from '@sp-api-sdk/fba-inventory-api-v1'
|
|
20
29
|
|
|
21
30
|
const auth = new SellingPartnerApiAuth({
|
|
22
|
-
clientId:
|
|
23
|
-
clientSecret:
|
|
24
|
-
refreshToken: '',
|
|
25
|
-
secretAccessKey: '',
|
|
31
|
+
clientId: process.env.LWA_CLIENT_ID,
|
|
32
|
+
clientSecret: process.env.LWA_CLIENT_SECRET,
|
|
33
|
+
refreshToken: 'Atzr|…',
|
|
26
34
|
accessKeyId: '',
|
|
27
|
-
|
|
35
|
+
secretAccessKey: '',
|
|
28
36
|
role: {
|
|
29
|
-
arn: '',
|
|
30
|
-
}
|
|
37
|
+
arn: 'arn:aws:iam::…',
|
|
38
|
+
},
|
|
31
39
|
})
|
|
32
40
|
|
|
33
41
|
const client = new FbaInventoryApiClient({
|
|
34
42
|
auth,
|
|
35
|
-
region: 'eu'
|
|
43
|
+
region: 'eu',
|
|
36
44
|
})
|
|
37
45
|
```
|
|
38
46
|
|
|
39
|
-
##
|
|
47
|
+
## Rate Limiting
|
|
40
48
|
|
|
41
|
-
|
|
49
|
+
In order to retry rate limited requests (HTTP 429), you can configure the API client as such:
|
|
42
50
|
|
|
43
51
|
```javascript
|
|
44
52
|
const client = new FbaInventoryApiClient({
|
|
@@ -46,13 +54,28 @@ const client = new FbaInventoryApiClient({
|
|
|
46
54
|
region: 'eu',
|
|
47
55
|
rateLimiting: {
|
|
48
56
|
retry: true,
|
|
49
|
-
|
|
50
|
-
|
|
57
|
+
// Optionally specify a callback that will be called on every retry.
|
|
58
|
+
onRetry: (retryInfo) => {
|
|
59
|
+
console.log(retryInfo)
|
|
60
|
+
},
|
|
61
|
+
},
|
|
51
62
|
})
|
|
52
63
|
```
|
|
53
64
|
|
|
54
|
-
The
|
|
65
|
+
The rate limits used for each route are specified in the [API documentation]((https://github.com/amzn/selling-partner-api-docs/tree/main/references/fba-inventory-api/fbaInventory.md)).
|
|
66
|
+
|
|
67
|
+
## License
|
|
68
|
+
|
|
69
|
+
MIT
|
|
55
70
|
|
|
56
|
-
##
|
|
71
|
+
## Miscellaneous
|
|
57
72
|
|
|
58
|
-
|
|
73
|
+
```
|
|
74
|
+
╚⊙ ⊙╝
|
|
75
|
+
╚═(███)═╝
|
|
76
|
+
╚═(███)═╝
|
|
77
|
+
╚═(███)═╝
|
|
78
|
+
╚═(███)═╝
|
|
79
|
+
╚═(███)═╝
|
|
80
|
+
╚═(███)═╝
|
|
81
|
+
```
|
|
@@ -28,7 +28,7 @@ const base_1 = require("../base");
|
|
|
28
28
|
const FbaInventoryApiAxiosParamCreator = function (configuration) {
|
|
29
29
|
return {
|
|
30
30
|
/**
|
|
31
|
-
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
31
|
+
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
32
32
|
* @param {'Marketplace'} granularityType The granularity type for the inventory aggregation level.
|
|
33
33
|
* @param {string} granularityId The granularity ID for the inventory aggregation level.
|
|
34
34
|
* @param {Array<string>} marketplaceIds The marketplace ID for the marketplace for which to return inventory summaries.
|
|
@@ -98,7 +98,7 @@ const FbaInventoryApiFp = function (configuration) {
|
|
|
98
98
|
const localVarAxiosParamCreator = (0, exports.FbaInventoryApiAxiosParamCreator)(configuration);
|
|
99
99
|
return {
|
|
100
100
|
/**
|
|
101
|
-
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
101
|
+
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
102
102
|
* @param {'Marketplace'} granularityType The granularity type for the inventory aggregation level.
|
|
103
103
|
* @param {string} granularityId The granularity ID for the inventory aggregation level.
|
|
104
104
|
* @param {Array<string>} marketplaceIds The marketplace ID for the marketplace for which to return inventory summaries.
|
|
@@ -124,7 +124,7 @@ const FbaInventoryApiFactory = function (configuration, basePath, axios) {
|
|
|
124
124
|
const localVarFp = (0, exports.FbaInventoryApiFp)(configuration);
|
|
125
125
|
return {
|
|
126
126
|
/**
|
|
127
|
-
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
127
|
+
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
128
128
|
* @param {'Marketplace'} granularityType The granularity type for the inventory aggregation level.
|
|
129
129
|
* @param {string} granularityId The granularity ID for the inventory aggregation level.
|
|
130
130
|
* @param {Array<string>} marketplaceIds The marketplace ID for the marketplace for which to return inventory summaries.
|
|
@@ -149,7 +149,7 @@ exports.FbaInventoryApiFactory = FbaInventoryApiFactory;
|
|
|
149
149
|
*/
|
|
150
150
|
class FbaInventoryApi extends base_1.BaseAPI {
|
|
151
151
|
/**
|
|
152
|
-
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
152
|
+
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
153
153
|
* @param {FbaInventoryApiGetInventorySummariesRequest} requestParameters Request parameters.
|
|
154
154
|
* @param {*} [options] Override http request option.
|
|
155
155
|
* @throws {RequiredError}
|
package/dist/cjs/src/client.js
CHANGED
|
@@ -1,34 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FbaInventoryApiClient = exports.
|
|
3
|
+
exports.FbaInventoryApiClient = exports.clientRateLimits = void 0;
|
|
4
4
|
/* eslint-disable prefer-regex-literals */
|
|
5
5
|
const common_1 = require("@sp-api-sdk/common");
|
|
6
6
|
const api_model_1 = require("./api-model");
|
|
7
7
|
const error_1 = require("./error");
|
|
8
|
-
exports.
|
|
8
|
+
exports.clientRateLimits = [
|
|
9
9
|
{
|
|
10
10
|
method: 'get',
|
|
11
11
|
urlRegex: new RegExp('^/fba/inventory/v1/summaries$'),
|
|
12
|
-
rate:
|
|
13
|
-
burst:
|
|
12
|
+
rate: 2,
|
|
13
|
+
burst: 2,
|
|
14
14
|
},
|
|
15
15
|
];
|
|
16
16
|
class FbaInventoryApiClient extends api_model_1.FbaInventoryApi {
|
|
17
17
|
constructor(parameters) {
|
|
18
|
-
const
|
|
18
|
+
const config = common_1.sellingPartnerRegions[parameters.region];
|
|
19
|
+
if (!config) {
|
|
20
|
+
throw new error_1.FbaInventoryApiError(`Unknown region: ${parameters.region}`);
|
|
21
|
+
}
|
|
19
22
|
const { rateLimiting, ...clientParameters } = parameters;
|
|
20
|
-
const axiosParameters = {
|
|
23
|
+
const axiosParameters = {
|
|
24
|
+
...clientParameters,
|
|
25
|
+
region: config.awsRegion,
|
|
26
|
+
};
|
|
21
27
|
if (rateLimiting?.retry) {
|
|
22
|
-
axiosParameters.rateLimits = exports.
|
|
28
|
+
axiosParameters.rateLimits = exports.clientRateLimits;
|
|
23
29
|
axiosParameters.onRetry = rateLimiting.onRetry;
|
|
24
30
|
}
|
|
25
31
|
const axiosInstance = (0, common_1.createAxiosInstance)(axiosParameters);
|
|
26
32
|
const configuration = new api_model_1.Configuration();
|
|
27
33
|
const environment = parameters.sandbox ? 'sandbox' : 'production';
|
|
28
|
-
const endpoint =
|
|
29
|
-
if (!endpoint) {
|
|
30
|
-
throw new error_1.FbaInventoryApiError(`Unknown region : ${region}`);
|
|
31
|
-
}
|
|
34
|
+
const endpoint = config.endpoints[environment];
|
|
32
35
|
super(configuration, endpoint, axiosInstance);
|
|
33
36
|
}
|
|
34
37
|
}
|
|
@@ -24,7 +24,7 @@ import { BASE_PATH, COLLECTION_FORMATS, BaseAPI } from '../base';
|
|
|
24
24
|
export const FbaInventoryApiAxiosParamCreator = function (configuration) {
|
|
25
25
|
return {
|
|
26
26
|
/**
|
|
27
|
-
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
27
|
+
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
28
28
|
* @param {'Marketplace'} 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.
|
|
@@ -93,7 +93,7 @@ export const FbaInventoryApiFp = function (configuration) {
|
|
|
93
93
|
const localVarAxiosParamCreator = FbaInventoryApiAxiosParamCreator(configuration);
|
|
94
94
|
return {
|
|
95
95
|
/**
|
|
96
|
-
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
96
|
+
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
97
97
|
* @param {'Marketplace'} granularityType The granularity type for the inventory aggregation level.
|
|
98
98
|
* @param {string} granularityId The granularity ID for the inventory aggregation level.
|
|
99
99
|
* @param {Array<string>} marketplaceIds The marketplace ID for the marketplace for which to return inventory summaries.
|
|
@@ -118,7 +118,7 @@ export const FbaInventoryApiFactory = function (configuration, basePath, axios)
|
|
|
118
118
|
const localVarFp = FbaInventoryApiFp(configuration);
|
|
119
119
|
return {
|
|
120
120
|
/**
|
|
121
|
-
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
121
|
+
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
122
122
|
* @param {'Marketplace'} granularityType The granularity type for the inventory aggregation level.
|
|
123
123
|
* @param {string} granularityId The granularity ID for the inventory aggregation level.
|
|
124
124
|
* @param {Array<string>} marketplaceIds The marketplace ID for the marketplace for which to return inventory summaries.
|
|
@@ -142,7 +142,7 @@ export const FbaInventoryApiFactory = function (configuration, basePath, axios)
|
|
|
142
142
|
*/
|
|
143
143
|
export class FbaInventoryApi extends BaseAPI {
|
|
144
144
|
/**
|
|
145
|
-
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
145
|
+
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
146
146
|
* @param {FbaInventoryApiGetInventorySummariesRequest} requestParameters Request parameters.
|
|
147
147
|
* @param {*} [options] Override http request option.
|
|
148
148
|
* @throws {RequiredError}
|
package/dist/es/src/client.js
CHANGED
|
@@ -1,31 +1,34 @@
|
|
|
1
1
|
/* eslint-disable prefer-regex-literals */
|
|
2
|
-
import {
|
|
2
|
+
import { sellingPartnerRegions, createAxiosInstance } from '@sp-api-sdk/common';
|
|
3
3
|
import { Configuration, FbaInventoryApi } from './api-model';
|
|
4
4
|
import { FbaInventoryApiError } from './error';
|
|
5
|
-
export const
|
|
5
|
+
export const clientRateLimits = [
|
|
6
6
|
{
|
|
7
7
|
method: 'get',
|
|
8
8
|
urlRegex: new RegExp('^/fba/inventory/v1/summaries$'),
|
|
9
|
-
rate:
|
|
10
|
-
burst:
|
|
9
|
+
rate: 2,
|
|
10
|
+
burst: 2,
|
|
11
11
|
},
|
|
12
12
|
];
|
|
13
13
|
export class FbaInventoryApiClient extends FbaInventoryApi {
|
|
14
14
|
constructor(parameters) {
|
|
15
|
-
const
|
|
15
|
+
const config = sellingPartnerRegions[parameters.region];
|
|
16
|
+
if (!config) {
|
|
17
|
+
throw new FbaInventoryApiError(`Unknown region: ${parameters.region}`);
|
|
18
|
+
}
|
|
16
19
|
const { rateLimiting, ...clientParameters } = parameters;
|
|
17
|
-
const axiosParameters = {
|
|
20
|
+
const axiosParameters = {
|
|
21
|
+
...clientParameters,
|
|
22
|
+
region: config.awsRegion,
|
|
23
|
+
};
|
|
18
24
|
if (rateLimiting?.retry) {
|
|
19
|
-
axiosParameters.rateLimits =
|
|
25
|
+
axiosParameters.rateLimits = clientRateLimits;
|
|
20
26
|
axiosParameters.onRetry = rateLimiting.onRetry;
|
|
21
27
|
}
|
|
22
28
|
const axiosInstance = createAxiosInstance(axiosParameters);
|
|
23
29
|
const configuration = new Configuration();
|
|
24
30
|
const environment = parameters.sandbox ? 'sandbox' : 'production';
|
|
25
|
-
const endpoint = endpoints[environment]
|
|
26
|
-
if (!endpoint) {
|
|
27
|
-
throw new FbaInventoryApiError(`Unknown region : ${region}`);
|
|
28
|
-
}
|
|
31
|
+
const endpoint = config.endpoints[environment];
|
|
29
32
|
super(configuration, endpoint, axiosInstance);
|
|
30
33
|
}
|
|
31
34
|
}
|
|
@@ -19,7 +19,7 @@ import { GetInventorySummariesResponse } from '../models';
|
|
|
19
19
|
*/
|
|
20
20
|
export declare const FbaInventoryApiAxiosParamCreator: (configuration?: Configuration | undefined) => {
|
|
21
21
|
/**
|
|
22
|
-
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
22
|
+
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
23
23
|
* @param {'Marketplace'} granularityType The granularity type for the inventory aggregation level.
|
|
24
24
|
* @param {string} granularityId The granularity ID for the inventory aggregation level.
|
|
25
25
|
* @param {Array<string>} marketplaceIds The marketplace ID for the marketplace for which to return inventory summaries.
|
|
@@ -38,7 +38,7 @@ export declare const FbaInventoryApiAxiosParamCreator: (configuration?: Configur
|
|
|
38
38
|
*/
|
|
39
39
|
export declare const FbaInventoryApiFp: (configuration?: Configuration | undefined) => {
|
|
40
40
|
/**
|
|
41
|
-
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
41
|
+
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
42
42
|
* @param {'Marketplace'} granularityType The granularity type for the inventory aggregation level.
|
|
43
43
|
* @param {string} granularityId The granularity ID for the inventory aggregation level.
|
|
44
44
|
* @param {Array<string>} marketplaceIds The marketplace ID for the marketplace for which to return inventory summaries.
|
|
@@ -57,7 +57,7 @@ export declare const FbaInventoryApiFp: (configuration?: Configuration | undefin
|
|
|
57
57
|
*/
|
|
58
58
|
export declare const FbaInventoryApiFactory: (configuration?: Configuration | undefined, basePath?: string | undefined, axios?: AxiosInstance | undefined) => {
|
|
59
59
|
/**
|
|
60
|
-
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
60
|
+
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
61
61
|
* @param {'Marketplace'} granularityType The granularity type for the inventory aggregation level.
|
|
62
62
|
* @param {string} granularityId The granularity ID for the inventory aggregation level.
|
|
63
63
|
* @param {Array<string>} marketplaceIds The marketplace ID for the marketplace for which to return inventory summaries.
|
|
@@ -127,11 +127,11 @@ export interface FbaInventoryApiGetInventorySummariesRequest {
|
|
|
127
127
|
*/
|
|
128
128
|
export declare class FbaInventoryApi extends BaseAPI {
|
|
129
129
|
/**
|
|
130
|
-
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | |
|
|
130
|
+
* Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
131
131
|
* @param {FbaInventoryApiGetInventorySummariesRequest} requestParameters Request parameters.
|
|
132
132
|
* @param {*} [options] Override http request option.
|
|
133
133
|
* @throws {RequiredError}
|
|
134
134
|
* @memberof FbaInventoryApi
|
|
135
135
|
*/
|
|
136
|
-
getInventorySummaries(requestParameters: FbaInventoryApiGetInventorySummariesRequest, options?: any): Promise<import("axios").AxiosResponse<GetInventorySummariesResponse>>;
|
|
136
|
+
getInventorySummaries(requestParameters: FbaInventoryApiGetInventorySummariesRequest, options?: any): Promise<import("axios").AxiosResponse<GetInventorySummariesResponse, any>>;
|
|
137
137
|
}
|
|
@@ -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>>;
|
|
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>>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { ClientConfiguration, RateLimit } from '@sp-api-sdk/common';
|
|
1
|
+
import type { ClientConfiguration, SellingPartnerRegion, RateLimit, OnRetryHandler } from '@sp-api-sdk/common';
|
|
3
2
|
import { FbaInventoryApi } from './api-model';
|
|
4
|
-
export declare const
|
|
3
|
+
export declare const clientRateLimits: RateLimit[];
|
|
5
4
|
export interface ClientParameters extends Omit<ClientConfiguration, 'rateLimits' | 'onRetry'> {
|
|
5
|
+
region: SellingPartnerRegion;
|
|
6
6
|
rateLimiting?: {
|
|
7
7
|
retry: boolean;
|
|
8
|
-
onRetry?:
|
|
8
|
+
onRetry?: OnRetryHandler;
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
11
|
export declare class FbaInventoryApiClient extends FbaInventoryApi {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@sp-api-sdk/fba-inventory-api-v1",
|
|
3
3
|
"author": "Vincent Mesquita <vincent.mesquita@bizon.solutions>",
|
|
4
4
|
"description": "The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network. Today this API is available only in the North America region. In 2021 we plan to release this API in the Europe and Far East regions.",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.9.3",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
7
7
|
"module": "dist/es/index.js",
|
|
8
8
|
"types": "dist/types/index.d.ts",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"test": "NODE_ENV='test' yarn jest"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@sp-api-sdk/auth": "^1.9.
|
|
29
|
-
"@sp-api-sdk/common": "^1.7.
|
|
30
|
-
"axios": "^0.
|
|
28
|
+
"@sp-api-sdk/auth": "^1.9.6",
|
|
29
|
+
"@sp-api-sdk/common": "^1.7.8",
|
|
30
|
+
"axios": "^0.24.0"
|
|
31
31
|
},
|
|
32
32
|
"repository": {
|
|
33
33
|
"type": "git",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"sp sdk",
|
|
49
49
|
"fba inventory api"
|
|
50
50
|
],
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "f21b5cb511abd110bf1f07843558719993f36187"
|
|
52
52
|
}
|