@scaleleap/selling-partner-api-sdk
Version:
📦 A fully typed TypeScript and Node.js SDK library for Amazon Selling Partner API
188 lines • 13.7 kB
JavaScript
;
/* tslint:disable */
/* eslint-disable */
/**
* The Selling Partner API for Sellers
* The Selling Partner API for Sellers lets you retrieve information on behalf of sellers about their seller account, such as the marketplaces they participate in. Along with listing the marketplaces that a seller can sell in, the API also provides additional information about the marketplace such as the default language and the default currency. The API also provides seller-specific information such as whether the seller has suspended listings in that marketplace.
*
* 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.SellersApi = exports.SellersApiFactory = exports.SellersApiFp = exports.SellersApiAxiosParamCreator = exports.AccountSellingPlanEnum = exports.AccountBusinessTypeEnum = 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 AccountBusinessTypeEnum;
(function (AccountBusinessTypeEnum) {
AccountBusinessTypeEnum["Charity"] = "CHARITY";
AccountBusinessTypeEnum["Craftsman"] = "CRAFTSMAN";
AccountBusinessTypeEnum["NaturalPersonCompany"] = "NATURAL_PERSON_COMPANY";
AccountBusinessTypeEnum["PublicListed"] = "PUBLIC_LISTED";
AccountBusinessTypeEnum["PrivateLimited"] = "PRIVATE_LIMITED";
AccountBusinessTypeEnum["SoleProprietorship"] = "SOLE_PROPRIETORSHIP";
AccountBusinessTypeEnum["StateOwned"] = "STATE_OWNED";
AccountBusinessTypeEnum["Individual"] = "INDIVIDUAL";
})(AccountBusinessTypeEnum || (exports.AccountBusinessTypeEnum = AccountBusinessTypeEnum = {}));
/**
* @export
* @enum {string}
*/
var AccountSellingPlanEnum;
(function (AccountSellingPlanEnum) {
AccountSellingPlanEnum["Professional"] = "PROFESSIONAL";
AccountSellingPlanEnum["Individual"] = "INDIVIDUAL";
})(AccountSellingPlanEnum || (exports.AccountSellingPlanEnum = AccountSellingPlanEnum = {}));
/**
* SellersApi - axios parameter creator
* @export
*/
const SellersApiAxiosParamCreator = function (configuration) {
return {
/**
* Returns information about a seller account and its marketplaces. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.016 | 15 | 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).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAccount: async (options = {}) => {
const localVarPath = `/sellers/v1/account`;
// 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,
};
},
/**
* Returns a list of marketplaces that the seller submitting the request can sell in and information about the seller\'s participation in those marketplaces. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.016 | 15 | 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).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMarketplaceParticipations: async (options = {}) => {
const localVarPath = `/sellers/v1/marketplaceParticipations`;
// 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.SellersApiAxiosParamCreator = SellersApiAxiosParamCreator;
/**
* SellersApi - functional programming interface
* @export
*/
const SellersApiFp = function (configuration) {
const localVarAxiosParamCreator = (0, exports.SellersApiAxiosParamCreator)(configuration);
return {
/**
* Returns information about a seller account and its marketplaces. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.016 | 15 | 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).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getAccount(options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getAccount(options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
},
/**
* Returns a list of marketplaces that the seller submitting the request can sell in and information about the seller\'s participation in those marketplaces. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.016 | 15 | 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).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getMarketplaceParticipations(options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getMarketplaceParticipations(options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
},
};
};
exports.SellersApiFp = SellersApiFp;
/**
* SellersApi - factory interface
* @export
*/
const SellersApiFactory = function (configuration, basePath, axios) {
const localVarFp = (0, exports.SellersApiFp)(configuration);
return {
/**
* Returns information about a seller account and its marketplaces. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.016 | 15 | 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).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAccount(options) {
return localVarFp.getAccount(options).then((request) => request(axios, basePath));
},
/**
* Returns a list of marketplaces that the seller submitting the request can sell in and information about the seller\'s participation in those marketplaces. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.016 | 15 | 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).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMarketplaceParticipations(options) {
return localVarFp.getMarketplaceParticipations(options).then((request) => request(axios, basePath));
},
};
};
exports.SellersApiFactory = SellersApiFactory;
/**
* SellersApi - object-oriented interface
* @export
* @class SellersApi
* @extends {BaseAPI}
*/
class SellersApi extends base_1.BaseAPI {
/**
* Returns information about a seller account and its marketplaces. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.016 | 15 | 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).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SellersApi
*/
getAccount(options) {
return (0, exports.SellersApiFp)(this.configuration).getAccount(options).then((request) => request(this.axios, this.basePath));
}
/**
* Returns a list of marketplaces that the seller submitting the request can sell in and information about the seller\'s participation in those marketplaces. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.016 | 15 | 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).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SellersApi
*/
getMarketplaceParticipations(options) {
return (0, exports.SellersApiFp)(this.configuration).getMarketplaceParticipations(options).then((request) => request(this.axios, this.basePath));
}
}
exports.SellersApi = SellersApi;
//# sourceMappingURL=api.js.map