@sp-api-sdk/data-kiosk-api-2023-11-15 3.0.16 → 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.
Files changed (61) hide show
  1. package/README.md +4 -4
  2. package/dist/index.cjs +611 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/{types/api-model/api/data-kiosk-api.d.ts → index.d.cts} +382 -25
  5. package/dist/index.d.ts +614 -0
  6. package/dist/index.js +567 -0
  7. package/dist/index.js.map +1 -0
  8. package/package.json +23 -12
  9. package/dist/cjs/api-model/api/data-kiosk-api.js +0 -384
  10. package/dist/cjs/api-model/api.js +0 -30
  11. package/dist/cjs/api-model/base.js +0 -52
  12. package/dist/cjs/api-model/common.js +0 -123
  13. package/dist/cjs/api-model/configuration.js +0 -98
  14. package/dist/cjs/api-model/index.js +0 -32
  15. package/dist/cjs/api-model/models/create-query-response.js +0 -15
  16. package/dist/cjs/api-model/models/create-query-specification.js +0 -15
  17. package/dist/cjs/api-model/models/error-list.js +0 -15
  18. package/dist/cjs/api-model/models/get-document-response.js +0 -15
  19. package/dist/cjs/api-model/models/get-queries-response-pagination.js +0 -15
  20. package/dist/cjs/api-model/models/get-queries-response.js +0 -15
  21. package/dist/cjs/api-model/models/index.js +0 -25
  22. package/dist/cjs/api-model/models/model-error.js +0 -15
  23. package/dist/cjs/api-model/models/query-pagination.js +0 -15
  24. package/dist/cjs/api-model/models/query.js +0 -23
  25. package/dist/cjs/client.js +0 -49
  26. package/dist/cjs/index.js +0 -19
  27. package/dist/es/api-model/api/data-kiosk-api.js +0 -374
  28. package/dist/es/api-model/api.js +0 -14
  29. package/dist/es/api-model/base.js +0 -44
  30. package/dist/es/api-model/common.js +0 -110
  31. package/dist/es/api-model/configuration.js +0 -94
  32. package/dist/es/api-model/index.js +0 -16
  33. package/dist/es/api-model/models/create-query-response.js +0 -14
  34. package/dist/es/api-model/models/create-query-specification.js +0 -14
  35. package/dist/es/api-model/models/error-list.js +0 -14
  36. package/dist/es/api-model/models/get-document-response.js +0 -14
  37. package/dist/es/api-model/models/get-queries-response-pagination.js +0 -14
  38. package/dist/es/api-model/models/get-queries-response.js +0 -14
  39. package/dist/es/api-model/models/index.js +0 -9
  40. package/dist/es/api-model/models/model-error.js +0 -14
  41. package/dist/es/api-model/models/query-pagination.js +0 -14
  42. package/dist/es/api-model/models/query.js +0 -20
  43. package/dist/es/client.js +0 -45
  44. package/dist/es/index.js +0 -3
  45. package/dist/types/api-model/api.d.ts +0 -12
  46. package/dist/types/api-model/base.d.ts +0 -42
  47. package/dist/types/api-model/common.d.ts +0 -34
  48. package/dist/types/api-model/configuration.d.ts +0 -98
  49. package/dist/types/api-model/index.d.ts +0 -14
  50. package/dist/types/api-model/models/create-query-response.d.ts +0 -20
  51. package/dist/types/api-model/models/create-query-specification.d.ts +0 -24
  52. package/dist/types/api-model/models/error-list.d.ts +0 -20
  53. package/dist/types/api-model/models/get-document-response.d.ts +0 -24
  54. package/dist/types/api-model/models/get-queries-response-pagination.d.ts +0 -20
  55. package/dist/types/api-model/models/get-queries-response.d.ts +0 -23
  56. package/dist/types/api-model/models/index.d.ts +0 -9
  57. package/dist/types/api-model/models/model-error.d.ts +0 -28
  58. package/dist/types/api-model/models/query-pagination.d.ts +0 -20
  59. package/dist/types/api-model/models/query.d.ts +0 -58
  60. package/dist/types/client.d.ts +0 -6
  61. package/dist/types/index.d.ts +0 -3
