@sp-api-sdk/fulfillment-inbound-api-v0
Version:
The Selling Partner API for Fulfillment Inbound lets you create applications that create and update inbound shipments of inventory to Amazon's fulfillment network.
53 lines (52 loc) • 1.62 kB
JavaScript
import { createAxiosInstance } from '@sp-api-sdk/common';
import { Configuration, FulfillmentInboundApi } from './api-model';
export const clientRateLimits = [
{
method: 'get',
// eslint-disable-next-line prefer-regex-literals
urlRegex: new RegExp('^/fba/inbound/v0/prepInstructions$'),
rate: 2,
burst: 30,
},
{
method: 'get',
// eslint-disable-next-line prefer-regex-literals
urlRegex: new RegExp('^/fba/inbound/v0/shipments/[^/]*/labels$'),
rate: 2,
burst: 30,
},
{
method: 'get',
// eslint-disable-next-line prefer-regex-literals
urlRegex: new RegExp('^/fba/inbound/v0/shipments/[^/]*/billOfLading$'),
rate: 2,
burst: 30,
},
{
method: 'get',
// eslint-disable-next-line prefer-regex-literals
urlRegex: new RegExp('^/fba/inbound/v0/shipments$'),
rate: 2,
burst: 30,
},
{
method: 'get',
// eslint-disable-next-line prefer-regex-literals
urlRegex: new RegExp('^/fba/inbound/v0/shipments/[^/]*/items$'),
rate: 2,
burst: 30,
},
{
method: 'get',
// eslint-disable-next-line prefer-regex-literals
urlRegex: new RegExp('^/fba/inbound/v0/shipmentItems$'),
rate: 2,
burst: 30,
},
];
export class FulfillmentInboundApiClient extends FulfillmentInboundApi {
constructor(configuration) {
const { axios, endpoint } = createAxiosInstance(configuration, clientRateLimits);
super(new Configuration(), endpoint, axios);
}
}