@sp-api-sdk/fba-inventory-api-v1 3.0.22 → 4.0.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.
Files changed (85) hide show
  1. package/README.md +4 -4
  2. package/dist/index.cjs +553 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/{types/api-model/api/fba-inventory-api.d.ts → index.d.cts} +623 -24
  5. package/dist/index.d.ts +846 -0
  6. package/dist/index.js +509 -0
  7. package/dist/index.js.map +1 -0
  8. package/package.json +23 -12
  9. package/dist/cjs/api-model/api/fba-inventory-api.js +0 -355
  10. package/dist/cjs/api-model/api.js +0 -30
  11. package/dist/cjs/api-model/base.js +0 -52
  12. package/dist/cjs/api-model/common.js +0 -123
  13. package/dist/cjs/api-model/configuration.js +0 -98
  14. package/dist/cjs/api-model/index.js +0 -32
  15. package/dist/cjs/api-model/models/add-inventory-request.js +0 -15
  16. package/dist/cjs/api-model/models/add-inventory-response.js +0 -15
  17. package/dist/cjs/api-model/models/create-inventory-item-request.js +0 -15
  18. package/dist/cjs/api-model/models/create-inventory-item-response.js +0 -15
  19. package/dist/cjs/api-model/models/delete-inventory-item-response.js +0 -15
  20. package/dist/cjs/api-model/models/get-inventory-summaries-response.js +0 -15
  21. package/dist/cjs/api-model/models/get-inventory-summaries-result.js +0 -15
  22. package/dist/cjs/api-model/models/granularity.js +0 -15
  23. package/dist/cjs/api-model/models/index.js +0 -33
  24. package/dist/cjs/api-model/models/inventory-details.js +0 -15
  25. package/dist/cjs/api-model/models/inventory-item.js +0 -15
  26. package/dist/cjs/api-model/models/inventory-summary.js +0 -15
  27. package/dist/cjs/api-model/models/model-error.js +0 -15
  28. package/dist/cjs/api-model/models/pagination.js +0 -15
  29. package/dist/cjs/api-model/models/researching-quantity-entry.js +0 -21
  30. package/dist/cjs/api-model/models/researching-quantity.js +0 -15
  31. package/dist/cjs/api-model/models/reserved-quantity.js +0 -15
  32. package/dist/cjs/api-model/models/unfulfillable-quantity.js +0 -15
  33. package/dist/cjs/client.js +0 -21
  34. package/dist/cjs/index.js +0 -19
  35. package/dist/es/api-model/api/fba-inventory-api.js +0 -345
  36. package/dist/es/api-model/api.js +0 -14
  37. package/dist/es/api-model/base.js +0 -44
  38. package/dist/es/api-model/common.js +0 -110
  39. package/dist/es/api-model/configuration.js +0 -94
  40. package/dist/es/api-model/index.js +0 -16
  41. package/dist/es/api-model/models/add-inventory-request.js +0 -14
  42. package/dist/es/api-model/models/add-inventory-response.js +0 -14
  43. package/dist/es/api-model/models/create-inventory-item-request.js +0 -14
  44. package/dist/es/api-model/models/create-inventory-item-response.js +0 -14
  45. package/dist/es/api-model/models/delete-inventory-item-response.js +0 -14
  46. package/dist/es/api-model/models/get-inventory-summaries-response.js +0 -14
  47. package/dist/es/api-model/models/get-inventory-summaries-result.js +0 -14
  48. package/dist/es/api-model/models/granularity.js +0 -14
  49. package/dist/es/api-model/models/index.js +0 -17
  50. package/dist/es/api-model/models/inventory-details.js +0 -14
  51. package/dist/es/api-model/models/inventory-item.js +0 -14
  52. package/dist/es/api-model/models/inventory-summary.js +0 -14
  53. package/dist/es/api-model/models/model-error.js +0 -14
  54. package/dist/es/api-model/models/pagination.js +0 -14
  55. package/dist/es/api-model/models/researching-quantity-entry.js +0 -18
  56. package/dist/es/api-model/models/researching-quantity.js +0 -14
  57. package/dist/es/api-model/models/reserved-quantity.js +0 -14
  58. package/dist/es/api-model/models/unfulfillable-quantity.js +0 -14
  59. package/dist/es/client.js +0 -17
  60. package/dist/es/index.js +0 -3
  61. package/dist/types/api-model/api.d.ts +0 -12
  62. package/dist/types/api-model/base.d.ts +0 -42
  63. package/dist/types/api-model/common.d.ts +0 -34
  64. package/dist/types/api-model/configuration.d.ts +0 -98
  65. package/dist/types/api-model/index.d.ts +0 -14
  66. package/dist/types/api-model/models/add-inventory-request.d.ts +0 -21
  67. package/dist/types/api-model/models/add-inventory-response.d.ts +0 -20
  68. package/dist/types/api-model/models/create-inventory-item-request.d.ts +0 -28
  69. package/dist/types/api-model/models/create-inventory-item-response.d.ts +0 -20
  70. package/dist/types/api-model/models/delete-inventory-item-response.d.ts +0 -20
  71. package/dist/types/api-model/models/get-inventory-summaries-response.d.ts +0 -24
  72. package/dist/types/api-model/models/get-inventory-summaries-result.d.ts +0 -23
  73. package/dist/types/api-model/models/granularity.d.ts +0 -24
  74. package/dist/types/api-model/models/index.d.ts +0 -17
  75. package/dist/types/api-model/models/inventory-details.d.ts +0 -38
  76. package/dist/types/api-model/models/inventory-item.d.ts +0 -28
  77. package/dist/types/api-model/models/inventory-summary.d.ts +0 -50
  78. package/dist/types/api-model/models/model-error.d.ts +0 -28
  79. package/dist/types/api-model/models/pagination.d.ts +0 -20
  80. package/dist/types/api-model/models/researching-quantity-entry.d.ts +0 -30
  81. package/dist/types/api-model/models/researching-quantity.d.ts +0 -25
  82. package/dist/types/api-model/models/reserved-quantity.d.ts +0 -32
  83. package/dist/types/api-model/models/unfulfillable-quantity.d.ts +0 -44
  84. package/dist/types/client.d.ts +0 -6
  85. package/dist/types/index.d.ts +0 -3