@@ -1,384 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Selling Partner API for Data Kiosk
6
- * The Selling Partner API for Data Kiosk lets you submit GraphQL queries from a variety of schemas to help selling partners manage their businesses.
7
- *
8
- * The version of the OpenAPI document: 2023-11-15
9
- *
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- var __importDefault = (this && this.__importDefault) || function (mod) {
16
- return (mod && mod.__esModule) ? mod : { "default": mod };
17
- };
18
- Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.GetQueriesProcessingStatusesEnum = exports.DataKioskApi = exports.DataKioskApiFactory = exports.DataKioskApiFp = exports.DataKioskApiAxiosParamCreator = void 0;
20
- const axios_1 = __importDefault(require("axios"));
21
- // Some imports not used depending on template conditions
22
- // @ts-ignore
23
- const common_1 = require("../common");
24
- // @ts-ignore
25
- const base_1 = require("../base");
26
- /**
27
- * DataKioskApi - axios parameter creator
28
- */
29
- const DataKioskApiAxiosParamCreator = function (configuration) {
30
- return {
31
- /**
32
- * 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).
33
- * @param {string} queryId The identifier for the query. This identifier is unique only in combination with a selling partner account ID.
34
- * @param {*} [options] Override http request option.
35
- * @throws {RequiredError}
36
- */
37
- cancelQuery: async (queryId, options = {}) => {
38
- // verify required parameter 'queryId' is not null or undefined
39
- (0, common_1.assertParamExists)('cancelQuery', 'queryId', queryId);
40
- const localVarPath = `/dataKiosk/2023-11-15/queries/{queryId}`
41
- .replace(`{${"queryId"}}`, encodeURIComponent(String(queryId)));
42
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
43
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
44
- let baseOptions;
45
- if (configuration) {
46
- baseOptions = configuration.baseOptions;
47
- }
48
- const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options };
49
- const localVarHeaderParameter = {};
50
- const localVarQueryParameter = {};
51
- localVarHeaderParameter['Accept'] = 'application/json';
52
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
53
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
54
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
55
- return {
56
- url: (0, common_1.toPathString)(localVarUrlObj),
57
- options: localVarRequestOptions,
58
- };
59
- },
60
- /**
61
- * 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).
62
- * @param {CreateQuerySpecification} body The body of the request.
63
- * @param {*} [options] Override http request option.
64
- * @throws {RequiredError}
65
- */
66
- createQuery: async (body, options = {}) => {
67
- // verify required parameter 'body' is not null or undefined
68
- (0, common_1.assertParamExists)('createQuery', 'body', body);
69
- const localVarPath = `/dataKiosk/2023-11-15/queries`;
70
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
71
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
72
- let baseOptions;
73
- if (configuration) {
74
- baseOptions = configuration.baseOptions;
75
- }
76
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
77
- const localVarHeaderParameter = {};
78
- const localVarQueryParameter = {};
79
- localVarHeaderParameter['Content-Type'] = 'application/json';
80
- localVarHeaderParameter['Accept'] = 'application/json';
81
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
82
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
83
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
84
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
85
- return {
86
- url: (0, common_1.toPathString)(localVarUrlObj),
87
- options: localVarRequestOptions,
88
- };
89
- },
90
- /**
91
- * 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).
92
- * @param {string} documentId The identifier for the Data Kiosk document.
93
- * @param {*} [options] Override http request option.
94
- * @throws {RequiredError}
95
- */
96
- getDocument: async (documentId, options = {}) => {
97
- // verify required parameter 'documentId' is not null or undefined
98
- (0, common_1.assertParamExists)('getDocument', 'documentId', documentId);
99
- const localVarPath = `/dataKiosk/2023-11-15/documents/{documentId}`
100
- .replace(`{${"documentId"}}`, encodeURIComponent(String(documentId)));
101
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
102
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
103
- let baseOptions;
104
- if (configuration) {
105
- baseOptions = configuration.baseOptions;
106
- }
107
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
108
- const localVarHeaderParameter = {};
109
- const localVarQueryParameter = {};
110
- localVarHeaderParameter['Accept'] = 'application/json';
111
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
112
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
113
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
114
- return {
115
- url: (0, common_1.toPathString)(localVarUrlObj),
116
- options: localVarRequestOptions,
117
- };
118
- },
119
- /**
120
- * 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).
121
- * @param {Array<GetQueriesProcessingStatusesEnum>} [processingStatuses] A list of processing statuses used to filter queries.
122
- * @param {number} [pageSize] The maximum number of queries to return in a single call.
123
- * @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.
124
- * @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 &#x60;getQueries&#x60; request.
125
- * @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 &#x60;pagination.nextToken&#x60; field returned in the &#x60;GetQueriesResponse&#x60; 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 &#x60;pageSize&#x60; which can be modified between calls to &#x60;getQueries&#x60;. In the absence of this token value, &#x60;getQueries&#x60; returns the first page of results.
126
- * @param {*} [options] Override http request option.
127
- * @throws {RequiredError}
128
- */
129
- getQueries: async (processingStatuses, pageSize, createdSince, createdUntil, paginationToken, options = {}) => {
130
- const localVarPath = `/dataKiosk/2023-11-15/queries`;
131
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
132
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
133
- let baseOptions;
134
- if (configuration) {
135
- baseOptions = configuration.baseOptions;
136
- }
137
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
138
- const localVarHeaderParameter = {};
139
- const localVarQueryParameter = {};
140
- if (processingStatuses) {
141
- localVarQueryParameter['processingStatuses'] = processingStatuses.join(base_1.COLLECTION_FORMATS.csv);
142
- }
143
- if (pageSize !== undefined) {
144
- localVarQueryParameter['pageSize'] = pageSize;
145
- }
146
- if (createdSince !== undefined) {
147
- localVarQueryParameter['createdSince'] = (createdSince instanceof Date) ?
148
- createdSince.toISOString() :
149
- createdSince;
150
- }
151
- if (createdUntil !== undefined) {
152
- localVarQueryParameter['createdUntil'] = (createdUntil instanceof Date) ?
153
- createdUntil.toISOString() :
154
- createdUntil;
155
- }
156
- if (paginationToken !== undefined) {
157
- localVarQueryParameter['paginationToken'] = paginationToken;
158
- }
159
- localVarHeaderParameter['Accept'] = 'application/json';
160
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
161
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
162
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
163
- return {
164
- url: (0, common_1.toPathString)(localVarUrlObj),
165
- options: localVarRequestOptions,
166
- };
167
- },
168
- /**
169
- * 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).
170
- * @param {string} queryId The query identifier.
171
- * @param {*} [options] Override http request option.
172
- * @throws {RequiredError}
173
- */
174
- getQuery: async (queryId, options = {}) => {
175
- // verify required parameter 'queryId' is not null or undefined
176
- (0, common_1.assertParamExists)('getQuery', 'queryId', queryId);
177
- const localVarPath = `/dataKiosk/2023-11-15/queries/{queryId}`
178
- .replace(`{${"queryId"}}`, encodeURIComponent(String(queryId)));
179
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
180
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
181
- let baseOptions;
182
- if (configuration) {
183
- baseOptions = configuration.baseOptions;
184
- }
185
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
186
- const localVarHeaderParameter = {};
187
- const localVarQueryParameter = {};
188
- localVarHeaderParameter['Accept'] = 'application/json';
189
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
190
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
191
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
192
- return {
193
- url: (0, common_1.toPathString)(localVarUrlObj),
194
- options: localVarRequestOptions,
195
- };
196
- },
197
- };
198
- };
199
- exports.DataKioskApiAxiosParamCreator = DataKioskApiAxiosParamCreator;
200
- /**
201
- * DataKioskApi - functional programming interface
202
- */
203
- const DataKioskApiFp = function (configuration) {
204
- const localVarAxiosParamCreator = (0, exports.DataKioskApiAxiosParamCreator)(configuration);
205
- return {
206
- /**
207
- * 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).
208
- * @param {string} queryId The identifier for the query. This identifier is unique only in combination with a selling partner account ID.
209
- * @param {*} [options] Override http request option.
210
- * @throws {RequiredError}
211
- */
212
- async cancelQuery(queryId, options) {
213
- const localVarAxiosArgs = await localVarAxiosParamCreator.cancelQuery(queryId, options);
214
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
215
- const localVarOperationServerBasePath = base_1.operationServerMap['DataKioskApi.cancelQuery']?.[localVarOperationServerIndex]?.url;
216
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
217
- },
218
- /**
219
- * 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).
220
- * @param {CreateQuerySpecification} body The body of the request.
221
- * @param {*} [options] Override http request option.
222
- * @throws {RequiredError}
223
- */
224
- async createQuery(body, options) {
225
- const localVarAxiosArgs = await localVarAxiosParamCreator.createQuery(body, options);
226
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
227
- const localVarOperationServerBasePath = base_1.operationServerMap['DataKioskApi.createQuery']?.[localVarOperationServerIndex]?.url;
228
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
229
- },
230
- /**
231
- * 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).
232
- * @param {string} documentId The identifier for the Data Kiosk document.
233
- * @param {*} [options] Override http request option.
234
- * @throws {RequiredError}
235
- */
236
- async getDocument(documentId, options) {
237
- const localVarAxiosArgs = await localVarAxiosParamCreator.getDocument(documentId, options);
238
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
239
- const localVarOperationServerBasePath = base_1.operationServerMap['DataKioskApi.getDocument']?.[localVarOperationServerIndex]?.url;
240
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
241
- },
242
- /**
243
- * 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).
244
- * @param {Array<GetQueriesProcessingStatusesEnum>} [processingStatuses] A list of processing statuses used to filter queries.
245
- * @param {number} [pageSize] The maximum number of queries to return in a single call.
246
- * @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.
247
- * @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 &#x60;getQueries&#x60; request.
248
- * @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 &#x60;pagination.nextToken&#x60; field returned in the &#x60;GetQueriesResponse&#x60; 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 &#x60;pageSize&#x60; which can be modified between calls to &#x60;getQueries&#x60;. In the absence of this token value, &#x60;getQueries&#x60; returns the first page of results.
249
- * @param {*} [options] Override http request option.
250
- * @throws {RequiredError}
251
- */
252
- async getQueries(processingStatuses, pageSize, createdSince, createdUntil, paginationToken, options) {
253
- const localVarAxiosArgs = await localVarAxiosParamCreator.getQueries(processingStatuses, pageSize, createdSince, createdUntil, paginationToken, options);
254
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
255
- const localVarOperationServerBasePath = base_1.operationServerMap['DataKioskApi.getQueries']?.[localVarOperationServerIndex]?.url;
256
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
257
- },
258
- /**
259
- * 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).
260
- * @param {string} queryId The query identifier.
261
- * @param {*} [options] Override http request option.
262
- * @throws {RequiredError}
263
- */
264
- async getQuery(queryId, options) {
265
- const localVarAxiosArgs = await localVarAxiosParamCreator.getQuery(queryId, options);
266
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
267
- const localVarOperationServerBasePath = base_1.operationServerMap['DataKioskApi.getQuery']?.[localVarOperationServerIndex]?.url;
268
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
269
- },
270
- };
271
- };
272
- exports.DataKioskApiFp = DataKioskApiFp;
273
- /**
274
- * DataKioskApi - factory interface
275
- */
276
- const DataKioskApiFactory = function (configuration, basePath, axios) {
277
- const localVarFp = (0, exports.DataKioskApiFp)(configuration);
278
- return {
279
- /**
280
- * 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).
281
- * @param {DataKioskApiCancelQueryRequest} requestParameters Request parameters.
282
- * @param {*} [options] Override http request option.
283
- * @throws {RequiredError}
284
- */
285
- cancelQuery(requestParameters, options) {
286
- return localVarFp.cancelQuery(requestParameters.queryId, options).then((request) => request(axios, basePath));
287
- },
288
- /**
289
- * 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).
290
- * @param {DataKioskApiCreateQueryRequest} requestParameters Request parameters.
291
- * @param {*} [options] Override http request option.
292
- * @throws {RequiredError}
293
- */
294
- createQuery(requestParameters, options) {
295
- return localVarFp.createQuery(requestParameters.body, options).then((request) => request(axios, basePath));
296
- },
297
- /**
298
- * 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).
299
- * @param {DataKioskApiGetDocumentRequest} requestParameters Request parameters.
300
- * @param {*} [options] Override http request option.
301
- * @throws {RequiredError}
302
- */
303
- getDocument(requestParameters, options) {
304
- return localVarFp.getDocument(requestParameters.documentId, options).then((request) => request(axios, basePath));
305
- },
306
- /**
307
- * 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).
308
- * @param {DataKioskApiGetQueriesRequest} requestParameters Request parameters.
309
- * @param {*} [options] Override http request option.
310
- * @throws {RequiredError}
311
- */
312
- getQueries(requestParameters = {}, options) {
313
- return localVarFp.getQueries(requestParameters.processingStatuses, requestParameters.pageSize, requestParameters.createdSince, requestParameters.createdUntil, requestParameters.paginationToken, options).then((request) => request(axios, basePath));
314
- },
315
- /**
316
- * 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).
317
- * @param {DataKioskApiGetQueryRequest} requestParameters Request parameters.
318
- * @param {*} [options] Override http request option.
319
- * @throws {RequiredError}
320
- */
321
- getQuery(requestParameters, options) {
322
- return localVarFp.getQuery(requestParameters.queryId, options).then((request) => request(axios, basePath));
323
- },
324
- };
325
- };
326
- exports.DataKioskApiFactory = DataKioskApiFactory;
327
- /**
328
- * DataKioskApi - object-oriented interface
329
- */
330
- class DataKioskApi extends base_1.BaseAPI {
331
- /**
332
- * 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).
333
- * @param {DataKioskApiCancelQueryRequest} requestParameters Request parameters.
334
- * @param {*} [options] Override http request option.
335
- * @throws {RequiredError}
336
- */
337
- cancelQuery(requestParameters, options) {
338
- return (0, exports.DataKioskApiFp)(this.configuration).cancelQuery(requestParameters.queryId, options).then((request) => request(this.axios, this.basePath));
339
- }
340
- /**
341
- * 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).
342
- * @param {DataKioskApiCreateQueryRequest} requestParameters Request parameters.
343
- * @param {*} [options] Override http request option.
344
- * @throws {RequiredError}
345
- */
346
- createQuery(requestParameters, options) {
347
- return (0, exports.DataKioskApiFp)(this.configuration).createQuery(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
348
- }
349
- /**
350
- * 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).
351
- * @param {DataKioskApiGetDocumentRequest} requestParameters Request parameters.
352
- * @param {*} [options] Override http request option.
353
- * @throws {RequiredError}
354
- */
355
- getDocument(requestParameters, options) {
356
- return (0, exports.DataKioskApiFp)(this.configuration).getDocument(requestParameters.documentId, options).then((request) => request(this.axios, this.basePath));
357
- }
358
- /**
359
- * 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).
360
- * @param {DataKioskApiGetQueriesRequest} requestParameters Request parameters.
361
- * @param {*} [options] Override http request option.
362
- * @throws {RequiredError}
363
- */
364
- getQueries(requestParameters = {}, options) {
365
- return (0, exports.DataKioskApiFp)(this.configuration).getQueries(requestParameters.processingStatuses, requestParameters.pageSize, requestParameters.createdSince, requestParameters.createdUntil, requestParameters.paginationToken, options).then((request) => request(this.axios, this.basePath));
366
- }
367
- /**
368
- * 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).
369
- * @param {DataKioskApiGetQueryRequest} requestParameters Request parameters.
370
- * @param {*} [options] Override http request option.
371
- * @throws {RequiredError}
372
- */
373
- getQuery(requestParameters, options) {
374
- return (0, exports.DataKioskApiFp)(this.configuration).getQuery(requestParameters.queryId, options).then((request) => request(this.axios, this.basePath));
375
- }
376
- }
377
- exports.DataKioskApi = DataKioskApi;
378
- exports.GetQueriesProcessingStatusesEnum = {
379
- Cancelled: 'CANCELLED',
380
- Done: 'DONE',
381
- Fatal: 'FATAL',
382
- InProgress: 'IN_PROGRESS',
383
- InQueue: 'IN_QUEUE'
384
- };
@@ -1,30 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Selling Partner API for Data Kiosk
6
- * The Selling Partner API for Data Kiosk lets you submit GraphQL queries from a variety of schemas to help selling partners manage their businesses.
7
- *
8
- * The version of the OpenAPI document: 2023-11-15
9
- *
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
- if (k2 === undefined) k2 = k;
17
- var desc = Object.getOwnPropertyDescriptor(m, k);
18
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
- desc = { enumerable: true, get: function() { return m[k]; } };
20
- }
21
- Object.defineProperty(o, k2, desc);
22
- }) : (function(o, m, k, k2) {
23
- if (k2 === undefined) k2 = k;
24
- o[k2] = m[k];
25
- }));
26
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
27
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
28
- };
29
- Object.defineProperty(exports, "__esModule", { value: true });
30
- __exportStar(require("./api/data-kiosk-api"), exports);
@@ -1,52 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Selling Partner API for Data Kiosk
6
- * The Selling Partner API for Data Kiosk lets you submit GraphQL queries from a variety of schemas to help selling partners manage their businesses.
7
- *
8
- * The version of the OpenAPI document: 2023-11-15
9
- *
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- var __importDefault = (this && this.__importDefault) || function (mod) {
16
- return (mod && mod.__esModule) ? mod : { "default": mod };
17
- };
18
- Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
20
- const axios_1 = __importDefault(require("axios"));
21
- exports.BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
22
- exports.COLLECTION_FORMATS = {
23
- csv: ",",
24
- ssv: " ",
25
- tsv: "\t",
26
- pipes: "|",
27
- };
28
- class BaseAPI {
29
- basePath;
30
- axios;
31
- configuration;
32
- constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
33
- this.basePath = basePath;
34
- this.axios = axios;
35
- if (configuration) {
36
- this.configuration = configuration;
37
- this.basePath = configuration.basePath ?? basePath;
38
- }
39
- }
40
- }
41
- exports.BaseAPI = BaseAPI;
42
- ;
43
- class RequiredError extends Error {
44
- field;
45
- constructor(field, msg) {
46
- super(msg);
47
- this.field = field;
48
- this.name = "RequiredError";
49
- }
50
- }
51
- exports.RequiredError = RequiredError;
52
- exports.operationServerMap = {};
@@ -1,123 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Selling Partner API for Data Kiosk
6
- * The Selling Partner API for Data Kiosk lets you submit GraphQL queries from a variety of schemas to help selling partners manage their businesses.
7
- *
8
- * The version of the OpenAPI document: 2023-11-15
9
- *
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.replaceWithSerializableTypeIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
17
- const base_1 = require("./base");
18
- exports.DUMMY_BASE_URL = 'https://example.com';
19
- /**
20
- *
21
- * @throws {RequiredError}
22
- */
23
- const assertParamExists = function (functionName, paramName, paramValue) {
24
- if (paramValue === null || paramValue === undefined) {
25
- throw new base_1.RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
26
- }
27
- };
28
- exports.assertParamExists = assertParamExists;
29
- const setApiKeyToObject = async function (object, keyParamName, configuration) {
30
- if (configuration && configuration.apiKey) {
31
- const localVarApiKeyValue = typeof configuration.apiKey === 'function'
32
- ? await configuration.apiKey(keyParamName)
33
- : await configuration.apiKey;
34
- object[keyParamName] = localVarApiKeyValue;
35
- }
36
- };
37
- exports.setApiKeyToObject = setApiKeyToObject;
38
- const setBasicAuthToObject = function (object, configuration) {
39
- if (configuration && (configuration.username || configuration.password)) {
40
- object["auth"] = { username: configuration.username, password: configuration.password };
41
- }
42
- };
43
- exports.setBasicAuthToObject = setBasicAuthToObject;
44
- const setBearerAuthToObject = async function (object, configuration) {
45
- if (configuration && configuration.accessToken) {
46
- const accessToken = typeof configuration.accessToken === 'function'
47
- ? await configuration.accessToken()
48
- : await configuration.accessToken;
49
- object["Authorization"] = "Bearer " + accessToken;
50
- }
51
- };
52
- exports.setBearerAuthToObject = setBearerAuthToObject;
53
- const setOAuthToObject = async function (object, name, scopes, configuration) {
54
- if (configuration && configuration.accessToken) {
55
- const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
56
- ? await configuration.accessToken(name, scopes)
57
- : await configuration.accessToken;
58
- object["Authorization"] = "Bearer " + localVarAccessTokenValue;
59
- }
60
- };
61
- exports.setOAuthToObject = setOAuthToObject;
62
- function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
63
- if (parameter == null)
64
- return;
65
- if (typeof parameter === "object") {
66
- if (Array.isArray(parameter) || parameter instanceof Set) {
67
- parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
68
- }
69
- else {
70
- Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
71
- }
72
- }
73
- else {
74
- if (urlSearchParams.has(key)) {
75
- urlSearchParams.append(key, parameter);
76
- }
77
- else {
78
- urlSearchParams.set(key, parameter);
79
- }
80
- }
81
- }
82
- const setSearchParams = function (url, ...objects) {
83
- const searchParams = new URLSearchParams(url.search);
84
- setFlattenedQueryParams(searchParams, objects);
85
- url.search = searchParams.toString();
86
- };
87
- exports.setSearchParams = setSearchParams;
88
- /**
89
- * JSON serialization helper function which replaces instances of unserializable types with serializable ones.
90
- * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
91
- * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
92
- */
93
- // @ts-ignore
94
- const replaceWithSerializableTypeIfNeeded = function (key, value) {
95
- if (value instanceof Set) {
96
- return Array.from(value);
97
- }
98
- else {
99
- return value;
100
- }
101
- };
102
- exports.replaceWithSerializableTypeIfNeeded = replaceWithSerializableTypeIfNeeded;
103
- const serializeDataIfNeeded = function (value, requestOptions, configuration) {
104
- const nonString = typeof value !== 'string';
105
- const needsSerialization = nonString && configuration && configuration.isJsonMime
106
- ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
107
- : nonString;
108
- return needsSerialization
109
- ? JSON.stringify(value !== undefined ? value : {}, exports.replaceWithSerializableTypeIfNeeded)
110
- : (value || "");
111
- };
112
- exports.serializeDataIfNeeded = serializeDataIfNeeded;
113
- const toPathString = function (url) {
114
- return url.pathname + url.search + url.hash;
115
- };
116
- exports.toPathString = toPathString;
117
- const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
118
- return (axios = globalAxios, basePath = BASE_PATH) => {
119
- const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
120
- return axios.request(axiosRequestArgs);
121
- };
122
- };
123
- exports.createRequestFunction = createRequestFunction;