@sp-api-sdk/catalog-items-api-v0 1.12.8 → 1.12.10

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.
@@ -219,40 +219,30 @@ const CatalogApiFactory = function (configuration, basePath, axios) {
219
219
  return {
220
220
  /**
221
221
  * Effective September 30, 2022, the `getCatalogItem` operation will no longer be available in the Selling Partner API for Catalog Items v0. This operation is available in the latest version of the [Selling Partner API for Catalog Items v2022-04-01](https://developer-docs.amazon.com/sp-api/docs/catalog-items-api-v2022-04-01-reference). Integrations that rely on this operation should migrate to the latest version to avoid service disruption. _Note:_ The [`listCatalogCategories`](#get-catalogv0categories) operation is not being deprecated and you can continue to make calls to it.
222
- * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for the item.
223
- * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item.
222
+ * @param {CatalogApiGetCatalogItemRequest} requestParameters Request parameters.
224
223
  * @param {*} [options] Override http request option.
225
224
  * @throws {RequiredError}
226
225
  */
227
- getCatalogItem(marketplaceId, asin, options) {
228
- return localVarFp.getCatalogItem(marketplaceId, asin, options).then((request) => request(axios, basePath));
226
+ getCatalogItem(requestParameters, options) {
227
+ return localVarFp.getCatalogItem(requestParameters.marketplaceId, requestParameters.asin, options).then((request) => request(axios, basePath));
229
228
  },
230
229
  /**
231
230
  * 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).
232
- * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for the item.
233
- * @param {string} [aSIN] The Amazon Standard Identification Number (ASIN) of the item.
234
- * @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.
231
+ * @param {CatalogApiListCatalogCategoriesRequest} requestParameters Request parameters.
235
232
  * @param {*} [options] Override http request option.
236
233
  * @throws {RequiredError}
237
234
  */
238
- listCatalogCategories(marketplaceId, aSIN, sellerSKU, options) {
239
- return localVarFp.listCatalogCategories(marketplaceId, aSIN, sellerSKU, options).then((request) => request(axios, basePath));
235
+ listCatalogCategories(requestParameters, options) {
236
+ return localVarFp.listCatalogCategories(requestParameters.marketplaceId, requestParameters.aSIN, requestParameters.sellerSKU, options).then((request) => request(axios, basePath));
240
237
  },
241
238
  /**
242
239
  * Effective September 30, 2022, the `listCatalogItems` operation will no longer be available in the Selling Partner API for Catalog Items v0. As an alternative, `searchCatalogItems` is available in the latest version of the [Selling Partner API for Catalog Items v2022-04-01](https://developer-docs.amazon.com/sp-api/docs/catalog-items-api-v2022-04-01-reference). Integrations that rely on the `listCatalogItems` operation should migrate to the `searchCatalogItems`operation to avoid service disruption. _Note:_ The [`listCatalogCategories`](#get-catalogv0categories) operation is not being deprecated and you can continue to make calls to it.
243
- * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which items are returned.
244
- * @param {string} [query] Keyword(s) to use to search for items in the catalog. Example: \'harry potter books\'.
245
- * @param {string} [queryContextId] An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items.
246
- * @param {string} [sellerSKU] Used to identify an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit.
247
- * @param {string} [uPC] A 12-digit bar code used for retail packaging.
248
- * @param {string} [eAN] A European article number that uniquely identifies the catalog item, manufacturer, and its attributes.
249
- * @param {string} [iSBN] The unique commercial book identifier used to identify books internationally.
250
- * @param {string} [jAN] A Japanese article number that uniquely identifies the product, manufacturer, and its attributes.
240
+ * @param {CatalogApiListCatalogItemsRequest} requestParameters Request parameters.
251
241
  * @param {*} [options] Override http request option.
252
242
  * @throws {RequiredError}
253
243
  */
254
- listCatalogItems(marketplaceId, query, queryContextId, sellerSKU, uPC, eAN, iSBN, jAN, options) {
255
- return localVarFp.listCatalogItems(marketplaceId, query, queryContextId, sellerSKU, uPC, eAN, iSBN, jAN, options).then((request) => request(axios, basePath));
244
+ listCatalogItems(requestParameters, options) {
245
+ return localVarFp.listCatalogItems(requestParameters.marketplaceId, requestParameters.query, requestParameters.queryContextId, requestParameters.sellerSKU, requestParameters.uPC, requestParameters.eAN, requestParameters.iSBN, requestParameters.jAN, options).then((request) => request(axios, basePath));
256
246
  },
257
247
  };
258
248
  };
@@ -15,8 +15,6 @@
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
17
17
  const tslib_1 = require("tslib");
18
- // Some imports not used depending on template conditions
19
- // @ts-ignore
20
18
  const axios_1 = tslib_1.__importDefault(require("axios"));
21
19
  exports.BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
22
20
  /**
@@ -57,10 +55,10 @@ exports.BaseAPI = BaseAPI;
57
55
  */
58
56
  class RequiredError extends Error {
59
57
  field;
60
- name = "RequiredError";
61
58
  constructor(field, msg) {
62
59
  super(msg);
63
60
  this.field = field;
61
+ this.name = "RequiredError";
64
62
  }
65
63
  }
66
64
  exports.RequiredError = RequiredError;
@@ -81,6 +81,8 @@ const setOAuthToObject = async function (object, name, scopes, configuration) {
81
81
  };
82
82
  exports.setOAuthToObject = setOAuthToObject;
83
83
  function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
84
+ if (parameter == null)
85
+ return;
84
86
  if (typeof parameter === "object") {
85
87
  if (Array.isArray(parameter)) {
86
88
  parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
@@ -213,40 +213,30 @@ export const CatalogApiFactory = function (configuration, basePath, axios) {
213
213
  return {
214
214
  /**
215
215
  * Effective September 30, 2022, the `getCatalogItem` operation will no longer be available in the Selling Partner API for Catalog Items v0. This operation is available in the latest version of the [Selling Partner API for Catalog Items v2022-04-01](https://developer-docs.amazon.com/sp-api/docs/catalog-items-api-v2022-04-01-reference). Integrations that rely on this operation should migrate to the latest version to avoid service disruption. _Note:_ The [`listCatalogCategories`](#get-catalogv0categories) operation is not being deprecated and you can continue to make calls to it.
216
- * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for the item.
217
- * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item.
216
+ * @param {CatalogApiGetCatalogItemRequest} requestParameters Request parameters.
218
217
  * @param {*} [options] Override http request option.
219
218
  * @throws {RequiredError}
220
219
  */
221
- getCatalogItem(marketplaceId, asin, options) {
222
- return localVarFp.getCatalogItem(marketplaceId, asin, options).then((request) => request(axios, basePath));
220
+ getCatalogItem(requestParameters, options) {
221
+ return localVarFp.getCatalogItem(requestParameters.marketplaceId, requestParameters.asin, options).then((request) => request(axios, basePath));
223
222
  },
224
223
  /**
225
224
  * 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).
226
- * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for the item.
227
- * @param {string} [aSIN] The Amazon Standard Identification Number (ASIN) of the item.
228
- * @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.
225
+ * @param {CatalogApiListCatalogCategoriesRequest} requestParameters Request parameters.
229
226
  * @param {*} [options] Override http request option.
230
227
  * @throws {RequiredError}
231
228
  */
232
- listCatalogCategories(marketplaceId, aSIN, sellerSKU, options) {
233
- return localVarFp.listCatalogCategories(marketplaceId, aSIN, sellerSKU, options).then((request) => request(axios, basePath));
229
+ listCatalogCategories(requestParameters, options) {
230
+ return localVarFp.listCatalogCategories(requestParameters.marketplaceId, requestParameters.aSIN, requestParameters.sellerSKU, options).then((request) => request(axios, basePath));
234
231
  },
235
232
  /**
236
233
  * Effective September 30, 2022, the `listCatalogItems` operation will no longer be available in the Selling Partner API for Catalog Items v0. As an alternative, `searchCatalogItems` is available in the latest version of the [Selling Partner API for Catalog Items v2022-04-01](https://developer-docs.amazon.com/sp-api/docs/catalog-items-api-v2022-04-01-reference). Integrations that rely on the `listCatalogItems` operation should migrate to the `searchCatalogItems`operation to avoid service disruption. _Note:_ The [`listCatalogCategories`](#get-catalogv0categories) operation is not being deprecated and you can continue to make calls to it.
237
- * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which items are returned.
238
- * @param {string} [query] Keyword(s) to use to search for items in the catalog. Example: \'harry potter books\'.
239
- * @param {string} [queryContextId] An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items.
240
- * @param {string} [sellerSKU] Used to identify an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit.
241
- * @param {string} [uPC] A 12-digit bar code used for retail packaging.
242
- * @param {string} [eAN] A European article number that uniquely identifies the catalog item, manufacturer, and its attributes.
243
- * @param {string} [iSBN] The unique commercial book identifier used to identify books internationally.
244
- * @param {string} [jAN] A Japanese article number that uniquely identifies the product, manufacturer, and its attributes.
234
+ * @param {CatalogApiListCatalogItemsRequest} requestParameters Request parameters.
245
235
  * @param {*} [options] Override http request option.
246
236
  * @throws {RequiredError}
247
237
  */
248
- listCatalogItems(marketplaceId, query, queryContextId, sellerSKU, uPC, eAN, iSBN, jAN, options) {
249
- return localVarFp.listCatalogItems(marketplaceId, query, queryContextId, sellerSKU, uPC, eAN, iSBN, jAN, options).then((request) => request(axios, basePath));
238
+ listCatalogItems(requestParameters, options) {
239
+ return localVarFp.listCatalogItems(requestParameters.marketplaceId, requestParameters.query, requestParameters.queryContextId, requestParameters.sellerSKU, requestParameters.uPC, requestParameters.eAN, requestParameters.iSBN, requestParameters.jAN, options).then((request) => request(axios, basePath));
250
240
  },
251
241
  };
252
242
  };
@@ -11,8 +11,6 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
- // Some imports not used depending on template conditions
15
- // @ts-ignore
16
14
  import globalAxios from 'axios';
17
15
  export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
18
16
  /**
@@ -52,9 +50,9 @@ export class BaseAPI {
52
50
  */
53
51
  export class RequiredError extends Error {
54
52
  field;
55
- name = "RequiredError";
56
53
  constructor(field, msg) {
57
54
  super(msg);
58
55
  this.field = field;
56
+ this.name = "RequiredError";
59
57
  }
60
58
  }
@@ -73,6 +73,8 @@ export const setOAuthToObject = async function (object, name, scopes, configurat
73
73
  }
74
74
  };
75
75
  function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
76
+ if (parameter == null)
77
+ return;
76
78
  if (typeof parameter === "object") {
77
79
  if (Array.isArray(parameter)) {
78
80
  parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
@@ -9,8 +9,8 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
- import { Configuration } from '../configuration';
12
+ import type { Configuration } from '../configuration';
13
+ import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
14
14
  import { RequestArgs, BaseAPI } from '../base';
15
15
  import { GetCatalogItemResponse } from '../models';
16
16
  import { ListCatalogCategoriesResponse } from '../models';
@@ -96,35 +96,25 @@ export declare const CatalogApiFp: (configuration?: Configuration) => {
96
96
  export declare const CatalogApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
97
97
  /**
98
98
  * Effective September 30, 2022, the `getCatalogItem` operation will no longer be available in the Selling Partner API for Catalog Items v0. This operation is available in the latest version of the [Selling Partner API for Catalog Items v2022-04-01](https://developer-docs.amazon.com/sp-api/docs/catalog-items-api-v2022-04-01-reference). Integrations that rely on this operation should migrate to the latest version to avoid service disruption. _Note:_ The [`listCatalogCategories`](#get-catalogv0categories) operation is not being deprecated and you can continue to make calls to it.
99
- * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for the item.
100
- * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item.
99
+ * @param {CatalogApiGetCatalogItemRequest} requestParameters Request parameters.
101
100
  * @param {*} [options] Override http request option.
102
101
  * @throws {RequiredError}
103
102
  */
104
- getCatalogItem(marketplaceId: string, asin: string, options?: any): AxiosPromise<GetCatalogItemResponse>;
103
+ getCatalogItem(requestParameters: CatalogApiGetCatalogItemRequest, options?: AxiosRequestConfig): AxiosPromise<GetCatalogItemResponse>;
105
104
  /**
106
105
  * 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).
107
- * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for the item.
108
- * @param {string} [aSIN] The Amazon Standard Identification Number (ASIN) of the item.
109
- * @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.
106
+ * @param {CatalogApiListCatalogCategoriesRequest} requestParameters Request parameters.
110
107
  * @param {*} [options] Override http request option.
111
108
  * @throws {RequiredError}
112
109
  */
113
- listCatalogCategories(marketplaceId: string, aSIN?: string, sellerSKU?: string, options?: any): AxiosPromise<ListCatalogCategoriesResponse>;
110
+ listCatalogCategories(requestParameters: CatalogApiListCatalogCategoriesRequest, options?: AxiosRequestConfig): AxiosPromise<ListCatalogCategoriesResponse>;
114
111
  /**
115
112
  * Effective September 30, 2022, the `listCatalogItems` operation will no longer be available in the Selling Partner API for Catalog Items v0. As an alternative, `searchCatalogItems` is available in the latest version of the [Selling Partner API for Catalog Items v2022-04-01](https://developer-docs.amazon.com/sp-api/docs/catalog-items-api-v2022-04-01-reference). Integrations that rely on the `listCatalogItems` operation should migrate to the `searchCatalogItems`operation to avoid service disruption. _Note:_ The [`listCatalogCategories`](#get-catalogv0categories) operation is not being deprecated and you can continue to make calls to it.
116
- * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which items are returned.
117
- * @param {string} [query] Keyword(s) to use to search for items in the catalog. Example: \&#39;harry potter books\&#39;.
118
- * @param {string} [queryContextId] An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items.
119
- * @param {string} [sellerSKU] Used to identify an item in the given marketplace. SellerSKU is qualified by the seller\&#39;s SellerId, which is included with every operation that you submit.
120
- * @param {string} [uPC] A 12-digit bar code used for retail packaging.
121
- * @param {string} [eAN] A European article number that uniquely identifies the catalog item, manufacturer, and its attributes.
122
- * @param {string} [iSBN] The unique commercial book identifier used to identify books internationally.
123
- * @param {string} [jAN] A Japanese article number that uniquely identifies the product, manufacturer, and its attributes.
113
+ * @param {CatalogApiListCatalogItemsRequest} requestParameters Request parameters.
124
114
  * @param {*} [options] Override http request option.
125
115
  * @throws {RequiredError}
126
116
  */
127
- listCatalogItems(marketplaceId: string, query?: string, queryContextId?: string, sellerSKU?: string, uPC?: string, eAN?: string, iSBN?: string, jAN?: string, options?: any): AxiosPromise<ListCatalogItemsResponse>;
117
+ listCatalogItems(requestParameters: CatalogApiListCatalogItemsRequest, options?: AxiosRequestConfig): AxiosPromise<ListCatalogItemsResponse>;
128
118
  };
129
119
  /**
130
120
  * Request parameters for getCatalogItem operation in CatalogApi.
@@ -9,8 +9,8 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { Configuration } from "./configuration";
13
- import { AxiosInstance, AxiosRequestConfig } from 'axios';
12
+ import type { Configuration } from './configuration';
13
+ import type { AxiosInstance, AxiosRequestConfig } from 'axios';
14
14
  export declare const BASE_PATH: string;
15
15
  /**
16
16
  *
@@ -50,6 +50,5 @@ export declare class BaseAPI {
50
50
  */
51
51
  export declare class RequiredError extends Error {
52
52
  field: string;
53
- name: "RequiredError";
54
53
  constructor(field: string, msg?: string);
55
54
  }
@@ -10,9 +10,9 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /// <reference types="node" />
13
- import { Configuration } from "./configuration";
14
- import { RequestArgs } from "./base";
15
- import { AxiosInstance, AxiosResponse } from 'axios';
13
+ import type { Configuration } from "./configuration";
14
+ import type { RequestArgs } from "./base";
15
+ import type { AxiosInstance, AxiosResponse } from 'axios';
16
16
  /**
17
17
  *
18
18
  * @export
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@sp-api-sdk/catalog-items-api-v0",
3
3
  "author": "Vincent Mesquita <vincent.mesquita@bizon.solutions>",
4
4
  "description": "The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.",
5
- "version": "1.12.8",
5
+ "version": "1.12.10",
6
6
  "main": "dist/cjs/index.js",
7
7
  "module": "dist/es/index.js",
8
8
  "types": "dist/types/index.d.ts",
@@ -26,7 +26,7 @@
26
26
  "test": "jest"
27
27
  },
28
28
  "dependencies": {
29
- "@sp-api-sdk/common": "^1.9.20",
29
+ "@sp-api-sdk/common": "^1.9.22",
30
30
  "axios": "^0.27.2"
31
31
  },
32
32
  "repository": {
@@ -51,5 +51,5 @@
51
51
  "typedoc": {
52
52
  "entryPoint": "./index.ts"
53
53
  },
54
- "gitHead": "e8ea8ef5b7745f2c4413bd7dd8eefa1b31cee128"
54
+ "gitHead": "19982f06cbbd770bfc7b9f1bc8a42f59b57baead"
55
55
  }