@sp-api-sdk/catalog-items-api-2022-04-01 4.2.12 → 5.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 (122) hide show
  1. package/README.md +7 -8
  2. package/dist/index.cjs +479 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +1132 -0
  5. package/dist/index.d.ts +1132 -0
  6. package/dist/index.js +443 -0
  7. package/dist/index.js.map +1 -0
  8. package/package.json +26 -12
  9. package/dist/cjs/api-model/api/catalog-items-api.js +0 -283
  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/brand-refinement.js +0 -15
  16. package/dist/cjs/api-model/models/classification-refinement.js +0 -15
  17. package/dist/cjs/api-model/models/dimension.js +0 -15
  18. package/dist/cjs/api-model/models/dimensions.js +0 -15
  19. package/dist/cjs/api-model/models/error-list.js +0 -15
  20. package/dist/cjs/api-model/models/index.js +0 -45
  21. package/dist/cjs/api-model/models/item-browse-classification.js +0 -15
  22. package/dist/cjs/api-model/models/item-browse-classifications-by-marketplace.js +0 -15
  23. package/dist/cjs/api-model/models/item-classification-sales-rank.js +0 -15
  24. package/dist/cjs/api-model/models/item-contributor-role.js +0 -15
  25. package/dist/cjs/api-model/models/item-contributor.js +0 -15
  26. package/dist/cjs/api-model/models/item-dimensions-by-marketplace.js +0 -15
  27. package/dist/cjs/api-model/models/item-display-group-sales-rank.js +0 -15
  28. package/dist/cjs/api-model/models/item-identifier.js +0 -15
  29. package/dist/cjs/api-model/models/item-identifiers-by-marketplace.js +0 -15
  30. package/dist/cjs/api-model/models/item-image.js +0 -28
  31. package/dist/cjs/api-model/models/item-images-by-marketplace.js +0 -15
  32. package/dist/cjs/api-model/models/item-product-type-by-marketplace.js +0 -15
  33. package/dist/cjs/api-model/models/item-relationship.js +0 -20
  34. package/dist/cjs/api-model/models/item-relationships-by-marketplace.js +0 -15
  35. package/dist/cjs/api-model/models/item-sales-ranks-by-marketplace.js +0 -15
  36. package/dist/cjs/api-model/models/item-search-results.js +0 -15
  37. package/dist/cjs/api-model/models/item-summary-by-marketplace.js +0 -22
  38. package/dist/cjs/api-model/models/item-variation-theme.js +0 -15
  39. package/dist/cjs/api-model/models/item-vendor-details-by-marketplace.js +0 -28
  40. package/dist/cjs/api-model/models/item-vendor-details-category.js +0 -15
  41. package/dist/cjs/api-model/models/item.js +0 -15
  42. package/dist/cjs/api-model/models/model-error.js +0 -15
  43. package/dist/cjs/api-model/models/pagination.js +0 -15
  44. package/dist/cjs/api-model/models/refinements.js +0 -15
  45. package/dist/cjs/client.js +0 -28
  46. package/dist/cjs/index.js +0 -19
  47. package/dist/es/api-model/api/catalog-items-api.js +0 -273
  48. package/dist/es/api-model/api.js +0 -14
  49. package/dist/es/api-model/base.js +0 -44
  50. package/dist/es/api-model/common.js +0 -110
  51. package/dist/es/api-model/configuration.js +0 -94
  52. package/dist/es/api-model/index.js +0 -16
  53. package/dist/es/api-model/models/brand-refinement.js +0 -14
  54. package/dist/es/api-model/models/classification-refinement.js +0 -14
  55. package/dist/es/api-model/models/dimension.js +0 -14
  56. package/dist/es/api-model/models/dimensions.js +0 -14
  57. package/dist/es/api-model/models/error-list.js +0 -14
  58. package/dist/es/api-model/models/index.js +0 -29
  59. package/dist/es/api-model/models/item-browse-classification.js +0 -14
  60. package/dist/es/api-model/models/item-browse-classifications-by-marketplace.js +0 -14
  61. package/dist/es/api-model/models/item-classification-sales-rank.js +0 -14
  62. package/dist/es/api-model/models/item-contributor-role.js +0 -14
  63. package/dist/es/api-model/models/item-contributor.js +0 -14
  64. package/dist/es/api-model/models/item-dimensions-by-marketplace.js +0 -14
  65. package/dist/es/api-model/models/item-display-group-sales-rank.js +0 -14
  66. package/dist/es/api-model/models/item-identifier.js +0 -14
  67. package/dist/es/api-model/models/item-identifiers-by-marketplace.js +0 -14
  68. package/dist/es/api-model/models/item-image.js +0 -25
  69. package/dist/es/api-model/models/item-images-by-marketplace.js +0 -14
  70. package/dist/es/api-model/models/item-product-type-by-marketplace.js +0 -14
  71. package/dist/es/api-model/models/item-relationship.js +0 -17
  72. package/dist/es/api-model/models/item-relationships-by-marketplace.js +0 -14
  73. package/dist/es/api-model/models/item-sales-ranks-by-marketplace.js +0 -14
  74. package/dist/es/api-model/models/item-search-results.js +0 -14
  75. package/dist/es/api-model/models/item-summary-by-marketplace.js +0 -19
  76. package/dist/es/api-model/models/item-variation-theme.js +0 -14
  77. package/dist/es/api-model/models/item-vendor-details-by-marketplace.js +0 -25
  78. package/dist/es/api-model/models/item-vendor-details-category.js +0 -14
  79. package/dist/es/api-model/models/item.js +0 -14
  80. package/dist/es/api-model/models/model-error.js +0 -14
  81. package/dist/es/api-model/models/pagination.js +0 -14
  82. package/dist/es/api-model/models/refinements.js +0 -14
  83. package/dist/es/client.js +0 -24
  84. package/dist/es/index.js +0 -3
  85. package/dist/types/api-model/api/catalog-items-api.d.ts +0 -232
  86. package/dist/types/api-model/api.d.ts +0 -12
  87. package/dist/types/api-model/base.d.ts +0 -42
  88. package/dist/types/api-model/common.d.ts +0 -34
  89. package/dist/types/api-model/configuration.d.ts +0 -98
  90. package/dist/types/api-model/index.d.ts +0 -14
  91. package/dist/types/api-model/models/brand-refinement.d.ts +0 -24
  92. package/dist/types/api-model/models/classification-refinement.d.ts +0 -28
  93. package/dist/types/api-model/models/dimension.d.ts +0 -24
  94. package/dist/types/api-model/models/dimensions.d.ts +0 -21
  95. package/dist/types/api-model/models/error-list.d.ts +0 -20
  96. package/dist/types/api-model/models/index.d.ts +0 -29
  97. package/dist/types/api-model/models/item-browse-classification.d.ts +0 -25
  98. package/dist/types/api-model/models/item-browse-classifications-by-marketplace.d.ts +0 -25
  99. package/dist/types/api-model/models/item-classification-sales-rank.d.ts +0 -32
  100. package/dist/types/api-model/models/item-contributor-role.d.ts +0 -24
  101. package/dist/types/api-model/models/item-contributor.d.ts +0 -22
  102. package/dist/types/api-model/models/item-dimensions-by-marketplace.d.ts +0 -23
  103. package/dist/types/api-model/models/item-display-group-sales-rank.d.ts +0 -32
  104. package/dist/types/api-model/models/item-identifier.d.ts +0 -24
  105. package/dist/types/api-model/models/item-identifiers-by-marketplace.d.ts +0 -25
  106. package/dist/types/api-model/models/item-image.d.ts +0 -45
  107. package/dist/types/api-model/models/item-images-by-marketplace.d.ts +0 -25
  108. package/dist/types/api-model/models/item-product-type-by-marketplace.d.ts +0 -24
  109. package/dist/types/api-model/models/item-relationship.d.ts +0 -35
  110. package/dist/types/api-model/models/item-relationships-by-marketplace.d.ts +0 -25
  111. package/dist/types/api-model/models/item-sales-ranks-by-marketplace.d.ts +0 -30
  112. package/dist/types/api-model/models/item-search-results.d.ts +0 -29
  113. package/dist/types/api-model/models/item-summary-by-marketplace.d.ts +0 -102
  114. package/dist/types/api-model/models/item-variation-theme.d.ts +0 -24
  115. package/dist/types/api-model/models/item-vendor-details-by-marketplace.d.ts +0 -56
  116. package/dist/types/api-model/models/item-vendor-details-category.d.ts +0 -24
  117. package/dist/types/api-model/models/item.d.ts +0 -71
  118. package/dist/types/api-model/models/model-error.d.ts +0 -28
  119. package/dist/types/api-model/models/pagination.d.ts +0 -24
  120. package/dist/types/api-model/models/refinements.d.ts +0 -26
  121. package/dist/types/client.d.ts +0 -6
  122. package/dist/types/index.d.ts +0 -3
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # `catalog-items-api-2022-04-01`
1
+ # `@sp-api-sdk/catalog-items-api-2022-04-01`
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@sp-api-sdk/catalog-items-api-2022-04-01)](https://www.npmjs.com/package/@sp-api-sdk/catalog-items-api-2022-04-01)
4
4
  [![XO code style](https://img.shields.io/badge/code_style-xo-cyan)](https://github.com/xojs/xo)
@@ -27,10 +27,10 @@ npm install @sp-api-sdk/catalog-items-api-2022-04-01
27
27
  import {SellingPartnerApiAuth} from '@sp-api-sdk/auth'
28
28
  import {CatalogItemsApiClient} from '@sp-api-sdk/catalog-items-api-2022-04-01'
29
29
 
30
+ // `clientId` and `clientSecret` default to the `LWA_CLIENT_ID` and
31
+ // `LWA_CLIENT_SECRET` environment variables.
30
32
  const auth = new SellingPartnerApiAuth({
31
- clientId: process.env.LWA_CLIENT_ID,
32
- clientSecret: process.env.LWA_CLIENT_SECRET,
33
- refreshToken: 'Atzr|…',
33
+ refreshToken: await getRefreshTokenForSeller(sellerId),
34
34
  })
35
35
 
36
36
  const client = new CatalogItemsApiClient({
@@ -69,10 +69,10 @@ const client = new CatalogItemsApiClient({
69
69
  region: 'eu',
70
70
  logging: {
71
71
  request: {
72
- logger: console.debug
72
+ logger: console.debug,
73
73
  },
74
74
  response: {
75
- logger: console.debug
75
+ logger: console.debug,
76
76
  },
77
77
  error: true,
78
78
  },
@@ -83,14 +83,13 @@ Specifying `true` will use the default options, specifying an object will allow
83
83
  This uses [axios-logger](https://github.com/hg-pyun/axios-logger) under the hood.
84
84
  By default, if enabled, the `request` and `response` loggers will use `console.info` and the `error` logger will use `console.error`.
85
85
 
86
-
87
86
  ## License
88
87
 
89
88
  MIT
90
89
 
91
90
  ## Miscellaneous
92
91
 
93
- ```
92
+ ```text
94
93
  ╚⊙ ⊙╝
95
94
  ╚═(███)═╝
96
95
  ╚═(███)═╝
package/dist/index.cjs ADDED
@@ -0,0 +1,479 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region \0rolldown/runtime.js
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
13
+ get: ((k) => from[k]).bind(null, key),
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
20
+ value: mod,
21
+ enumerable: true
22
+ }) : target, mod));
23
+ //#endregion
24
+ let _sp_api_sdk_common = require("@sp-api-sdk/common");
25
+ let axios = require("axios");
26
+ axios = __toESM(axios, 1);
27
+ //#region src/api-model/base.ts
28
+ const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
29
+ const COLLECTION_FORMATS = {
30
+ csv: ",",
31
+ ssv: " ",
32
+ tsv: " ",
33
+ pipes: "|"
34
+ };
35
+ var BaseAPI = class {
36
+ basePath;
37
+ axios;
38
+ configuration;
39
+ constructor(configuration, basePath = BASE_PATH, axios$4 = axios.default) {
40
+ this.basePath = basePath;
41
+ this.axios = axios$4;
42
+ if (configuration) {
43
+ this.configuration = configuration;
44
+ this.basePath = configuration.basePath ?? basePath;
45
+ }
46
+ }
47
+ };
48
+ var RequiredError = class extends Error {
49
+ field;
50
+ constructor(field, msg) {
51
+ super(msg);
52
+ this.field = field;
53
+ this.name = "RequiredError";
54
+ }
55
+ };
56
+ const operationServerMap = {};
57
+ //#endregion
58
+ //#region src/api-model/common.ts
59
+ const DUMMY_BASE_URL = "https://example.com";
60
+ /**
61
+ *
62
+ * @throws {RequiredError}
63
+ */
64
+ const assertParamExists = function(functionName, paramName, paramValue) {
65
+ if (paramValue === null || paramValue === void 0) throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
66
+ };
67
+ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
68
+ if (parameter == null) return;
69
+ if (typeof parameter === "object") if (Array.isArray(parameter) || parameter instanceof Set) parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
70
+ else Object.keys(parameter).forEach((currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`));
71
+ else if (urlSearchParams.has(key)) urlSearchParams.append(key, parameter);
72
+ else urlSearchParams.set(key, parameter);
73
+ }
74
+ const setSearchParams = function(url, ...objects) {
75
+ const searchParams = new URLSearchParams(url.search);
76
+ setFlattenedQueryParams(searchParams, objects);
77
+ url.search = searchParams.toString();
78
+ };
79
+ const toPathString = function(url) {
80
+ return url.pathname + url.search + url.hash;
81
+ };
82
+ const createRequestFunction = function(axiosArgs, globalAxios, BASE_PATH, configuration) {
83
+ return (axios = globalAxios, basePath = BASE_PATH) => {
84
+ const axiosRequestArgs = {
85
+ ...axiosArgs.options,
86
+ url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url
87
+ };
88
+ return axios.request(axiosRequestArgs);
89
+ };
90
+ };
91
+ //#endregion
92
+ //#region src/api-model/api/catalog-items-api.ts
93
+ /**
94
+ * CatalogItemsApi - axios parameter creator
95
+ */
96
+ const CatalogItemsApiAxiosParamCreator = function(configuration) {
97
+ return {
98
+ /**
99
+ * Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
100
+ * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item.
101
+ * @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
102
+ * @param {Array<GetCatalogItemIncludedDataEnum>} [includedData] A comma-delimited list of datasets to include in the response.
103
+ * @param {string} [locale] The locale for which you want to retrieve localized summaries. Defaults to the primary locale of the marketplace.
104
+ * @param {*} [options] Override http request option.
105
+ * @throws {RequiredError}
106
+ */
107
+ getCatalogItem: async (asin, marketplaceIds, includedData, locale, options = {}) => {
108
+ assertParamExists("getCatalogItem", "asin", asin);
109
+ assertParamExists("getCatalogItem", "marketplaceIds", marketplaceIds);
110
+ const localVarPath = `/catalog/2022-04-01/items/{asin}`.replace("{asin}", encodeURIComponent(String(asin)));
111
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
112
+ let baseOptions;
113
+ if (configuration) baseOptions = configuration.baseOptions;
114
+ const localVarRequestOptions = {
115
+ method: "GET",
116
+ ...baseOptions,
117
+ ...options
118
+ };
119
+ const localVarHeaderParameter = {};
120
+ const localVarQueryParameter = {};
121
+ if (marketplaceIds) localVarQueryParameter["marketplaceIds"] = marketplaceIds.join(COLLECTION_FORMATS.csv);
122
+ if (includedData) localVarQueryParameter["includedData"] = includedData.join(COLLECTION_FORMATS.csv);
123
+ if (locale !== void 0) localVarQueryParameter["locale"] = locale;
124
+ localVarHeaderParameter["Accept"] = "application/json";
125
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
126
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
127
+ localVarRequestOptions.headers = {
128
+ ...localVarHeaderParameter,
129
+ ...headersFromBaseOptions,
130
+ ...options.headers
131
+ };
132
+ return {
133
+ url: toPathString(localVarUrlObj),
134
+ options: localVarRequestOptions
135
+ };
136
+ },
137
+ /**
138
+ * Search for a list of Amazon catalog items and item-related information. You can search by identifier or by keywords. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
139
+ * @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
140
+ * @param {Array<string>} [identifiers] A comma-delimited list of product identifiers that you can use to search the Amazon catalog. **Note:** You cannot include &#x60;identifiers&#x60; and &#x60;keywords&#x60; in the same request.
141
+ * @param {SearchCatalogItemsIdentifiersTypeEnum} [identifiersType] The type of product identifiers that you can use to search the Amazon catalog. **Note:** &#x60;identifiersType&#x60; is required when &#x60;identifiers&#x60; is in the request.
142
+ * @param {Array<SearchCatalogItemsIncludedDataEnum>} [includedData] A comma-delimited list of datasets to include in the response.
143
+ * @param {string} [locale] The locale for which you want to retrieve localized summaries. Defaults to the primary locale of the marketplace.
144
+ * @param {string} [sellerId] A selling partner identifier, such as a seller account or vendor code. **Note:** Required when &#x60;identifiersType&#x60; is &#x60;SKU&#x60;.
145
+ * @param {Array<string>} [keywords] A comma-delimited list of keywords that you can use to search the Amazon catalog. **Note:** You cannot include &#x60;keywords&#x60; and &#x60;identifiers&#x60; in the same request.
146
+ * @param {Array<string>} [brandNames] A comma-delimited list of brand names that you can use to limit the search in queries based on &#x60;keywords&#x60;. **Note:** Cannot be used with &#x60;identifiers&#x60;.
147
+ * @param {Array<string>} [classificationIds] A comma-delimited list of classification identifiers that you can use to limit the search in queries based on &#x60;keywords&#x60;. **Note:** Cannot be used with &#x60;identifiers&#x60;.
148
+ * @param {number} [pageSize] The number of results to include on each page.
149
+ * @param {string} [pageToken] A token that you can use to fetch a specific page when there are multiple pages of results.
150
+ * @param {string} [keywordsLocale] The language of the keywords that are included in queries based on &#x60;keywords&#x60;. Defaults to the primary locale of the marketplace. **Note:** Cannot be used with &#x60;identifiers&#x60;.
151
+ * @param {*} [options] Override http request option.
152
+ * @throws {RequiredError}
153
+ */
154
+ searchCatalogItems: async (marketplaceIds, identifiers, identifiersType, includedData, locale, sellerId, keywords, brandNames, classificationIds, pageSize, pageToken, keywordsLocale, options = {}) => {
155
+ assertParamExists("searchCatalogItems", "marketplaceIds", marketplaceIds);
156
+ const localVarUrlObj = new URL(`/catalog/2022-04-01/items`, DUMMY_BASE_URL);
157
+ let baseOptions;
158
+ if (configuration) baseOptions = configuration.baseOptions;
159
+ const localVarRequestOptions = {
160
+ method: "GET",
161
+ ...baseOptions,
162
+ ...options
163
+ };
164
+ const localVarHeaderParameter = {};
165
+ const localVarQueryParameter = {};
166
+ if (identifiers) localVarQueryParameter["identifiers"] = identifiers.join(COLLECTION_FORMATS.csv);
167
+ if (identifiersType !== void 0) localVarQueryParameter["identifiersType"] = identifiersType;
168
+ if (marketplaceIds) localVarQueryParameter["marketplaceIds"] = marketplaceIds.join(COLLECTION_FORMATS.csv);
169
+ if (includedData) localVarQueryParameter["includedData"] = includedData.join(COLLECTION_FORMATS.csv);
170
+ if (locale !== void 0) localVarQueryParameter["locale"] = locale;
171
+ if (sellerId !== void 0) localVarQueryParameter["sellerId"] = sellerId;
172
+ if (keywords) localVarQueryParameter["keywords"] = keywords.join(COLLECTION_FORMATS.csv);
173
+ if (brandNames) localVarQueryParameter["brandNames"] = brandNames.join(COLLECTION_FORMATS.csv);
174
+ if (classificationIds) localVarQueryParameter["classificationIds"] = classificationIds.join(COLLECTION_FORMATS.csv);
175
+ if (pageSize !== void 0) localVarQueryParameter["pageSize"] = pageSize;
176
+ if (pageToken !== void 0) localVarQueryParameter["pageToken"] = pageToken;
177
+ if (keywordsLocale !== void 0) localVarQueryParameter["keywordsLocale"] = keywordsLocale;
178
+ localVarHeaderParameter["Accept"] = "application/json";
179
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
180
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
181
+ localVarRequestOptions.headers = {
182
+ ...localVarHeaderParameter,
183
+ ...headersFromBaseOptions,
184
+ ...options.headers
185
+ };
186
+ return {
187
+ url: toPathString(localVarUrlObj),
188
+ options: localVarRequestOptions
189
+ };
190
+ }
191
+ };
192
+ };
193
+ /**
194
+ * CatalogItemsApi - functional programming interface
195
+ */
196
+ const CatalogItemsApiFp = function(configuration) {
197
+ const localVarAxiosParamCreator = CatalogItemsApiAxiosParamCreator(configuration);
198
+ return {
199
+ /**
200
+ * Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
201
+ * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item.
202
+ * @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
203
+ * @param {Array<GetCatalogItemIncludedDataEnum>} [includedData] A comma-delimited list of datasets to include in the response.
204
+ * @param {string} [locale] The locale for which you want to retrieve localized summaries. Defaults to the primary locale of the marketplace.
205
+ * @param {*} [options] Override http request option.
206
+ * @throws {RequiredError}
207
+ */
208
+ async getCatalogItem(asin, marketplaceIds, includedData, locale, options) {
209
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getCatalogItem(asin, marketplaceIds, includedData, locale, options);
210
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
211
+ const localVarOperationServerBasePath = operationServerMap["CatalogItemsApi.getCatalogItem"]?.[localVarOperationServerIndex]?.url;
212
+ return (axios$1, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$1, localVarOperationServerBasePath || basePath);
213
+ },
214
+ /**
215
+ * Search for a list of Amazon catalog items and item-related information. You can search by identifier or by keywords. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
216
+ * @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
217
+ * @param {Array<string>} [identifiers] A comma-delimited list of product identifiers that you can use to search the Amazon catalog. **Note:** You cannot include &#x60;identifiers&#x60; and &#x60;keywords&#x60; in the same request.
218
+ * @param {SearchCatalogItemsIdentifiersTypeEnum} [identifiersType] The type of product identifiers that you can use to search the Amazon catalog. **Note:** &#x60;identifiersType&#x60; is required when &#x60;identifiers&#x60; is in the request.
219
+ * @param {Array<SearchCatalogItemsIncludedDataEnum>} [includedData] A comma-delimited list of datasets to include in the response.
220
+ * @param {string} [locale] The locale for which you want to retrieve localized summaries. Defaults to the primary locale of the marketplace.
221
+ * @param {string} [sellerId] A selling partner identifier, such as a seller account or vendor code. **Note:** Required when &#x60;identifiersType&#x60; is &#x60;SKU&#x60;.
222
+ * @param {Array<string>} [keywords] A comma-delimited list of keywords that you can use to search the Amazon catalog. **Note:** You cannot include &#x60;keywords&#x60; and &#x60;identifiers&#x60; in the same request.
223
+ * @param {Array<string>} [brandNames] A comma-delimited list of brand names that you can use to limit the search in queries based on &#x60;keywords&#x60;. **Note:** Cannot be used with &#x60;identifiers&#x60;.
224
+ * @param {Array<string>} [classificationIds] A comma-delimited list of classification identifiers that you can use to limit the search in queries based on &#x60;keywords&#x60;. **Note:** Cannot be used with &#x60;identifiers&#x60;.
225
+ * @param {number} [pageSize] The number of results to include on each page.
226
+ * @param {string} [pageToken] A token that you can use to fetch a specific page when there are multiple pages of results.
227
+ * @param {string} [keywordsLocale] The language of the keywords that are included in queries based on &#x60;keywords&#x60;. Defaults to the primary locale of the marketplace. **Note:** Cannot be used with &#x60;identifiers&#x60;.
228
+ * @param {*} [options] Override http request option.
229
+ * @throws {RequiredError}
230
+ */
231
+ async searchCatalogItems(marketplaceIds, identifiers, identifiersType, includedData, locale, sellerId, keywords, brandNames, classificationIds, pageSize, pageToken, keywordsLocale, options) {
232
+ const localVarAxiosArgs = await localVarAxiosParamCreator.searchCatalogItems(marketplaceIds, identifiers, identifiersType, includedData, locale, sellerId, keywords, brandNames, classificationIds, pageSize, pageToken, keywordsLocale, options);
233
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
234
+ const localVarOperationServerBasePath = operationServerMap["CatalogItemsApi.searchCatalogItems"]?.[localVarOperationServerIndex]?.url;
235
+ return (axios$2, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$2, localVarOperationServerBasePath || basePath);
236
+ }
237
+ };
238
+ };
239
+ /**
240
+ * CatalogItemsApi - factory interface
241
+ */
242
+ const CatalogItemsApiFactory = function(configuration, basePath, axios$3) {
243
+ const localVarFp = CatalogItemsApiFp(configuration);
244
+ return {
245
+ /**
246
+ * Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
247
+ * @param {CatalogItemsApiGetCatalogItemRequest} requestParameters Request parameters.
248
+ * @param {*} [options] Override http request option.
249
+ * @throws {RequiredError}
250
+ */
251
+ getCatalogItem(requestParameters, options) {
252
+ return localVarFp.getCatalogItem(requestParameters.asin, requestParameters.marketplaceIds, requestParameters.includedData, requestParameters.locale, options).then((request) => request(axios$3, basePath));
253
+ },
254
+ /**
255
+ * Search for a list of Amazon catalog items and item-related information. You can search by identifier or by keywords. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
256
+ * @param {CatalogItemsApiSearchCatalogItemsRequest} requestParameters Request parameters.
257
+ * @param {*} [options] Override http request option.
258
+ * @throws {RequiredError}
259
+ */
260
+ searchCatalogItems(requestParameters, options) {
261
+ return localVarFp.searchCatalogItems(requestParameters.marketplaceIds, requestParameters.identifiers, requestParameters.identifiersType, requestParameters.includedData, requestParameters.locale, requestParameters.sellerId, requestParameters.keywords, requestParameters.brandNames, requestParameters.classificationIds, requestParameters.pageSize, requestParameters.pageToken, requestParameters.keywordsLocale, options).then((request) => request(axios$3, basePath));
262
+ }
263
+ };
264
+ };
265
+ /**
266
+ * CatalogItemsApi - object-oriented interface
267
+ */
268
+ var CatalogItemsApi = class extends BaseAPI {
269
+ /**
270
+ * Retrieves details for an item in the Amazon catalog. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
271
+ * @param {CatalogItemsApiGetCatalogItemRequest} requestParameters Request parameters.
272
+ * @param {*} [options] Override http request option.
273
+ * @throws {RequiredError}
274
+ */
275
+ getCatalogItem(requestParameters, options) {
276
+ return CatalogItemsApiFp(this.configuration).getCatalogItem(requestParameters.asin, requestParameters.marketplaceIds, requestParameters.includedData, requestParameters.locale, options).then((request) => request(this.axios, this.basePath));
277
+ }
278
+ /**
279
+ * Search for a list of Amazon catalog items and item-related information. You can search by identifier or by keywords. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
280
+ * @param {CatalogItemsApiSearchCatalogItemsRequest} requestParameters Request parameters.
281
+ * @param {*} [options] Override http request option.
282
+ * @throws {RequiredError}
283
+ */
284
+ searchCatalogItems(requestParameters, options) {
285
+ return CatalogItemsApiFp(this.configuration).searchCatalogItems(requestParameters.marketplaceIds, requestParameters.identifiers, requestParameters.identifiersType, requestParameters.includedData, requestParameters.locale, requestParameters.sellerId, requestParameters.keywords, requestParameters.brandNames, requestParameters.classificationIds, requestParameters.pageSize, requestParameters.pageToken, requestParameters.keywordsLocale, options).then((request) => request(this.axios, this.basePath));
286
+ }
287
+ };
288
+ const GetCatalogItemIncludedDataEnum = {
289
+ Attributes: "attributes",
290
+ Classifications: "classifications",
291
+ Dimensions: "dimensions",
292
+ Identifiers: "identifiers",
293
+ Images: "images",
294
+ ProductTypes: "productTypes",
295
+ Relationships: "relationships",
296
+ SalesRanks: "salesRanks",
297
+ Summaries: "summaries",
298
+ VendorDetails: "vendorDetails"
299
+ };
300
+ const SearchCatalogItemsIdentifiersTypeEnum = {
301
+ Asin: "ASIN",
302
+ Ean: "EAN",
303
+ Gtin: "GTIN",
304
+ Isbn: "ISBN",
305
+ Jan: "JAN",
306
+ Minsan: "MINSAN",
307
+ Sku: "SKU",
308
+ Upc: "UPC"
309
+ };
310
+ const SearchCatalogItemsIncludedDataEnum = {
311
+ Attributes: "attributes",
312
+ Classifications: "classifications",
313
+ Dimensions: "dimensions",
314
+ Identifiers: "identifiers",
315
+ Images: "images",
316
+ ProductTypes: "productTypes",
317
+ Relationships: "relationships",
318
+ SalesRanks: "salesRanks",
319
+ Summaries: "summaries",
320
+ VendorDetails: "vendorDetails"
321
+ };
322
+ //#endregion
323
+ //#region src/api-model/configuration.ts
324
+ var Configuration = class {
325
+ /**
326
+ * parameter for apiKey security
327
+ * @param name security name
328
+ */
329
+ apiKey;
330
+ /**
331
+ * parameter for basic security
332
+ */
333
+ username;
334
+ /**
335
+ * parameter for basic security
336
+ */
337
+ password;
338
+ /**
339
+ * parameter for oauth2 security
340
+ * @param name security name
341
+ * @param scopes oauth2 scope
342
+ */
343
+ accessToken;
344
+ /**
345
+ * parameter for aws4 signature security
346
+ * @param {Object} AWS4Signature - AWS4 Signature security
347
+ * @param {string} options.region - aws region
348
+ * @param {string} options.service - name of the service.
349
+ * @param {string} credentials.accessKeyId - aws access key id
350
+ * @param {string} credentials.secretAccessKey - aws access key
351
+ * @param {string} credentials.sessionToken - aws session token
352
+ * @memberof Configuration
353
+ */
354
+ awsv4;
355
+ /**
356
+ * override base path
357
+ */
358
+ basePath;
359
+ /**
360
+ * override server index
361
+ */
362
+ serverIndex;
363
+ /**
364
+ * base options for axios calls
365
+ */
366
+ baseOptions;
367
+ /**
368
+ * The FormData constructor that will be used to create multipart form data
369
+ * requests. You can inject this here so that execution environments that
370
+ * do not support the FormData class can still run the generated client.
371
+ *
372
+ * @type {new () => FormData}
373
+ */
374
+ formDataCtor;
375
+ constructor(param = {}) {
376
+ this.apiKey = param.apiKey;
377
+ this.username = param.username;
378
+ this.password = param.password;
379
+ this.accessToken = param.accessToken;
380
+ this.awsv4 = param.awsv4;
381
+ this.basePath = param.basePath;
382
+ this.serverIndex = param.serverIndex;
383
+ this.baseOptions = {
384
+ ...param.baseOptions,
385
+ headers: { ...param.baseOptions?.headers }
386
+ };
387
+ this.formDataCtor = param.formDataCtor;
388
+ }
389
+ /**
390
+ * Check if the given MIME is a JSON MIME.
391
+ * JSON MIME examples:
392
+ * application/json
393
+ * application/json; charset=UTF8
394
+ * APPLICATION/JSON
395
+ * application/vnd.company+json
396
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
397
+ * @return True if the given MIME is JSON, false otherwise.
398
+ */
399
+ isJsonMime(mime) {
400
+ return mime !== null && /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i.test(mime);
401
+ }
402
+ };
403
+ //#endregion
404
+ //#region src/api-model/models/item-image.ts
405
+ const ItemImageVariantEnum = {
406
+ Main: "MAIN",
407
+ Pt01: "PT01",
408
+ Pt02: "PT02",
409
+ Pt03: "PT03",
410
+ Pt04: "PT04",
411
+ Pt05: "PT05",
412
+ Pt06: "PT06",
413
+ Pt07: "PT07",
414
+ Pt08: "PT08",
415
+ Swch: "SWCH"
416
+ };
417
+ //#endregion
418
+ //#region src/api-model/models/item-relationship.ts
419
+ const ItemRelationshipTypeEnum = {
420
+ Variation: "VARIATION",
421
+ PackageHierarchy: "PACKAGE_HIERARCHY"
422
+ };
423
+ //#endregion
424
+ //#region src/api-model/models/item-summary-by-marketplace.ts
425
+ const ItemSummaryByMarketplaceItemClassificationEnum = {
426
+ BaseProduct: "BASE_PRODUCT",
427
+ Other: "OTHER",
428
+ ProductBundle: "PRODUCT_BUNDLE",
429
+ VariationParent: "VARIATION_PARENT"
430
+ };
431
+ //#endregion
432
+ //#region src/api-model/models/item-vendor-details-by-marketplace.ts
433
+ const ItemVendorDetailsByMarketplaceReplenishmentCategoryEnum = {
434
+ Allocated: "ALLOCATED",
435
+ BasicReplenishment: "BASIC_REPLENISHMENT",
436
+ InSeason: "IN_SEASON",
437
+ LimitedReplenishment: "LIMITED_REPLENISHMENT",
438
+ ManufacturerOutOfStock: "MANUFACTURER_OUT_OF_STOCK",
439
+ NewProduct: "NEW_PRODUCT",
440
+ NonReplenishable: "NON_REPLENISHABLE",
441
+ NonStockupable: "NON_STOCKUPABLE",
442
+ Obsolete: "OBSOLETE",
443
+ PlannedReplenishment: "PLANNED_REPLENISHMENT"
444
+ };
445
+ //#endregion
446
+ //#region src/client.ts
447
+ const clientRateLimits = [{
448
+ method: "get",
449
+ urlRegex: /^\/catalog\/2022\u{2D}04\u{2D}01\/items$/v,
450
+ rate: 2,
451
+ burst: 2
452
+ }, {
453
+ method: "get",
454
+ urlRegex: /^\/catalog\/2022\u{2D}04\u{2D}01\/items\/[^\/]*$/v,
455
+ rate: 2,
456
+ burst: 2
457
+ }];
458
+ var CatalogItemsApiClient = class extends CatalogItemsApi {
459
+ constructor(configuration) {
460
+ const { axios, endpoint } = (0, _sp_api_sdk_common.createAxiosInstance)(configuration, clientRateLimits);
461
+ super(new Configuration(), endpoint, axios);
462
+ }
463
+ };
464
+ //#endregion
465
+ exports.CatalogItemsApi = CatalogItemsApi;
466
+ exports.CatalogItemsApiAxiosParamCreator = CatalogItemsApiAxiosParamCreator;
467
+ exports.CatalogItemsApiClient = CatalogItemsApiClient;
468
+ exports.CatalogItemsApiFactory = CatalogItemsApiFactory;
469
+ exports.CatalogItemsApiFp = CatalogItemsApiFp;
470
+ exports.GetCatalogItemIncludedDataEnum = GetCatalogItemIncludedDataEnum;
471
+ exports.ItemImageVariantEnum = ItemImageVariantEnum;
472
+ exports.ItemRelationshipTypeEnum = ItemRelationshipTypeEnum;
473
+ exports.ItemSummaryByMarketplaceItemClassificationEnum = ItemSummaryByMarketplaceItemClassificationEnum;
474
+ exports.ItemVendorDetailsByMarketplaceReplenishmentCategoryEnum = ItemVendorDetailsByMarketplaceReplenishmentCategoryEnum;
475
+ exports.SearchCatalogItemsIdentifiersTypeEnum = SearchCatalogItemsIdentifiersTypeEnum;
476
+ exports.SearchCatalogItemsIncludedDataEnum = SearchCatalogItemsIncludedDataEnum;
477
+ exports.clientRateLimits = clientRateLimits;
478
+
479
+ //# sourceMappingURL=index.cjs.map