UNPKG

@scaleleap/selling-partner-api-sdk

Version:

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

651 lines (650 loc) • 68.8 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Selling Partner API for Retail Procurement Shipments * The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors. * * 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.VendorShippingApi = exports.VendorShippingApiFactory = exports.VendorShippingApiFp = exports.VendorShippingApiAxiosParamCreator = exports.WeightUnitOfMeasureEnum = exports.VolumeUnitOfMeasureEnum = exports.TransportationDetailsForShipmentConfirmationTransportationModeEnum = exports.TransportationDetailsTransportationModeEnum = exports.TransportationDetailsShipModeEnum = exports.TotalWeightUnitOfMeasureEnum = exports.TaxRegistrationDetailsTaxRegistrationTypeEnum = exports.StopFunctionCodeEnum = exports.ShipmentStatusDetailsShipmentStatusEnum = exports.ShipmentInformationShipModeEnum = exports.ShipmentConfirmationShipmentStructureEnum = exports.ShipmentConfirmationShipmentTypeEnum = exports.ShipmentConfirmationShipmentConfirmationTypeEnum = exports.ShipmentShipmentFreightTermEnum = exports.ShipmentCurrentShipmentStatusEnum = exports.ShipmentTransactionTypeEnum = exports.PackedQuantityUnitOfMeasureEnum = exports.LabelDataLabelFormatEnum = exports.ItemQuantityUnitOfMeasureEnum = exports.ItemDetailsHandlingCodeEnum = exports.ImportDetailsHandlingInstructionsEnum = exports.ImportDetailsMethodOfPaymentEnum = exports.DurationDurationUnitEnum = exports.DimensionsUnitOfMeasureEnum = exports.ContainersContainerTypeEnum = exports.ContainerIdentificationContainerIdentificationTypeEnum = 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 ContainerIdentificationContainerIdentificationTypeEnum; (function (ContainerIdentificationContainerIdentificationTypeEnum) { ContainerIdentificationContainerIdentificationTypeEnum["Sscc"] = "SSCC"; ContainerIdentificationContainerIdentificationTypeEnum["Amzncc"] = "AMZNCC"; ContainerIdentificationContainerIdentificationTypeEnum["Gtin"] = "GTIN"; ContainerIdentificationContainerIdentificationTypeEnum["Bps"] = "BPS"; ContainerIdentificationContainerIdentificationTypeEnum["Cid"] = "CID"; })(ContainerIdentificationContainerIdentificationTypeEnum || (exports.ContainerIdentificationContainerIdentificationTypeEnum = ContainerIdentificationContainerIdentificationTypeEnum = {})); /** * @export * @enum {string} */ var ContainersContainerTypeEnum; (function (ContainersContainerTypeEnum) { ContainersContainerTypeEnum["Carton"] = "carton"; ContainersContainerTypeEnum["Pallet"] = "pallet"; })(ContainersContainerTypeEnum || (exports.ContainersContainerTypeEnum = ContainersContainerTypeEnum = {})); /** * @export * @enum {string} */ var DimensionsUnitOfMeasureEnum; (function (DimensionsUnitOfMeasureEnum) { DimensionsUnitOfMeasureEnum["In"] = "In"; DimensionsUnitOfMeasureEnum["Ft"] = "Ft"; DimensionsUnitOfMeasureEnum["Meter"] = "Meter"; DimensionsUnitOfMeasureEnum["Yard"] = "Yard"; })(DimensionsUnitOfMeasureEnum || (exports.DimensionsUnitOfMeasureEnum = DimensionsUnitOfMeasureEnum = {})); /** * @export * @enum {string} */ var DurationDurationUnitEnum; (function (DurationDurationUnitEnum) { DurationDurationUnitEnum["Days"] = "Days"; DurationDurationUnitEnum["Months"] = "Months"; })(DurationDurationUnitEnum || (exports.DurationDurationUnitEnum = DurationDurationUnitEnum = {})); /** * @export * @enum {string} */ var ImportDetailsMethodOfPaymentEnum; (function (ImportDetailsMethodOfPaymentEnum) { ImportDetailsMethodOfPaymentEnum["PaidByBuyer"] = "PaidByBuyer"; ImportDetailsMethodOfPaymentEnum["CollectOnDelivery"] = "CollectOnDelivery"; ImportDetailsMethodOfPaymentEnum["DefinedByBuyerAndSeller"] = "DefinedByBuyerAndSeller"; ImportDetailsMethodOfPaymentEnum["FobPortOfCall"] = "FOBPortOfCall"; ImportDetailsMethodOfPaymentEnum["PrepaidBySeller"] = "PrepaidBySeller"; ImportDetailsMethodOfPaymentEnum["PaidBySeller"] = "PaidBySeller"; })(ImportDetailsMethodOfPaymentEnum || (exports.ImportDetailsMethodOfPaymentEnum = ImportDetailsMethodOfPaymentEnum = {})); /** * @export * @enum {string} */ var ImportDetailsHandlingInstructionsEnum; (function (ImportDetailsHandlingInstructionsEnum) { ImportDetailsHandlingInstructionsEnum["Oversized"] = "Oversized"; ImportDetailsHandlingInstructionsEnum["Fragile"] = "Fragile"; ImportDetailsHandlingInstructionsEnum["Food"] = "Food"; ImportDetailsHandlingInstructionsEnum["HandleWithCare"] = "HandleWithCare"; })(ImportDetailsHandlingInstructionsEnum || (exports.ImportDetailsHandlingInstructionsEnum = ImportDetailsHandlingInstructionsEnum = {})); /** * @export * @enum {string} */ var ItemDetailsHandlingCodeEnum; (function (ItemDetailsHandlingCodeEnum) { ItemDetailsHandlingCodeEnum["Oversized"] = "Oversized"; ItemDetailsHandlingCodeEnum["Fragile"] = "Fragile"; ItemDetailsHandlingCodeEnum["Food"] = "Food"; ItemDetailsHandlingCodeEnum["HandleWithCare"] = "HandleWithCare"; })(ItemDetailsHandlingCodeEnum || (exports.ItemDetailsHandlingCodeEnum = ItemDetailsHandlingCodeEnum = {})); /** * @export * @enum {string} */ var ItemQuantityUnitOfMeasureEnum; (function (ItemQuantityUnitOfMeasureEnum) { ItemQuantityUnitOfMeasureEnum["Cases"] = "Cases"; ItemQuantityUnitOfMeasureEnum["Eaches"] = "Eaches"; })(ItemQuantityUnitOfMeasureEnum || (exports.ItemQuantityUnitOfMeasureEnum = ItemQuantityUnitOfMeasureEnum = {})); /** * @export * @enum {string} */ var LabelDataLabelFormatEnum; (function (LabelDataLabelFormatEnum) { LabelDataLabelFormatEnum["Pdf"] = "PDF"; })(LabelDataLabelFormatEnum || (exports.LabelDataLabelFormatEnum = LabelDataLabelFormatEnum = {})); /** * @export * @enum {string} */ var PackedQuantityUnitOfMeasureEnum; (function (PackedQuantityUnitOfMeasureEnum) { PackedQuantityUnitOfMeasureEnum["Cases"] = "Cases"; PackedQuantityUnitOfMeasureEnum["Eaches"] = "Eaches"; })(PackedQuantityUnitOfMeasureEnum || (exports.PackedQuantityUnitOfMeasureEnum = PackedQuantityUnitOfMeasureEnum = {})); /** * @export * @enum {string} */ var ShipmentTransactionTypeEnum; (function (ShipmentTransactionTypeEnum) { ShipmentTransactionTypeEnum["New"] = "New"; ShipmentTransactionTypeEnum["Cancel"] = "Cancel"; })(ShipmentTransactionTypeEnum || (exports.ShipmentTransactionTypeEnum = ShipmentTransactionTypeEnum = {})); /** * @export * @enum {string} */ var ShipmentCurrentShipmentStatusEnum; (function (ShipmentCurrentShipmentStatusEnum) { ShipmentCurrentShipmentStatusEnum["Created"] = "Created"; ShipmentCurrentShipmentStatusEnum["TransportationRequested"] = "TransportationRequested"; ShipmentCurrentShipmentStatusEnum["CarrierAssigned"] = "CarrierAssigned"; ShipmentCurrentShipmentStatusEnum["Shipped"] = "Shipped"; })(ShipmentCurrentShipmentStatusEnum || (exports.ShipmentCurrentShipmentStatusEnum = ShipmentCurrentShipmentStatusEnum = {})); /** * @export * @enum {string} */ var ShipmentShipmentFreightTermEnum; (function (ShipmentShipmentFreightTermEnum) { ShipmentShipmentFreightTermEnum["Collect"] = "Collect"; ShipmentShipmentFreightTermEnum["Prepaid"] = "Prepaid"; })(ShipmentShipmentFreightTermEnum || (exports.ShipmentShipmentFreightTermEnum = ShipmentShipmentFreightTermEnum = {})); /** * @export * @enum {string} */ var ShipmentConfirmationShipmentConfirmationTypeEnum; (function (ShipmentConfirmationShipmentConfirmationTypeEnum) { ShipmentConfirmationShipmentConfirmationTypeEnum["Original"] = "Original"; ShipmentConfirmationShipmentConfirmationTypeEnum["Replace"] = "Replace"; })(ShipmentConfirmationShipmentConfirmationTypeEnum || (exports.ShipmentConfirmationShipmentConfirmationTypeEnum = ShipmentConfirmationShipmentConfirmationTypeEnum = {})); /** * @export * @enum {string} */ var ShipmentConfirmationShipmentTypeEnum; (function (ShipmentConfirmationShipmentTypeEnum) { ShipmentConfirmationShipmentTypeEnum["TruckLoad"] = "TruckLoad"; ShipmentConfirmationShipmentTypeEnum["LessThanTruckLoad"] = "LessThanTruckLoad"; ShipmentConfirmationShipmentTypeEnum["SmallParcel"] = "SmallParcel"; })(ShipmentConfirmationShipmentTypeEnum || (exports.ShipmentConfirmationShipmentTypeEnum = ShipmentConfirmationShipmentTypeEnum = {})); /** * @export * @enum {string} */ var ShipmentConfirmationShipmentStructureEnum; (function (ShipmentConfirmationShipmentStructureEnum) { ShipmentConfirmationShipmentStructureEnum["PalletizedAssortmentCase"] = "PalletizedAssortmentCase"; ShipmentConfirmationShipmentStructureEnum["LooseAssortmentCase"] = "LooseAssortmentCase"; ShipmentConfirmationShipmentStructureEnum["PalletOfItems"] = "PalletOfItems"; ShipmentConfirmationShipmentStructureEnum["PalletizedStandardCase"] = "PalletizedStandardCase"; ShipmentConfirmationShipmentStructureEnum["LooseStandardCase"] = "LooseStandardCase"; ShipmentConfirmationShipmentStructureEnum["MasterPallet"] = "MasterPallet"; ShipmentConfirmationShipmentStructureEnum["MasterCase"] = "MasterCase"; })(ShipmentConfirmationShipmentStructureEnum || (exports.ShipmentConfirmationShipmentStructureEnum = ShipmentConfirmationShipmentStructureEnum = {})); /** * @export * @enum {string} */ var ShipmentInformationShipModeEnum; (function (ShipmentInformationShipModeEnum) { ShipmentInformationShipModeEnum["SmallParcel"] = "SmallParcel"; ShipmentInformationShipModeEnum["Ltl"] = "LTL"; })(ShipmentInformationShipModeEnum || (exports.ShipmentInformationShipModeEnum = ShipmentInformationShipModeEnum = {})); /** * @export * @enum {string} */ var ShipmentStatusDetailsShipmentStatusEnum; (function (ShipmentStatusDetailsShipmentStatusEnum) { ShipmentStatusDetailsShipmentStatusEnum["Created"] = "Created"; ShipmentStatusDetailsShipmentStatusEnum["TransportationRequested"] = "TransportationRequested"; ShipmentStatusDetailsShipmentStatusEnum["CarrierAssigned"] = "CarrierAssigned"; ShipmentStatusDetailsShipmentStatusEnum["Shipped"] = "Shipped"; })(ShipmentStatusDetailsShipmentStatusEnum || (exports.ShipmentStatusDetailsShipmentStatusEnum = ShipmentStatusDetailsShipmentStatusEnum = {})); /** * @export * @enum {string} */ var StopFunctionCodeEnum; (function (StopFunctionCodeEnum) { StopFunctionCodeEnum["PortOfDischarge"] = "PortOfDischarge"; StopFunctionCodeEnum["FreightPayableAt"] = "FreightPayableAt"; StopFunctionCodeEnum["PortOfLoading"] = "PortOfLoading"; })(StopFunctionCodeEnum || (exports.StopFunctionCodeEnum = StopFunctionCodeEnum = {})); /** * @export * @enum {string} */ var TaxRegistrationDetailsTaxRegistrationTypeEnum; (function (TaxRegistrationDetailsTaxRegistrationTypeEnum) { TaxRegistrationDetailsTaxRegistrationTypeEnum["Vat"] = "VAT"; TaxRegistrationDetailsTaxRegistrationTypeEnum["Gst"] = "GST"; })(TaxRegistrationDetailsTaxRegistrationTypeEnum || (exports.TaxRegistrationDetailsTaxRegistrationTypeEnum = TaxRegistrationDetailsTaxRegistrationTypeEnum = {})); /** * @export * @enum {string} */ var TotalWeightUnitOfMeasureEnum; (function (TotalWeightUnitOfMeasureEnum) { TotalWeightUnitOfMeasureEnum["Pounds"] = "POUNDS"; TotalWeightUnitOfMeasureEnum["Ounces"] = "OUNCES"; TotalWeightUnitOfMeasureEnum["Grams"] = "GRAMS"; TotalWeightUnitOfMeasureEnum["Kilograms"] = "KILOGRAMS"; })(TotalWeightUnitOfMeasureEnum || (exports.TotalWeightUnitOfMeasureEnum = TotalWeightUnitOfMeasureEnum = {})); /** * @export * @enum {string} */ var TransportationDetailsShipModeEnum; (function (TransportationDetailsShipModeEnum) { TransportationDetailsShipModeEnum["TruckLoad"] = "TruckLoad"; TransportationDetailsShipModeEnum["LessThanTruckLoad"] = "LessThanTruckLoad"; TransportationDetailsShipModeEnum["SmallParcel"] = "SmallParcel"; })(TransportationDetailsShipModeEnum || (exports.TransportationDetailsShipModeEnum = TransportationDetailsShipModeEnum = {})); /** * @export * @enum {string} */ var TransportationDetailsTransportationModeEnum; (function (TransportationDetailsTransportationModeEnum) { TransportationDetailsTransportationModeEnum["Road"] = "Road"; TransportationDetailsTransportationModeEnum["Air"] = "Air"; TransportationDetailsTransportationModeEnum["Ocean"] = "Ocean"; })(TransportationDetailsTransportationModeEnum || (exports.TransportationDetailsTransportationModeEnum = TransportationDetailsTransportationModeEnum = {})); /** * @export * @enum {string} */ var TransportationDetailsForShipmentConfirmationTransportationModeEnum; (function (TransportationDetailsForShipmentConfirmationTransportationModeEnum) { TransportationDetailsForShipmentConfirmationTransportationModeEnum["Road"] = "Road"; TransportationDetailsForShipmentConfirmationTransportationModeEnum["Air"] = "Air"; TransportationDetailsForShipmentConfirmationTransportationModeEnum["Ocean"] = "Ocean"; })(TransportationDetailsForShipmentConfirmationTransportationModeEnum || (exports.TransportationDetailsForShipmentConfirmationTransportationModeEnum = TransportationDetailsForShipmentConfirmationTransportationModeEnum = {})); /** * @export * @enum {string} */ var VolumeUnitOfMeasureEnum; (function (VolumeUnitOfMeasureEnum) { VolumeUnitOfMeasureEnum["CuFt"] = "CuFt"; VolumeUnitOfMeasureEnum["CuIn"] = "CuIn"; VolumeUnitOfMeasureEnum["CuM"] = "CuM"; VolumeUnitOfMeasureEnum["CuY"] = "CuY"; })(VolumeUnitOfMeasureEnum || (exports.VolumeUnitOfMeasureEnum = VolumeUnitOfMeasureEnum = {})); /** * @export * @enum {string} */ var WeightUnitOfMeasureEnum; (function (WeightUnitOfMeasureEnum) { WeightUnitOfMeasureEnum["G"] = "G"; WeightUnitOfMeasureEnum["Kg"] = "Kg"; WeightUnitOfMeasureEnum["Oz"] = "Oz"; WeightUnitOfMeasureEnum["Lb"] = "Lb"; })(WeightUnitOfMeasureEnum || (exports.WeightUnitOfMeasureEnum = WeightUnitOfMeasureEnum = {})); /** * VendorShippingApi - axios parameter creator * @export */ const VendorShippingApiAxiosParamCreator = function (configuration) { return { /** * Returns the Details about Shipment, Carrier Details, status of the shipment, container details and other details related to shipment based on the filter parameters value 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). * @summary GetShipmentDetails * @param {number} [limit] The limit to the number of records returned. Default value is 50 records. * @param {'ASC' | 'DESC'} [sortOrder] Sort in ascending or descending order by purchase order creation date. * @param {string} [nextToken] Used for pagination when there are more shipments than the specified result size limit. * @param {string} [createdAfter] Get Shipment Details that became available after this timestamp will be included in the result. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [createdBefore] Get Shipment Details that became available before this timestamp will be included in the result. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [shipmentConfirmedBefore] Get Shipment Details by passing Shipment confirmed create Date Before. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [shipmentConfirmedAfter] Get Shipment Details by passing Shipment confirmed create Date After. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [packageLabelCreatedBefore] Get Shipment Details by passing Package label create Date by buyer. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [packageLabelCreatedAfter] Get Shipment Details by passing Package label create Date After by buyer. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [shippedBefore] Get Shipment Details by passing Shipped Date Before. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [shippedAfter] Get Shipment Details by passing Shipped Date After. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [estimatedDeliveryBefore] Get Shipment Details by passing Estimated Delivery Date Before. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [estimatedDeliveryAfter] Get Shipment Details by passing Estimated Delivery Date Before. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [shipmentDeliveryBefore] Get Shipment Details by passing Shipment Delivery Date Before. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [shipmentDeliveryAfter] Get Shipment Details by passing Shipment Delivery Date After. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [requestedPickUpBefore] Get Shipment Details by passing Before Requested pickup date. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [requestedPickUpAfter] Get Shipment Details by passing After Requested pickup date. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [scheduledPickUpBefore] Get Shipment Details by passing Before scheduled pickup date. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [scheduledPickUpAfter] Get Shipment Details by passing After Scheduled pickup date. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [currentShipmentStatus] Get Shipment Details by passing Current shipment status. * @param {string} [vendorShipmentIdentifier] Get Shipment Details by passing Vendor Shipment ID * @param {string} [buyerReferenceNumber] Get Shipment Details by passing buyer Reference ID * @param {string} [buyerWarehouseCode] Get Shipping Details based on buyer warehouse code. This value should be same as \'shipToParty.partyId\' in the Shipment. * @param {string} [sellerWarehouseCode] Get Shipping Details based on vendor warehouse code. This value should be same as \'sellingParty.partyId\' in the Shipment. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getShipmentDetails: async (limit, sortOrder, nextToken, createdAfter, createdBefore, shipmentConfirmedBefore, shipmentConfirmedAfter, packageLabelCreatedBefore, packageLabelCreatedAfter, shippedBefore, shippedAfter, estimatedDeliveryBefore, estimatedDeliveryAfter, shipmentDeliveryBefore, shipmentDeliveryAfter, requestedPickUpBefore, requestedPickUpAfter, scheduledPickUpBefore, scheduledPickUpAfter, currentShipmentStatus, vendorShipmentIdentifier, buyerReferenceNumber, buyerWarehouseCode, sellerWarehouseCode, options = {}) => { const localVarPath = `/vendor/shipping/v1/shipments`; // 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 (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (sortOrder !== undefined) { localVarQueryParameter['sortOrder'] = sortOrder; } if (nextToken !== undefined) { localVarQueryParameter['nextToken'] = nextToken; } if (createdAfter !== undefined) { localVarQueryParameter['createdAfter'] = (createdAfter instanceof Date) ? createdAfter.toISOString() : createdAfter; } if (createdBefore !== undefined) { localVarQueryParameter['createdBefore'] = (createdBefore instanceof Date) ? createdBefore.toISOString() : createdBefore; } if (shipmentConfirmedBefore !== undefined) { localVarQueryParameter['shipmentConfirmedBefore'] = (shipmentConfirmedBefore instanceof Date) ? shipmentConfirmedBefore.toISOString() : shipmentConfirmedBefore; } if (shipmentConfirmedAfter !== undefined) { localVarQueryParameter['shipmentConfirmedAfter'] = (shipmentConfirmedAfter instanceof Date) ? shipmentConfirmedAfter.toISOString() : shipmentConfirmedAfter; } if (packageLabelCreatedBefore !== undefined) { localVarQueryParameter['packageLabelCreatedBefore'] = (packageLabelCreatedBefore instanceof Date) ? packageLabelCreatedBefore.toISOString() : packageLabelCreatedBefore; } if (packageLabelCreatedAfter !== undefined) { localVarQueryParameter['packageLabelCreatedAfter'] = (packageLabelCreatedAfter instanceof Date) ? packageLabelCreatedAfter.toISOString() : packageLabelCreatedAfter; } if (shippedBefore !== undefined) { localVarQueryParameter['shippedBefore'] = (shippedBefore instanceof Date) ? shippedBefore.toISOString() : shippedBefore; } if (shippedAfter !== undefined) { localVarQueryParameter['shippedAfter'] = (shippedAfter instanceof Date) ? shippedAfter.toISOString() : shippedAfter; } if (estimatedDeliveryBefore !== undefined) { localVarQueryParameter['estimatedDeliveryBefore'] = (estimatedDeliveryBefore instanceof Date) ? estimatedDeliveryBefore.toISOString() : estimatedDeliveryBefore; } if (estimatedDeliveryAfter !== undefined) { localVarQueryParameter['estimatedDeliveryAfter'] = (estimatedDeliveryAfter instanceof Date) ? estimatedDeliveryAfter.toISOString() : estimatedDeliveryAfter; } if (shipmentDeliveryBefore !== undefined) { localVarQueryParameter['shipmentDeliveryBefore'] = (shipmentDeliveryBefore instanceof Date) ? shipmentDeliveryBefore.toISOString() : shipmentDeliveryBefore; } if (shipmentDeliveryAfter !== undefined) { localVarQueryParameter['shipmentDeliveryAfter'] = (shipmentDeliveryAfter instanceof Date) ? shipmentDeliveryAfter.toISOString() : shipmentDeliveryAfter; } if (requestedPickUpBefore !== undefined) { localVarQueryParameter['requestedPickUpBefore'] = (requestedPickUpBefore instanceof Date) ? requestedPickUpBefore.toISOString() : requestedPickUpBefore; } if (requestedPickUpAfter !== undefined) { localVarQueryParameter['requestedPickUpAfter'] = (requestedPickUpAfter instanceof Date) ? requestedPickUpAfter.toISOString() : requestedPickUpAfter; } if (scheduledPickUpBefore !== undefined) { localVarQueryParameter['scheduledPickUpBefore'] = (scheduledPickUpBefore instanceof Date) ? scheduledPickUpBefore.toISOString() : scheduledPickUpBefore; } if (scheduledPickUpAfter !== undefined) { localVarQueryParameter['scheduledPickUpAfter'] = (scheduledPickUpAfter instanceof Date) ? scheduledPickUpAfter.toISOString() : scheduledPickUpAfter; } if (currentShipmentStatus !== undefined) { localVarQueryParameter['currentShipmentStatus'] = currentShipmentStatus; } if (vendorShipmentIdentifier !== undefined) { localVarQueryParameter['vendorShipmentIdentifier'] = vendorShipmentIdentifier; } if (buyerReferenceNumber !== undefined) { localVarQueryParameter['buyerReferenceNumber'] = buyerReferenceNumber; } if (buyerWarehouseCode !== undefined) { localVarQueryParameter['buyerWarehouseCode'] = buyerWarehouseCode; } if (sellerWarehouseCode !== undefined) { localVarQueryParameter['sellerWarehouseCode'] = sellerWarehouseCode; } (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 small parcel shipment labels based on the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {number} [limit] The limit to the number of records returned. Default value is 50 records. * @param {'ASC' | 'DESC'} [sortOrder] Sort the list by shipment label creation date in ascending or descending order. * @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 `pageSize` 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 {string} [labelCreatedAfter] Shipment labels created after this time will be included in the result. This field must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) datetime format. * @param {string} [labelCreatedBefore] Shipment labels created before this time will be included in the result. This field must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) datetime format. * @param {string} [buyerReferenceNumber] Get Shipment labels by passing buyer reference number. * @param {string} [vendorShipmentIdentifier] Get Shipment labels by passing vendor shipment identifier. * @param {string} [sellerWarehouseCode] Get Shipping labels based on vendor warehouse code. This value must be same as the `sellingParty.partyId` in the shipment. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getShipmentLabels: async (limit, sortOrder, nextToken, labelCreatedAfter, labelCreatedBefore, buyerReferenceNumber, vendorShipmentIdentifier, sellerWarehouseCode, options = {}) => { const localVarPath = `/vendor/shipping/v1/transportLabels`; // 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 (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (sortOrder !== undefined) { localVarQueryParameter['sortOrder'] = sortOrder; } if (nextToken !== undefined) { localVarQueryParameter['nextToken'] = nextToken; } if (labelCreatedAfter !== undefined) { localVarQueryParameter['labelCreatedAfter'] = (labelCreatedAfter instanceof Date) ? labelCreatedAfter.toISOString() : labelCreatedAfter; } if (labelCreatedBefore !== undefined) { localVarQueryParameter['labelCreatedBefore'] = (labelCreatedBefore instanceof Date) ? labelCreatedBefore.toISOString() : labelCreatedBefore; } if (buyerReferenceNumber !== undefined) { localVarQueryParameter['buyerReferenceNumber'] = buyerReferenceNumber; } if (vendorShipmentIdentifier !== undefined) { localVarQueryParameter['vendorShipmentIdentifier'] = vendorShipmentIdentifier; } if (sellerWarehouseCode !== undefined) { localVarQueryParameter['sellerWarehouseCode'] = sellerWarehouseCode; } (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). * @summary SubmitShipmentConfirmations * @param {SubmitShipmentConfirmationsRequest} body A request to submit shipment confirmation. * @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/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, }; }, /** * Submits one or more shipment request 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). * @summary SubmitShipments * @param {SubmitShipments} body A request to submit shipment request. * @param {*} [options] Override http request option. * @throws {RequiredError} */ submitShipments: async (body, options = {}) => { // verify required parameter 'body' is not null or undefined (0, common_1.assertParamExists)('submitShipments', 'body', body); const localVarPath = `/vendor/shipping/v1/shipments`; // 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 the Details about Shipment, Carrier Details, status of the shipment, container details and other details related to shipment based on the filter parameters value 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). * @summary GetShipmentDetails * @param {number} [limit] The limit to the number of records returned. Default value is 50 records. * @param {'ASC' | 'DESC'} [sortOrder] Sort in ascending or descending order by purchase order creation date. * @param {string} [nextToken] Used for pagination when there are more shipments than the specified result size limit. * @param {string} [createdAfter] Get Shipment Details that became available after this timestamp will be included in the result. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [createdBefore] Get Shipment Details that became available before this timestamp will be included in the result. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [shipmentConfirmedBefore] Get Shipment Details by passing Shipment confirmed create Date Before. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [shipmentConfirmedAfter] Get Shipment Details by passing Shipment confirmed create Date After. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [packageLabelCreatedBefore] Get Shipment Details by passing Package label create Date by buyer. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [packageLabelCreatedAfter] Get Shipment Details by passing Package label create Date After by buyer. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [shippedBefore] Get Shipment Details by passing Shipped Date Before. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [shippedAfter] Get Shipment Details by passing Shipped Date After. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [estimatedDeliveryBefore] Get Shipment Details by passing Estimated Delivery Date Before. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [estimatedDeliveryAfter] Get Shipment Details by passing Estimated Delivery Date Before. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [shipmentDeliveryBefore] Get Shipment Details by passing Shipment Delivery Date Before. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [shipmentDeliveryAfter] Get Shipment Details by passing Shipment Delivery Date After. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [requestedPickUpBefore] Get Shipment Details by passing Before Requested pickup date. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [requestedPickUpAfter] Get Shipment Details by passing After Requested pickup date. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [scheduledPickUpBefore] Get Shipment Details by passing Before scheduled pickup date. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [scheduledPickUpAfter] Get Shipment Details by passing After Scheduled pickup date. Must be in <a href=\'https://developer-docs.amazon.com/sp-api/docs/iso-8601\'>ISO 8601</a> format. * @param {string} [currentShipmentStatus] Get Shipment Details by passing Current shipment status. * @param {string} [vendorShipmentIdentifier] Get Shipment Details by passing Vendor Shipment ID * @param {string} [buyerReferenceNumber] Get Shipment Details by passing buyer Reference ID * @param {string} [buyerWarehouseCode] Get Shipping Details based on buyer warehouse code. This value should be same as \'shipToParty.partyId\' in the Shipment. * @param {string} [sellerWarehouseCode] Get Shipping Details based on vendor warehouse code. This value should be same as \'sellingParty.partyId\' in the Shipment. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getShipmentDetails(limit, sortOrder, nextToken, createdAfter, createdBefore, shipmentConfirmedBefore, shipmentConfirmedAfter, packageLabelCreatedBefore, packageLabelCreatedAfter, shippedBefore, shippedAfter, estimatedDeliveryBefore, estimatedDeliveryAfter, shipmentDeliveryBefore, shipmentDeliveryAfter, requestedPickUpBefore, requestedPickUpAfter, scheduledPickUpBefore, scheduledPickUpAfter, currentShipmentStatus, vendorShipmentIdentifier, buyerReferenceNumber, buyerWarehouseCode, sellerWarehouseCode, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getShipmentDetails(limit, sortOrder, nextToken, createdAfter, createdBefore, shipmentConfirmedBefore, shipmentConfirmedAfter, packageLabelCreatedBefore, packageLabelCreatedAfter, shippedBefore, shippedAfter, estimatedDeliveryBefore, estimatedDeliveryAfter, shipmentDeliveryBefore, shipmentDeliveryAfter, requestedPickUpBefore, requestedPickUpAfter, scheduledPickUpBefore, scheduledPickUpAfter, currentShipmentStatus, vendorShipmentIdentifier, buyerReferenceNumber, buyerWarehouseCode, sellerWarehouseCode, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Returns small parcel shipment labels based on the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {number} [limit] The limit to the number of records returned. Default value is 50 records. * @param {'ASC' | 'DESC'} [sortOrder] Sort the list by shipment label creation date in ascending or descending order. * @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 `pageSize` 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 {string} [labelCreatedAfter] Shipment labels created after this time will be included in the result. This field must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) datetime format. * @param {string} [labelCreatedBefore] Shipment labels created before this time will be included in the result. This field must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) datetime format. * @param {string} [buyerReferenceNumber] Get Shipment labels by passing buyer reference number. * @param {string} [vendorShipmentIdentifier] Get Shipment labels by passing vendor shipment identifier. * @param {string} [sellerWarehouseCode] Get Shipping labels based on vendor warehouse code. This value must be same as the `sellingParty.partyId` in the shipment. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getShipmentLabels(limit, sortOrder, nextToken, labelCreatedAfter, labelCreatedBefore, buyerReferenceNumber, vendorShipmentIdentifier, sellerWarehouseCode, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getShipmentLabels(limit, sortOrder, nextToken, labelCreatedAfter, labelCreatedBefore, buyerReferenceNumber, vendorShipmentIdentifier, sellerWarehouseCode, 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). * @summary SubmitShipmentConfirmations * @param {SubmitShipmentConfirmationsRequest} body A request to submit shipment confirmation. * @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); }, /** * Submits one or more shipment request 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). * @summary SubmitShipments * @param {SubmitShipments} body A request to submit shipment request. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async submitShipments(body, options) {