@sp-api-sdk/amazon-warehousing-and-distribution-api-2024-05-09 2.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/LICENSE +21 -0
- package/README.md +97 -0
- package/dist/cjs/api-model/api/awd-api.js +346 -0
- package/dist/cjs/api-model/api.js +30 -0
- package/dist/cjs/api-model/base.js +71 -0
- package/dist/cjs/api-model/common.js +145 -0
- package/dist/cjs/api-model/configuration.js +99 -0
- package/dist/cjs/api-model/index.js +32 -0
- package/dist/cjs/api-model/models/address.js +15 -0
- package/dist/cjs/api-model/models/carrier-code-type.js +24 -0
- package/dist/cjs/api-model/models/carrier-code.js +15 -0
- package/dist/cjs/api-model/models/dimension-unit-of-measurement.js +25 -0
- package/dist/cjs/api-model/models/distribution-package-contents.js +15 -0
- package/dist/cjs/api-model/models/distribution-package-quantity.js +15 -0
- package/dist/cjs/api-model/models/distribution-package-type.js +25 -0
- package/dist/cjs/api-model/models/distribution-package.js +15 -0
- package/dist/cjs/api-model/models/error-list.js +15 -0
- package/dist/cjs/api-model/models/expiration-details.js +15 -0
- package/dist/cjs/api-model/models/format-type.js +24 -0
- package/dist/cjs/api-model/models/inbound-eligibility-status.js +25 -0
- package/dist/cjs/api-model/models/inbound-eligibility.js +15 -0
- package/dist/cjs/api-model/models/inbound-order-creation-data.js +15 -0
- package/dist/cjs/api-model/models/inbound-order-reference.js +15 -0
- package/dist/cjs/api-model/models/inbound-order.js +15 -0
- package/dist/cjs/api-model/models/inbound-packages.js +15 -0
- package/dist/cjs/api-model/models/inbound-preferences.js +15 -0
- package/dist/cjs/api-model/models/inbound-shipment-status.js +30 -0
- package/dist/cjs/api-model/models/inbound-shipment-summary.js +15 -0
- package/dist/cjs/api-model/models/inbound-shipment.js +15 -0
- package/dist/cjs/api-model/models/inbound-status.js +29 -0
- package/dist/cjs/api-model/models/index.js +81 -0
- package/dist/cjs/api-model/models/inventory-details-visibility.js +25 -0
- package/dist/cjs/api-model/models/inventory-details.js +15 -0
- package/dist/cjs/api-model/models/inventory-listing.js +15 -0
- package/dist/cjs/api-model/models/inventory-quantity.js +15 -0
- package/dist/cjs/api-model/models/inventory-summary.js +15 -0
- package/dist/cjs/api-model/models/inventory-unit-of-measurement.js +26 -0
- package/dist/cjs/api-model/models/label-owner.js +25 -0
- package/dist/cjs/api-model/models/label-status.js +27 -0
- package/dist/cjs/api-model/models/measurement-data.js +15 -0
- package/dist/cjs/api-model/models/model-error.js +15 -0
- package/dist/cjs/api-model/models/order-attribute.js +15 -0
- package/dist/cjs/api-model/models/order-ineligibility-reason.js +15 -0
- package/dist/cjs/api-model/models/order-preference-value.js +25 -0
- package/dist/cjs/api-model/models/order-preference.js +24 -0
- package/dist/cjs/api-model/models/outbound-execution-error.js +15 -0
- package/dist/cjs/api-model/models/outbound-listing.js +15 -0
- package/dist/cjs/api-model/models/outbound-order-creation-data.js +15 -0
- package/dist/cjs/api-model/models/outbound-order-reference.js +15 -0
- package/dist/cjs/api-model/models/outbound-order.js +15 -0
- package/dist/cjs/api-model/models/outbound-shipment-status.js +31 -0
- package/dist/cjs/api-model/models/outbound-shipment.js +15 -0
- package/dist/cjs/api-model/models/outbound-status.js +32 -0
- package/dist/cjs/api-model/models/package-dimensions.js +15 -0
- package/dist/cjs/api-model/models/package-volume.js +15 -0
- package/dist/cjs/api-model/models/package-weight.js +15 -0
- package/dist/cjs/api-model/models/page-type.js +26 -0
- package/dist/cjs/api-model/models/prep-details.js +15 -0
- package/dist/cjs/api-model/models/prep-instruction.js +15 -0
- package/dist/cjs/api-model/models/prep-owner.js +25 -0
- package/dist/cjs/api-model/models/product-attribute.js +15 -0
- package/dist/cjs/api-model/models/product-quantity.js +15 -0
- package/dist/cjs/api-model/models/shipment-labels.js +15 -0
- package/dist/cjs/api-model/models/shipment-listing.js +15 -0
- package/dist/cjs/api-model/models/shipment-sortable-field.js +25 -0
- package/dist/cjs/api-model/models/sku-eligibility.js +15 -0
- package/dist/cjs/api-model/models/sku-ineligibility-reason.js +15 -0
- package/dist/cjs/api-model/models/sku-quantities-visibility.js +25 -0
- package/dist/cjs/api-model/models/sku-quantity.js +15 -0
- package/dist/cjs/api-model/models/sort-order.js +25 -0
- package/dist/cjs/api-model/models/tracking-details.js +15 -0
- package/dist/cjs/api-model/models/transportation-details.js +15 -0
- package/dist/cjs/api-model/models/volume-unit-of-measurement.js +26 -0
- package/dist/cjs/api-model/models/weight-unit-of-measurement.js +25 -0
- package/dist/cjs/client.js +35 -0
- package/dist/cjs/index.js +19 -0
- package/dist/es/api-model/api/awd-api.js +336 -0
- package/dist/es/api-model/api.js +14 -0
- package/dist/es/api-model/base.js +63 -0
- package/dist/es/api-model/common.js +133 -0
- package/dist/es/api-model/configuration.js +95 -0
- package/dist/es/api-model/index.js +16 -0
- package/dist/es/api-model/models/address.js +14 -0
- package/dist/es/api-model/models/carrier-code-type.js +21 -0
- package/dist/es/api-model/models/carrier-code.js +14 -0
- package/dist/es/api-model/models/dimension-unit-of-measurement.js +22 -0
- package/dist/es/api-model/models/distribution-package-contents.js +14 -0
- package/dist/es/api-model/models/distribution-package-quantity.js +14 -0
- package/dist/es/api-model/models/distribution-package-type.js +22 -0
- package/dist/es/api-model/models/distribution-package.js +14 -0
- package/dist/es/api-model/models/error-list.js +14 -0
- package/dist/es/api-model/models/expiration-details.js +14 -0
- package/dist/es/api-model/models/format-type.js +21 -0
- package/dist/es/api-model/models/inbound-eligibility-status.js +22 -0
- package/dist/es/api-model/models/inbound-eligibility.js +14 -0
- package/dist/es/api-model/models/inbound-order-creation-data.js +14 -0
- package/dist/es/api-model/models/inbound-order-reference.js +14 -0
- package/dist/es/api-model/models/inbound-order.js +14 -0
- package/dist/es/api-model/models/inbound-packages.js +14 -0
- package/dist/es/api-model/models/inbound-preferences.js +14 -0
- package/dist/es/api-model/models/inbound-shipment-status.js +27 -0
- package/dist/es/api-model/models/inbound-shipment-summary.js +14 -0
- package/dist/es/api-model/models/inbound-shipment.js +14 -0
- package/dist/es/api-model/models/inbound-status.js +26 -0
- package/dist/es/api-model/models/index.js +65 -0
- package/dist/es/api-model/models/inventory-details-visibility.js +22 -0
- package/dist/es/api-model/models/inventory-details.js +14 -0
- package/dist/es/api-model/models/inventory-listing.js +14 -0
- package/dist/es/api-model/models/inventory-quantity.js +14 -0
- package/dist/es/api-model/models/inventory-summary.js +14 -0
- package/dist/es/api-model/models/inventory-unit-of-measurement.js +23 -0
- package/dist/es/api-model/models/label-owner.js +22 -0
- package/dist/es/api-model/models/label-status.js +24 -0
- package/dist/es/api-model/models/measurement-data.js +14 -0
- package/dist/es/api-model/models/model-error.js +14 -0
- package/dist/es/api-model/models/order-attribute.js +14 -0
- package/dist/es/api-model/models/order-ineligibility-reason.js +14 -0
- package/dist/es/api-model/models/order-preference-value.js +22 -0
- package/dist/es/api-model/models/order-preference.js +21 -0
- package/dist/es/api-model/models/outbound-execution-error.js +14 -0
- package/dist/es/api-model/models/outbound-listing.js +14 -0
- package/dist/es/api-model/models/outbound-order-creation-data.js +14 -0
- package/dist/es/api-model/models/outbound-order-reference.js +14 -0
- package/dist/es/api-model/models/outbound-order.js +14 -0
- package/dist/es/api-model/models/outbound-shipment-status.js +28 -0
- package/dist/es/api-model/models/outbound-shipment.js +14 -0
- package/dist/es/api-model/models/outbound-status.js +29 -0
- package/dist/es/api-model/models/package-dimensions.js +14 -0
- package/dist/es/api-model/models/package-volume.js +14 -0
- package/dist/es/api-model/models/package-weight.js +14 -0
- package/dist/es/api-model/models/page-type.js +23 -0
- package/dist/es/api-model/models/prep-details.js +14 -0
- package/dist/es/api-model/models/prep-instruction.js +14 -0
- package/dist/es/api-model/models/prep-owner.js +22 -0
- package/dist/es/api-model/models/product-attribute.js +14 -0
- package/dist/es/api-model/models/product-quantity.js +14 -0
- package/dist/es/api-model/models/shipment-labels.js +14 -0
- package/dist/es/api-model/models/shipment-listing.js +14 -0
- package/dist/es/api-model/models/shipment-sortable-field.js +22 -0
- package/dist/es/api-model/models/sku-eligibility.js +14 -0
- package/dist/es/api-model/models/sku-ineligibility-reason.js +14 -0
- package/dist/es/api-model/models/sku-quantities-visibility.js +22 -0
- package/dist/es/api-model/models/sku-quantity.js +14 -0
- package/dist/es/api-model/models/sort-order.js +22 -0
- package/dist/es/api-model/models/tracking-details.js +14 -0
- package/dist/es/api-model/models/transportation-details.js +14 -0
- package/dist/es/api-model/models/volume-unit-of-measurement.js +23 -0
- package/dist/es/api-model/models/weight-unit-of-measurement.js +22 -0
- package/dist/es/client.js +31 -0
- package/dist/es/index.js +3 -0
- package/dist/types/api-model/api/awd-api.d.ts +311 -0
- package/dist/types/api-model/api.d.ts +12 -0
- package/dist/types/api-model/base.d.ts +66 -0
- package/dist/types/api-model/common.d.ts +65 -0
- package/dist/types/api-model/configuration.d.ts +91 -0
- package/dist/types/api-model/index.d.ts +14 -0
- package/dist/types/api-model/models/address.d.ts +84 -0
- package/dist/types/api-model/models/carrier-code-type.d.ts +20 -0
- package/dist/types/api-model/models/carrier-code.d.ts +31 -0
- package/dist/types/api-model/models/dimension-unit-of-measurement.d.ts +21 -0
- package/dist/types/api-model/models/distribution-package-contents.d.ts +32 -0
- package/dist/types/api-model/models/distribution-package-quantity.d.ts +31 -0
- package/dist/types/api-model/models/distribution-package-type.d.ts +21 -0
- package/dist/types/api-model/models/distribution-package.d.ts +39 -0
- package/dist/types/api-model/models/error-list.d.ts +24 -0
- package/dist/types/api-model/models/expiration-details.d.ts +30 -0
- package/dist/types/api-model/models/format-type.d.ts +20 -0
- package/dist/types/api-model/models/inbound-eligibility-status.d.ts +21 -0
- package/dist/types/api-model/models/inbound-eligibility.d.ts +45 -0
- package/dist/types/api-model/models/inbound-order-creation-data.d.ts +51 -0
- package/dist/types/api-model/models/inbound-order-reference.d.ts +30 -0
- package/dist/types/api-model/models/inbound-order.d.ts +89 -0
- package/dist/types/api-model/models/inbound-packages.d.ts +25 -0
- package/dist/types/api-model/models/inbound-preferences.d.ts +24 -0
- package/dist/types/api-model/models/inbound-shipment-status.d.ts +26 -0
- package/dist/types/api-model/models/inbound-shipment-summary.d.ts +55 -0
- package/dist/types/api-model/models/inbound-shipment.d.ts +120 -0
- package/dist/types/api-model/models/inbound-status.d.ts +25 -0
- package/dist/types/api-model/models/index.d.ts +65 -0
- package/dist/types/api-model/models/inventory-details-visibility.d.ts +21 -0
- package/dist/types/api-model/models/inventory-details.d.ts +30 -0
- package/dist/types/api-model/models/inventory-listing.d.ts +31 -0
- package/dist/types/api-model/models/inventory-quantity.d.ts +31 -0
- package/dist/types/api-model/models/inventory-summary.d.ts +50 -0
- package/dist/types/api-model/models/inventory-unit-of-measurement.d.ts +22 -0
- package/dist/types/api-model/models/label-owner.d.ts +21 -0
- package/dist/types/api-model/models/label-status.d.ts +23 -0
- package/dist/types/api-model/models/measurement-data.d.ts +39 -0
- package/dist/types/api-model/models/model-error.d.ts +36 -0
- package/dist/types/api-model/models/order-attribute.d.ts +32 -0
- package/dist/types/api-model/models/order-ineligibility-reason.d.ts +30 -0
- package/dist/types/api-model/models/order-preference-value.d.ts +21 -0
- package/dist/types/api-model/models/order-preference.d.ts +20 -0
- package/dist/types/api-model/models/outbound-execution-error.d.ts +36 -0
- package/dist/types/api-model/models/outbound-listing.d.ts +31 -0
- package/dist/types/api-model/models/outbound-order-creation-data.d.ts +39 -0
- package/dist/types/api-model/models/outbound-order-reference.d.ts +24 -0
- package/dist/types/api-model/models/outbound-order.d.ts +108 -0
- package/dist/types/api-model/models/outbound-shipment-status.d.ts +27 -0
- package/dist/types/api-model/models/outbound-shipment.d.ts +76 -0
- package/dist/types/api-model/models/outbound-status.d.ts +28 -0
- package/dist/types/api-model/models/package-dimensions.d.ts +43 -0
- package/dist/types/api-model/models/package-volume.d.ts +31 -0
- package/dist/types/api-model/models/package-weight.d.ts +31 -0
- package/dist/types/api-model/models/page-type.d.ts +22 -0
- package/dist/types/api-model/models/prep-details.d.ts +45 -0
- package/dist/types/api-model/models/prep-instruction.d.ts +31 -0
- package/dist/types/api-model/models/prep-owner.d.ts +21 -0
- package/dist/types/api-model/models/product-attribute.d.ts +30 -0
- package/dist/types/api-model/models/product-quantity.d.ts +50 -0
- package/dist/types/api-model/models/shipment-labels.d.ts +31 -0
- package/dist/types/api-model/models/shipment-listing.d.ts +31 -0
- package/dist/types/api-model/models/shipment-sortable-field.d.ts +21 -0
- package/dist/types/api-model/models/sku-eligibility.d.ts +39 -0
- package/dist/types/api-model/models/sku-ineligibility-reason.d.ts +30 -0
- package/dist/types/api-model/models/sku-quantities-visibility.d.ts +21 -0
- package/dist/types/api-model/models/sku-quantity.d.ts +37 -0
- package/dist/types/api-model/models/sort-order.d.ts +21 -0
- package/dist/types/api-model/models/tracking-details.d.ts +37 -0
- package/dist/types/api-model/models/transportation-details.d.ts +25 -0
- package/dist/types/api-model/models/volume-unit-of-measurement.d.ts +22 -0
- package/dist/types/api-model/models/weight-unit-of-measurement.d.ts +21 -0
- package/dist/types/client.d.ts +6 -0
- package/dist/types/index.d.ts +3 -0
- package/package.json +44 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Bizon
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# `amazon-warehousing-and-distribution-api-2024-05-09`
|
|
2
|
+
|
|
3
|
+
The Selling Partner API for Amazon Warehousing and Distribution (AWD) provides programmatic access to information about AWD shipments and inventory.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@sp-api-sdk/amazon-warehousing-and-distribution-api-2024-05-09)
|
|
6
|
+
[](https://github.com/xojs/xo)
|
|
7
|
+
|
|
8
|
+
## Documentation
|
|
9
|
+
|
|
10
|
+
Learn more about this Selling Partner API by visiting the [official documentation](https://developer-docs.amazon.com/sp-api/docs).
|
|
11
|
+
|
|
12
|
+
Also, see the [generated documentation](https://bizon.github.io/selling-partner-api-sdk/modules/_sp-api-sdk_amazon-warehousing-and-distribution-api-2024-05-09.html) for this API client.
|
|
13
|
+
|
|
14
|
+
## Installing
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
npm install @sp-api-sdk/amazon-warehousing-and-distribution-api-2024-05-09
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Getting Started
|
|
21
|
+
|
|
22
|
+
```javascript
|
|
23
|
+
import {SellingPartnerApiAuth} from '@sp-api-sdk/auth'
|
|
24
|
+
import {AmazonWarehousingAndDistributionApiClient} from '@sp-api-sdk/amazon-warehousing-and-distribution-api-2024-05-09'
|
|
25
|
+
|
|
26
|
+
const auth = new SellingPartnerApiAuth({
|
|
27
|
+
clientId: process.env.LWA_CLIENT_ID,
|
|
28
|
+
clientSecret: process.env.LWA_CLIENT_SECRET,
|
|
29
|
+
refreshToken: 'Atzr|…',
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
const client = new AmazonWarehousingAndDistributionApiClient({
|
|
33
|
+
auth,
|
|
34
|
+
region: 'eu',
|
|
35
|
+
})
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Rate Limiting
|
|
39
|
+
|
|
40
|
+
In order to retry rate limited requests (HTTP 429), you can configure the API client as such:
|
|
41
|
+
|
|
42
|
+
```javascript
|
|
43
|
+
const client = new AmazonWarehousingAndDistributionApiClient({
|
|
44
|
+
auth,
|
|
45
|
+
region: 'eu',
|
|
46
|
+
rateLimiting: {
|
|
47
|
+
retry: true,
|
|
48
|
+
// Optionally specify a callback that will be called on every retry.
|
|
49
|
+
onRetry: (retryInfo) => {
|
|
50
|
+
console.log(retryInfo)
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
})
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The rate limits used for each route are specified in the [API documentation](https://developer-docs.amazon.com/sp-api/docs).
|
|
57
|
+
|
|
58
|
+
## Logging
|
|
59
|
+
|
|
60
|
+
You can enable logging for both SP-API requests and responses by configuring the `logging.request` and `logging.response` properties.
|
|
61
|
+
|
|
62
|
+
```javascript
|
|
63
|
+
const client = new AmazonWarehousingAndDistributionApiClient({
|
|
64
|
+
auth,
|
|
65
|
+
region: 'eu',
|
|
66
|
+
logging: {
|
|
67
|
+
request: {
|
|
68
|
+
logger: console.debug
|
|
69
|
+
},
|
|
70
|
+
response: {
|
|
71
|
+
logger: console.debug
|
|
72
|
+
},
|
|
73
|
+
error: true,
|
|
74
|
+
},
|
|
75
|
+
})
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Specifying `true` will use the default options, specifying an object will allow you to override the default options.
|
|
79
|
+
This uses [axios-logger](https://github.com/hg-pyun/axios-logger) under the hood.
|
|
80
|
+
By default, if enabled, the `request` and `response` loggers will use `console.info` and the `error` logger will use `console.error`.
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
## License
|
|
84
|
+
|
|
85
|
+
MIT
|
|
86
|
+
|
|
87
|
+
## Miscellaneous
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
╚⊙ ⊙╝
|
|
91
|
+
╚═(███)═╝
|
|
92
|
+
╚═(███)═╝
|
|
93
|
+
╚═(███)═╝
|
|
94
|
+
╚═(███)═╝
|
|
95
|
+
╚═(███)═╝
|
|
96
|
+
╚═(███)═╝
|
|
97
|
+
```
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* The Selling Partner API for Amazon Warehousing and Distribution
|
|
6
|
+
* The Selling Partner API for Amazon Warehousing and Distribution (AWD) provides programmatic access to information about AWD shipments and inventory.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2024-05-09
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.ListInventoryDetailsEnum = exports.ListInventorySortOrderEnum = exports.ListInboundShipmentsShipmentStatusEnum = exports.ListInboundShipmentsSortOrderEnum = exports.ListInboundShipmentsSortByEnum = exports.GetInboundShipmentSkuQuantitiesEnum = exports.AwdApi = exports.AwdApiFactory = exports.AwdApiFp = exports.AwdApiAxiosParamCreator = void 0;
|
|
20
|
+
const axios_1 = __importDefault(require("axios"));
|
|
21
|
+
// Some imports not used depending on template conditions
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
const common_1 = require("../common");
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
const base_1 = require("../base");
|
|
26
|
+
/**
|
|
27
|
+
* AwdApi - axios parameter creator
|
|
28
|
+
* @export
|
|
29
|
+
*/
|
|
30
|
+
const AwdApiAxiosParamCreator = function (configuration) {
|
|
31
|
+
return {
|
|
32
|
+
/**
|
|
33
|
+
* Retrieves an AWD inbound shipment. **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, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api)
|
|
34
|
+
* @param {string} shipmentId ID for the shipment. A shipment contains the cases being inbounded.
|
|
35
|
+
* @param {GetInboundShipmentSkuQuantitiesEnum} [skuQuantities] If equal to `SHOW`, the response includes the shipment SKU quantity details. Defaults to `HIDE`, in which case the response does not contain SKU quantities
|
|
36
|
+
* @param {*} [options] Override http request option.
|
|
37
|
+
* @throws {RequiredError}
|
|
38
|
+
*/
|
|
39
|
+
getInboundShipment: async (shipmentId, skuQuantities, options = {}) => {
|
|
40
|
+
// verify required parameter 'shipmentId' is not null or undefined
|
|
41
|
+
(0, common_1.assertParamExists)('getInboundShipment', 'shipmentId', shipmentId);
|
|
42
|
+
const localVarPath = `/awd/2024-05-09/inboundShipments/{shipmentId}`
|
|
43
|
+
.replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
|
|
44
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
45
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
46
|
+
let baseOptions;
|
|
47
|
+
if (configuration) {
|
|
48
|
+
baseOptions = configuration.baseOptions;
|
|
49
|
+
}
|
|
50
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
51
|
+
const localVarHeaderParameter = {};
|
|
52
|
+
const localVarQueryParameter = {};
|
|
53
|
+
if (skuQuantities !== undefined) {
|
|
54
|
+
localVarQueryParameter['skuQuantities'] = skuQuantities;
|
|
55
|
+
}
|
|
56
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
57
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
58
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
59
|
+
return {
|
|
60
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
61
|
+
options: localVarRequestOptions,
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
/**
|
|
65
|
+
* Retrieves a summary of all the inbound AWD shipments associated with a merchant, with the ability to apply optional filters. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | 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, refer to [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).
|
|
66
|
+
* @param {ListInboundShipmentsSortByEnum} [sortBy] Field to sort results by. By default, the response will be sorted by UPDATED_AT.
|
|
67
|
+
* @param {ListInboundShipmentsSortOrderEnum} [sortOrder] Sort the response in ASCENDING or DESCENDING order. By default, the response will be sorted in DESCENDING order.
|
|
68
|
+
* @param {ListInboundShipmentsShipmentStatusEnum} [shipmentStatus] Filter by inbound shipment status.
|
|
69
|
+
* @param {string} [updatedAfter] List the inbound shipments that were updated after a certain time (inclusive). The date must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format.
|
|
70
|
+
* @param {string} [updatedBefore] List the inbound shipments that were updated before a certain time (inclusive). The date must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format.
|
|
71
|
+
* @param {number} [maxResults] Maximum number of results to return.
|
|
72
|
+
* @param {string} [nextToken] A token that is used to retrieve the next page of results. The response includes `nextToken` when the number of results exceeds the specified `maxResults` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
|
|
73
|
+
* @param {*} [options] Override http request option.
|
|
74
|
+
* @throws {RequiredError}
|
|
75
|
+
*/
|
|
76
|
+
listInboundShipments: async (sortBy, sortOrder, shipmentStatus, updatedAfter, updatedBefore, maxResults, nextToken, options = {}) => {
|
|
77
|
+
const localVarPath = `/awd/2024-05-09/inboundShipments`;
|
|
78
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
79
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
80
|
+
let baseOptions;
|
|
81
|
+
if (configuration) {
|
|
82
|
+
baseOptions = configuration.baseOptions;
|
|
83
|
+
}
|
|
84
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
85
|
+
const localVarHeaderParameter = {};
|
|
86
|
+
const localVarQueryParameter = {};
|
|
87
|
+
if (sortBy !== undefined) {
|
|
88
|
+
localVarQueryParameter['sortBy'] = sortBy;
|
|
89
|
+
}
|
|
90
|
+
if (sortOrder !== undefined) {
|
|
91
|
+
localVarQueryParameter['sortOrder'] = sortOrder;
|
|
92
|
+
}
|
|
93
|
+
if (shipmentStatus !== undefined) {
|
|
94
|
+
localVarQueryParameter['shipmentStatus'] = shipmentStatus;
|
|
95
|
+
}
|
|
96
|
+
if (updatedAfter !== undefined) {
|
|
97
|
+
localVarQueryParameter['updatedAfter'] = (updatedAfter instanceof Date) ?
|
|
98
|
+
updatedAfter.toISOString() :
|
|
99
|
+
updatedAfter;
|
|
100
|
+
}
|
|
101
|
+
if (updatedBefore !== undefined) {
|
|
102
|
+
localVarQueryParameter['updatedBefore'] = (updatedBefore instanceof Date) ?
|
|
103
|
+
updatedBefore.toISOString() :
|
|
104
|
+
updatedBefore;
|
|
105
|
+
}
|
|
106
|
+
if (maxResults !== undefined) {
|
|
107
|
+
localVarQueryParameter['maxResults'] = maxResults;
|
|
108
|
+
}
|
|
109
|
+
if (nextToken !== undefined) {
|
|
110
|
+
localVarQueryParameter['nextToken'] = nextToken;
|
|
111
|
+
}
|
|
112
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
113
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
114
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
115
|
+
return {
|
|
116
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
117
|
+
options: localVarRequestOptions,
|
|
118
|
+
};
|
|
119
|
+
},
|
|
120
|
+
/**
|
|
121
|
+
* Lists AWD inventory associated with a merchant with the ability to apply optional filters. **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, refer to [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).
|
|
122
|
+
* @param {string} [sku] Filter by seller or merchant SKU for the item.
|
|
123
|
+
* @param {ListInventorySortOrderEnum} [sortOrder] Sort the response in `ASCENDING` or `DESCENDING` order.
|
|
124
|
+
* @param {ListInventoryDetailsEnum} [details] Set to `SHOW` to return summaries with additional inventory details. Defaults to `HIDE,` which returns only inventory summary totals.
|
|
125
|
+
* @param {string} [nextToken] A token that is used to retrieve the next page of results. The response includes `nextToken` when the number of results exceeds the specified `maxResults` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
|
|
126
|
+
* @param {number} [maxResults] Maximum number of results to return.
|
|
127
|
+
* @param {*} [options] Override http request option.
|
|
128
|
+
* @throws {RequiredError}
|
|
129
|
+
*/
|
|
130
|
+
listInventory: async (sku, sortOrder, details, nextToken, maxResults, options = {}) => {
|
|
131
|
+
const localVarPath = `/awd/2024-05-09/inventory`;
|
|
132
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
133
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
134
|
+
let baseOptions;
|
|
135
|
+
if (configuration) {
|
|
136
|
+
baseOptions = configuration.baseOptions;
|
|
137
|
+
}
|
|
138
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
139
|
+
const localVarHeaderParameter = {};
|
|
140
|
+
const localVarQueryParameter = {};
|
|
141
|
+
if (sku !== undefined) {
|
|
142
|
+
localVarQueryParameter['sku'] = sku;
|
|
143
|
+
}
|
|
144
|
+
if (sortOrder !== undefined) {
|
|
145
|
+
localVarQueryParameter['sortOrder'] = sortOrder;
|
|
146
|
+
}
|
|
147
|
+
if (details !== undefined) {
|
|
148
|
+
localVarQueryParameter['details'] = details;
|
|
149
|
+
}
|
|
150
|
+
if (nextToken !== undefined) {
|
|
151
|
+
localVarQueryParameter['nextToken'] = nextToken;
|
|
152
|
+
}
|
|
153
|
+
if (maxResults !== undefined) {
|
|
154
|
+
localVarQueryParameter['maxResults'] = maxResults;
|
|
155
|
+
}
|
|
156
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
157
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
158
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
159
|
+
return {
|
|
160
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
161
|
+
options: localVarRequestOptions,
|
|
162
|
+
};
|
|
163
|
+
},
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
exports.AwdApiAxiosParamCreator = AwdApiAxiosParamCreator;
|
|
167
|
+
/**
|
|
168
|
+
* AwdApi - functional programming interface
|
|
169
|
+
* @export
|
|
170
|
+
*/
|
|
171
|
+
const AwdApiFp = function (configuration) {
|
|
172
|
+
const localVarAxiosParamCreator = (0, exports.AwdApiAxiosParamCreator)(configuration);
|
|
173
|
+
return {
|
|
174
|
+
/**
|
|
175
|
+
* Retrieves an AWD inbound shipment. **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, refer to [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)
|
|
176
|
+
* @param {string} shipmentId ID for the shipment. A shipment contains the cases being inbounded.
|
|
177
|
+
* @param {GetInboundShipmentSkuQuantitiesEnum} [skuQuantities] If equal to `SHOW`, the response includes the shipment SKU quantity details. Defaults to `HIDE`, in which case the response does not contain SKU quantities
|
|
178
|
+
* @param {*} [options] Override http request option.
|
|
179
|
+
* @throws {RequiredError}
|
|
180
|
+
*/
|
|
181
|
+
async getInboundShipment(shipmentId, skuQuantities, options) {
|
|
182
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getInboundShipment(shipmentId, skuQuantities, options);
|
|
183
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
184
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['AwdApi.getInboundShipment']?.[localVarOperationServerIndex]?.url;
|
|
185
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
186
|
+
},
|
|
187
|
+
/**
|
|
188
|
+
* Retrieves a summary of all the inbound AWD shipments associated with a merchant, with the ability to apply optional filters. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | 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, refer to [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).
|
|
189
|
+
* @param {ListInboundShipmentsSortByEnum} [sortBy] Field to sort results by. By default, the response will be sorted by UPDATED_AT.
|
|
190
|
+
* @param {ListInboundShipmentsSortOrderEnum} [sortOrder] Sort the response in ASCENDING or DESCENDING order. By default, the response will be sorted in DESCENDING order.
|
|
191
|
+
* @param {ListInboundShipmentsShipmentStatusEnum} [shipmentStatus] Filter by inbound shipment status.
|
|
192
|
+
* @param {string} [updatedAfter] List the inbound shipments that were updated after a certain time (inclusive). The date must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format.
|
|
193
|
+
* @param {string} [updatedBefore] List the inbound shipments that were updated before a certain time (inclusive). The date must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format.
|
|
194
|
+
* @param {number} [maxResults] Maximum number of results to return.
|
|
195
|
+
* @param {string} [nextToken] A token that is used to retrieve the next page of results. The response includes `nextToken` when the number of results exceeds the specified `maxResults` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
|
|
196
|
+
* @param {*} [options] Override http request option.
|
|
197
|
+
* @throws {RequiredError}
|
|
198
|
+
*/
|
|
199
|
+
async listInboundShipments(sortBy, sortOrder, shipmentStatus, updatedAfter, updatedBefore, maxResults, nextToken, options) {
|
|
200
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listInboundShipments(sortBy, sortOrder, shipmentStatus, updatedAfter, updatedBefore, maxResults, nextToken, options);
|
|
201
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
202
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['AwdApi.listInboundShipments']?.[localVarOperationServerIndex]?.url;
|
|
203
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
204
|
+
},
|
|
205
|
+
/**
|
|
206
|
+
* Lists AWD inventory associated with a merchant with the ability to apply optional filters. **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, refer to [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).
|
|
207
|
+
* @param {string} [sku] Filter by seller or merchant SKU for the item.
|
|
208
|
+
* @param {ListInventorySortOrderEnum} [sortOrder] Sort the response in `ASCENDING` or `DESCENDING` order.
|
|
209
|
+
* @param {ListInventoryDetailsEnum} [details] Set to `SHOW` to return summaries with additional inventory details. Defaults to `HIDE,` which returns only inventory summary totals.
|
|
210
|
+
* @param {string} [nextToken] A token that is used to retrieve the next page of results. The response includes `nextToken` when the number of results exceeds the specified `maxResults` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
|
|
211
|
+
* @param {number} [maxResults] Maximum number of results to return.
|
|
212
|
+
* @param {*} [options] Override http request option.
|
|
213
|
+
* @throws {RequiredError}
|
|
214
|
+
*/
|
|
215
|
+
async listInventory(sku, sortOrder, details, nextToken, maxResults, options) {
|
|
216
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listInventory(sku, sortOrder, details, nextToken, maxResults, options);
|
|
217
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
218
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['AwdApi.listInventory']?.[localVarOperationServerIndex]?.url;
|
|
219
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
220
|
+
},
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
exports.AwdApiFp = AwdApiFp;
|
|
224
|
+
/**
|
|
225
|
+
* AwdApi - factory interface
|
|
226
|
+
* @export
|
|
227
|
+
*/
|
|
228
|
+
const AwdApiFactory = function (configuration, basePath, axios) {
|
|
229
|
+
const localVarFp = (0, exports.AwdApiFp)(configuration);
|
|
230
|
+
return {
|
|
231
|
+
/**
|
|
232
|
+
* Retrieves an AWD inbound shipment. **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, refer to [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)
|
|
233
|
+
* @param {AwdApiGetInboundShipmentRequest} requestParameters Request parameters.
|
|
234
|
+
* @param {*} [options] Override http request option.
|
|
235
|
+
* @throws {RequiredError}
|
|
236
|
+
*/
|
|
237
|
+
getInboundShipment(requestParameters, options) {
|
|
238
|
+
return localVarFp.getInboundShipment(requestParameters.shipmentId, requestParameters.skuQuantities, options).then((request) => request(axios, basePath));
|
|
239
|
+
},
|
|
240
|
+
/**
|
|
241
|
+
* Retrieves a summary of all the inbound AWD shipments associated with a merchant, with the ability to apply optional filters. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | 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, refer to [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).
|
|
242
|
+
* @param {AwdApiListInboundShipmentsRequest} requestParameters Request parameters.
|
|
243
|
+
* @param {*} [options] Override http request option.
|
|
244
|
+
* @throws {RequiredError}
|
|
245
|
+
*/
|
|
246
|
+
listInboundShipments(requestParameters = {}, options) {
|
|
247
|
+
return localVarFp.listInboundShipments(requestParameters.sortBy, requestParameters.sortOrder, requestParameters.shipmentStatus, requestParameters.updatedAfter, requestParameters.updatedBefore, requestParameters.maxResults, requestParameters.nextToken, options).then((request) => request(axios, basePath));
|
|
248
|
+
},
|
|
249
|
+
/**
|
|
250
|
+
* Lists AWD inventory associated with a merchant with the ability to apply optional filters. **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, refer to [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).
|
|
251
|
+
* @param {AwdApiListInventoryRequest} requestParameters Request parameters.
|
|
252
|
+
* @param {*} [options] Override http request option.
|
|
253
|
+
* @throws {RequiredError}
|
|
254
|
+
*/
|
|
255
|
+
listInventory(requestParameters = {}, options) {
|
|
256
|
+
return localVarFp.listInventory(requestParameters.sku, requestParameters.sortOrder, requestParameters.details, requestParameters.nextToken, requestParameters.maxResults, options).then((request) => request(axios, basePath));
|
|
257
|
+
},
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
exports.AwdApiFactory = AwdApiFactory;
|
|
261
|
+
/**
|
|
262
|
+
* AwdApi - object-oriented interface
|
|
263
|
+
* @export
|
|
264
|
+
* @class AwdApi
|
|
265
|
+
* @extends {BaseAPI}
|
|
266
|
+
*/
|
|
267
|
+
class AwdApi extends base_1.BaseAPI {
|
|
268
|
+
/**
|
|
269
|
+
* Retrieves an AWD inbound shipment. **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, refer to [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)
|
|
270
|
+
* @param {AwdApiGetInboundShipmentRequest} requestParameters Request parameters.
|
|
271
|
+
* @param {*} [options] Override http request option.
|
|
272
|
+
* @throws {RequiredError}
|
|
273
|
+
* @memberof AwdApi
|
|
274
|
+
*/
|
|
275
|
+
getInboundShipment(requestParameters, options) {
|
|
276
|
+
return (0, exports.AwdApiFp)(this.configuration).getInboundShipment(requestParameters.shipmentId, requestParameters.skuQuantities, options).then((request) => request(this.axios, this.basePath));
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Retrieves a summary of all the inbound AWD shipments associated with a merchant, with the ability to apply optional filters. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | 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, refer to [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).
|
|
280
|
+
* @param {AwdApiListInboundShipmentsRequest} requestParameters Request parameters.
|
|
281
|
+
* @param {*} [options] Override http request option.
|
|
282
|
+
* @throws {RequiredError}
|
|
283
|
+
* @memberof AwdApi
|
|
284
|
+
*/
|
|
285
|
+
listInboundShipments(requestParameters = {}, options) {
|
|
286
|
+
return (0, exports.AwdApiFp)(this.configuration).listInboundShipments(requestParameters.sortBy, requestParameters.sortOrder, requestParameters.shipmentStatus, requestParameters.updatedAfter, requestParameters.updatedBefore, requestParameters.maxResults, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Lists AWD inventory associated with a merchant with the ability to apply optional filters. **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, refer to [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).
|
|
290
|
+
* @param {AwdApiListInventoryRequest} requestParameters Request parameters.
|
|
291
|
+
* @param {*} [options] Override http request option.
|
|
292
|
+
* @throws {RequiredError}
|
|
293
|
+
* @memberof AwdApi
|
|
294
|
+
*/
|
|
295
|
+
listInventory(requestParameters = {}, options) {
|
|
296
|
+
return (0, exports.AwdApiFp)(this.configuration).listInventory(requestParameters.sku, requestParameters.sortOrder, requestParameters.details, requestParameters.nextToken, requestParameters.maxResults, options).then((request) => request(this.axios, this.basePath));
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
exports.AwdApi = AwdApi;
|
|
300
|
+
/**
|
|
301
|
+
* @export
|
|
302
|
+
*/
|
|
303
|
+
exports.GetInboundShipmentSkuQuantitiesEnum = {
|
|
304
|
+
Show: 'SHOW',
|
|
305
|
+
Hide: 'HIDE'
|
|
306
|
+
};
|
|
307
|
+
/**
|
|
308
|
+
* @export
|
|
309
|
+
*/
|
|
310
|
+
exports.ListInboundShipmentsSortByEnum = {
|
|
311
|
+
UpdatedAt: 'UPDATED_AT',
|
|
312
|
+
CreatedAt: 'CREATED_AT'
|
|
313
|
+
};
|
|
314
|
+
/**
|
|
315
|
+
* @export
|
|
316
|
+
*/
|
|
317
|
+
exports.ListInboundShipmentsSortOrderEnum = {
|
|
318
|
+
Ascending: 'ASCENDING',
|
|
319
|
+
Descending: 'DESCENDING'
|
|
320
|
+
};
|
|
321
|
+
/**
|
|
322
|
+
* @export
|
|
323
|
+
*/
|
|
324
|
+
exports.ListInboundShipmentsShipmentStatusEnum = {
|
|
325
|
+
Created: 'CREATED',
|
|
326
|
+
Shipped: 'SHIPPED',
|
|
327
|
+
InTransit: 'IN_TRANSIT',
|
|
328
|
+
Receiving: 'RECEIVING',
|
|
329
|
+
Delivered: 'DELIVERED',
|
|
330
|
+
Closed: 'CLOSED',
|
|
331
|
+
Cancelled: 'CANCELLED'
|
|
332
|
+
};
|
|
333
|
+
/**
|
|
334
|
+
* @export
|
|
335
|
+
*/
|
|
336
|
+
exports.ListInventorySortOrderEnum = {
|
|
337
|
+
Ascending: 'ASCENDING',
|
|
338
|
+
Descending: 'DESCENDING'
|
|
339
|
+
};
|
|
340
|
+
/**
|
|
341
|
+
* @export
|
|
342
|
+
*/
|
|
343
|
+
exports.ListInventoryDetailsEnum = {
|
|
344
|
+
Show: 'SHOW',
|
|
345
|
+
Hide: 'HIDE'
|
|
346
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* The Selling Partner API for Amazon Warehousing and Distribution
|
|
6
|
+
* The Selling Partner API for Amazon Warehousing and Distribution (AWD) provides programmatic access to information about AWD shipments and inventory.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2024-05-09
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
27
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
__exportStar(require("./api/awd-api"), exports);
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* The Selling Partner API for Amazon Warehousing and Distribution
|
|
6
|
+
* The Selling Partner API for Amazon Warehousing and Distribution (AWD) provides programmatic access to information about AWD shipments and inventory.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2024-05-09
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
20
|
+
const axios_1 = __importDefault(require("axios"));
|
|
21
|
+
exports.BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.COLLECTION_FORMATS = {
|
|
27
|
+
csv: ",",
|
|
28
|
+
ssv: " ",
|
|
29
|
+
tsv: "\t",
|
|
30
|
+
pipes: "|",
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @export
|
|
35
|
+
* @class BaseAPI
|
|
36
|
+
*/
|
|
37
|
+
class BaseAPI {
|
|
38
|
+
basePath;
|
|
39
|
+
axios;
|
|
40
|
+
configuration;
|
|
41
|
+
constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
|
|
42
|
+
this.basePath = basePath;
|
|
43
|
+
this.axios = axios;
|
|
44
|
+
if (configuration) {
|
|
45
|
+
this.configuration = configuration;
|
|
46
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.BaseAPI = BaseAPI;
|
|
51
|
+
;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @export
|
|
55
|
+
* @class RequiredError
|
|
56
|
+
* @extends {Error}
|
|
57
|
+
*/
|
|
58
|
+
class RequiredError extends Error {
|
|
59
|
+
field;
|
|
60
|
+
constructor(field, msg) {
|
|
61
|
+
super(msg);
|
|
62
|
+
this.field = field;
|
|
63
|
+
this.name = "RequiredError";
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.RequiredError = RequiredError;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @export
|
|
70
|
+
*/
|
|
71
|
+
exports.operationServerMap = {};
|