@sp-api-sdk/feeds-api-2021-06-30 3.3.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/README.md +7 -8
  2. package/dist/index.cjs +685 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +680 -0
  5. package/dist/index.d.ts +680 -0
  6. package/dist/index.js +653 -0
  7. package/dist/index.js.map +1 -0
  8. package/package.json +26 -12
  9. package/dist/cjs/api-model/api/feeds-api.js +0 -459
  10. package/dist/cjs/api-model/api.js +0 -30
  11. package/dist/cjs/api-model/base.js +0 -52
  12. package/dist/cjs/api-model/common.js +0 -123
  13. package/dist/cjs/api-model/configuration.js +0 -98
  14. package/dist/cjs/api-model/index.js +0 -32
  15. package/dist/cjs/api-model/models/create-feed-document-response.js +0 -15
  16. package/dist/cjs/api-model/models/create-feed-document-specification.js +0 -15
  17. package/dist/cjs/api-model/models/create-feed-response.js +0 -15
  18. package/dist/cjs/api-model/models/create-feed-specification.js +0 -15
  19. package/dist/cjs/api-model/models/error-list.js +0 -15
  20. package/dist/cjs/api-model/models/feed-document.js +0 -19
  21. package/dist/cjs/api-model/models/feed.js +0 -23
  22. package/dist/cjs/api-model/models/get-feeds-response.js +0 -15
  23. package/dist/cjs/api-model/models/index.js +0 -25
  24. package/dist/cjs/api-model/models/model-error.js +0 -15
  25. package/dist/cjs/client.js +0 -56
  26. package/dist/cjs/index.js +0 -19
  27. package/dist/es/api-model/api/feeds-api.js +0 -449
  28. package/dist/es/api-model/api.js +0 -14
  29. package/dist/es/api-model/base.js +0 -44
  30. package/dist/es/api-model/common.js +0 -110
  31. package/dist/es/api-model/configuration.js +0 -94
  32. package/dist/es/api-model/index.js +0 -16
  33. package/dist/es/api-model/models/create-feed-document-response.js +0 -14
  34. package/dist/es/api-model/models/create-feed-document-specification.js +0 -14
  35. package/dist/es/api-model/models/create-feed-response.js +0 -14
  36. package/dist/es/api-model/models/create-feed-specification.js +0 -14
  37. package/dist/es/api-model/models/error-list.js +0 -14
  38. package/dist/es/api-model/models/feed-document.js +0 -16
  39. package/dist/es/api-model/models/feed.js +0 -20
  40. package/dist/es/api-model/models/get-feeds-response.js +0 -14
  41. package/dist/es/api-model/models/index.js +0 -9
  42. package/dist/es/api-model/models/model-error.js +0 -14
  43. package/dist/es/client.js +0 -52
  44. package/dist/es/index.js +0 -3
  45. package/dist/types/api-model/api/feeds-api.d.ts +0 -314
  46. package/dist/types/api-model/api.d.ts +0 -12
  47. package/dist/types/api-model/base.d.ts +0 -42
  48. package/dist/types/api-model/common.d.ts +0 -34
  49. package/dist/types/api-model/configuration.d.ts +0 -98
  50. package/dist/types/api-model/index.d.ts +0 -14
  51. package/dist/types/api-model/models/create-feed-document-response.d.ts +0 -24
  52. package/dist/types/api-model/models/create-feed-document-specification.d.ts +0 -20
  53. package/dist/types/api-model/models/create-feed-response.d.ts +0 -20
  54. package/dist/types/api-model/models/create-feed-specification.d.ts +0 -34
  55. package/dist/types/api-model/models/error-list.d.ts +0 -20
  56. package/dist/types/api-model/models/feed-document.d.ts +0 -32
  57. package/dist/types/api-model/models/feed.d.ts +0 -56
  58. package/dist/types/api-model/models/get-feeds-response.d.ts +0 -25
  59. package/dist/types/api-model/models/index.d.ts +0 -9
  60. package/dist/types/api-model/models/model-error.d.ts +0 -28
  61. package/dist/types/client.d.ts +0 -6
  62. package/dist/types/index.d.ts +0 -3
