UNPKG

@scaleleap/selling-partner-api-sdk

Version:

📦 A fully typed TypeScript and Node.js SDK library for Amazon Selling Partner API

556 lines • 66.2 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Report v2021-06-30 * The Selling Partner API for Reports lets you retrieve and manage a variety of reports that can help selling partners manage their businesses. * * The version of the OpenAPI document: 2021-06-30 * * * 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.ReportsApi = exports.ReportsApiFactory = exports.ReportsApiFp = exports.ReportsApiAxiosParamCreator = exports.ReportDocumentCompressionAlgorithmEnum = exports.ReportProcessingStatusEnum = exports.CreateReportScheduleSpecificationPeriodEnum = 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 CreateReportScheduleSpecificationPeriodEnum; (function (CreateReportScheduleSpecificationPeriodEnum) { CreateReportScheduleSpecificationPeriodEnum["Pt5M"] = "PT5M"; CreateReportScheduleSpecificationPeriodEnum["Pt15M"] = "PT15M"; CreateReportScheduleSpecificationPeriodEnum["Pt30M"] = "PT30M"; CreateReportScheduleSpecificationPeriodEnum["Pt1H"] = "PT1H"; CreateReportScheduleSpecificationPeriodEnum["Pt2H"] = "PT2H"; CreateReportScheduleSpecificationPeriodEnum["Pt4H"] = "PT4H"; CreateReportScheduleSpecificationPeriodEnum["Pt8H"] = "PT8H"; CreateReportScheduleSpecificationPeriodEnum["Pt12H"] = "PT12H"; CreateReportScheduleSpecificationPeriodEnum["P1D"] = "P1D"; CreateReportScheduleSpecificationPeriodEnum["P2D"] = "P2D"; CreateReportScheduleSpecificationPeriodEnum["P3D"] = "P3D"; CreateReportScheduleSpecificationPeriodEnum["Pt84H"] = "PT84H"; CreateReportScheduleSpecificationPeriodEnum["P7D"] = "P7D"; CreateReportScheduleSpecificationPeriodEnum["P14D"] = "P14D"; CreateReportScheduleSpecificationPeriodEnum["P15D"] = "P15D"; CreateReportScheduleSpecificationPeriodEnum["P18D"] = "P18D"; CreateReportScheduleSpecificationPeriodEnum["P30D"] = "P30D"; CreateReportScheduleSpecificationPeriodEnum["P1M"] = "P1M"; })(CreateReportScheduleSpecificationPeriodEnum || (exports.CreateReportScheduleSpecificationPeriodEnum = CreateReportScheduleSpecificationPeriodEnum = {})); /** * @export * @enum {string} */ var ReportProcessingStatusEnum; (function (ReportProcessingStatusEnum) { ReportProcessingStatusEnum["Cancelled"] = "CANCELLED"; ReportProcessingStatusEnum["Done"] = "DONE"; ReportProcessingStatusEnum["Fatal"] = "FATAL"; ReportProcessingStatusEnum["InProgress"] = "IN_PROGRESS"; ReportProcessingStatusEnum["InQueue"] = "IN_QUEUE"; })(ReportProcessingStatusEnum || (exports.ReportProcessingStatusEnum = ReportProcessingStatusEnum = {})); /** * @export * @enum {string} */ var ReportDocumentCompressionAlgorithmEnum; (function (ReportDocumentCompressionAlgorithmEnum) { ReportDocumentCompressionAlgorithmEnum["Gzip"] = "GZIP"; })(ReportDocumentCompressionAlgorithmEnum || (exports.ReportDocumentCompressionAlgorithmEnum = ReportDocumentCompressionAlgorithmEnum = {})); /** * ReportsApi - axios parameter creator * @export */ const ReportsApiAxiosParamCreator = function (configuration) { return { /** * Cancels the report that you specify. Only reports with `processingStatus=IN_QUEUE` can be cancelled. Cancelled reports are returned in subsequent calls to the `getReport` and `getReports` operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [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). * @summary cancelReport * @param {string} reportId The identifier for the report. This identifier is unique only in combination with a seller ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ cancelReport: async (reportId, options = {}) => { // verify required parameter 'reportId' is not null or undefined (0, common_1.assertParamExists)('cancelReport', 'reportId', reportId); const localVarPath = `/reports/2021-06-30/reports/{reportId}` .replace(`{${"reportId"}}`, encodeURIComponent(String(reportId))); // 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, }; }, /** * Cancels the report schedule that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [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). * @summary cancelReportSchedule * @param {string} reportScheduleId The identifier for the report schedule. This identifier is unique only in combination with a seller ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ cancelReportSchedule: async (reportScheduleId, options = {}) => { // verify required parameter 'reportScheduleId' is not null or undefined (0, common_1.assertParamExists)('cancelReportSchedule', 'reportScheduleId', reportScheduleId); const localVarPath = `/reports/2021-06-30/schedules/{reportScheduleId}` .replace(`{${"reportScheduleId"}}`, encodeURIComponent(String(reportScheduleId))); // 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, }; }, /** * Creates a report. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 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, refer to [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). * @summary createReport * @param {CreateReportSpecification} body Information required to create the report. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createReport: async (body, options = {}) => { // verify required parameter 'body' is not null or undefined (0, common_1.assertParamExists)('createReport', 'body', body); const localVarPath = `/reports/2021-06-30/reports`; // 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, }; }, /** * Creates a report schedule. If a report schedule with the same report type and marketplace IDs already exists, it will be cancelled and replaced with this one. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [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). * @summary createReportSchedule * @param {CreateReportScheduleSpecification} body Information required to create the report schedule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createReportSchedule: async (body, options = {}) => { // verify required parameter 'body' is not null or undefined (0, common_1.assertParamExists)('createReportSchedule', 'body', body); const localVarPath = `/reports/2021-06-30/schedules`; // 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, }; }, /** * Returns report details (including the `reportDocumentId`, if available) for the report that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 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, refer to [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). * @summary getReport * @param {string} reportId The identifier for the report. This identifier is unique only in combination with a seller ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getReport: async (reportId, options = {}) => { // verify required parameter 'reportId' is not null or undefined (0, common_1.assertParamExists)('getReport', 'reportId', reportId); const localVarPath = `/reports/2021-06-30/reports/{reportId}` .replace(`{${"reportId"}}`, encodeURIComponent(String(reportId))); // 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 the information required for retrieving a report document\'s contents. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 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, refer to [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). * @summary getReportDocument * @param {string} reportDocumentId The identifier for the report document. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getReportDocument: async (reportDocumentId, options = {}) => { // verify required parameter 'reportDocumentId' is not null or undefined (0, common_1.assertParamExists)('getReportDocument', 'reportDocumentId', reportDocumentId); const localVarPath = `/reports/2021-06-30/documents/{reportDocumentId}` .replace(`{${"reportDocumentId"}}`, encodeURIComponent(String(reportDocumentId))); // 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 report schedule details for the report schedule that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [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). * @summary getReportSchedule * @param {string} reportScheduleId The identifier for the report schedule. This identifier is unique only in combination with a seller ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getReportSchedule: async (reportScheduleId, options = {}) => { // verify required parameter 'reportScheduleId' is not null or undefined (0, common_1.assertParamExists)('getReportSchedule', 'reportScheduleId', reportScheduleId); const localVarPath = `/reports/2021-06-30/schedules/{reportScheduleId}` .replace(`{${"reportScheduleId"}}`, encodeURIComponent(String(reportScheduleId))); // 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 report schedule details that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [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). * @summary getReportSchedules * @param {Array<string>} reportTypes A list of report types used to filter report schedules. Refer to [Report Type Values](https://developer-docs.amazon.com/sp-api/docs/report-type-values) for more information. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getReportSchedules: async (reportTypes, options = {}) => { // verify required parameter 'reportTypes' is not null or undefined (0, common_1.assertParamExists)('getReportSchedules', 'reportTypes', reportTypes); const localVarPath = `/reports/2021-06-30/schedules`; // 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 (reportTypes) { localVarQueryParameter['reportTypes'] = reportTypes.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 report details for the reports that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [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). * @summary getReports * @param {Array<string>} [reportTypes] A list of report types used to filter reports. Refer to [Report Type Values](https://developer-docs.amazon.com/sp-api/docs/report-type-values) for more information. When reportTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either reportTypes or nextToken is required. * @param {Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>} [processingStatuses] A list of processing statuses used to filter reports. * @param {Array<string>} [marketplaceIds] A list of marketplace identifiers used to filter reports. The reports returned will match at least one of the marketplaces that you specify. * @param {number} [pageSize] The maximum number of reports to return in a single call. * @param {string} [createdSince] The earliest report creation date and time for reports to include in the response, in &lt;a href&#x3D;\&#39;https://developer-docs.amazon.com/sp-api/docs/iso-8601\&#39;&gt;ISO 8601&lt;/a&gt; date time format. The default is 90 days ago. Reports are retained for a maximum of 90 days. * @param {string} [createdUntil] The latest report creation date and time for reports to include in the response, in &lt;a href&#x3D;\&#39;https://developer-docs.amazon.com/sp-api/docs/iso-8601\&#39;&gt;ISO 8601&lt;/a&gt; date time format. The default is now. * @param {string} [nextToken] A string token returned in the response to your previous request. &#x60;nextToken&#x60; is returned when the number of results exceeds the specified &#x60;pageSize&#x60; value. To get the next page of results, call the &#x60;getReports&#x60; operation and include this token as the only parameter. Specifying &#x60;nextToken&#x60; with any other parameters will cause the request to fail. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getReports: async (reportTypes, processingStatuses, marketplaceIds, pageSize, createdSince, createdUntil, nextToken, options = {}) => { const localVarPath = `/reports/2021-06-30/reports`; // 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 (reportTypes) { localVarQueryParameter['reportTypes'] = reportTypes.join(base_1.COLLECTION_FORMATS.csv); } if (processingStatuses) { localVarQueryParameter['processingStatuses'] = processingStatuses.join(base_1.COLLECTION_FORMATS.csv); } if (marketplaceIds) { localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(base_1.COLLECTION_FORMATS.csv); } if (pageSize !== undefined) { localVarQueryParameter['pageSize'] = pageSize; } 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.ReportsApiAxiosParamCreator = ReportsApiAxiosParamCreator; /** * ReportsApi - functional programming interface * @export */ const ReportsApiFp = function (configuration) { const localVarAxiosParamCreator = (0, exports.ReportsApiAxiosParamCreator)(configuration); return { /** * Cancels the report that you specify. Only reports with `processingStatus=IN_QUEUE` can be cancelled. Cancelled reports are returned in subsequent calls to the `getReport` and `getReports` operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [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). * @summary cancelReport * @param {string} reportId The identifier for the report. This identifier is unique only in combination with a seller ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async cancelReport(reportId, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.cancelReport(reportId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Cancels the report schedule that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [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). * @summary cancelReportSchedule * @param {string} reportScheduleId The identifier for the report schedule. This identifier is unique only in combination with a seller ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async cancelReportSchedule(reportScheduleId, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.cancelReportSchedule(reportScheduleId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Creates a report. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 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, refer to [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). * @summary createReport * @param {CreateReportSpecification} body Information required to create the report. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createReport(body, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.createReport(body, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Creates a report schedule. If a report schedule with the same report type and marketplace IDs already exists, it will be cancelled and replaced with this one. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [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). * @summary createReportSchedule * @param {CreateReportScheduleSpecification} body Information required to create the report schedule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createReportSchedule(body, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.createReportSchedule(body, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Returns report details (including the `reportDocumentId`, if available) for the report that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 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, refer to [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). * @summary getReport * @param {string} reportId The identifier for the report. This identifier is unique only in combination with a seller ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getReport(reportId, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getReport(reportId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Returns the information required for retrieving a report document\'s contents. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 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, refer to [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). * @summary getReportDocument * @param {string} reportDocumentId The identifier for the report document. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getReportDocument(reportDocumentId, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getReportDocument(reportDocumentId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Returns report schedule details for the report schedule that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [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). * @summary getReportSchedule * @param {string} reportScheduleId The identifier for the report schedule. This identifier is unique only in combination with a seller ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getReportSchedule(reportScheduleId, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getReportSchedule(reportScheduleId, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Returns report schedule details that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [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). * @summary getReportSchedules * @param {Array<string>} reportTypes A list of report types used to filter report schedules. Refer to [Report Type Values](https://developer-docs.amazon.com/sp-api/docs/report-type-values) for more information. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getReportSchedules(reportTypes, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getReportSchedules(reportTypes, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Returns report details for the reports that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [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). * @summary getReports * @param {Array<string>} [reportTypes] A list of report types used to filter reports. Refer to [Report Type Values](https://developer-docs.amazon.com/sp-api/docs/report-type-values) for more information. When reportTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either reportTypes or nextToken is required. * @param {Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>} [processingStatuses] A list of processing statuses used to filter reports. * @param {Array<string>} [marketplaceIds] A list of marketplace identifiers used to filter reports. The reports returned will match at least one of the marketplaces that you specify. * @param {number} [pageSize] The maximum number of reports to return in a single call. * @param {string} [createdSince] The earliest report creation date and time for reports to include in the response, in &lt;a href&#x3D;\&#39;https://developer-docs.amazon.com/sp-api/docs/iso-8601\&#39;&gt;ISO 8601&lt;/a&gt; date time format. The default is 90 days ago. Reports are retained for a maximum of 90 days. * @param {string} [createdUntil] The latest report creation date and time for reports to include in the response, in &lt;a href&#x3D;\&#39;https://developer-docs.amazon.com/sp-api/docs/iso-8601\&#39;&gt;ISO 8601&lt;/a&gt; date time format. The default is now. * @param {string} [nextToken] A string token returned in the response to your previous request. &#x60;nextToken&#x60; is returned when the number of results exceeds the specified &#x60;pageSize&#x60; value. To get the next page of results, call the &#x60;getReports&#x60; operation and include this token as the only parameter. Specifying &#x60;nextToken&#x60; with any other parameters will cause the request to fail. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getReports(reportTypes, processingStatuses, marketplaceIds, pageSize, createdSince, createdUntil, nextToken, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getReports(reportTypes, processingStatuses, marketplaceIds, pageSize, createdSince, createdUntil, nextToken, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, }; }; exports.ReportsApiFp = ReportsApiFp; /** * ReportsApi - factory interface * @export */ const ReportsApiFactory = function (configuration, basePath, axios) { const localVarFp = (0, exports.ReportsApiFp)(configuration); return { /** * Cancels the report that you specify. Only reports with `processingStatus=IN_QUEUE` can be cancelled. Cancelled reports are returned in subsequent calls to the `getReport` and `getReports` operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [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). * @summary cancelReport * @param {string} reportId The identifier for the report. This identifier is unique only in combination with a seller ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ cancelReport(reportId, options) { return localVarFp.cancelReport(reportId, options).then((request) => request(axios, basePath)); }, /** * Cancels the report schedule that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [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). * @summary cancelReportSchedule * @param {string} reportScheduleId The identifier for the report schedule. This identifier is unique only in combination with a seller ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ cancelReportSchedule(reportScheduleId, options) { return localVarFp.cancelReportSchedule(reportScheduleId, options).then((request) => request(axios, basePath)); }, /** * Creates a report. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 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, refer to [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). * @summary createReport * @param {CreateReportSpecification} body Information required to create the report. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createReport(body, options) { return localVarFp.createReport(body, options).then((request) => request(axios, basePath)); }, /** * Creates a report schedule. If a report schedule with the same report type and marketplace IDs already exists, it will be cancelled and replaced with this one. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [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). * @summary createReportSchedule * @param {CreateReportScheduleSpecification} body Information required to create the report schedule. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createReportSchedule(body, options) { return localVarFp.createReportSchedule(body, options).then((request) => request(axios, basePath)); }, /** * Returns report details (including the `reportDocumentId`, if available) for the report that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 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, refer to [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). * @summary getReport * @param {string} reportId The identifier for the report. This identifier is unique only in combination with a seller ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getReport(reportId, options) { return localVarFp.getReport(reportId, options).then((request) => request(axios, basePath)); }, /** * Returns the information required for retrieving a report document\'s contents. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 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, refer to [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). * @summary getReportDocument * @param {string} reportDocumentId The identifier for the report document. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getReportDocument(reportDocumentId, options) { return localVarFp.getReportDocument(reportDocumentId, options).then((request) => request(axios, basePath)); }, /** * Returns report schedule details for the report schedule that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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 infor