package/dist/cjs/index.js DELETED
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./client"), exports);
18
- __exportStar(require("./api-model/api"), exports);
19
- __exportStar(require("./api-model/models"), exports);
@@ -1,345 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
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.
6
- *
7
- * The version of the OpenAPI document: v1
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- import globalAxios from 'axios';
15
- // Some imports not used depending on template conditions
16
- // @ts-ignore
17
- import { DUMMY_BASE_URL, assertParamExists, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
18
- // @ts-ignore
19
- import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, operationServerMap } from '../base';
20
- /**
21
- * FbaInventoryApi - axios parameter creator
22
- */
23
- export const FbaInventoryApiAxiosParamCreator = function (configuration) {
24
- return {
25
- /**
26
- * Requests that Amazon add items to the Sandbox Inventory with desired amount of quantity in the sandbox environment. This is a sandbox-only operation and must be directed to a sandbox endpoint. Refer to [Selling Partner API sandbox](https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-api-sandbox) for more information.
27
- * @param {string} xAmznIdempotencyToken A unique token/requestId provided with each call to ensure idempotency.
28
- * @param {AddInventoryRequest} addInventoryRequestBody List of items to add to Sandbox inventory.
29
- * @param {*} [options] Override http request option.
30
- * @throws {RequiredError}
31
- */
32
- addInventory: async (xAmznIdempotencyToken, addInventoryRequestBody, options = {}) => {
33
- // verify required parameter 'xAmznIdempotencyToken' is not null or undefined
34
- assertParamExists('addInventory', 'xAmznIdempotencyToken', xAmznIdempotencyToken);
35
- // verify required parameter 'addInventoryRequestBody' is not null or undefined
36
- assertParamExists('addInventory', 'addInventoryRequestBody', addInventoryRequestBody);
37
- const localVarPath = `/fba/inventory/v1/items/inventory`;
38
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
39
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
40
- let baseOptions;
41
- if (configuration) {
42
- baseOptions = configuration.baseOptions;
43
- }
44
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
45
- const localVarHeaderParameter = {};
46
- const localVarQueryParameter = {};
47
- localVarHeaderParameter['Content-Type'] = 'application/json';
48
- localVarHeaderParameter['Accept'] = 'application/json';
49
- if (xAmznIdempotencyToken != null) {
50
- localVarHeaderParameter['x-amzn-idempotency-token'] = String(xAmznIdempotencyToken);
51
- }
52
- setSearchParams(localVarUrlObj, localVarQueryParameter);
53
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
54
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
55
- localVarRequestOptions.data = serializeDataIfNeeded(addInventoryRequestBody, localVarRequestOptions, configuration);
56
- return {
57
- url: toPathString(localVarUrlObj),
58
- options: localVarRequestOptions,
59
- };
60
- },
61
- /**
62
- * Requests that Amazon create product-details in the Sandbox Inventory in the sandbox environment. This is a sandbox-only operation and must be directed to a sandbox endpoint. Refer to [Selling Partner API sandbox](https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-api-sandbox) for more information.
63
- * @param {CreateInventoryItemRequest} createInventoryItemRequestBody CreateInventoryItem Request Body Parameter.
64
- * @param {*} [options] Override http request option.
65
- * @throws {RequiredError}
66
- */
67
- createInventoryItem: async (createInventoryItemRequestBody, options = {}) => {
68
- // verify required parameter 'createInventoryItemRequestBody' is not null or undefined
69
- assertParamExists('createInventoryItem', 'createInventoryItemRequestBody', createInventoryItemRequestBody);
70
- const localVarPath = `/fba/inventory/v1/items`;
71
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
72
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
73
- let baseOptions;
74
- if (configuration) {
75
- baseOptions = configuration.baseOptions;
76
- }
77
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
78
- const localVarHeaderParameter = {};
79
- const localVarQueryParameter = {};
80
- localVarHeaderParameter['Content-Type'] = 'application/json';
81
- localVarHeaderParameter['Accept'] = 'application/json';
82
- setSearchParams(localVarUrlObj, localVarQueryParameter);
83
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
84
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
85
- localVarRequestOptions.data = serializeDataIfNeeded(createInventoryItemRequestBody, localVarRequestOptions, configuration);
86
- return {
87
- url: toPathString(localVarUrlObj),
88
- options: localVarRequestOptions,
89
- };
90
- },
91
- /**
92
- * Requests that Amazon Deletes an item from the Sandbox Inventory in the sandbox environment. This is a sandbox-only operation and must be directed to a sandbox endpoint. Refer to [Selling Partner API sandbox](https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-api-sandbox) for more information.
93
- * @param {string} sellerSku A single seller SKU used for querying the specified seller SKU inventory summaries.
94
- * @param {string} marketplaceId The marketplace ID for the marketplace for which the sellerSku is to be deleted.
95
- * @param {*} [options] Override http request option.
96
- * @throws {RequiredError}
97
- */
98
- deleteInventoryItem: async (sellerSku, marketplaceId, options = {}) => {
99
- // verify required parameter 'sellerSku' is not null or undefined
100
- assertParamExists('deleteInventoryItem', 'sellerSku', sellerSku);
101
- // verify required parameter 'marketplaceId' is not null or undefined
102
- assertParamExists('deleteInventoryItem', 'marketplaceId', marketplaceId);
103
- const localVarPath = `/fba/inventory/v1/items/{sellerSku}`
104
- .replace('{sellerSku}', encodeURIComponent(String(sellerSku)));
105
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
106
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
107
- let baseOptions;
108
- if (configuration) {
109
- baseOptions = configuration.baseOptions;
110
- }
111
- const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options };
112
- const localVarHeaderParameter = {};
113
- const localVarQueryParameter = {};
114
- if (marketplaceId !== undefined) {
115
- localVarQueryParameter['marketplaceId'] = marketplaceId;
116
- }
117
- localVarHeaderParameter['Accept'] = 'application/json';
118
- setSearchParams(localVarUrlObj, localVarQueryParameter);
119
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
120
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
121
- return {
122
- url: toPathString(localVarUrlObj),
123
- options: localVarRequestOptions,
124
- };
125
- },
126
- /**
127
- * 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).
128
- * @param {GetInventorySummariesGranularityTypeEnum} granularityType The granularity type for the inventory aggregation level.
129
- * @param {string} granularityId The granularity ID for the inventory aggregation level.
130
- * @param {Array<string>} marketplaceIds The marketplace ID for the marketplace for which to return inventory summaries.
131
- * @param {boolean} [details] true to return inventory summaries with additional summarized inventory details and quantities. Otherwise, returns inventory summaries only (default value).
132
- * @param {string} [startDateTime] A start date and time in ISO8601 format. If specified, all inventory summaries that have changed since then are returned. You must specify a date and time that is no earlier than 18 months prior to the date and time when you call the API. Note: Changes in inboundWorkingQuantity, inboundShippedQuantity and inboundReceivingQuantity are not detected.
133
- * @param {Array<string>} [sellerSkus] A list of seller SKUs for which to return inventory summaries. You may specify up to 50 SKUs.
134
- * @param {string} [sellerSku] A single seller SKU used for querying the specified seller SKU inventory summaries.
135
- * @param {string} [nextToken] String token returned in the response of your previous request. The string token will expire 30 seconds after being created.
136
- * @param {*} [options] Override http request option.
137
- * @throws {RequiredError}
138
- */
139
- getInventorySummaries: async (granularityType, granularityId, marketplaceIds, details, startDateTime, sellerSkus, sellerSku, nextToken, options = {}) => {
140
- // verify required parameter 'granularityType' is not null or undefined
141
- assertParamExists('getInventorySummaries', 'granularityType', granularityType);
142
- // verify required parameter 'granularityId' is not null or undefined
143
- assertParamExists('getInventorySummaries', 'granularityId', granularityId);
144
- // verify required parameter 'marketplaceIds' is not null or undefined
145
- assertParamExists('getInventorySummaries', 'marketplaceIds', marketplaceIds);
146
- const localVarPath = `/fba/inventory/v1/summaries`;
147
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
148
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
149
- let baseOptions;
150
- if (configuration) {
151
- baseOptions = configuration.baseOptions;
152
- }
153
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
154
- const localVarHeaderParameter = {};
155
- const localVarQueryParameter = {};
156
- if (details !== undefined) {
157
- localVarQueryParameter['details'] = details;
158
- }
159
- if (granularityType !== undefined) {
160
- localVarQueryParameter['granularityType'] = granularityType;
161
- }
162
- if (granularityId !== undefined) {
163
- localVarQueryParameter['granularityId'] = granularityId;
164
- }
165
- if (startDateTime !== undefined) {
166
- localVarQueryParameter['startDateTime'] = (startDateTime instanceof Date) ?
167
- startDateTime.toISOString() :
168
- startDateTime;
169
- }
170
- if (sellerSkus) {
171
- localVarQueryParameter['sellerSkus'] = sellerSkus.join(COLLECTION_FORMATS.csv);
172
- }
173
- if (sellerSku !== undefined) {
174
- localVarQueryParameter['sellerSku'] = sellerSku;
175
- }
176
- if (nextToken !== undefined) {
177
- localVarQueryParameter['nextToken'] = nextToken;
178
- }
179
- if (marketplaceIds) {
180
- localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv);
181
- }
182
- localVarHeaderParameter['Accept'] = 'application/json';
183
- setSearchParams(localVarUrlObj, localVarQueryParameter);
184
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
185
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
186
- return {
187
- url: toPathString(localVarUrlObj),
188
- options: localVarRequestOptions,
189
- };
190
- },
191
- };
192
- };
193
- /**
194
- * FbaInventoryApi - functional programming interface
195
- */
196
- export const FbaInventoryApiFp = function (configuration) {
197
- const localVarAxiosParamCreator = FbaInventoryApiAxiosParamCreator(configuration);
198
- return {
199
- /**
200
- * Requests that Amazon add items to the Sandbox Inventory with desired amount of quantity in the sandbox environment. This is a sandbox-only operation and must be directed to a sandbox endpoint. Refer to [Selling Partner API sandbox](https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-api-sandbox) for more information.
201
- * @param {string} xAmznIdempotencyToken A unique token/requestId provided with each call to ensure idempotency.
202
- * @param {AddInventoryRequest} addInventoryRequestBody List of items to add to Sandbox inventory.
203
- * @param {*} [options] Override http request option.
204
- * @throws {RequiredError}
205
- */
206
- async addInventory(xAmznIdempotencyToken, addInventoryRequestBody, options) {
207
- const localVarAxiosArgs = await localVarAxiosParamCreator.addInventory(xAmznIdempotencyToken, addInventoryRequestBody, options);
208
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
209
- const localVarOperationServerBasePath = operationServerMap['FbaInventoryApi.addInventory']?.[localVarOperationServerIndex]?.url;
210
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
211
- },
212
- /**
213
- * Requests that Amazon create product-details in the Sandbox Inventory in the sandbox environment. This is a sandbox-only operation and must be directed to a sandbox endpoint. Refer to [Selling Partner API sandbox](https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-api-sandbox) for more information.
214
- * @param {CreateInventoryItemRequest} createInventoryItemRequestBody CreateInventoryItem Request Body Parameter.
215
- * @param {*} [options] Override http request option.
216
- * @throws {RequiredError}
217
- */
218
- async createInventoryItem(createInventoryItemRequestBody, options) {
219
- const localVarAxiosArgs = await localVarAxiosParamCreator.createInventoryItem(createInventoryItemRequestBody, options);
220
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
221
- const localVarOperationServerBasePath = operationServerMap['FbaInventoryApi.createInventoryItem']?.[localVarOperationServerIndex]?.url;
222
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
223
- },
224
- /**
225
- * Requests that Amazon Deletes an item from the Sandbox Inventory in the sandbox environment. This is a sandbox-only operation and must be directed to a sandbox endpoint. Refer to [Selling Partner API sandbox](https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-api-sandbox) for more information.
226
- * @param {string} sellerSku A single seller SKU used for querying the specified seller SKU inventory summaries.
227
- * @param {string} marketplaceId The marketplace ID for the marketplace for which the sellerSku is to be deleted.
228
- * @param {*} [options] Override http request option.
229
- * @throws {RequiredError}
230
- */
231
- async deleteInventoryItem(sellerSku, marketplaceId, options) {
232
- const localVarAxiosArgs = await localVarAxiosParamCreator.deleteInventoryItem(sellerSku, marketplaceId, options);
233
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
234
- const localVarOperationServerBasePath = operationServerMap['FbaInventoryApi.deleteInventoryItem']?.[localVarOperationServerIndex]?.url;
235
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
236
- },
237
- /**
238
- * 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).
239
- * @param {GetInventorySummariesGranularityTypeEnum} granularityType The granularity type for the inventory aggregation level.
240
- * @param {string} granularityId The granularity ID for the inventory aggregation level.
241
- * @param {Array<string>} marketplaceIds The marketplace ID for the marketplace for which to return inventory summaries.
242
- * @param {boolean} [details] true to return inventory summaries with additional summarized inventory details and quantities. Otherwise, returns inventory summaries only (default value).
243
- * @param {string} [startDateTime] A start date and time in ISO8601 format. If specified, all inventory summaries that have changed since then are returned. You must specify a date and time that is no earlier than 18 months prior to the date and time when you call the API. Note: Changes in inboundWorkingQuantity, inboundShippedQuantity and inboundReceivingQuantity are not detected.
244
- * @param {Array<string>} [sellerSkus] A list of seller SKUs for which to return inventory summaries. You may specify up to 50 SKUs.
245
- * @param {string} [sellerSku] A single seller SKU used for querying the specified seller SKU inventory summaries.
246
- * @param {string} [nextToken] String token returned in the response of your previous request. The string token will expire 30 seconds after being created.
247
- * @param {*} [options] Override http request option.
248
- * @throws {RequiredError}
249
- */
250
- async getInventorySummaries(granularityType, granularityId, marketplaceIds, details, startDateTime, sellerSkus, sellerSku, nextToken, options) {
251
- const localVarAxiosArgs = await localVarAxiosParamCreator.getInventorySummaries(granularityType, granularityId, marketplaceIds, details, startDateTime, sellerSkus, sellerSku, nextToken, options);
252
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
253
- const localVarOperationServerBasePath = operationServerMap['FbaInventoryApi.getInventorySummaries']?.[localVarOperationServerIndex]?.url;
254
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
255
- },
256
- };
257
- };
258
- /**
259
- * FbaInventoryApi - factory interface
260
- */
261
- export const FbaInventoryApiFactory = function (configuration, basePath, axios) {
262
- const localVarFp = FbaInventoryApiFp(configuration);
263
- return {
264
- /**
265
- * Requests that Amazon add items to the Sandbox Inventory with desired amount of quantity in the sandbox environment. This is a sandbox-only operation and must be directed to a sandbox endpoint. Refer to [Selling Partner API sandbox](https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-api-sandbox) for more information.
266
- * @param {FbaInventoryApiAddInventoryRequest} requestParameters Request parameters.
267
- * @param {*} [options] Override http request option.
268
- * @throws {RequiredError}
269
- */
270
- addInventory(requestParameters, options) {
271
- return localVarFp.addInventory(requestParameters.xAmznIdempotencyToken, requestParameters.addInventoryRequestBody, options).then((request) => request(axios, basePath));
272
- },
273
- /**
274
- * Requests that Amazon create product-details in the Sandbox Inventory in the sandbox environment. This is a sandbox-only operation and must be directed to a sandbox endpoint. Refer to [Selling Partner API sandbox](https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-api-sandbox) for more information.
275
- * @param {FbaInventoryApiCreateInventoryItemRequest} requestParameters Request parameters.
276
- * @param {*} [options] Override http request option.
277
- * @throws {RequiredError}
278
- */
279
- createInventoryItem(requestParameters, options) {
280
- return localVarFp.createInventoryItem(requestParameters.createInventoryItemRequestBody, options).then((request) => request(axios, basePath));
281
- },
282
- /**
283
- * Requests that Amazon Deletes an item from the Sandbox Inventory in the sandbox environment. This is a sandbox-only operation and must be directed to a sandbox endpoint. Refer to [Selling Partner API sandbox](https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-api-sandbox) for more information.
284
- * @param {FbaInventoryApiDeleteInventoryItemRequest} requestParameters Request parameters.
285
- * @param {*} [options] Override http request option.
286
- * @throws {RequiredError}
287
- */
288
- deleteInventoryItem(requestParameters, options) {
289
- return localVarFp.deleteInventoryItem(requestParameters.sellerSku, requestParameters.marketplaceId, options).then((request) => request(axios, basePath));
290
- },
291
- /**
292
- * 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).
293
- * @param {FbaInventoryApiGetInventorySummariesRequest} requestParameters Request parameters.
294
- * @param {*} [options] Override http request option.
295
- * @throws {RequiredError}
296
- */
297
- getInventorySummaries(requestParameters, options) {
298
- return localVarFp.getInventorySummaries(requestParameters.granularityType, requestParameters.granularityId, requestParameters.marketplaceIds, requestParameters.details, requestParameters.startDateTime, requestParameters.sellerSkus, requestParameters.sellerSku, requestParameters.nextToken, options).then((request) => request(axios, basePath));
299
- },
300
- };
301
- };
302
- /**
303
- * FbaInventoryApi - object-oriented interface
304
- */
305
- export class FbaInventoryApi extends BaseAPI {
306
- /**
307
- * Requests that Amazon add items to the Sandbox Inventory with desired amount of quantity in the sandbox environment. This is a sandbox-only operation and must be directed to a sandbox endpoint. Refer to [Selling Partner API sandbox](https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-api-sandbox) for more information.
308
- * @param {FbaInventoryApiAddInventoryRequest} requestParameters Request parameters.
309
- * @param {*} [options] Override http request option.
310
- * @throws {RequiredError}
311
- */
312
- addInventory(requestParameters, options) {
313
- return FbaInventoryApiFp(this.configuration).addInventory(requestParameters.xAmznIdempotencyToken, requestParameters.addInventoryRequestBody, options).then((request) => request(this.axios, this.basePath));
314
- }
315
- /**
316
- * Requests that Amazon create product-details in the Sandbox Inventory in the sandbox environment. This is a sandbox-only operation and must be directed to a sandbox endpoint. Refer to [Selling Partner API sandbox](https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-api-sandbox) for more information.
317
- * @param {FbaInventoryApiCreateInventoryItemRequest} requestParameters Request parameters.
318
- * @param {*} [options] Override http request option.
319
- * @throws {RequiredError}
320
- */
321
- createInventoryItem(requestParameters, options) {
322
- return FbaInventoryApiFp(this.configuration).createInventoryItem(requestParameters.createInventoryItemRequestBody, options).then((request) => request(this.axios, this.basePath));
323
- }
324
- /**
325
- * Requests that Amazon Deletes an item from the Sandbox Inventory in the sandbox environment. This is a sandbox-only operation and must be directed to a sandbox endpoint. Refer to [Selling Partner API sandbox](https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-api-sandbox) for more information.
326
- * @param {FbaInventoryApiDeleteInventoryItemRequest} requestParameters Request parameters.
327
- * @param {*} [options] Override http request option.
328
- * @throws {RequiredError}
329
- */
330
- deleteInventoryItem(requestParameters, options) {
331
- return FbaInventoryApiFp(this.configuration).deleteInventoryItem(requestParameters.sellerSku, requestParameters.marketplaceId, options).then((request) => request(this.axios, this.basePath));
332
- }
333
- /**
334
- * 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).
335
- * @param {FbaInventoryApiGetInventorySummariesRequest} requestParameters Request parameters.
336
- * @param {*} [options] Override http request option.
337
- * @throws {RequiredError}
338
- */
339
- getInventorySummaries(requestParameters, options) {
340
- 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));
341
- }
342
- }
343
- export const GetInventorySummariesGranularityTypeEnum = {
344
- Marketplace: 'Marketplace',
345
- };
@@ -1,14 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
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.
6
- *
7
- * The version of the OpenAPI document: v1
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- export * from './api/fba-inventory-api';
@@ -1,44 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
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.
6
- *
7
- * The version of the OpenAPI document: v1
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- import globalAxios from 'axios';
15
- export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
16
- export const COLLECTION_FORMATS = {
17
- csv: ",",
18
- ssv: " ",
19
- tsv: "\t",
20
- pipes: "|",
21
- };
22
- export class BaseAPI {
23
- basePath;
24
- axios;
25
- configuration;
26
- constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
27
- this.basePath = basePath;
28
- this.axios = axios;
29
- if (configuration) {
30
- this.configuration = configuration;
31
- this.basePath = configuration.basePath ?? basePath;
32
- }
33
- }
34
- }
35
- ;
36
- export class RequiredError extends Error {
37
- field;
38
- constructor(field, msg) {
39
- super(msg);
40
- this.field = field;
41
- this.name = "RequiredError";
42
- }
43
- }
44
- export const operationServerMap = {};
@@ -1,110 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
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.
6
- *
7
- * The version of the OpenAPI document: v1
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- import { RequiredError } from "./base";
15
- export const DUMMY_BASE_URL = 'https://example.com';
16
- /**
17
- *
18
- * @throws {RequiredError}
19
- */
20
- export const assertParamExists = function (functionName, paramName, paramValue) {
21
- if (paramValue === null || paramValue === undefined) {
22
- throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
23
- }
24
- };
25
- export const setApiKeyToObject = async function (object, keyParamName, configuration) {
26
- if (configuration && configuration.apiKey) {
27
- const localVarApiKeyValue = typeof configuration.apiKey === 'function'
28
- ? await configuration.apiKey(keyParamName)
29
- : await configuration.apiKey;
30
- object[keyParamName] = localVarApiKeyValue;
31
- }
32
- };
33
- export const setBasicAuthToObject = function (object, configuration) {
34
- if (configuration && (configuration.username || configuration.password)) {
35
- object["auth"] = { username: configuration.username, password: configuration.password };
36
- }
37
- };
38
- export const setBearerAuthToObject = async function (object, configuration) {
39
- if (configuration && configuration.accessToken) {
40
- const accessToken = typeof configuration.accessToken === 'function'
41
- ? await configuration.accessToken()
42
- : await configuration.accessToken;
43
- object["Authorization"] = "Bearer " + accessToken;
44
- }
45
- };
46
- export const setOAuthToObject = async function (object, name, scopes, configuration) {
47
- if (configuration && configuration.accessToken) {
48
- const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
49
- ? await configuration.accessToken(name, scopes)
50
- : await configuration.accessToken;
51
- object["Authorization"] = "Bearer " + localVarAccessTokenValue;
52
- }
53
- };
54
- function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
55
- if (parameter == null)
56
- return;
57
- if (typeof parameter === "object") {
58
- if (Array.isArray(parameter) || parameter instanceof Set) {
59
- parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
60
- }
61
- else {
62
- Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
63
- }
64
- }
65
- else {
66
- if (urlSearchParams.has(key)) {
67
- urlSearchParams.append(key, parameter);
68
- }
69
- else {
70
- urlSearchParams.set(key, parameter);
71
- }
72
- }
73
- }
74
- export const setSearchParams = function (url, ...objects) {
75
- const searchParams = new URLSearchParams(url.search);
76
- setFlattenedQueryParams(searchParams, objects);
77
- url.search = searchParams.toString();
78
- };
79
- /**
80
- * JSON serialization helper function which replaces instances of unserializable types with serializable ones.
81
- * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
82
- * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
83
- */
84
- // @ts-ignore
85
- export const replaceWithSerializableTypeIfNeeded = function (key, value) {
86
- if (value instanceof Set) {
87
- return Array.from(value);
88
- }
89
- else {
90
- return value;
91
- }
92
- };
93
- export const serializeDataIfNeeded = function (value, requestOptions, configuration) {
94
- const nonString = typeof value !== 'string';
95
- const needsSerialization = nonString && configuration && configuration.isJsonMime
96
- ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
97
- : nonString;
98
- return needsSerialization
99
- ? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded)
100
- : (value || "");
101
- };
102
- export const toPathString = function (url) {
103
- return url.pathname + url.search + url.hash;
104
- };
105
- export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
106
- return (axios = globalAxios, basePath = BASE_PATH) => {
107
- const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
108
- return axios.request(axiosRequestArgs);
109
- };
110
- };
@@ -1,94 +0,0 @@
1
- /* tslint:disable */
2
- /**
3
- * Selling Partner API for FBA Inventory
4
- * The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon\'s fulfillment network.
5
- *
6
- * The version of the OpenAPI document: v1
7
- *
8
- *
9
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
10
- * https://openapi-generator.tech
11
- * Do not edit the class manually.
12
- */
13
- export class Configuration {
14
- /**
15
- * parameter for apiKey security
16
- * @param name security name
17
- */
18
- apiKey;
19
- /**
20
- * parameter for basic security
21
- */
22
- username;
23
- /**
24
- * parameter for basic security
25
- */
26
- password;
27
- /**
28
- * parameter for oauth2 security
29
- * @param name security name
30
- * @param scopes oauth2 scope
31
- */
32
- accessToken;
33
- /**
34
- * parameter for aws4 signature security
35
- * @param {Object} AWS4Signature - AWS4 Signature security
36
- * @param {string} options.region - aws region
37
- * @param {string} options.service - name of the service.
38
- * @param {string} credentials.accessKeyId - aws access key id
39
- * @param {string} credentials.secretAccessKey - aws access key
40
- * @param {string} credentials.sessionToken - aws session token
41
- * @memberof Configuration
42
- */
43
- awsv4;
44
- /**
45
- * override base path
46
- */
47
- basePath;
48
- /**
49
- * override server index
50
- */
51
- serverIndex;
52
- /**
53
- * base options for axios calls
54
- */
55
- baseOptions;
56
- /**
57
- * The FormData constructor that will be used to create multipart form data
58
- * requests. You can inject this here so that execution environments that
59
- * do not support the FormData class can still run the generated client.
60
- *
61
- * @type {new () => FormData}
62
- */
63
- formDataCtor;
64
- constructor(param = {}) {
65
- this.apiKey = param.apiKey;
66
- this.username = param.username;
67
- this.password = param.password;
68
- this.accessToken = param.accessToken;
69
- this.awsv4 = param.awsv4;
70
- this.basePath = param.basePath;
71
- this.serverIndex = param.serverIndex;
72
- this.baseOptions = {
73
- ...param.baseOptions,
74
- headers: {
75
- ...param.baseOptions?.headers,
76
- },
77
- };
78
- this.formDataCtor = param.formDataCtor;
79
- }
80
- /**
81
- * Check if the given MIME is a JSON MIME.
82
- * JSON MIME examples:
83
- * application/json
84
- * application/json; charset=UTF8
85
- * APPLICATION/JSON
86
- * application/vnd.company+json
87
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
88
- * @return True if the given MIME is JSON, false otherwise.
89
- */
90
- isJsonMime(mime) {
91
- const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
92
- return mime !== null && jsonMime.test(mime);
93
- }
94
- }