@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
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* The Selling Partner API for Amazon Warehousing and Distribution
|
|
5
|
+
* The Selling Partner API for Amazon Warehousing and Distribution (AWD) provides programmatic access to information about AWD shipments and inventory.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2024-05-09
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import globalAxios from 'axios';
|
|
15
|
+
// Some imports not used depending on template conditions
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from '../common';
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
import { BASE_PATH, BaseAPI, operationServerMap } from '../base';
|
|
20
|
+
/**
|
|
21
|
+
* AwdApi - axios parameter creator
|
|
22
|
+
* @export
|
|
23
|
+
*/
|
|
24
|
+
export const AwdApiAxiosParamCreator = function (configuration) {
|
|
25
|
+
return {
|
|
26
|
+
/**
|
|
27
|
+
* 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)
|
|
28
|
+
* @param {string} shipmentId ID for the shipment. A shipment contains the cases being inbounded.
|
|
29
|
+
* @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
|
|
30
|
+
* @param {*} [options] Override http request option.
|
|
31
|
+
* @throws {RequiredError}
|
|
32
|
+
*/
|
|
33
|
+
getInboundShipment: async (shipmentId, skuQuantities, options = {}) => {
|
|
34
|
+
// verify required parameter 'shipmentId' is not null or undefined
|
|
35
|
+
assertParamExists('getInboundShipment', 'shipmentId', shipmentId);
|
|
36
|
+
const localVarPath = `/awd/2024-05-09/inboundShipments/{shipmentId}`
|
|
37
|
+
.replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
|
|
38
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
39
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
40
|
+
let baseOptions;
|
|
41
|
+
if (configuration) {
|
|
42
|
+
baseOptions = configuration.baseOptions;
|
|
43
|
+
}
|
|
44
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
45
|
+
const localVarHeaderParameter = {};
|
|
46
|
+
const localVarQueryParameter = {};
|
|
47
|
+
if (skuQuantities !== undefined) {
|
|
48
|
+
localVarQueryParameter['skuQuantities'] = skuQuantities;
|
|
49
|
+
}
|
|
50
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
51
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
52
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
53
|
+
return {
|
|
54
|
+
url: toPathString(localVarUrlObj),
|
|
55
|
+
options: localVarRequestOptions,
|
|
56
|
+
};
|
|
57
|
+
},
|
|
58
|
+
/**
|
|
59
|
+
* 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).
|
|
60
|
+
* @param {ListInboundShipmentsSortByEnum} [sortBy] Field to sort results by. By default, the response will be sorted by UPDATED_AT.
|
|
61
|
+
* @param {ListInboundShipmentsSortOrderEnum} [sortOrder] Sort the response in ASCENDING or DESCENDING order. By default, the response will be sorted in DESCENDING order.
|
|
62
|
+
* @param {ListInboundShipmentsShipmentStatusEnum} [shipmentStatus] Filter by inbound shipment status.
|
|
63
|
+
* @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.
|
|
64
|
+
* @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.
|
|
65
|
+
* @param {number} [maxResults] Maximum number of results to return.
|
|
66
|
+
* @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.
|
|
67
|
+
* @param {*} [options] Override http request option.
|
|
68
|
+
* @throws {RequiredError}
|
|
69
|
+
*/
|
|
70
|
+
listInboundShipments: async (sortBy, sortOrder, shipmentStatus, updatedAfter, updatedBefore, maxResults, nextToken, options = {}) => {
|
|
71
|
+
const localVarPath = `/awd/2024-05-09/inboundShipments`;
|
|
72
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
73
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
74
|
+
let baseOptions;
|
|
75
|
+
if (configuration) {
|
|
76
|
+
baseOptions = configuration.baseOptions;
|
|
77
|
+
}
|
|
78
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
79
|
+
const localVarHeaderParameter = {};
|
|
80
|
+
const localVarQueryParameter = {};
|
|
81
|
+
if (sortBy !== undefined) {
|
|
82
|
+
localVarQueryParameter['sortBy'] = sortBy;
|
|
83
|
+
}
|
|
84
|
+
if (sortOrder !== undefined) {
|
|
85
|
+
localVarQueryParameter['sortOrder'] = sortOrder;
|
|
86
|
+
}
|
|
87
|
+
if (shipmentStatus !== undefined) {
|
|
88
|
+
localVarQueryParameter['shipmentStatus'] = shipmentStatus;
|
|
89
|
+
}
|
|
90
|
+
if (updatedAfter !== undefined) {
|
|
91
|
+
localVarQueryParameter['updatedAfter'] = (updatedAfter instanceof Date) ?
|
|
92
|
+
updatedAfter.toISOString() :
|
|
93
|
+
updatedAfter;
|
|
94
|
+
}
|
|
95
|
+
if (updatedBefore !== undefined) {
|
|
96
|
+
localVarQueryParameter['updatedBefore'] = (updatedBefore instanceof Date) ?
|
|
97
|
+
updatedBefore.toISOString() :
|
|
98
|
+
updatedBefore;
|
|
99
|
+
}
|
|
100
|
+
if (maxResults !== undefined) {
|
|
101
|
+
localVarQueryParameter['maxResults'] = maxResults;
|
|
102
|
+
}
|
|
103
|
+
if (nextToken !== undefined) {
|
|
104
|
+
localVarQueryParameter['nextToken'] = nextToken;
|
|
105
|
+
}
|
|
106
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
107
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
108
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
109
|
+
return {
|
|
110
|
+
url: toPathString(localVarUrlObj),
|
|
111
|
+
options: localVarRequestOptions,
|
|
112
|
+
};
|
|
113
|
+
},
|
|
114
|
+
/**
|
|
115
|
+
* 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).
|
|
116
|
+
* @param {string} [sku] Filter by seller or merchant SKU for the item.
|
|
117
|
+
* @param {ListInventorySortOrderEnum} [sortOrder] Sort the response in `ASCENDING` or `DESCENDING` order.
|
|
118
|
+
* @param {ListInventoryDetailsEnum} [details] Set to `SHOW` to return summaries with additional inventory details. Defaults to `HIDE,` which returns only inventory summary totals.
|
|
119
|
+
* @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.
|
|
120
|
+
* @param {number} [maxResults] Maximum number of results to return.
|
|
121
|
+
* @param {*} [options] Override http request option.
|
|
122
|
+
* @throws {RequiredError}
|
|
123
|
+
*/
|
|
124
|
+
listInventory: async (sku, sortOrder, details, nextToken, maxResults, options = {}) => {
|
|
125
|
+
const localVarPath = `/awd/2024-05-09/inventory`;
|
|
126
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
127
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
128
|
+
let baseOptions;
|
|
129
|
+
if (configuration) {
|
|
130
|
+
baseOptions = configuration.baseOptions;
|
|
131
|
+
}
|
|
132
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
133
|
+
const localVarHeaderParameter = {};
|
|
134
|
+
const localVarQueryParameter = {};
|
|
135
|
+
if (sku !== undefined) {
|
|
136
|
+
localVarQueryParameter['sku'] = sku;
|
|
137
|
+
}
|
|
138
|
+
if (sortOrder !== undefined) {
|
|
139
|
+
localVarQueryParameter['sortOrder'] = sortOrder;
|
|
140
|
+
}
|
|
141
|
+
if (details !== undefined) {
|
|
142
|
+
localVarQueryParameter['details'] = details;
|
|
143
|
+
}
|
|
144
|
+
if (nextToken !== undefined) {
|
|
145
|
+
localVarQueryParameter['nextToken'] = nextToken;
|
|
146
|
+
}
|
|
147
|
+
if (maxResults !== undefined) {
|
|
148
|
+
localVarQueryParameter['maxResults'] = maxResults;
|
|
149
|
+
}
|
|
150
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
151
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
152
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
153
|
+
return {
|
|
154
|
+
url: toPathString(localVarUrlObj),
|
|
155
|
+
options: localVarRequestOptions,
|
|
156
|
+
};
|
|
157
|
+
},
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* AwdApi - functional programming interface
|
|
162
|
+
* @export
|
|
163
|
+
*/
|
|
164
|
+
export const AwdApiFp = function (configuration) {
|
|
165
|
+
const localVarAxiosParamCreator = AwdApiAxiosParamCreator(configuration);
|
|
166
|
+
return {
|
|
167
|
+
/**
|
|
168
|
+
* 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)
|
|
169
|
+
* @param {string} shipmentId ID for the shipment. A shipment contains the cases being inbounded.
|
|
170
|
+
* @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
|
|
171
|
+
* @param {*} [options] Override http request option.
|
|
172
|
+
* @throws {RequiredError}
|
|
173
|
+
*/
|
|
174
|
+
async getInboundShipment(shipmentId, skuQuantities, options) {
|
|
175
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getInboundShipment(shipmentId, skuQuantities, options);
|
|
176
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
177
|
+
const localVarOperationServerBasePath = operationServerMap['AwdApi.getInboundShipment']?.[localVarOperationServerIndex]?.url;
|
|
178
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
179
|
+
},
|
|
180
|
+
/**
|
|
181
|
+
* 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).
|
|
182
|
+
* @param {ListInboundShipmentsSortByEnum} [sortBy] Field to sort results by. By default, the response will be sorted by UPDATED_AT.
|
|
183
|
+
* @param {ListInboundShipmentsSortOrderEnum} [sortOrder] Sort the response in ASCENDING or DESCENDING order. By default, the response will be sorted in DESCENDING order.
|
|
184
|
+
* @param {ListInboundShipmentsShipmentStatusEnum} [shipmentStatus] Filter by inbound shipment status.
|
|
185
|
+
* @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.
|
|
186
|
+
* @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.
|
|
187
|
+
* @param {number} [maxResults] Maximum number of results to return.
|
|
188
|
+
* @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.
|
|
189
|
+
* @param {*} [options] Override http request option.
|
|
190
|
+
* @throws {RequiredError}
|
|
191
|
+
*/
|
|
192
|
+
async listInboundShipments(sortBy, sortOrder, shipmentStatus, updatedAfter, updatedBefore, maxResults, nextToken, options) {
|
|
193
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listInboundShipments(sortBy, sortOrder, shipmentStatus, updatedAfter, updatedBefore, maxResults, nextToken, options);
|
|
194
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
195
|
+
const localVarOperationServerBasePath = operationServerMap['AwdApi.listInboundShipments']?.[localVarOperationServerIndex]?.url;
|
|
196
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
197
|
+
},
|
|
198
|
+
/**
|
|
199
|
+
* 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).
|
|
200
|
+
* @param {string} [sku] Filter by seller or merchant SKU for the item.
|
|
201
|
+
* @param {ListInventorySortOrderEnum} [sortOrder] Sort the response in `ASCENDING` or `DESCENDING` order.
|
|
202
|
+
* @param {ListInventoryDetailsEnum} [details] Set to `SHOW` to return summaries with additional inventory details. Defaults to `HIDE,` which returns only inventory summary totals.
|
|
203
|
+
* @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.
|
|
204
|
+
* @param {number} [maxResults] Maximum number of results to return.
|
|
205
|
+
* @param {*} [options] Override http request option.
|
|
206
|
+
* @throws {RequiredError}
|
|
207
|
+
*/
|
|
208
|
+
async listInventory(sku, sortOrder, details, nextToken, maxResults, options) {
|
|
209
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listInventory(sku, sortOrder, details, nextToken, maxResults, options);
|
|
210
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
211
|
+
const localVarOperationServerBasePath = operationServerMap['AwdApi.listInventory']?.[localVarOperationServerIndex]?.url;
|
|
212
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
213
|
+
},
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* AwdApi - factory interface
|
|
218
|
+
* @export
|
|
219
|
+
*/
|
|
220
|
+
export const AwdApiFactory = function (configuration, basePath, axios) {
|
|
221
|
+
const localVarFp = AwdApiFp(configuration);
|
|
222
|
+
return {
|
|
223
|
+
/**
|
|
224
|
+
* 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)
|
|
225
|
+
* @param {AwdApiGetInboundShipmentRequest} requestParameters Request parameters.
|
|
226
|
+
* @param {*} [options] Override http request option.
|
|
227
|
+
* @throws {RequiredError}
|
|
228
|
+
*/
|
|
229
|
+
getInboundShipment(requestParameters, options) {
|
|
230
|
+
return localVarFp.getInboundShipment(requestParameters.shipmentId, requestParameters.skuQuantities, options).then((request) => request(axios, basePath));
|
|
231
|
+
},
|
|
232
|
+
/**
|
|
233
|
+
* 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).
|
|
234
|
+
* @param {AwdApiListInboundShipmentsRequest} requestParameters Request parameters.
|
|
235
|
+
* @param {*} [options] Override http request option.
|
|
236
|
+
* @throws {RequiredError}
|
|
237
|
+
*/
|
|
238
|
+
listInboundShipments(requestParameters = {}, options) {
|
|
239
|
+
return localVarFp.listInboundShipments(requestParameters.sortBy, requestParameters.sortOrder, requestParameters.shipmentStatus, requestParameters.updatedAfter, requestParameters.updatedBefore, requestParameters.maxResults, requestParameters.nextToken, options).then((request) => request(axios, basePath));
|
|
240
|
+
},
|
|
241
|
+
/**
|
|
242
|
+
* 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).
|
|
243
|
+
* @param {AwdApiListInventoryRequest} requestParameters Request parameters.
|
|
244
|
+
* @param {*} [options] Override http request option.
|
|
245
|
+
* @throws {RequiredError}
|
|
246
|
+
*/
|
|
247
|
+
listInventory(requestParameters = {}, options) {
|
|
248
|
+
return localVarFp.listInventory(requestParameters.sku, requestParameters.sortOrder, requestParameters.details, requestParameters.nextToken, requestParameters.maxResults, options).then((request) => request(axios, basePath));
|
|
249
|
+
},
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* AwdApi - object-oriented interface
|
|
254
|
+
* @export
|
|
255
|
+
* @class AwdApi
|
|
256
|
+
* @extends {BaseAPI}
|
|
257
|
+
*/
|
|
258
|
+
export class AwdApi extends BaseAPI {
|
|
259
|
+
/**
|
|
260
|
+
* 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)
|
|
261
|
+
* @param {AwdApiGetInboundShipmentRequest} requestParameters Request parameters.
|
|
262
|
+
* @param {*} [options] Override http request option.
|
|
263
|
+
* @throws {RequiredError}
|
|
264
|
+
* @memberof AwdApi
|
|
265
|
+
*/
|
|
266
|
+
getInboundShipment(requestParameters, options) {
|
|
267
|
+
return AwdApiFp(this.configuration).getInboundShipment(requestParameters.shipmentId, requestParameters.skuQuantities, options).then((request) => request(this.axios, this.basePath));
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* 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).
|
|
271
|
+
* @param {AwdApiListInboundShipmentsRequest} requestParameters Request parameters.
|
|
272
|
+
* @param {*} [options] Override http request option.
|
|
273
|
+
* @throws {RequiredError}
|
|
274
|
+
* @memberof AwdApi
|
|
275
|
+
*/
|
|
276
|
+
listInboundShipments(requestParameters = {}, options) {
|
|
277
|
+
return 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));
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* 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).
|
|
281
|
+
* @param {AwdApiListInventoryRequest} requestParameters Request parameters.
|
|
282
|
+
* @param {*} [options] Override http request option.
|
|
283
|
+
* @throws {RequiredError}
|
|
284
|
+
* @memberof AwdApi
|
|
285
|
+
*/
|
|
286
|
+
listInventory(requestParameters = {}, options) {
|
|
287
|
+
return AwdApiFp(this.configuration).listInventory(requestParameters.sku, requestParameters.sortOrder, requestParameters.details, requestParameters.nextToken, requestParameters.maxResults, options).then((request) => request(this.axios, this.basePath));
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* @export
|
|
292
|
+
*/
|
|
293
|
+
export const GetInboundShipmentSkuQuantitiesEnum = {
|
|
294
|
+
Show: 'SHOW',
|
|
295
|
+
Hide: 'HIDE'
|
|
296
|
+
};
|
|
297
|
+
/**
|
|
298
|
+
* @export
|
|
299
|
+
*/
|
|
300
|
+
export const ListInboundShipmentsSortByEnum = {
|
|
301
|
+
UpdatedAt: 'UPDATED_AT',
|
|
302
|
+
CreatedAt: 'CREATED_AT'
|
|
303
|
+
};
|
|
304
|
+
/**
|
|
305
|
+
* @export
|
|
306
|
+
*/
|
|
307
|
+
export const ListInboundShipmentsSortOrderEnum = {
|
|
308
|
+
Ascending: 'ASCENDING',
|
|
309
|
+
Descending: 'DESCENDING'
|
|
310
|
+
};
|
|
311
|
+
/**
|
|
312
|
+
* @export
|
|
313
|
+
*/
|
|
314
|
+
export const ListInboundShipmentsShipmentStatusEnum = {
|
|
315
|
+
Created: 'CREATED',
|
|
316
|
+
Shipped: 'SHIPPED',
|
|
317
|
+
InTransit: 'IN_TRANSIT',
|
|
318
|
+
Receiving: 'RECEIVING',
|
|
319
|
+
Delivered: 'DELIVERED',
|
|
320
|
+
Closed: 'CLOSED',
|
|
321
|
+
Cancelled: 'CANCELLED'
|
|
322
|
+
};
|
|
323
|
+
/**
|
|
324
|
+
* @export
|
|
325
|
+
*/
|
|
326
|
+
export const ListInventorySortOrderEnum = {
|
|
327
|
+
Ascending: 'ASCENDING',
|
|
328
|
+
Descending: 'DESCENDING'
|
|
329
|
+
};
|
|
330
|
+
/**
|
|
331
|
+
* @export
|
|
332
|
+
*/
|
|
333
|
+
export const ListInventoryDetailsEnum = {
|
|
334
|
+
Show: 'SHOW',
|
|
335
|
+
Hide: 'HIDE'
|
|
336
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* The Selling Partner API for Amazon Warehousing and Distribution
|
|
5
|
+
* The Selling Partner API for Amazon Warehousing and Distribution (AWD) provides programmatic access to information about AWD shipments and inventory.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2024-05-09
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
export * from './api/awd-api';
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* The Selling Partner API for Amazon Warehousing and Distribution
|
|
5
|
+
* The Selling Partner API for Amazon Warehousing and Distribution (AWD) provides programmatic access to information about AWD shipments and inventory.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2024-05-09
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import globalAxios from 'axios';
|
|
15
|
+
export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const COLLECTION_FORMATS = {
|
|
21
|
+
csv: ",",
|
|
22
|
+
ssv: " ",
|
|
23
|
+
tsv: "\t",
|
|
24
|
+
pipes: "|",
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @export
|
|
29
|
+
* @class BaseAPI
|
|
30
|
+
*/
|
|
31
|
+
export class BaseAPI {
|
|
32
|
+
basePath;
|
|
33
|
+
axios;
|
|
34
|
+
configuration;
|
|
35
|
+
constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
|
|
36
|
+
this.basePath = basePath;
|
|
37
|
+
this.axios = axios;
|
|
38
|
+
if (configuration) {
|
|
39
|
+
this.configuration = configuration;
|
|
40
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @export
|
|
48
|
+
* @class RequiredError
|
|
49
|
+
* @extends {Error}
|
|
50
|
+
*/
|
|
51
|
+
export class RequiredError extends Error {
|
|
52
|
+
field;
|
|
53
|
+
constructor(field, msg) {
|
|
54
|
+
super(msg);
|
|
55
|
+
this.field = field;
|
|
56
|
+
this.name = "RequiredError";
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @export
|
|
62
|
+
*/
|
|
63
|
+
export const operationServerMap = {};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* The Selling Partner API for Amazon Warehousing and Distribution
|
|
5
|
+
* The Selling Partner API for Amazon Warehousing and Distribution (AWD) provides programmatic access to information about AWD shipments and inventory.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2024-05-09
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { RequiredError } from "./base";
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export const DUMMY_BASE_URL = 'https://example.com';
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @throws {RequiredError}
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
export const assertParamExists = function (functionName, paramName, paramValue) {
|
|
26
|
+
if (paramValue === null || paramValue === undefined) {
|
|
27
|
+
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @export
|
|
33
|
+
*/
|
|
34
|
+
export const setApiKeyToObject = async function (object, keyParamName, configuration) {
|
|
35
|
+
if (configuration && configuration.apiKey) {
|
|
36
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
37
|
+
? await configuration.apiKey(keyParamName)
|
|
38
|
+
: await configuration.apiKey;
|
|
39
|
+
object[keyParamName] = localVarApiKeyValue;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @export
|
|
45
|
+
*/
|
|
46
|
+
export const setBasicAuthToObject = function (object, configuration) {
|
|
47
|
+
if (configuration && (configuration.username || configuration.password)) {
|
|
48
|
+
object["auth"] = { username: configuration.username, password: configuration.password };
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @export
|
|
54
|
+
*/
|
|
55
|
+
export const setBearerAuthToObject = async function (object, configuration) {
|
|
56
|
+
if (configuration && configuration.accessToken) {
|
|
57
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
58
|
+
? await configuration.accessToken()
|
|
59
|
+
: await configuration.accessToken;
|
|
60
|
+
object["Authorization"] = "Bearer " + accessToken;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* @export
|
|
66
|
+
*/
|
|
67
|
+
export const setOAuthToObject = async function (object, name, scopes, configuration) {
|
|
68
|
+
if (configuration && configuration.accessToken) {
|
|
69
|
+
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
70
|
+
? await configuration.accessToken(name, scopes)
|
|
71
|
+
: await configuration.accessToken;
|
|
72
|
+
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
76
|
+
if (parameter == null)
|
|
77
|
+
return;
|
|
78
|
+
if (typeof parameter === "object") {
|
|
79
|
+
if (Array.isArray(parameter)) {
|
|
80
|
+
parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
if (urlSearchParams.has(key)) {
|
|
88
|
+
urlSearchParams.append(key, parameter);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
urlSearchParams.set(key, parameter);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
*
|
|
97
|
+
* @export
|
|
98
|
+
*/
|
|
99
|
+
export const setSearchParams = function (url, ...objects) {
|
|
100
|
+
const searchParams = new URLSearchParams(url.search);
|
|
101
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
102
|
+
url.search = searchParams.toString();
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
* @export
|
|
107
|
+
*/
|
|
108
|
+
export const serializeDataIfNeeded = function (value, requestOptions, configuration) {
|
|
109
|
+
const nonString = typeof value !== 'string';
|
|
110
|
+
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
111
|
+
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
112
|
+
: nonString;
|
|
113
|
+
return needsSerialization
|
|
114
|
+
? JSON.stringify(value !== undefined ? value : {})
|
|
115
|
+
: (value || "");
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
*
|
|
119
|
+
* @export
|
|
120
|
+
*/
|
|
121
|
+
export const toPathString = function (url) {
|
|
122
|
+
return url.pathname + url.search + url.hash;
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
*
|
|
126
|
+
* @export
|
|
127
|
+
*/
|
|
128
|
+
export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
129
|
+
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
130
|
+
const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
|
|
131
|
+
return axios.request(axiosRequestArgs);
|
|
132
|
+
};
|
|
133
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* The Selling Partner API for Amazon Warehousing and Distribution
|
|
5
|
+
* The Selling Partner API for Amazon Warehousing and Distribution (AWD) provides programmatic access to information about AWD shipments and inventory.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2024-05-09
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
export class Configuration {
|
|
15
|
+
/**
|
|
16
|
+
* parameter for apiKey security
|
|
17
|
+
* @param name security name
|
|
18
|
+
* @memberof Configuration
|
|
19
|
+
*/
|
|
20
|
+
apiKey;
|
|
21
|
+
/**
|
|
22
|
+
* parameter for basic security
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof Configuration
|
|
26
|
+
*/
|
|
27
|
+
username;
|
|
28
|
+
/**
|
|
29
|
+
* parameter for basic security
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof Configuration
|
|
33
|
+
*/
|
|
34
|
+
password;
|
|
35
|
+
/**
|
|
36
|
+
* parameter for oauth2 security
|
|
37
|
+
* @param name security name
|
|
38
|
+
* @param scopes oauth2 scope
|
|
39
|
+
* @memberof Configuration
|
|
40
|
+
*/
|
|
41
|
+
accessToken;
|
|
42
|
+
/**
|
|
43
|
+
* override base path
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof Configuration
|
|
47
|
+
*/
|
|
48
|
+
basePath;
|
|
49
|
+
/**
|
|
50
|
+
* override server index
|
|
51
|
+
*
|
|
52
|
+
* @type {number}
|
|
53
|
+
* @memberof Configuration
|
|
54
|
+
*/
|
|
55
|
+
serverIndex;
|
|
56
|
+
/**
|
|
57
|
+
* base options for axios calls
|
|
58
|
+
*
|
|
59
|
+
* @type {any}
|
|
60
|
+
* @memberof Configuration
|
|
61
|
+
*/
|
|
62
|
+
baseOptions;
|
|
63
|
+
/**
|
|
64
|
+
* The FormData constructor that will be used to create multipart form data
|
|
65
|
+
* requests. You can inject this here so that execution environments that
|
|
66
|
+
* do not support the FormData class can still run the generated client.
|
|
67
|
+
*
|
|
68
|
+
* @type {new () => FormData}
|
|
69
|
+
*/
|
|
70
|
+
formDataCtor;
|
|
71
|
+
constructor(param = {}) {
|
|
72
|
+
this.apiKey = param.apiKey;
|
|
73
|
+
this.username = param.username;
|
|
74
|
+
this.password = param.password;
|
|
75
|
+
this.accessToken = param.accessToken;
|
|
76
|
+
this.basePath = param.basePath;
|
|
77
|
+
this.serverIndex = param.serverIndex;
|
|
78
|
+
this.baseOptions = param.baseOptions;
|
|
79
|
+
this.formDataCtor = param.formDataCtor;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Check if the given MIME is a JSON MIME.
|
|
83
|
+
* JSON MIME examples:
|
|
84
|
+
* application/json
|
|
85
|
+
* application/json; charset=UTF8
|
|
86
|
+
* APPLICATION/JSON
|
|
87
|
+
* application/vnd.company+json
|
|
88
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
89
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
90
|
+
*/
|
|
91
|
+
isJsonMime(mime) {
|
|
92
|
+
const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
|
93
|
+
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* The Selling Partner API for Amazon Warehousing and Distribution
|
|
5
|
+
* The Selling Partner API for Amazon Warehousing and Distribution (AWD) provides programmatic access to information about AWD shipments and inventory.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2024-05-09
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
export * from "./api";
|
|
15
|
+
export * from "./configuration";
|
|
16
|
+
export * from "./models";
|