@scaleleap/selling-partner-api-sdk
Version:
📦 A fully typed TypeScript and Node.js SDK library for Amazon Selling Partner API
602 lines • 83.1 kB
JavaScript
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* Selling Partner API for A+ Content Management
* With the A+ Content API, you can build applications that help selling partners add rich marketing content to their Amazon product detail pages. A+ content helps selling partners share their brand and product story, which helps buyers make informed purchasing decisions. Selling partners assemble content by choosing from content modules and adding images and text.
*
* The version of the OpenAPI document: 2020-11-01
*
*
* 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.AplusContentApi = exports.AplusContentApiFactory = exports.AplusContentApiFp = exports.AplusContentApiAxiosParamCreator = exports.PositionType = exports.DecoratorType = exports.ContentType = exports.ContentStatus = exports.ContentModuleType = exports.ContentBadge = exports.ColorType = exports.AsinBadge = 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");
/**
* A flag that provides additional information about an ASIN. This is contextual and may change depending on the request that generated it.
* @export
* @enum {string}
*/
var AsinBadge;
(function (AsinBadge) {
AsinBadge["BrandNotEligible"] = "BRAND_NOT_ELIGIBLE";
AsinBadge["CatalogNotFound"] = "CATALOG_NOT_FOUND";
AsinBadge["ContentNotPublished"] = "CONTENT_NOT_PUBLISHED";
AsinBadge["ContentPublished"] = "CONTENT_PUBLISHED";
})(AsinBadge || (exports.AsinBadge = AsinBadge = {}));
/**
* The relative color scheme of content.
* @export
* @enum {string}
*/
var ColorType;
(function (ColorType) {
ColorType["Dark"] = "DARK";
ColorType["Light"] = "LIGHT";
})(ColorType || (exports.ColorType = ColorType = {}));
/**
* A flag that provides additional information about an A+ Content document.
* @export
* @enum {string}
*/
var ContentBadge;
(function (ContentBadge) {
ContentBadge["Bulk"] = "BULK";
ContentBadge["Generated"] = "GENERATED";
ContentBadge["Launchpad"] = "LAUNCHPAD";
ContentBadge["Premium"] = "PREMIUM";
ContentBadge["Standard"] = "STANDARD";
})(ContentBadge || (exports.ContentBadge = ContentBadge = {}));
/**
* The type of A+ Content module.
* @export
* @enum {string}
*/
var ContentModuleType;
(function (ContentModuleType) {
ContentModuleType["CompanyLogo"] = "STANDARD_COMPANY_LOGO";
ContentModuleType["ComparisonTable"] = "STANDARD_COMPARISON_TABLE";
ContentModuleType["FourImageText"] = "STANDARD_FOUR_IMAGE_TEXT";
ContentModuleType["FourImageTextQuadrant"] = "STANDARD_FOUR_IMAGE_TEXT_QUADRANT";
ContentModuleType["HeaderImageText"] = "STANDARD_HEADER_IMAGE_TEXT";
ContentModuleType["ImageSidebar"] = "STANDARD_IMAGE_SIDEBAR";
ContentModuleType["ImageTextOverlay"] = "STANDARD_IMAGE_TEXT_OVERLAY";
ContentModuleType["MultipleImageText"] = "STANDARD_MULTIPLE_IMAGE_TEXT";
ContentModuleType["ProductDescription"] = "STANDARD_PRODUCT_DESCRIPTION";
ContentModuleType["SingleImageHighlights"] = "STANDARD_SINGLE_IMAGE_HIGHLIGHTS";
ContentModuleType["SingleImageSpecsDetail"] = "STANDARD_SINGLE_IMAGE_SPECS_DETAIL";
ContentModuleType["SingleSideImage"] = "STANDARD_SINGLE_SIDE_IMAGE";
ContentModuleType["TechSpecs"] = "STANDARD_TECH_SPECS";
ContentModuleType["Text"] = "STANDARD_TEXT";
ContentModuleType["ThreeImageText"] = "STANDARD_THREE_IMAGE_TEXT";
})(ContentModuleType || (exports.ContentModuleType = ContentModuleType = {}));
/**
* The submission status of the content document.
* @export
* @enum {string}
*/
var ContentStatus;
(function (ContentStatus) {
ContentStatus["Approved"] = "APPROVED";
ContentStatus["Draft"] = "DRAFT";
ContentStatus["Rejected"] = "REJECTED";
ContentStatus["Submitted"] = "SUBMITTED";
})(ContentStatus || (exports.ContentStatus = ContentStatus = {}));
/**
* The A+ Content document type.
* @export
* @enum {string}
*/
var ContentType;
(function (ContentType) {
ContentType["Ebc"] = "EBC";
ContentType["Emc"] = "EMC";
})(ContentType || (exports.ContentType = ContentType = {}));
/**
* The type of rich text decorator.
* @export
* @enum {string}
*/
var DecoratorType;
(function (DecoratorType) {
DecoratorType["ListItem"] = "LIST_ITEM";
DecoratorType["ListOrdered"] = "LIST_ORDERED";
DecoratorType["ListUnordered"] = "LIST_UNORDERED";
DecoratorType["StyleBold"] = "STYLE_BOLD";
DecoratorType["StyleItalic"] = "STYLE_ITALIC";
DecoratorType["StyleLinebreak"] = "STYLE_LINEBREAK";
DecoratorType["StyleParagraph"] = "STYLE_PARAGRAPH";
DecoratorType["StyleUnderline"] = "STYLE_UNDERLINE";
})(DecoratorType || (exports.DecoratorType = DecoratorType = {}));
/**
* The relative positioning of content.
* @export
* @enum {string}
*/
var PositionType;
(function (PositionType) {
PositionType["Left"] = "LEFT";
PositionType["Right"] = "RIGHT";
})(PositionType || (exports.PositionType = PositionType = {}));
/**
* AplusContentApi - axios parameter creator
* @export
*/
const AplusContentApiAxiosParamCreator = function (configuration) {
return {
/**
* Creates a new A+ Content document. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
* @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published.
* @param {PostContentDocumentRequest} postContentDocumentRequest The content document request details.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createContentDocument: async (marketplaceId, postContentDocumentRequest, options = {}) => {
// verify required parameter 'marketplaceId' is not null or undefined
(0, common_1.assertParamExists)('createContentDocument', 'marketplaceId', marketplaceId);
// verify required parameter 'postContentDocumentRequest' is not null or undefined
(0, common_1.assertParamExists)('createContentDocument', 'postContentDocumentRequest', postContentDocumentRequest);
const localVarPath = `/aplus/2020-11-01/contentDocuments`;
// 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 = {};
if (marketplaceId !== undefined) {
localVarQueryParameter['marketplaceId'] = marketplaceId;
}
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)(postContentDocumentRequest, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns an A+ Content document, if available. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
* @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier.
* @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published.
* @param {Array<'CONTENTS' | 'METADATA'>} includedDataSet The set of A+ Content data types to include in the response.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getContentDocument: async (contentReferenceKey, marketplaceId, includedDataSet, options = {}) => {
// verify required parameter 'contentReferenceKey' is not null or undefined
(0, common_1.assertParamExists)('getContentDocument', 'contentReferenceKey', contentReferenceKey);
// verify required parameter 'marketplaceId' is not null or undefined
(0, common_1.assertParamExists)('getContentDocument', 'marketplaceId', marketplaceId);
// verify required parameter 'includedDataSet' is not null or undefined
(0, common_1.assertParamExists)('getContentDocument', 'includedDataSet', includedDataSet);
const localVarPath = `/aplus/2020-11-01/contentDocuments/{contentReferenceKey}`
.replace(`{${"contentReferenceKey"}}`, encodeURIComponent(String(contentReferenceKey)));
// 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 (marketplaceId !== undefined) {
localVarQueryParameter['marketplaceId'] = marketplaceId;
}
if (includedDataSet) {
localVarQueryParameter['includedDataSet'] = includedDataSet.join(base_1.COLLECTION_FORMATS.csv);
}
(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 ASINs related to the specified A+ Content document, if available. If you do not include the asinSet parameter, the operation returns all ASINs related to the content document. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
* @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier.
* @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published.
* @param {Array<'METADATA'>} [includedDataSet] The set of A+ Content data types to include in the response. If you do not include this parameter, the operation returns the related ASINs without metadata.
* @param {Array<string>} [asinSet] The set of ASINs.
* @param {string} [pageToken] A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listContentDocumentAsinRelations: async (contentReferenceKey, marketplaceId, includedDataSet, asinSet, pageToken, options = {}) => {
// verify required parameter 'contentReferenceKey' is not null or undefined
(0, common_1.assertParamExists)('listContentDocumentAsinRelations', 'contentReferenceKey', contentReferenceKey);
// verify required parameter 'marketplaceId' is not null or undefined
(0, common_1.assertParamExists)('listContentDocumentAsinRelations', 'marketplaceId', marketplaceId);
const localVarPath = `/aplus/2020-11-01/contentDocuments/{contentReferenceKey}/asins`
.replace(`{${"contentReferenceKey"}}`, encodeURIComponent(String(contentReferenceKey)));
// 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 (marketplaceId !== undefined) {
localVarQueryParameter['marketplaceId'] = marketplaceId;
}
if (includedDataSet) {
localVarQueryParameter['includedDataSet'] = includedDataSet.join(base_1.COLLECTION_FORMATS.csv);
}
if (asinSet) {
localVarQueryParameter['asinSet'] = asinSet.join(base_1.COLLECTION_FORMATS.csv);
}
if (pageToken !== undefined) {
localVarQueryParameter['pageToken'] = pageToken;
}
(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,
};
},
/**
* Submits an A+ Content document for review, approval, and publishing. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
* @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier.
* @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
postContentDocumentApprovalSubmission: async (contentReferenceKey, marketplaceId, options = {}) => {
// verify required parameter 'contentReferenceKey' is not null or undefined
(0, common_1.assertParamExists)('postContentDocumentApprovalSubmission', 'contentReferenceKey', contentReferenceKey);
// verify required parameter 'marketplaceId' is not null or undefined
(0, common_1.assertParamExists)('postContentDocumentApprovalSubmission', 'marketplaceId', marketplaceId);
const localVarPath = `/aplus/2020-11-01/contentDocuments/{contentReferenceKey}/approvalSubmissions`
.replace(`{${"contentReferenceKey"}}`, encodeURIComponent(String(contentReferenceKey)));
// 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 = {};
if (marketplaceId !== undefined) {
localVarQueryParameter['marketplaceId'] = marketplaceId;
}
(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,
};
},
/**
* Replaces all ASINs related to the specified A+ Content document, if available. This may add or remove ASINs, depending on the current set of related ASINs. Removing an ASIN has the side effect of suspending the content document from that ASIN. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
* @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier.
* @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published.
* @param {PostContentDocumentAsinRelationsRequest} postContentDocumentAsinRelationsRequest The content document ASIN relations request details.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
postContentDocumentAsinRelations: async (contentReferenceKey, marketplaceId, postContentDocumentAsinRelationsRequest, options = {}) => {
// verify required parameter 'contentReferenceKey' is not null or undefined
(0, common_1.assertParamExists)('postContentDocumentAsinRelations', 'contentReferenceKey', contentReferenceKey);
// verify required parameter 'marketplaceId' is not null or undefined
(0, common_1.assertParamExists)('postContentDocumentAsinRelations', 'marketplaceId', marketplaceId);
// verify required parameter 'postContentDocumentAsinRelationsRequest' is not null or undefined
(0, common_1.assertParamExists)('postContentDocumentAsinRelations', 'postContentDocumentAsinRelationsRequest', postContentDocumentAsinRelationsRequest);
const localVarPath = `/aplus/2020-11-01/contentDocuments/{contentReferenceKey}/asins`
.replace(`{${"contentReferenceKey"}}`, encodeURIComponent(String(contentReferenceKey)));
// 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 = {};
if (marketplaceId !== undefined) {
localVarQueryParameter['marketplaceId'] = marketplaceId;
}
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)(postContentDocumentAsinRelationsRequest, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Submits a request to suspend visible A+ Content. This neither deletes the content document nor the ASIN relations. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
* @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier.
* @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
postContentDocumentSuspendSubmission: async (contentReferenceKey, marketplaceId, options = {}) => {
// verify required parameter 'contentReferenceKey' is not null or undefined
(0, common_1.assertParamExists)('postContentDocumentSuspendSubmission', 'contentReferenceKey', contentReferenceKey);
// verify required parameter 'marketplaceId' is not null or undefined
(0, common_1.assertParamExists)('postContentDocumentSuspendSubmission', 'marketplaceId', marketplaceId);
const localVarPath = `/aplus/2020-11-01/contentDocuments/{contentReferenceKey}/suspendSubmissions`
.replace(`{${"contentReferenceKey"}}`, encodeURIComponent(String(contentReferenceKey)));
// 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 = {};
if (marketplaceId !== undefined) {
localVarQueryParameter['marketplaceId'] = marketplaceId;
}
(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 all A+ Content documents assigned to a selling partner. This operation returns only the metadata of the A+ Content documents. Call the getContentDocument operation to get the actual contents of the A+ Content documents. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
* @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published.
* @param {string} [pageToken] A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
searchContentDocuments: async (marketplaceId, pageToken, options = {}) => {
// verify required parameter 'marketplaceId' is not null or undefined
(0, common_1.assertParamExists)('searchContentDocuments', 'marketplaceId', marketplaceId);
const localVarPath = `/aplus/2020-11-01/contentDocuments`;
// 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 (marketplaceId !== undefined) {
localVarQueryParameter['marketplaceId'] = marketplaceId;
}
if (pageToken !== undefined) {
localVarQueryParameter['pageToken'] = pageToken;
}
(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,
};
},
/**
* Searches for A+ Content publishing records, if available. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
* @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published.
* @param {string} asin The Amazon Standard Identification Number (ASIN).
* @param {string} [pageToken] A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
searchContentPublishRecords: async (marketplaceId, asin, pageToken, options = {}) => {
// verify required parameter 'marketplaceId' is not null or undefined
(0, common_1.assertParamExists)('searchContentPublishRecords', 'marketplaceId', marketplaceId);
// verify required parameter 'asin' is not null or undefined
(0, common_1.assertParamExists)('searchContentPublishRecords', 'asin', asin);
const localVarPath = `/aplus/2020-11-01/contentPublishRecords`;
// 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 (marketplaceId !== undefined) {
localVarQueryParameter['marketplaceId'] = marketplaceId;
}
if (asin !== undefined) {
localVarQueryParameter['asin'] = asin;
}
if (pageToken !== undefined) {
localVarQueryParameter['pageToken'] = pageToken;
}
(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,
};
},
/**
* Updates an existing A+ Content document. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
* @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier.
* @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published.
* @param {PostContentDocumentRequest} postContentDocumentRequest The content document request details.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateContentDocument: async (contentReferenceKey, marketplaceId, postContentDocumentRequest, options = {}) => {
// verify required parameter 'contentReferenceKey' is not null or undefined
(0, common_1.assertParamExists)('updateContentDocument', 'contentReferenceKey', contentReferenceKey);
// verify required parameter 'marketplaceId' is not null or undefined
(0, common_1.assertParamExists)('updateContentDocument', 'marketplaceId', marketplaceId);
// verify required parameter 'postContentDocumentRequest' is not null or undefined
(0, common_1.assertParamExists)('updateContentDocument', 'postContentDocumentRequest', postContentDocumentRequest);
const localVarPath = `/aplus/2020-11-01/contentDocuments/{contentReferenceKey}`
.replace(`{${"contentReferenceKey"}}`, encodeURIComponent(String(contentReferenceKey)));
// 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 = {};
if (marketplaceId !== undefined) {
localVarQueryParameter['marketplaceId'] = marketplaceId;
}
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)(postContentDocumentRequest, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Checks if the A+ Content document is valid for use on a set of ASINs. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
* @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published.
* @param {PostContentDocumentRequest} postContentDocumentRequest The content document request details.
* @param {Array<string>} [asinSet] The set of ASINs.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
validateContentDocumentAsinRelations: async (marketplaceId, postContentDocumentRequest, asinSet, options = {}) => {
// verify required parameter 'marketplaceId' is not null or undefined
(0, common_1.assertParamExists)('validateContentDocumentAsinRelations', 'marketplaceId', marketplaceId);
// verify required parameter 'postContentDocumentRequest' is not null or undefined
(0, common_1.assertParamExists)('validateContentDocumentAsinRelations', 'postContentDocumentRequest', postContentDocumentRequest);
const localVarPath = `/aplus/2020-11-01/contentAsinValidations`;
// 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 = {};
if (marketplaceId !== undefined) {
localVarQueryParameter['marketplaceId'] = marketplaceId;
}
if (asinSet) {
localVarQueryParameter['asinSet'] = asinSet.join(base_1.COLLECTION_FORMATS.csv);
}
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)(postContentDocumentRequest, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
};
};
exports.AplusContentApiAxiosParamCreator = AplusContentApiAxiosParamCreator;
/**
* AplusContentApi - functional programming interface
* @export
*/
const AplusContentApiFp = function (configuration) {
const localVarAxiosParamCreator = (0, exports.AplusContentApiAxiosParamCreator)(configuration);
return {
/**
* Creates a new A+ Content document. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
* @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published.
* @param {PostContentDocumentRequest} postContentDocumentRequest The content document request details.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async createContentDocument(marketplaceId, postContentDocumentRequest, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.createContentDocument(marketplaceId, postContentDocumentRequest, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
},
/**
* Returns an A+ Content document, if available. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
* @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier.
* @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published.
* @param {Array<'CONTENTS' | 'METADATA'>} includedDataSet The set of A+ Content data types to include in the response.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getContentDocument(contentReferenceKey, marketplaceId, includedDataSet, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getContentDocument(contentReferenceKey, marketplaceId, includedDataSet, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
},
/**
* Returns a list of ASINs related to the specified A+ Content document, if available. If you do not include the asinSet parameter, the operation returns all ASINs related to the content document. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
* @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier.
* @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published.
* @param {Array<'METADATA'>} [includedDataSet] The set of A+ Content data types to include in the response. If you do not include this parameter, the operation returns the related ASINs without metadata.
* @param {Array<string>} [asinSet] The set of ASINs.
* @param {string} [pageToken] A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async listContentDocumentAsinRelations(contentReferenceKey, marketplaceId, includedDataSet, asinSet, pageToken, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.listContentDocumentAsinRelations(contentReferenceKey, marketplaceId, includedDataSet, asinSet, pageToken, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
},
/**
* Submits an A+ Content document for review, approval, and publishing. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
* @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier.
* @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async postContentDocumentApprovalSubmission(contentReferenceKey, marketplaceId, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.postContentDocumentApprovalSubmission(contentReferenceKey, marketplaceId, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
},
/**
* Replaces all ASINs related to the specified A+ Content document, if available. This may add or remove ASINs, depending on the current set of related ASINs. Removing an ASIN has the side effect of suspending the content document from that ASIN. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
* @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier.
* @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published.
* @param {PostContentDocumentAsinRelationsRequest} postContentDocumentAsinRelationsRequest The content document ASIN relations request details.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async postContentDocumentAsinRelations(contentReferenceKey, marketplaceId, postContentDocumentAsinRelationsRequest, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.postContentDocumentAsinRelations(contentReferenceKey, marketplaceId, postContentDocumentAsinRelationsRequest, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
},
/**
* Submits a request to suspend visible A+ Content. This neither deletes the content document nor the ASIN relations. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
* @param {string} contentReferenceKey The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier.
* @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async postContentDocumentSuspendSubmission(contentReferenceKey, marketplaceId, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.postContentDocumentSuspendSubmission(contentReferenceKey, marketplaceId, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
},
/**
* Returns a list of all A+ Content documents assigned to a selling partner. This operation returns only the metadata of the A+ Content documents. Call the getContentDocument operation to get the actual contents of the A+ Content documents. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
* @param {string} marketplaceId The identifier for the marketplace where the A+ Content is published.
* @param {string} [pageToken] A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only