UNPKG

@scaleleap/selling-partner-api-sdk

Version:

📦 A fully typed TypeScript and Node.js SDK library for Amazon Selling Partner API

549 lines • 38 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * The Selling Partner API for Amazon Warehousing and Distribution * The Selling Partner API for Amazon Warehousing and Distribution (AWD) provides programmatic access to information about AWD shipments and inventory. * * The version of the OpenAPI document: 2024-05-09 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.AwdApi = exports.AwdApiFactory = exports.AwdApiFp = exports.AwdApiAxiosParamCreator = exports.WeightUnitOfMeasurement = exports.VolumeUnitOfMeasurement = exports.SortOrder = exports.SkuQuantitiesVisibility = exports.ShipmentSortableField = exports.PrepOwner = exports.PageType = exports.OutboundStatus = exports.OutboundShipmentStatus = exports.OrderPreferenceValue = exports.OrderPreference = exports.LabelStatus = exports.LabelOwner = exports.InventoryUnitOfMeasurement = exports.InventoryDetailsVisibility = exports.InboundStatus = exports.InboundShipmentStatus = exports.InboundEligibilityStatus = exports.FormatType = exports.DistributionPackageType = exports.DimensionUnitOfMeasurement = exports.CarrierCodeType = void 0; const axios_1 = __importDefault(require("axios")); // Some imports not used depending on template conditions // @ts-ignore const common_1 = require("./common"); // @ts-ignore const base_1 = require("./base"); /** * Denotes the type for the carrier. * @export * @enum {string} */ var CarrierCodeType; (function (CarrierCodeType) { CarrierCodeType["Scac"] = "SCAC"; })(CarrierCodeType || (exports.CarrierCodeType = CarrierCodeType = {})); /** * Unit of measurement for package dimensions. * @export * @enum {string} */ var DimensionUnitOfMeasurement; (function (DimensionUnitOfMeasurement) { DimensionUnitOfMeasurement["Inches"] = "INCHES"; DimensionUnitOfMeasurement["Centimeters"] = "CENTIMETERS"; })(DimensionUnitOfMeasurement || (exports.DimensionUnitOfMeasurement = DimensionUnitOfMeasurement = {})); /** * Type of distribution packages. * @export * @enum {string} */ var DistributionPackageType; (function (DistributionPackageType) { DistributionPackageType["Case"] = "CASE"; DistributionPackageType["Pallet"] = "PALLET"; })(DistributionPackageType || (exports.DistributionPackageType = DistributionPackageType = {})); /** * The label format type extension. * @export * @enum {string} */ var FormatType; (function (FormatType) { FormatType["Pdf"] = "PDF"; })(FormatType || (exports.FormatType = FormatType = {})); /** * Enum denoting the package inbound eligibility. * @export * @enum {string} */ var InboundEligibilityStatus; (function (InboundEligibilityStatus) { InboundEligibilityStatus["Eligible"] = "ELIGIBLE"; InboundEligibilityStatus["Ineligible"] = "INELIGIBLE"; })(InboundEligibilityStatus || (exports.InboundEligibilityStatus = InboundEligibilityStatus = {})); /** * Possible shipment statuses used by shipments. * @export * @enum {string} */ var InboundShipmentStatus; (function (InboundShipmentStatus) { InboundShipmentStatus["Created"] = "CREATED"; InboundShipmentStatus["Shipped"] = "SHIPPED"; InboundShipmentStatus["InTransit"] = "IN_TRANSIT"; InboundShipmentStatus["Receiving"] = "RECEIVING"; InboundShipmentStatus["Delivered"] = "DELIVERED"; InboundShipmentStatus["Closed"] = "CLOSED"; InboundShipmentStatus["Cancelled"] = "CANCELLED"; })(InboundShipmentStatus || (exports.InboundShipmentStatus = InboundShipmentStatus = {})); /** * The supported statuses for an inbound order. * @export * @enum {string} */ var InboundStatus; (function (InboundStatus) { InboundStatus["Draft"] = "DRAFT"; InboundStatus["Validating"] = "VALIDATING"; InboundStatus["Confirmed"] = "CONFIRMED"; InboundStatus["Closed"] = "CLOSED"; InboundStatus["Expired"] = "EXPIRED"; InboundStatus["Cancelled"] = "CANCELLED"; })(InboundStatus || (exports.InboundStatus = InboundStatus = {})); /** * Enum to specify if returned summaries should include additional summarized inventory details and quantities. * @export * @enum {string} */ var InventoryDetailsVisibility; (function (InventoryDetailsVisibility) { InventoryDetailsVisibility["Show"] = "SHOW"; InventoryDetailsVisibility["Hide"] = "HIDE"; })(InventoryDetailsVisibility || (exports.InventoryDetailsVisibility = InventoryDetailsVisibility = {})); /** * Unit of measurement for the inventory. * @export * @enum {string} */ var InventoryUnitOfMeasurement; (function (InventoryUnitOfMeasurement) { InventoryUnitOfMeasurement["ProductUnits"] = "PRODUCT_UNITS"; InventoryUnitOfMeasurement["Cases"] = "CASES"; InventoryUnitOfMeasurement["Pallets"] = "PALLETS"; })(InventoryUnitOfMeasurement || (exports.InventoryUnitOfMeasurement = InventoryUnitOfMeasurement = {})); /** * The entity that labels the products. * @export * @enum {string} */ var LabelOwner; (function (LabelOwner) { LabelOwner["Amazon"] = "AMAZON"; LabelOwner["Self"] = "SELF"; })(LabelOwner || (exports.LabelOwner = LabelOwner = {})); /** * The status of your label. * @export * @enum {string} */ var LabelStatus; (function (LabelStatus) { LabelStatus["Generating"] = "GENERATING"; LabelStatus["Generated"] = "GENERATED"; LabelStatus["GenerationFailed"] = "GENERATION_FAILED"; LabelStatus["NotReady"] = "NOT_READY"; })(LabelStatus || (exports.LabelStatus = LabelStatus = {})); /** * Supported preferences for the distribution order. * @export * @enum {string} */ var OrderPreference; (function (OrderPreference) { OrderPreference["PartialOrder"] = "PARTIAL_ORDER"; })(OrderPreference || (exports.OrderPreference = OrderPreference = {})); /** * Value for the order preference. * @export * @enum {string} */ var OrderPreferenceValue; (function (OrderPreferenceValue) { OrderPreferenceValue["Set"] = "SET"; OrderPreferenceValue["Unset"] = "UNSET"; })(OrderPreferenceValue || (exports.OrderPreferenceValue = OrderPreferenceValue = {})); /** * Possible shipment statuses for outbound shipments. * @export * @enum {string} */ var OutboundShipmentStatus; (function (OutboundShipmentStatus) { OutboundShipmentStatus["Created"] = "CREATED"; OutboundShipmentStatus["InTransit"] = "IN_TRANSIT"; OutboundShipmentStatus["Delivered"] = "DELIVERED"; OutboundShipmentStatus["Receiving"] = "RECEIVING"; OutboundShipmentStatus["Received"] = "RECEIVED"; OutboundShipmentStatus["Closed"] = "CLOSED"; OutboundShipmentStatus["Cancelled"] = "CANCELLED"; OutboundShipmentStatus["Failed"] = "FAILED"; })(OutboundShipmentStatus || (exports.OutboundShipmentStatus = OutboundShipmentStatus = {})); /** * Statuses supported for an outbound order. * @export * @enum {string} */ var OutboundStatus; (function (OutboundStatus) { OutboundStatus["Confirmed"] = "CONFIRMED"; OutboundStatus["Draft"] = "DRAFT"; OutboundStatus["Eligible"] = "ELIGIBLE"; OutboundStatus["Executing"] = "EXECUTING"; OutboundStatus["Failure"] = "FAILURE"; OutboundStatus["Ineligible"] = "INELIGIBLE"; OutboundStatus["InventoryOutbound"] = "INVENTORY_OUTBOUND"; OutboundStatus["Success"] = "SUCCESS"; OutboundStatus["Validating"] = "VALIDATING"; })(OutboundStatus || (exports.OutboundStatus = OutboundStatus = {})); /** * Label page type. * @export * @enum {string} */ var PageType; (function (PageType) { PageType["ThermalNonpcp"] = "THERMAL_NONPCP"; PageType["PlainPaper"] = "PLAIN_PAPER"; PageType["Letter6"] = "LETTER_6"; })(PageType || (exports.PageType = PageType = {})); /** * The owner of the preparations, if special preparations are required. * @export * @enum {string} */ var PrepOwner; (function (PrepOwner) { PrepOwner["Amazon"] = "AMAZON"; PrepOwner["Self"] = "SELF"; })(PrepOwner || (exports.PrepOwner = PrepOwner = {})); /** * Denotes the field name on which the shipments are to be sorted. * @export * @enum {string} */ var ShipmentSortableField; (function (ShipmentSortableField) { ShipmentSortableField["UpdatedAt"] = "UPDATED_AT"; ShipmentSortableField["CreatedAt"] = "CREATED_AT"; })(ShipmentSortableField || (exports.ShipmentSortableField = ShipmentSortableField = {})); /** * Enum to specify if returned shipment should include SKU quantity details * @export * @enum {string} */ var SkuQuantitiesVisibility; (function (SkuQuantitiesVisibility) { SkuQuantitiesVisibility["Show"] = "SHOW"; SkuQuantitiesVisibility["Hide"] = "HIDE"; })(SkuQuantitiesVisibility || (exports.SkuQuantitiesVisibility = SkuQuantitiesVisibility = {})); /** * Sort order for a collection of items. For example, order or shipment. * @export * @enum {string} */ var SortOrder; (function (SortOrder) { SortOrder["Ascending"] = "ASCENDING"; SortOrder["Descending"] = "DESCENDING"; })(SortOrder || (exports.SortOrder = SortOrder = {})); /** * Unit of measurement for the package volume. * @export * @enum {string} */ var VolumeUnitOfMeasurement; (function (VolumeUnitOfMeasurement) { VolumeUnitOfMeasurement["CuIn"] = "CU_IN"; VolumeUnitOfMeasurement["Cbm"] = "CBM"; VolumeUnitOfMeasurement["Cc"] = "CC"; })(VolumeUnitOfMeasurement || (exports.VolumeUnitOfMeasurement = VolumeUnitOfMeasurement = {})); /** * Unit of measurement for the package weight. * @export * @enum {string} */ var WeightUnitOfMeasurement; (function (WeightUnitOfMeasurement) { WeightUnitOfMeasurement["Pounds"] = "POUNDS"; WeightUnitOfMeasurement["Kilograms"] = "KILOGRAMS"; })(WeightUnitOfMeasurement || (exports.WeightUnitOfMeasurement = WeightUnitOfMeasurement = {})); /** * AwdApi - axios parameter creator * @export */ const AwdApiAxiosParamCreator = function (configuration) { return { /** * 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) * @param {string} shipmentId ID for the shipment. A shipment contains the cases being inbounded. * @param {'SHOW' | 'HIDE'} [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 * @param {*} [options] Override http request option. * @throws {RequiredError} */ getInboundShipment: async (shipmentId, skuQuantities, options = {}) => { // verify required parameter 'shipmentId' is not null or undefined (0, common_1.assertParamExists)('getInboundShipment', 'shipmentId', shipmentId); const localVarPath = `/awd/2024-05-09/inboundShipments/{shipmentId}` .replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (skuQuantities !== undefined) { localVarQueryParameter['skuQuantities'] = skuQuantities; } (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * 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). * @param {'UPDATED_AT' | 'CREATED_AT'} [sortBy] Field to sort results by. By default, the response will be sorted by UPDATED_AT. * @param {'ASCENDING' | 'DESCENDING'} [sortOrder] Sort the response in ASCENDING or DESCENDING order. By default, the response will be sorted in DESCENDING order. * @param {'CREATED' | 'SHIPPED' | 'IN_TRANSIT' | 'RECEIVING' | 'DELIVERED' | 'CLOSED' | 'CANCELLED'} [shipmentStatus] Filter by inbound shipment status. * @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. * @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. * @param {number} [maxResults] Maximum number of results to return. * @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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listInboundShipments: async (sortBy, sortOrder, shipmentStatus, updatedAfter, updatedBefore, maxResults, nextToken, options = {}) => { const localVarPath = `/awd/2024-05-09/inboundShipments`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } if (sortOrder !== undefined) { localVarQueryParameter['sortOrder'] = sortOrder; } if (shipmentStatus !== undefined) { localVarQueryParameter['shipmentStatus'] = shipmentStatus; } if (updatedAfter !== undefined) { localVarQueryParameter['updatedAfter'] = (updatedAfter instanceof Date) ? updatedAfter.toISOString() : updatedAfter; } if (updatedBefore !== undefined) { localVarQueryParameter['updatedBefore'] = (updatedBefore instanceof Date) ? updatedBefore.toISOString() : updatedBefore; } if (maxResults !== undefined) { localVarQueryParameter['maxResults'] = maxResults; } if (nextToken !== undefined) { localVarQueryParameter['nextToken'] = nextToken; } (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * 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). * @param {string} [sku] Filter by seller or merchant SKU for the item. * @param {'ASCENDING' | 'DESCENDING'} [sortOrder] Sort the response in `ASCENDING` or `DESCENDING` order. * @param {'SHOW' | 'HIDE'} [details] Set to `SHOW` to return summaries with additional inventory details. Defaults to `HIDE,` which returns only inventory summary totals. * @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. * @param {number} [maxResults] Maximum number of results to return. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listInventory: async (sku, sortOrder, details, nextToken, maxResults, options = {}) => { const localVarPath = `/awd/2024-05-09/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (sku !== undefined) { localVarQueryParameter['sku'] = sku; } if (sortOrder !== undefined) { localVarQueryParameter['sortOrder'] = sortOrder; } if (details !== undefined) { localVarQueryParameter['details'] = details; } if (nextToken !== undefined) { localVarQueryParameter['nextToken'] = nextToken; } if (maxResults !== undefined) { localVarQueryParameter['maxResults'] = maxResults; } (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.AwdApiAxiosParamCreator = AwdApiAxiosParamCreator; /** * AwdApi - functional programming interface * @export */ const AwdApiFp = function (configuration) { const localVarAxiosParamCreator = (0, exports.AwdApiAxiosParamCreator)(configuration); return { /** * 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) * @param {string} shipmentId ID for the shipment. A shipment contains the cases being inbounded. * @param {'SHOW' | 'HIDE'} [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 * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getInboundShipment(shipmentId, skuQuantities, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getInboundShipment(shipmentId, skuQuantities, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * 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). * @param {'UPDATED_AT' | 'CREATED_AT'} [sortBy] Field to sort results by. By default, the response will be sorted by UPDATED_AT. * @param {'ASCENDING' | 'DESCENDING'} [sortOrder] Sort the response in ASCENDING or DESCENDING order. By default, the response will be sorted in DESCENDING order. * @param {'CREATED' | 'SHIPPED' | 'IN_TRANSIT' | 'RECEIVING' | 'DELIVERED' | 'CLOSED' | 'CANCELLED'} [shipmentStatus] Filter by inbound shipment status. * @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. * @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. * @param {number} [maxResults] Maximum number of results to return. * @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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listInboundShipments(sortBy, sortOrder, shipmentStatus, updatedAfter, updatedBefore, maxResults, nextToken, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.listInboundShipments(sortBy, sortOrder, shipmentStatus, updatedAfter, updatedBefore, maxResults, nextToken, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * 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). * @param {string} [sku] Filter by seller or merchant SKU for the item. * @param {'ASCENDING' | 'DESCENDING'} [sortOrder] Sort the response in `ASCENDING` or `DESCENDING` order. * @param {'SHOW' | 'HIDE'} [details] Set to `SHOW` to return summaries with additional inventory details. Defaults to `HIDE,` which returns only inventory summary totals. * @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. * @param {number} [maxResults] Maximum number of results to return. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listInventory(sku, sortOrder, details, nextToken, maxResults, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.listInventory(sku, sortOrder, details, nextToken, maxResults, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, }; }; exports.AwdApiFp = AwdApiFp; /** * AwdApi - factory interface * @export */ const AwdApiFactory = function (configuration, basePath, axios) { const localVarFp = (0, exports.AwdApiFp)(configuration); return { /** * 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) * @param {string} shipmentId ID for the shipment. A shipment contains the cases being inbounded. * @param {'SHOW' | 'HIDE'} [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 * @param {*} [options] Override http request option. * @throws {RequiredError} */ getInboundShipment(shipmentId, skuQuantities, options) { return localVarFp.getInboundShipment(shipmentId, skuQuantities, options).then((request) => request(axios, basePath)); }, /** * 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). * @param {'UPDATED_AT' | 'CREATED_AT'} [sortBy] Field to sort results by. By default, the response will be sorted by UPDATED_AT. * @param {'ASCENDING' | 'DESCENDING'} [sortOrder] Sort the response in ASCENDING or DESCENDING order. By default, the response will be sorted in DESCENDING order. * @param {'CREATED' | 'SHIPPED' | 'IN_TRANSIT' | 'RECEIVING' | 'DELIVERED' | 'CLOSED' | 'CANCELLED'} [shipmentStatus] Filter by inbound shipment status. * @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. * @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. * @param {number} [maxResults] Maximum number of results to return. * @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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listInboundShipments(sortBy, sortOrder, shipmentStatus, updatedAfter, updatedBefore, maxResults, nextToken, options) { return localVarFp.listInboundShipments(sortBy, sortOrder, shipmentStatus, updatedAfter, updatedBefore, maxResults, nextToken, options).then((request) => request(axios, basePath)); }, /** * 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). * @param {string} [sku] Filter by seller or merchant SKU for the item. * @param {'ASCENDING' | 'DESCENDING'} [sortOrder] Sort the response in `ASCENDING` or `DESCENDING` order. * @param {'SHOW' | 'HIDE'} [details] Set to `SHOW` to return summaries with additional inventory details. Defaults to `HIDE,` which returns only inventory summary totals. * @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. * @param {number} [maxResults] Maximum number of results to return. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listInventory(sku, sortOrder, details, nextToken, maxResults, options) { return localVarFp.listInventory(sku, sortOrder, details, nextToken, maxResults, options).then((request) => request(axios, basePath)); }, }; }; exports.AwdApiFactory = AwdApiFactory; /** * AwdApi - object-oriented interface * @export * @class AwdApi * @extends {BaseAPI} */ class AwdApi extends base_1.BaseAPI { /** * 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) * @param {AwdApiGetInboundShipmentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AwdApi */ getInboundShipment(requestParameters, options) { return (0, exports.AwdApiFp)(this.configuration).getInboundShipment(requestParameters.shipmentId, requestParameters.skuQuantities, options).then((request) => request(this.axios, this.basePath)); } /** * 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). * @param {AwdApiListInboundShipmentsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AwdApi */ listInboundShipments(requestParameters = {}, options) { 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)); } /** * 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). * @param {AwdApiListInventoryRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AwdApi */ listInventory(requestParameters = {}, options) { 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)); } } exports.AwdApi = AwdApi; //# sourceMappingURL=api.js.map