@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
@@ -1,273 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Selling Partner API for Catalog Items
5
- * Use the Selling Partner API for Catalog Items to retrieve information about items in the Amazon catalog. For more information, refer to the [Catalog Items API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/:catalog-items-api-v2022-04-01-use-case-guide).
6
- *
7
- * The version of the OpenAPI document: 2022-04-01
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- import globalAxios from 'axios';
15
- // Some imports not used depending on template conditions
16
- // @ts-ignore
17
- import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from '../common';
18
- // @ts-ignore
19
- import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, operationServerMap } from '../base';
20
- /**
21
- * CatalogItemsApi - axios parameter creator
22
- */
23
- export const CatalogItemsApiAxiosParamCreator = function (configuration) {
24
- return {
25
- /**
26
- * 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).
27
- * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item.
28
- * @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).
29
- * @param {Array<GetCatalogItemIncludedDataEnum>} [includedData] A comma-delimited list of datasets to include in the response.
30
- * @param {string} [locale] The locale for which you want to retrieve localized summaries. Defaults to the primary locale of the marketplace.
31
- * @param {*} [options] Override http request option.
32
- * @throws {RequiredError}
33
- */
34
- getCatalogItem: async (asin, marketplaceIds, includedData, locale, options = {}) => {
35
- // verify required parameter 'asin' is not null or undefined
36
- assertParamExists('getCatalogItem', 'asin', asin);
37
- // verify required parameter 'marketplaceIds' is not null or undefined
38
- assertParamExists('getCatalogItem', 'marketplaceIds', marketplaceIds);
39
- const localVarPath = `/catalog/2022-04-01/items/{asin}`
40
- .replace('{asin}', encodeURIComponent(String(asin)));
41
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
42
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
43
- let baseOptions;
44
- if (configuration) {
45
- baseOptions = configuration.baseOptions;
46
- }
47
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
48
- const localVarHeaderParameter = {};
49
- const localVarQueryParameter = {};
50
- if (marketplaceIds) {
51
- localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv);
52
- }
53
- if (includedData) {
54
- localVarQueryParameter['includedData'] = includedData.join(COLLECTION_FORMATS.csv);
55
- }
56
- if (locale !== undefined) {
57
- localVarQueryParameter['locale'] = locale;
58
- }
59
- localVarHeaderParameter['Accept'] = 'application/json';
60
- setSearchParams(localVarUrlObj, localVarQueryParameter);
61
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
62
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
63
- return {
64
- url: toPathString(localVarUrlObj),
65
- options: localVarRequestOptions,
66
- };
67
- },
68
- /**
69
- * 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).
70
- * @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).
71
- * @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.
72
- * @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.
73
- * @param {Array<SearchCatalogItemsIncludedDataEnum>} [includedData] A comma-delimited list of datasets to include in the response.
74
- * @param {string} [locale] The locale for which you want to retrieve localized summaries. Defaults to the primary locale of the marketplace.
75
- * @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;.
76
- * @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.
77
- * @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;.
78
- * @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;.
79
- * @param {number} [pageSize] The number of results to include on each page.
80
- * @param {string} [pageToken] A token that you can use to fetch a specific page when there are multiple pages of results.
81
- * @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;.
82
- * @param {*} [options] Override http request option.
83
- * @throws {RequiredError}
84
- */
85
- searchCatalogItems: async (marketplaceIds, identifiers, identifiersType, includedData, locale, sellerId, keywords, brandNames, classificationIds, pageSize, pageToken, keywordsLocale, options = {}) => {
86
- // verify required parameter 'marketplaceIds' is not null or undefined
87
- assertParamExists('searchCatalogItems', 'marketplaceIds', marketplaceIds);
88
- const localVarPath = `/catalog/2022-04-01/items`;
89
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
90
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
91
- let baseOptions;
92
- if (configuration) {
93
- baseOptions = configuration.baseOptions;
94
- }
95
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
96
- const localVarHeaderParameter = {};
97
- const localVarQueryParameter = {};
98
- if (identifiers) {
99
- localVarQueryParameter['identifiers'] = identifiers.join(COLLECTION_FORMATS.csv);
100
- }
101
- if (identifiersType !== undefined) {
102
- localVarQueryParameter['identifiersType'] = identifiersType;
103
- }
104
- if (marketplaceIds) {
105
- localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv);
106
- }
107
- if (includedData) {
108
- localVarQueryParameter['includedData'] = includedData.join(COLLECTION_FORMATS.csv);
109
- }
110
- if (locale !== undefined) {
111
- localVarQueryParameter['locale'] = locale;
112
- }
113
- if (sellerId !== undefined) {
114
- localVarQueryParameter['sellerId'] = sellerId;
115
- }
116
- if (keywords) {
117
- localVarQueryParameter['keywords'] = keywords.join(COLLECTION_FORMATS.csv);
118
- }
119
- if (brandNames) {
120
- localVarQueryParameter['brandNames'] = brandNames.join(COLLECTION_FORMATS.csv);
121
- }
122
- if (classificationIds) {
123
- localVarQueryParameter['classificationIds'] = classificationIds.join(COLLECTION_FORMATS.csv);
124
- }
125
- if (pageSize !== undefined) {
126
- localVarQueryParameter['pageSize'] = pageSize;
127
- }
128
- if (pageToken !== undefined) {
129
- localVarQueryParameter['pageToken'] = pageToken;
130
- }
131
- if (keywordsLocale !== undefined) {
132
- localVarQueryParameter['keywordsLocale'] = keywordsLocale;
133
- }
134
- localVarHeaderParameter['Accept'] = 'application/json';
135
- setSearchParams(localVarUrlObj, localVarQueryParameter);
136
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
137
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
138
- return {
139
- url: toPathString(localVarUrlObj),
140
- options: localVarRequestOptions,
141
- };
142
- },
143
- };
144
- };
145
- /**
146
- * CatalogItemsApi - functional programming interface
147
- */
148
- export const CatalogItemsApiFp = function (configuration) {
149
- const localVarAxiosParamCreator = CatalogItemsApiAxiosParamCreator(configuration);
150
- return {
151
- /**
152
- * 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).
153
- * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item.
154
- * @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).
155
- * @param {Array<GetCatalogItemIncludedDataEnum>} [includedData] A comma-delimited list of datasets to include in the response.
156
- * @param {string} [locale] The locale for which you want to retrieve localized summaries. Defaults to the primary locale of the marketplace.
157
- * @param {*} [options] Override http request option.
158
- * @throws {RequiredError}
159
- */
160
- async getCatalogItem(asin, marketplaceIds, includedData, locale, options) {
161
- const localVarAxiosArgs = await localVarAxiosParamCreator.getCatalogItem(asin, marketplaceIds, includedData, locale, options);
162
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
163
- const localVarOperationServerBasePath = operationServerMap['CatalogItemsApi.getCatalogItem']?.[localVarOperationServerIndex]?.url;
164
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
165
- },
166
- /**
167
- * 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).
168
- * @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).
169
- * @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.
170
- * @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.
171
- * @param {Array<SearchCatalogItemsIncludedDataEnum>} [includedData] A comma-delimited list of datasets to include in the response.
172
- * @param {string} [locale] The locale for which you want to retrieve localized summaries. Defaults to the primary locale of the marketplace.
173
- * @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;.
174
- * @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.
175
- * @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;.
176
- * @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;.
177
- * @param {number} [pageSize] The number of results to include on each page.
178
- * @param {string} [pageToken] A token that you can use to fetch a specific page when there are multiple pages of results.
179
- * @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;.
180
- * @param {*} [options] Override http request option.
181
- * @throws {RequiredError}
182
- */
183
- async searchCatalogItems(marketplaceIds, identifiers, identifiersType, includedData, locale, sellerId, keywords, brandNames, classificationIds, pageSize, pageToken, keywordsLocale, options) {
184
- const localVarAxiosArgs = await localVarAxiosParamCreator.searchCatalogItems(marketplaceIds, identifiers, identifiersType, includedData, locale, sellerId, keywords, brandNames, classificationIds, pageSize, pageToken, keywordsLocale, options);
185
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
186
- const localVarOperationServerBasePath = operationServerMap['CatalogItemsApi.searchCatalogItems']?.[localVarOperationServerIndex]?.url;
187
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
188
- },
189
- };
190
- };
191
- /**
192
- * CatalogItemsApi - factory interface
193
- */
194
- export const CatalogItemsApiFactory = function (configuration, basePath, axios) {
195
- const localVarFp = CatalogItemsApiFp(configuration);
196
- return {
197
- /**
198
- * 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).
199
- * @param {CatalogItemsApiGetCatalogItemRequest} requestParameters Request parameters.
200
- * @param {*} [options] Override http request option.
201
- * @throws {RequiredError}
202
- */
203
- getCatalogItem(requestParameters, options) {
204
- return localVarFp.getCatalogItem(requestParameters.asin, requestParameters.marketplaceIds, requestParameters.includedData, requestParameters.locale, options).then((request) => request(axios, basePath));
205
- },
206
- /**
207
- * 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).
208
- * @param {CatalogItemsApiSearchCatalogItemsRequest} requestParameters Request parameters.
209
- * @param {*} [options] Override http request option.
210
- * @throws {RequiredError}
211
- */
212
- searchCatalogItems(requestParameters, options) {
213
- 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, basePath));
214
- },
215
- };
216
- };
217
- /**
218
- * CatalogItemsApi - object-oriented interface
219
- */
220
- export class CatalogItemsApi extends BaseAPI {
221
- /**
222
- * 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).
223
- * @param {CatalogItemsApiGetCatalogItemRequest} requestParameters Request parameters.
224
- * @param {*} [options] Override http request option.
225
- * @throws {RequiredError}
226
- */
227
- getCatalogItem(requestParameters, options) {
228
- return CatalogItemsApiFp(this.configuration).getCatalogItem(requestParameters.asin, requestParameters.marketplaceIds, requestParameters.includedData, requestParameters.locale, options).then((request) => request(this.axios, this.basePath));
229
- }
230
- /**
231
- * 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).
232
- * @param {CatalogItemsApiSearchCatalogItemsRequest} requestParameters Request parameters.
233
- * @param {*} [options] Override http request option.
234
- * @throws {RequiredError}
235
- */
236
- searchCatalogItems(requestParameters, options) {
237
- 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));
238
- }
239
- }
240
- export const GetCatalogItemIncludedDataEnum = {
241
- Attributes: 'attributes',
242
- Classifications: 'classifications',
243
- Dimensions: 'dimensions',
244
- Identifiers: 'identifiers',
245
- Images: 'images',
246
- ProductTypes: 'productTypes',
247
- Relationships: 'relationships',
248
- SalesRanks: 'salesRanks',
249
- Summaries: 'summaries',
250
- VendorDetails: 'vendorDetails',
251
- };
252
- export const SearchCatalogItemsIdentifiersTypeEnum = {
253
- Asin: 'ASIN',
254
- Ean: 'EAN',
255
- Gtin: 'GTIN',
256
- Isbn: 'ISBN',
257
- Jan: 'JAN',
258
- Minsan: 'MINSAN',
259
- Sku: 'SKU',
260
- Upc: 'UPC',
261
- };
262
- export const SearchCatalogItemsIncludedDataEnum = {
263
- Attributes: 'attributes',
264
- Classifications: 'classifications',
265
- Dimensions: 'dimensions',
266
- Identifiers: 'identifiers',
267
- Images: 'images',
268
- ProductTypes: 'productTypes',
269
- Relationships: 'relationships',
270
- SalesRanks: 'salesRanks',
271
- Summaries: 'summaries',
272
- VendorDetails: 'vendorDetails',
273
- };
@@ -1,14 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Selling Partner API for Catalog Items
5
- * Use the Selling Partner API for Catalog Items to retrieve information about items in the Amazon catalog. For more information, refer to the [Catalog Items API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/:catalog-items-api-v2022-04-01-use-case-guide).
6
- *
7
- * The version of the OpenAPI document: 2022-04-01
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- export * from './api/catalog-items-api';
@@ -1,44 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Selling Partner API for Catalog Items
5
- * Use the Selling Partner API for Catalog Items to retrieve information about items in the Amazon catalog. For more information, refer to the [Catalog Items API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/:catalog-items-api-v2022-04-01-use-case-guide).
6
- *
7
- * The version of the OpenAPI document: 2022-04-01
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- import globalAxios from 'axios';
15
- export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
16
- export const COLLECTION_FORMATS = {
17
- csv: ",",
18
- ssv: " ",
19
- tsv: "\t",
20
- pipes: "|",
21
- };
22
- export class BaseAPI {
23
- basePath;
24
- axios;
25
- configuration;
26
- constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
27
- this.basePath = basePath;
28
- this.axios = axios;
29
- if (configuration) {
30
- this.configuration = configuration;
31
- this.basePath = configuration.basePath ?? basePath;
32
- }
33
- }
34
- }
35
- ;
36
- export class RequiredError extends Error {
37
- field;
38
- constructor(field, msg) {
39
- super(msg);
40
- this.field = field;
41
- this.name = "RequiredError";
42
- }
43
- }
44
- export const operationServerMap = {};
@@ -1,110 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Selling Partner API for Catalog Items
5
- * Use the Selling Partner API for Catalog Items to retrieve information about items in the Amazon catalog. For more information, refer to the [Catalog Items API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/:catalog-items-api-v2022-04-01-use-case-guide).
6
- *
7
- * The version of the OpenAPI document: 2022-04-01
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- import { RequiredError } from "./base";
15
- export const DUMMY_BASE_URL = 'https://example.com';
16
- /**
17
- *
18
- * @throws {RequiredError}
19
- */
20
- export const assertParamExists = function (functionName, paramName, paramValue) {
21
- if (paramValue === null || paramValue === undefined) {
22
- throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
23
- }
24
- };
25
- export const setApiKeyToObject = async function (object, keyParamName, configuration) {
26
- if (configuration && configuration.apiKey) {
27
- const localVarApiKeyValue = typeof configuration.apiKey === 'function'
28
- ? await configuration.apiKey(keyParamName)
29
- : await configuration.apiKey;
30
- object[keyParamName] = localVarApiKeyValue;
31
- }
32
- };
33
- export const setBasicAuthToObject = function (object, configuration) {
34
- if (configuration && (configuration.username || configuration.password)) {
35
- object["auth"] = { username: configuration.username, password: configuration.password };
36
- }
37
- };
38
- export const setBearerAuthToObject = async function (object, configuration) {
39
- if (configuration && configuration.accessToken) {
40
- const accessToken = typeof configuration.accessToken === 'function'
41
- ? await configuration.accessToken()
42
- : await configuration.accessToken;
43
- object["Authorization"] = "Bearer " + accessToken;
44
- }
45
- };
46
- export const setOAuthToObject = async function (object, name, scopes, configuration) {
47
- if (configuration && configuration.accessToken) {
48
- const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
49
- ? await configuration.accessToken(name, scopes)
50
- : await configuration.accessToken;
51
- object["Authorization"] = "Bearer " + localVarAccessTokenValue;
52
- }
53
- };
54
- function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
55
- if (parameter == null)
56
- return;
57
- if (typeof parameter === "object") {
58
- if (Array.isArray(parameter) || parameter instanceof Set) {
59
- parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
60
- }
61
- else {
62
- Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
63
- }
64
- }
65
- else {
66
- if (urlSearchParams.has(key)) {
67
- urlSearchParams.append(key, parameter);
68
- }
69
- else {
70
- urlSearchParams.set(key, parameter);
71
- }
72
- }
73
- }
74
- export const setSearchParams = function (url, ...objects) {
75
- const searchParams = new URLSearchParams(url.search);
76
- setFlattenedQueryParams(searchParams, objects);
77
- url.search = searchParams.toString();
78
- };
79
- /**
80
- * JSON serialization helper function which replaces instances of unserializable types with serializable ones.
81
- * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
82
- * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
83
- */
84
- // @ts-ignore
85
- export const replaceWithSerializableTypeIfNeeded = function (key, value) {
86
- if (value instanceof Set) {
87
- return Array.from(value);
88
- }
89
- else {
90
- return value;
91
- }
92
- };
93
- export const serializeDataIfNeeded = function (value, requestOptions, configuration) {
94
- const nonString = typeof value !== 'string';
95
- const needsSerialization = nonString && configuration && configuration.isJsonMime
96
- ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
97
- : nonString;
98
- return needsSerialization
99
- ? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded)
100
- : (value || "");
101
- };
102
- export const toPathString = function (url) {
103
- return url.pathname + url.search + url.hash;
104
- };
105
- export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
106
- return (axios = globalAxios, basePath = BASE_PATH) => {
107
- const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
108
- return axios.request(axiosRequestArgs);
109
- };
110
- };
@@ -1,94 +0,0 @@
1
- /* tslint:disable */
2
- /**
3
- * Selling Partner API for Catalog Items
4
- * Use the Selling Partner API for Catalog Items to retrieve information about items in the Amazon catalog. For more information, refer to the [Catalog Items API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/:catalog-items-api-v2022-04-01-use-case-guide).
5
- *
6
- * The version of the OpenAPI document: 2022-04-01
7
- *
8
- *
9
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
10
- * https://openapi-generator.tech
11
- * Do not edit the class manually.
12
- */
13
- export class Configuration {
14
- /**
15
- * parameter for apiKey security
16
- * @param name security name
17
- */
18
- apiKey;
19
- /**
20
- * parameter for basic security
21
- */
22
- username;
23
- /**
24
- * parameter for basic security
25
- */
26
- password;
27
- /**
28
- * parameter for oauth2 security
29
- * @param name security name
30
- * @param scopes oauth2 scope
31
- */
32
- accessToken;
33
- /**
34
- * parameter for aws4 signature security
35
- * @param {Object} AWS4Signature - AWS4 Signature security
36
- * @param {string} options.region - aws region
37
- * @param {string} options.service - name of the service.
38
- * @param {string} credentials.accessKeyId - aws access key id
39
- * @param {string} credentials.secretAccessKey - aws access key
40
- * @param {string} credentials.sessionToken - aws session token
41
- * @memberof Configuration
42
- */
43
- awsv4;
44
- /**
45
- * override base path
46
- */
47
- basePath;
48
- /**
49
- * override server index
50
- */
51
- serverIndex;
52
- /**
53
- * base options for axios calls
54
- */
55
- baseOptions;
56
- /**
57
- * The FormData constructor that will be used to create multipart form data
58
- * requests. You can inject this here so that execution environments that
59
- * do not support the FormData class can still run the generated client.
60
- *
61
- * @type {new () => FormData}
62
- */
63
- formDataCtor;
64
- constructor(param = {}) {
65
- this.apiKey = param.apiKey;
66
- this.username = param.username;
67
- this.password = param.password;
68
- this.accessToken = param.accessToken;
69
- this.awsv4 = param.awsv4;
70
- this.basePath = param.basePath;
71
- this.serverIndex = param.serverIndex;
72
- this.baseOptions = {
73
- ...param.baseOptions,
74
- headers: {
75
- ...param.baseOptions?.headers,
76
- },
77
- };
78
- this.formDataCtor = param.formDataCtor;
79
- }
80
- /**
81
- * Check if the given MIME is a JSON MIME.
82
- * JSON MIME examples:
83
- * application/json
84
- * application/json; charset=UTF8
85
- * APPLICATION/JSON
86
- * application/vnd.company+json
87
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
88
- * @return True if the given MIME is JSON, false otherwise.
89
- */
90
- isJsonMime(mime) {
91
- const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
92
- return mime !== null && jsonMime.test(mime);
93
- }
94
- }
@@ -1,16 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Selling Partner API for Catalog Items
5
- * Use the Selling Partner API for Catalog Items to retrieve information about items in the Amazon catalog. For more information, refer to the [Catalog Items API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/:catalog-items-api-v2022-04-01-use-case-guide).
6
- *
7
- * The version of the OpenAPI document: 2022-04-01
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- export * from "./api";
15
- export * from "./configuration";
16
- export * from "./models";
@@ -1,14 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Selling Partner API for Catalog Items
5
- * Use the Selling Partner API for Catalog Items to retrieve information about items in the Amazon catalog. For more information, refer to the [Catalog Items API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/:catalog-items-api-v2022-04-01-use-case-guide).
6
- *
7
- * The version of the OpenAPI document: 2022-04-01
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- export {};
@@ -1,14 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Selling Partner API for Catalog Items
5
- * Use the Selling Partner API for Catalog Items to retrieve information about items in the Amazon catalog. For more information, refer to the [Catalog Items API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/:catalog-items-api-v2022-04-01-use-case-guide).
6
- *
7
- * The version of the OpenAPI document: 2022-04-01
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- export {};
@@ -1,14 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Selling Partner API for Catalog Items
5
- * Use the Selling Partner API for Catalog Items to retrieve information about items in the Amazon catalog. For more information, refer to the [Catalog Items API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/:catalog-items-api-v2022-04-01-use-case-guide).
6
- *
7
- * The version of the OpenAPI document: 2022-04-01
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- export {};
@@ -1,14 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Selling Partner API for Catalog Items
5
- * Use the Selling Partner API for Catalog Items to retrieve information about items in the Amazon catalog. For more information, refer to the [Catalog Items API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/:catalog-items-api-v2022-04-01-use-case-guide).
6
- *
7
- * The version of the OpenAPI document: 2022-04-01
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- export {};
@@ -1,14 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Selling Partner API for Catalog Items
5
- * Use the Selling Partner API for Catalog Items to retrieve information about items in the Amazon catalog. For more information, refer to the [Catalog Items API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/:catalog-items-api-v2022-04-01-use-case-guide).
6
- *
7
- * The version of the OpenAPI document: 2022-04-01
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- export {};