UNPKG

@scaleleap/selling-partner-api-sdk

Version:

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

573 lines • 74.6 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Selling Partner API for Direct Fulfillment Shipping * The Selling Partner API for Direct Fulfillment Shipping provides programmatic access to a direct fulfillment vendor\'s shipping data. * * The version of the OpenAPI document: v1 * * * 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.VendorShippingLabelsApi = exports.VendorShippingLabelsApiFactory = exports.VendorShippingLabelsApiFp = exports.VendorShippingLabelsApiAxiosParamCreator = exports.VendorShippingApi = exports.VendorShippingApiFactory = exports.VendorShippingApiFp = exports.VendorShippingApiAxiosParamCreator = exports.CustomerInvoicesApi = exports.CustomerInvoicesApiFactory = exports.CustomerInvoicesApiFp = exports.CustomerInvoicesApiAxiosParamCreator = exports.WeightUnitOfMeasureEnum = exports.TaxRegistrationDetailsTaxRegistrationTypeEnum = exports.ShippingLabelLabelFormatEnum = exports.ShipmentDetailsShipmentStatusEnum = exports.PackingSlipContentTypeEnum = exports.DimensionsUnitOfMeasureEnum = exports.ContainerContainerTypeEnum = 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"); /** * @export * @enum {string} */ var ContainerContainerTypeEnum; (function (ContainerContainerTypeEnum) { ContainerContainerTypeEnum["Carton"] = "carton"; ContainerContainerTypeEnum["Pallet"] = "pallet"; })(ContainerContainerTypeEnum || (exports.ContainerContainerTypeEnum = ContainerContainerTypeEnum = {})); /** * @export * @enum {string} */ var DimensionsUnitOfMeasureEnum; (function (DimensionsUnitOfMeasureEnum) { DimensionsUnitOfMeasureEnum["In"] = "IN"; DimensionsUnitOfMeasureEnum["Cm"] = "CM"; })(DimensionsUnitOfMeasureEnum || (exports.DimensionsUnitOfMeasureEnum = DimensionsUnitOfMeasureEnum = {})); /** * @export * @enum {string} */ var PackingSlipContentTypeEnum; (function (PackingSlipContentTypeEnum) { PackingSlipContentTypeEnum["ApplicationPdf"] = "application/pdf"; })(PackingSlipContentTypeEnum || (exports.PackingSlipContentTypeEnum = PackingSlipContentTypeEnum = {})); /** * @export * @enum {string} */ var ShipmentDetailsShipmentStatusEnum; (function (ShipmentDetailsShipmentStatusEnum) { ShipmentDetailsShipmentStatusEnum["Shipped"] = "SHIPPED"; ShipmentDetailsShipmentStatusEnum["FloorDenial"] = "FLOOR_DENIAL"; })(ShipmentDetailsShipmentStatusEnum || (exports.ShipmentDetailsShipmentStatusEnum = ShipmentDetailsShipmentStatusEnum = {})); /** * @export * @enum {string} */ var ShippingLabelLabelFormatEnum; (function (ShippingLabelLabelFormatEnum) { ShippingLabelLabelFormatEnum["Png"] = "PNG"; ShippingLabelLabelFormatEnum["Zpl"] = "ZPL"; })(ShippingLabelLabelFormatEnum || (exports.ShippingLabelLabelFormatEnum = ShippingLabelLabelFormatEnum = {})); /** * @export * @enum {string} */ var TaxRegistrationDetailsTaxRegistrationTypeEnum; (function (TaxRegistrationDetailsTaxRegistrationTypeEnum) { TaxRegistrationDetailsTaxRegistrationTypeEnum["Vat"] = "VAT"; TaxRegistrationDetailsTaxRegistrationTypeEnum["Gst"] = "GST"; })(TaxRegistrationDetailsTaxRegistrationTypeEnum || (exports.TaxRegistrationDetailsTaxRegistrationTypeEnum = TaxRegistrationDetailsTaxRegistrationTypeEnum = {})); /** * @export * @enum {string} */ var WeightUnitOfMeasureEnum; (function (WeightUnitOfMeasureEnum) { WeightUnitOfMeasureEnum["Kg"] = "KG"; WeightUnitOfMeasureEnum["Lb"] = "LB"; })(WeightUnitOfMeasureEnum || (exports.WeightUnitOfMeasureEnum = WeightUnitOfMeasureEnum = {})); /** * CustomerInvoicesApi - axios parameter creator * @export */ const CustomerInvoicesApiAxiosParamCreator = function (configuration) { return { /** * Returns a customer invoice based on the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {string} purchaseOrderNumber Purchase order number of the shipment for which to return the invoice. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCustomerInvoice: async (purchaseOrderNumber, options = {}) => { // verify required parameter 'purchaseOrderNumber' is not null or undefined (0, common_1.assertParamExists)('getCustomerInvoice', 'purchaseOrderNumber', purchaseOrderNumber); const localVarPath = `/vendor/directFulfillment/shipping/v1/customerInvoices/{purchaseOrderNumber}` .replace(`{${"purchaseOrderNumber"}}`, encodeURIComponent(String(purchaseOrderNumber))); // 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 = {}; (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, }; }, /** * Returns a list of customer invoices created during a time frame that you specify. You define the time frame using the createdAfter and createdBefore parameters. You must use both of these parameters. The date range to search must be no more than 7 days. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {string} createdAfter Orders that became available after this date and time will be included in the result. Must be in ISO-8601 date/time format. * @param {string} createdBefore Orders that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format. * @param {string} [shipFromPartyId] The vendor warehouseId for order fulfillment. If not specified, the result will contain orders for all warehouses. * @param {number} [limit] The limit to the number of records returned * @param {'ASC' | 'DESC'} [sortOrder] Sort ASC or DESC by order creation date. * @param {string} [nextToken] Used for pagination when there are more orders than the specified result size limit. The token value is returned in the previous API call. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCustomerInvoices: async (createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options = {}) => { // verify required parameter 'createdAfter' is not null or undefined (0, common_1.assertParamExists)('getCustomerInvoices', 'createdAfter', createdAfter); // verify required parameter 'createdBefore' is not null or undefined (0, common_1.assertParamExists)('getCustomerInvoices', 'createdBefore', createdBefore); const localVarPath = `/vendor/directFulfillment/shipping/v1/customerInvoices`; // 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 (shipFromPartyId !== undefined) { localVarQueryParameter['shipFromPartyId'] = shipFromPartyId; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (createdAfter !== undefined) { localVarQueryParameter['createdAfter'] = (createdAfter instanceof Date) ? createdAfter.toISOString() : createdAfter; } if (createdBefore !== undefined) { localVarQueryParameter['createdBefore'] = (createdBefore instanceof Date) ? createdBefore.toISOString() : createdBefore; } if (sortOrder !== undefined) { localVarQueryParameter['sortOrder'] = sortOrder; } 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, }; }, }; }; exports.CustomerInvoicesApiAxiosParamCreator = CustomerInvoicesApiAxiosParamCreator; /** * CustomerInvoicesApi - functional programming interface * @export */ const CustomerInvoicesApiFp = function (configuration) { const localVarAxiosParamCreator = (0, exports.CustomerInvoicesApiAxiosParamCreator)(configuration); return { /** * Returns a customer invoice based on the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {string} purchaseOrderNumber Purchase order number of the shipment for which to return the invoice. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getCustomerInvoice(purchaseOrderNumber, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getCustomerInvoice(purchaseOrderNumber, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Returns a list of customer invoices created during a time frame that you specify. You define the time frame using the createdAfter and createdBefore parameters. You must use both of these parameters. The date range to search must be no more than 7 days. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {string} createdAfter Orders that became available after this date and time will be included in the result. Must be in ISO-8601 date/time format. * @param {string} createdBefore Orders that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format. * @param {string} [shipFromPartyId] The vendor warehouseId for order fulfillment. If not specified, the result will contain orders for all warehouses. * @param {number} [limit] The limit to the number of records returned * @param {'ASC' | 'DESC'} [sortOrder] Sort ASC or DESC by order creation date. * @param {string} [nextToken] Used for pagination when there are more orders than the specified result size limit. The token value is returned in the previous API call. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getCustomerInvoices(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getCustomerInvoices(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, }; }; exports.CustomerInvoicesApiFp = CustomerInvoicesApiFp; /** * CustomerInvoicesApi - factory interface * @export */ const CustomerInvoicesApiFactory = function (configuration, basePath, axios) { const localVarFp = (0, exports.CustomerInvoicesApiFp)(configuration); return { /** * Returns a customer invoice based on the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {string} purchaseOrderNumber Purchase order number of the shipment for which to return the invoice. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCustomerInvoice(purchaseOrderNumber, options) { return localVarFp.getCustomerInvoice(purchaseOrderNumber, options).then((request) => request(axios, basePath)); }, /** * Returns a list of customer invoices created during a time frame that you specify. You define the time frame using the createdAfter and createdBefore parameters. You must use both of these parameters. The date range to search must be no more than 7 days. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {string} createdAfter Orders that became available after this date and time will be included in the result. Must be in ISO-8601 date/time format. * @param {string} createdBefore Orders that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format. * @param {string} [shipFromPartyId] The vendor warehouseId for order fulfillment. If not specified, the result will contain orders for all warehouses. * @param {number} [limit] The limit to the number of records returned * @param {'ASC' | 'DESC'} [sortOrder] Sort ASC or DESC by order creation date. * @param {string} [nextToken] Used for pagination when there are more orders than the specified result size limit. The token value is returned in the previous API call. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCustomerInvoices(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options) { return localVarFp.getCustomerInvoices(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options).then((request) => request(axios, basePath)); }, }; }; exports.CustomerInvoicesApiFactory = CustomerInvoicesApiFactory; /** * CustomerInvoicesApi - object-oriented interface * @export * @class CustomerInvoicesApi * @extends {BaseAPI} */ class CustomerInvoicesApi extends base_1.BaseAPI { /** * Returns a customer invoice based on the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {CustomerInvoicesApiGetCustomerInvoiceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerInvoicesApi */ getCustomerInvoice(requestParameters, options) { return (0, exports.CustomerInvoicesApiFp)(this.configuration).getCustomerInvoice(requestParameters.purchaseOrderNumber, options).then((request) => request(this.axios, this.basePath)); } /** * Returns a list of customer invoices created during a time frame that you specify. You define the time frame using the createdAfter and createdBefore parameters. You must use both of these parameters. The date range to search must be no more than 7 days. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {CustomerInvoicesApiGetCustomerInvoicesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerInvoicesApi */ getCustomerInvoices(requestParameters, options) { return (0, exports.CustomerInvoicesApiFp)(this.configuration).getCustomerInvoices(requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.shipFromPartyId, requestParameters.limit, requestParameters.sortOrder, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath)); } } exports.CustomerInvoicesApi = CustomerInvoicesApi; /** * VendorShippingApi - axios parameter creator * @export */ const VendorShippingApiAxiosParamCreator = function (configuration) { return { /** * Returns a packing slip based on the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {string} purchaseOrderNumber The purchaseOrderNumber for the packing slip you want. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getPackingSlip: async (purchaseOrderNumber, options = {}) => { // verify required parameter 'purchaseOrderNumber' is not null or undefined (0, common_1.assertParamExists)('getPackingSlip', 'purchaseOrderNumber', purchaseOrderNumber); const localVarPath = `/vendor/directFulfillment/shipping/v1/packingSlips/{purchaseOrderNumber}` .replace(`{${"purchaseOrderNumber"}}`, encodeURIComponent(String(purchaseOrderNumber))); // 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 = {}; (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, }; }, /** * Returns a list of packing slips for the purchase orders that match the criteria specified. Date range to search must not be more than 7 days. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {string} createdAfter Packing slips that became available after this date and time will be included in the result. Must be in ISO-8601 date/time format. * @param {string} createdBefore Packing slips that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format. * @param {string} [shipFromPartyId] The vendor warehouseId for order fulfillment. If not specified the result will contain orders for all warehouses. * @param {number} [limit] The limit to the number of records returned * @param {'ASC' | 'DESC'} [sortOrder] Sort ASC or DESC by packing slip creation date. * @param {string} [nextToken] Used for pagination when there are more packing slips than the specified result size limit. The token value is returned in the previous API call. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getPackingSlips: async (createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options = {}) => { // verify required parameter 'createdAfter' is not null or undefined (0, common_1.assertParamExists)('getPackingSlips', 'createdAfter', createdAfter); // verify required parameter 'createdBefore' is not null or undefined (0, common_1.assertParamExists)('getPackingSlips', 'createdBefore', createdBefore); const localVarPath = `/vendor/directFulfillment/shipping/v1/packingSlips`; // 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 (shipFromPartyId !== undefined) { localVarQueryParameter['shipFromPartyId'] = shipFromPartyId; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (createdAfter !== undefined) { localVarQueryParameter['createdAfter'] = (createdAfter instanceof Date) ? createdAfter.toISOString() : createdAfter; } if (createdBefore !== undefined) { localVarQueryParameter['createdBefore'] = (createdBefore instanceof Date) ? createdBefore.toISOString() : createdBefore; } if (sortOrder !== undefined) { localVarQueryParameter['sortOrder'] = sortOrder; } 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, }; }, /** * Submits one or more shipment confirmations for vendor orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {SubmitShipmentConfirmationsRequest} body Request body containing the shipment confirmations data. * @param {*} [options] Override http request option. * @throws {RequiredError} */ submitShipmentConfirmations: async (body, options = {}) => { // verify required parameter 'body' is not null or undefined (0, common_1.assertParamExists)('submitShipmentConfirmations', 'body', body); const localVarPath = `/vendor/directFulfillment/shipping/v1/shipmentConfirmations`; // 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: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This API call is only to be used by Vendor-Own-Carrier (VOC) vendors. Calling this API will submit a shipment status update for the package that a vendor has shipped. It will provide the Amazon customer visibility on their order, when the package is outside of Amazon Network visibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {SubmitShipmentStatusUpdatesRequest} body Request body containing the shipment status update data. * @param {*} [options] Override http request option. * @throws {RequiredError} */ submitShipmentStatusUpdates: async (body, options = {}) => { // verify required parameter 'body' is not null or undefined (0, common_1.assertParamExists)('submitShipmentStatusUpdates', 'body', body); const localVarPath = `/vendor/directFulfillment/shipping/v1/shipmentStatusUpdates`; // 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: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.VendorShippingApiAxiosParamCreator = VendorShippingApiAxiosParamCreator; /** * VendorShippingApi - functional programming interface * @export */ const VendorShippingApiFp = function (configuration) { const localVarAxiosParamCreator = (0, exports.VendorShippingApiAxiosParamCreator)(configuration); return { /** * Returns a packing slip based on the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {string} purchaseOrderNumber The purchaseOrderNumber for the packing slip you want. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getPackingSlip(purchaseOrderNumber, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getPackingSlip(purchaseOrderNumber, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Returns a list of packing slips for the purchase orders that match the criteria specified. Date range to search must not be more than 7 days. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {string} createdAfter Packing slips that became available after this date and time will be included in the result. Must be in ISO-8601 date/time format. * @param {string} createdBefore Packing slips that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format. * @param {string} [shipFromPartyId] The vendor warehouseId for order fulfillment. If not specified the result will contain orders for all warehouses. * @param {number} [limit] The limit to the number of records returned * @param {'ASC' | 'DESC'} [sortOrder] Sort ASC or DESC by packing slip creation date. * @param {string} [nextToken] Used for pagination when there are more packing slips than the specified result size limit. The token value is returned in the previous API call. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getPackingSlips(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getPackingSlips(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Submits one or more shipment confirmations for vendor orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {SubmitShipmentConfirmationsRequest} body Request body containing the shipment confirmations data. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async submitShipmentConfirmations(body, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.submitShipmentConfirmations(body, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * This API call is only to be used by Vendor-Own-Carrier (VOC) vendors. Calling this API will submit a shipment status update for the package that a vendor has shipped. It will provide the Amazon customer visibility on their order, when the package is outside of Amazon Network visibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {SubmitShipmentStatusUpdatesRequest} body Request body containing the shipment status update data. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async submitShipmentStatusUpdates(body, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.submitShipmentStatusUpdates(body, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, }; }; exports.VendorShippingApiFp = VendorShippingApiFp; /** * VendorShippingApi - factory interface * @export */ const VendorShippingApiFactory = function (configuration, basePath, axios) { const localVarFp = (0, exports.VendorShippingApiFp)(configuration); return { /** * Returns a packing slip based on the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {string} purchaseOrderNumber The purchaseOrderNumber for the packing slip you want. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getPackingSlip(purchaseOrderNumber, options) { return localVarFp.getPackingSlip(purchaseOrderNumber, options).then((request) => request(axios, basePath)); }, /** * Returns a list of packing slips for the purchase orders that match the criteria specified. Date range to search must not be more than 7 days. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {string} createdAfter Packing slips that became available after this date and time will be included in the result. Must be in ISO-8601 date/time format. * @param {string} createdBefore Packing slips that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format. * @param {string} [shipFromPartyId] The vendor warehouseId for order fulfillment. If not specified the result will contain orders for all warehouses. * @param {number} [limit] The limit to the number of records returned * @param {'ASC' | 'DESC'} [sortOrder] Sort ASC or DESC by packing slip creation date. * @param {string} [nextToken] Used for pagination when there are more packing slips than the specified result size limit. The token value is returned in the previous API call. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getPackingSlips(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options) { return localVarFp.getPackingSlips(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options).then((request) => request(axios, basePath)); }, /** * Submits one or more shipment confirmations for vendor orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {SubmitShipmentConfirmationsRequest} body Request body containing the shipment confirmations data. * @param {*} [options] Override http request option. * @throws {RequiredError} */ submitShipmentConfirmations(body, options) { return localVarFp.submitShipmentConfirmations(body, options).then((request) => request(axios, basePath)); }, /** * This API call is only to be used by Vendor-Own-Carrier (VOC) vendors. Calling this API will submit a shipment status update for the package that a vendor has shipped. It will provide the Amazon customer visibility on their order, when the package is outside of Amazon Network visibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {SubmitShipmentStatusUpdatesRequest} body Request body containing the shipment status update data. * @param {*} [options] Override http request option. * @throws {RequiredError} */ submitShipmentStatusUpdates(body, options) { return localVarFp.submitShipmentStatusUpdates(body, options).then((request) => request(axios, basePath)); }, }; }; exports.VendorShippingApiFactory = VendorShippingApiFactory; /** * VendorShippingApi - object-oriented interface * @export * @class VendorShippingApi * @extends {BaseAPI} */ class VendorShippingApi extends base_1.BaseAPI { /** * Returns a packing slip based on the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {VendorShippingApiGetPackingSlipRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VendorShippingApi */ getPackingSlip(requestParameters, options) { return (0, exports.VendorShippingApiFp)(this.configuration).getPackingSlip(requestParameters.purchaseOrderNumber, options).then((request) => request(this.axios, this.basePath)); } /** * Returns a list of packing slips for the purchase orders that match the criteria specified. Date range to search must not be more than 7 days. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {VendorShippingApiGetPackingSlipsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VendorShippingApi */ getPackingSlips(requestParameters, options) { return (0, exports.VendorShippingApiFp)(this.configuration).getPackingSlips(requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.shipFromPartyId, requestParameters.limit, requestParameters.sortOrder, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath)); } /** * Submits one or more shipment confirmations for vendor orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {VendorShippingApiSubmitShipmentConfirmationsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VendorShippingApi */ submitShipmentConfirmations(requestParameters, options) { return (0, exports.VendorShippingApiFp)(this.configuration).submitShipmentConfirmations(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } /** * This API call is only to be used by Vendor-Own-Carrier (VOC) vendors. Calling this API will submit a shipment status update for the package that a vendor has shipped. It will provide the Amazon customer visibility on their order, when the package is outside of Amazon Network visibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table a