UNPKG

@scaleleap/selling-partner-api-sdk

Version:

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

575 lines • 43.4 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Selling Partner API for Merchant Fulfillment * With the Selling Partner API for Merchant Fulfillment, you can build applications that sellers can use to purchase shipping for non-Prime and Prime orders using Amazon\'s Buy Shipping Services. * * The version of the OpenAPI document: v0 * * * 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.MerchantFulfillmentApi = exports.MerchantFulfillmentApiFactory = exports.MerchantFulfillmentApiFp = exports.MerchantFulfillmentApiAxiosParamCreator = exports.UnitOfWeight = exports.UnitOfLength = exports.StandardIdForLabel = exports.ShipmentStatus = exports.PredefinedPackageDimensions = exports.LiquidVolumeUnitEnum = exports.LabelFormat = exports.InputTargetType = exports.HazmatType = exports.FileType = exports.DeliveryExperienceType = exports.DeliveryExperienceOption = exports.DangerousGoodsDetailsPackingInstructionEnum = exports.DangerousGoodsDetailsPackingGroupEnum = exports.CarrierWillPickUpOption = 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"); /** * Carrier will pick up option. * @export * @enum {string} */ var CarrierWillPickUpOption; (function (CarrierWillPickUpOption) { CarrierWillPickUpOption["CarrierWillPickUp"] = "CarrierWillPickUp"; CarrierWillPickUpOption["ShipperWillDropOff"] = "ShipperWillDropOff"; CarrierWillPickUpOption["NoPreference"] = "NoPreference"; })(CarrierWillPickUpOption || (exports.CarrierWillPickUpOption = CarrierWillPickUpOption = {})); /** * @export * @enum {string} */ var DangerousGoodsDetailsPackingGroupEnum; (function (DangerousGoodsDetailsPackingGroupEnum) { DangerousGoodsDetailsPackingGroupEnum["I"] = "I"; DangerousGoodsDetailsPackingGroupEnum["Ii"] = "II"; DangerousGoodsDetailsPackingGroupEnum["Iii"] = "III"; })(DangerousGoodsDetailsPackingGroupEnum || (exports.DangerousGoodsDetailsPackingGroupEnum = DangerousGoodsDetailsPackingGroupEnum = {})); /** * @export * @enum {string} */ var DangerousGoodsDetailsPackingInstructionEnum; (function (DangerousGoodsDetailsPackingInstructionEnum) { DangerousGoodsDetailsPackingInstructionEnum["Pi965SectionIa"] = "PI965_SECTION_IA"; DangerousGoodsDetailsPackingInstructionEnum["Pi965SectionIb"] = "PI965_SECTION_IB"; DangerousGoodsDetailsPackingInstructionEnum["Pi965SectionIi"] = "PI965_SECTION_II"; DangerousGoodsDetailsPackingInstructionEnum["Pi966SectionI"] = "PI966_SECTION_I"; DangerousGoodsDetailsPackingInstructionEnum["Pi966SectionIi"] = "PI966_SECTION_II"; DangerousGoodsDetailsPackingInstructionEnum["Pi967SectionI"] = "PI967_SECTION_I"; DangerousGoodsDetailsPackingInstructionEnum["Pi967SectionIi"] = "PI967_SECTION_II"; DangerousGoodsDetailsPackingInstructionEnum["Pi968SectionIa"] = "PI968_SECTION_IA"; DangerousGoodsDetailsPackingInstructionEnum["Pi968SectionIb"] = "PI968_SECTION_IB"; DangerousGoodsDetailsPackingInstructionEnum["Pi969SectionI"] = "PI969_SECTION_I"; DangerousGoodsDetailsPackingInstructionEnum["Pi969SectionIi"] = "PI969_SECTION_II"; DangerousGoodsDetailsPackingInstructionEnum["Pi970SectionI"] = "PI970_SECTION_I"; DangerousGoodsDetailsPackingInstructionEnum["Pi970SectionIi"] = "PI970_SECTION_II"; })(DangerousGoodsDetailsPackingInstructionEnum || (exports.DangerousGoodsDetailsPackingInstructionEnum = DangerousGoodsDetailsPackingInstructionEnum = {})); /** * The delivery confirmation level. * @export * @enum {string} */ var DeliveryExperienceOption; (function (DeliveryExperienceOption) { DeliveryExperienceOption["DeliveryConfirmationWithAdultSignature"] = "DeliveryConfirmationWithAdultSignature"; DeliveryExperienceOption["DeliveryConfirmationWithSignature"] = "DeliveryConfirmationWithSignature"; DeliveryExperienceOption["DeliveryConfirmationWithoutSignature"] = "DeliveryConfirmationWithoutSignature"; DeliveryExperienceOption["NoTracking"] = "NoTracking"; DeliveryExperienceOption["NoPreference"] = "NoPreference"; })(DeliveryExperienceOption || (exports.DeliveryExperienceOption = DeliveryExperienceOption = {})); /** * The delivery confirmation level. * @export * @enum {string} */ var DeliveryExperienceType; (function (DeliveryExperienceType) { DeliveryExperienceType["DeliveryConfirmationWithAdultSignature"] = "DeliveryConfirmationWithAdultSignature"; DeliveryExperienceType["DeliveryConfirmationWithSignature"] = "DeliveryConfirmationWithSignature"; DeliveryExperienceType["DeliveryConfirmationWithoutSignature"] = "DeliveryConfirmationWithoutSignature"; DeliveryExperienceType["NoTracking"] = "NoTracking"; })(DeliveryExperienceType || (exports.DeliveryExperienceType = DeliveryExperienceType = {})); /** * The file type for a label. * @export * @enum {string} */ var FileType; (function (FileType) { FileType["ApplicationPdf"] = "application/pdf"; FileType["ApplicationZpl"] = "application/zpl"; FileType["ImagePng"] = "image/png"; })(FileType || (exports.FileType = FileType = {})); /** * Hazardous materials options for a package. Consult the terms and conditions for each carrier for more information on hazardous materials. * @export * @enum {string} */ var HazmatType; (function (HazmatType) { HazmatType["None"] = "None"; HazmatType["LqHazmat"] = "LQHazmat"; })(HazmatType || (exports.HazmatType = HazmatType = {})); /** * Indicates whether the additional seller input is at the item or shipment level. * @export * @enum {string} */ var InputTargetType; (function (InputTargetType) { InputTargetType["ShipmentLevel"] = "SHIPMENT_LEVEL"; InputTargetType["ItemLevel"] = "ITEM_LEVEL"; })(InputTargetType || (exports.InputTargetType = InputTargetType = {})); /** * The label format. * @export * @enum {string} */ var LabelFormat; (function (LabelFormat) { LabelFormat["Pdf"] = "PDF"; LabelFormat["Png"] = "PNG"; LabelFormat["Zpl203"] = "ZPL203"; LabelFormat["Zpl300"] = "ZPL300"; LabelFormat["ShippingServiceDefault"] = "ShippingServiceDefault"; })(LabelFormat || (exports.LabelFormat = LabelFormat = {})); /** * @export * @enum {string} */ var LiquidVolumeUnitEnum; (function (LiquidVolumeUnitEnum) { LiquidVolumeUnitEnum["Ml"] = "ML"; LiquidVolumeUnitEnum["L"] = "L"; LiquidVolumeUnitEnum["FlOz"] = "FL_OZ"; LiquidVolumeUnitEnum["Gal"] = "GAL"; LiquidVolumeUnitEnum["Pt"] = "PT"; LiquidVolumeUnitEnum["Qt"] = "QT"; LiquidVolumeUnitEnum["C"] = "C"; })(LiquidVolumeUnitEnum || (exports.LiquidVolumeUnitEnum = LiquidVolumeUnitEnum = {})); /** * An enumeration of predefined parcel tokens. If you specify a `PredefinedPackageDimensions` token, you are not obligated to use a branded package from a carrier. For example, if you specify the `FedEx_Box_10kg` token, you do not have to use that particular package from FedEx. You are only obligated to use a box that matches the dimensions specified by the token. Note: Carriers can have restrictions on the type of package allowed for certain ship methods. Check the carrier website for details. Example: Flat rate pricing is available when materials are sent by USPS in a USPS-produced Flat Rate envelope or box. * @export * @enum {string} */ var PredefinedPackageDimensions; (function (PredefinedPackageDimensions) { PredefinedPackageDimensions["FedExBox10kg"] = "FedEx_Box_10kg"; PredefinedPackageDimensions["FedExBox25kg"] = "FedEx_Box_25kg"; PredefinedPackageDimensions["FedExBoxExtraLarge1"] = "FedEx_Box_Extra_Large_1"; PredefinedPackageDimensions["FedExBoxExtraLarge2"] = "FedEx_Box_Extra_Large_2"; PredefinedPackageDimensions["FedExBoxLarge1"] = "FedEx_Box_Large_1"; PredefinedPackageDimensions["FedExBoxLarge2"] = "FedEx_Box_Large_2"; PredefinedPackageDimensions["FedExBoxMedium1"] = "FedEx_Box_Medium_1"; PredefinedPackageDimensions["FedExBoxMedium2"] = "FedEx_Box_Medium_2"; PredefinedPackageDimensions["FedExBoxSmall1"] = "FedEx_Box_Small_1"; PredefinedPackageDimensions["FedExBoxSmall2"] = "FedEx_Box_Small_2"; PredefinedPackageDimensions["FedExEnvelope"] = "FedEx_Envelope"; PredefinedPackageDimensions["FedExPaddedPak"] = "FedEx_Padded_Pak"; PredefinedPackageDimensions["FedExPak1"] = "FedEx_Pak_1"; PredefinedPackageDimensions["FedExPak2"] = "FedEx_Pak_2"; PredefinedPackageDimensions["FedExTube"] = "FedEx_Tube"; PredefinedPackageDimensions["FedExXlPak"] = "FedEx_XL_Pak"; PredefinedPackageDimensions["UpsBox10kg"] = "UPS_Box_10kg"; PredefinedPackageDimensions["UpsBox25kg"] = "UPS_Box_25kg"; PredefinedPackageDimensions["UpsExpressBox"] = "UPS_Express_Box"; PredefinedPackageDimensions["UpsExpressBoxLarge"] = "UPS_Express_Box_Large"; PredefinedPackageDimensions["UpsExpressBoxMedium"] = "UPS_Express_Box_Medium"; PredefinedPackageDimensions["UpsExpressBoxSmall"] = "UPS_Express_Box_Small"; PredefinedPackageDimensions["UpsExpressEnvelope"] = "UPS_Express_Envelope"; PredefinedPackageDimensions["UpsExpressHardPak"] = "UPS_Express_Hard_Pak"; PredefinedPackageDimensions["UpsExpressLegalEnvelope"] = "UPS_Express_Legal_Envelope"; PredefinedPackageDimensions["UpsExpressPak"] = "UPS_Express_Pak"; PredefinedPackageDimensions["UpsExpressTube"] = "UPS_Express_Tube"; PredefinedPackageDimensions["UpsLaboratoryPak"] = "UPS_Laboratory_Pak"; PredefinedPackageDimensions["UpsPadPak"] = "UPS_Pad_Pak"; PredefinedPackageDimensions["UpsPallet"] = "UPS_Pallet"; PredefinedPackageDimensions["UspsCard"] = "USPS_Card"; PredefinedPackageDimensions["UspsFlat"] = "USPS_Flat"; PredefinedPackageDimensions["UspsFlatRateCardboardEnvelope"] = "USPS_FlatRateCardboardEnvelope"; PredefinedPackageDimensions["UspsFlatRateEnvelope"] = "USPS_FlatRateEnvelope"; PredefinedPackageDimensions["UspsFlatRateGiftCardEnvelope"] = "USPS_FlatRateGiftCardEnvelope"; PredefinedPackageDimensions["UspsFlatRateLegalEnvelope"] = "USPS_FlatRateLegalEnvelope"; PredefinedPackageDimensions["UspsFlatRatePaddedEnvelope"] = "USPS_FlatRatePaddedEnvelope"; PredefinedPackageDimensions["UspsFlatRateWindowEnvelope"] = "USPS_FlatRateWindowEnvelope"; PredefinedPackageDimensions["UspsLargeFlatRateBoardGameBox"] = "USPS_LargeFlatRateBoardGameBox"; PredefinedPackageDimensions["UspsLargeFlatRateBox"] = "USPS_LargeFlatRateBox"; PredefinedPackageDimensions["UspsLetter"] = "USPS_Letter"; PredefinedPackageDimensions["UspsMediumFlatRateBox1"] = "USPS_MediumFlatRateBox1"; PredefinedPackageDimensions["UspsMediumFlatRateBox2"] = "USPS_MediumFlatRateBox2"; PredefinedPackageDimensions["UspsRegionalRateBoxA1"] = "USPS_RegionalRateBoxA1"; PredefinedPackageDimensions["UspsRegionalRateBoxA2"] = "USPS_RegionalRateBoxA2"; PredefinedPackageDimensions["UspsRegionalRateBoxB1"] = "USPS_RegionalRateBoxB1"; PredefinedPackageDimensions["UspsRegionalRateBoxB2"] = "USPS_RegionalRateBoxB2"; PredefinedPackageDimensions["UspsRegionalRateBoxC"] = "USPS_RegionalRateBoxC"; PredefinedPackageDimensions["UspsSmallFlatRateBox"] = "USPS_SmallFlatRateBox"; PredefinedPackageDimensions["UspsSmallFlatRateEnvelope"] = "USPS_SmallFlatRateEnvelope"; })(PredefinedPackageDimensions || (exports.PredefinedPackageDimensions = PredefinedPackageDimensions = {})); /** * The shipment status. * @export * @enum {string} */ var ShipmentStatus; (function (ShipmentStatus) { ShipmentStatus["Purchased"] = "Purchased"; ShipmentStatus["RefundPending"] = "RefundPending"; ShipmentStatus["RefundRejected"] = "RefundRejected"; ShipmentStatus["RefundApplied"] = "RefundApplied"; })(ShipmentStatus || (exports.ShipmentStatus = ShipmentStatus = {})); /** * The type of standard identifier to print on the label. * @export * @enum {string} */ var StandardIdForLabel; (function (StandardIdForLabel) { StandardIdForLabel["AmazonOrderId"] = "AmazonOrderId"; })(StandardIdForLabel || (exports.StandardIdForLabel = StandardIdForLabel = {})); /** * The unit of length. * @export * @enum {string} */ var UnitOfLength; (function (UnitOfLength) { UnitOfLength["Inches"] = "inches"; UnitOfLength["Centimeters"] = "centimeters"; })(UnitOfLength || (exports.UnitOfLength = UnitOfLength = {})); /** * The unit of weight. * @export * @enum {string} */ var UnitOfWeight; (function (UnitOfWeight) { UnitOfWeight["Oz"] = "oz"; UnitOfWeight["G"] = "g"; })(UnitOfWeight || (exports.UnitOfWeight = UnitOfWeight = {})); /** * MerchantFulfillmentApi - axios parameter creator * @export */ const MerchantFulfillmentApiAxiosParamCreator = function (configuration) { return { /** * Cancel the shipment indicated by the specified shipment identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {string} shipmentId The Amazon-defined shipment identifier for the shipment to cancel. * @param {*} [options] Override http request option. * @throws {RequiredError} */ cancelShipment: async (shipmentId, options = {}) => { // verify required parameter 'shipmentId' is not null or undefined (0, common_1.assertParamExists)('cancelShipment', 'shipmentId', shipmentId); const localVarPath = `/mfn/v0/shipments/{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: 'DELETE', ...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, }; }, /** * Create a shipment with the information provided. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {CreateShipmentRequest} body The request schema for the `CreateShipment` operation. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createShipment: async (body, options = {}) => { // verify required parameter 'body' is not null or undefined (0, common_1.assertParamExists)('createShipment', 'body', body); const localVarPath = `/mfn/v0/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, }; }, /** * Gets a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {GetAdditionalSellerInputsRequest} body The request schema for the `GetAdditionalSellerInputs` operation. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAdditionalSellerInputs: async (body, options = {}) => { // verify required parameter 'body' is not null or undefined (0, common_1.assertParamExists)('getAdditionalSellerInputs', 'body', body); const localVarPath = `/mfn/v0/additionalSellerInputs`; // 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, }; }, /** * Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 6 | 12 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {GetEligibleShipmentServicesRequest} body The request schema for the `GetEligibleShipmentServices` operation. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getEligibleShipmentServices: async (body, options = {}) => { // verify required parameter 'body' is not null or undefined (0, common_1.assertParamExists)('getEligibleShipmentServices', 'body', body); const localVarPath = `/mfn/v0/eligibleShippingServices`; // 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, }; }, /** * Returns the shipment information for an existing shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {string} shipmentId The Amazon-defined shipment identifier for the shipment. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getShipment: async (shipmentId, options = {}) => { // verify required parameter 'shipmentId' is not null or undefined (0, common_1.assertParamExists)('getShipment', 'shipmentId', shipmentId); const localVarPath = `/mfn/v0/shipments/{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 = {}; (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.MerchantFulfillmentApiAxiosParamCreator = MerchantFulfillmentApiAxiosParamCreator; /** * MerchantFulfillmentApi - functional programming interface * @export */ const MerchantFulfillmentApiFp = function (configuration) { const localVarAxiosParamCreator = (0, exports.MerchantFulfillmentApiAxiosParamCreator)(configuration); return { /** * Cancel the shipment indicated by the specified shipment identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {string} shipmentId The Amazon-defined shipment identifier for the shipment to cancel. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async cancelShipment(shipmentId, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.cancelShipment(shipmentId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Create a shipment with the information provided. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {CreateShipmentRequest} body The request schema for the `CreateShipment` operation. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createShipment(body, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.createShipment(body, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Gets a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {GetAdditionalSellerInputsRequest} body The request schema for the `GetAdditionalSellerInputs` operation. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getAdditionalSellerInputs(body, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getAdditionalSellerInputs(body, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 6 | 12 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {GetEligibleShipmentServicesRequest} body The request schema for the `GetEligibleShipmentServices` operation. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getEligibleShipmentServices(body, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getEligibleShipmentServices(body, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Returns the shipment information for an existing shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {string} shipmentId The Amazon-defined shipment identifier for the shipment. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getShipment(shipmentId, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getShipment(shipmentId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, }; }; exports.MerchantFulfillmentApiFp = MerchantFulfillmentApiFp; /** * MerchantFulfillmentApi - factory interface * @export */ const MerchantFulfillmentApiFactory = function (configuration, basePath, axios) { const localVarFp = (0, exports.MerchantFulfillmentApiFp)(configuration); return { /** * Cancel the shipment indicated by the specified shipment identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {string} shipmentId The Amazon-defined shipment identifier for the shipment to cancel. * @param {*} [options] Override http request option. * @throws {RequiredError} */ cancelShipment(shipmentId, options) { return localVarFp.cancelShipment(shipmentId, options).then((request) => request(axios, basePath)); }, /** * Create a shipment with the information provided. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {CreateShipmentRequest} body The request schema for the `CreateShipment` operation. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createShipment(body, options) { return localVarFp.createShipment(body, options).then((request) => request(axios, basePath)); }, /** * Gets a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {GetAdditionalSellerInputsRequest} body The request schema for the `GetAdditionalSellerInputs` operation. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAdditionalSellerInputs(body, options) { return localVarFp.getAdditionalSellerInputs(body, options).then((request) => request(axios, basePath)); }, /** * Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 6 | 12 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {GetEligibleShipmentServicesRequest} body The request schema for the `GetEligibleShipmentServices` operation. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getEligibleShipmentServices(body, options) { return localVarFp.getEligibleShipmentServices(body, options).then((request) => request(axios, basePath)); }, /** * Returns the shipment information for an existing shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {string} shipmentId The Amazon-defined shipment identifier for the shipment. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getShipment(shipmentId, options) { return localVarFp.getShipment(shipmentId, options).then((request) => request(axios, basePath)); }, }; }; exports.MerchantFulfillmentApiFactory = MerchantFulfillmentApiFactory; /** * MerchantFulfillmentApi - object-oriented interface * @export * @class MerchantFulfillmentApi * @extends {BaseAPI} */ class MerchantFulfillmentApi extends base_1.BaseAPI { /** * Cancel the shipment indicated by the specified shipment identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {MerchantFulfillmentApiCancelShipmentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MerchantFulfillmentApi */ cancelShipment(requestParameters, options) { return (0, exports.MerchantFulfillmentApiFp)(this.configuration).cancelShipment(requestParameters.shipmentId, options).then((request) => request(this.axios, this.basePath)); } /** * Create a shipment with the information provided. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {MerchantFulfillmentApiCreateShipmentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MerchantFulfillmentApi */ createShipment(requestParameters, options) { return (0, exports.MerchantFulfillmentApiFp)(this.configuration).createShipment(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } /** * Gets a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {MerchantFulfillmentApiGetAdditionalSellerInputsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MerchantFulfillmentApi */ getAdditionalSellerInputs(requestParameters, options) { return (0, exports.MerchantFulfillmentApiFp)(this.configuration).getAdditionalSellerInputs(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } /** * Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 6 | 12 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {MerchantFulfillmentApiGetEligibleShipmentServicesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MerchantFulfillmentApi */ getEligibleShipmentServices(requestParameters, options) { return (0, exports.MerchantFulfillmentApiFp)(this.configuration).getEligibleShipmentServices(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } /** * Returns the shipment information for an existing shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the SP-API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {MerchantFulfillmentApiGetShipmentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MerchantFulfillmentApi */ getShipment(requestParameters, options) { return (0, exports.MerchantFulfillmentApiFp)(this.configuration).getShipment(requestParameters.shipmentId, options).then((request) => request(this.axios, this.basePath)); } } exports.MerchantFulfillmentApi = MerchantFulfillmentApi; //# sourceMappingURL=api.js.map