@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
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Bizon
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # `feeds-api-2021-06-30`
2
+
3
+ The Selling Partner API for Feeds lets you upload data to Amazon on behalf of a selling partner.
4
+
5
+ ## Installing
6
+
7
+ ```sh
8
+ yarn add @sp-api-sdk/feeds-api-2021-06-30
9
+ ```
10
+
11
+ ```sh
12
+ npm install @sp-api-sdk/feeds-api-2021-06-30
13
+ ```
14
+
15
+ ## Getting Started
16
+
17
+ ```javascript
18
+ import {SellingPartnerApiAuth} from '@sp-api-sdk/auth'
19
+ import {FeedsApiClient} from '@sp-api-sdk/feeds-api-2021-06-30'
20
+
21
+ const auth = new SellingPartnerApiAuth({
22
+ clientId: '',
23
+ clientSecret: '',
24
+ refreshToken: '',
25
+ secretAccessKey: '',
26
+ accessKeyId: '',
27
+ region: '',
28
+ role: {
29
+ arn: '',
30
+ }
31
+ })
32
+
33
+ const client = new FeedsApiClient({
34
+ auth,
35
+ region: 'eu' // or 'eu-west-1'
36
+ })
37
+ ```
38
+
39
+ ## Handle Rate Limiting
40
+
41
+ If you want to let the SDK retry after each 429 responses, instanciate the client like this:
42
+
43
+ ```javascript
44
+ const client = new FeedsApiClient({
45
+ auth,
46
+ region: 'eu',
47
+ rateLimiting: {
48
+ retry: true,
49
+ onRetry: (retryInfo) => console.log(retryInfo) // Optional
50
+ }
51
+ })
52
+ ```
53
+
54
+ The SDK gets the rate limits for each routes from the API documentation
55
+
56
+ ## API documentation
57
+
58
+ See [here](https://github.com/amzn/selling-partner-api-docs/tree/main/references/feeds-api/feeds_2021-06-30.md)
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ (0, tslib_1.__exportStar)(require("./src/client"), exports);
5
+ (0, tslib_1.__exportStar)(require("./src/error"), exports);
6
+ (0, tslib_1.__exportStar)(require("./src/api-model/models"), exports);
@@ -0,0 +1,445 @@
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 });
16
+ exports.FeedsApi = exports.FeedsApiFactory = exports.FeedsApiFp = exports.FeedsApiAxiosParamCreator = void 0;
17
+ const tslib_1 = require("tslib");
18
+ const axios_1 = (0, tslib_1.__importDefault)(require("axios"));
19
+ // Some imports not used depending on template conditions
20
+ // @ts-ignore
21
+ const common_1 = require("../common");
22
+ // @ts-ignore
23
+ const base_1 = require("../base");
24
+ /**
25
+ * FeedsApi - axios parameter creator
26
+ * @export
27
+ */
28
+ const FeedsApiAxiosParamCreator = function (configuration) {
29
+ return {
30
+ /**
31
+ * 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.
32
+ * @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
33
+ * @param {*} [options] Override http request option.
34
+ * @throws {RequiredError}
35
+ */
36
+ cancelFeed: async (feedId, options = {}) => {
37
+ // verify required parameter 'feedId' is not null or undefined
38
+ (0, common_1.assertParamExists)('cancelFeed', 'feedId', feedId);
39
+ const localVarPath = `/feeds/2021-06-30/feeds/{feedId}`
40
+ .replace(`{${"feedId"}}`, encodeURIComponent(String(feedId)));
41
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
42
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
43
+ let baseOptions;
44
+ if (configuration) {
45
+ baseOptions = configuration.baseOptions;
46
+ }
47
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options };
48
+ const localVarHeaderParameter = {};
49
+ const localVarQueryParameter = {};
50
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
51
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
52
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
53
+ return {
54
+ url: (0, common_1.toPathString)(localVarUrlObj),
55
+ options: localVarRequestOptions,
56
+ };
57
+ },
58
+ /**
59
+ * 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.
60
+ * @param {CreateFeedSpecification} body
61
+ * @param {*} [options] Override http request option.
62
+ * @throws {RequiredError}
63
+ */
64
+ createFeed: async (body, options = {}) => {
65
+ // verify required parameter 'body' is not null or undefined
66
+ (0, common_1.assertParamExists)('createFeed', 'body', body);
67
+ const localVarPath = `/feeds/2021-06-30/feeds`;
68
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
69
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
70
+ let baseOptions;
71
+ if (configuration) {
72
+ baseOptions = configuration.baseOptions;
73
+ }
74
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
75
+ const localVarHeaderParameter = {};
76
+ const localVarQueryParameter = {};
77
+ localVarHeaderParameter['Content-Type'] = 'application/json';
78
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
79
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
80
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
81
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
82
+ return {
83
+ url: (0, common_1.toPathString)(localVarUrlObj),
84
+ options: localVarRequestOptions,
85
+ };
86
+ },
87
+ /**
88
+ * 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.
89
+ * @param {CreateFeedDocumentSpecification} body
90
+ * @param {*} [options] Override http request option.
91
+ * @throws {RequiredError}
92
+ */
93
+ createFeedDocument: async (body, options = {}) => {
94
+ // verify required parameter 'body' is not null or undefined
95
+ (0, common_1.assertParamExists)('createFeedDocument', 'body', body);
96
+ const localVarPath = `/feeds/2021-06-30/documents`;
97
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
98
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
99
+ let baseOptions;
100
+ if (configuration) {
101
+ baseOptions = configuration.baseOptions;
102
+ }
103
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
104
+ const localVarHeaderParameter = {};
105
+ const localVarQueryParameter = {};
106
+ localVarHeaderParameter['Content-Type'] = 'application/json';
107
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
108
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
109
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
110
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
111
+ return {
112
+ url: (0, common_1.toPathString)(localVarUrlObj),
113
+ options: localVarRequestOptions,
114
+ };
115
+ },
116
+ /**
117
+ * 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.
118
+ * @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
119
+ * @param {*} [options] Override http request option.
120
+ * @throws {RequiredError}
121
+ */
122
+ getFeed: async (feedId, options = {}) => {
123
+ // verify required parameter 'feedId' is not null or undefined
124
+ (0, common_1.assertParamExists)('getFeed', 'feedId', feedId);
125
+ const localVarPath = `/feeds/2021-06-30/feeds/{feedId}`
126
+ .replace(`{${"feedId"}}`, encodeURIComponent(String(feedId)));
127
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
128
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
129
+ let baseOptions;
130
+ if (configuration) {
131
+ baseOptions = configuration.baseOptions;
132
+ }
133
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
134
+ const localVarHeaderParameter = {};
135
+ const localVarQueryParameter = {};
136
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
137
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
138
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
139
+ return {
140
+ url: (0, common_1.toPathString)(localVarUrlObj),
141
+ options: localVarRequestOptions,
142
+ };
143
+ },
144
+ /**
145
+ * 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.
146
+ * @param {string} feedDocumentId The identifier of the feed document.
147
+ * @param {*} [options] Override http request option.
148
+ * @throws {RequiredError}
149
+ */
150
+ getFeedDocument: async (feedDocumentId, options = {}) => {
151
+ // verify required parameter 'feedDocumentId' is not null or undefined
152
+ (0, common_1.assertParamExists)('getFeedDocument', 'feedDocumentId', feedDocumentId);
153
+ const localVarPath = `/feeds/2021-06-30/documents/{feedDocumentId}`
154
+ .replace(`{${"feedDocumentId"}}`, encodeURIComponent(String(feedDocumentId)));
155
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
156
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
157
+ let baseOptions;
158
+ if (configuration) {
159
+ baseOptions = configuration.baseOptions;
160
+ }
161
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
162
+ const localVarHeaderParameter = {};
163
+ const localVarQueryParameter = {};
164
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
165
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
166
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
167
+ return {
168
+ url: (0, common_1.toPathString)(localVarUrlObj),
169
+ options: localVarRequestOptions,
170
+ };
171
+ },
172
+ /**
173
+ * 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.
174
+ * @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.
175
+ * @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.
176
+ * @param {number} [pageSize] The maximum number of feeds to return in a single call.
177
+ * @param {Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>} [processingStatuses] A list of processing statuses used to filter feeds.
178
+ * @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.
179
+ * @param {string} [createdUntil] The latest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is now.
180
+ * @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.
181
+ * @param {*} [options] Override http request option.
182
+ * @throws {RequiredError}
183
+ */
184
+ getFeeds: async (feedTypes, marketplaceIds, pageSize, processingStatuses, createdSince, createdUntil, nextToken, options = {}) => {
185
+ const localVarPath = `/feeds/2021-06-30/feeds`;
186
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
187
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
188
+ let baseOptions;
189
+ if (configuration) {
190
+ baseOptions = configuration.baseOptions;
191
+ }
192
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
193
+ const localVarHeaderParameter = {};
194
+ const localVarQueryParameter = {};
195
+ if (feedTypes) {
196
+ localVarQueryParameter['feedTypes'] = feedTypes.join(base_1.COLLECTION_FORMATS.csv);
197
+ }
198
+ if (marketplaceIds) {
199
+ localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(base_1.COLLECTION_FORMATS.csv);
200
+ }
201
+ if (pageSize !== undefined) {
202
+ localVarQueryParameter['pageSize'] = pageSize;
203
+ }
204
+ if (processingStatuses) {
205
+ localVarQueryParameter['processingStatuses'] = processingStatuses.join(base_1.COLLECTION_FORMATS.csv);
206
+ }
207
+ if (createdSince !== undefined) {
208
+ localVarQueryParameter['createdSince'] = (createdSince instanceof Date) ?
209
+ createdSince.toISOString() :
210
+ createdSince;
211
+ }
212
+ if (createdUntil !== undefined) {
213
+ localVarQueryParameter['createdUntil'] = (createdUntil instanceof Date) ?
214
+ createdUntil.toISOString() :
215
+ createdUntil;
216
+ }
217
+ if (nextToken !== undefined) {
218
+ localVarQueryParameter['nextToken'] = nextToken;
219
+ }
220
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
221
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
222
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
223
+ return {
224
+ url: (0, common_1.toPathString)(localVarUrlObj),
225
+ options: localVarRequestOptions,
226
+ };
227
+ },
228
+ };
229
+ };
230
+ exports.FeedsApiAxiosParamCreator = FeedsApiAxiosParamCreator;
231
+ /**
232
+ * FeedsApi - functional programming interface
233
+ * @export
234
+ */
235
+ const FeedsApiFp = function (configuration) {
236
+ const localVarAxiosParamCreator = (0, exports.FeedsApiAxiosParamCreator)(configuration);
237
+ return {
238
+ /**
239
+ * 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.
240
+ * @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
241
+ * @param {*} [options] Override http request option.
242
+ * @throws {RequiredError}
243
+ */
244
+ async cancelFeed(feedId, options) {
245
+ const localVarAxiosArgs = await localVarAxiosParamCreator.cancelFeed(feedId, options);
246
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
247
+ },
248
+ /**
249
+ * 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.
250
+ * @param {CreateFeedSpecification} body
251
+ * @param {*} [options] Override http request option.
252
+ * @throws {RequiredError}
253
+ */
254
+ async createFeed(body, options) {
255
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createFeed(body, options);
256
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
257
+ },
258
+ /**
259
+ * 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.
260
+ * @param {CreateFeedDocumentSpecification} body
261
+ * @param {*} [options] Override http request option.
262
+ * @throws {RequiredError}
263
+ */
264
+ async createFeedDocument(body, options) {
265
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createFeedDocument(body, options);
266
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
267
+ },
268
+ /**
269
+ * 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.
270
+ * @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
271
+ * @param {*} [options] Override http request option.
272
+ * @throws {RequiredError}
273
+ */
274
+ async getFeed(feedId, options) {
275
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getFeed(feedId, options);
276
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
277
+ },
278
+ /**
279
+ * 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.
280
+ * @param {string} feedDocumentId The identifier of the feed document.
281
+ * @param {*} [options] Override http request option.
282
+ * @throws {RequiredError}
283
+ */
284
+ async getFeedDocument(feedDocumentId, options) {
285
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getFeedDocument(feedDocumentId, options);
286
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
287
+ },
288
+ /**
289
+ * 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.
290
+ * @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.
291
+ * @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.
292
+ * @param {number} [pageSize] The maximum number of feeds to return in a single call.
293
+ * @param {Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>} [processingStatuses] A list of processing statuses used to filter feeds.
294
+ * @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.
295
+ * @param {string} [createdUntil] The latest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is now.
296
+ * @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.
297
+ * @param {*} [options] Override http request option.
298
+ * @throws {RequiredError}
299
+ */
300
+ async getFeeds(feedTypes, marketplaceIds, pageSize, processingStatuses, createdSince, createdUntil, nextToken, options) {
301
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getFeeds(feedTypes, marketplaceIds, pageSize, processingStatuses, createdSince, createdUntil, nextToken, options);
302
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
303
+ },
304
+ };
305
+ };
306
+ exports.FeedsApiFp = FeedsApiFp;
307
+ /**
308
+ * FeedsApi - factory interface
309
+ * @export
310
+ */
311
+ const FeedsApiFactory = function (configuration, basePath, axios) {
312
+ const localVarFp = (0, exports.FeedsApiFp)(configuration);
313
+ return {
314
+ /**
315
+ * 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.
316
+ * @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
317
+ * @param {*} [options] Override http request option.
318
+ * @throws {RequiredError}
319
+ */
320
+ cancelFeed(feedId, options) {
321
+ return localVarFp.cancelFeed(feedId, options).then((request) => request(axios, basePath));
322
+ },
323
+ /**
324
+ * 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.
325
+ * @param {CreateFeedSpecification} body
326
+ * @param {*} [options] Override http request option.
327
+ * @throws {RequiredError}
328
+ */
329
+ createFeed(body, options) {
330
+ return localVarFp.createFeed(body, options).then((request) => request(axios, basePath));
331
+ },
332
+ /**
333
+ * 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.
334
+ * @param {CreateFeedDocumentSpecification} body
335
+ * @param {*} [options] Override http request option.
336
+ * @throws {RequiredError}
337
+ */
338
+ createFeedDocument(body, options) {
339
+ return localVarFp.createFeedDocument(body, options).then((request) => request(axios, basePath));
340
+ },
341
+ /**
342
+ * 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.
343
+ * @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
344
+ * @param {*} [options] Override http request option.
345
+ * @throws {RequiredError}
346
+ */
347
+ getFeed(feedId, options) {
348
+ return localVarFp.getFeed(feedId, options).then((request) => request(axios, basePath));
349
+ },
350
+ /**
351
+ * 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.
352
+ * @param {string} feedDocumentId The identifier of the feed document.
353
+ * @param {*} [options] Override http request option.
354
+ * @throws {RequiredError}
355
+ */
356
+ getFeedDocument(feedDocumentId, options) {
357
+ return localVarFp.getFeedDocument(feedDocumentId, options).then((request) => request(axios, basePath));
358
+ },
359
+ /**
360
+ * 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.
361
+ * @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.
362
+ * @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.
363
+ * @param {number} [pageSize] The maximum number of feeds to return in a single call.
364
+ * @param {Array<'CANCELLED' | 'DONE' | 'FATAL' | 'IN_PROGRESS' | 'IN_QUEUE'>} [processingStatuses] A list of processing statuses used to filter feeds.
365
+ * @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.
366
+ * @param {string} [createdUntil] The latest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is now.
367
+ * @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.
368
+ * @param {*} [options] Override http request option.
369
+ * @throws {RequiredError}
370
+ */
371
+ getFeeds(feedTypes, marketplaceIds, pageSize, processingStatuses, createdSince, createdUntil, nextToken, options) {
372
+ return localVarFp.getFeeds(feedTypes, marketplaceIds, pageSize, processingStatuses, createdSince, createdUntil, nextToken, options).then((request) => request(axios, basePath));
373
+ },
374
+ };
375
+ };
376
+ exports.FeedsApiFactory = FeedsApiFactory;
377
+ /**
378
+ * FeedsApi - object-oriented interface
379
+ * @export
380
+ * @class FeedsApi
381
+ * @extends {BaseAPI}
382
+ */
383
+ class FeedsApi extends base_1.BaseAPI {
384
+ /**
385
+ * 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.
386
+ * @param {FeedsApiCancelFeedRequest} requestParameters Request parameters.
387
+ * @param {*} [options] Override http request option.
388
+ * @throws {RequiredError}
389
+ * @memberof FeedsApi
390
+ */
391
+ cancelFeed(requestParameters, options) {
392
+ return (0, exports.FeedsApiFp)(this.configuration).cancelFeed(requestParameters.feedId, options).then((request) => request(this.axios, this.basePath));
393
+ }
394
+ /**
395
+ * 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.
396
+ * @param {FeedsApiCreateFeedRequest} requestParameters Request parameters.
397
+ * @param {*} [options] Override http request option.
398
+ * @throws {RequiredError}
399
+ * @memberof FeedsApi
400
+ */
401
+ createFeed(requestParameters, options) {
402
+ return (0, exports.FeedsApiFp)(this.configuration).createFeed(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
403
+ }
404
+ /**
405
+ * 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.
406
+ * @param {FeedsApiCreateFeedDocumentRequest} requestParameters Request parameters.
407
+ * @param {*} [options] Override http request option.
408
+ * @throws {RequiredError}
409
+ * @memberof FeedsApi
410
+ */
411
+ createFeedDocument(requestParameters, options) {
412
+ return (0, exports.FeedsApiFp)(this.configuration).createFeedDocument(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
413
+ }
414
+ /**
415
+ * 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.
416
+ * @param {FeedsApiGetFeedRequest} requestParameters Request parameters.
417
+ * @param {*} [options] Override http request option.
418
+ * @throws {RequiredError}
419
+ * @memberof FeedsApi
420
+ */
421
+ getFeed(requestParameters, options) {
422
+ return (0, exports.FeedsApiFp)(this.configuration).getFeed(requestParameters.feedId, options).then((request) => request(this.axios, this.basePath));
423
+ }
424
+ /**
425
+ * 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.
426
+ * @param {FeedsApiGetFeedDocumentRequest} requestParameters Request parameters.
427
+ * @param {*} [options] Override http request option.
428
+ * @throws {RequiredError}
429
+ * @memberof FeedsApi
430
+ */
431
+ getFeedDocument(requestParameters, options) {
432
+ return (0, exports.FeedsApiFp)(this.configuration).getFeedDocument(requestParameters.feedDocumentId, options).then((request) => request(this.axios, this.basePath));
433
+ }
434
+ /**
435
+ * 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.
436
+ * @param {FeedsApiGetFeedsRequest} requestParameters Request parameters.
437
+ * @param {*} [options] Override http request option.
438
+ * @throws {RequiredError}
439
+ * @memberof FeedsApi
440
+ */
441
+ getFeeds(requestParameters = {}, options) {
442
+ return (0, exports.FeedsApiFp)(this.configuration).getFeeds(requestParameters.feedTypes, requestParameters.marketplaceIds, requestParameters.pageSize, requestParameters.processingStatuses, requestParameters.createdSince, requestParameters.createdUntil, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
443
+ }
444
+ }
445
+ exports.FeedsApi = FeedsApi;