@sp-api-sdk/data-kiosk-api-2023-11-15 4.0.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -4
- package/dist/index.cjs +569 -577
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +393 -417
- package/dist/index.d.ts +393 -417
- package/dist/index.js +544 -539
- package/dist/index.js.map +1 -1
- package/package.json +7 -4
package/dist/index.cjs
CHANGED
|
@@ -1,611 +1,603 @@
|
|
|
1
|
-
"
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
9
|
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
|
+
get: ((k) => from[k]).bind(null, key),
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
DataKioskApiClient: () => DataKioskApiClient,
|
|
36
|
-
DataKioskApiFactory: () => DataKioskApiFactory,
|
|
37
|
-
DataKioskApiFp: () => DataKioskApiFp,
|
|
38
|
-
GetQueriesProcessingStatusesEnum: () => GetQueriesProcessingStatusesEnum,
|
|
39
|
-
QueryProcessingStatusEnum: () => QueryProcessingStatusEnum,
|
|
40
|
-
clientRateLimits: () => clientRateLimits
|
|
41
|
-
});
|
|
42
|
-
module.exports = __toCommonJS(index_exports);
|
|
43
|
-
|
|
44
|
-
// src/client.ts
|
|
45
|
-
var import_common2 = require("@sp-api-sdk/common");
|
|
46
|
-
|
|
47
|
-
// src/api-model/api/data-kiosk-api.ts
|
|
48
|
-
var import_axios2 = __toESM(require("axios"), 1);
|
|
49
|
-
|
|
50
|
-
// src/api-model/base.ts
|
|
51
|
-
var import_axios = __toESM(require("axios"), 1);
|
|
52
|
-
var BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
53
|
-
var COLLECTION_FORMATS = {
|
|
54
|
-
csv: ",",
|
|
55
|
-
ssv: " ",
|
|
56
|
-
tsv: " ",
|
|
57
|
-
pipes: "|"
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
20
|
+
value: mod,
|
|
21
|
+
enumerable: true
|
|
22
|
+
}) : target, mod));
|
|
23
|
+
//#endregion
|
|
24
|
+
let _sp_api_sdk_common = require("@sp-api-sdk/common");
|
|
25
|
+
let axios = require("axios");
|
|
26
|
+
axios = __toESM(axios, 1);
|
|
27
|
+
//#region src/api-model/base.ts
|
|
28
|
+
const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
29
|
+
const COLLECTION_FORMATS = {
|
|
30
|
+
csv: ",",
|
|
31
|
+
ssv: " ",
|
|
32
|
+
tsv: " ",
|
|
33
|
+
pipes: "|"
|
|
58
34
|
};
|
|
59
35
|
var BaseAPI = class {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
36
|
+
basePath;
|
|
37
|
+
axios;
|
|
38
|
+
configuration;
|
|
39
|
+
constructor(configuration, basePath = BASE_PATH, axios$7 = axios.default) {
|
|
40
|
+
this.basePath = basePath;
|
|
41
|
+
this.axios = axios$7;
|
|
42
|
+
if (configuration) {
|
|
43
|
+
this.configuration = configuration;
|
|
44
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
71
47
|
};
|
|
72
48
|
var RequiredError = class extends Error {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
49
|
+
field;
|
|
50
|
+
constructor(field, msg) {
|
|
51
|
+
super(msg);
|
|
52
|
+
this.field = field;
|
|
53
|
+
this.name = "RequiredError";
|
|
54
|
+
}
|
|
79
55
|
};
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
56
|
+
const operationServerMap = {};
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region src/api-model/common.ts
|
|
59
|
+
const DUMMY_BASE_URL = "https://example.com";
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @throws {RequiredError}
|
|
63
|
+
*/
|
|
64
|
+
const assertParamExists = function(functionName, paramName, paramValue) {
|
|
65
|
+
if (paramValue === null || paramValue === void 0) throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
88
66
|
};
|
|
89
67
|
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
Object.keys(parameter).forEach(
|
|
96
|
-
(currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
} else {
|
|
100
|
-
if (urlSearchParams.has(key)) {
|
|
101
|
-
urlSearchParams.append(key, parameter);
|
|
102
|
-
} else {
|
|
103
|
-
urlSearchParams.set(key, parameter);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
68
|
+
if (parameter == null) return;
|
|
69
|
+
if (typeof parameter === "object") if (Array.isArray(parameter) || parameter instanceof Set) parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
70
|
+
else Object.keys(parameter).forEach((currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`));
|
|
71
|
+
else if (urlSearchParams.has(key)) urlSearchParams.append(key, parameter);
|
|
72
|
+
else urlSearchParams.set(key, parameter);
|
|
106
73
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
74
|
+
const setSearchParams = function(url, ...objects) {
|
|
75
|
+
const searchParams = new URLSearchParams(url.search);
|
|
76
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
77
|
+
url.search = searchParams.toString();
|
|
111
78
|
};
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
79
|
+
/**
|
|
80
|
+
* JSON serialization helper function which replaces instances of unserializable types with serializable ones.
|
|
81
|
+
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
|
|
82
|
+
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
|
|
83
|
+
*/
|
|
84
|
+
const replaceWithSerializableTypeIfNeeded = function(key, value) {
|
|
85
|
+
if (value instanceof Set) return Array.from(value);
|
|
86
|
+
else return value;
|
|
118
87
|
};
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
return needsSerialization ? JSON.stringify(value !== void 0 ? value : {}, replaceWithSerializableTypeIfNeeded) : value || "";
|
|
88
|
+
const serializeDataIfNeeded = function(value, requestOptions, configuration) {
|
|
89
|
+
const nonString = typeof value !== "string";
|
|
90
|
+
return (nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString) ? JSON.stringify(value !== void 0 ? value : {}, replaceWithSerializableTypeIfNeeded) : value || "";
|
|
123
91
|
};
|
|
124
|
-
|
|
125
|
-
|
|
92
|
+
const toPathString = function(url) {
|
|
93
|
+
return url.pathname + url.search + url.hash;
|
|
126
94
|
};
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
95
|
+
const createRequestFunction = function(axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
96
|
+
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
97
|
+
const axiosRequestArgs = {
|
|
98
|
+
...axiosArgs.options,
|
|
99
|
+
url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url
|
|
100
|
+
};
|
|
101
|
+
return axios.request(axiosRequestArgs);
|
|
102
|
+
};
|
|
132
103
|
};
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
104
|
+
//#endregion
|
|
105
|
+
//#region src/api-model/api/data-kiosk-api.ts
|
|
106
|
+
/**
|
|
107
|
+
* DataKioskApi - axios parameter creator
|
|
108
|
+
*/
|
|
109
|
+
const DataKioskApiAxiosParamCreator = function(configuration) {
|
|
110
|
+
return {
|
|
111
|
+
/**
|
|
112
|
+
* Cancels the query specified by the `queryId` parameter. Only queries with a non-terminal `processingStatus` (`IN_QUEUE`, `IN_PROGRESS`) can be cancelled. Cancelling a query that already has a `processingStatus` of `CANCELLED` will no-op. Cancelled queries are returned in subsequent calls to the `getQuery` and `getQueries` operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
113
|
+
* @param {string} queryId The identifier for the query. This identifier is unique only in combination with a selling partner account ID.
|
|
114
|
+
* @param {*} [options] Override http request option.
|
|
115
|
+
* @throws {RequiredError}
|
|
116
|
+
*/
|
|
117
|
+
cancelQuery: async (queryId, options = {}) => {
|
|
118
|
+
assertParamExists("cancelQuery", "queryId", queryId);
|
|
119
|
+
const localVarPath = `/dataKiosk/2023-11-15/queries/{queryId}`.replace("{queryId}", encodeURIComponent(String(queryId)));
|
|
120
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
121
|
+
let baseOptions;
|
|
122
|
+
if (configuration) baseOptions = configuration.baseOptions;
|
|
123
|
+
const localVarRequestOptions = {
|
|
124
|
+
method: "DELETE",
|
|
125
|
+
...baseOptions,
|
|
126
|
+
...options
|
|
127
|
+
};
|
|
128
|
+
const localVarHeaderParameter = {};
|
|
129
|
+
const localVarQueryParameter = {};
|
|
130
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
131
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
132
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
133
|
+
localVarRequestOptions.headers = {
|
|
134
|
+
...localVarHeaderParameter,
|
|
135
|
+
...headersFromBaseOptions,
|
|
136
|
+
...options.headers
|
|
137
|
+
};
|
|
138
|
+
return {
|
|
139
|
+
url: toPathString(localVarUrlObj),
|
|
140
|
+
options: localVarRequestOptions
|
|
141
|
+
};
|
|
142
|
+
},
|
|
143
|
+
/**
|
|
144
|
+
* Creates a Data Kiosk query request. **Note:** The retention of a query varies based on the fields requested. Each field within a schema is annotated with a `@resultRetention` directive that defines how long a query containing that field will be retained. When a query contains multiple fields with different retentions, the shortest (minimum) retention is applied. The retention of a query\'s resulting documents always matches the retention of the query. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
145
|
+
* @param {CreateQuerySpecification} body The body of the request.
|
|
146
|
+
* @param {*} [options] Override http request option.
|
|
147
|
+
* @throws {RequiredError}
|
|
148
|
+
*/
|
|
149
|
+
createQuery: async (body, options = {}) => {
|
|
150
|
+
assertParamExists("createQuery", "body", body);
|
|
151
|
+
const localVarUrlObj = new URL(`/dataKiosk/2023-11-15/queries`, DUMMY_BASE_URL);
|
|
152
|
+
let baseOptions;
|
|
153
|
+
if (configuration) baseOptions = configuration.baseOptions;
|
|
154
|
+
const localVarRequestOptions = {
|
|
155
|
+
method: "POST",
|
|
156
|
+
...baseOptions,
|
|
157
|
+
...options
|
|
158
|
+
};
|
|
159
|
+
const localVarHeaderParameter = {};
|
|
160
|
+
const localVarQueryParameter = {};
|
|
161
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
162
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
163
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
164
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
165
|
+
localVarRequestOptions.headers = {
|
|
166
|
+
...localVarHeaderParameter,
|
|
167
|
+
...headersFromBaseOptions,
|
|
168
|
+
...options.headers
|
|
169
|
+
};
|
|
170
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
171
|
+
return {
|
|
172
|
+
url: toPathString(localVarUrlObj),
|
|
173
|
+
options: localVarRequestOptions
|
|
174
|
+
};
|
|
175
|
+
},
|
|
176
|
+
/**
|
|
177
|
+
* Returns the information required for retrieving a Data Kiosk document\'s contents. See the `createQuery` operation for details about document retention. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
178
|
+
* @param {string} documentId The identifier for the Data Kiosk document.
|
|
179
|
+
* @param {*} [options] Override http request option.
|
|
180
|
+
* @throws {RequiredError}
|
|
181
|
+
*/
|
|
182
|
+
getDocument: async (documentId, options = {}) => {
|
|
183
|
+
assertParamExists("getDocument", "documentId", documentId);
|
|
184
|
+
const localVarPath = `/dataKiosk/2023-11-15/documents/{documentId}`.replace("{documentId}", encodeURIComponent(String(documentId)));
|
|
185
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
186
|
+
let baseOptions;
|
|
187
|
+
if (configuration) baseOptions = configuration.baseOptions;
|
|
188
|
+
const localVarRequestOptions = {
|
|
189
|
+
method: "GET",
|
|
190
|
+
...baseOptions,
|
|
191
|
+
...options
|
|
192
|
+
};
|
|
193
|
+
const localVarHeaderParameter = {};
|
|
194
|
+
const localVarQueryParameter = {};
|
|
195
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
196
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
197
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
198
|
+
localVarRequestOptions.headers = {
|
|
199
|
+
...localVarHeaderParameter,
|
|
200
|
+
...headersFromBaseOptions,
|
|
201
|
+
...options.headers
|
|
202
|
+
};
|
|
203
|
+
return {
|
|
204
|
+
url: toPathString(localVarUrlObj),
|
|
205
|
+
options: localVarRequestOptions
|
|
206
|
+
};
|
|
207
|
+
},
|
|
208
|
+
/**
|
|
209
|
+
* Returns details for the Data Kiosk queries that match the specified filters. See the `createQuery` operation for details about query retention. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
210
|
+
* @param {Array<GetQueriesProcessingStatusesEnum>} [processingStatuses] A list of processing statuses used to filter queries.
|
|
211
|
+
* @param {number} [pageSize] The maximum number of queries to return in a single call.
|
|
212
|
+
* @param {string} [createdSince] The earliest query creation date and time for queries to include in the response, in ISO 8601 date time format. The default is 90 days ago.
|
|
213
|
+
* @param {string} [createdUntil] The latest query creation date and time for queries to include in the response, in ISO 8601 date time format. The default is the time of the `getQueries` request.
|
|
214
|
+
* @param {string} [paginationToken] A token to fetch a certain page of results when there are multiple pages of results available. The value of this token is fetched from the `pagination.nextToken` field returned in the `GetQueriesResponse` object. All other parameters must be provided with the same values that were provided with the request that generated this token, with the exception of `pageSize` which can be modified between calls to `getQueries`. In the absence of this token value, `getQueries` returns the first page of results.
|
|
215
|
+
* @param {*} [options] Override http request option.
|
|
216
|
+
* @throws {RequiredError}
|
|
217
|
+
*/
|
|
218
|
+
getQueries: async (processingStatuses, pageSize, createdSince, createdUntil, paginationToken, options = {}) => {
|
|
219
|
+
const localVarUrlObj = new URL(`/dataKiosk/2023-11-15/queries`, DUMMY_BASE_URL);
|
|
220
|
+
let baseOptions;
|
|
221
|
+
if (configuration) baseOptions = configuration.baseOptions;
|
|
222
|
+
const localVarRequestOptions = {
|
|
223
|
+
method: "GET",
|
|
224
|
+
...baseOptions,
|
|
225
|
+
...options
|
|
226
|
+
};
|
|
227
|
+
const localVarHeaderParameter = {};
|
|
228
|
+
const localVarQueryParameter = {};
|
|
229
|
+
if (processingStatuses) localVarQueryParameter["processingStatuses"] = processingStatuses.join(COLLECTION_FORMATS.csv);
|
|
230
|
+
if (pageSize !== void 0) localVarQueryParameter["pageSize"] = pageSize;
|
|
231
|
+
if (createdSince !== void 0) localVarQueryParameter["createdSince"] = createdSince instanceof Date ? createdSince.toISOString() : createdSince;
|
|
232
|
+
if (createdUntil !== void 0) localVarQueryParameter["createdUntil"] = createdUntil instanceof Date ? createdUntil.toISOString() : createdUntil;
|
|
233
|
+
if (paginationToken !== void 0) localVarQueryParameter["paginationToken"] = paginationToken;
|
|
234
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
235
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
236
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
237
|
+
localVarRequestOptions.headers = {
|
|
238
|
+
...localVarHeaderParameter,
|
|
239
|
+
...headersFromBaseOptions,
|
|
240
|
+
...options.headers
|
|
241
|
+
};
|
|
242
|
+
return {
|
|
243
|
+
url: toPathString(localVarUrlObj),
|
|
244
|
+
options: localVarRequestOptions
|
|
245
|
+
};
|
|
246
|
+
},
|
|
247
|
+
/**
|
|
248
|
+
* Returns query details for the query specified by the `queryId` parameter. See the `createQuery` operation for details about query retention. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2.0 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
249
|
+
* @param {string} queryId The query identifier.
|
|
250
|
+
* @param {*} [options] Override http request option.
|
|
251
|
+
* @throws {RequiredError}
|
|
252
|
+
*/
|
|
253
|
+
getQuery: async (queryId, options = {}) => {
|
|
254
|
+
assertParamExists("getQuery", "queryId", queryId);
|
|
255
|
+
const localVarPath = `/dataKiosk/2023-11-15/queries/{queryId}`.replace("{queryId}", encodeURIComponent(String(queryId)));
|
|
256
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
257
|
+
let baseOptions;
|
|
258
|
+
if (configuration) baseOptions = configuration.baseOptions;
|
|
259
|
+
const localVarRequestOptions = {
|
|
260
|
+
method: "GET",
|
|
261
|
+
...baseOptions,
|
|
262
|
+
...options
|
|
263
|
+
};
|
|
264
|
+
const localVarHeaderParameter = {};
|
|
265
|
+
const localVarQueryParameter = {};
|
|
266
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
267
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
268
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
269
|
+
localVarRequestOptions.headers = {
|
|
270
|
+
...localVarHeaderParameter,
|
|
271
|
+
...headersFromBaseOptions,
|
|
272
|
+
...options.headers
|
|
273
|
+
};
|
|
274
|
+
return {
|
|
275
|
+
url: toPathString(localVarUrlObj),
|
|
276
|
+
options: localVarRequestOptions
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
};
|
|
288
280
|
};
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
281
|
+
/**
|
|
282
|
+
* DataKioskApi - functional programming interface
|
|
283
|
+
*/
|
|
284
|
+
const DataKioskApiFp = function(configuration) {
|
|
285
|
+
const localVarAxiosParamCreator = DataKioskApiAxiosParamCreator(configuration);
|
|
286
|
+
return {
|
|
287
|
+
/**
|
|
288
|
+
* Cancels the query specified by the `queryId` parameter. Only queries with a non-terminal `processingStatus` (`IN_QUEUE`, `IN_PROGRESS`) can be cancelled. Cancelling a query that already has a `processingStatus` of `CANCELLED` will no-op. Cancelled queries are returned in subsequent calls to the `getQuery` and `getQueries` operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
289
|
+
* @param {string} queryId The identifier for the query. This identifier is unique only in combination with a selling partner account ID.
|
|
290
|
+
* @param {*} [options] Override http request option.
|
|
291
|
+
* @throws {RequiredError}
|
|
292
|
+
*/
|
|
293
|
+
async cancelQuery(queryId, options) {
|
|
294
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.cancelQuery(queryId, options);
|
|
295
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
296
|
+
const localVarOperationServerBasePath = operationServerMap["DataKioskApi.cancelQuery"]?.[localVarOperationServerIndex]?.url;
|
|
297
|
+
return (axios$1, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$1, localVarOperationServerBasePath || basePath);
|
|
298
|
+
},
|
|
299
|
+
/**
|
|
300
|
+
* Creates a Data Kiosk query request. **Note:** The retention of a query varies based on the fields requested. Each field within a schema is annotated with a `@resultRetention` directive that defines how long a query containing that field will be retained. When a query contains multiple fields with different retentions, the shortest (minimum) retention is applied. The retention of a query\'s resulting documents always matches the retention of the query. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
301
|
+
* @param {CreateQuerySpecification} body The body of the request.
|
|
302
|
+
* @param {*} [options] Override http request option.
|
|
303
|
+
* @throws {RequiredError}
|
|
304
|
+
*/
|
|
305
|
+
async createQuery(body, options) {
|
|
306
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createQuery(body, options);
|
|
307
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
308
|
+
const localVarOperationServerBasePath = operationServerMap["DataKioskApi.createQuery"]?.[localVarOperationServerIndex]?.url;
|
|
309
|
+
return (axios$2, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$2, localVarOperationServerBasePath || basePath);
|
|
310
|
+
},
|
|
311
|
+
/**
|
|
312
|
+
* Returns the information required for retrieving a Data Kiosk document\'s contents. See the `createQuery` operation for details about document retention. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
313
|
+
* @param {string} documentId The identifier for the Data Kiosk document.
|
|
314
|
+
* @param {*} [options] Override http request option.
|
|
315
|
+
* @throws {RequiredError}
|
|
316
|
+
*/
|
|
317
|
+
async getDocument(documentId, options) {
|
|
318
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getDocument(documentId, options);
|
|
319
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
320
|
+
const localVarOperationServerBasePath = operationServerMap["DataKioskApi.getDocument"]?.[localVarOperationServerIndex]?.url;
|
|
321
|
+
return (axios$3, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$3, localVarOperationServerBasePath || basePath);
|
|
322
|
+
},
|
|
323
|
+
/**
|
|
324
|
+
* Returns details for the Data Kiosk queries that match the specified filters. See the `createQuery` operation for details about query retention. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
325
|
+
* @param {Array<GetQueriesProcessingStatusesEnum>} [processingStatuses] A list of processing statuses used to filter queries.
|
|
326
|
+
* @param {number} [pageSize] The maximum number of queries to return in a single call.
|
|
327
|
+
* @param {string} [createdSince] The earliest query creation date and time for queries to include in the response, in ISO 8601 date time format. The default is 90 days ago.
|
|
328
|
+
* @param {string} [createdUntil] The latest query creation date and time for queries to include in the response, in ISO 8601 date time format. The default is the time of the `getQueries` request.
|
|
329
|
+
* @param {string} [paginationToken] A token to fetch a certain page of results when there are multiple pages of results available. The value of this token is fetched from the `pagination.nextToken` field returned in the `GetQueriesResponse` object. All other parameters must be provided with the same values that were provided with the request that generated this token, with the exception of `pageSize` which can be modified between calls to `getQueries`. In the absence of this token value, `getQueries` returns the first page of results.
|
|
330
|
+
* @param {*} [options] Override http request option.
|
|
331
|
+
* @throws {RequiredError}
|
|
332
|
+
*/
|
|
333
|
+
async getQueries(processingStatuses, pageSize, createdSince, createdUntil, paginationToken, options) {
|
|
334
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getQueries(processingStatuses, pageSize, createdSince, createdUntil, paginationToken, options);
|
|
335
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
336
|
+
const localVarOperationServerBasePath = operationServerMap["DataKioskApi.getQueries"]?.[localVarOperationServerIndex]?.url;
|
|
337
|
+
return (axios$4, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$4, localVarOperationServerBasePath || basePath);
|
|
338
|
+
},
|
|
339
|
+
/**
|
|
340
|
+
* Returns query details for the query specified by the `queryId` parameter. See the `createQuery` operation for details about query retention. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2.0 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
341
|
+
* @param {string} queryId The query identifier.
|
|
342
|
+
* @param {*} [options] Override http request option.
|
|
343
|
+
* @throws {RequiredError}
|
|
344
|
+
*/
|
|
345
|
+
async getQuery(queryId, options) {
|
|
346
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getQuery(queryId, options);
|
|
347
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
348
|
+
const localVarOperationServerBasePath = operationServerMap["DataKioskApi.getQuery"]?.[localVarOperationServerIndex]?.url;
|
|
349
|
+
return (axios$5, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$5, localVarOperationServerBasePath || basePath);
|
|
350
|
+
}
|
|
351
|
+
};
|
|
357
352
|
};
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
353
|
+
/**
|
|
354
|
+
* DataKioskApi - factory interface
|
|
355
|
+
*/
|
|
356
|
+
const DataKioskApiFactory = function(configuration, basePath, axios$6) {
|
|
357
|
+
const localVarFp = DataKioskApiFp(configuration);
|
|
358
|
+
return {
|
|
359
|
+
/**
|
|
360
|
+
* Cancels the query specified by the `queryId` parameter. Only queries with a non-terminal `processingStatus` (`IN_QUEUE`, `IN_PROGRESS`) can be cancelled. Cancelling a query that already has a `processingStatus` of `CANCELLED` will no-op. Cancelled queries are returned in subsequent calls to the `getQuery` and `getQueries` operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
361
|
+
* @param {DataKioskApiCancelQueryRequest} requestParameters Request parameters.
|
|
362
|
+
* @param {*} [options] Override http request option.
|
|
363
|
+
* @throws {RequiredError}
|
|
364
|
+
*/
|
|
365
|
+
cancelQuery(requestParameters, options) {
|
|
366
|
+
return localVarFp.cancelQuery(requestParameters.queryId, options).then((request) => request(axios$6, basePath));
|
|
367
|
+
},
|
|
368
|
+
/**
|
|
369
|
+
* Creates a Data Kiosk query request. **Note:** The retention of a query varies based on the fields requested. Each field within a schema is annotated with a `@resultRetention` directive that defines how long a query containing that field will be retained. When a query contains multiple fields with different retentions, the shortest (minimum) retention is applied. The retention of a query\'s resulting documents always matches the retention of the query. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
370
|
+
* @param {DataKioskApiCreateQueryRequest} requestParameters Request parameters.
|
|
371
|
+
* @param {*} [options] Override http request option.
|
|
372
|
+
* @throws {RequiredError}
|
|
373
|
+
*/
|
|
374
|
+
createQuery(requestParameters, options) {
|
|
375
|
+
return localVarFp.createQuery(requestParameters.body, options).then((request) => request(axios$6, basePath));
|
|
376
|
+
},
|
|
377
|
+
/**
|
|
378
|
+
* Returns the information required for retrieving a Data Kiosk document\'s contents. See the `createQuery` operation for details about document retention. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
379
|
+
* @param {DataKioskApiGetDocumentRequest} requestParameters Request parameters.
|
|
380
|
+
* @param {*} [options] Override http request option.
|
|
381
|
+
* @throws {RequiredError}
|
|
382
|
+
*/
|
|
383
|
+
getDocument(requestParameters, options) {
|
|
384
|
+
return localVarFp.getDocument(requestParameters.documentId, options).then((request) => request(axios$6, basePath));
|
|
385
|
+
},
|
|
386
|
+
/**
|
|
387
|
+
* Returns details for the Data Kiosk queries that match the specified filters. See the `createQuery` operation for details about query retention. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
388
|
+
* @param {DataKioskApiGetQueriesRequest} requestParameters Request parameters.
|
|
389
|
+
* @param {*} [options] Override http request option.
|
|
390
|
+
* @throws {RequiredError}
|
|
391
|
+
*/
|
|
392
|
+
getQueries(requestParameters = {}, options) {
|
|
393
|
+
return localVarFp.getQueries(requestParameters.processingStatuses, requestParameters.pageSize, requestParameters.createdSince, requestParameters.createdUntil, requestParameters.paginationToken, options).then((request) => request(axios$6, basePath));
|
|
394
|
+
},
|
|
395
|
+
/**
|
|
396
|
+
* Returns query details for the query specified by the `queryId` parameter. See the `createQuery` operation for details about query retention. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2.0 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
397
|
+
* @param {DataKioskApiGetQueryRequest} requestParameters Request parameters.
|
|
398
|
+
* @param {*} [options] Override http request option.
|
|
399
|
+
* @throws {RequiredError}
|
|
400
|
+
*/
|
|
401
|
+
getQuery(requestParameters, options) {
|
|
402
|
+
return localVarFp.getQuery(requestParameters.queryId, options).then((request) => request(axios$6, basePath));
|
|
403
|
+
}
|
|
404
|
+
};
|
|
407
405
|
};
|
|
406
|
+
/**
|
|
407
|
+
* DataKioskApi - object-oriented interface
|
|
408
|
+
*/
|
|
408
409
|
var DataKioskApi = class extends BaseAPI {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
410
|
+
/**
|
|
411
|
+
* Cancels the query specified by the `queryId` parameter. Only queries with a non-terminal `processingStatus` (`IN_QUEUE`, `IN_PROGRESS`) can be cancelled. Cancelling a query that already has a `processingStatus` of `CANCELLED` will no-op. Cancelled queries are returned in subsequent calls to the `getQuery` and `getQueries` operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
412
|
+
* @param {DataKioskApiCancelQueryRequest} requestParameters Request parameters.
|
|
413
|
+
* @param {*} [options] Override http request option.
|
|
414
|
+
* @throws {RequiredError}
|
|
415
|
+
*/
|
|
416
|
+
cancelQuery(requestParameters, options) {
|
|
417
|
+
return DataKioskApiFp(this.configuration).cancelQuery(requestParameters.queryId, options).then((request) => request(this.axios, this.basePath));
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Creates a Data Kiosk query request. **Note:** The retention of a query varies based on the fields requested. Each field within a schema is annotated with a `@resultRetention` directive that defines how long a query containing that field will be retained. When a query contains multiple fields with different retentions, the shortest (minimum) retention is applied. The retention of a query\'s resulting documents always matches the retention of the query. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
421
|
+
* @param {DataKioskApiCreateQueryRequest} requestParameters Request parameters.
|
|
422
|
+
* @param {*} [options] Override http request option.
|
|
423
|
+
* @throws {RequiredError}
|
|
424
|
+
*/
|
|
425
|
+
createQuery(requestParameters, options) {
|
|
426
|
+
return DataKioskApiFp(this.configuration).createQuery(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Returns the information required for retrieving a Data Kiosk document\'s contents. See the `createQuery` operation for details about document retention. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
430
|
+
* @param {DataKioskApiGetDocumentRequest} requestParameters Request parameters.
|
|
431
|
+
* @param {*} [options] Override http request option.
|
|
432
|
+
* @throws {RequiredError}
|
|
433
|
+
*/
|
|
434
|
+
getDocument(requestParameters, options) {
|
|
435
|
+
return DataKioskApiFp(this.configuration).getDocument(requestParameters.documentId, options).then((request) => request(this.axios, this.basePath));
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Returns details for the Data Kiosk queries that match the specified filters. See the `createQuery` operation for details about query retention. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
439
|
+
* @param {DataKioskApiGetQueriesRequest} requestParameters Request parameters.
|
|
440
|
+
* @param {*} [options] Override http request option.
|
|
441
|
+
* @throws {RequiredError}
|
|
442
|
+
*/
|
|
443
|
+
getQueries(requestParameters = {}, options) {
|
|
444
|
+
return DataKioskApiFp(this.configuration).getQueries(requestParameters.processingStatuses, requestParameters.pageSize, requestParameters.createdSince, requestParameters.createdUntil, requestParameters.paginationToken, options).then((request) => request(this.axios, this.basePath));
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* Returns query details for the query specified by the `queryId` parameter. See the `createQuery` operation for details about query retention. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2.0 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
448
|
+
* @param {DataKioskApiGetQueryRequest} requestParameters Request parameters.
|
|
449
|
+
* @param {*} [options] Override http request option.
|
|
450
|
+
* @throws {RequiredError}
|
|
451
|
+
*/
|
|
452
|
+
getQuery(requestParameters, options) {
|
|
453
|
+
return DataKioskApiFp(this.configuration).getQuery(requestParameters.queryId, options).then((request) => request(this.axios, this.basePath));
|
|
454
|
+
}
|
|
454
455
|
};
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
456
|
+
const GetQueriesProcessingStatusesEnum = {
|
|
457
|
+
Cancelled: "CANCELLED",
|
|
458
|
+
Done: "DONE",
|
|
459
|
+
Fatal: "FATAL",
|
|
460
|
+
InProgress: "IN_PROGRESS",
|
|
461
|
+
InQueue: "IN_QUEUE"
|
|
461
462
|
};
|
|
462
|
-
|
|
463
|
-
|
|
463
|
+
//#endregion
|
|
464
|
+
//#region src/api-model/configuration.ts
|
|
464
465
|
var Configuration = class {
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
|
|
543
|
-
return mime !== null && jsonMime.test(mime);
|
|
544
|
-
}
|
|
466
|
+
/**
|
|
467
|
+
* parameter for apiKey security
|
|
468
|
+
* @param name security name
|
|
469
|
+
*/
|
|
470
|
+
apiKey;
|
|
471
|
+
/**
|
|
472
|
+
* parameter for basic security
|
|
473
|
+
*/
|
|
474
|
+
username;
|
|
475
|
+
/**
|
|
476
|
+
* parameter for basic security
|
|
477
|
+
*/
|
|
478
|
+
password;
|
|
479
|
+
/**
|
|
480
|
+
* parameter for oauth2 security
|
|
481
|
+
* @param name security name
|
|
482
|
+
* @param scopes oauth2 scope
|
|
483
|
+
*/
|
|
484
|
+
accessToken;
|
|
485
|
+
/**
|
|
486
|
+
* parameter for aws4 signature security
|
|
487
|
+
* @param {Object} AWS4Signature - AWS4 Signature security
|
|
488
|
+
* @param {string} options.region - aws region
|
|
489
|
+
* @param {string} options.service - name of the service.
|
|
490
|
+
* @param {string} credentials.accessKeyId - aws access key id
|
|
491
|
+
* @param {string} credentials.secretAccessKey - aws access key
|
|
492
|
+
* @param {string} credentials.sessionToken - aws session token
|
|
493
|
+
* @memberof Configuration
|
|
494
|
+
*/
|
|
495
|
+
awsv4;
|
|
496
|
+
/**
|
|
497
|
+
* override base path
|
|
498
|
+
*/
|
|
499
|
+
basePath;
|
|
500
|
+
/**
|
|
501
|
+
* override server index
|
|
502
|
+
*/
|
|
503
|
+
serverIndex;
|
|
504
|
+
/**
|
|
505
|
+
* base options for axios calls
|
|
506
|
+
*/
|
|
507
|
+
baseOptions;
|
|
508
|
+
/**
|
|
509
|
+
* The FormData constructor that will be used to create multipart form data
|
|
510
|
+
* requests. You can inject this here so that execution environments that
|
|
511
|
+
* do not support the FormData class can still run the generated client.
|
|
512
|
+
*
|
|
513
|
+
* @type {new () => FormData}
|
|
514
|
+
*/
|
|
515
|
+
formDataCtor;
|
|
516
|
+
constructor(param = {}) {
|
|
517
|
+
this.apiKey = param.apiKey;
|
|
518
|
+
this.username = param.username;
|
|
519
|
+
this.password = param.password;
|
|
520
|
+
this.accessToken = param.accessToken;
|
|
521
|
+
this.awsv4 = param.awsv4;
|
|
522
|
+
this.basePath = param.basePath;
|
|
523
|
+
this.serverIndex = param.serverIndex;
|
|
524
|
+
this.baseOptions = {
|
|
525
|
+
...param.baseOptions,
|
|
526
|
+
headers: { ...param.baseOptions?.headers }
|
|
527
|
+
};
|
|
528
|
+
this.formDataCtor = param.formDataCtor;
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Check if the given MIME is a JSON MIME.
|
|
532
|
+
* JSON MIME examples:
|
|
533
|
+
* application/json
|
|
534
|
+
* application/json; charset=UTF8
|
|
535
|
+
* APPLICATION/JSON
|
|
536
|
+
* application/vnd.company+json
|
|
537
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
538
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
539
|
+
*/
|
|
540
|
+
isJsonMime(mime) {
|
|
541
|
+
return mime !== null && /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i.test(mime);
|
|
542
|
+
}
|
|
545
543
|
};
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
544
|
+
//#endregion
|
|
545
|
+
//#region src/api-model/models/query.ts
|
|
546
|
+
const QueryProcessingStatusEnum = {
|
|
547
|
+
Cancelled: "CANCELLED",
|
|
548
|
+
Done: "DONE",
|
|
549
|
+
Fatal: "FATAL",
|
|
550
|
+
InProgress: "IN_PROGRESS",
|
|
551
|
+
InQueue: "IN_QUEUE"
|
|
554
552
|
};
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
// eslint-disable-next-line prefer-regex-literals
|
|
589
|
-
urlRegex: new RegExp("^/dataKiosk/2023-11-15/documents/[^/]*$"),
|
|
590
|
-
rate: 0.0167,
|
|
591
|
-
burst: 15
|
|
592
|
-
}
|
|
553
|
+
//#endregion
|
|
554
|
+
//#region src/client.ts
|
|
555
|
+
const clientRateLimits = [
|
|
556
|
+
{
|
|
557
|
+
method: "get",
|
|
558
|
+
urlRegex: /^\/dataKiosk\/2023\u{2D}11\u{2D}15\/queries$/v,
|
|
559
|
+
rate: .0222,
|
|
560
|
+
burst: 10
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
method: "post",
|
|
564
|
+
urlRegex: /^\/dataKiosk\/2023\u{2D}11\u{2D}15\/queries$/v,
|
|
565
|
+
rate: .0167,
|
|
566
|
+
burst: 15
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
method: "delete",
|
|
570
|
+
urlRegex: /^\/dataKiosk\/2023\u{2D}11\u{2D}15\/queries\/[^\/]*$/v,
|
|
571
|
+
rate: .0222,
|
|
572
|
+
burst: 10
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
method: "get",
|
|
576
|
+
urlRegex: /^\/dataKiosk\/2023\u{2D}11\u{2D}15\/queries\/[^\/]*$/v,
|
|
577
|
+
rate: 2,
|
|
578
|
+
burst: 15
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
method: "get",
|
|
582
|
+
urlRegex: /^\/dataKiosk\/2023\u{2D}11\u{2D}15\/documents\/[^\/]*$/v,
|
|
583
|
+
rate: .0167,
|
|
584
|
+
burst: 15
|
|
585
|
+
}
|
|
593
586
|
];
|
|
594
587
|
var DataKioskApiClient = class extends DataKioskApi {
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
588
|
+
constructor(configuration) {
|
|
589
|
+
const { axios, endpoint } = (0, _sp_api_sdk_common.createAxiosInstance)(configuration, clientRateLimits);
|
|
590
|
+
super(new Configuration(), endpoint, axios);
|
|
591
|
+
}
|
|
599
592
|
};
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
});
|
|
593
|
+
//#endregion
|
|
594
|
+
exports.DataKioskApi = DataKioskApi;
|
|
595
|
+
exports.DataKioskApiAxiosParamCreator = DataKioskApiAxiosParamCreator;
|
|
596
|
+
exports.DataKioskApiClient = DataKioskApiClient;
|
|
597
|
+
exports.DataKioskApiFactory = DataKioskApiFactory;
|
|
598
|
+
exports.DataKioskApiFp = DataKioskApiFp;
|
|
599
|
+
exports.GetQueriesProcessingStatusesEnum = GetQueriesProcessingStatusesEnum;
|
|
600
|
+
exports.QueryProcessingStatusEnum = QueryProcessingStatusEnum;
|
|
601
|
+
exports.clientRateLimits = clientRateLimits;
|
|
602
|
+
|
|
611
603
|
//# sourceMappingURL=index.cjs.map
|