@teemill/product-catalog 1.8.0 → 1.9.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.
- package/.openapi-generator/FILES +7 -5
- package/.openapi-generator/VERSION +1 -1
- package/README.md +2 -2
- package/dist/apis/ProductsApi.d.ts +17 -2
- package/dist/apis/ProductsApi.js +69 -1
- package/dist/apis/VariantsApi.d.ts +1 -1
- package/dist/apis/VariantsApi.js +1 -1
- package/dist/models/ApiError.d.ts +1 -1
- package/dist/models/ApiError.js +10 -14
- package/dist/models/Attribute.d.ts +1 -1
- package/dist/models/Attribute.js +15 -18
- package/dist/models/AttributeThumbnail.d.ts +1 -1
- package/dist/models/AttributeThumbnail.js +9 -14
- package/dist/models/CreateProductRequest.d.ts +9 -9
- package/dist/models/CreateProductRequest.js +30 -33
- package/dist/models/CreateProductRequestImagesInner.d.ts +31 -0
- package/dist/models/CreateProductRequestImagesInner.js +45 -0
- package/dist/models/CreateProductRequestSeoMetadata.d.ts +1 -1
- package/dist/models/CreateProductRequestSeoMetadata.js +7 -12
- package/dist/models/CreateProductVariant.d.ts +59 -0
- package/dist/models/CreateProductVariant.js +61 -0
- package/dist/models/CreateProductVariantApplicationsInner.d.ts +63 -0
- package/dist/models/CreateProductVariantApplicationsInner.js +73 -0
- package/dist/models/CreateProductVariantAttributesInner.d.ts +37 -0
- package/dist/models/CreateProductVariantAttributesInner.js +51 -0
- package/dist/models/CreateProductVariantRetailPrice.d.ts +37 -0
- package/dist/models/CreateProductVariantRetailPrice.js +51 -0
- package/dist/models/Image.d.ts +1 -1
- package/dist/models/Image.js +19 -24
- package/dist/models/ImportProducts200Response.d.ts +1 -1
- package/dist/models/ImportProducts200Response.js +7 -12
- package/dist/models/ModelFile.d.ts +31 -0
- package/dist/models/ModelFile.js +45 -0
- package/dist/models/Price.d.ts +1 -1
- package/dist/models/Price.js +9 -14
- package/dist/models/Product.d.ts +1 -1
- package/dist/models/Product.js +32 -35
- package/dist/models/ProductAdditionalFilesInner.d.ts +1 -1
- package/dist/models/ProductAdditionalFilesInner.js +9 -14
- package/dist/models/ProductsResponse.d.ts +1 -1
- package/dist/models/ProductsResponse.js +9 -14
- package/dist/models/SeoMetadata.d.ts +1 -1
- package/dist/models/SeoMetadata.js +7 -12
- package/dist/models/Stock.d.ts +1 -1
- package/dist/models/Stock.js +7 -12
- package/dist/models/UpdateProductRequest.d.ts +87 -0
- package/dist/models/UpdateProductRequest.js +65 -0
- package/dist/models/Variant.d.ts +1 -1
- package/dist/models/Variant.js +33 -36
- package/dist/models/VariantProduct.d.ts +1 -1
- package/dist/models/VariantProduct.js +9 -14
- package/dist/models/VariantsResponse.d.ts +1 -1
- package/dist/models/VariantsResponse.js +9 -14
- package/dist/models/index.d.ts +7 -5
- package/dist/models/index.js +7 -5
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +1 -1
- package/package.json +1 -1
- package/src/apis/ProductsApi.ts +73 -1
- package/src/apis/VariantsApi.ts +1 -1
- package/src/models/ApiError.ts +10 -15
- package/src/models/Attribute.ts +14 -19
- package/src/models/AttributeThumbnail.ts +10 -15
- package/src/models/CreateProductRequest.ts +44 -49
- package/src/models/CreateProductRequestImagesInner.ts +60 -0
- package/src/models/CreateProductRequestSeoMetadata.ts +8 -13
- package/src/models/CreateProductVariant.ts +119 -0
- package/src/models/CreateProductVariantApplicationsInner.ts +103 -0
- package/src/models/CreateProductVariantAttributesInner.ts +70 -0
- package/src/models/CreateProductVariantRetailPrice.ts +70 -0
- package/src/models/Image.ts +20 -25
- package/src/models/ImportProducts200Response.ts +8 -13
- package/src/models/ModelFile.ts +60 -0
- package/src/models/Price.ts +10 -15
- package/src/models/Product.ts +31 -36
- package/src/models/ProductAdditionalFilesInner.ts +10 -15
- package/src/models/ProductsResponse.ts +10 -15
- package/src/models/SeoMetadata.ts +8 -13
- package/src/models/Stock.ts +8 -13
- package/src/models/UpdateProductRequest.ts +145 -0
- package/src/models/Variant.ts +32 -37
- package/src/models/VariantProduct.ts +10 -15
- package/src/models/VariantsResponse.ts +10 -15
- package/src/models/index.ts +7 -5
- package/src/runtime.ts +1 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Product Catalog API
|
|
6
|
+
* Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.9.0
|
|
9
|
+
* Contact: hello@teemill.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.UpdateProductRequestToJSON = exports.UpdateProductRequestFromJSONTyped = exports.UpdateProductRequestFromJSON = exports.instanceOfUpdateProductRequest = void 0;
|
|
17
|
+
var CreateProductRequestSeoMetadata_1 = require("./CreateProductRequestSeoMetadata");
|
|
18
|
+
var CreateProductVariant_1 = require("./CreateProductVariant");
|
|
19
|
+
/**
|
|
20
|
+
* Check if a given object implements the UpdateProductRequest interface.
|
|
21
|
+
*/
|
|
22
|
+
function instanceOfUpdateProductRequest(value) {
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
exports.instanceOfUpdateProductRequest = instanceOfUpdateProductRequest;
|
|
26
|
+
function UpdateProductRequestFromJSON(json) {
|
|
27
|
+
return UpdateProductRequestFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
exports.UpdateProductRequestFromJSON = UpdateProductRequestFromJSON;
|
|
30
|
+
function UpdateProductRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'gfnProductRef': json['gfnProductRef'] == null ? undefined : json['gfnProductRef'],
|
|
36
|
+
'title': json['title'] == null ? undefined : json['title'],
|
|
37
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
38
|
+
'enabled': json['enabled'] == null ? undefined : json['enabled'],
|
|
39
|
+
'slug': json['slug'] == null ? undefined : json['slug'],
|
|
40
|
+
'seoMetadata': json['seoMetadata'] == null ? undefined : (0, CreateProductRequestSeoMetadata_1.CreateProductRequestSeoMetadataFromJSON)(json['seoMetadata']),
|
|
41
|
+
'tags': json['tags'] == null ? undefined : json['tags'],
|
|
42
|
+
'variants': json['variants'] == null ? undefined : (json['variants'].map(CreateProductVariant_1.CreateProductVariantFromJSON)),
|
|
43
|
+
'images': json['images'] == null ? undefined : json['images'],
|
|
44
|
+
'additionalFiles': json['additionalFiles'] == null ? undefined : json['additionalFiles'],
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
exports.UpdateProductRequestFromJSONTyped = UpdateProductRequestFromJSONTyped;
|
|
48
|
+
function UpdateProductRequestToJSON(value) {
|
|
49
|
+
if (value == null) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'gfnProductRef': value['gfnProductRef'],
|
|
54
|
+
'title': value['title'],
|
|
55
|
+
'description': value['description'],
|
|
56
|
+
'enabled': value['enabled'],
|
|
57
|
+
'slug': value['slug'],
|
|
58
|
+
'seoMetadata': (0, CreateProductRequestSeoMetadata_1.CreateProductRequestSeoMetadataToJSON)(value['seoMetadata']),
|
|
59
|
+
'tags': value['tags'],
|
|
60
|
+
'variants': value['variants'] == null ? undefined : (value['variants'].map(CreateProductVariant_1.CreateProductVariantToJSON)),
|
|
61
|
+
'images': value['images'],
|
|
62
|
+
'additionalFiles': value['additionalFiles'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
exports.UpdateProductRequestToJSON = UpdateProductRequestToJSON;
|
package/dist/models/Variant.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Product Catalog API
|
|
3
3
|
* Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.9.0
|
|
6
6
|
* Contact: hello@teemill.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/models/Variant.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Product Catalog API
|
|
6
6
|
* Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 1.
|
|
8
|
+
* The version of the OpenAPI document: 1.9.0
|
|
9
9
|
* Contact: hello@teemill.com
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.VariantToJSON = exports.VariantFromJSONTyped = exports.VariantFromJSON = exports.instanceOfVariant = void 0;
|
|
17
|
-
var runtime_1 = require("../runtime");
|
|
18
17
|
var Attribute_1 = require("./Attribute");
|
|
19
18
|
var Image_1 = require("./Image");
|
|
20
19
|
var Price_1 = require("./Price");
|
|
@@ -24,10 +23,11 @@ var VariantProduct_1 = require("./VariantProduct");
|
|
|
24
23
|
* Check if a given object implements the Variant interface.
|
|
25
24
|
*/
|
|
26
25
|
function instanceOfVariant(value) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
if (!('attributes' in value))
|
|
27
|
+
return false;
|
|
28
|
+
if (!('sku' in value))
|
|
29
|
+
return false;
|
|
30
|
+
return true;
|
|
31
31
|
}
|
|
32
32
|
exports.instanceOfVariant = instanceOfVariant;
|
|
33
33
|
function VariantFromJSON(json) {
|
|
@@ -35,47 +35,44 @@ function VariantFromJSON(json) {
|
|
|
35
35
|
}
|
|
36
36
|
exports.VariantFromJSON = VariantFromJSON;
|
|
37
37
|
function VariantFromJSONTyped(json, ignoreDiscriminator) {
|
|
38
|
-
if (
|
|
38
|
+
if (json == null) {
|
|
39
39
|
return json;
|
|
40
40
|
}
|
|
41
41
|
return {
|
|
42
|
-
'id':
|
|
42
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
43
43
|
'attributes': (json['attributes'].map(Attribute_1.AttributeFromJSON)),
|
|
44
44
|
'sku': json['sku'],
|
|
45
|
-
'ref':
|
|
46
|
-
'product':
|
|
47
|
-
'sortOrder':
|
|
48
|
-
'retailPrice':
|
|
49
|
-
'salePrice':
|
|
50
|
-
'price':
|
|
51
|
-
'stock':
|
|
52
|
-
'createdAt':
|
|
53
|
-
'updatedAt':
|
|
54
|
-
'publishedAt':
|
|
55
|
-
'images':
|
|
45
|
+
'ref': json['ref'] == null ? undefined : json['ref'],
|
|
46
|
+
'product': json['product'] == null ? undefined : (0, VariantProduct_1.VariantProductFromJSON)(json['product']),
|
|
47
|
+
'sortOrder': json['sortOrder'] == null ? undefined : json['sortOrder'],
|
|
48
|
+
'retailPrice': json['retailPrice'] == null ? undefined : (0, Price_1.PriceFromJSON)(json['retailPrice']),
|
|
49
|
+
'salePrice': json['salePrice'] == null ? undefined : (0, Price_1.PriceFromJSON)(json['salePrice']),
|
|
50
|
+
'price': json['price'] == null ? undefined : (0, Price_1.PriceFromJSON)(json['price']),
|
|
51
|
+
'stock': json['stock'] == null ? undefined : (0, Stock_1.StockFromJSON)(json['stock']),
|
|
52
|
+
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
53
|
+
'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
|
|
54
|
+
'publishedAt': json['publishedAt'] == null ? undefined : (new Date(json['publishedAt'])),
|
|
55
|
+
'images': json['images'] == null ? undefined : (json['images'].map(Image_1.ImageFromJSON)),
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
exports.VariantFromJSONTyped = VariantFromJSONTyped;
|
|
59
59
|
function VariantToJSON(value) {
|
|
60
|
-
if (value
|
|
61
|
-
return
|
|
62
|
-
}
|
|
63
|
-
if (value === null) {
|
|
64
|
-
return null;
|
|
60
|
+
if (value == null) {
|
|
61
|
+
return value;
|
|
65
62
|
}
|
|
66
63
|
return {
|
|
67
|
-
'id': value
|
|
68
|
-
'attributes': (value
|
|
69
|
-
'sku': value
|
|
70
|
-
'ref': value
|
|
71
|
-
'product': (0, VariantProduct_1.VariantProductToJSON)(value
|
|
72
|
-
'retailPrice': (0, Price_1.PriceToJSON)(value
|
|
73
|
-
'salePrice': (0, Price_1.PriceToJSON)(value
|
|
74
|
-
'stock': (0, Stock_1.StockToJSON)(value
|
|
75
|
-
'createdAt': value
|
|
76
|
-
'updatedAt': value
|
|
77
|
-
'publishedAt': value
|
|
78
|
-
'images': value
|
|
64
|
+
'id': value['id'],
|
|
65
|
+
'attributes': (value['attributes'].map(Attribute_1.AttributeToJSON)),
|
|
66
|
+
'sku': value['sku'],
|
|
67
|
+
'ref': value['ref'],
|
|
68
|
+
'product': (0, VariantProduct_1.VariantProductToJSON)(value['product']),
|
|
69
|
+
'retailPrice': (0, Price_1.PriceToJSON)(value['retailPrice']),
|
|
70
|
+
'salePrice': (0, Price_1.PriceToJSON)(value['salePrice']),
|
|
71
|
+
'stock': (0, Stock_1.StockToJSON)(value['stock']),
|
|
72
|
+
'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
|
73
|
+
'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
|
|
74
|
+
'publishedAt': value['publishedAt'] == null ? undefined : ((value['publishedAt']).toISOString()),
|
|
75
|
+
'images': value['images'] == null ? undefined : (value['images'].map(Image_1.ImageToJSON)),
|
|
79
76
|
};
|
|
80
77
|
}
|
|
81
78
|
exports.VariantToJSON = VariantToJSON;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Product Catalog API
|
|
3
3
|
* Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.9.0
|
|
6
6
|
* Contact: hello@teemill.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Product Catalog API
|
|
6
6
|
* Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 1.
|
|
8
|
+
* The version of the OpenAPI document: 1.9.0
|
|
9
9
|
* Contact: hello@teemill.com
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -14,13 +14,11 @@
|
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.VariantProductToJSON = exports.VariantProductFromJSONTyped = exports.VariantProductFromJSON = exports.instanceOfVariantProduct = void 0;
|
|
17
|
-
var runtime_1 = require("../runtime");
|
|
18
17
|
/**
|
|
19
18
|
* Check if a given object implements the VariantProduct interface.
|
|
20
19
|
*/
|
|
21
20
|
function instanceOfVariantProduct(value) {
|
|
22
|
-
|
|
23
|
-
return isInstance;
|
|
21
|
+
return true;
|
|
24
22
|
}
|
|
25
23
|
exports.instanceOfVariantProduct = instanceOfVariantProduct;
|
|
26
24
|
function VariantProductFromJSON(json) {
|
|
@@ -28,25 +26,22 @@ function VariantProductFromJSON(json) {
|
|
|
28
26
|
}
|
|
29
27
|
exports.VariantProductFromJSON = VariantProductFromJSON;
|
|
30
28
|
function VariantProductFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
-
if (
|
|
29
|
+
if (json == null) {
|
|
32
30
|
return json;
|
|
33
31
|
}
|
|
34
32
|
return {
|
|
35
|
-
'id':
|
|
36
|
-
'ref':
|
|
33
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
34
|
+
'ref': json['ref'] == null ? undefined : json['ref'],
|
|
37
35
|
};
|
|
38
36
|
}
|
|
39
37
|
exports.VariantProductFromJSONTyped = VariantProductFromJSONTyped;
|
|
40
38
|
function VariantProductToJSON(value) {
|
|
41
|
-
if (value
|
|
42
|
-
return
|
|
43
|
-
}
|
|
44
|
-
if (value === null) {
|
|
45
|
-
return null;
|
|
39
|
+
if (value == null) {
|
|
40
|
+
return value;
|
|
46
41
|
}
|
|
47
42
|
return {
|
|
48
|
-
'id': value
|
|
49
|
-
'ref': value
|
|
43
|
+
'id': value['id'],
|
|
44
|
+
'ref': value['ref'],
|
|
50
45
|
};
|
|
51
46
|
}
|
|
52
47
|
exports.VariantProductToJSON = VariantProductToJSON;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Product Catalog API
|
|
3
3
|
* Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.9.0
|
|
6
6
|
* Contact: hello@teemill.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Product Catalog API
|
|
6
6
|
* Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 1.
|
|
8
|
+
* The version of the OpenAPI document: 1.9.0
|
|
9
9
|
* Contact: hello@teemill.com
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -14,14 +14,12 @@
|
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.VariantsResponseToJSON = exports.VariantsResponseFromJSONTyped = exports.VariantsResponseFromJSON = exports.instanceOfVariantsResponse = void 0;
|
|
17
|
-
var runtime_1 = require("../runtime");
|
|
18
17
|
var Variant_1 = require("./Variant");
|
|
19
18
|
/**
|
|
20
19
|
* Check if a given object implements the VariantsResponse interface.
|
|
21
20
|
*/
|
|
22
21
|
function instanceOfVariantsResponse(value) {
|
|
23
|
-
|
|
24
|
-
return isInstance;
|
|
22
|
+
return true;
|
|
25
23
|
}
|
|
26
24
|
exports.instanceOfVariantsResponse = instanceOfVariantsResponse;
|
|
27
25
|
function VariantsResponseFromJSON(json) {
|
|
@@ -29,25 +27,22 @@ function VariantsResponseFromJSON(json) {
|
|
|
29
27
|
}
|
|
30
28
|
exports.VariantsResponseFromJSON = VariantsResponseFromJSON;
|
|
31
29
|
function VariantsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
-
if (
|
|
30
|
+
if (json == null) {
|
|
33
31
|
return json;
|
|
34
32
|
}
|
|
35
33
|
return {
|
|
36
|
-
'variants':
|
|
37
|
-
'nextPageToken':
|
|
34
|
+
'variants': json['variants'] == null ? undefined : (json['variants'].map(Variant_1.VariantFromJSON)),
|
|
35
|
+
'nextPageToken': json['nextPageToken'] == null ? undefined : json['nextPageToken'],
|
|
38
36
|
};
|
|
39
37
|
}
|
|
40
38
|
exports.VariantsResponseFromJSONTyped = VariantsResponseFromJSONTyped;
|
|
41
39
|
function VariantsResponseToJSON(value) {
|
|
42
|
-
if (value
|
|
43
|
-
return
|
|
44
|
-
}
|
|
45
|
-
if (value === null) {
|
|
46
|
-
return null;
|
|
40
|
+
if (value == null) {
|
|
41
|
+
return value;
|
|
47
42
|
}
|
|
48
43
|
return {
|
|
49
|
-
'variants': value
|
|
50
|
-
'nextPageToken': value
|
|
44
|
+
'variants': value['variants'] == null ? undefined : (value['variants'].map(Variant_1.VariantToJSON)),
|
|
45
|
+
'nextPageToken': value['nextPageToken'],
|
|
51
46
|
};
|
|
52
47
|
}
|
|
53
48
|
exports.VariantsResponseToJSON = VariantsResponseToJSON;
|
package/dist/models/index.d.ts
CHANGED
|
@@ -2,20 +2,22 @@ export * from './ApiError';
|
|
|
2
2
|
export * from './Attribute';
|
|
3
3
|
export * from './AttributeThumbnail';
|
|
4
4
|
export * from './CreateProductRequest';
|
|
5
|
+
export * from './CreateProductRequestImagesInner';
|
|
5
6
|
export * from './CreateProductRequestSeoMetadata';
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './CreateProductRequestVariantsInnerRetailPrice';
|
|
7
|
+
export * from './CreateProductVariant';
|
|
8
|
+
export * from './CreateProductVariantApplicationsInner';
|
|
9
|
+
export * from './CreateProductVariantAttributesInner';
|
|
10
|
+
export * from './CreateProductVariantRetailPrice';
|
|
11
11
|
export * from './Image';
|
|
12
12
|
export * from './ImportProducts200Response';
|
|
13
|
+
export * from './ModelFile';
|
|
13
14
|
export * from './Price';
|
|
14
15
|
export * from './Product';
|
|
15
16
|
export * from './ProductAdditionalFilesInner';
|
|
16
17
|
export * from './ProductsResponse';
|
|
17
18
|
export * from './SeoMetadata';
|
|
18
19
|
export * from './Stock';
|
|
20
|
+
export * from './UpdateProductRequest';
|
|
19
21
|
export * from './Variant';
|
|
20
22
|
export * from './VariantProduct';
|
|
21
23
|
export * from './VariantsResponse';
|
package/dist/models/index.js
CHANGED
|
@@ -20,20 +20,22 @@ __exportStar(require("./ApiError"), exports);
|
|
|
20
20
|
__exportStar(require("./Attribute"), exports);
|
|
21
21
|
__exportStar(require("./AttributeThumbnail"), exports);
|
|
22
22
|
__exportStar(require("./CreateProductRequest"), exports);
|
|
23
|
+
__exportStar(require("./CreateProductRequestImagesInner"), exports);
|
|
23
24
|
__exportStar(require("./CreateProductRequestSeoMetadata"), exports);
|
|
24
|
-
__exportStar(require("./
|
|
25
|
-
__exportStar(require("./
|
|
26
|
-
__exportStar(require("./
|
|
27
|
-
__exportStar(require("./
|
|
28
|
-
__exportStar(require("./CreateProductRequestVariantsInnerRetailPrice"), exports);
|
|
25
|
+
__exportStar(require("./CreateProductVariant"), exports);
|
|
26
|
+
__exportStar(require("./CreateProductVariantApplicationsInner"), exports);
|
|
27
|
+
__exportStar(require("./CreateProductVariantAttributesInner"), exports);
|
|
28
|
+
__exportStar(require("./CreateProductVariantRetailPrice"), exports);
|
|
29
29
|
__exportStar(require("./Image"), exports);
|
|
30
30
|
__exportStar(require("./ImportProducts200Response"), exports);
|
|
31
|
+
__exportStar(require("./ModelFile"), exports);
|
|
31
32
|
__exportStar(require("./Price"), exports);
|
|
32
33
|
__exportStar(require("./Product"), exports);
|
|
33
34
|
__exportStar(require("./ProductAdditionalFilesInner"), exports);
|
|
34
35
|
__exportStar(require("./ProductsResponse"), exports);
|
|
35
36
|
__exportStar(require("./SeoMetadata"), exports);
|
|
36
37
|
__exportStar(require("./Stock"), exports);
|
|
38
|
+
__exportStar(require("./UpdateProductRequest"), exports);
|
|
37
39
|
__exportStar(require("./Variant"), exports);
|
|
38
40
|
__exportStar(require("./VariantProduct"), exports);
|
|
39
41
|
__exportStar(require("./VariantsResponse"), exports);
|
package/dist/runtime.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Product Catalog API
|
|
3
3
|
* Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.9.0
|
|
6
6
|
* Contact: hello@teemill.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/runtime.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Product Catalog API
|
|
6
6
|
* Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 1.
|
|
8
|
+
* The version of the OpenAPI document: 1.9.0
|
|
9
9
|
* Contact: hello@teemill.com
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/package.json
CHANGED
package/src/apis/ProductsApi.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Product Catalog API
|
|
5
5
|
* Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.9.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -20,6 +20,7 @@ import type {
|
|
|
20
20
|
ImportProducts200Response,
|
|
21
21
|
Product,
|
|
22
22
|
ProductsResponse,
|
|
23
|
+
UpdateProductRequest,
|
|
23
24
|
} from '../models/index';
|
|
24
25
|
import {
|
|
25
26
|
ApiErrorFromJSON,
|
|
@@ -32,6 +33,8 @@ import {
|
|
|
32
33
|
ProductToJSON,
|
|
33
34
|
ProductsResponseFromJSON,
|
|
34
35
|
ProductsResponseToJSON,
|
|
36
|
+
UpdateProductRequestFromJSON,
|
|
37
|
+
UpdateProductRequestToJSON,
|
|
35
38
|
} from '../models/index';
|
|
36
39
|
|
|
37
40
|
export interface CreateProductOperationRequest {
|
|
@@ -58,6 +61,12 @@ export interface ImportProductsRequest {
|
|
|
58
61
|
body?: string;
|
|
59
62
|
}
|
|
60
63
|
|
|
64
|
+
export interface UpdateProductOperationRequest {
|
|
65
|
+
project: string;
|
|
66
|
+
productId: string;
|
|
67
|
+
updateProductRequest?: UpdateProductRequest;
|
|
68
|
+
}
|
|
69
|
+
|
|
61
70
|
/**
|
|
62
71
|
*
|
|
63
72
|
*/
|
|
@@ -317,4 +326,67 @@ export class ProductsApi extends runtime.BaseAPI {
|
|
|
317
326
|
return await response.value();
|
|
318
327
|
}
|
|
319
328
|
|
|
329
|
+
/**
|
|
330
|
+
* Updates a product by a given ID.
|
|
331
|
+
* Update product
|
|
332
|
+
*/
|
|
333
|
+
async updateProductRaw(requestParameters: UpdateProductOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Product>> {
|
|
334
|
+
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
335
|
+
throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling updateProduct.');
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
if (requestParameters.productId === null || requestParameters.productId === undefined) {
|
|
339
|
+
throw new runtime.RequiredError('productId','Required parameter requestParameters.productId was null or undefined when calling updateProduct.');
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
const queryParameters: any = {};
|
|
343
|
+
|
|
344
|
+
if (requestParameters.project !== undefined) {
|
|
345
|
+
queryParameters['project'] = requestParameters.project;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
349
|
+
|
|
350
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
351
|
+
|
|
352
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
353
|
+
// oauth required
|
|
354
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
358
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
const response = await this.request({
|
|
362
|
+
path: `/v1/catalog/products/{productId}`.replace(`{${"productId"}}`, encodeURIComponent(String(requestParameters.productId))),
|
|
363
|
+
method: 'PATCH',
|
|
364
|
+
headers: headerParameters,
|
|
365
|
+
query: queryParameters,
|
|
366
|
+
body: UpdateProductRequestToJSON(requestParameters.updateProductRequest),
|
|
367
|
+
}, initOverrides);
|
|
368
|
+
|
|
369
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ProductFromJSON(jsonValue));
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Updates a product by a given ID.
|
|
374
|
+
* Update product
|
|
375
|
+
*/
|
|
376
|
+
async updateProduct(
|
|
377
|
+
project: string, productId: string,
|
|
378
|
+
optionalParameters: runtime.OptionalOnly<UpdateProductOperationRequest> = {},
|
|
379
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
380
|
+
): Promise<Product> {
|
|
381
|
+
const response = await this.updateProductRaw(
|
|
382
|
+
{
|
|
383
|
+
project: project,productId: productId,
|
|
384
|
+
...optionalParameters,
|
|
385
|
+
},
|
|
386
|
+
initOverrides
|
|
387
|
+
);
|
|
388
|
+
|
|
389
|
+
return await response.value();
|
|
390
|
+
}
|
|
391
|
+
|
|
320
392
|
}
|
package/src/apis/VariantsApi.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Product Catalog API
|
|
5
5
|
* Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.9.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/src/models/ApiError.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Product Catalog API
|
|
5
5
|
* Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.9.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
* @export
|
|
@@ -37,10 +37,8 @@ export interface ApiError {
|
|
|
37
37
|
* Check if a given object implements the ApiError interface.
|
|
38
38
|
*/
|
|
39
39
|
export function instanceOfApiError(value: object): boolean {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return isInstance;
|
|
40
|
+
if (!('message' in value)) return false;
|
|
41
|
+
return true;
|
|
44
42
|
}
|
|
45
43
|
|
|
46
44
|
export function ApiErrorFromJSON(json: any): ApiError {
|
|
@@ -48,27 +46,24 @@ export function ApiErrorFromJSON(json: any): ApiError {
|
|
|
48
46
|
}
|
|
49
47
|
|
|
50
48
|
export function ApiErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiError {
|
|
51
|
-
if (
|
|
49
|
+
if (json == null) {
|
|
52
50
|
return json;
|
|
53
51
|
}
|
|
54
52
|
return {
|
|
55
53
|
|
|
56
|
-
'code':
|
|
54
|
+
'code': json['code'] == null ? undefined : json['code'],
|
|
57
55
|
'message': json['message'],
|
|
58
56
|
};
|
|
59
57
|
}
|
|
60
58
|
|
|
61
59
|
export function ApiErrorToJSON(value?: ApiError | null): any {
|
|
62
|
-
if (value
|
|
63
|
-
return
|
|
64
|
-
}
|
|
65
|
-
if (value === null) {
|
|
66
|
-
return null;
|
|
60
|
+
if (value == null) {
|
|
61
|
+
return value;
|
|
67
62
|
}
|
|
68
63
|
return {
|
|
69
64
|
|
|
70
|
-
'code': value
|
|
71
|
-
'message': value
|
|
65
|
+
'code': value['code'],
|
|
66
|
+
'message': value['message'],
|
|
72
67
|
};
|
|
73
68
|
}
|
|
74
69
|
|