@sp-api-sdk/feeds-api-2021-06-30 1.6.15

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 (60) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +58 -0
  3. package/dist/cjs/index.js +6 -0
  4. package/dist/cjs/src/api-model/api/feeds-api.js +445 -0
  5. package/dist/cjs/src/api-model/api.js +17 -0
  6. package/dist/cjs/src/api-model/base.js +62 -0
  7. package/dist/cjs/src/api-model/common.js +137 -0
  8. package/dist/cjs/src/api-model/configuration.js +42 -0
  9. package/dist/cjs/src/api-model/index.js +19 -0
  10. package/dist/cjs/src/api-model/models/create-feed-document-response.js +15 -0
  11. package/dist/cjs/src/api-model/models/create-feed-document-specification.js +15 -0
  12. package/dist/cjs/src/api-model/models/create-feed-response.js +15 -0
  13. package/dist/cjs/src/api-model/models/create-feed-specification.js +15 -0
  14. package/dist/cjs/src/api-model/models/error-list.js +15 -0
  15. package/dist/cjs/src/api-model/models/feed-document.js +24 -0
  16. package/dist/cjs/src/api-model/models/feed.js +28 -0
  17. package/dist/cjs/src/api-model/models/get-feeds-response.js +15 -0
  18. package/dist/cjs/src/api-model/models/index.js +12 -0
  19. package/dist/cjs/src/api-model/models/model-error.js +15 -0
  20. package/dist/cjs/src/client.js +65 -0
  21. package/dist/cjs/src/error.js +10 -0
  22. package/dist/es/index.js +3 -0
  23. package/dist/es/src/api-model/api/feeds-api.js +437 -0
  24. package/dist/es/src/api-model/api.js +14 -0
  25. package/dist/es/src/api-model/base.js +56 -0
  26. package/dist/es/src/api-model/common.js +125 -0
  27. package/dist/es/src/api-model/configuration.js +38 -0
  28. package/dist/es/src/api-model/index.js +16 -0
  29. package/dist/es/src/api-model/models/create-feed-document-response.js +14 -0
  30. package/dist/es/src/api-model/models/create-feed-document-specification.js +14 -0
  31. package/dist/es/src/api-model/models/create-feed-response.js +14 -0
  32. package/dist/es/src/api-model/models/create-feed-specification.js +14 -0
  33. package/dist/es/src/api-model/models/error-list.js +14 -0
  34. package/dist/es/src/api-model/models/feed-document.js +21 -0
  35. package/dist/es/src/api-model/models/feed.js +25 -0
  36. package/dist/es/src/api-model/models/get-feeds-response.js +14 -0
  37. package/dist/es/src/api-model/models/index.js +9 -0
  38. package/dist/es/src/api-model/models/model-error.js +14 -0
  39. package/dist/es/src/client.js +61 -0
  40. package/dist/es/src/error.js +6 -0
  41. package/dist/types/index.d.ts +3 -0
  42. package/dist/types/src/api-model/api/feeds-api.d.ts +353 -0
  43. package/dist/types/src/api-model/api.d.ts +12 -0
  44. package/dist/types/src/api-model/base.d.ts +55 -0
  45. package/dist/types/src/api-model/common.d.ts +65 -0
  46. package/dist/types/src/api-model/configuration.d.ts +83 -0
  47. package/dist/types/src/api-model/index.d.ts +14 -0
  48. package/dist/types/src/api-model/models/create-feed-document-response.d.ts +30 -0
  49. package/dist/types/src/api-model/models/create-feed-document-specification.d.ts +24 -0
  50. package/dist/types/src/api-model/models/create-feed-response.d.ts +24 -0
  51. package/dist/types/src/api-model/models/create-feed-specification.d.ts +44 -0
  52. package/dist/types/src/api-model/models/error-list.d.ts +24 -0
  53. package/dist/types/src/api-model/models/feed-document.d.ts +43 -0
  54. package/dist/types/src/api-model/models/feed.d.ts +77 -0
  55. package/dist/types/src/api-model/models/get-feeds-response.d.ts +31 -0
  56. package/dist/types/src/api-model/models/index.d.ts +9 -0
  57. package/dist/types/src/api-model/models/model-error.d.ts +36 -0
  58. package/dist/types/src/client.d.ts +13 -0
  59. package/dist/types/src/error.d.ts +3 -0
  60. package/package.json +53 -0
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Feeds
6
+ * The Selling Partner API for Feeds lets you upload data to Amazon on behalf of a selling partner.
7
+ *
8
+ * The version of the OpenAPI document: 2021-06-30
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FeedsApiClient = exports.RATE_LIMITS = void 0;
4
+ /* eslint-disable prefer-regex-literals */
5
+ const common_1 = require("@sp-api-sdk/common");
6
+ const api_model_1 = require("./api-model");
7
+ const error_1 = require("./error");
8
+ exports.RATE_LIMITS = [
9
+ {
10
+ method: 'get',
11
+ urlRegex: new RegExp('^/feeds/2021-06-30/feeds$'),
12
+ rate: 0.0222,
13
+ burst: 10,
14
+ },
15
+ {
16
+ method: 'post',
17
+ urlRegex: new RegExp('^/feeds/2021-06-30/feeds$'),
18
+ rate: 0.0083,
19
+ burst: 15,
20
+ },
21
+ {
22
+ method: 'delete',
23
+ urlRegex: new RegExp('^/feeds/2021-06-30/feeds/[^/]*$'),
24
+ rate: 0.0222,
25
+ burst: 10,
26
+ },
27
+ {
28
+ method: 'get',
29
+ urlRegex: new RegExp('^/feeds/2021-06-30/feeds/[^/]*$'),
30
+ rate: 2,
31
+ burst: 15,
32
+ },
33
+ {
34
+ method: 'post',
35
+ urlRegex: new RegExp('^/feeds/2021-06-30/documents$'),
36
+ rate: 0.0083,
37
+ burst: 15,
38
+ },
39
+ {
40
+ method: 'get',
41
+ urlRegex: new RegExp('^/feeds/2021-06-30/documents/[^/]*$'),
42
+ rate: 0.0222,
43
+ burst: 10,
44
+ },
45
+ ];
46
+ class FeedsApiClient extends api_model_1.FeedsApi {
47
+ constructor(parameters) {
48
+ const region = common_1.awsRegionByCode[parameters.region] ?? parameters.region;
49
+ const { rateLimiting, ...clientParameters } = parameters;
50
+ const axiosParameters = { ...clientParameters, region };
51
+ if (rateLimiting?.retry) {
52
+ axiosParameters.rateLimits = exports.RATE_LIMITS;
53
+ axiosParameters.onRetry = rateLimiting.onRetry;
54
+ }
55
+ const axiosInstance = (0, common_1.createAxiosInstance)(axiosParameters);
56
+ const configuration = new api_model_1.Configuration();
57
+ const environment = parameters.sandbox ? 'sandbox' : 'production';
58
+ const endpoint = common_1.endpoints[environment][region];
59
+ if (!endpoint) {
60
+ throw new error_1.FeedsApiError(`Unknown region : ${region}`);
61
+ }
62
+ super(configuration, endpoint, axiosInstance);
63
+ }
64
+ }
65
+ exports.FeedsApiClient = FeedsApiClient;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FeedsApiError = void 0;
4
+ class FeedsApiError extends Error {
5
+ constructor(message) {
6
+ super(message);
7
+ this.name = 'FeedsApiError';
8
+ }
9
+ }
10
+ exports.FeedsApiError = FeedsApiError;
@@ -0,0 +1,3 @@
1
+ export * from './src/client';
2
+ export * from './src/error';
3
+ export * from './src/api-model/models';
@@ -0,0 +1,437 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Selling Partner API for Feeds
5
+ * The Selling Partner API for Feeds lets you upload data to Amazon on behalf of a selling partner.
6
+ *
7
+ * The version of the OpenAPI document: 2021-06-30
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import globalAxios from 'axios';
15
+ // Some imports not used depending on template conditions
16
+ // @ts-ignore
17
+ import { DUMMY_BASE_URL, assertParamExists, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
18
+ // @ts-ignore
19
+ import { BASE_PATH, COLLECTION_FORMATS, BaseAPI } from '../base';
20
+ /**
21
+ * FeedsApi - axios parameter creator
22
+ * @export
23
+ */
24
+ export const FeedsApiAxiosParamCreator = function (configuration) {
25
+ return {
26
+ /**
27
+ * 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 and getFeeds operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
28
+ * @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
29
+ * @param {*} [options] Override http request option.
30
+ * @throws {RequiredError}
31
+ */
32
+ cancelFeed: async (feedId, options = {}) => {
33
+ // verify required parameter 'feedId' is not null or undefined
34
+ assertParamExists('cancelFeed', 'feedId', feedId);
35
+ const localVarPath = `/feeds/2021-06-30/feeds/{feedId}`
36
+ .replace(`{${"feedId"}}`, encodeURIComponent(String(feedId)));
37
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
38
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
39
+ let baseOptions;
40
+ if (configuration) {
41
+ baseOptions = configuration.baseOptions;
42
+ }
43
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options };
44
+ const localVarHeaderParameter = {};
45
+ const localVarQueryParameter = {};
46
+ setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
47
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
48
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
49
+ return {
50
+ url: toPathString(localVarUrlObj),
51
+ options: localVarRequestOptions,
52
+ };
53
+ },
54
+ /**
55
+ * Creates a feed. Upload the contents of the feed document before calling this operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
56
+ * @param {CreateFeedSpecification} body
57
+ * @param {*} [options] Override http request option.
58
+ * @throws {RequiredError}
59
+ */
60
+ createFeed: async (body, options = {}) => {
61
+ // verify required parameter 'body' is not null or undefined
62
+ assertParamExists('createFeed', 'body', body);
63
+ const localVarPath = `/feeds/2021-06-30/feeds`;
64
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
65
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
66
+ let baseOptions;
67
+ if (configuration) {
68
+ baseOptions = configuration.baseOptions;
69
+ }
70
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
71
+ const localVarHeaderParameter = {};
72
+ const localVarQueryParameter = {};
73
+ localVarHeaderParameter['Content-Type'] = 'application/json';
74
+ setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
75
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
76
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
77
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
78
+ return {
79
+ url: toPathString(localVarUrlObj),
80
+ options: localVarRequestOptions,
81
+ };
82
+ },
83
+ /**
84
+ * 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 operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
85
+ * @param {CreateFeedDocumentSpecification} body
86
+ * @param {*} [options] Override http request option.
87
+ * @throws {RequiredError}
88
+ */
89
+ createFeedDocument: async (body, options = {}) => {
90
+ // verify required parameter 'body' is not null or undefined
91
+ assertParamExists('createFeedDocument', 'body', body);
92
+ const localVarPath = `/feeds/2021-06-30/documents`;
93
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
94
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
95
+ let baseOptions;
96
+ if (configuration) {
97
+ baseOptions = configuration.baseOptions;
98
+ }
99
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
100
+ const localVarHeaderParameter = {};
101
+ const localVarQueryParameter = {};
102
+ localVarHeaderParameter['Content-Type'] = 'application/json';
103
+ setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
104
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
105
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
106
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
107
+ return {
108
+ url: toPathString(localVarUrlObj),
109
+ options: localVarRequestOptions,
110
+ };
111
+ },
112
+ /**
113
+ * Returns feed details (including the resultDocumentId, if available) for the feed that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2.0 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
114
+ * @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
115
+ * @param {*} [options] Override http request option.
116
+ * @throws {RequiredError}
117
+ */
118
+ getFeed: async (feedId, options = {}) => {
119
+ // verify required parameter 'feedId' is not null or undefined
120
+ assertParamExists('getFeed', 'feedId', feedId);
121
+ const localVarPath = `/feeds/2021-06-30/feeds/{feedId}`
122
+ .replace(`{${"feedId"}}`, encodeURIComponent(String(feedId)));
123
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
124
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
125
+ let baseOptions;
126
+ if (configuration) {
127
+ baseOptions = configuration.baseOptions;
128
+ }
129
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
130
+ const localVarHeaderParameter = {};
131
+ const localVarQueryParameter = {};
132
+ setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
133
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
134
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
135
+ return {
136
+ url: toPathString(localVarUrlObj),
137
+ options: localVarRequestOptions,
138
+ };
139
+ },
140
+ /**
141
+ * Returns the information required for retrieving a feed document\'s contents. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
142
+ * @param {string} feedDocumentId The identifier of the feed document.
143
+ * @param {*} [options] Override http request option.
144
+ * @throws {RequiredError}
145
+ */
146
+ getFeedDocument: async (feedDocumentId, options = {}) => {
147
+ // verify required parameter 'feedDocumentId' is not null or undefined
148
+ assertParamExists('getFeedDocument', 'feedDocumentId', feedDocumentId);
149
+ const localVarPath = `/feeds/2021-06-30/documents/{feedDocumentId}`
150
+ .replace(`{${"feedDocumentId"}}`, encodeURIComponent(String(feedDocumentId)));
151
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
152
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
153
+ let baseOptions;
154
+ if (configuration) {
155
+ baseOptions = configuration.baseOptions;
156
+ }
157
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
158
+ const localVarHeaderParameter = {};
159
+ const localVarQueryParameter = {};
160
+ setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
161
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
162
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
163
+ return {
164
+ url: toPathString(localVarUrlObj),
165
+ options: localVarRequestOptions,
166
+ };
167
+ },
168
+ /**
169
+ * Returns feed details for the feeds that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
170
+ * @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.
171
+ * @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.
172
+ * @param {number} [pageSize] The maximum number of feeds to return in a single call.
173
+ * @param {Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>} [processingStatuses] A list of processing statuses used to filter feeds.
174
+ * @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.
175
+ * @param {string} [createdUntil] The latest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is now.
176
+ * @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.
177
+ * @param {*} [options] Override http request option.
178
+ * @throws {RequiredError}
179
+ */
180
+ getFeeds: async (feedTypes, marketplaceIds, pageSize, processingStatuses, createdSince, createdUntil, nextToken, options = {}) => {
181
+ const localVarPath = `/feeds/2021-06-30/feeds`;
182
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
183
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
184
+ let baseOptions;
185
+ if (configuration) {
186
+ baseOptions = configuration.baseOptions;
187
+ }
188
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
189
+ const localVarHeaderParameter = {};
190
+ const localVarQueryParameter = {};
191
+ if (feedTypes) {
192
+ localVarQueryParameter['feedTypes'] = feedTypes.join(COLLECTION_FORMATS.csv);
193
+ }
194
+ if (marketplaceIds) {
195
+ localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv);
196
+ }
197
+ if (pageSize !== undefined) {
198
+ localVarQueryParameter['pageSize'] = pageSize;
199
+ }
200
+ if (processingStatuses) {
201
+ localVarQueryParameter['processingStatuses'] = processingStatuses.join(COLLECTION_FORMATS.csv);
202
+ }
203
+ if (createdSince !== undefined) {
204
+ localVarQueryParameter['createdSince'] = (createdSince instanceof Date) ?
205
+ createdSince.toISOString() :
206
+ createdSince;
207
+ }
208
+ if (createdUntil !== undefined) {
209
+ localVarQueryParameter['createdUntil'] = (createdUntil instanceof Date) ?
210
+ createdUntil.toISOString() :
211
+ createdUntil;
212
+ }
213
+ if (nextToken !== undefined) {
214
+ localVarQueryParameter['nextToken'] = nextToken;
215
+ }
216
+ setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
217
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
218
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
219
+ return {
220
+ url: toPathString(localVarUrlObj),
221
+ options: localVarRequestOptions,
222
+ };
223
+ },
224
+ };
225
+ };
226
+ /**
227
+ * FeedsApi - functional programming interface
228
+ * @export
229
+ */
230
+ export const FeedsApiFp = function (configuration) {
231
+ const localVarAxiosParamCreator = FeedsApiAxiosParamCreator(configuration);
232
+ return {
233
+ /**
234
+ * 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 and getFeeds operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
235
+ * @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
236
+ * @param {*} [options] Override http request option.
237
+ * @throws {RequiredError}
238
+ */
239
+ async cancelFeed(feedId, options) {
240
+ const localVarAxiosArgs = await localVarAxiosParamCreator.cancelFeed(feedId, options);
241
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
242
+ },
243
+ /**
244
+ * Creates a feed. Upload the contents of the feed document before calling this operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
245
+ * @param {CreateFeedSpecification} body
246
+ * @param {*} [options] Override http request option.
247
+ * @throws {RequiredError}
248
+ */
249
+ async createFeed(body, options) {
250
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createFeed(body, options);
251
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
252
+ },
253
+ /**
254
+ * 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 operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
255
+ * @param {CreateFeedDocumentSpecification} body
256
+ * @param {*} [options] Override http request option.
257
+ * @throws {RequiredError}
258
+ */
259
+ async createFeedDocument(body, options) {
260
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createFeedDocument(body, options);
261
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
262
+ },
263
+ /**
264
+ * Returns feed details (including the resultDocumentId, if available) for the feed that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2.0 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
265
+ * @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
266
+ * @param {*} [options] Override http request option.
267
+ * @throws {RequiredError}
268
+ */
269
+ async getFeed(feedId, options) {
270
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getFeed(feedId, options);
271
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
272
+ },
273
+ /**
274
+ * Returns the information required for retrieving a feed document\'s contents. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
275
+ * @param {string} feedDocumentId The identifier of the feed document.
276
+ * @param {*} [options] Override http request option.
277
+ * @throws {RequiredError}
278
+ */
279
+ async getFeedDocument(feedDocumentId, options) {
280
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getFeedDocument(feedDocumentId, options);
281
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
282
+ },
283
+ /**
284
+ * Returns feed details for the feeds that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
285
+ * @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.
286
+ * @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.
287
+ * @param {number} [pageSize] The maximum number of feeds to return in a single call.
288
+ * @param {Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>} [processingStatuses] A list of processing statuses used to filter feeds.
289
+ * @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.
290
+ * @param {string} [createdUntil] The latest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is now.
291
+ * @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.
292
+ * @param {*} [options] Override http request option.
293
+ * @throws {RequiredError}
294
+ */
295
+ async getFeeds(feedTypes, marketplaceIds, pageSize, processingStatuses, createdSince, createdUntil, nextToken, options) {
296
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getFeeds(feedTypes, marketplaceIds, pageSize, processingStatuses, createdSince, createdUntil, nextToken, options);
297
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
298
+ },
299
+ };
300
+ };
301
+ /**
302
+ * FeedsApi - factory interface
303
+ * @export
304
+ */
305
+ export const FeedsApiFactory = function (configuration, basePath, axios) {
306
+ const localVarFp = FeedsApiFp(configuration);
307
+ return {
308
+ /**
309
+ * 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 and getFeeds operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
310
+ * @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
311
+ * @param {*} [options] Override http request option.
312
+ * @throws {RequiredError}
313
+ */
314
+ cancelFeed(feedId, options) {
315
+ return localVarFp.cancelFeed(feedId, options).then((request) => request(axios, basePath));
316
+ },
317
+ /**
318
+ * Creates a feed. Upload the contents of the feed document before calling this operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
319
+ * @param {CreateFeedSpecification} body
320
+ * @param {*} [options] Override http request option.
321
+ * @throws {RequiredError}
322
+ */
323
+ createFeed(body, options) {
324
+ return localVarFp.createFeed(body, options).then((request) => request(axios, basePath));
325
+ },
326
+ /**
327
+ * 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 operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
328
+ * @param {CreateFeedDocumentSpecification} body
329
+ * @param {*} [options] Override http request option.
330
+ * @throws {RequiredError}
331
+ */
332
+ createFeedDocument(body, options) {
333
+ return localVarFp.createFeedDocument(body, options).then((request) => request(axios, basePath));
334
+ },
335
+ /**
336
+ * Returns feed details (including the resultDocumentId, if available) for the feed that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2.0 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
337
+ * @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
338
+ * @param {*} [options] Override http request option.
339
+ * @throws {RequiredError}
340
+ */
341
+ getFeed(feedId, options) {
342
+ return localVarFp.getFeed(feedId, options).then((request) => request(axios, basePath));
343
+ },
344
+ /**
345
+ * Returns the information required for retrieving a feed document\'s contents. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
346
+ * @param {string} feedDocumentId The identifier of the feed document.
347
+ * @param {*} [options] Override http request option.
348
+ * @throws {RequiredError}
349
+ */
350
+ getFeedDocument(feedDocumentId, options) {
351
+ return localVarFp.getFeedDocument(feedDocumentId, options).then((request) => request(axios, basePath));
352
+ },
353
+ /**
354
+ * Returns feed details for the feeds that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
355
+ * @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.
356
+ * @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.
357
+ * @param {number} [pageSize] The maximum number of feeds to return in a single call.
358
+ * @param {Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>} [processingStatuses] A list of processing statuses used to filter feeds.
359
+ * @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.
360
+ * @param {string} [createdUntil] The latest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is now.
361
+ * @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.
362
+ * @param {*} [options] Override http request option.
363
+ * @throws {RequiredError}
364
+ */
365
+ getFeeds(feedTypes, marketplaceIds, pageSize, processingStatuses, createdSince, createdUntil, nextToken, options) {
366
+ return localVarFp.getFeeds(feedTypes, marketplaceIds, pageSize, processingStatuses, createdSince, createdUntil, nextToken, options).then((request) => request(axios, basePath));
367
+ },
368
+ };
369
+ };
370
+ /**
371
+ * FeedsApi - object-oriented interface
372
+ * @export
373
+ * @class FeedsApi
374
+ * @extends {BaseAPI}
375
+ */
376
+ export class FeedsApi extends BaseAPI {
377
+ /**
378
+ * 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 and getFeeds operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
379
+ * @param {FeedsApiCancelFeedRequest} requestParameters Request parameters.
380
+ * @param {*} [options] Override http request option.
381
+ * @throws {RequiredError}
382
+ * @memberof FeedsApi
383
+ */
384
+ cancelFeed(requestParameters, options) {
385
+ return FeedsApiFp(this.configuration).cancelFeed(requestParameters.feedId, options).then((request) => request(this.axios, this.basePath));
386
+ }
387
+ /**
388
+ * Creates a feed. Upload the contents of the feed document before calling this operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
389
+ * @param {FeedsApiCreateFeedRequest} requestParameters Request parameters.
390
+ * @param {*} [options] Override http request option.
391
+ * @throws {RequiredError}
392
+ * @memberof FeedsApi
393
+ */
394
+ createFeed(requestParameters, options) {
395
+ return FeedsApiFp(this.configuration).createFeed(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
396
+ }
397
+ /**
398
+ * 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 operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
399
+ * @param {FeedsApiCreateFeedDocumentRequest} requestParameters Request parameters.
400
+ * @param {*} [options] Override http request option.
401
+ * @throws {RequiredError}
402
+ * @memberof FeedsApi
403
+ */
404
+ createFeedDocument(requestParameters, options) {
405
+ return FeedsApiFp(this.configuration).createFeedDocument(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
406
+ }
407
+ /**
408
+ * Returns feed details (including the resultDocumentId, if available) for the feed that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2.0 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
409
+ * @param {FeedsApiGetFeedRequest} requestParameters Request parameters.
410
+ * @param {*} [options] Override http request option.
411
+ * @throws {RequiredError}
412
+ * @memberof FeedsApi
413
+ */
414
+ getFeed(requestParameters, options) {
415
+ return FeedsApiFp(this.configuration).getFeed(requestParameters.feedId, options).then((request) => request(this.axios, this.basePath));
416
+ }
417
+ /**
418
+ * Returns the information required for retrieving a feed document\'s contents. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
419
+ * @param {FeedsApiGetFeedDocumentRequest} requestParameters Request parameters.
420
+ * @param {*} [options] Override http request option.
421
+ * @throws {RequiredError}
422
+ * @memberof FeedsApi
423
+ */
424
+ getFeedDocument(requestParameters, options) {
425
+ return FeedsApiFp(this.configuration).getFeedDocument(requestParameters.feedDocumentId, options).then((request) => request(this.axios, this.basePath));
426
+ }
427
+ /**
428
+ * Returns feed details for the feeds that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
429
+ * @param {FeedsApiGetFeedsRequest} requestParameters Request parameters.
430
+ * @param {*} [options] Override http request option.
431
+ * @throws {RequiredError}
432
+ * @memberof FeedsApi
433
+ */
434
+ getFeeds(requestParameters = {}, options) {
435
+ 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));
436
+ }
437
+ }