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