@sp-api-sdk/feeds-api-2021-06-30 3.2.14 → 4.0.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.
- package/README.md +4 -4
- package/dist/index.cjs +698 -0
- package/dist/index.cjs.map +1 -0
- package/dist/{types/api-model/api/feeds-api.d.ts → index.d.cts} +415 -31
- package/dist/index.d.ts +692 -0
- package/dist/index.js +653 -0
- package/dist/index.js.map +1 -0
- package/package.json +23 -12
- package/dist/cjs/api-model/api/feeds-api.js +0 -454
- package/dist/cjs/api-model/api.js +0 -30
- package/dist/cjs/api-model/base.js +0 -52
- package/dist/cjs/api-model/common.js +0 -123
- package/dist/cjs/api-model/configuration.js +0 -98
- package/dist/cjs/api-model/index.js +0 -32
- package/dist/cjs/api-model/models/create-feed-document-response.js +0 -15
- package/dist/cjs/api-model/models/create-feed-document-specification.js +0 -15
- package/dist/cjs/api-model/models/create-feed-response.js +0 -15
- package/dist/cjs/api-model/models/create-feed-specification.js +0 -15
- package/dist/cjs/api-model/models/error-list.js +0 -15
- package/dist/cjs/api-model/models/feed-document.js +0 -19
- package/dist/cjs/api-model/models/feed.js +0 -23
- package/dist/cjs/api-model/models/get-feeds-response.js +0 -15
- package/dist/cjs/api-model/models/index.js +0 -25
- package/dist/cjs/api-model/models/model-error.js +0 -15
- package/dist/cjs/client.js +0 -56
- package/dist/cjs/index.js +0 -19
- package/dist/es/api-model/api/feeds-api.js +0 -444
- package/dist/es/api-model/api.js +0 -14
- package/dist/es/api-model/base.js +0 -44
- package/dist/es/api-model/common.js +0 -110
- package/dist/es/api-model/configuration.js +0 -94
- package/dist/es/api-model/index.js +0 -16
- package/dist/es/api-model/models/create-feed-document-response.js +0 -14
- package/dist/es/api-model/models/create-feed-document-specification.js +0 -14
- package/dist/es/api-model/models/create-feed-response.js +0 -14
- package/dist/es/api-model/models/create-feed-specification.js +0 -14
- package/dist/es/api-model/models/error-list.js +0 -14
- package/dist/es/api-model/models/feed-document.js +0 -16
- package/dist/es/api-model/models/feed.js +0 -20
- package/dist/es/api-model/models/get-feeds-response.js +0 -14
- package/dist/es/api-model/models/index.js +0 -9
- package/dist/es/api-model/models/model-error.js +0 -14
- package/dist/es/client.js +0 -52
- package/dist/es/index.js +0 -3
- package/dist/types/api-model/api.d.ts +0 -12
- package/dist/types/api-model/base.d.ts +0 -42
- package/dist/types/api-model/common.d.ts +0 -34
- package/dist/types/api-model/configuration.d.ts +0 -98
- package/dist/types/api-model/index.d.ts +0 -14
- package/dist/types/api-model/models/create-feed-document-response.d.ts +0 -24
- package/dist/types/api-model/models/create-feed-document-specification.d.ts +0 -20
- package/dist/types/api-model/models/create-feed-response.d.ts +0 -20
- package/dist/types/api-model/models/create-feed-specification.d.ts +0 -34
- package/dist/types/api-model/models/error-list.d.ts +0 -20
- package/dist/types/api-model/models/feed-document.d.ts +0 -32
- package/dist/types/api-model/models/feed.d.ts +0 -56
- package/dist/types/api-model/models/get-feeds-response.d.ts +0 -25
- package/dist/types/api-model/models/index.d.ts +0 -9
- package/dist/types/api-model/models/model-error.d.ts +0 -28
- package/dist/types/client.d.ts +0 -6
- package/dist/types/index.d.ts +0 -3
|
@@ -1,444 +0,0 @@
|
|
|
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, operationServerMap } from '../base';
|
|
20
|
-
/**
|
|
21
|
-
* FeedsApi - axios parameter creator
|
|
22
|
-
*/
|
|
23
|
-
export const FeedsApiAxiosParamCreator = function (configuration) {
|
|
24
|
-
return {
|
|
25
|
-
/**
|
|
26
|
-
* 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).
|
|
27
|
-
* @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
|
|
28
|
-
* @param {*} [options] Override http request option.
|
|
29
|
-
* @throws {RequiredError}
|
|
30
|
-
*/
|
|
31
|
-
cancelFeed: async (feedId, options = {}) => {
|
|
32
|
-
// verify required parameter 'feedId' is not null or undefined
|
|
33
|
-
assertParamExists('cancelFeed', 'feedId', feedId);
|
|
34
|
-
const localVarPath = `/feeds/2021-06-30/feeds/{feedId}`
|
|
35
|
-
.replace(`{${"feedId"}}`, encodeURIComponent(String(feedId)));
|
|
36
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
37
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
38
|
-
let baseOptions;
|
|
39
|
-
if (configuration) {
|
|
40
|
-
baseOptions = configuration.baseOptions;
|
|
41
|
-
}
|
|
42
|
-
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options };
|
|
43
|
-
const localVarHeaderParameter = {};
|
|
44
|
-
const localVarQueryParameter = {};
|
|
45
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
46
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
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 | 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).
|
|
56
|
-
* @param {CreateFeedSpecification} body Information required to create the feed.
|
|
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
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
75
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
76
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
77
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
78
|
-
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
79
|
-
return {
|
|
80
|
-
url: toPathString(localVarUrlObj),
|
|
81
|
-
options: localVarRequestOptions,
|
|
82
|
-
};
|
|
83
|
-
},
|
|
84
|
-
/**
|
|
85
|
-
* 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).
|
|
86
|
-
* @param {CreateFeedDocumentSpecification} body Specifies the content type for the createFeedDocument operation.
|
|
87
|
-
* @param {*} [options] Override http request option.
|
|
88
|
-
* @throws {RequiredError}
|
|
89
|
-
*/
|
|
90
|
-
createFeedDocument: async (body, options = {}) => {
|
|
91
|
-
// verify required parameter 'body' is not null or undefined
|
|
92
|
-
assertParamExists('createFeedDocument', 'body', body);
|
|
93
|
-
const localVarPath = `/feeds/2021-06-30/documents`;
|
|
94
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
95
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
96
|
-
let baseOptions;
|
|
97
|
-
if (configuration) {
|
|
98
|
-
baseOptions = configuration.baseOptions;
|
|
99
|
-
}
|
|
100
|
-
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
101
|
-
const localVarHeaderParameter = {};
|
|
102
|
-
const localVarQueryParameter = {};
|
|
103
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
104
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
105
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
106
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
107
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
108
|
-
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
109
|
-
return {
|
|
110
|
-
url: toPathString(localVarUrlObj),
|
|
111
|
-
options: localVarRequestOptions,
|
|
112
|
-
};
|
|
113
|
-
},
|
|
114
|
-
/**
|
|
115
|
-
* 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).
|
|
116
|
-
* @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
|
|
117
|
-
* @param {*} [options] Override http request option.
|
|
118
|
-
* @throws {RequiredError}
|
|
119
|
-
*/
|
|
120
|
-
getFeed: async (feedId, options = {}) => {
|
|
121
|
-
// verify required parameter 'feedId' is not null or undefined
|
|
122
|
-
assertParamExists('getFeed', 'feedId', feedId);
|
|
123
|
-
const localVarPath = `/feeds/2021-06-30/feeds/{feedId}`
|
|
124
|
-
.replace(`{${"feedId"}}`, encodeURIComponent(String(feedId)));
|
|
125
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
126
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
127
|
-
let baseOptions;
|
|
128
|
-
if (configuration) {
|
|
129
|
-
baseOptions = configuration.baseOptions;
|
|
130
|
-
}
|
|
131
|
-
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
132
|
-
const localVarHeaderParameter = {};
|
|
133
|
-
const localVarQueryParameter = {};
|
|
134
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
135
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
136
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
137
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
138
|
-
return {
|
|
139
|
-
url: toPathString(localVarUrlObj),
|
|
140
|
-
options: localVarRequestOptions,
|
|
141
|
-
};
|
|
142
|
-
},
|
|
143
|
-
/**
|
|
144
|
-
* 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).
|
|
145
|
-
* @param {string} feedDocumentId The identifier of the feed document.
|
|
146
|
-
* @param {*} [options] Override http request option.
|
|
147
|
-
* @throws {RequiredError}
|
|
148
|
-
*/
|
|
149
|
-
getFeedDocument: async (feedDocumentId, options = {}) => {
|
|
150
|
-
// verify required parameter 'feedDocumentId' is not null or undefined
|
|
151
|
-
assertParamExists('getFeedDocument', 'feedDocumentId', feedDocumentId);
|
|
152
|
-
const localVarPath = `/feeds/2021-06-30/documents/{feedDocumentId}`
|
|
153
|
-
.replace(`{${"feedDocumentId"}}`, encodeURIComponent(String(feedDocumentId)));
|
|
154
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
155
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
156
|
-
let baseOptions;
|
|
157
|
-
if (configuration) {
|
|
158
|
-
baseOptions = configuration.baseOptions;
|
|
159
|
-
}
|
|
160
|
-
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
161
|
-
const localVarHeaderParameter = {};
|
|
162
|
-
const localVarQueryParameter = {};
|
|
163
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
164
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
165
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
166
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
167
|
-
return {
|
|
168
|
-
url: 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 | 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).
|
|
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<GetFeedsProcessingStatusesEnum>} [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, 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(COLLECTION_FORMATS.csv);
|
|
197
|
-
}
|
|
198
|
-
if (marketplaceIds) {
|
|
199
|
-
localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv);
|
|
200
|
-
}
|
|
201
|
-
if (pageSize !== undefined) {
|
|
202
|
-
localVarQueryParameter['pageSize'] = pageSize;
|
|
203
|
-
}
|
|
204
|
-
if (processingStatuses) {
|
|
205
|
-
localVarQueryParameter['processingStatuses'] = processingStatuses.join(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
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
221
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
222
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
223
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
224
|
-
return {
|
|
225
|
-
url: toPathString(localVarUrlObj),
|
|
226
|
-
options: localVarRequestOptions,
|
|
227
|
-
};
|
|
228
|
-
},
|
|
229
|
-
};
|
|
230
|
-
};
|
|
231
|
-
/**
|
|
232
|
-
* FeedsApi - functional programming interface
|
|
233
|
-
*/
|
|
234
|
-
export const FeedsApiFp = function (configuration) {
|
|
235
|
-
const localVarAxiosParamCreator = FeedsApiAxiosParamCreator(configuration);
|
|
236
|
-
return {
|
|
237
|
-
/**
|
|
238
|
-
* 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).
|
|
239
|
-
* @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
|
|
240
|
-
* @param {*} [options] Override http request option.
|
|
241
|
-
* @throws {RequiredError}
|
|
242
|
-
*/
|
|
243
|
-
async cancelFeed(feedId, options) {
|
|
244
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.cancelFeed(feedId, options);
|
|
245
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
246
|
-
const localVarOperationServerBasePath = operationServerMap['FeedsApi.cancelFeed']?.[localVarOperationServerIndex]?.url;
|
|
247
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
248
|
-
},
|
|
249
|
-
/**
|
|
250
|
-
* 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).
|
|
251
|
-
* @param {CreateFeedSpecification} body Information required to create the feed.
|
|
252
|
-
* @param {*} [options] Override http request option.
|
|
253
|
-
* @throws {RequiredError}
|
|
254
|
-
*/
|
|
255
|
-
async createFeed(body, options) {
|
|
256
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.createFeed(body, options);
|
|
257
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
258
|
-
const localVarOperationServerBasePath = operationServerMap['FeedsApi.createFeed']?.[localVarOperationServerIndex]?.url;
|
|
259
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
260
|
-
},
|
|
261
|
-
/**
|
|
262
|
-
* 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).
|
|
263
|
-
* @param {CreateFeedDocumentSpecification} body Specifies the content type for the createFeedDocument operation.
|
|
264
|
-
* @param {*} [options] Override http request option.
|
|
265
|
-
* @throws {RequiredError}
|
|
266
|
-
*/
|
|
267
|
-
async createFeedDocument(body, options) {
|
|
268
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.createFeedDocument(body, options);
|
|
269
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
270
|
-
const localVarOperationServerBasePath = operationServerMap['FeedsApi.createFeedDocument']?.[localVarOperationServerIndex]?.url;
|
|
271
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
272
|
-
},
|
|
273
|
-
/**
|
|
274
|
-
* 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).
|
|
275
|
-
* @param {string} feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
|
|
276
|
-
* @param {*} [options] Override http request option.
|
|
277
|
-
* @throws {RequiredError}
|
|
278
|
-
*/
|
|
279
|
-
async getFeed(feedId, options) {
|
|
280
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getFeed(feedId, options);
|
|
281
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
282
|
-
const localVarOperationServerBasePath = operationServerMap['FeedsApi.getFeed']?.[localVarOperationServerIndex]?.url;
|
|
283
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
284
|
-
},
|
|
285
|
-
/**
|
|
286
|
-
* 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).
|
|
287
|
-
* @param {string} feedDocumentId The identifier of the feed document.
|
|
288
|
-
* @param {*} [options] Override http request option.
|
|
289
|
-
* @throws {RequiredError}
|
|
290
|
-
*/
|
|
291
|
-
async getFeedDocument(feedDocumentId, options) {
|
|
292
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getFeedDocument(feedDocumentId, options);
|
|
293
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
294
|
-
const localVarOperationServerBasePath = operationServerMap['FeedsApi.getFeedDocument']?.[localVarOperationServerIndex]?.url;
|
|
295
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
296
|
-
},
|
|
297
|
-
/**
|
|
298
|
-
* 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).
|
|
299
|
-
* @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.
|
|
300
|
-
* @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.
|
|
301
|
-
* @param {number} [pageSize] The maximum number of feeds to return in a single call.
|
|
302
|
-
* @param {Array<GetFeedsProcessingStatusesEnum>} [processingStatuses] A list of processing statuses used to filter feeds.
|
|
303
|
-
* @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.
|
|
304
|
-
* @param {string} [createdUntil] The latest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is now.
|
|
305
|
-
* @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.
|
|
306
|
-
* @param {*} [options] Override http request option.
|
|
307
|
-
* @throws {RequiredError}
|
|
308
|
-
*/
|
|
309
|
-
async getFeeds(feedTypes, marketplaceIds, pageSize, processingStatuses, createdSince, createdUntil, nextToken, options) {
|
|
310
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getFeeds(feedTypes, marketplaceIds, pageSize, processingStatuses, createdSince, createdUntil, nextToken, options);
|
|
311
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
312
|
-
const localVarOperationServerBasePath = operationServerMap['FeedsApi.getFeeds']?.[localVarOperationServerIndex]?.url;
|
|
313
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
314
|
-
},
|
|
315
|
-
};
|
|
316
|
-
};
|
|
317
|
-
/**
|
|
318
|
-
* FeedsApi - factory interface
|
|
319
|
-
*/
|
|
320
|
-
export const FeedsApiFactory = function (configuration, basePath, axios) {
|
|
321
|
-
const localVarFp = FeedsApiFp(configuration);
|
|
322
|
-
return {
|
|
323
|
-
/**
|
|
324
|
-
* 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).
|
|
325
|
-
* @param {FeedsApiCancelFeedRequest} requestParameters Request parameters.
|
|
326
|
-
* @param {*} [options] Override http request option.
|
|
327
|
-
* @throws {RequiredError}
|
|
328
|
-
*/
|
|
329
|
-
cancelFeed(requestParameters, options) {
|
|
330
|
-
return localVarFp.cancelFeed(requestParameters.feedId, options).then((request) => request(axios, basePath));
|
|
331
|
-
},
|
|
332
|
-
/**
|
|
333
|
-
* 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).
|
|
334
|
-
* @param {FeedsApiCreateFeedRequest} requestParameters Request parameters.
|
|
335
|
-
* @param {*} [options] Override http request option.
|
|
336
|
-
* @throws {RequiredError}
|
|
337
|
-
*/
|
|
338
|
-
createFeed(requestParameters, options) {
|
|
339
|
-
return localVarFp.createFeed(requestParameters.body, options).then((request) => request(axios, basePath));
|
|
340
|
-
},
|
|
341
|
-
/**
|
|
342
|
-
* 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).
|
|
343
|
-
* @param {FeedsApiCreateFeedDocumentRequest} requestParameters Request parameters.
|
|
344
|
-
* @param {*} [options] Override http request option.
|
|
345
|
-
* @throws {RequiredError}
|
|
346
|
-
*/
|
|
347
|
-
createFeedDocument(requestParameters, options) {
|
|
348
|
-
return localVarFp.createFeedDocument(requestParameters.body, options).then((request) => request(axios, basePath));
|
|
349
|
-
},
|
|
350
|
-
/**
|
|
351
|
-
* 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).
|
|
352
|
-
* @param {FeedsApiGetFeedRequest} requestParameters Request parameters.
|
|
353
|
-
* @param {*} [options] Override http request option.
|
|
354
|
-
* @throws {RequiredError}
|
|
355
|
-
*/
|
|
356
|
-
getFeed(requestParameters, options) {
|
|
357
|
-
return localVarFp.getFeed(requestParameters.feedId, options).then((request) => request(axios, basePath));
|
|
358
|
-
},
|
|
359
|
-
/**
|
|
360
|
-
* 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).
|
|
361
|
-
* @param {FeedsApiGetFeedDocumentRequest} requestParameters Request parameters.
|
|
362
|
-
* @param {*} [options] Override http request option.
|
|
363
|
-
* @throws {RequiredError}
|
|
364
|
-
*/
|
|
365
|
-
getFeedDocument(requestParameters, options) {
|
|
366
|
-
return localVarFp.getFeedDocument(requestParameters.feedDocumentId, options).then((request) => request(axios, basePath));
|
|
367
|
-
},
|
|
368
|
-
/**
|
|
369
|
-
* 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).
|
|
370
|
-
* @param {FeedsApiGetFeedsRequest} requestParameters Request parameters.
|
|
371
|
-
* @param {*} [options] Override http request option.
|
|
372
|
-
* @throws {RequiredError}
|
|
373
|
-
*/
|
|
374
|
-
getFeeds(requestParameters = {}, options) {
|
|
375
|
-
return localVarFp.getFeeds(requestParameters.feedTypes, requestParameters.marketplaceIds, requestParameters.pageSize, requestParameters.processingStatuses, requestParameters.createdSince, requestParameters.createdUntil, requestParameters.nextToken, options).then((request) => request(axios, basePath));
|
|
376
|
-
},
|
|
377
|
-
};
|
|
378
|
-
};
|
|
379
|
-
/**
|
|
380
|
-
* FeedsApi - object-oriented interface
|
|
381
|
-
*/
|
|
382
|
-
export class FeedsApi extends BaseAPI {
|
|
383
|
-
/**
|
|
384
|
-
* 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).
|
|
385
|
-
* @param {FeedsApiCancelFeedRequest} requestParameters Request parameters.
|
|
386
|
-
* @param {*} [options] Override http request option.
|
|
387
|
-
* @throws {RequiredError}
|
|
388
|
-
*/
|
|
389
|
-
cancelFeed(requestParameters, options) {
|
|
390
|
-
return FeedsApiFp(this.configuration).cancelFeed(requestParameters.feedId, options).then((request) => request(this.axios, this.basePath));
|
|
391
|
-
}
|
|
392
|
-
/**
|
|
393
|
-
* 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).
|
|
394
|
-
* @param {FeedsApiCreateFeedRequest} requestParameters Request parameters.
|
|
395
|
-
* @param {*} [options] Override http request option.
|
|
396
|
-
* @throws {RequiredError}
|
|
397
|
-
*/
|
|
398
|
-
createFeed(requestParameters, options) {
|
|
399
|
-
return FeedsApiFp(this.configuration).createFeed(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
400
|
-
}
|
|
401
|
-
/**
|
|
402
|
-
* 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).
|
|
403
|
-
* @param {FeedsApiCreateFeedDocumentRequest} requestParameters Request parameters.
|
|
404
|
-
* @param {*} [options] Override http request option.
|
|
405
|
-
* @throws {RequiredError}
|
|
406
|
-
*/
|
|
407
|
-
createFeedDocument(requestParameters, options) {
|
|
408
|
-
return FeedsApiFp(this.configuration).createFeedDocument(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
409
|
-
}
|
|
410
|
-
/**
|
|
411
|
-
* 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).
|
|
412
|
-
* @param {FeedsApiGetFeedRequest} requestParameters Request parameters.
|
|
413
|
-
* @param {*} [options] Override http request option.
|
|
414
|
-
* @throws {RequiredError}
|
|
415
|
-
*/
|
|
416
|
-
getFeed(requestParameters, options) {
|
|
417
|
-
return FeedsApiFp(this.configuration).getFeed(requestParameters.feedId, options).then((request) => request(this.axios, this.basePath));
|
|
418
|
-
}
|
|
419
|
-
/**
|
|
420
|
-
* 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).
|
|
421
|
-
* @param {FeedsApiGetFeedDocumentRequest} requestParameters Request parameters.
|
|
422
|
-
* @param {*} [options] Override http request option.
|
|
423
|
-
* @throws {RequiredError}
|
|
424
|
-
*/
|
|
425
|
-
getFeedDocument(requestParameters, options) {
|
|
426
|
-
return FeedsApiFp(this.configuration).getFeedDocument(requestParameters.feedDocumentId, options).then((request) => request(this.axios, this.basePath));
|
|
427
|
-
}
|
|
428
|
-
/**
|
|
429
|
-
* 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).
|
|
430
|
-
* @param {FeedsApiGetFeedsRequest} requestParameters Request parameters.
|
|
431
|
-
* @param {*} [options] Override http request option.
|
|
432
|
-
* @throws {RequiredError}
|
|
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
|
-
}
|
|
438
|
-
export const GetFeedsProcessingStatusesEnum = {
|
|
439
|
-
Cancelled: 'CANCELLED',
|
|
440
|
-
Done: 'DONE',
|
|
441
|
-
Fatal: 'FATAL',
|
|
442
|
-
InProgress: 'IN_PROGRESS',
|
|
443
|
-
InQueue: 'IN_QUEUE'
|
|
444
|
-
};
|
package/dist/es/api-model/api.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
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
|
-
export * from './api/feeds-api';
|
|
@@ -1,44 +0,0 @@
|
|
|
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
|
-
export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
16
|
-
export const COLLECTION_FORMATS = {
|
|
17
|
-
csv: ",",
|
|
18
|
-
ssv: " ",
|
|
19
|
-
tsv: "\t",
|
|
20
|
-
pipes: "|",
|
|
21
|
-
};
|
|
22
|
-
export class BaseAPI {
|
|
23
|
-
basePath;
|
|
24
|
-
axios;
|
|
25
|
-
configuration;
|
|
26
|
-
constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
|
|
27
|
-
this.basePath = basePath;
|
|
28
|
-
this.axios = axios;
|
|
29
|
-
if (configuration) {
|
|
30
|
-
this.configuration = configuration;
|
|
31
|
-
this.basePath = configuration.basePath ?? basePath;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
;
|
|
36
|
-
export class RequiredError extends Error {
|
|
37
|
-
field;
|
|
38
|
-
constructor(field, msg) {
|
|
39
|
-
super(msg);
|
|
40
|
-
this.field = field;
|
|
41
|
-
this.name = "RequiredError";
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
export const operationServerMap = {};
|
|
@@ -1,110 +0,0 @@
|
|
|
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 { RequiredError } from "./base";
|
|
15
|
-
export const DUMMY_BASE_URL = 'https://example.com';
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @throws {RequiredError}
|
|
19
|
-
*/
|
|
20
|
-
export const assertParamExists = function (functionName, paramName, paramValue) {
|
|
21
|
-
if (paramValue === null || paramValue === undefined) {
|
|
22
|
-
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
export const setApiKeyToObject = async function (object, keyParamName, configuration) {
|
|
26
|
-
if (configuration && configuration.apiKey) {
|
|
27
|
-
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
28
|
-
? await configuration.apiKey(keyParamName)
|
|
29
|
-
: await configuration.apiKey;
|
|
30
|
-
object[keyParamName] = localVarApiKeyValue;
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
export const setBasicAuthToObject = function (object, configuration) {
|
|
34
|
-
if (configuration && (configuration.username || configuration.password)) {
|
|
35
|
-
object["auth"] = { username: configuration.username, password: configuration.password };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
export const setBearerAuthToObject = async function (object, configuration) {
|
|
39
|
-
if (configuration && configuration.accessToken) {
|
|
40
|
-
const accessToken = typeof configuration.accessToken === 'function'
|
|
41
|
-
? await configuration.accessToken()
|
|
42
|
-
: await configuration.accessToken;
|
|
43
|
-
object["Authorization"] = "Bearer " + accessToken;
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
export const setOAuthToObject = async function (object, name, scopes, configuration) {
|
|
47
|
-
if (configuration && configuration.accessToken) {
|
|
48
|
-
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
49
|
-
? await configuration.accessToken(name, scopes)
|
|
50
|
-
: await configuration.accessToken;
|
|
51
|
-
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
55
|
-
if (parameter == null)
|
|
56
|
-
return;
|
|
57
|
-
if (typeof parameter === "object") {
|
|
58
|
-
if (Array.isArray(parameter) || parameter instanceof Set) {
|
|
59
|
-
parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
if (urlSearchParams.has(key)) {
|
|
67
|
-
urlSearchParams.append(key, parameter);
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
urlSearchParams.set(key, parameter);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
export 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
|
-
// @ts-ignore
|
|
85
|
-
export const replaceWithSerializableTypeIfNeeded = function (key, value) {
|
|
86
|
-
if (value instanceof Set) {
|
|
87
|
-
return Array.from(value);
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
return value;
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
export const serializeDataIfNeeded = function (value, requestOptions, configuration) {
|
|
94
|
-
const nonString = typeof value !== 'string';
|
|
95
|
-
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
96
|
-
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
97
|
-
: nonString;
|
|
98
|
-
return needsSerialization
|
|
99
|
-
? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded)
|
|
100
|
-
: (value || "");
|
|
101
|
-
};
|
|
102
|
-
export const toPathString = function (url) {
|
|
103
|
-
return url.pathname + url.search + url.hash;
|
|
104
|
-
};
|
|
105
|
-
export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
106
|
-
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
107
|
-
const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
|
|
108
|
-
return axios.request(axiosRequestArgs);
|
|
109
|
-
};
|
|
110
|
-
};
|