package/dist/index.cjs ADDED
@@ -0,0 +1,685 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region \0rolldown/runtime.js
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
13
+ get: ((k) => from[k]).bind(null, key),
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
20
+ value: mod,
21
+ enumerable: true
22
+ }) : target, mod));
23
+ //#endregion
24
+ let _sp_api_sdk_common = require("@sp-api-sdk/common");
25
+ let axios = require("axios");
26
+ axios = __toESM(axios, 1);
27
+ //#region src/api-model/base.ts
28
+ const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
29
+ const COLLECTION_FORMATS = {
30
+ csv: ",",
31
+ ssv: " ",
32
+ tsv: " ",
33
+ pipes: "|"
34
+ };
35
+ var BaseAPI = class {
36
+ basePath;
37
+ axios;
38
+ configuration;
39
+ constructor(configuration, basePath = BASE_PATH, axios$8 = axios.default) {
40
+ this.basePath = basePath;
41
+ this.axios = axios$8;
42
+ if (configuration) {
43
+ this.configuration = configuration;
44
+ this.basePath = configuration.basePath ?? basePath;
45
+ }
46
+ }
47
+ };
48
+ var RequiredError = class extends Error {
49
+ field;
50
+ constructor(field, msg) {
51
+ super(msg);
52
+ this.field = field;
53
+ this.name = "RequiredError";
54
+ }
55
+ };
56
+ const operationServerMap = {};
57
+ //#endregion
58
+ //#region src/api-model/common.ts
59
+ const DUMMY_BASE_URL = "https://example.com";
60
+ /**
61
+ *
62
+ * @throws {RequiredError}
63
+ */
64
+ const assertParamExists = function(functionName, paramName, paramValue) {
65
+ if (paramValue === null || paramValue === void 0) throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
66
+ };
67
+ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
68
+ if (parameter == null) return;
69
+ if (typeof parameter === "object") if (Array.isArray(parameter) || parameter instanceof Set) parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
70
+ else Object.keys(parameter).forEach((currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`));
71
+ else if (urlSearchParams.has(key)) urlSearchParams.append(key, parameter);
72
+ else urlSearchParams.set(key, parameter);
73
+ }
74
+ const setSearchParams = function(url, ...objects) {
75
+ const searchParams = new URLSearchParams(url.search);
76
+ setFlattenedQueryParams(searchParams, objects);
77
+ url.search = searchParams.toString();
78
+ };
79
+ /**
80
+ * JSON serialization helper function which replaces instances of unserializable types with serializable ones.
81
+ * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
82
+ * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
83
+ */
84
+ const replaceWithSerializableTypeIfNeeded = function(key, value) {
85
+ if (value instanceof Set) return Array.from(value);
86
+ else return value;
87
+ };
88
+ const serializeDataIfNeeded = function(value, requestOptions, configuration) {
89
+ const nonString = typeof value !== "string";
90
+ return (nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString) ? JSON.stringify(value !== void 0 ? value : {}, replaceWithSerializableTypeIfNeeded) : value || "";
91
+ };
92
+ const toPathString = function(url) {
93
+ return url.pathname + url.search + url.hash;
94
+ };
95
+ const createRequestFunction = function(axiosArgs, globalAxios, BASE_PATH, configuration) {
96
+ return (axios = globalAxios, basePath = BASE_PATH) => {
97
+ const axiosRequestArgs = {
98
+ ...axiosArgs.options,
99
+ url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url
100
+ };
101
+ return axios.request(axiosRequestArgs);
102
+ };
103
+ };
104
+ //#endregion
105
+ //#region src/api-model/api/feeds-api.ts
106
+ /**
107
+ * FeedsApi - axios parameter creator
108
+ */
109
+ const FeedsApiAxiosParamCreator = function(configuration) {
110
+ return {
111
+ /**
112
+ * Cancels the feed that you specify. Only feeds with `processingStatus=IN_QUEUE` can be cancelled. Cancelled feeds are returned in subsequent calls to the [`getFeed`](https://developer-docs.amazon.com/sp-api/reference/getfeed) and [`getFeeds`](https://developer-docs.amazon.com/sp-api/reference/getfeeds) operations. **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 preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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).
113
+ * @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
114
+ * @param {*} [options] Override http request option.
115
+ * @throws {RequiredError}
116
+ */
117
+ cancelFeed: async (feedId, options = {}) => {
118
+ assertParamExists("cancelFeed", "feedId", feedId);
119
+ const localVarPath = `/feeds/2021-06-30/feeds/{feedId}`.replace("{feedId}", encodeURIComponent(String(feedId)));
120
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
121
+ let baseOptions;
122
+ if (configuration) baseOptions = configuration.baseOptions;
123
+ const localVarRequestOptions = {
124
+ method: "DELETE",
125
+ ...baseOptions,
126
+ ...options
127
+ };
128
+ const localVarHeaderParameter = {};
129
+ const localVarQueryParameter = {};
130
+ localVarHeaderParameter["Accept"] = "application/json";
131
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
132
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
133
+ localVarRequestOptions.headers = {
134
+ ...localVarHeaderParameter,
135
+ ...headersFromBaseOptions,
136
+ ...options.headers
137
+ };
138
+ return {
139
+ url: toPathString(localVarUrlObj),
140
+ options: localVarRequestOptions
141
+ };
142
+ },
143
+ /**
144
+ * Creates a feed. Upload the contents of the feed document before calling this operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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). The rate limit for the [`JSON_LISTINGS_FEED`](https://developer-docs.amazon.com/sp-api/docs/listings-feed-type-values#listings-feed) feed type differs from the rate limit for the [`createFeed`](https://developer-docs.amazon.com/sp-api/reference/createfeed) operation. For more information, refer to the [Building Listings Management Workflows Guide](https://developer-docs.amazon.com/sp-api/docs/building-listings-management-workflows-guide#should-i-submit-in-bulk-using-the-json_listings_feed-or-individually-with-the-listings-items-api).
145
+ * @param {CreateFeedSpecification} body Information required to create the feed.
146
+ * @param {*} [options] Override http request option.
147
+ * @throws {RequiredError}
148
+ */
149
+ createFeed: async (body, options = {}) => {
150
+ assertParamExists("createFeed", "body", body);
151
+ const localVarUrlObj = new URL(`/feeds/2021-06-30/feeds`, DUMMY_BASE_URL);
152
+ let baseOptions;
153
+ if (configuration) baseOptions = configuration.baseOptions;
154
+ const localVarRequestOptions = {
155
+ method: "POST",
156
+ ...baseOptions,
157
+ ...options
158
+ };
159
+ const localVarHeaderParameter = {};
160
+ const localVarQueryParameter = {};
161
+ localVarHeaderParameter["Content-Type"] = "application/json";
162
+ localVarHeaderParameter["Accept"] = "application/json";
163
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
164
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
165
+ localVarRequestOptions.headers = {
166
+ ...localVarHeaderParameter,
167
+ ...headersFromBaseOptions,
168
+ ...options.headers
169
+ };
170
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
171
+ return {
172
+ url: toPathString(localVarUrlObj),
173
+ options: localVarRequestOptions
174
+ };
175
+ },
176
+ /**
177
+ * Creates a feed document for the feed type that you specify. This operation returns a presigned URL for uploading the feed document contents. It also returns a `feedDocumentId` value that you can pass in with a subsequent call to the [`createFeed`](https://developer-docs.amazon.com/sp-api/reference/createfeed) operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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).
178
+ * @param {CreateFeedDocumentSpecification} body Specifies the content type for the createFeedDocument operation.
179
+ * @param {*} [options] Override http request option.
180
+ * @throws {RequiredError}
181
+ */
182
+ createFeedDocument: async (body, options = {}) => {
183
+ assertParamExists("createFeedDocument", "body", body);
184
+ const localVarUrlObj = new URL(`/feeds/2021-06-30/documents`, DUMMY_BASE_URL);
185
+ let baseOptions;
186
+ if (configuration) baseOptions = configuration.baseOptions;
187
+ const localVarRequestOptions = {
188
+ method: "POST",
189
+ ...baseOptions,
190
+ ...options
191
+ };
192
+ const localVarHeaderParameter = {};
193
+ const localVarQueryParameter = {};
194
+ localVarHeaderParameter["Content-Type"] = "application/json";
195
+ localVarHeaderParameter["Accept"] = "application/json";
196
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
197
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
198
+ localVarRequestOptions.headers = {
199
+ ...localVarHeaderParameter,
200
+ ...headersFromBaseOptions,
201
+ ...options.headers
202
+ };
203
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
204
+ return {
205
+ url: toPathString(localVarUrlObj),
206
+ options: localVarRequestOptions
207
+ };
208
+ },
209
+ /**
210
+ * Returns feed details (including the `resultDocumentId`, if available) for the feed 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 preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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).
211
+ * @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
212
+ * @param {*} [options] Override http request option.
213
+ * @throws {RequiredError}
214
+ */
215
+ getFeed: async (feedId, options = {}) => {
216
+ assertParamExists("getFeed", "feedId", feedId);
217
+ const localVarPath = `/feeds/2021-06-30/feeds/{feedId}`.replace("{feedId}", encodeURIComponent(String(feedId)));
218
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
219
+ let baseOptions;
220
+ if (configuration) baseOptions = configuration.baseOptions;
221
+ const localVarRequestOptions = {
222
+ method: "GET",
223
+ ...baseOptions,
224
+ ...options
225
+ };
226
+ const localVarHeaderParameter = {};
227
+ const localVarQueryParameter = {};
228
+ localVarHeaderParameter["Accept"] = "application/json";
229
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
230
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
231
+ localVarRequestOptions.headers = {
232
+ ...localVarHeaderParameter,
233
+ ...headersFromBaseOptions,
234
+ ...options.headers
235
+ };
236
+ return {
237
+ url: toPathString(localVarUrlObj),
238
+ options: localVarRequestOptions
239
+ };
240
+ },
241
+ /**
242
+ * Returns the information required for retrieving a feed document\'s contents. **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 preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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).
243
+ * @param {string} feedDocumentId The identifier of the feed document.
244
+ * @param {boolean} [enableContentEncodingUrlHeader] When &#x60;true&#x60;, the Content-Encoding header on the returned URL is set to &#x60;gzip&#x60; instead of the default &#x60;identity&#x60; when &#x60;compressionAlgorithm&#x60; is &#x60;GZIP&#x60;. This allows automatic decompression by HTTP clients.
245
+ * @param {*} [options] Override http request option.
246
+ * @throws {RequiredError}
247
+ */
248
+ getFeedDocument: async (feedDocumentId, enableContentEncodingUrlHeader, options = {}) => {
249
+ assertParamExists("getFeedDocument", "feedDocumentId", feedDocumentId);
250
+ const localVarPath = `/feeds/2021-06-30/documents/{feedDocumentId}`.replace("{feedDocumentId}", encodeURIComponent(String(feedDocumentId)));
251
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
252
+ let baseOptions;
253
+ if (configuration) baseOptions = configuration.baseOptions;
254
+ const localVarRequestOptions = {
255
+ method: "GET",
256
+ ...baseOptions,
257
+ ...options
258
+ };
259
+ const localVarHeaderParameter = {};
260
+ const localVarQueryParameter = {};
261
+ if (enableContentEncodingUrlHeader !== void 0) localVarQueryParameter["enableContentEncodingUrlHeader"] = enableContentEncodingUrlHeader;
262
+ localVarHeaderParameter["Accept"] = "application/json";
263
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
264
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
265
+ localVarRequestOptions.headers = {
266
+ ...localVarHeaderParameter,
267
+ ...headersFromBaseOptions,
268
+ ...options.headers
269
+ };
270
+ return {
271
+ url: toPathString(localVarUrlObj),
272
+ options: localVarRequestOptions
273
+ };
274
+ },
275
+ /**
276
+ * Returns feed details for the feeds 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 preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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).
277
+ * @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.
278
+ * @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.
279
+ * @param {number} [pageSize] The maximum number of feeds to return in a single call.
280
+ * @param {Array<GetFeedsProcessingStatusesEnum>} [processingStatuses] A list of processing statuses used to filter feeds.
281
+ * @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.
282
+ * @param {string} [createdUntil] The latest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is now.
283
+ * @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.
284
+ * @param {*} [options] Override http request option.
285
+ * @throws {RequiredError}
286
+ */
287
+ getFeeds: async (feedTypes, marketplaceIds, pageSize, processingStatuses, createdSince, createdUntil, nextToken, options = {}) => {
288
+ const localVarUrlObj = new URL(`/feeds/2021-06-30/feeds`, DUMMY_BASE_URL);
289
+ let baseOptions;
290
+ if (configuration) baseOptions = configuration.baseOptions;
291
+ const localVarRequestOptions = {
292
+ method: "GET",
293
+ ...baseOptions,
294
+ ...options
295
+ };
296
+ const localVarHeaderParameter = {};
297
+ const localVarQueryParameter = {};
298
+ if (feedTypes) localVarQueryParameter["feedTypes"] = feedTypes.join(COLLECTION_FORMATS.csv);
299
+ if (marketplaceIds) localVarQueryParameter["marketplaceIds"] = marketplaceIds.join(COLLECTION_FORMATS.csv);
300
+ if (pageSize !== void 0) localVarQueryParameter["pageSize"] = pageSize;
301
+ if (processingStatuses) localVarQueryParameter["processingStatuses"] = processingStatuses.join(COLLECTION_FORMATS.csv);
302
+ if (createdSince !== void 0) localVarQueryParameter["createdSince"] = createdSince instanceof Date ? createdSince.toISOString() : createdSince;
303
+ if (createdUntil !== void 0) localVarQueryParameter["createdUntil"] = createdUntil instanceof Date ? createdUntil.toISOString() : createdUntil;
304
+ if (nextToken !== void 0) localVarQueryParameter["nextToken"] = nextToken;
305
+ localVarHeaderParameter["Accept"] = "application/json";
306
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
307
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
308
+ localVarRequestOptions.headers = {
309
+ ...localVarHeaderParameter,
310
+ ...headersFromBaseOptions,
311
+ ...options.headers
312
+ };
313
+ return {
314
+ url: toPathString(localVarUrlObj),
315
+ options: localVarRequestOptions
316
+ };
317
+ }
318
+ };
319
+ };
320
+ /**
321
+ * FeedsApi - functional programming interface
322
+ */
323
+ const FeedsApiFp = function(configuration) {
324
+ const localVarAxiosParamCreator = FeedsApiAxiosParamCreator(configuration);
325
+ return {
326
+ /**
327
+ * Cancels the feed that you specify. Only feeds with `processingStatus=IN_QUEUE` can be cancelled. Cancelled feeds are returned in subsequent calls to the [`getFeed`](https://developer-docs.amazon.com/sp-api/reference/getfeed) and [`getFeeds`](https://developer-docs.amazon.com/sp-api/reference/getfeeds) operations. **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 preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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).
328
+ * @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
329
+ * @param {*} [options] Override http request option.
330
+ * @throws {RequiredError}
331
+ */
332
+ async cancelFeed(feedId, options) {
333
+ const localVarAxiosArgs = await localVarAxiosParamCreator.cancelFeed(feedId, options);
334
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
335
+ const localVarOperationServerBasePath = operationServerMap["FeedsApi.cancelFeed"]?.[localVarOperationServerIndex]?.url;
336
+ return (axios$1, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$1, localVarOperationServerBasePath || basePath);
337
+ },
338
+ /**
339
+ * Creates a feed. Upload the contents of the feed document before calling this operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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). The rate limit for the [`JSON_LISTINGS_FEED`](https://developer-docs.amazon.com/sp-api/docs/listings-feed-type-values#listings-feed) feed type differs from the rate limit for the [`createFeed`](https://developer-docs.amazon.com/sp-api/reference/createfeed) operation. For more information, refer to the [Building Listings Management Workflows Guide](https://developer-docs.amazon.com/sp-api/docs/building-listings-management-workflows-guide#should-i-submit-in-bulk-using-the-json_listings_feed-or-individually-with-the-listings-items-api).
340
+ * @param {CreateFeedSpecification} body Information required to create the feed.
341
+ * @param {*} [options] Override http request option.
342
+ * @throws {RequiredError}
343
+ */
344
+ async createFeed(body, options) {
345
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createFeed(body, options);
346
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
347
+ const localVarOperationServerBasePath = operationServerMap["FeedsApi.createFeed"]?.[localVarOperationServerIndex]?.url;
348
+ return (axios$2, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$2, localVarOperationServerBasePath || basePath);
349
+ },
350
+ /**
351
+ * Creates a feed document for the feed type that you specify. This operation returns a presigned URL for uploading the feed document contents. It also returns a `feedDocumentId` value that you can pass in with a subsequent call to the [`createFeed`](https://developer-docs.amazon.com/sp-api/reference/createfeed) operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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).
352
+ * @param {CreateFeedDocumentSpecification} body Specifies the content type for the createFeedDocument operation.
353
+ * @param {*} [options] Override http request option.
354
+ * @throws {RequiredError}
355
+ */
356
+ async createFeedDocument(body, options) {
357
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createFeedDocument(body, options);
358
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
359
+ const localVarOperationServerBasePath = operationServerMap["FeedsApi.createFeedDocument"]?.[localVarOperationServerIndex]?.url;
360
+ return (axios$3, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$3, localVarOperationServerBasePath || basePath);
361
+ },
362
+ /**
363
+ * Returns feed details (including the `resultDocumentId`, if available) for the feed 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 preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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).
364
+ * @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
365
+ * @param {*} [options] Override http request option.
366
+ * @throws {RequiredError}
367
+ */
368
+ async getFeed(feedId, options) {
369
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getFeed(feedId, options);
370
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
371
+ const localVarOperationServerBasePath = operationServerMap["FeedsApi.getFeed"]?.[localVarOperationServerIndex]?.url;
372
+ return (axios$4, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$4, localVarOperationServerBasePath || basePath);
373
+ },
374
+ /**
375
+ * Returns the information required for retrieving a feed document\'s contents. **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 preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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).
376
+ * @param {string} feedDocumentId The identifier of the feed document.
377
+ * @param {boolean} [enableContentEncodingUrlHeader] When &#x60;true&#x60;, the Content-Encoding header on the returned URL is set to &#x60;gzip&#x60; instead of the default &#x60;identity&#x60; when &#x60;compressionAlgorithm&#x60; is &#x60;GZIP&#x60;. This allows automatic decompression by HTTP clients.
378
+ * @param {*} [options] Override http request option.
379
+ * @throws {RequiredError}
380
+ */
381
+ async getFeedDocument(feedDocumentId, enableContentEncodingUrlHeader, options) {
382
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getFeedDocument(feedDocumentId, enableContentEncodingUrlHeader, options);
383
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
384
+ const localVarOperationServerBasePath = operationServerMap["FeedsApi.getFeedDocument"]?.[localVarOperationServerIndex]?.url;
385
+ return (axios$5, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$5, localVarOperationServerBasePath || basePath);
386
+ },
387
+ /**
388
+ * Returns feed details for the feeds 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 preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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).
389
+ * @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.
390
+ * @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.
391
+ * @param {number} [pageSize] The maximum number of feeds to return in a single call.
392
+ * @param {Array<GetFeedsProcessingStatusesEnum>} [processingStatuses] A list of processing statuses used to filter feeds.
393
+ * @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.
394
+ * @param {string} [createdUntil] The latest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is now.
395
+ * @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.
396
+ * @param {*} [options] Override http request option.
397
+ * @throws {RequiredError}
398
+ */
399
+ async getFeeds(feedTypes, marketplaceIds, pageSize, processingStatuses, createdSince, createdUntil, nextToken, options) {
400
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getFeeds(feedTypes, marketplaceIds, pageSize, processingStatuses, createdSince, createdUntil, nextToken, options);
401
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
402
+ const localVarOperationServerBasePath = operationServerMap["FeedsApi.getFeeds"]?.[localVarOperationServerIndex]?.url;
403
+ return (axios$6, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$6, localVarOperationServerBasePath || basePath);
404
+ }
405
+ };
406
+ };
407
+ /**
408
+ * FeedsApi - factory interface
409
+ */
410
+ const FeedsApiFactory = function(configuration, basePath, axios$7) {
411
+ const localVarFp = FeedsApiFp(configuration);
412
+ return {
413
+ /**
414
+ * Cancels the feed that you specify. Only feeds with `processingStatus=IN_QUEUE` can be cancelled. Cancelled feeds are returned in subsequent calls to the [`getFeed`](https://developer-docs.amazon.com/sp-api/reference/getfeed) and [`getFeeds`](https://developer-docs.amazon.com/sp-api/reference/getfeeds) operations. **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 preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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).
415
+ * @param {FeedsApiCancelFeedRequest} requestParameters Request parameters.
416
+ * @param {*} [options] Override http request option.
417
+ * @throws {RequiredError}
418
+ */
419
+ cancelFeed(requestParameters, options) {
420
+ return localVarFp.cancelFeed(requestParameters.feedId, options).then((request) => request(axios$7, basePath));
421
+ },
422
+ /**
423
+ * Creates a feed. Upload the contents of the feed document before calling this operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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). The rate limit for the [`JSON_LISTINGS_FEED`](https://developer-docs.amazon.com/sp-api/docs/listings-feed-type-values#listings-feed) feed type differs from the rate limit for the [`createFeed`](https://developer-docs.amazon.com/sp-api/reference/createfeed) operation. For more information, refer to the [Building Listings Management Workflows Guide](https://developer-docs.amazon.com/sp-api/docs/building-listings-management-workflows-guide#should-i-submit-in-bulk-using-the-json_listings_feed-or-individually-with-the-listings-items-api).
424
+ * @param {FeedsApiCreateFeedRequest} requestParameters Request parameters.
425
+ * @param {*} [options] Override http request option.
426
+ * @throws {RequiredError}
427
+ */
428
+ createFeed(requestParameters, options) {
429
+ return localVarFp.createFeed(requestParameters.body, options).then((request) => request(axios$7, basePath));
430
+ },
431
+ /**
432
+ * Creates a feed document for the feed type that you specify. This operation returns a presigned URL for uploading the feed document contents. It also returns a `feedDocumentId` value that you can pass in with a subsequent call to the [`createFeed`](https://developer-docs.amazon.com/sp-api/reference/createfeed) operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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).
433
+ * @param {FeedsApiCreateFeedDocumentRequest} requestParameters Request parameters.
434
+ * @param {*} [options] Override http request option.
435
+ * @throws {RequiredError}
436
+ */
437
+ createFeedDocument(requestParameters, options) {
438
+ return localVarFp.createFeedDocument(requestParameters.body, options).then((request) => request(axios$7, basePath));
439
+ },
440
+ /**
441
+ * Returns feed details (including the `resultDocumentId`, if available) for the feed 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 preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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).
442
+ * @param {FeedsApiGetFeedRequest} requestParameters Request parameters.
443
+ * @param {*} [options] Override http request option.
444
+ * @throws {RequiredError}
445
+ */
446
+ getFeed(requestParameters, options) {
447
+ return localVarFp.getFeed(requestParameters.feedId, options).then((request) => request(axios$7, basePath));
448
+ },
449
+ /**
450
+ * Returns the information required for retrieving a feed document\'s contents. **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 preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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).
451
+ * @param {FeedsApiGetFeedDocumentRequest} requestParameters Request parameters.
452
+ * @param {*} [options] Override http request option.
453
+ * @throws {RequiredError}
454
+ */
455
+ getFeedDocument(requestParameters, options) {
456
+ return localVarFp.getFeedDocument(requestParameters.feedDocumentId, requestParameters.enableContentEncodingUrlHeader, options).then((request) => request(axios$7, basePath));
457
+ },
458
+ /**
459
+ * Returns feed details for the feeds 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 preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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).
460
+ * @param {FeedsApiGetFeedsRequest} requestParameters Request parameters.
461
+ * @param {*} [options] Override http request option.
462
+ * @throws {RequiredError}
463
+ */
464
+ getFeeds(requestParameters = {}, options) {
465
+ return localVarFp.getFeeds(requestParameters.feedTypes, requestParameters.marketplaceIds, requestParameters.pageSize, requestParameters.processingStatuses, requestParameters.createdSince, requestParameters.createdUntil, requestParameters.nextToken, options).then((request) => request(axios$7, basePath));
466
+ }
467
+ };
468
+ };
469
+ /**
470
+ * FeedsApi - object-oriented interface
471
+ */
472
+ var FeedsApi = class extends BaseAPI {
473
+ /**
474
+ * Cancels the feed that you specify. Only feeds with `processingStatus=IN_QUEUE` can be cancelled. Cancelled feeds are returned in subsequent calls to the [`getFeed`](https://developer-docs.amazon.com/sp-api/reference/getfeed) and [`getFeeds`](https://developer-docs.amazon.com/sp-api/reference/getfeeds) operations. **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 preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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).
475
+ * @param {FeedsApiCancelFeedRequest} requestParameters Request parameters.
476
+ * @param {*} [options] Override http request option.
477
+ * @throws {RequiredError}
478
+ */
479
+ cancelFeed(requestParameters, options) {
480
+ return FeedsApiFp(this.configuration).cancelFeed(requestParameters.feedId, options).then((request) => request(this.axios, this.basePath));
481
+ }
482
+ /**
483
+ * Creates a feed. Upload the contents of the feed document before calling this operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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). The rate limit for the [`JSON_LISTINGS_FEED`](https://developer-docs.amazon.com/sp-api/docs/listings-feed-type-values#listings-feed) feed type differs from the rate limit for the [`createFeed`](https://developer-docs.amazon.com/sp-api/reference/createfeed) operation. For more information, refer to the [Building Listings Management Workflows Guide](https://developer-docs.amazon.com/sp-api/docs/building-listings-management-workflows-guide#should-i-submit-in-bulk-using-the-json_listings_feed-or-individually-with-the-listings-items-api).
484
+ * @param {FeedsApiCreateFeedRequest} requestParameters Request parameters.
485
+ * @param {*} [options] Override http request option.
486
+ * @throws {RequiredError}
487
+ */
488
+ createFeed(requestParameters, options) {
489
+ return FeedsApiFp(this.configuration).createFeed(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
490
+ }
491
+ /**
492
+ * Creates a feed document for the feed type that you specify. This operation returns a presigned URL for uploading the feed document contents. It also returns a `feedDocumentId` value that you can pass in with a subsequent call to the [`createFeed`](https://developer-docs.amazon.com/sp-api/reference/createfeed) operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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).
493
+ * @param {FeedsApiCreateFeedDocumentRequest} requestParameters Request parameters.
494
+ * @param {*} [options] Override http request option.
495
+ * @throws {RequiredError}
496
+ */
497
+ createFeedDocument(requestParameters, options) {
498
+ return FeedsApiFp(this.configuration).createFeedDocument(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
499
+ }
500
+ /**
501
+ * Returns feed details (including the `resultDocumentId`, if available) for the feed 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 preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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).
502
+ * @param {FeedsApiGetFeedRequest} requestParameters Request parameters.
503
+ * @param {*} [options] Override http request option.
504
+ * @throws {RequiredError}
505
+ */
506
+ getFeed(requestParameters, options) {
507
+ return FeedsApiFp(this.configuration).getFeed(requestParameters.feedId, options).then((request) => request(this.axios, this.basePath));
508
+ }
509
+ /**
510
+ * Returns the information required for retrieving a feed document\'s contents. **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 preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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).
511
+ * @param {FeedsApiGetFeedDocumentRequest} requestParameters Request parameters.
512
+ * @param {*} [options] Override http request option.
513
+ * @throws {RequiredError}
514
+ */
515
+ getFeedDocument(requestParameters, options) {
516
+ return FeedsApiFp(this.configuration).getFeedDocument(requestParameters.feedDocumentId, requestParameters.enableContentEncodingUrlHeader, options).then((request) => request(this.axios, this.basePath));
517
+ }
518
+ /**
519
+ * Returns feed details for the feeds 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 preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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).
520
+ * @param {FeedsApiGetFeedsRequest} requestParameters Request parameters.
521
+ * @param {*} [options] Override http request option.
522
+ * @throws {RequiredError}
523
+ */
524
+ getFeeds(requestParameters = {}, options) {
525
+ return 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));
526
+ }
527
+ };
528
+ const GetFeedsProcessingStatusesEnum = {
529
+ Cancelled: "CANCELLED",
530
+ Done: "DONE",
531
+ Fatal: "FATAL",
532
+ InProgress: "IN_PROGRESS",
533
+ InQueue: "IN_QUEUE"
534
+ };
535
+ //#endregion
536
+ //#region src/api-model/configuration.ts
537
+ var Configuration = class {
538
+ /**
539
+ * parameter for apiKey security
540
+ * @param name security name
541
+ */
542
+ apiKey;
543
+ /**
544
+ * parameter for basic security
545
+ */
546
+ username;
547
+ /**
548
+ * parameter for basic security
549
+ */
550
+ password;
551
+ /**
552
+ * parameter for oauth2 security
553
+ * @param name security name
554
+ * @param scopes oauth2 scope
555
+ */
556
+ accessToken;
557
+ /**
558
+ * parameter for aws4 signature security
559
+ * @param {Object} AWS4Signature - AWS4 Signature security
560
+ * @param {string} options.region - aws region
561
+ * @param {string} options.service - name of the service.
562
+ * @param {string} credentials.accessKeyId - aws access key id
563
+ * @param {string} credentials.secretAccessKey - aws access key
564
+ * @param {string} credentials.sessionToken - aws session token
565
+ * @memberof Configuration
566
+ */
567
+ awsv4;
568
+ /**
569
+ * override base path
570
+ */
571
+ basePath;
572
+ /**
573
+ * override server index
574
+ */
575
+ serverIndex;
576
+ /**
577
+ * base options for axios calls
578
+ */
579
+ baseOptions;
580
+ /**
581
+ * The FormData constructor that will be used to create multipart form data
582
+ * requests. You can inject this here so that execution environments that
583
+ * do not support the FormData class can still run the generated client.
584
+ *
585
+ * @type {new () => FormData}
586
+ */
587
+ formDataCtor;
588
+ constructor(param = {}) {
589
+ this.apiKey = param.apiKey;
590
+ this.username = param.username;
591
+ this.password = param.password;
592
+ this.accessToken = param.accessToken;
593
+ this.awsv4 = param.awsv4;
594
+ this.basePath = param.basePath;
595
+ this.serverIndex = param.serverIndex;
596
+ this.baseOptions = {
597
+ ...param.baseOptions,
598
+ headers: { ...param.baseOptions?.headers }
599
+ };
600
+ this.formDataCtor = param.formDataCtor;
601
+ }
602
+ /**
603
+ * Check if the given MIME is a JSON MIME.
604
+ * JSON MIME examples:
605
+ * application/json
606
+ * application/json; charset=UTF8
607
+ * APPLICATION/JSON
608
+ * application/vnd.company+json
609
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
610
+ * @return True if the given MIME is JSON, false otherwise.
611
+ */
612
+ isJsonMime(mime) {
613
+ return mime !== null && /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i.test(mime);
614
+ }
615
+ };
616
+ //#endregion
617
+ //#region src/api-model/models/feed.ts
618
+ const FeedProcessingStatusEnum = {
619
+ Cancelled: "CANCELLED",
620
+ Done: "DONE",
621
+ Fatal: "FATAL",
622
+ InProgress: "IN_PROGRESS",
623
+ InQueue: "IN_QUEUE"
624
+ };
625
+ //#endregion
626
+ //#region src/api-model/models/feed-document.ts
627
+ const FeedDocumentCompressionAlgorithmEnum = { Gzip: "GZIP" };
628
+ //#endregion
629
+ //#region src/client.ts
630
+ const clientRateLimits = [
631
+ {
632
+ method: "get",
633
+ urlRegex: /^\/feeds\/2021\u{2D}06\u{2D}30\/feeds$/v,
634
+ rate: .0222,
635
+ burst: 10
636
+ },
637
+ {
638
+ method: "post",
639
+ urlRegex: /^\/feeds\/2021\u{2D}06\u{2D}30\/feeds$/v,
640
+ rate: .0083,
641
+ burst: 15
642
+ },
643
+ {
644
+ method: "delete",
645
+ urlRegex: /^\/feeds\/2021\u{2D}06\u{2D}30\/feeds\/[^\/]*$/v,
646
+ rate: 2,
647
+ burst: 15
648
+ },
649
+ {
650
+ method: "get",
651
+ urlRegex: /^\/feeds\/2021\u{2D}06\u{2D}30\/feeds\/[^\/]*$/v,
652
+ rate: 2,
653
+ burst: 15
654
+ },
655
+ {
656
+ method: "post",
657
+ urlRegex: /^\/feeds\/2021\u{2D}06\u{2D}30\/documents$/v,
658
+ rate: .5,
659
+ burst: 15
660
+ },
661
+ {
662
+ method: "get",
663
+ urlRegex: /^\/feeds\/2021\u{2D}06\u{2D}30\/documents\/[^\/]*$/v,
664
+ rate: .0222,
665
+ burst: 10
666
+ }
667
+ ];
668
+ var FeedsApiClient = class extends FeedsApi {
669
+ constructor(configuration) {
670
+ const { axios, endpoint } = (0, _sp_api_sdk_common.createAxiosInstance)(configuration, clientRateLimits);
671
+ super(new Configuration(), endpoint, axios);
672
+ }
673
+ };
674
+ //#endregion
675
+ exports.FeedDocumentCompressionAlgorithmEnum = FeedDocumentCompressionAlgorithmEnum;
676
+ exports.FeedProcessingStatusEnum = FeedProcessingStatusEnum;
677
+ exports.FeedsApi = FeedsApi;
678
+ exports.FeedsApiAxiosParamCreator = FeedsApiAxiosParamCreator;
679
+ exports.FeedsApiClient = FeedsApiClient;
680
+ exports.FeedsApiFactory = FeedsApiFactory;
681
+ exports.FeedsApiFp = FeedsApiFp;
682
+ exports.GetFeedsProcessingStatusesEnum = GetFeedsProcessingStatusesEnum;
683
+ exports.clientRateLimits = clientRateLimits;
684
+
685
+ //# sourceMappingURL=index.cjs.map