UNPKG

@sp-api-sdk/merchant-fulfillment-api-v0

Version:

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.

50 lines (49 loc) 1.6 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MerchantFulfillmentApiClient = exports.clientRateLimits = void 0; const common_1 = require("@sp-api-sdk/common"); const api_model_1 = require("./api-model"); exports.clientRateLimits = [ { method: 'post', // eslint-disable-next-line prefer-regex-literals urlRegex: new RegExp('^/mfn/v0/eligibleShippingServices$'), rate: 6, burst: 12, }, { method: 'get', // eslint-disable-next-line prefer-regex-literals urlRegex: new RegExp('^/mfn/v0/shipments/[^/]*$'), rate: 1, burst: 1, }, { method: 'delete', // eslint-disable-next-line prefer-regex-literals urlRegex: new RegExp('^/mfn/v0/shipments/[^/]*$'), rate: 1, burst: 1, }, { method: 'post', // eslint-disable-next-line prefer-regex-literals urlRegex: new RegExp('^/mfn/v0/shipments$'), rate: 2, burst: 2, }, { method: 'post', // eslint-disable-next-line prefer-regex-literals urlRegex: new RegExp('^/mfn/v0/additionalSellerInputs$'), rate: 1, burst: 1, }, ]; class MerchantFulfillmentApiClient extends api_model_1.MerchantFulfillmentApi { constructor(configuration) { const { axios, endpoint } = (0, common_1.createAxiosInstance)(configuration, exports.clientRateLimits); super(new api_model_1.Configuration(), endpoint, axios); } } exports.MerchantFulfillmentApiClient = MerchantFulfillmentApiClient;