@sp-api-sdk/product-type-definitions-api-2020-09-01 4.0.15 → 4.0.17
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.
- package/dist/cjs/api-model/api/product-type-definitions-api.js +4 -4
- package/dist/cjs/api-model/common.js +1 -0
- package/dist/cjs/api-model/configuration.js +2 -2
- package/dist/cjs/api-model/models/product-type-definition.js +2 -2
- package/dist/cjs/api-model/models/schema-link-link.js +1 -1
- package/dist/es/api-model/api/product-type-definitions-api.js +4 -4
- package/dist/es/api-model/common.js +1 -0
- package/dist/es/api-model/configuration.js +2 -2
- package/dist/es/api-model/models/product-type-definition.js +2 -2
- package/dist/es/api-model/models/schema-link-link.js +1 -1
- package/dist/types/api-model/common.d.ts +1 -1
- package/package.json +4 -4
|
@@ -46,7 +46,7 @@ const ProductTypeDefinitionsApiAxiosParamCreator = function (configuration) {
|
|
|
46
46
|
// verify required parameter 'marketplaceIds' is not null or undefined
|
|
47
47
|
(0, common_1.assertParamExists)('getDefinitionsProductType', 'marketplaceIds', marketplaceIds);
|
|
48
48
|
const localVarPath = `/definitions/2020-09-01/productTypes/{productType}`
|
|
49
|
-
.replace(
|
|
49
|
+
.replace('{productType}', encodeURIComponent(String(productType)));
|
|
50
50
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
51
51
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
52
52
|
let baseOptions;
|
|
@@ -230,11 +230,11 @@ exports.ProductTypeDefinitionsApi = ProductTypeDefinitionsApi;
|
|
|
230
230
|
exports.GetDefinitionsProductTypeRequirementsEnum = {
|
|
231
231
|
Listing: 'LISTING',
|
|
232
232
|
ListingProductOnly: 'LISTING_PRODUCT_ONLY',
|
|
233
|
-
ListingOfferOnly: 'LISTING_OFFER_ONLY'
|
|
233
|
+
ListingOfferOnly: 'LISTING_OFFER_ONLY',
|
|
234
234
|
};
|
|
235
235
|
exports.GetDefinitionsProductTypeRequirementsEnforcedEnum = {
|
|
236
236
|
Enforced: 'ENFORCED',
|
|
237
|
-
NotEnforced: 'NOT_ENFORCED'
|
|
237
|
+
NotEnforced: 'NOT_ENFORCED',
|
|
238
238
|
};
|
|
239
239
|
exports.GetDefinitionsProductTypeLocaleEnum = {
|
|
240
240
|
Default: 'DEFAULT',
|
|
@@ -274,5 +274,5 @@ exports.GetDefinitionsProductTypeLocaleEnum = {
|
|
|
274
274
|
TrTr: 'tr_TR',
|
|
275
275
|
Zh: 'zh',
|
|
276
276
|
ZhCn: 'zh_CN',
|
|
277
|
-
ZhTw: 'zh_TW'
|
|
277
|
+
ZhTw: 'zh_TW',
|
|
278
278
|
};
|
|
@@ -90,6 +90,7 @@ exports.setSearchParams = setSearchParams;
|
|
|
90
90
|
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
|
|
91
91
|
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
|
|
92
92
|
*/
|
|
93
|
+
// @ts-ignore
|
|
93
94
|
const replaceWithSerializableTypeIfNeeded = function (key, value) {
|
|
94
95
|
if (value instanceof Set) {
|
|
95
96
|
return Array.from(value);
|
|
@@ -91,8 +91,8 @@ class Configuration {
|
|
|
91
91
|
* @return True if the given MIME is JSON, false otherwise.
|
|
92
92
|
*/
|
|
93
93
|
isJsonMime(mime) {
|
|
94
|
-
const jsonMime =
|
|
95
|
-
return mime !== null &&
|
|
94
|
+
const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
|
|
95
|
+
return mime !== null && jsonMime.test(mime);
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
exports.Configuration = Configuration;
|
|
@@ -17,9 +17,9 @@ exports.ProductTypeDefinitionRequirementsEnforcedEnum = exports.ProductTypeDefin
|
|
|
17
17
|
exports.ProductTypeDefinitionRequirementsEnum = {
|
|
18
18
|
Listing: 'LISTING',
|
|
19
19
|
ListingProductOnly: 'LISTING_PRODUCT_ONLY',
|
|
20
|
-
ListingOfferOnly: 'LISTING_OFFER_ONLY'
|
|
20
|
+
ListingOfferOnly: 'LISTING_OFFER_ONLY',
|
|
21
21
|
};
|
|
22
22
|
exports.ProductTypeDefinitionRequirementsEnforcedEnum = {
|
|
23
23
|
Enforced: 'ENFORCED',
|
|
24
|
-
NotEnforced: 'NOT_ENFORCED'
|
|
24
|
+
NotEnforced: 'NOT_ENFORCED',
|
|
25
25
|
};
|
|
@@ -40,7 +40,7 @@ export const ProductTypeDefinitionsApiAxiosParamCreator = function (configuratio
|
|
|
40
40
|
// verify required parameter 'marketplaceIds' is not null or undefined
|
|
41
41
|
assertParamExists('getDefinitionsProductType', 'marketplaceIds', marketplaceIds);
|
|
42
42
|
const localVarPath = `/definitions/2020-09-01/productTypes/{productType}`
|
|
43
|
-
.replace(
|
|
43
|
+
.replace('{productType}', encodeURIComponent(String(productType)));
|
|
44
44
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
45
45
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
46
46
|
let baseOptions;
|
|
@@ -220,11 +220,11 @@ export class ProductTypeDefinitionsApi extends BaseAPI {
|
|
|
220
220
|
export const GetDefinitionsProductTypeRequirementsEnum = {
|
|
221
221
|
Listing: 'LISTING',
|
|
222
222
|
ListingProductOnly: 'LISTING_PRODUCT_ONLY',
|
|
223
|
-
ListingOfferOnly: 'LISTING_OFFER_ONLY'
|
|
223
|
+
ListingOfferOnly: 'LISTING_OFFER_ONLY',
|
|
224
224
|
};
|
|
225
225
|
export const GetDefinitionsProductTypeRequirementsEnforcedEnum = {
|
|
226
226
|
Enforced: 'ENFORCED',
|
|
227
|
-
NotEnforced: 'NOT_ENFORCED'
|
|
227
|
+
NotEnforced: 'NOT_ENFORCED',
|
|
228
228
|
};
|
|
229
229
|
export const GetDefinitionsProductTypeLocaleEnum = {
|
|
230
230
|
Default: 'DEFAULT',
|
|
@@ -264,5 +264,5 @@ export const GetDefinitionsProductTypeLocaleEnum = {
|
|
|
264
264
|
TrTr: 'tr_TR',
|
|
265
265
|
Zh: 'zh',
|
|
266
266
|
ZhCn: 'zh_CN',
|
|
267
|
-
ZhTw: 'zh_TW'
|
|
267
|
+
ZhTw: 'zh_TW',
|
|
268
268
|
};
|
|
@@ -81,6 +81,7 @@ export const setSearchParams = function (url, ...objects) {
|
|
|
81
81
|
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
|
|
82
82
|
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
|
|
83
83
|
*/
|
|
84
|
+
// @ts-ignore
|
|
84
85
|
export const replaceWithSerializableTypeIfNeeded = function (key, value) {
|
|
85
86
|
if (value instanceof Set) {
|
|
86
87
|
return Array.from(value);
|
|
@@ -88,7 +88,7 @@ export class Configuration {
|
|
|
88
88
|
* @return True if the given MIME is JSON, false otherwise.
|
|
89
89
|
*/
|
|
90
90
|
isJsonMime(mime) {
|
|
91
|
-
const jsonMime =
|
|
92
|
-
return mime !== null &&
|
|
91
|
+
const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
|
|
92
|
+
return mime !== null && jsonMime.test(mime);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
export const ProductTypeDefinitionRequirementsEnum = {
|
|
15
15
|
Listing: 'LISTING',
|
|
16
16
|
ListingProductOnly: 'LISTING_PRODUCT_ONLY',
|
|
17
|
-
ListingOfferOnly: 'LISTING_OFFER_ONLY'
|
|
17
|
+
ListingOfferOnly: 'LISTING_OFFER_ONLY',
|
|
18
18
|
};
|
|
19
19
|
export const ProductTypeDefinitionRequirementsEnforcedEnum = {
|
|
20
20
|
Enforced: 'ENFORCED',
|
|
21
|
-
NotEnforced: 'NOT_ENFORCED'
|
|
21
|
+
NotEnforced: 'NOT_ENFORCED',
|
|
22
22
|
};
|
|
@@ -28,7 +28,7 @@ export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
|
|
|
28
28
|
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
|
|
29
29
|
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
|
|
30
30
|
*/
|
|
31
|
-
export declare const replaceWithSerializableTypeIfNeeded: (key:
|
|
31
|
+
export declare const replaceWithSerializableTypeIfNeeded: (key: string, value: any) => any;
|
|
32
32
|
export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
|
|
33
33
|
export declare const toPathString: (url: URL) => string;
|
|
34
34
|
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@sp-api-sdk/product-type-definitions-api-2020-09-01",
|
|
3
3
|
"author": "Bertrand Marron <bertrand@bizon.solutions>",
|
|
4
4
|
"description": "The Selling Partner API for Product Type Definitions provides programmatic access to attribute and data requirements for product types in the Amazon catalog. Use this API to return the JSON Schema for a product type that you can then use with other Selling Partner APIs, such as the Selling Partner API for Listings Items, the Selling Partner API for Catalog Items, and the Selling Partner API for Feeds (for JSON-based listing feeds). For more information, see the Product Type Definitions API Use Case Guide.",
|
|
5
|
-
"version": "4.0.
|
|
5
|
+
"version": "4.0.17",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
7
7
|
"module": "dist/es/index.js",
|
|
8
8
|
"types": "dist/types/index.d.ts",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"dist/**/*.d.ts"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@sp-api-sdk/common": "2.1.
|
|
22
|
-
"axios": "^1.
|
|
21
|
+
"@sp-api-sdk/common": "2.1.31",
|
|
22
|
+
"axios": "^1.15.2"
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"sp sdk",
|
|
41
41
|
"product type definitions api"
|
|
42
42
|
],
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "cc3ed7e58346bf7a4110ed8f1353aae840f294e2"
|
|
44
44
|
}
|