@sp-api-sdk/fba-inventory-api-v1 1.10.1 → 1.12.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/README.md +24 -1
- package/dist/cjs/index.js +0 -1
- package/dist/cjs/src/api-model/api/fba-inventory-api.js +1 -1
- package/dist/cjs/src/api-model/api.js +1 -1
- package/dist/cjs/src/api-model/base.js +1 -1
- package/dist/cjs/src/api-model/common.js +1 -1
- package/dist/cjs/src/api-model/configuration.js +1 -1
- package/dist/cjs/src/api-model/index.js +1 -1
- package/dist/cjs/src/api-model/models/get-inventory-summaries-response.js +1 -1
- package/dist/cjs/src/api-model/models/get-inventory-summaries-result.js +1 -1
- package/dist/cjs/src/api-model/models/granularity.js +1 -1
- package/dist/cjs/src/api-model/models/inventory-details.js +1 -1
- package/dist/cjs/src/api-model/models/inventory-summary.js +1 -1
- package/dist/cjs/src/api-model/models/model-error.js +1 -1
- package/dist/cjs/src/api-model/models/pagination.js +1 -1
- package/dist/cjs/src/api-model/models/researching-quantity-entry.js +1 -1
- package/dist/cjs/src/api-model/models/researching-quantity.js +1 -1
- package/dist/cjs/src/api-model/models/reserved-quantity.js +1 -1
- package/dist/cjs/src/api-model/models/unfulfillable-quantity.js +1 -1
- package/dist/cjs/src/client.js +4 -21
- package/dist/es/index.js +0 -1
- package/dist/es/src/api-model/api/fba-inventory-api.js +1 -1
- package/dist/es/src/api-model/api.js +1 -1
- package/dist/es/src/api-model/base.js +1 -1
- package/dist/es/src/api-model/common.js +1 -1
- package/dist/es/src/api-model/configuration.js +1 -1
- package/dist/es/src/api-model/index.js +1 -1
- package/dist/es/src/api-model/models/get-inventory-summaries-response.js +1 -1
- package/dist/es/src/api-model/models/get-inventory-summaries-result.js +1 -1
- package/dist/es/src/api-model/models/granularity.js +1 -1
- package/dist/es/src/api-model/models/inventory-details.js +1 -1
- package/dist/es/src/api-model/models/inventory-summary.js +1 -1
- package/dist/es/src/api-model/models/model-error.js +1 -1
- package/dist/es/src/api-model/models/pagination.js +1 -1
- package/dist/es/src/api-model/models/researching-quantity-entry.js +1 -1
- package/dist/es/src/api-model/models/researching-quantity.js +1 -1
- package/dist/es/src/api-model/models/reserved-quantity.js +1 -1
- package/dist/es/src/api-model/models/unfulfillable-quantity.js +1 -1
- package/dist/es/src/client.js +5 -22
- package/dist/types/index.d.ts +0 -1
- package/dist/types/src/api-model/api/fba-inventory-api.d.ts +1 -1
- package/dist/types/src/api-model/api.d.ts +1 -1
- package/dist/types/src/api-model/base.d.ts +1 -1
- package/dist/types/src/api-model/common.d.ts +1 -1
- package/dist/types/src/api-model/configuration.d.ts +1 -1
- package/dist/types/src/api-model/index.d.ts +1 -1
- package/dist/types/src/api-model/models/get-inventory-summaries-response.d.ts +1 -1
- package/dist/types/src/api-model/models/get-inventory-summaries-result.d.ts +1 -1
- package/dist/types/src/api-model/models/granularity.d.ts +1 -1
- package/dist/types/src/api-model/models/inventory-details.d.ts +1 -1
- package/dist/types/src/api-model/models/inventory-summary.d.ts +1 -1
- package/dist/types/src/api-model/models/model-error.d.ts +1 -1
- package/dist/types/src/api-model/models/pagination.d.ts +1 -1
- package/dist/types/src/api-model/models/researching-quantity-entry.d.ts +1 -1
- package/dist/types/src/api-model/models/researching-quantity.d.ts +1 -1
- package/dist/types/src/api-model/models/reserved-quantity.d.ts +1 -1
- package/dist/types/src/api-model/models/unfulfillable-quantity.d.ts +1 -1
- package/dist/types/src/client.d.ts +2 -9
- package/package.json +7 -6
- package/dist/cjs/src/error.js +0 -10
- package/dist/es/src/error.js +0 -6
- package/dist/types/src/error.d.ts +0 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# `fba-inventory-api-v1`
|
|
2
2
|
|
|
3
|
-
The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network.
|
|
3
|
+
The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@sp-api-sdk/fba-inventory-api-v1)
|
|
6
6
|
[](https://github.com/xojs/xo)
|
|
@@ -64,6 +64,29 @@ const client = new FbaInventoryApiClient({
|
|
|
64
64
|
|
|
65
65
|
The rate limits used for each route are specified in the [API documentation](https://developer-docs.amazon.com/sp-api/docs).
|
|
66
66
|
|
|
67
|
+
## Logging
|
|
68
|
+
|
|
69
|
+
You can enable logging for both SP-API requests and responses by configuring the `logging.request` and `logging.response` properties.
|
|
70
|
+
|
|
71
|
+
```javascript
|
|
72
|
+
const client = new FbaInventoryApiClient({
|
|
73
|
+
auth,
|
|
74
|
+
region: 'eu',
|
|
75
|
+
logging: {
|
|
76
|
+
request: {
|
|
77
|
+
logger: console.debug
|
|
78
|
+
},
|
|
79
|
+
response: {
|
|
80
|
+
logger: console.debug
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
})
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Specifying `true` will use the default options, specifying an object will allow you to override the default options.
|
|
87
|
+
This uses [axios-logger](https://github.com/hg-pyun/axios-logger) under the hood.
|
|
88
|
+
|
|
89
|
+
|
|
67
90
|
## License
|
|
68
91
|
|
|
69
92
|
MIT
|
package/dist/cjs/index.js
CHANGED
|
@@ -2,5 +2,4 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./src/client"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./src/error"), exports);
|
|
6
5
|
tslib_1.__exportStar(require("./src/api-model/models"), exports);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* Selling Partner API for FBA Inventory
|
|
6
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
7
7
|
*
|
|
8
8
|
* The version of the OpenAPI document: v1
|
|
9
9
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* Selling Partner API for FBA Inventory
|
|
6
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
7
7
|
*
|
|
8
8
|
* The version of the OpenAPI document: v1
|
|
9
9
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* Selling Partner API for FBA Inventory
|
|
6
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
7
7
|
*
|
|
8
8
|
* The version of the OpenAPI document: v1
|
|
9
9
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* Selling Partner API for FBA Inventory
|
|
6
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
7
7
|
*
|
|
8
8
|
* The version of the OpenAPI document: v1
|
|
9
9
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* Selling Partner API for FBA Inventory
|
|
6
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
7
7
|
*
|
|
8
8
|
* The version of the OpenAPI document: v1
|
|
9
9
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* Selling Partner API for FBA Inventory
|
|
6
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
7
7
|
*
|
|
8
8
|
* The version of the OpenAPI document: v1
|
|
9
9
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* Selling Partner API for FBA Inventory
|
|
6
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
7
7
|
*
|
|
8
8
|
* The version of the OpenAPI document: v1
|
|
9
9
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* Selling Partner API for FBA Inventory
|
|
6
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
7
7
|
*
|
|
8
8
|
* The version of the OpenAPI document: v1
|
|
9
9
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* Selling Partner API for FBA Inventory
|
|
6
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
7
7
|
*
|
|
8
8
|
* The version of the OpenAPI document: v1
|
|
9
9
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* Selling Partner API for FBA Inventory
|
|
6
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
7
7
|
*
|
|
8
8
|
* The version of the OpenAPI document: v1
|
|
9
9
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* Selling Partner API for FBA Inventory
|
|
6
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
7
7
|
*
|
|
8
8
|
* The version of the OpenAPI document: v1
|
|
9
9
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* Selling Partner API for FBA Inventory
|
|
6
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
7
7
|
*
|
|
8
8
|
* The version of the OpenAPI document: v1
|
|
9
9
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* Selling Partner API for FBA Inventory
|
|
6
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
7
7
|
*
|
|
8
8
|
* The version of the OpenAPI document: v1
|
|
9
9
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* Selling Partner API for FBA Inventory
|
|
6
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
7
7
|
*
|
|
8
8
|
* The version of the OpenAPI document: v1
|
|
9
9
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* Selling Partner API for FBA Inventory
|
|
6
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
7
7
|
*
|
|
8
8
|
* The version of the OpenAPI document: v1
|
|
9
9
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* Selling Partner API for FBA Inventory
|
|
6
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
7
7
|
*
|
|
8
8
|
* The version of the OpenAPI document: v1
|
|
9
9
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* Selling Partner API for FBA Inventory
|
|
6
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
7
7
|
*
|
|
8
8
|
* The version of the OpenAPI document: v1
|
|
9
9
|
*
|
package/dist/cjs/src/client.js
CHANGED
|
@@ -1,38 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FbaInventoryApiClient = exports.clientRateLimits = void 0;
|
|
4
|
-
/* eslint-disable prefer-regex-literals */
|
|
5
4
|
const common_1 = require("@sp-api-sdk/common");
|
|
6
5
|
const api_model_1 = require("./api-model");
|
|
7
|
-
const error_1 = require("./error");
|
|
8
6
|
exports.clientRateLimits = [
|
|
9
7
|
{
|
|
10
8
|
method: 'get',
|
|
9
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
11
10
|
urlRegex: new RegExp('^/fba/inventory/v1/summaries$'),
|
|
12
11
|
rate: 2,
|
|
13
12
|
burst: 2,
|
|
14
13
|
},
|
|
15
14
|
];
|
|
16
15
|
class FbaInventoryApiClient extends api_model_1.FbaInventoryApi {
|
|
17
|
-
constructor(
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
throw new error_1.FbaInventoryApiError(`Unknown region: ${parameters.region}`);
|
|
21
|
-
}
|
|
22
|
-
const { rateLimiting, ...clientParameters } = parameters;
|
|
23
|
-
const axiosParameters = {
|
|
24
|
-
...clientParameters,
|
|
25
|
-
region: config.awsRegion,
|
|
26
|
-
};
|
|
27
|
-
if (rateLimiting?.retry) {
|
|
28
|
-
axiosParameters.rateLimits = exports.clientRateLimits;
|
|
29
|
-
axiosParameters.onRetry = rateLimiting.onRetry;
|
|
30
|
-
}
|
|
31
|
-
const axiosInstance = (0, common_1.createAxiosInstance)(axiosParameters);
|
|
32
|
-
const configuration = new api_model_1.Configuration();
|
|
33
|
-
const environment = parameters.sandbox ? 'sandbox' : 'production';
|
|
34
|
-
const endpoint = config.endpoints[environment];
|
|
35
|
-
super(configuration, endpoint, axiosInstance);
|
|
16
|
+
constructor(configuration) {
|
|
17
|
+
const { axios, endpoint } = (0, common_1.createAxiosInstance)(configuration, exports.clientRateLimits);
|
|
18
|
+
super(new api_model_1.Configuration(), endpoint, axios);
|
|
36
19
|
}
|
|
37
20
|
}
|
|
38
21
|
exports.FbaInventoryApiClient = FbaInventoryApiClient;
|
package/dist/es/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Selling Partner API for FBA Inventory
|
|
5
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
5
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: v1
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Selling Partner API for FBA Inventory
|
|
5
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
5
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: v1
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Selling Partner API for FBA Inventory
|
|
5
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
5
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: v1
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Selling Partner API for FBA Inventory
|
|
5
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
5
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: v1
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Selling Partner API for FBA Inventory
|
|
5
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
5
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: v1
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Selling Partner API for FBA Inventory
|
|
5
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
5
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: v1
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Selling Partner API for FBA Inventory
|
|
5
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
5
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: v1
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Selling Partner API for FBA Inventory
|
|
5
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
5
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: v1
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Selling Partner API for FBA Inventory
|
|
5
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
5
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: v1
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Selling Partner API for FBA Inventory
|
|
5
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
5
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: v1
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Selling Partner API for FBA Inventory
|
|
5
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
5
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: v1
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Selling Partner API for FBA Inventory
|
|
5
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
5
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: v1
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Selling Partner API for FBA Inventory
|
|
5
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
5
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: v1
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Selling Partner API for FBA Inventory
|
|
5
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
5
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: v1
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Selling Partner API for FBA Inventory
|
|
5
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
5
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: v1
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Selling Partner API for FBA Inventory
|
|
5
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
5
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: v1
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Selling Partner API for FBA Inventory
|
|
5
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
5
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: v1
|
|
8
8
|
*
|
package/dist/es/src/client.js
CHANGED
|
@@ -1,34 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
import { sellingPartnerRegions, createAxiosInstance } from '@sp-api-sdk/common';
|
|
1
|
+
import { createAxiosInstance } from '@sp-api-sdk/common';
|
|
3
2
|
import { Configuration, FbaInventoryApi } from './api-model';
|
|
4
|
-
import { FbaInventoryApiError } from './error';
|
|
5
3
|
export const clientRateLimits = [
|
|
6
4
|
{
|
|
7
5
|
method: 'get',
|
|
6
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
8
7
|
urlRegex: new RegExp('^/fba/inventory/v1/summaries$'),
|
|
9
8
|
rate: 2,
|
|
10
9
|
burst: 2,
|
|
11
10
|
},
|
|
12
11
|
];
|
|
13
12
|
export class FbaInventoryApiClient extends FbaInventoryApi {
|
|
14
|
-
constructor(
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
throw new FbaInventoryApiError(`Unknown region: ${parameters.region}`);
|
|
18
|
-
}
|
|
19
|
-
const { rateLimiting, ...clientParameters } = parameters;
|
|
20
|
-
const axiosParameters = {
|
|
21
|
-
...clientParameters,
|
|
22
|
-
region: config.awsRegion,
|
|
23
|
-
};
|
|
24
|
-
if (rateLimiting?.retry) {
|
|
25
|
-
axiosParameters.rateLimits = clientRateLimits;
|
|
26
|
-
axiosParameters.onRetry = rateLimiting.onRetry;
|
|
27
|
-
}
|
|
28
|
-
const axiosInstance = createAxiosInstance(axiosParameters);
|
|
29
|
-
const configuration = new Configuration();
|
|
30
|
-
const environment = parameters.sandbox ? 'sandbox' : 'production';
|
|
31
|
-
const endpoint = config.endpoints[environment];
|
|
32
|
-
super(configuration, endpoint, axiosInstance);
|
|
13
|
+
constructor(configuration) {
|
|
14
|
+
const { axios, endpoint } = createAxiosInstance(configuration, clientRateLimits);
|
|
15
|
+
super(new Configuration(), endpoint, axios);
|
|
33
16
|
}
|
|
34
17
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Selling Partner API for FBA Inventory
|
|
3
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
3
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: v1
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Selling Partner API for FBA Inventory
|
|
3
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
3
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: v1
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Selling Partner API for FBA Inventory
|
|
3
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
3
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: v1
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Selling Partner API for FBA Inventory
|
|
3
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
3
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: v1
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Selling Partner API for FBA Inventory
|
|
3
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
3
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: v1
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Selling Partner API for FBA Inventory
|
|
3
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
3
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: v1
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Selling Partner API for FBA Inventory
|
|
3
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
3
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: v1
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Selling Partner API for FBA Inventory
|
|
3
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
3
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: v1
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Selling Partner API for FBA Inventory
|
|
3
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
3
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: v1
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Selling Partner API for FBA Inventory
|
|
3
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
3
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: v1
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Selling Partner API for FBA Inventory
|
|
3
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
3
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: v1
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Selling Partner API for FBA Inventory
|
|
3
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
3
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: v1
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Selling Partner API for FBA Inventory
|
|
3
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
3
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: v1
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Selling Partner API for FBA Inventory
|
|
3
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
3
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: v1
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Selling Partner API for FBA Inventory
|
|
3
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
3
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: v1
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Selling Partner API for FBA Inventory
|
|
3
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
3
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: v1
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Selling Partner API for FBA Inventory
|
|
3
|
-
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
3
|
+
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
|
|
4
4
|
*
|
|
5
5
|
* The version of the OpenAPI document: v1
|
|
6
6
|
*
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ClientConfiguration, type RateLimit } from '@sp-api-sdk/common';
|
|
2
2
|
import { FbaInventoryApi } from './api-model';
|
|
3
3
|
export declare const clientRateLimits: RateLimit[];
|
|
4
|
-
export interface ClientParameters extends Omit<ClientConfiguration, 'rateLimits' | 'onRetry'> {
|
|
5
|
-
region: SellingPartnerRegion;
|
|
6
|
-
rateLimiting?: {
|
|
7
|
-
retry: boolean;
|
|
8
|
-
onRetry?: OnRetryHandler;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
4
|
export declare class FbaInventoryApiClient extends FbaInventoryApi {
|
|
12
|
-
constructor(
|
|
5
|
+
constructor(configuration: ClientConfiguration);
|
|
13
6
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sp-api-sdk/fba-inventory-api-v1",
|
|
3
3
|
"author": "Vincent Mesquita <vincent.mesquita@bizon.solutions>",
|
|
4
|
-
"description": "The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network.
|
|
5
|
-
"version": "1.
|
|
4
|
+
"description": "The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network.",
|
|
5
|
+
"version": "1.12.0",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
7
7
|
"module": "dist/es/index.js",
|
|
8
8
|
"types": "dist/types/index.d.ts",
|
|
9
|
+
"typedocMain": "./index.ts",
|
|
9
10
|
"license": "MIT",
|
|
10
11
|
"publishConfig": {
|
|
11
12
|
"access": "public"
|
|
@@ -26,9 +27,9 @@
|
|
|
26
27
|
"test": "NODE_ENV='test' yarn jest"
|
|
27
28
|
},
|
|
28
29
|
"dependencies": {
|
|
29
|
-
"@sp-api-sdk/auth": "^1.9.
|
|
30
|
-
"@sp-api-sdk/common": "^1.
|
|
31
|
-
"axios": "^0.
|
|
30
|
+
"@sp-api-sdk/auth": "^1.9.13",
|
|
31
|
+
"@sp-api-sdk/common": "^1.8.0",
|
|
32
|
+
"axios": "^0.27.2"
|
|
32
33
|
},
|
|
33
34
|
"repository": {
|
|
34
35
|
"type": "git",
|
|
@@ -49,5 +50,5 @@
|
|
|
49
50
|
"sp sdk",
|
|
50
51
|
"fba inventory api"
|
|
51
52
|
],
|
|
52
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "975705017de9384bf28b85e97d93f866d4d71611"
|
|
53
54
|
}
|
package/dist/cjs/src/error.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FbaInventoryApiError = void 0;
|
|
4
|
-
class FbaInventoryApiError extends Error {
|
|
5
|
-
constructor(message) {
|
|
6
|
-
super(message);
|
|
7
|
-
this.name = 'FbaInventoryApiError';
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
exports.FbaInventoryApiError = FbaInventoryApiError;
|
package/dist/es/src/error.js
DELETED