@sp-api-sdk/catalog-items-api-v0 4.0.16 → 5.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 (44) hide show
  1. package/README.md +4 -4
  2. package/dist/index.cjs +310 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +276 -0
  5. package/dist/index.d.ts +276 -0
  6. package/dist/index.js +268 -0
  7. package/dist/index.js.map +1 -0
  8. package/package.json +23 -12
  9. package/dist/cjs/api-model/api/catalog-items-api.js +0 -128
  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/categories.js +0 -15
  16. package/dist/cjs/api-model/models/index.js +0 -19
  17. package/dist/cjs/api-model/models/list-catalog-categories-response.js +0 -15
  18. package/dist/cjs/api-model/models/model-error.js +0 -15
  19. package/dist/cjs/client.js +0 -21
  20. package/dist/cjs/index.js +0 -18
  21. package/dist/es/api-model/api/catalog-items-api.js +0 -118
  22. package/dist/es/api-model/api.js +0 -14
  23. package/dist/es/api-model/base.js +0 -44
  24. package/dist/es/api-model/common.js +0 -110
  25. package/dist/es/api-model/configuration.js +0 -94
  26. package/dist/es/api-model/index.js +0 -16
  27. package/dist/es/api-model/models/categories.js +0 -14
  28. package/dist/es/api-model/models/index.js +0 -3
  29. package/dist/es/api-model/models/list-catalog-categories-response.js +0 -14
  30. package/dist/es/api-model/models/model-error.js +0 -14
  31. package/dist/es/client.js +0 -17
  32. package/dist/es/index.js +0 -2
  33. package/dist/types/api-model/api/catalog-items-api.d.ts +0 -85
  34. package/dist/types/api-model/api.d.ts +0 -12
  35. package/dist/types/api-model/base.d.ts +0 -42
  36. package/dist/types/api-model/common.d.ts +0 -34
  37. package/dist/types/api-model/configuration.d.ts +0 -98
  38. package/dist/types/api-model/index.d.ts +0 -14
  39. package/dist/types/api-model/models/categories.d.ts +0 -25
  40. package/dist/types/api-model/models/index.d.ts +0 -3
  41. package/dist/types/api-model/models/list-catalog-categories-response.d.ts +0 -19
  42. package/dist/types/api-model/models/model-error.d.ts +0 -28
  43. package/dist/types/client.d.ts +0 -6
  44. package/dist/types/index.d.ts +0 -3
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # `catalog-items-api-v0`
1
+ # `@sp-api-sdk/catalog-items-api-v0`
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@sp-api-sdk/catalog-items-api-v0)](https://www.npmjs.com/package/@sp-api-sdk/catalog-items-api-v0)
4
4
  [![XO code style](https://img.shields.io/badge/code_style-xo-cyan)](https://github.com/xojs/xo)
@@ -25,10 +25,10 @@ npm install @sp-api-sdk/catalog-items-api-v0
25
25
  import {SellingPartnerApiAuth} from '@sp-api-sdk/auth'
26
26
  import {CatalogItemsApiClient} from '@sp-api-sdk/catalog-items-api-v0'
27
27
 
28
+ // `clientId` and `clientSecret` default to the `LWA_CLIENT_ID` and
29
+ // `LWA_CLIENT_SECRET` environment variables.
28
30
  const auth = new SellingPartnerApiAuth({
29
- clientId: process.env.LWA_CLIENT_ID,
30
- clientSecret: process.env.LWA_CLIENT_SECRET,
31
- refreshToken: 'Atzr|…',
31
+ refreshToken: await getRefreshTokenForSeller(sellerId),
32
32
  })
33
33
 
34
34
  const client = new CatalogItemsApiClient({
package/dist/index.cjs ADDED
@@ -0,0 +1,310 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ CatalogItemsApi: () => CatalogItemsApi,
34
+ CatalogItemsApiAxiosParamCreator: () => CatalogItemsApiAxiosParamCreator,
35
+ CatalogItemsApiClient: () => CatalogItemsApiClient,
36
+ CatalogItemsApiFactory: () => CatalogItemsApiFactory,
37
+ CatalogItemsApiFp: () => CatalogItemsApiFp,
38
+ clientRateLimits: () => clientRateLimits
39
+ });
40
+ module.exports = __toCommonJS(index_exports);
41
+
42
+ // src/client.ts
43
+ var import_common2 = require("@sp-api-sdk/common");
44
+
45
+ // src/api-model/api/catalog-items-api.ts
46
+ var import_axios2 = __toESM(require("axios"), 1);
47
+
48
+ // src/api-model/base.ts
49
+ var import_axios = __toESM(require("axios"), 1);
50
+ var BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
51
+ var BaseAPI = class {
52
+ constructor(configuration, basePath = BASE_PATH, axios = import_axios.default) {
53
+ this.basePath = basePath;
54
+ this.axios = axios;
55
+ if (configuration) {
56
+ this.configuration = configuration;
57
+ this.basePath = configuration.basePath ?? basePath;
58
+ }
59
+ }
60
+ basePath;
61
+ axios;
62
+ configuration;
63
+ };
64
+ var RequiredError = class extends Error {
65
+ constructor(field, msg) {
66
+ super(msg);
67
+ this.field = field;
68
+ this.name = "RequiredError";
69
+ }
70
+ field;
71
+ };
72
+ var operationServerMap = {};
73
+
74
+ // src/api-model/common.ts
75
+ var DUMMY_BASE_URL = "https://example.com";
76
+ var assertParamExists = function(functionName, paramName, paramValue) {
77
+ if (paramValue === null || paramValue === void 0) {
78
+ throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
79
+ }
80
+ };
81
+ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
82
+ if (parameter == null) return;
83
+ if (typeof parameter === "object") {
84
+ if (Array.isArray(parameter) || parameter instanceof Set) {
85
+ parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
86
+ } else {
87
+ Object.keys(parameter).forEach(
88
+ (currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
89
+ );
90
+ }
91
+ } else {
92
+ if (urlSearchParams.has(key)) {
93
+ urlSearchParams.append(key, parameter);
94
+ } else {
95
+ urlSearchParams.set(key, parameter);
96
+ }
97
+ }
98
+ }
99
+ var setSearchParams = function(url, ...objects) {
100
+ const searchParams = new URLSearchParams(url.search);
101
+ setFlattenedQueryParams(searchParams, objects);
102
+ url.search = searchParams.toString();
103
+ };
104
+ var toPathString = function(url) {
105
+ return url.pathname + url.search + url.hash;
106
+ };
107
+ var createRequestFunction = function(axiosArgs, globalAxios3, BASE_PATH2, configuration) {
108
+ return (axios = globalAxios3, basePath = BASE_PATH2) => {
109
+ const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url };
110
+ return axios.request(axiosRequestArgs);
111
+ };
112
+ };
113
+
114
+ // src/api-model/api/catalog-items-api.ts
115
+ var CatalogItemsApiAxiosParamCreator = function(configuration) {
116
+ return {
117
+ /**
118
+ * Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 2 | 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, see [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).
119
+ * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for the item.
120
+ * @param {string} [aSIN] The Amazon Standard Identification Number (ASIN) of the item.
121
+ * @param {string} [sellerSKU] Used to identify items in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit.
122
+ * @param {*} [options] Override http request option.
123
+ * @throws {RequiredError}
124
+ */
125
+ listCatalogCategories: async (marketplaceId, aSIN, sellerSKU, options = {}) => {
126
+ assertParamExists("listCatalogCategories", "marketplaceId", marketplaceId);
127
+ const localVarPath = `/catalog/v0/categories`;
128
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
129
+ let baseOptions;
130
+ if (configuration) {
131
+ baseOptions = configuration.baseOptions;
132
+ }
133
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
134
+ const localVarHeaderParameter = {};
135
+ const localVarQueryParameter = {};
136
+ if (marketplaceId !== void 0) {
137
+ localVarQueryParameter["MarketplaceId"] = marketplaceId;
138
+ }
139
+ if (aSIN !== void 0) {
140
+ localVarQueryParameter["ASIN"] = aSIN;
141
+ }
142
+ if (sellerSKU !== void 0) {
143
+ localVarQueryParameter["SellerSKU"] = sellerSKU;
144
+ }
145
+ localVarHeaderParameter["Accept"] = "application/json";
146
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
147
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
148
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
149
+ return {
150
+ url: toPathString(localVarUrlObj),
151
+ options: localVarRequestOptions
152
+ };
153
+ }
154
+ };
155
+ };
156
+ var CatalogItemsApiFp = function(configuration) {
157
+ const localVarAxiosParamCreator = CatalogItemsApiAxiosParamCreator(configuration);
158
+ return {
159
+ /**
160
+ * Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 2 | 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, see [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).
161
+ * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for the item.
162
+ * @param {string} [aSIN] The Amazon Standard Identification Number (ASIN) of the item.
163
+ * @param {string} [sellerSKU] Used to identify items in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit.
164
+ * @param {*} [options] Override http request option.
165
+ * @throws {RequiredError}
166
+ */
167
+ async listCatalogCategories(marketplaceId, aSIN, sellerSKU, options) {
168
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listCatalogCategories(marketplaceId, aSIN, sellerSKU, options);
169
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
170
+ const localVarOperationServerBasePath = operationServerMap["CatalogItemsApi.listCatalogCategories"]?.[localVarOperationServerIndex]?.url;
171
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
172
+ }
173
+ };
174
+ };
175
+ var CatalogItemsApiFactory = function(configuration, basePath, axios) {
176
+ const localVarFp = CatalogItemsApiFp(configuration);
177
+ return {
178
+ /**
179
+ * Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 2 | 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, see [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).
180
+ * @param {CatalogItemsApiListCatalogCategoriesRequest} requestParameters Request parameters.
181
+ * @param {*} [options] Override http request option.
182
+ * @throws {RequiredError}
183
+ */
184
+ listCatalogCategories(requestParameters, options) {
185
+ return localVarFp.listCatalogCategories(requestParameters.marketplaceId, requestParameters.aSIN, requestParameters.sellerSKU, options).then((request) => request(axios, basePath));
186
+ }
187
+ };
188
+ };
189
+ var CatalogItemsApi = class extends BaseAPI {
190
+ /**
191
+ * Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 2 | 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, see [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).
192
+ * @param {CatalogItemsApiListCatalogCategoriesRequest} requestParameters Request parameters.
193
+ * @param {*} [options] Override http request option.
194
+ * @throws {RequiredError}
195
+ */
196
+ listCatalogCategories(requestParameters, options) {
197
+ return CatalogItemsApiFp(this.configuration).listCatalogCategories(requestParameters.marketplaceId, requestParameters.aSIN, requestParameters.sellerSKU, options).then((request) => request(this.axios, this.basePath));
198
+ }
199
+ };
200
+
201
+ // src/api-model/configuration.ts
202
+ var Configuration = class {
203
+ /**
204
+ * parameter for apiKey security
205
+ * @param name security name
206
+ */
207
+ apiKey;
208
+ /**
209
+ * parameter for basic security
210
+ */
211
+ username;
212
+ /**
213
+ * parameter for basic security
214
+ */
215
+ password;
216
+ /**
217
+ * parameter for oauth2 security
218
+ * @param name security name
219
+ * @param scopes oauth2 scope
220
+ */
221
+ accessToken;
222
+ /**
223
+ * parameter for aws4 signature security
224
+ * @param {Object} AWS4Signature - AWS4 Signature security
225
+ * @param {string} options.region - aws region
226
+ * @param {string} options.service - name of the service.
227
+ * @param {string} credentials.accessKeyId - aws access key id
228
+ * @param {string} credentials.secretAccessKey - aws access key
229
+ * @param {string} credentials.sessionToken - aws session token
230
+ * @memberof Configuration
231
+ */
232
+ awsv4;
233
+ /**
234
+ * override base path
235
+ */
236
+ basePath;
237
+ /**
238
+ * override server index
239
+ */
240
+ serverIndex;
241
+ /**
242
+ * base options for axios calls
243
+ */
244
+ baseOptions;
245
+ /**
246
+ * The FormData constructor that will be used to create multipart form data
247
+ * requests. You can inject this here so that execution environments that
248
+ * do not support the FormData class can still run the generated client.
249
+ *
250
+ * @type {new () => FormData}
251
+ */
252
+ formDataCtor;
253
+ constructor(param = {}) {
254
+ this.apiKey = param.apiKey;
255
+ this.username = param.username;
256
+ this.password = param.password;
257
+ this.accessToken = param.accessToken;
258
+ this.awsv4 = param.awsv4;
259
+ this.basePath = param.basePath;
260
+ this.serverIndex = param.serverIndex;
261
+ this.baseOptions = {
262
+ ...param.baseOptions,
263
+ headers: {
264
+ ...param.baseOptions?.headers
265
+ }
266
+ };
267
+ this.formDataCtor = param.formDataCtor;
268
+ }
269
+ /**
270
+ * Check if the given MIME is a JSON MIME.
271
+ * JSON MIME examples:
272
+ * application/json
273
+ * application/json; charset=UTF8
274
+ * APPLICATION/JSON
275
+ * application/vnd.company+json
276
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
277
+ * @return True if the given MIME is JSON, false otherwise.
278
+ */
279
+ isJsonMime(mime) {
280
+ const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
281
+ return mime !== null && jsonMime.test(mime);
282
+ }
283
+ };
284
+
285
+ // src/client.ts
286
+ var clientRateLimits = [
287
+ {
288
+ method: "get",
289
+ // eslint-disable-next-line prefer-regex-literals
290
+ urlRegex: new RegExp("^/catalog/v0/categories$"),
291
+ rate: 1,
292
+ burst: 2
293
+ }
294
+ ];
295
+ var CatalogItemsApiClient = class extends CatalogItemsApi {
296
+ constructor(configuration) {
297
+ const { axios, endpoint } = (0, import_common2.createAxiosInstance)(configuration, clientRateLimits);
298
+ super(new Configuration(), endpoint, axios);
299
+ }
300
+ };
301
+ // Annotate the CommonJS export names for ESM import in node:
302
+ 0 && (module.exports = {
303
+ CatalogItemsApi,
304
+ CatalogItemsApiAxiosParamCreator,
305
+ CatalogItemsApiClient,
306
+ CatalogItemsApiFactory,
307
+ CatalogItemsApiFp,
308
+ clientRateLimits
309
+ });
310
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/client.ts","../src/api-model/api/catalog-items-api.ts","../src/api-model/base.ts","../src/api-model/common.ts","../src/api-model/configuration.ts"],"sourcesContent":["export * from './client.js'\nexport * from './api-model/api.js'\nexport type * from './api-model/models/index.js'\n","import {type ClientConfiguration, createAxiosInstance, type RateLimit} from '@sp-api-sdk/common'\n\nimport {CatalogItemsApi, Configuration} from './api-model/index.js'\n\nexport const clientRateLimits: RateLimit[] = [\n {\n method: 'get',\n // eslint-disable-next-line prefer-regex-literals\n urlRegex: new RegExp('^/catalog/v0/categories$'),\n rate: 1,\n burst: 2,\n },\n]\n\nexport class CatalogItemsApiClient extends CatalogItemsApi {\n constructor(configuration: ClientConfiguration) {\n const {axios, endpoint} = createAxiosInstance(configuration, clientRateLimits)\n\n super(new Configuration(), endpoint, axios)\n }\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * Selling Partner API for Catalog Items\n * The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.\n *\n * The version of the OpenAPI document: v0\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nimport type { Configuration } from '../configuration.js';\nimport type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';\nimport globalAxios from 'axios';\n// Some imports not used depending on template conditions\n// @ts-ignore\nimport { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common.js';\n// @ts-ignore\nimport { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base.js';\n// @ts-ignore\nimport type { ListCatalogCategoriesResponse } from '../models/index.js';\n/**\n * CatalogItemsApi - axios parameter creator\n */\nexport const CatalogItemsApiAxiosParamCreator = function (configuration?: Configuration) {\n return {\n /**\n * Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 2 | 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, see [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).\n * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for the item.\n * @param {string} [aSIN] The Amazon Standard Identification Number (ASIN) of the item.\n * @param {string} [sellerSKU] Used to identify items in the given marketplace. SellerSKU is qualified by the seller\\&#39;s SellerId, which is included with every operation that you submit.\n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n listCatalogCategories: async (marketplaceId: string, aSIN?: string, sellerSKU?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {\n // verify required parameter 'marketplaceId' is not null or undefined\n assertParamExists('listCatalogCategories', 'marketplaceId', marketplaceId)\n const localVarPath = `/catalog/v0/categories`;\n // use dummy base URL string because the URL constructor only accepts absolute URLs.\n const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);\n let baseOptions;\n if (configuration) {\n baseOptions = configuration.baseOptions;\n }\n\n const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};\n const localVarHeaderParameter = {} as any;\n const localVarQueryParameter = {} as any;\n\n if (marketplaceId !== undefined) {\n localVarQueryParameter['MarketplaceId'] = marketplaceId;\n }\n\n if (aSIN !== undefined) {\n localVarQueryParameter['ASIN'] = aSIN;\n }\n\n if (sellerSKU !== undefined) {\n localVarQueryParameter['SellerSKU'] = sellerSKU;\n }\n\n localVarHeaderParameter['Accept'] = 'application/json';\n\n setSearchParams(localVarUrlObj, localVarQueryParameter);\n let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};\n\n return {\n url: toPathString(localVarUrlObj),\n options: localVarRequestOptions,\n };\n },\n }\n};\n\n/**\n * CatalogItemsApi - functional programming interface\n */\nexport const CatalogItemsApiFp = function(configuration?: Configuration) {\n const localVarAxiosParamCreator = CatalogItemsApiAxiosParamCreator(configuration)\n return {\n /**\n * Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 2 | 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, see [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).\n * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for the item.\n * @param {string} [aSIN] The Amazon Standard Identification Number (ASIN) of the item.\n * @param {string} [sellerSKU] Used to identify items in the given marketplace. SellerSKU is qualified by the seller\\&#39;s SellerId, which is included with every operation that you submit.\n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n async listCatalogCategories(marketplaceId: string, aSIN?: string, sellerSKU?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListCatalogCategoriesResponse>> {\n const localVarAxiosArgs = await localVarAxiosParamCreator.listCatalogCategories(marketplaceId, aSIN, sellerSKU, options);\n const localVarOperationServerIndex = configuration?.serverIndex ?? 0;\n const localVarOperationServerBasePath = operationServerMap['CatalogItemsApi.listCatalogCategories']?.[localVarOperationServerIndex]?.url;\n return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);\n },\n }\n};\n\n/**\n * CatalogItemsApi - factory interface\n */\nexport const CatalogItemsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {\n const localVarFp = CatalogItemsApiFp(configuration)\n return {\n /**\n * Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 2 | 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, see [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).\n * @param {CatalogItemsApiListCatalogCategoriesRequest} requestParameters Request parameters.\n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n listCatalogCategories(requestParameters: CatalogItemsApiListCatalogCategoriesRequest, options?: RawAxiosRequestConfig): AxiosPromise<ListCatalogCategoriesResponse> {\n return localVarFp.listCatalogCategories(requestParameters.marketplaceId, requestParameters.aSIN, requestParameters.sellerSKU, options).then((request) => request(axios, basePath));\n },\n };\n};\n\n/**\n * Request parameters for listCatalogCategories operation in CatalogItemsApi.\n */\nexport interface CatalogItemsApiListCatalogCategoriesRequest {\n /**\n * A marketplace identifier. Specifies the marketplace for the item.\n */\n readonly marketplaceId: string\n\n /**\n * The Amazon Standard Identification Number (ASIN) of the item.\n */\n readonly aSIN?: string\n\n /**\n * Used to identify items in the given marketplace. SellerSKU is qualified by the seller\\&#39;s SellerId, which is included with every operation that you submit.\n */\n readonly sellerSKU?: string\n}\n\n/**\n * CatalogItemsApi - object-oriented interface\n */\nexport class CatalogItemsApi extends BaseAPI {\n /**\n * Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 2 | 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, see [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).\n * @param {CatalogItemsApiListCatalogCategoriesRequest} requestParameters Request parameters.\n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n public listCatalogCategories(requestParameters: CatalogItemsApiListCatalogCategoriesRequest, options?: RawAxiosRequestConfig) {\n return CatalogItemsApiFp(this.configuration).listCatalogCategories(requestParameters.marketplaceId, requestParameters.aSIN, requestParameters.sellerSKU, options).then((request) => request(this.axios, this.basePath));\n }\n}\n\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * Selling Partner API for Catalog Items\n * The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.\n *\n * The version of the OpenAPI document: v0\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nimport type { Configuration } from './configuration.js';\n// Some imports not used depending on template conditions\n// @ts-ignore\nimport type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';\nimport globalAxios from 'axios';\n\nexport const BASE_PATH = \"https://sellingpartnerapi-na.amazon.com\".replace(/\\/+$/, \"\");\n\nexport const COLLECTION_FORMATS = {\n csv: \",\",\n ssv: \" \",\n tsv: \"\\t\",\n pipes: \"|\",\n};\n\nexport interface RequestArgs {\n url: string;\n options: RawAxiosRequestConfig;\n}\n\nexport class BaseAPI {\n protected configuration: Configuration | undefined;\n\n constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {\n if (configuration) {\n this.configuration = configuration;\n this.basePath = configuration.basePath ?? basePath;\n }\n }\n};\n\nexport class RequiredError extends Error {\n constructor(public field: string, msg?: string) {\n super(msg);\n this.name = \"RequiredError\"\n }\n}\n\ninterface ServerMap {\n [key: string]: {\n url: string,\n description: string,\n }[];\n}\n\nexport const operationServerMap: ServerMap = {\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * Selling Partner API for Catalog Items\n * The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.\n *\n * The version of the OpenAPI document: v0\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport type { Configuration } from \"./configuration.js\";\nimport type { RequestArgs } from \"./base.js\";\nimport type { AxiosInstance, AxiosResponse } from 'axios';\nimport { RequiredError } from \"./base.js\";\n\nexport const DUMMY_BASE_URL = 'https://example.com'\n\n/**\n *\n * @throws {RequiredError}\n */\nexport const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {\n if (paramValue === null || paramValue === undefined) {\n throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);\n }\n}\n\nexport const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {\n if (configuration && configuration.apiKey) {\n const localVarApiKeyValue = typeof configuration.apiKey === 'function'\n ? await configuration.apiKey(keyParamName)\n : await configuration.apiKey;\n object[keyParamName] = localVarApiKeyValue;\n }\n}\n\nexport const setBasicAuthToObject = function (object: any, configuration?: Configuration) {\n if (configuration && (configuration.username || configuration.password)) {\n object[\"auth\"] = { username: configuration.username, password: configuration.password };\n }\n}\n\nexport const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {\n if (configuration && configuration.accessToken) {\n const accessToken = typeof configuration.accessToken === 'function'\n ? await configuration.accessToken()\n : await configuration.accessToken;\n object[\"Authorization\"] = \"Bearer \" + accessToken;\n }\n}\n\nexport const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {\n if (configuration && configuration.accessToken) {\n const localVarAccessTokenValue = typeof configuration.accessToken === 'function'\n ? await configuration.accessToken(name, scopes)\n : await configuration.accessToken;\n object[\"Authorization\"] = \"Bearer \" + localVarAccessTokenValue;\n }\n}\n\n\nfunction setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = \"\"): void {\n if (parameter == null) return;\n if (typeof parameter === \"object\") {\n if (Array.isArray(parameter) || parameter instanceof Set) {\n (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));\n }\n else {\n Object.keys(parameter).forEach(currentKey =>\n setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`)\n );\n }\n }\n else {\n if (urlSearchParams.has(key)) {\n urlSearchParams.append(key, parameter);\n }\n else {\n urlSearchParams.set(key, parameter);\n }\n }\n}\n\nexport const setSearchParams = function (url: URL, ...objects: any[]) {\n const searchParams = new URLSearchParams(url.search);\n setFlattenedQueryParams(searchParams, objects);\n url.search = searchParams.toString();\n}\n\n/**\n * JSON serialization helper function which replaces instances of unserializable types with serializable ones.\n * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.\n * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.\n */\n// @ts-ignore\nexport const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {\n if (value instanceof Set) {\n return Array.from(value);\n } else {\n return value;\n }\n}\n\nexport const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {\n const nonString = typeof value !== 'string';\n const needsSerialization = nonString && configuration && configuration.isJsonMime\n ? configuration.isJsonMime(requestOptions.headers['Content-Type'])\n : nonString;\n return needsSerialization\n ? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded)\n : (value || \"\");\n}\n\nexport const toPathString = function (url: URL) {\n return url.pathname + url.search + url.hash\n}\n\nexport const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {\n return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {\n const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url};\n return axios.request<T, R>(axiosRequestArgs);\n };\n}\n","/* tslint:disable */\n/**\n * Selling Partner API for Catalog Items\n * The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.\n *\n * The version of the OpenAPI document: v0\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\ninterface AWSv4Configuration {\n options?: {\n region?: string\n service?: string\n }\n credentials?: {\n accessKeyId?: string\n secretAccessKey?: string,\n sessionToken?: string\n }\n}\n\nexport interface ConfigurationParameters {\n apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);\n username?: string;\n password?: string;\n accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);\n awsv4?: AWSv4Configuration;\n basePath?: string;\n serverIndex?: number;\n baseOptions?: any;\n formDataCtor?: new () => any;\n}\n\nexport class Configuration {\n /**\n * parameter for apiKey security\n * @param name security name\n */\n apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);\n /**\n * parameter for basic security\n */\n username?: string;\n /**\n * parameter for basic security\n */\n password?: string;\n /**\n * parameter for oauth2 security\n * @param name security name\n * @param scopes oauth2 scope\n */\n accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);\n /**\n * parameter for aws4 signature security\n * @param {Object} AWS4Signature - AWS4 Signature security\n * @param {string} options.region - aws region\n * @param {string} options.service - name of the service.\n * @param {string} credentials.accessKeyId - aws access key id\n * @param {string} credentials.secretAccessKey - aws access key\n * @param {string} credentials.sessionToken - aws session token\n * @memberof Configuration\n */\n awsv4?: AWSv4Configuration;\n /**\n * override base path\n */\n basePath?: string;\n /**\n * override server index\n */\n serverIndex?: number;\n /**\n * base options for axios calls\n */\n baseOptions?: any;\n /**\n * The FormData constructor that will be used to create multipart form data\n * requests. You can inject this here so that execution environments that\n * do not support the FormData class can still run the generated client.\n *\n * @type {new () => FormData}\n */\n formDataCtor?: new () => any;\n\n constructor(param: ConfigurationParameters = {}) {\n this.apiKey = param.apiKey;\n this.username = param.username;\n this.password = param.password;\n this.accessToken = param.accessToken;\n this.awsv4 = param.awsv4;\n this.basePath = param.basePath;\n this.serverIndex = param.serverIndex;\n this.baseOptions = {\n ...param.baseOptions,\n headers: {\n ...param.baseOptions?.headers,\n },\n };\n this.formDataCtor = param.formDataCtor;\n }\n\n /**\n * Check if the given MIME is a JSON MIME.\n * JSON MIME examples:\n * application/json\n * application/json; charset=UTF8\n * APPLICATION/JSON\n * application/vnd.company+json\n * @param mime - MIME (Multipurpose Internet Mail Extensions)\n * @return True if the given MIME is JSON, false otherwise.\n */\n public isJsonMime(mime: string): boolean {\n const jsonMime: RegExp = /^(application\\/json|[^;/ \\t]+\\/[^;/ \\t]+[+]json)[ \\t]*(;.*)?$/i;\n return mime !== null && jsonMime.test(mime);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,iBAA4E;;;ACiB5E,IAAAC,gBAAwB;;;ACExB,mBAAwB;AAEjB,IAAM,YAAY,0CAA0C,QAAQ,QAAQ,EAAE;AAc9E,IAAM,UAAN,MAAc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ios","BASE_PATH","globalAxios"]}
@@ -0,0 +1,276 @@
1
+ import { ClientConfiguration, RateLimit } from '@sp-api-sdk/common';
2
+ import * as axios from 'axios';
3
+ import { AxiosInstance, RawAxiosRequestConfig, AxiosPromise } from 'axios';
4
+
5
+ /**
6
+ * Selling Partner API for Catalog Items
7
+ * The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
8
+ *
9
+ * The version of the OpenAPI document: v0
10
+ *
11
+ *
12
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
13
+ * https://openapi-generator.tech
14
+ * Do not edit the class manually.
15
+ */
16
+ interface AWSv4Configuration {
17
+ options?: {
18
+ region?: string;
19
+ service?: string;
20
+ };
21
+ credentials?: {
22
+ accessKeyId?: string;
23
+ secretAccessKey?: string;
24
+ sessionToken?: string;
25
+ };
26
+ }
27
+ interface ConfigurationParameters {
28
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
29
+ username?: string;
30
+ password?: string;
31
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
32
+ awsv4?: AWSv4Configuration;
33
+ basePath?: string;
34
+ serverIndex?: number;
35
+ baseOptions?: any;
36
+ formDataCtor?: new () => any;
37
+ }
38
+ declare class Configuration {
39
+ /**
40
+ * parameter for apiKey security
41
+ * @param name security name
42
+ */
43
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
44
+ /**
45
+ * parameter for basic security
46
+ */
47
+ username?: string;
48
+ /**
49
+ * parameter for basic security
50
+ */
51
+ password?: string;
52
+ /**
53
+ * parameter for oauth2 security
54
+ * @param name security name
55
+ * @param scopes oauth2 scope
56
+ */
57
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
58
+ /**
59
+ * parameter for aws4 signature security
60
+ * @param {Object} AWS4Signature - AWS4 Signature security
61
+ * @param {string} options.region - aws region
62
+ * @param {string} options.service - name of the service.
63
+ * @param {string} credentials.accessKeyId - aws access key id
64
+ * @param {string} credentials.secretAccessKey - aws access key
65
+ * @param {string} credentials.sessionToken - aws session token
66
+ * @memberof Configuration
67
+ */
68
+ awsv4?: AWSv4Configuration;
69
+ /**
70
+ * override base path
71
+ */
72
+ basePath?: string;
73
+ /**
74
+ * override server index
75
+ */
76
+ serverIndex?: number;
77
+ /**
78
+ * base options for axios calls
79
+ */
80
+ baseOptions?: any;
81
+ /**
82
+ * The FormData constructor that will be used to create multipart form data
83
+ * requests. You can inject this here so that execution environments that
84
+ * do not support the FormData class can still run the generated client.
85
+ *
86
+ * @type {new () => FormData}
87
+ */
88
+ formDataCtor?: new () => any;
89
+ constructor(param?: ConfigurationParameters);
90
+ /**
91
+ * Check if the given MIME is a JSON MIME.
92
+ * JSON MIME examples:
93
+ * application/json
94
+ * application/json; charset=UTF8
95
+ * APPLICATION/JSON
96
+ * application/vnd.company+json
97
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
98
+ * @return True if the given MIME is JSON, false otherwise.
99
+ */
100
+ isJsonMime(mime: string): boolean;
101
+ }
102
+
103
+ /**
104
+ * Selling Partner API for Catalog Items
105
+ * The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
106
+ *
107
+ * The version of the OpenAPI document: v0
108
+ *
109
+ *
110
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
111
+ * https://openapi-generator.tech
112
+ * Do not edit the class manually.
113
+ */
114
+
115
+ interface RequestArgs {
116
+ url: string;
117
+ options: RawAxiosRequestConfig;
118
+ }
119
+ declare class BaseAPI {
120
+ protected basePath: string;
121
+ protected axios: AxiosInstance;
122
+ protected configuration: Configuration | undefined;
123
+ constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
124
+ }
125
+
126
+ /**
127
+ * Selling Partner API for Catalog Items
128
+ * The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
129
+ *
130
+ * The version of the OpenAPI document: v0
131
+ *
132
+ *
133
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
134
+ * https://openapi-generator.tech
135
+ * Do not edit the class manually.
136
+ */
137
+ interface Categories {
138
+ /**
139
+ * The identifier for the product category (or browse node).
140
+ */
141
+ 'ProductCategoryId'?: string;
142
+ /**
143
+ * The name of the product category (or browse node).
144
+ */
145
+ 'ProductCategoryName'?: string;
146
+ /**
147
+ * The parent product category.
148
+ */
149
+ 'parent'?: object;
150
+ }
151
+
152
+ /**
153
+ * Selling Partner API for Catalog Items
154
+ * The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
155
+ *
156
+ * The version of the OpenAPI document: v0
157
+ *
158
+ *
159
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
160
+ * https://openapi-generator.tech
161
+ * Do not edit the class manually.
162
+ */
163
+
164
+ interface ListCatalogCategoriesResponse {
165
+ 'payload'?: Array<Categories>;
166
+ /**
167
+ * A list of error responses returned when a request is unsuccessful.
168
+ */
169
+ 'errors'?: Array<Error>;
170
+ }
171
+
172
+ /**
173
+ * Selling Partner API for Catalog Items
174
+ * The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
175
+ *
176
+ * The version of the OpenAPI document: v0
177
+ *
178
+ *
179
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
180
+ * https://openapi-generator.tech
181
+ * Do not edit the class manually.
182
+ */
183
+ /**
184
+ * Error response returned when the request is unsuccessful.
185
+ */
186
+ interface ModelError {
187
+ /**
188
+ * An error code that identifies the type of error that occurred.
189
+ */
190
+ 'code': string;
191
+ /**
192
+ * A message that describes the error condition in a human-readable form.
193
+ */
194
+ 'message': string;
195
+ /**
196
+ * Additional information that can help the caller understand or fix the issue.
197
+ */
198
+ 'details'?: string;
199
+ }
200
+
201
+ /**
202
+ * CatalogItemsApi - axios parameter creator
203
+ */
204
+ declare const CatalogItemsApiAxiosParamCreator: (configuration?: Configuration) => {
205
+ /**
206
+ * Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 2 | 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, see [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).
207
+ * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for the item.
208
+ * @param {string} [aSIN] The Amazon Standard Identification Number (ASIN) of the item.
209
+ * @param {string} [sellerSKU] Used to identify items in the given marketplace. SellerSKU is qualified by the seller\&#39;s SellerId, which is included with every operation that you submit.
210
+ * @param {*} [options] Override http request option.
211
+ * @throws {RequiredError}
212
+ */
213
+ listCatalogCategories: (marketplaceId: string, aSIN?: string, sellerSKU?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
214
+ };
215
+ /**
216
+ * CatalogItemsApi - functional programming interface
217
+ */
218
+ declare const CatalogItemsApiFp: (configuration?: Configuration) => {
219
+ /**
220
+ * Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 2 | 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, see [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).
221
+ * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for the item.
222
+ * @param {string} [aSIN] The Amazon Standard Identification Number (ASIN) of the item.
223
+ * @param {string} [sellerSKU] Used to identify items in the given marketplace. SellerSKU is qualified by the seller\&#39;s SellerId, which is included with every operation that you submit.
224
+ * @param {*} [options] Override http request option.
225
+ * @throws {RequiredError}
226
+ */
227
+ listCatalogCategories(marketplaceId: string, aSIN?: string, sellerSKU?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListCatalogCategoriesResponse>>;
228
+ };
229
+ /**
230
+ * CatalogItemsApi - factory interface
231
+ */
232
+ declare const CatalogItemsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
233
+ /**
234
+ * Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 2 | 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, see [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).
235
+ * @param {CatalogItemsApiListCatalogCategoriesRequest} requestParameters Request parameters.
236
+ * @param {*} [options] Override http request option.
237
+ * @throws {RequiredError}
238
+ */
239
+ listCatalogCategories(requestParameters: CatalogItemsApiListCatalogCategoriesRequest, options?: RawAxiosRequestConfig): AxiosPromise<ListCatalogCategoriesResponse>;
240
+ };
241
+ /**
242
+ * Request parameters for listCatalogCategories operation in CatalogItemsApi.
243
+ */
244
+ interface CatalogItemsApiListCatalogCategoriesRequest {
245
+ /**
246
+ * A marketplace identifier. Specifies the marketplace for the item.
247
+ */
248
+ readonly marketplaceId: string;
249
+ /**
250
+ * The Amazon Standard Identification Number (ASIN) of the item.
251
+ */
252
+ readonly aSIN?: string;
253
+ /**
254
+ * Used to identify items in the given marketplace. SellerSKU is qualified by the seller\&#39;s SellerId, which is included with every operation that you submit.
255
+ */
256
+ readonly sellerSKU?: string;
257
+ }
258
+ /**
259
+ * CatalogItemsApi - object-oriented interface
260
+ */
261
+ declare class CatalogItemsApi extends BaseAPI {
262
+ /**
263
+ * Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 2 | 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, see [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).
264
+ * @param {CatalogItemsApiListCatalogCategoriesRequest} requestParameters Request parameters.
265
+ * @param {*} [options] Override http request option.
266
+ * @throws {RequiredError}
267
+ */
268
+ listCatalogCategories(requestParameters: CatalogItemsApiListCatalogCategoriesRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<ListCatalogCategoriesResponse, any, {}>>;
269
+ }
270
+
271
+ declare const clientRateLimits: RateLimit[];
272
+ declare class CatalogItemsApiClient extends CatalogItemsApi {
273
+ constructor(configuration: ClientConfiguration);
274
+ }
275
+
276
+ export { CatalogItemsApi, CatalogItemsApiAxiosParamCreator, CatalogItemsApiClient, CatalogItemsApiFactory, CatalogItemsApiFp, type CatalogItemsApiListCatalogCategoriesRequest, type Categories, type ListCatalogCategoriesResponse, type ModelError, clientRateLimits };