@sp-api-sdk/vendor-direct-fulfillment-inventory-api-v1 4.0.17 → 5.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.
- package/README.md +4 -4
- package/dist/index.cjs +314 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +391 -0
- package/dist/index.d.ts +391 -0
- package/dist/index.js +272 -0
- package/dist/index.js.map +1 -0
- package/package.json +23 -12
- package/dist/cjs/api-model/api/vendor-direct-fulfillment-inventory-api.js +0 -122
- package/dist/cjs/api-model/api.js +0 -30
- package/dist/cjs/api-model/base.js +0 -52
- package/dist/cjs/api-model/common.js +0 -123
- package/dist/cjs/api-model/configuration.js +0 -98
- package/dist/cjs/api-model/index.js +0 -32
- package/dist/cjs/api-model/models/index.js +0 -24
- package/dist/cjs/api-model/models/inventory-update.js +0 -15
- package/dist/cjs/api-model/models/item-details.js +0 -15
- package/dist/cjs/api-model/models/item-quantity.js +0 -15
- package/dist/cjs/api-model/models/model-error.js +0 -15
- package/dist/cjs/api-model/models/party-identification.js +0 -15
- package/dist/cjs/api-model/models/submit-inventory-update-request.js +0 -15
- package/dist/cjs/api-model/models/submit-inventory-update-response.js +0 -15
- package/dist/cjs/api-model/models/transaction-reference.js +0 -15
- package/dist/cjs/client.js +0 -21
- package/dist/cjs/index.js +0 -18
- package/dist/es/api-model/api/vendor-direct-fulfillment-inventory-api.js +0 -112
- package/dist/es/api-model/api.js +0 -14
- package/dist/es/api-model/base.js +0 -44
- package/dist/es/api-model/common.js +0 -110
- package/dist/es/api-model/configuration.js +0 -94
- package/dist/es/api-model/index.js +0 -16
- package/dist/es/api-model/models/index.js +0 -8
- package/dist/es/api-model/models/inventory-update.js +0 -14
- package/dist/es/api-model/models/item-details.js +0 -14
- package/dist/es/api-model/models/item-quantity.js +0 -14
- package/dist/es/api-model/models/model-error.js +0 -14
- package/dist/es/api-model/models/party-identification.js +0 -14
- package/dist/es/api-model/models/submit-inventory-update-request.js +0 -14
- package/dist/es/api-model/models/submit-inventory-update-response.js +0 -14
- package/dist/es/api-model/models/transaction-reference.js +0 -14
- package/dist/es/client.js +0 -17
- package/dist/es/index.js +0 -2
- package/dist/types/api-model/api/vendor-direct-fulfillment-inventory-api.d.ts +0 -80
- package/dist/types/api-model/api.d.ts +0 -12
- package/dist/types/api-model/base.d.ts +0 -42
- package/dist/types/api-model/common.d.ts +0 -34
- package/dist/types/api-model/configuration.d.ts +0 -98
- package/dist/types/api-model/index.d.ts +0 -14
- package/dist/types/api-model/models/index.d.ts +0 -8
- package/dist/types/api-model/models/inventory-update.d.ts +0 -27
- package/dist/types/api-model/models/item-details.d.ts +0 -30
- package/dist/types/api-model/models/item-quantity.d.ts +0 -24
- package/dist/types/api-model/models/model-error.d.ts +0 -28
- package/dist/types/api-model/models/party-identification.d.ts +0 -20
- package/dist/types/api-model/models/submit-inventory-update-request.d.ts +0 -18
- package/dist/types/api-model/models/submit-inventory-update-response.d.ts +0 -22
- package/dist/types/api-model/models/transaction-reference.d.ts +0 -20
- package/dist/types/client.d.ts +0 -6
- package/dist/types/index.d.ts +0 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
import { ClientConfiguration, RateLimit } from '@sp-api-sdk/common';
|
|
2
|
+
import * as axios from 'axios';
|
|
3
|
+
import { AxiosInstance, RawAxiosRequestConfig, AxiosPromise } from 'axios';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Selling Partner API for Direct Fulfillment Inventory Updates
|
|
7
|
+
* The Selling Partner API for Direct Fulfillment Inventory Updates provides programmatic access to a direct fulfillment vendor\'s inventory updates.
|
|
8
|
+
*
|
|
9
|
+
* The version of the OpenAPI document: v1
|
|
10
|
+
*
|
|
11
|
+
*
|
|
12
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
13
|
+
* https://openapi-generator.tech
|
|
14
|
+
* Do not edit the class manually.
|
|
15
|
+
*/
|
|
16
|
+
interface AWSv4Configuration {
|
|
17
|
+
options?: {
|
|
18
|
+
region?: string;
|
|
19
|
+
service?: string;
|
|
20
|
+
};
|
|
21
|
+
credentials?: {
|
|
22
|
+
accessKeyId?: string;
|
|
23
|
+
secretAccessKey?: string;
|
|
24
|
+
sessionToken?: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
interface ConfigurationParameters {
|
|
28
|
+
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
29
|
+
username?: string;
|
|
30
|
+
password?: string;
|
|
31
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
32
|
+
awsv4?: AWSv4Configuration;
|
|
33
|
+
basePath?: string;
|
|
34
|
+
serverIndex?: number;
|
|
35
|
+
baseOptions?: any;
|
|
36
|
+
formDataCtor?: new () => any;
|
|
37
|
+
}
|
|
38
|
+
declare class Configuration {
|
|
39
|
+
/**
|
|
40
|
+
* parameter for apiKey security
|
|
41
|
+
* @param name security name
|
|
42
|
+
*/
|
|
43
|
+
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
44
|
+
/**
|
|
45
|
+
* parameter for basic security
|
|
46
|
+
*/
|
|
47
|
+
username?: string;
|
|
48
|
+
/**
|
|
49
|
+
* parameter for basic security
|
|
50
|
+
*/
|
|
51
|
+
password?: string;
|
|
52
|
+
/**
|
|
53
|
+
* parameter for oauth2 security
|
|
54
|
+
* @param name security name
|
|
55
|
+
* @param scopes oauth2 scope
|
|
56
|
+
*/
|
|
57
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
58
|
+
/**
|
|
59
|
+
* parameter for aws4 signature security
|
|
60
|
+
* @param {Object} AWS4Signature - AWS4 Signature security
|
|
61
|
+
* @param {string} options.region - aws region
|
|
62
|
+
* @param {string} options.service - name of the service.
|
|
63
|
+
* @param {string} credentials.accessKeyId - aws access key id
|
|
64
|
+
* @param {string} credentials.secretAccessKey - aws access key
|
|
65
|
+
* @param {string} credentials.sessionToken - aws session token
|
|
66
|
+
* @memberof Configuration
|
|
67
|
+
*/
|
|
68
|
+
awsv4?: AWSv4Configuration;
|
|
69
|
+
/**
|
|
70
|
+
* override base path
|
|
71
|
+
*/
|
|
72
|
+
basePath?: string;
|
|
73
|
+
/**
|
|
74
|
+
* override server index
|
|
75
|
+
*/
|
|
76
|
+
serverIndex?: number;
|
|
77
|
+
/**
|
|
78
|
+
* base options for axios calls
|
|
79
|
+
*/
|
|
80
|
+
baseOptions?: any;
|
|
81
|
+
/**
|
|
82
|
+
* The FormData constructor that will be used to create multipart form data
|
|
83
|
+
* requests. You can inject this here so that execution environments that
|
|
84
|
+
* do not support the FormData class can still run the generated client.
|
|
85
|
+
*
|
|
86
|
+
* @type {new () => FormData}
|
|
87
|
+
*/
|
|
88
|
+
formDataCtor?: new () => any;
|
|
89
|
+
constructor(param?: ConfigurationParameters);
|
|
90
|
+
/**
|
|
91
|
+
* Check if the given MIME is a JSON MIME.
|
|
92
|
+
* JSON MIME examples:
|
|
93
|
+
* application/json
|
|
94
|
+
* application/json; charset=UTF8
|
|
95
|
+
* APPLICATION/JSON
|
|
96
|
+
* application/vnd.company+json
|
|
97
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
98
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
99
|
+
*/
|
|
100
|
+
isJsonMime(mime: string): boolean;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Selling Partner API for Direct Fulfillment Inventory Updates
|
|
105
|
+
* The Selling Partner API for Direct Fulfillment Inventory Updates provides programmatic access to a direct fulfillment vendor\'s inventory updates.
|
|
106
|
+
*
|
|
107
|
+
* The version of the OpenAPI document: v1
|
|
108
|
+
*
|
|
109
|
+
*
|
|
110
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
111
|
+
* https://openapi-generator.tech
|
|
112
|
+
* Do not edit the class manually.
|
|
113
|
+
*/
|
|
114
|
+
|
|
115
|
+
interface RequestArgs {
|
|
116
|
+
url: string;
|
|
117
|
+
options: RawAxiosRequestConfig;
|
|
118
|
+
}
|
|
119
|
+
declare class BaseAPI {
|
|
120
|
+
protected basePath: string;
|
|
121
|
+
protected axios: AxiosInstance;
|
|
122
|
+
protected configuration: Configuration | undefined;
|
|
123
|
+
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Selling Partner API for Direct Fulfillment Inventory Updates
|
|
128
|
+
* The Selling Partner API for Direct Fulfillment Inventory Updates provides programmatic access to a direct fulfillment vendor\'s inventory updates.
|
|
129
|
+
*
|
|
130
|
+
* The version of the OpenAPI document: v1
|
|
131
|
+
*
|
|
132
|
+
*
|
|
133
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
134
|
+
* https://openapi-generator.tech
|
|
135
|
+
* Do not edit the class manually.
|
|
136
|
+
*/
|
|
137
|
+
/**
|
|
138
|
+
* Details of item quantity.
|
|
139
|
+
*/
|
|
140
|
+
interface ItemQuantity {
|
|
141
|
+
/**
|
|
142
|
+
* Quantity of units available for a specific item.
|
|
143
|
+
*/
|
|
144
|
+
'amount'?: number;
|
|
145
|
+
/**
|
|
146
|
+
* Unit of measure for the available quantity.
|
|
147
|
+
*/
|
|
148
|
+
'unitOfMeasure': string;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Selling Partner API for Direct Fulfillment Inventory Updates
|
|
153
|
+
* The Selling Partner API for Direct Fulfillment Inventory Updates provides programmatic access to a direct fulfillment vendor\'s inventory updates.
|
|
154
|
+
*
|
|
155
|
+
* The version of the OpenAPI document: v1
|
|
156
|
+
*
|
|
157
|
+
*
|
|
158
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
159
|
+
* https://openapi-generator.tech
|
|
160
|
+
* Do not edit the class manually.
|
|
161
|
+
*/
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Updated inventory details for an item.
|
|
165
|
+
*/
|
|
166
|
+
interface ItemDetails {
|
|
167
|
+
/**
|
|
168
|
+
* The buyer selected product identification of the item. Either buyerProductIdentifier or vendorProductIdentifier should be submitted.
|
|
169
|
+
*/
|
|
170
|
+
'buyerProductIdentifier'?: string;
|
|
171
|
+
/**
|
|
172
|
+
* The vendor selected product identification of the item. Either buyerProductIdentifier or vendorProductIdentifier should be submitted.
|
|
173
|
+
*/
|
|
174
|
+
'vendorProductIdentifier'?: string;
|
|
175
|
+
'availableQuantity': ItemQuantity;
|
|
176
|
+
/**
|
|
177
|
+
* When true, the item is permanently unavailable.
|
|
178
|
+
*/
|
|
179
|
+
'isObsolete'?: boolean;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Selling Partner API for Direct Fulfillment Inventory Updates
|
|
184
|
+
* The Selling Partner API for Direct Fulfillment Inventory Updates provides programmatic access to a direct fulfillment vendor\'s inventory updates.
|
|
185
|
+
*
|
|
186
|
+
* The version of the OpenAPI document: v1
|
|
187
|
+
*
|
|
188
|
+
*
|
|
189
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
190
|
+
* https://openapi-generator.tech
|
|
191
|
+
* Do not edit the class manually.
|
|
192
|
+
*/
|
|
193
|
+
/**
|
|
194
|
+
* Name, address and tax details of a party.
|
|
195
|
+
*/
|
|
196
|
+
interface PartyIdentification {
|
|
197
|
+
/**
|
|
198
|
+
* Assigned identification for the party.
|
|
199
|
+
*/
|
|
200
|
+
'partyId': string;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Selling Partner API for Direct Fulfillment Inventory Updates
|
|
205
|
+
* The Selling Partner API for Direct Fulfillment Inventory Updates provides programmatic access to a direct fulfillment vendor\'s inventory updates.
|
|
206
|
+
*
|
|
207
|
+
* The version of the OpenAPI document: v1
|
|
208
|
+
*
|
|
209
|
+
*
|
|
210
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
211
|
+
* https://openapi-generator.tech
|
|
212
|
+
* Do not edit the class manually.
|
|
213
|
+
*/
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Inventory details required to update some or all items for the requested warehouse.
|
|
217
|
+
*/
|
|
218
|
+
interface InventoryUpdate {
|
|
219
|
+
'sellingParty': PartyIdentification;
|
|
220
|
+
/**
|
|
221
|
+
* When true, this request contains a full feed. Otherwise, this request contains a partial feed. When sending a full feed, you must send information about all items in the warehouse. Any items not in the full feed are updated as not available. When sending a partial feed, only include the items that need an update to inventory. The status of other items will remain unchanged.
|
|
222
|
+
*/
|
|
223
|
+
'isFullUpdate': boolean;
|
|
224
|
+
/**
|
|
225
|
+
* A list of inventory items with updated details, including quantity available.
|
|
226
|
+
*/
|
|
227
|
+
'items': Array<ItemDetails>;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Selling Partner API for Direct Fulfillment Inventory Updates
|
|
232
|
+
* The Selling Partner API for Direct Fulfillment Inventory Updates provides programmatic access to a direct fulfillment vendor\'s inventory updates.
|
|
233
|
+
*
|
|
234
|
+
* The version of the OpenAPI document: v1
|
|
235
|
+
*
|
|
236
|
+
*
|
|
237
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
238
|
+
* https://openapi-generator.tech
|
|
239
|
+
* Do not edit the class manually.
|
|
240
|
+
*/
|
|
241
|
+
/**
|
|
242
|
+
* Error response returned when the request is unsuccessful.
|
|
243
|
+
*/
|
|
244
|
+
interface ModelError {
|
|
245
|
+
/**
|
|
246
|
+
* An error code that identifies the type of error that occurred.
|
|
247
|
+
*/
|
|
248
|
+
'code': string;
|
|
249
|
+
/**
|
|
250
|
+
* A message that describes the error condition.
|
|
251
|
+
*/
|
|
252
|
+
'message': string;
|
|
253
|
+
/**
|
|
254
|
+
* Additional details that can help the caller understand or fix the issue.
|
|
255
|
+
*/
|
|
256
|
+
'details'?: string;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Selling Partner API for Direct Fulfillment Inventory Updates
|
|
261
|
+
* The Selling Partner API for Direct Fulfillment Inventory Updates provides programmatic access to a direct fulfillment vendor\'s inventory updates.
|
|
262
|
+
*
|
|
263
|
+
* The version of the OpenAPI document: v1
|
|
264
|
+
*
|
|
265
|
+
*
|
|
266
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
267
|
+
* https://openapi-generator.tech
|
|
268
|
+
* Do not edit the class manually.
|
|
269
|
+
*/
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* The request body for the submitInventoryUpdate operation.
|
|
273
|
+
*/
|
|
274
|
+
interface SubmitInventoryUpdateRequest {
|
|
275
|
+
'inventory'?: InventoryUpdate;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Selling Partner API for Direct Fulfillment Inventory Updates
|
|
280
|
+
* The Selling Partner API for Direct Fulfillment Inventory Updates provides programmatic access to a direct fulfillment vendor\'s inventory updates.
|
|
281
|
+
*
|
|
282
|
+
* The version of the OpenAPI document: v1
|
|
283
|
+
*
|
|
284
|
+
*
|
|
285
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
286
|
+
* https://openapi-generator.tech
|
|
287
|
+
* Do not edit the class manually.
|
|
288
|
+
*/
|
|
289
|
+
/**
|
|
290
|
+
* Response containing the transaction ID.
|
|
291
|
+
*/
|
|
292
|
+
interface TransactionReference {
|
|
293
|
+
/**
|
|
294
|
+
* GUID to identify this transaction. This value can be used with the Transaction Status API to return the status of this transaction.
|
|
295
|
+
*/
|
|
296
|
+
'transactionId'?: string;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Selling Partner API for Direct Fulfillment Inventory Updates
|
|
301
|
+
* The Selling Partner API for Direct Fulfillment Inventory Updates provides programmatic access to a direct fulfillment vendor\'s inventory updates.
|
|
302
|
+
*
|
|
303
|
+
* The version of the OpenAPI document: v1
|
|
304
|
+
*
|
|
305
|
+
*
|
|
306
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
307
|
+
* https://openapi-generator.tech
|
|
308
|
+
* Do not edit the class manually.
|
|
309
|
+
*/
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* The response schema for the submitInventoryUpdate operation.
|
|
313
|
+
*/
|
|
314
|
+
interface SubmitInventoryUpdateResponse {
|
|
315
|
+
'payload'?: TransactionReference;
|
|
316
|
+
/**
|
|
317
|
+
* A list of error responses returned when a request is unsuccessful.
|
|
318
|
+
*/
|
|
319
|
+
'errors'?: Array<Error>;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* VendorDirectFulfillmentInventoryApi - axios parameter creator
|
|
324
|
+
*/
|
|
325
|
+
declare const VendorDirectFulfillmentInventoryApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
326
|
+
/**
|
|
327
|
+
* Submits inventory updates for the specified warehouse for either a partial or full feed of inventory items. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
328
|
+
* @param {string} warehouseId Identifier for the warehouse for which to update inventory.
|
|
329
|
+
* @param {SubmitInventoryUpdateRequest} body The request body containing the inventory update data to submit.
|
|
330
|
+
* @param {*} [options] Override http request option.
|
|
331
|
+
* @throws {RequiredError}
|
|
332
|
+
*/
|
|
333
|
+
submitInventoryUpdate: (warehouseId: string, body: SubmitInventoryUpdateRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
334
|
+
};
|
|
335
|
+
/**
|
|
336
|
+
* VendorDirectFulfillmentInventoryApi - functional programming interface
|
|
337
|
+
*/
|
|
338
|
+
declare const VendorDirectFulfillmentInventoryApiFp: (configuration?: Configuration) => {
|
|
339
|
+
/**
|
|
340
|
+
* Submits inventory updates for the specified warehouse for either a partial or full feed of inventory items. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
341
|
+
* @param {string} warehouseId Identifier for the warehouse for which to update inventory.
|
|
342
|
+
* @param {SubmitInventoryUpdateRequest} body The request body containing the inventory update data to submit.
|
|
343
|
+
* @param {*} [options] Override http request option.
|
|
344
|
+
* @throws {RequiredError}
|
|
345
|
+
*/
|
|
346
|
+
submitInventoryUpdate(warehouseId: string, body: SubmitInventoryUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SubmitInventoryUpdateResponse>>;
|
|
347
|
+
};
|
|
348
|
+
/**
|
|
349
|
+
* VendorDirectFulfillmentInventoryApi - factory interface
|
|
350
|
+
*/
|
|
351
|
+
declare const VendorDirectFulfillmentInventoryApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
352
|
+
/**
|
|
353
|
+
* Submits inventory updates for the specified warehouse for either a partial or full feed of inventory items. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
354
|
+
* @param {VendorDirectFulfillmentInventoryApiSubmitInventoryUpdateRequest} requestParameters Request parameters.
|
|
355
|
+
* @param {*} [options] Override http request option.
|
|
356
|
+
* @throws {RequiredError}
|
|
357
|
+
*/
|
|
358
|
+
submitInventoryUpdate(requestParameters: VendorDirectFulfillmentInventoryApiSubmitInventoryUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise<SubmitInventoryUpdateResponse>;
|
|
359
|
+
};
|
|
360
|
+
/**
|
|
361
|
+
* Request parameters for submitInventoryUpdate operation in VendorDirectFulfillmentInventoryApi.
|
|
362
|
+
*/
|
|
363
|
+
interface VendorDirectFulfillmentInventoryApiSubmitInventoryUpdateRequest {
|
|
364
|
+
/**
|
|
365
|
+
* Identifier for the warehouse for which to update inventory.
|
|
366
|
+
*/
|
|
367
|
+
readonly warehouseId: string;
|
|
368
|
+
/**
|
|
369
|
+
* The request body containing the inventory update data to submit.
|
|
370
|
+
*/
|
|
371
|
+
readonly body: SubmitInventoryUpdateRequest;
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* VendorDirectFulfillmentInventoryApi - object-oriented interface
|
|
375
|
+
*/
|
|
376
|
+
declare class VendorDirectFulfillmentInventoryApi extends BaseAPI {
|
|
377
|
+
/**
|
|
378
|
+
* Submits inventory updates for the specified warehouse for either a partial or full feed of inventory items. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
379
|
+
* @param {VendorDirectFulfillmentInventoryApiSubmitInventoryUpdateRequest} requestParameters Request parameters.
|
|
380
|
+
* @param {*} [options] Override http request option.
|
|
381
|
+
* @throws {RequiredError}
|
|
382
|
+
*/
|
|
383
|
+
submitInventoryUpdate(requestParameters: VendorDirectFulfillmentInventoryApiSubmitInventoryUpdateRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<SubmitInventoryUpdateResponse, any, {}>>;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
declare const clientRateLimits: RateLimit[];
|
|
387
|
+
declare class VendorDirectFulfillmentInventoryApiClient extends VendorDirectFulfillmentInventoryApi {
|
|
388
|
+
constructor(configuration: ClientConfiguration);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
export { type InventoryUpdate, type ItemDetails, type ItemQuantity, type ModelError, type PartyIdentification, type SubmitInventoryUpdateRequest, type SubmitInventoryUpdateResponse, type TransactionReference, VendorDirectFulfillmentInventoryApi, VendorDirectFulfillmentInventoryApiAxiosParamCreator, VendorDirectFulfillmentInventoryApiClient, VendorDirectFulfillmentInventoryApiFactory, VendorDirectFulfillmentInventoryApiFp, type VendorDirectFulfillmentInventoryApiSubmitInventoryUpdateRequest, clientRateLimits };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
// src/client.ts
|
|
2
|
+
import { createAxiosInstance } from "@sp-api-sdk/common";
|
|
3
|
+
|
|
4
|
+
// src/api-model/api/vendor-direct-fulfillment-inventory-api.ts
|
|
5
|
+
import globalAxios2 from "axios";
|
|
6
|
+
|
|
7
|
+
// src/api-model/base.ts
|
|
8
|
+
import globalAxios from "axios";
|
|
9
|
+
var BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
10
|
+
var BaseAPI = class {
|
|
11
|
+
constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
|
|
12
|
+
this.basePath = basePath;
|
|
13
|
+
this.axios = axios;
|
|
14
|
+
if (configuration) {
|
|
15
|
+
this.configuration = configuration;
|
|
16
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
basePath;
|
|
20
|
+
axios;
|
|
21
|
+
configuration;
|
|
22
|
+
};
|
|
23
|
+
var RequiredError = class extends Error {
|
|
24
|
+
constructor(field, msg) {
|
|
25
|
+
super(msg);
|
|
26
|
+
this.field = field;
|
|
27
|
+
this.name = "RequiredError";
|
|
28
|
+
}
|
|
29
|
+
field;
|
|
30
|
+
};
|
|
31
|
+
var operationServerMap = {};
|
|
32
|
+
|
|
33
|
+
// src/api-model/common.ts
|
|
34
|
+
var DUMMY_BASE_URL = "https://example.com";
|
|
35
|
+
var assertParamExists = function(functionName, paramName, paramValue) {
|
|
36
|
+
if (paramValue === null || paramValue === void 0) {
|
|
37
|
+
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
41
|
+
if (parameter == null) return;
|
|
42
|
+
if (typeof parameter === "object") {
|
|
43
|
+
if (Array.isArray(parameter) || parameter instanceof Set) {
|
|
44
|
+
parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
45
|
+
} else {
|
|
46
|
+
Object.keys(parameter).forEach(
|
|
47
|
+
(currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
} else {
|
|
51
|
+
if (urlSearchParams.has(key)) {
|
|
52
|
+
urlSearchParams.append(key, parameter);
|
|
53
|
+
} else {
|
|
54
|
+
urlSearchParams.set(key, parameter);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
var setSearchParams = function(url, ...objects) {
|
|
59
|
+
const searchParams = new URLSearchParams(url.search);
|
|
60
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
61
|
+
url.search = searchParams.toString();
|
|
62
|
+
};
|
|
63
|
+
var replaceWithSerializableTypeIfNeeded = function(key, value) {
|
|
64
|
+
if (value instanceof Set) {
|
|
65
|
+
return Array.from(value);
|
|
66
|
+
} else {
|
|
67
|
+
return value;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
var serializeDataIfNeeded = function(value, requestOptions, configuration) {
|
|
71
|
+
const nonString = typeof value !== "string";
|
|
72
|
+
const needsSerialization = nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString;
|
|
73
|
+
return needsSerialization ? JSON.stringify(value !== void 0 ? value : {}, replaceWithSerializableTypeIfNeeded) : value || "";
|
|
74
|
+
};
|
|
75
|
+
var toPathString = function(url) {
|
|
76
|
+
return url.pathname + url.search + url.hash;
|
|
77
|
+
};
|
|
78
|
+
var createRequestFunction = function(axiosArgs, globalAxios3, BASE_PATH2, configuration) {
|
|
79
|
+
return (axios = globalAxios3, basePath = BASE_PATH2) => {
|
|
80
|
+
const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url };
|
|
81
|
+
return axios.request(axiosRequestArgs);
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
// src/api-model/api/vendor-direct-fulfillment-inventory-api.ts
|
|
86
|
+
var VendorDirectFulfillmentInventoryApiAxiosParamCreator = function(configuration) {
|
|
87
|
+
return {
|
|
88
|
+
/**
|
|
89
|
+
* Submits inventory updates for the specified warehouse for either a partial or full feed of inventory items. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
90
|
+
* @param {string} warehouseId Identifier for the warehouse for which to update inventory.
|
|
91
|
+
* @param {SubmitInventoryUpdateRequest} body The request body containing the inventory update data to submit.
|
|
92
|
+
* @param {*} [options] Override http request option.
|
|
93
|
+
* @throws {RequiredError}
|
|
94
|
+
*/
|
|
95
|
+
submitInventoryUpdate: async (warehouseId, body, options = {}) => {
|
|
96
|
+
assertParamExists("submitInventoryUpdate", "warehouseId", warehouseId);
|
|
97
|
+
assertParamExists("submitInventoryUpdate", "body", body);
|
|
98
|
+
const localVarPath = `/vendor/directFulfillment/inventory/v1/warehouses/{warehouseId}/items`.replace("{warehouseId}", encodeURIComponent(String(warehouseId)));
|
|
99
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
100
|
+
let baseOptions;
|
|
101
|
+
if (configuration) {
|
|
102
|
+
baseOptions = configuration.baseOptions;
|
|
103
|
+
}
|
|
104
|
+
const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
|
|
105
|
+
const localVarHeaderParameter = {};
|
|
106
|
+
const localVarQueryParameter = {};
|
|
107
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
108
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
109
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
110
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
111
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
112
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
113
|
+
return {
|
|
114
|
+
url: toPathString(localVarUrlObj),
|
|
115
|
+
options: localVarRequestOptions
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
var VendorDirectFulfillmentInventoryApiFp = function(configuration) {
|
|
121
|
+
const localVarAxiosParamCreator = VendorDirectFulfillmentInventoryApiAxiosParamCreator(configuration);
|
|
122
|
+
return {
|
|
123
|
+
/**
|
|
124
|
+
* Submits inventory updates for the specified warehouse for either a partial or full feed of inventory items. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
125
|
+
* @param {string} warehouseId Identifier for the warehouse for which to update inventory.
|
|
126
|
+
* @param {SubmitInventoryUpdateRequest} body The request body containing the inventory update data to submit.
|
|
127
|
+
* @param {*} [options] Override http request option.
|
|
128
|
+
* @throws {RequiredError}
|
|
129
|
+
*/
|
|
130
|
+
async submitInventoryUpdate(warehouseId, body, options) {
|
|
131
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.submitInventoryUpdate(warehouseId, body, options);
|
|
132
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
133
|
+
const localVarOperationServerBasePath = operationServerMap["VendorDirectFulfillmentInventoryApi.submitInventoryUpdate"]?.[localVarOperationServerIndex]?.url;
|
|
134
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
var VendorDirectFulfillmentInventoryApiFactory = function(configuration, basePath, axios) {
|
|
139
|
+
const localVarFp = VendorDirectFulfillmentInventoryApiFp(configuration);
|
|
140
|
+
return {
|
|
141
|
+
/**
|
|
142
|
+
* Submits inventory updates for the specified warehouse for either a partial or full feed of inventory items. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
143
|
+
* @param {VendorDirectFulfillmentInventoryApiSubmitInventoryUpdateRequest} requestParameters Request parameters.
|
|
144
|
+
* @param {*} [options] Override http request option.
|
|
145
|
+
* @throws {RequiredError}
|
|
146
|
+
*/
|
|
147
|
+
submitInventoryUpdate(requestParameters, options) {
|
|
148
|
+
return localVarFp.submitInventoryUpdate(requestParameters.warehouseId, requestParameters.body, options).then((request) => request(axios, basePath));
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
var VendorDirectFulfillmentInventoryApi = class extends BaseAPI {
|
|
153
|
+
/**
|
|
154
|
+
* Submits inventory updates for the specified warehouse for either a partial or full feed of inventory items. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
155
|
+
* @param {VendorDirectFulfillmentInventoryApiSubmitInventoryUpdateRequest} requestParameters Request parameters.
|
|
156
|
+
* @param {*} [options] Override http request option.
|
|
157
|
+
* @throws {RequiredError}
|
|
158
|
+
*/
|
|
159
|
+
submitInventoryUpdate(requestParameters, options) {
|
|
160
|
+
return VendorDirectFulfillmentInventoryApiFp(this.configuration).submitInventoryUpdate(requestParameters.warehouseId, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
// src/api-model/configuration.ts
|
|
165
|
+
var Configuration = class {
|
|
166
|
+
/**
|
|
167
|
+
* parameter for apiKey security
|
|
168
|
+
* @param name security name
|
|
169
|
+
*/
|
|
170
|
+
apiKey;
|
|
171
|
+
/**
|
|
172
|
+
* parameter for basic security
|
|
173
|
+
*/
|
|
174
|
+
username;
|
|
175
|
+
/**
|
|
176
|
+
* parameter for basic security
|
|
177
|
+
*/
|
|
178
|
+
password;
|
|
179
|
+
/**
|
|
180
|
+
* parameter for oauth2 security
|
|
181
|
+
* @param name security name
|
|
182
|
+
* @param scopes oauth2 scope
|
|
183
|
+
*/
|
|
184
|
+
accessToken;
|
|
185
|
+
/**
|
|
186
|
+
* parameter for aws4 signature security
|
|
187
|
+
* @param {Object} AWS4Signature - AWS4 Signature security
|
|
188
|
+
* @param {string} options.region - aws region
|
|
189
|
+
* @param {string} options.service - name of the service.
|
|
190
|
+
* @param {string} credentials.accessKeyId - aws access key id
|
|
191
|
+
* @param {string} credentials.secretAccessKey - aws access key
|
|
192
|
+
* @param {string} credentials.sessionToken - aws session token
|
|
193
|
+
* @memberof Configuration
|
|
194
|
+
*/
|
|
195
|
+
awsv4;
|
|
196
|
+
/**
|
|
197
|
+
* override base path
|
|
198
|
+
*/
|
|
199
|
+
basePath;
|
|
200
|
+
/**
|
|
201
|
+
* override server index
|
|
202
|
+
*/
|
|
203
|
+
serverIndex;
|
|
204
|
+
/**
|
|
205
|
+
* base options for axios calls
|
|
206
|
+
*/
|
|
207
|
+
baseOptions;
|
|
208
|
+
/**
|
|
209
|
+
* The FormData constructor that will be used to create multipart form data
|
|
210
|
+
* requests. You can inject this here so that execution environments that
|
|
211
|
+
* do not support the FormData class can still run the generated client.
|
|
212
|
+
*
|
|
213
|
+
* @type {new () => FormData}
|
|
214
|
+
*/
|
|
215
|
+
formDataCtor;
|
|
216
|
+
constructor(param = {}) {
|
|
217
|
+
this.apiKey = param.apiKey;
|
|
218
|
+
this.username = param.username;
|
|
219
|
+
this.password = param.password;
|
|
220
|
+
this.accessToken = param.accessToken;
|
|
221
|
+
this.awsv4 = param.awsv4;
|
|
222
|
+
this.basePath = param.basePath;
|
|
223
|
+
this.serverIndex = param.serverIndex;
|
|
224
|
+
this.baseOptions = {
|
|
225
|
+
...param.baseOptions,
|
|
226
|
+
headers: {
|
|
227
|
+
...param.baseOptions?.headers
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
this.formDataCtor = param.formDataCtor;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Check if the given MIME is a JSON MIME.
|
|
234
|
+
* JSON MIME examples:
|
|
235
|
+
* application/json
|
|
236
|
+
* application/json; charset=UTF8
|
|
237
|
+
* APPLICATION/JSON
|
|
238
|
+
* application/vnd.company+json
|
|
239
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
240
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
241
|
+
*/
|
|
242
|
+
isJsonMime(mime) {
|
|
243
|
+
const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
|
|
244
|
+
return mime !== null && jsonMime.test(mime);
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
// src/client.ts
|
|
249
|
+
var clientRateLimits = [
|
|
250
|
+
{
|
|
251
|
+
method: "post",
|
|
252
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
253
|
+
urlRegex: new RegExp("^/vendor/directFulfillment/inventory/v1/warehouses/[^/]*/items$"),
|
|
254
|
+
rate: 10,
|
|
255
|
+
burst: 10
|
|
256
|
+
}
|
|
257
|
+
];
|
|
258
|
+
var VendorDirectFulfillmentInventoryApiClient = class extends VendorDirectFulfillmentInventoryApi {
|
|
259
|
+
constructor(configuration) {
|
|
260
|
+
const { axios, endpoint } = createAxiosInstance(configuration, clientRateLimits);
|
|
261
|
+
super(new Configuration(), endpoint, axios);
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
export {
|
|
265
|
+
VendorDirectFulfillmentInventoryApi,
|
|
266
|
+
VendorDirectFulfillmentInventoryApiAxiosParamCreator,
|
|
267
|
+
VendorDirectFulfillmentInventoryApiClient,
|
|
268
|
+
VendorDirectFulfillmentInventoryApiFactory,
|
|
269
|
+
VendorDirectFulfillmentInventoryApiFp,
|
|
270
|
+
clientRateLimits
|
|
271
|
+
};
|
|
272
|
+
//# sourceMappingURL=index.js.map
|