@sp-api-sdk/fba-inbound-eligibility-api-v1
Advanced tools
Comparing version 2.0.7 to 2.1.0
@@ -19,3 +19,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.FbaInboundApi = exports.FbaInboundApiFactory = exports.FbaInboundApiFp = exports.FbaInboundApiAxiosParamCreator = void 0; | ||
exports.GetItemEligibilityPreviewProgramEnum = exports.FbaInboundApi = exports.FbaInboundApiFactory = exports.FbaInboundApiFp = exports.FbaInboundApiAxiosParamCreator = void 0; | ||
const axios_1 = __importDefault(require("axios")); | ||
@@ -36,3 +36,3 @@ // Some imports not used depending on template conditions | ||
* @param {string} asin The ASIN of the item for which you want an eligibility preview. | ||
* @param {'INBOUND' | 'COMMINGLING'} program The program that you want to check eligibility against. | ||
* @param {GetItemEligibilityPreviewProgramEnum} program The program that you want to check eligibility against. | ||
* @param {Array<string>} [marketplaceIds] The identifier for the marketplace in which you want to determine eligibility. Required only when program=INBOUND. | ||
@@ -87,3 +87,3 @@ * @param {*} [options] Override http request option. | ||
* @param {string} asin The ASIN of the item for which you want an eligibility preview. | ||
* @param {'INBOUND' | 'COMMINGLING'} program The program that you want to check eligibility against. | ||
* @param {GetItemEligibilityPreviewProgramEnum} program The program that you want to check eligibility against. | ||
* @param {Array<string>} [marketplaceIds] The identifier for the marketplace in which you want to determine eligibility. Required only when program=INBOUND. | ||
@@ -95,3 +95,5 @@ * @param {*} [options] Override http request option. | ||
const localVarAxiosArgs = await localVarAxiosParamCreator.getItemEligibilityPreview(asin, program, marketplaceIds, options); | ||
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); | ||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0; | ||
const localVarOperationServerBasePath = base_1.operationServerMap['FbaInboundApi.getItemEligibilityPreview']?.[localVarOperationServerIndex]?.url; | ||
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); | ||
}, | ||
@@ -139,1 +141,8 @@ }; | ||
exports.FbaInboundApi = FbaInboundApi; | ||
/** | ||
* @export | ||
*/ | ||
exports.GetItemEligibilityPreviewProgramEnum = { | ||
Inbound: 'INBOUND', | ||
Commingling: 'COMMINGLING' | ||
}; |
@@ -19,3 +19,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0; | ||
exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0; | ||
const axios_1 = __importDefault(require("axios")); | ||
@@ -47,3 +47,3 @@ exports.BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, ""); | ||
this.configuration = configuration; | ||
this.basePath = configuration.basePath || this.basePath; | ||
this.basePath = configuration.basePath ?? basePath; | ||
} | ||
@@ -69,1 +69,6 @@ } | ||
exports.RequiredError = RequiredError; | ||
/** | ||
* | ||
* @export | ||
*/ | ||
exports.operationServerMap = {}; |
@@ -141,3 +141,3 @@ "use strict"; | ||
return (axios = globalAxios, basePath = BASE_PATH) => { | ||
const axiosRequestArgs = { ...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url }; | ||
const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url }; | ||
return axios.request(axiosRequestArgs); | ||
@@ -144,0 +144,0 @@ }; |
@@ -53,2 +53,9 @@ "use strict"; | ||
/** | ||
* override server index | ||
* | ||
* @type {number} | ||
* @memberof Configuration | ||
*/ | ||
serverIndex; | ||
/** | ||
* base options for axios calls | ||
@@ -74,2 +81,3 @@ * | ||
this.basePath = param.basePath; | ||
this.serverIndex = param.serverIndex; | ||
this.baseOptions = param.baseOptions; | ||
@@ -76,0 +84,0 @@ this.formDataCtor = param.formDataCtor; |
@@ -19,3 +19,3 @@ /* tslint:disable */ | ||
// @ts-ignore | ||
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI } from '../base'; | ||
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, operationServerMap } from '../base'; | ||
/** | ||
@@ -30,3 +30,3 @@ * FbaInboundApi - axios parameter creator | ||
* @param {string} asin The ASIN of the item for which you want an eligibility preview. | ||
* @param {'INBOUND' | 'COMMINGLING'} program The program that you want to check eligibility against. | ||
* @param {GetItemEligibilityPreviewProgramEnum} program The program that you want to check eligibility against. | ||
* @param {Array<string>} [marketplaceIds] The identifier for the marketplace in which you want to determine eligibility. Required only when program=INBOUND. | ||
@@ -80,3 +80,3 @@ * @param {*} [options] Override http request option. | ||
* @param {string} asin The ASIN of the item for which you want an eligibility preview. | ||
* @param {'INBOUND' | 'COMMINGLING'} program The program that you want to check eligibility against. | ||
* @param {GetItemEligibilityPreviewProgramEnum} program The program that you want to check eligibility against. | ||
* @param {Array<string>} [marketplaceIds] The identifier for the marketplace in which you want to determine eligibility. Required only when program=INBOUND. | ||
@@ -88,3 +88,5 @@ * @param {*} [options] Override http request option. | ||
const localVarAxiosArgs = await localVarAxiosParamCreator.getItemEligibilityPreview(asin, program, marketplaceIds, options); | ||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); | ||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0; | ||
const localVarOperationServerBasePath = operationServerMap['FbaInboundApi.getItemEligibilityPreview']?.[localVarOperationServerIndex]?.url; | ||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); | ||
}, | ||
@@ -129,1 +131,8 @@ }; | ||
} | ||
/** | ||
* @export | ||
*/ | ||
export const GetItemEligibilityPreviewProgramEnum = { | ||
Inbound: 'INBOUND', | ||
Commingling: 'COMMINGLING' | ||
}; |
@@ -40,3 +40,3 @@ /* tslint:disable */ | ||
this.configuration = configuration; | ||
this.basePath = configuration.basePath || this.basePath; | ||
this.basePath = configuration.basePath ?? basePath; | ||
} | ||
@@ -60,1 +60,6 @@ } | ||
} | ||
/** | ||
* | ||
* @export | ||
*/ | ||
export const operationServerMap = {}; |
@@ -130,5 +130,5 @@ /* tslint:disable */ | ||
return (axios = globalAxios, basePath = BASE_PATH) => { | ||
const axiosRequestArgs = { ...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url }; | ||
const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url }; | ||
return axios.request(axiosRequestArgs); | ||
}; | ||
}; |
@@ -50,2 +50,9 @@ /* tslint:disable */ | ||
/** | ||
* override server index | ||
* | ||
* @type {number} | ||
* @memberof Configuration | ||
*/ | ||
serverIndex; | ||
/** | ||
* base options for axios calls | ||
@@ -71,2 +78,3 @@ * | ||
this.basePath = param.basePath; | ||
this.serverIndex = param.serverIndex; | ||
this.baseOptions = param.baseOptions; | ||
@@ -73,0 +81,0 @@ this.formDataCtor = param.formDataCtor; |
@@ -13,6 +13,6 @@ /** | ||
import type { Configuration } from '../configuration'; | ||
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; | ||
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; | ||
import globalAxios from 'axios'; | ||
import { RequestArgs, BaseAPI } from '../base'; | ||
import { GetItemEligibilityPreviewResponse } from '../models'; | ||
import { type RequestArgs, BaseAPI } from '../base'; | ||
import type { GetItemEligibilityPreviewResponse } from '../models'; | ||
/** | ||
@@ -26,3 +26,3 @@ * FbaInboundApi - axios parameter creator | ||
* @param {string} asin The ASIN of the item for which you want an eligibility preview. | ||
* @param {'INBOUND' | 'COMMINGLING'} program The program that you want to check eligibility against. | ||
* @param {GetItemEligibilityPreviewProgramEnum} program The program that you want to check eligibility against. | ||
* @param {Array<string>} [marketplaceIds] The identifier for the marketplace in which you want to determine eligibility. Required only when program=INBOUND. | ||
@@ -32,3 +32,3 @@ * @param {*} [options] Override http request option. | ||
*/ | ||
getItemEligibilityPreview: (asin: string, program: 'INBOUND' | 'COMMINGLING', marketplaceIds?: Array<string>, options?: AxiosRequestConfig) => Promise<RequestArgs>; | ||
getItemEligibilityPreview: (asin: string, program: GetItemEligibilityPreviewProgramEnum, marketplaceIds?: Array<string>, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; | ||
}; | ||
@@ -43,3 +43,3 @@ /** | ||
* @param {string} asin The ASIN of the item for which you want an eligibility preview. | ||
* @param {'INBOUND' | 'COMMINGLING'} program The program that you want to check eligibility against. | ||
* @param {GetItemEligibilityPreviewProgramEnum} program The program that you want to check eligibility against. | ||
* @param {Array<string>} [marketplaceIds] The identifier for the marketplace in which you want to determine eligibility. Required only when program=INBOUND. | ||
@@ -49,3 +49,3 @@ * @param {*} [options] Override http request option. | ||
*/ | ||
getItemEligibilityPreview(asin: string, program: 'INBOUND' | 'COMMINGLING', marketplaceIds?: Array<string>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetItemEligibilityPreviewResponse>>; | ||
getItemEligibilityPreview(asin: string, program: GetItemEligibilityPreviewProgramEnum, marketplaceIds?: Array<string>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetItemEligibilityPreviewResponse>>; | ||
}; | ||
@@ -63,3 +63,3 @@ /** | ||
*/ | ||
getItemEligibilityPreview(requestParameters: FbaInboundApiGetItemEligibilityPreviewRequest, options?: AxiosRequestConfig): AxiosPromise<GetItemEligibilityPreviewResponse>; | ||
getItemEligibilityPreview(requestParameters: FbaInboundApiGetItemEligibilityPreviewRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetItemEligibilityPreviewResponse>; | ||
}; | ||
@@ -83,3 +83,3 @@ /** | ||
*/ | ||
readonly program: 'INBOUND' | 'COMMINGLING'; | ||
readonly program: GetItemEligibilityPreviewProgramEnum; | ||
/** | ||
@@ -106,3 +106,11 @@ * The identifier for the marketplace in which you want to determine eligibility. Required only when program=INBOUND. | ||
*/ | ||
getItemEligibilityPreview(requestParameters: FbaInboundApiGetItemEligibilityPreviewRequest, options?: AxiosRequestConfig): Promise<globalAxios.AxiosResponse<GetItemEligibilityPreviewResponse, any>>; | ||
getItemEligibilityPreview(requestParameters: FbaInboundApiGetItemEligibilityPreviewRequest, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<GetItemEligibilityPreviewResponse, any>>; | ||
} | ||
/** | ||
* @export | ||
*/ | ||
export declare const GetItemEligibilityPreviewProgramEnum: { | ||
readonly Inbound: "INBOUND"; | ||
readonly Commingling: "COMMINGLING"; | ||
}; | ||
export type GetItemEligibilityPreviewProgramEnum = typeof GetItemEligibilityPreviewProgramEnum[keyof typeof GetItemEligibilityPreviewProgramEnum]; |
@@ -13,3 +13,3 @@ /** | ||
import type { Configuration } from './configuration'; | ||
import type { AxiosInstance, AxiosRequestConfig } from 'axios'; | ||
import type { AxiosInstance, RawAxiosRequestConfig } from 'axios'; | ||
export declare const BASE_PATH: string; | ||
@@ -33,3 +33,3 @@ /** | ||
url: string; | ||
options: AxiosRequestConfig; | ||
options: RawAxiosRequestConfig; | ||
} | ||
@@ -57,1 +57,13 @@ /** | ||
} | ||
interface ServerMap { | ||
[key: string]: { | ||
url: string; | ||
description: string; | ||
}[]; | ||
} | ||
/** | ||
* | ||
* @export | ||
*/ | ||
export declare const operationServerMap: ServerMap; | ||
export {}; |
@@ -18,2 +18,3 @@ /** | ||
basePath?: string; | ||
serverIndex?: number; | ||
baseOptions?: any; | ||
@@ -58,2 +59,9 @@ formDataCtor?: new () => any; | ||
/** | ||
* override server index | ||
* | ||
* @type {number} | ||
* @memberof Configuration | ||
*/ | ||
serverIndex?: number; | ||
/** | ||
* base options for axios calls | ||
@@ -60,0 +68,0 @@ * |
@@ -12,3 +12,3 @@ /** | ||
*/ | ||
import { ItemEligibilityPreview } from './item-eligibility-preview'; | ||
import type { ItemEligibilityPreview } from './item-eligibility-preview'; | ||
/** | ||
@@ -15,0 +15,0 @@ * The response schema for the getItemEligibilityPreview operation. |
@@ -5,3 +5,3 @@ { | ||
"description": "With the FBA Inbound Eligibility API, you can build applications that let sellers get eligibility previews for items before shipping them to Amazon's fulfillment centers. With this API you can find out if an item is eligible for inbound shipment to Amazon's fulfillment centers in a specific marketplace. You can also find out if an item is eligible for using the manufacturer barcode for FBA inventory tracking. Sellers can use this information to inform their decisions about which items to ship Amazon's fulfillment centers.", | ||
"version": "2.0.7", | ||
"version": "2.1.0", | ||
"main": "dist/cjs/index.js", | ||
@@ -22,4 +22,4 @@ "module": "dist/es/index.js", | ||
"dependencies": { | ||
"@sp-api-sdk/common": "2.0.7", | ||
"axios": "^1.6.8" | ||
"@sp-api-sdk/common": "2.0.8", | ||
"axios": "^1.7.0" | ||
}, | ||
@@ -45,3 +45,3 @@ "repository": { | ||
], | ||
"gitHead": "556cf5234c43b36ddaffa12f795a925b1c7fc63b" | ||
"gitHead": "5a245a25a9f1765c825e2178668d4b0f4e44689b" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
89488
1813
+ Added@sp-api-sdk/auth@2.0.8(transitive)
+ Added@sp-api-sdk/common@2.0.8(transitive)
- Removed@sp-api-sdk/auth@2.0.7(transitive)
- Removed@sp-api-sdk/common@2.0.7(transitive)
Updated@sp-api-sdk/common@2.0.8
Updatedaxios@^1.7.0