@scaleleap/selling-partner-api-sdk
Version:
📦 A fully typed TypeScript and Node.js SDK library for Amazon Selling Partner API
476 lines • 35 kB
JavaScript
;
/* tslint:disable */
/* eslint-disable */
/**
* Selling Partner API for Feeds
* Effective **June 27, 2024**, the Selling Partner API for Feeds v2020-09-04 will no longer be available and all calls to it will fail. Integrations that rely on the Feeds API must migrate to [Feeds v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference) to avoid service disruption.
*
* The version of the OpenAPI document: 2020-09-04
*
*
* 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.FeedsApi = exports.FeedsApiFactory = exports.FeedsApiFp = exports.FeedsApiAxiosParamCreator = exports.FeedDocumentEncryptionDetailsStandardEnum = exports.FeedDocumentCompressionAlgorithmEnum = exports.FeedProcessingStatusEnum = 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 FeedProcessingStatusEnum;
(function (FeedProcessingStatusEnum) {
FeedProcessingStatusEnum["Cancelled"] = "CANCELLED";
FeedProcessingStatusEnum["Done"] = "DONE";
FeedProcessingStatusEnum["Fatal"] = "FATAL";
FeedProcessingStatusEnum["InProgress"] = "IN_PROGRESS";
FeedProcessingStatusEnum["InQueue"] = "IN_QUEUE";
})(FeedProcessingStatusEnum || (exports.FeedProcessingStatusEnum = FeedProcessingStatusEnum = {}));
/**
* @export
* @enum {string}
*/
var FeedDocumentCompressionAlgorithmEnum;
(function (FeedDocumentCompressionAlgorithmEnum) {
FeedDocumentCompressionAlgorithmEnum["Gzip"] = "GZIP";
})(FeedDocumentCompressionAlgorithmEnum || (exports.FeedDocumentCompressionAlgorithmEnum = FeedDocumentCompressionAlgorithmEnum = {}));
/**
* @export
* @enum {string}
*/
var FeedDocumentEncryptionDetailsStandardEnum;
(function (FeedDocumentEncryptionDetailsStandardEnum) {
FeedDocumentEncryptionDetailsStandardEnum["Aes"] = "AES";
})(FeedDocumentEncryptionDetailsStandardEnum || (exports.FeedDocumentEncryptionDetailsStandardEnum = FeedDocumentEncryptionDetailsStandardEnum = {}));
/**
* FeedsApi - axios parameter creator
* @export
*/
const FeedsApiAxiosParamCreator = function (configuration) {
return {
/**
* Effective June 27, 2023, the `cancelFeed` operation will no longer be available in the Selling Partner API for Feeds v2020-09-04 and all calls to it will fail. Integrations that rely on this operation should migrate to [Feeds v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference) to avoid service disruption.
* @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
cancelFeed: async (feedId, options = {}) => {
// verify required parameter 'feedId' is not null or undefined
(0, common_1.assertParamExists)('cancelFeed', 'feedId', feedId);
const localVarPath = `/feeds/2020-09-04/feeds/{feedId}`
.replace(`{${"feedId"}}`, encodeURIComponent(String(feedId)));
// 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,
};
},
/**
* Effective June 27, 2023, the `createFeed` operation will no longer be available in the Selling Partner API for Feeds v2020-09-04 and all calls to it will fail. Integrations that rely on this operation should migrate to [Feeds v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference) to avoid service disruption.
* @param {CreateFeedSpecification} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createFeed: async (body, options = {}) => {
// verify required parameter 'body' is not null or undefined
(0, common_1.assertParamExists)('createFeed', 'body', body);
const localVarPath = `/feeds/2020-09-04/feeds`;
// 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,
};
},
/**
* Effective June 27, 2023, the `createFeedDocument` operation will no longer be available in the Selling Partner API for Feeds v2020-09-04 and all calls to it will fail. Integrations that rely on this operation should migrate to [Feeds v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference) to avoid service disruption.
* @param {CreateFeedDocumentSpecification} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createFeedDocument: async (body, options = {}) => {
// verify required parameter 'body' is not null or undefined
(0, common_1.assertParamExists)('createFeedDocument', 'body', body);
const localVarPath = `/feeds/2020-09-04/documents`;
// 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,
};
},
/**
* Effective June 27, 2023, the `getFeed` operation will no longer be available in the Selling Partner API for Feeds v2020-09-04 and all calls to it will fail. Integrations that rely on this operation should migrate to [Feeds v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference) to avoid service disruption.
* @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getFeed: async (feedId, options = {}) => {
// verify required parameter 'feedId' is not null or undefined
(0, common_1.assertParamExists)('getFeed', 'feedId', feedId);
const localVarPath = `/feeds/2020-09-04/feeds/{feedId}`
.replace(`{${"feedId"}}`, encodeURIComponent(String(feedId)));
// 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,
};
},
/**
* Effective June 27, 2023, the `getFeedDocument` operation will no longer be available in the Selling Partner API for Feeds v2020-09-04 and all calls to it will fail. Integrations that rely on this operation should migrate to [Feeds v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference) to avoid service disruption.
* @param {string} feedDocumentId The identifier of the feed document.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getFeedDocument: async (feedDocumentId, options = {}) => {
// verify required parameter 'feedDocumentId' is not null or undefined
(0, common_1.assertParamExists)('getFeedDocument', 'feedDocumentId', feedDocumentId);
const localVarPath = `/feeds/2020-09-04/documents/{feedDocumentId}`
.replace(`{${"feedDocumentId"}}`, encodeURIComponent(String(feedDocumentId)));
// 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,
};
},
/**
* Effective June 27, 2023, the `getFeeds` operation will no longer be available in the Selling Partner API for Feeds v2020-09-04 and all calls to it will fail. Integrations that rely on this operation should migrate to [Feeds v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference) to avoid service disruption.
* @param {Array<string>} [feedTypes] A list of feed types used to filter feeds. When feedTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either feedTypes or nextToken is required.
* @param {Array<string>} [marketplaceIds] A list of marketplace identifiers used to filter feeds. The feeds returned will match at least one of the marketplaces that you specify.
* @param {number} [pageSize] The maximum number of feeds to return in a single call.
* @param {Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>} [processingStatuses] A list of processing statuses used to filter feeds.
* @param {string} [createdSince] The earliest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is 90 days ago. Feeds are retained for a maximum of 90 days.
* @param {string} [createdUntil] The latest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is now.
* @param {string} [nextToken] A string token returned in the response to your previous request. nextToken is returned when the number of results exceeds the specified pageSize value. To get the next page of results, call the getFeeds operation and include this token as the only parameter. Specifying nextToken with any other parameters will cause the request to fail.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getFeeds: async (feedTypes, marketplaceIds, pageSize, processingStatuses, createdSince, createdUntil, nextToken, options = {}) => {
const localVarPath = `/feeds/2020-09-04/feeds`;
// 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 = {};
if (feedTypes) {
localVarQueryParameter['feedTypes'] = feedTypes.join(base_1.COLLECTION_FORMATS.csv);
}
if (marketplaceIds) {
localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(base_1.COLLECTION_FORMATS.csv);
}
if (pageSize !== undefined) {
localVarQueryParameter['pageSize'] = pageSize;
}
if (processingStatuses) {
localVarQueryParameter['processingStatuses'] = processingStatuses.join(base_1.COLLECTION_FORMATS.csv);
}
if (createdSince !== undefined) {
localVarQueryParameter['createdSince'] = (createdSince instanceof Date) ?
createdSince.toISOString() :
createdSince;
}
if (createdUntil !== undefined) {
localVarQueryParameter['createdUntil'] = (createdUntil instanceof Date) ?
createdUntil.toISOString() :
createdUntil;
}
if (nextToken !== undefined) {
localVarQueryParameter['nextToken'] = nextToken;
}
(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.FeedsApiAxiosParamCreator = FeedsApiAxiosParamCreator;
/**
* FeedsApi - functional programming interface
* @export
*/
const FeedsApiFp = function (configuration) {
const localVarAxiosParamCreator = (0, exports.FeedsApiAxiosParamCreator)(configuration);
return {
/**
* Effective June 27, 2023, the `cancelFeed` operation will no longer be available in the Selling Partner API for Feeds v2020-09-04 and all calls to it will fail. Integrations that rely on this operation should migrate to [Feeds v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference) to avoid service disruption.
* @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async cancelFeed(feedId, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.cancelFeed(feedId, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
},
/**
* Effective June 27, 2023, the `createFeed` operation will no longer be available in the Selling Partner API for Feeds v2020-09-04 and all calls to it will fail. Integrations that rely on this operation should migrate to [Feeds v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference) to avoid service disruption.
* @param {CreateFeedSpecification} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async createFeed(body, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.createFeed(body, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
},
/**
* Effective June 27, 2023, the `createFeedDocument` operation will no longer be available in the Selling Partner API for Feeds v2020-09-04 and all calls to it will fail. Integrations that rely on this operation should migrate to [Feeds v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference) to avoid service disruption.
* @param {CreateFeedDocumentSpecification} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async createFeedDocument(body, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.createFeedDocument(body, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
},
/**
* Effective June 27, 2023, the `getFeed` operation will no longer be available in the Selling Partner API for Feeds v2020-09-04 and all calls to it will fail. Integrations that rely on this operation should migrate to [Feeds v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference) to avoid service disruption.
* @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getFeed(feedId, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getFeed(feedId, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
},
/**
* Effective June 27, 2023, the `getFeedDocument` operation will no longer be available in the Selling Partner API for Feeds v2020-09-04 and all calls to it will fail. Integrations that rely on this operation should migrate to [Feeds v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference) to avoid service disruption.
* @param {string} feedDocumentId The identifier of the feed document.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getFeedDocument(feedDocumentId, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getFeedDocument(feedDocumentId, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
},
/**
* Effective June 27, 2023, the `getFeeds` operation will no longer be available in the Selling Partner API for Feeds v2020-09-04 and all calls to it will fail. Integrations that rely on this operation should migrate to [Feeds v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference) to avoid service disruption.
* @param {Array<string>} [feedTypes] A list of feed types used to filter feeds. When feedTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either feedTypes or nextToken is required.
* @param {Array<string>} [marketplaceIds] A list of marketplace identifiers used to filter feeds. The feeds returned will match at least one of the marketplaces that you specify.
* @param {number} [pageSize] The maximum number of feeds to return in a single call.
* @param {Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>} [processingStatuses] A list of processing statuses used to filter feeds.
* @param {string} [createdSince] The earliest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is 90 days ago. Feeds are retained for a maximum of 90 days.
* @param {string} [createdUntil] The latest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is now.
* @param {string} [nextToken] A string token returned in the response to your previous request. nextToken is returned when the number of results exceeds the specified pageSize value. To get the next page of results, call the getFeeds operation and include this token as the only parameter. Specifying nextToken with any other parameters will cause the request to fail.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getFeeds(feedTypes, marketplaceIds, pageSize, processingStatuses, createdSince, createdUntil, nextToken, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getFeeds(feedTypes, marketplaceIds, pageSize, processingStatuses, createdSince, createdUntil, nextToken, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
},
};
};
exports.FeedsApiFp = FeedsApiFp;
/**
* FeedsApi - factory interface
* @export
*/
const FeedsApiFactory = function (configuration, basePath, axios) {
const localVarFp = (0, exports.FeedsApiFp)(configuration);
return {
/**
* Effective June 27, 2023, the `cancelFeed` operation will no longer be available in the Selling Partner API for Feeds v2020-09-04 and all calls to it will fail. Integrations that rely on this operation should migrate to [Feeds v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference) to avoid service disruption.
* @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
cancelFeed(feedId, options) {
return localVarFp.cancelFeed(feedId, options).then((request) => request(axios, basePath));
},
/**
* Effective June 27, 2023, the `createFeed` operation will no longer be available in the Selling Partner API for Feeds v2020-09-04 and all calls to it will fail. Integrations that rely on this operation should migrate to [Feeds v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference) to avoid service disruption.
* @param {CreateFeedSpecification} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createFeed(body, options) {
return localVarFp.createFeed(body, options).then((request) => request(axios, basePath));
},
/**
* Effective June 27, 2023, the `createFeedDocument` operation will no longer be available in the Selling Partner API for Feeds v2020-09-04 and all calls to it will fail. Integrations that rely on this operation should migrate to [Feeds v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference) to avoid service disruption.
* @param {CreateFeedDocumentSpecification} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createFeedDocument(body, options) {
return localVarFp.createFeedDocument(body, options).then((request) => request(axios, basePath));
},
/**
* Effective June 27, 2023, the `getFeed` operation will no longer be available in the Selling Partner API for Feeds v2020-09-04 and all calls to it will fail. Integrations that rely on this operation should migrate to [Feeds v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference) to avoid service disruption.
* @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getFeed(feedId, options) {
return localVarFp.getFeed(feedId, options).then((request) => request(axios, basePath));
},
/**
* Effective June 27, 2023, the `getFeedDocument` operation will no longer be available in the Selling Partner API for Feeds v2020-09-04 and all calls to it will fail. Integrations that rely on this operation should migrate to [Feeds v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference) to avoid service disruption.
* @param {string} feedDocumentId The identifier of the feed document.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getFeedDocument(feedDocumentId, options) {
return localVarFp.getFeedDocument(feedDocumentId, options).then((request) => request(axios, basePath));
},
/**
* Effective June 27, 2023, the `getFeeds` operation will no longer be available in the Selling Partner API for Feeds v2020-09-04 and all calls to it will fail. Integrations that rely on this operation should migrate to [Feeds v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference) to avoid service disruption.
* @param {Array<string>} [feedTypes] A list of feed types used to filter feeds. When feedTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either feedTypes or nextToken is required.
* @param {Array<string>} [marketplaceIds] A list of marketplace identifiers used to filter feeds. The feeds returned will match at least one of the marketplaces that you specify.
* @param {number} [pageSize] The maximum number of feeds to return in a single call.
* @param {Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>} [processingStatuses] A list of processing statuses used to filter feeds.
* @param {string} [createdSince] The earliest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is 90 days ago. Feeds are retained for a maximum of 90 days.
* @param {string} [createdUntil] The latest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is now.
* @param {string} [nextToken] A string token returned in the response to your previous request. nextToken is returned when the number of results exceeds the specified pageSize value. To get the next page of results, call the getFeeds operation and include this token as the only parameter. Specifying nextToken with any other parameters will cause the request to fail.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getFeeds(feedTypes, marketplaceIds, pageSize, processingStatuses, createdSince, createdUntil, nextToken, options) {
return localVarFp.getFeeds(feedTypes, marketplaceIds, pageSize, processingStatuses, createdSince, createdUntil, nextToken, options).then((request) => request(axios, basePath));
},
};
};
exports.FeedsApiFactory = FeedsApiFactory;
/**
* FeedsApi - object-oriented interface
* @export
* @class FeedsApi
* @extends {BaseAPI}
*/
class FeedsApi extends base_1.BaseAPI {
/**
* Effective June 27, 2023, the `cancelFeed` operation will no longer be available in the Selling Partner API for Feeds v2020-09-04 and all calls to it will fail. Integrations that rely on this operation should migrate to [Feeds v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference) to avoid service disruption.
* @param {FeedsApiCancelFeedRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FeedsApi
*/
cancelFeed(requestParameters, options) {
return (0, exports.FeedsApiFp)(this.configuration).cancelFeed(requestParameters.feedId, options).then((request) => request(this.axios, this.basePath));
}
/**
* Effective June 27, 2023, the `createFeed` operation will no longer be available in the Selling Partner API for Feeds v2020-09-04 and all calls to it will fail. Integrations that rely on this operation should migrate to [Feeds v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference) to avoid service disruption.
* @param {FeedsApiCreateFeedRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FeedsApi
*/
createFeed(requestParameters, options) {
return (0, exports.FeedsApiFp)(this.configuration).createFeed(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
}
/**
* Effective June 27, 2023, the `createFeedDocument` operation will no longer be available in the Selling Partner API for Feeds v2020-09-04 and all calls to it will fail. Integrations that rely on this operation should migrate to [Feeds v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference) to avoid service disruption.
* @param {FeedsApiCreateFeedDocumentRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FeedsApi
*/
createFeedDocument(requestParameters, options) {
return (0, exports.FeedsApiFp)(this.configuration).createFeedDocument(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
}
/**
* Effective June 27, 2023, the `getFeed` operation will no longer be available in the Selling Partner API for Feeds v2020-09-04 and all calls to it will fail. Integrations that rely on this operation should migrate to [Feeds v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference) to avoid service disruption.
* @param {FeedsApiGetFeedRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FeedsApi
*/
getFeed(requestParameters, options) {
return (0, exports.FeedsApiFp)(this.configuration).getFeed(requestParameters.feedId, options).then((request) => request(this.axios, this.basePath));
}
/**
* Effective June 27, 2023, the `getFeedDocument` operation will no longer be available in the Selling Partner API for Feeds v2020-09-04 and all calls to it will fail. Integrations that rely on this operation should migrate to [Feeds v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference) to avoid service disruption.
* @param {FeedsApiGetFeedDocumentRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FeedsApi
*/
getFeedDocument(requestParameters, options) {
return (0, exports.FeedsApiFp)(this.configuration).getFeedDocument(requestParameters.feedDocumentId, options).then((request) => request(this.axios, this.basePath));
}
/**
* Effective June 27, 2023, the `getFeeds` operation will no longer be available in the Selling Partner API for Feeds v2020-09-04 and all calls to it will fail. Integrations that rely on this operation should migrate to [Feeds v2021-06-30](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference) to avoid service disruption.
* @param {FeedsApiGetFeedsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FeedsApi
*/
getFeeds(requestParameters = {}, options) {
return (0, exports.FeedsApiFp)(this.configuration).getFeeds(requestParameters.feedTypes, requestParameters.marketplaceIds, requestParameters.pageSize, requestParameters.processingStatuses, requestParameters.createdSince, requestParameters.createdUntil, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
}
}
exports.FeedsApi = FeedsApi;
//# sourceMappingURL=api.js.map