@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,70 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Product Catalog API
|
|
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
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.9.0
|
|
8
|
+
* Contact: hello@teemill.com
|
|
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
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface CreateProductVariantAttributesInner
|
|
20
|
+
*/
|
|
21
|
+
export interface CreateProductVariantAttributesInner {
|
|
22
|
+
/**
|
|
23
|
+
* Attribute name
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof CreateProductVariantAttributesInner
|
|
26
|
+
*/
|
|
27
|
+
name: string;
|
|
28
|
+
/**
|
|
29
|
+
* Attribute value
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof CreateProductVariantAttributesInner
|
|
32
|
+
*/
|
|
33
|
+
value: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the CreateProductVariantAttributesInner interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfCreateProductVariantAttributesInner(value: object): boolean {
|
|
40
|
+
if (!('name' in value)) return false;
|
|
41
|
+
if (!('value' in value)) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function CreateProductVariantAttributesInnerFromJSON(json: any): CreateProductVariantAttributesInner {
|
|
46
|
+
return CreateProductVariantAttributesInnerFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function CreateProductVariantAttributesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateProductVariantAttributesInner {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'name': json['name'],
|
|
56
|
+
'value': json['value'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function CreateProductVariantAttributesInnerToJSON(value?: CreateProductVariantAttributesInner | null): any {
|
|
61
|
+
if (value == null) {
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
|
|
66
|
+
'name': value['name'],
|
|
67
|
+
'value': value['value'],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Product Catalog API
|
|
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
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.9.0
|
|
8
|
+
* Contact: hello@teemill.com
|
|
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
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Variant retail price including tax.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface CreateProductVariantRetailPrice
|
|
20
|
+
*/
|
|
21
|
+
export interface CreateProductVariantRetailPrice {
|
|
22
|
+
/**
|
|
23
|
+
* Price including tax in the specified currency.
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof CreateProductVariantRetailPrice
|
|
26
|
+
*/
|
|
27
|
+
amount: number;
|
|
28
|
+
/**
|
|
29
|
+
* Currency code for the currency the price is valued in.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof CreateProductVariantRetailPrice
|
|
32
|
+
*/
|
|
33
|
+
currencyCode: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the CreateProductVariantRetailPrice interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfCreateProductVariantRetailPrice(value: object): boolean {
|
|
40
|
+
if (!('amount' in value)) return false;
|
|
41
|
+
if (!('currencyCode' in value)) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function CreateProductVariantRetailPriceFromJSON(json: any): CreateProductVariantRetailPrice {
|
|
46
|
+
return CreateProductVariantRetailPriceFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function CreateProductVariantRetailPriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateProductVariantRetailPrice {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'amount': json['amount'],
|
|
56
|
+
'currencyCode': json['currencyCode'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function CreateProductVariantRetailPriceToJSON(value?: CreateProductVariantRetailPrice | null): any {
|
|
61
|
+
if (value == null) {
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
|
|
66
|
+
'amount': value['amount'],
|
|
67
|
+
'currencyCode': value['currencyCode'],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
package/src/models/Image.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
|
* Image description
|
|
18
18
|
* @export
|
|
@@ -67,9 +67,7 @@ export interface Image {
|
|
|
67
67
|
* Check if a given object implements the Image interface.
|
|
68
68
|
*/
|
|
69
69
|
export function instanceOfImage(value: object): boolean {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
return isInstance;
|
|
70
|
+
return true;
|
|
73
71
|
}
|
|
74
72
|
|
|
75
73
|
export function ImageFromJSON(json: any): Image {
|
|
@@ -77,37 +75,34 @@ export function ImageFromJSON(json: any): Image {
|
|
|
77
75
|
}
|
|
78
76
|
|
|
79
77
|
export function ImageFromJSONTyped(json: any, ignoreDiscriminator: boolean): Image {
|
|
80
|
-
if (
|
|
78
|
+
if (json == null) {
|
|
81
79
|
return json;
|
|
82
80
|
}
|
|
83
81
|
return {
|
|
84
82
|
|
|
85
|
-
'id':
|
|
86
|
-
'src':
|
|
87
|
-
'alt':
|
|
88
|
-
'variantIds':
|
|
89
|
-
'sortOrder':
|
|
90
|
-
'createdAt':
|
|
91
|
-
'updatedAt':
|
|
83
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
84
|
+
'src': json['src'] == null ? undefined : json['src'],
|
|
85
|
+
'alt': json['alt'] == null ? undefined : json['alt'],
|
|
86
|
+
'variantIds': json['variantIds'] == null ? undefined : json['variantIds'],
|
|
87
|
+
'sortOrder': json['sortOrder'] == null ? undefined : json['sortOrder'],
|
|
88
|
+
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
|
|
89
|
+
'updatedAt': json['updatedAt'] == null ? undefined : json['updatedAt'],
|
|
92
90
|
};
|
|
93
91
|
}
|
|
94
92
|
|
|
95
93
|
export function ImageToJSON(value?: Image | null): any {
|
|
96
|
-
if (value
|
|
97
|
-
return
|
|
98
|
-
}
|
|
99
|
-
if (value === null) {
|
|
100
|
-
return null;
|
|
94
|
+
if (value == null) {
|
|
95
|
+
return value;
|
|
101
96
|
}
|
|
102
97
|
return {
|
|
103
98
|
|
|
104
|
-
'id': value
|
|
105
|
-
'src': value
|
|
106
|
-
'alt': value
|
|
107
|
-
'variantIds': value
|
|
108
|
-
'sortOrder': value
|
|
109
|
-
'createdAt': value
|
|
110
|
-
'updatedAt': value
|
|
99
|
+
'id': value['id'],
|
|
100
|
+
'src': value['src'],
|
|
101
|
+
'alt': value['alt'],
|
|
102
|
+
'variantIds': value['variantIds'],
|
|
103
|
+
'sortOrder': value['sortOrder'],
|
|
104
|
+
'createdAt': value['createdAt'],
|
|
105
|
+
'updatedAt': value['updatedAt'],
|
|
111
106
|
};
|
|
112
107
|
}
|
|
113
108
|
|
|
@@ -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
|
|
@@ -31,9 +31,7 @@ export interface ImportProducts200Response {
|
|
|
31
31
|
* Check if a given object implements the ImportProducts200Response interface.
|
|
32
32
|
*/
|
|
33
33
|
export function instanceOfImportProducts200Response(value: object): boolean {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return isInstance;
|
|
34
|
+
return true;
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
export function ImportProducts200ResponseFromJSON(json: any): ImportProducts200Response {
|
|
@@ -41,25 +39,22 @@ export function ImportProducts200ResponseFromJSON(json: any): ImportProducts200R
|
|
|
41
39
|
}
|
|
42
40
|
|
|
43
41
|
export function ImportProducts200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImportProducts200Response {
|
|
44
|
-
if (
|
|
42
|
+
if (json == null) {
|
|
45
43
|
return json;
|
|
46
44
|
}
|
|
47
45
|
return {
|
|
48
46
|
|
|
49
|
-
'importId':
|
|
47
|
+
'importId': json['importId'] == null ? undefined : json['importId'],
|
|
50
48
|
};
|
|
51
49
|
}
|
|
52
50
|
|
|
53
51
|
export function ImportProducts200ResponseToJSON(value?: ImportProducts200Response | null): any {
|
|
54
|
-
if (value
|
|
55
|
-
return
|
|
56
|
-
}
|
|
57
|
-
if (value === null) {
|
|
58
|
-
return null;
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
59
54
|
}
|
|
60
55
|
return {
|
|
61
56
|
|
|
62
|
-
'importId': value
|
|
57
|
+
'importId': value['importId'],
|
|
63
58
|
};
|
|
64
59
|
}
|
|
65
60
|
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Product Catalog API
|
|
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
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.9.0
|
|
8
|
+
* Contact: hello@teemill.com
|
|
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
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ModelFile
|
|
20
|
+
*/
|
|
21
|
+
export interface ModelFile {
|
|
22
|
+
/**
|
|
23
|
+
* Publicly available file URL.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ModelFile
|
|
26
|
+
*/
|
|
27
|
+
src?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the ModelFile interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfModelFile(value: object): boolean {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function ModelFileFromJSON(json: any): ModelFile {
|
|
38
|
+
return ModelFileFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function ModelFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelFile {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
|
|
47
|
+
'src': json['src'] == null ? undefined : json['src'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function ModelFileToJSON(value?: ModelFile | null): any {
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
|
|
57
|
+
'src': value['src'],
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
package/src/models/Price.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
|
* Standard price definition that defines the amount, tax rate and currency.
|
|
18
18
|
* @export
|
|
@@ -37,9 +37,7 @@ export interface Price {
|
|
|
37
37
|
* Check if a given object implements the Price interface.
|
|
38
38
|
*/
|
|
39
39
|
export function instanceOfPrice(value: object): boolean {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return isInstance;
|
|
40
|
+
return true;
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
export function PriceFromJSON(json: any): Price {
|
|
@@ -47,27 +45,24 @@ export function PriceFromJSON(json: any): Price {
|
|
|
47
45
|
}
|
|
48
46
|
|
|
49
47
|
export function PriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Price {
|
|
50
|
-
if (
|
|
48
|
+
if (json == null) {
|
|
51
49
|
return json;
|
|
52
50
|
}
|
|
53
51
|
return {
|
|
54
52
|
|
|
55
|
-
'amount':
|
|
56
|
-
'currencyCode':
|
|
53
|
+
'amount': json['amount'] == null ? undefined : json['amount'],
|
|
54
|
+
'currencyCode': json['currencyCode'] == null ? undefined : json['currencyCode'],
|
|
57
55
|
};
|
|
58
56
|
}
|
|
59
57
|
|
|
60
58
|
export function PriceToJSON(value?: Price | null): any {
|
|
61
|
-
if (value
|
|
62
|
-
return
|
|
63
|
-
}
|
|
64
|
-
if (value === null) {
|
|
65
|
-
return null;
|
|
59
|
+
if (value == null) {
|
|
60
|
+
return value;
|
|
66
61
|
}
|
|
67
62
|
return {
|
|
68
63
|
|
|
69
|
-
'amount': value
|
|
70
|
-
'currencyCode': value
|
|
64
|
+
'amount': value['amount'],
|
|
65
|
+
'currencyCode': value['currencyCode'],
|
|
71
66
|
};
|
|
72
67
|
}
|
|
73
68
|
|
package/src/models/Product.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
|
import type { Image } from './Image';
|
|
17
17
|
import {
|
|
18
18
|
ImageFromJSON,
|
|
@@ -128,11 +128,9 @@ export interface Product {
|
|
|
128
128
|
* Check if a given object implements the Product interface.
|
|
129
129
|
*/
|
|
130
130
|
export function instanceOfProduct(value: object): boolean {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
return isInstance;
|
|
131
|
+
if (!('title' in value)) return false;
|
|
132
|
+
if (!('description' in value)) return false;
|
|
133
|
+
return true;
|
|
136
134
|
}
|
|
137
135
|
|
|
138
136
|
export function ProductFromJSON(json: any): Product {
|
|
@@ -140,48 +138,45 @@ export function ProductFromJSON(json: any): Product {
|
|
|
140
138
|
}
|
|
141
139
|
|
|
142
140
|
export function ProductFromJSONTyped(json: any, ignoreDiscriminator: boolean): Product {
|
|
143
|
-
if (
|
|
141
|
+
if (json == null) {
|
|
144
142
|
return json;
|
|
145
143
|
}
|
|
146
144
|
return {
|
|
147
145
|
|
|
148
|
-
'id':
|
|
149
|
-
'ref':
|
|
146
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
147
|
+
'ref': json['ref'] == null ? undefined : json['ref'],
|
|
150
148
|
'title': json['title'],
|
|
151
149
|
'description': json['description'],
|
|
152
|
-
'slug':
|
|
153
|
-
'seoMetadata':
|
|
154
|
-
'tags':
|
|
155
|
-
'createdAt':
|
|
156
|
-
'updatedAt':
|
|
157
|
-
'publishedAt':
|
|
158
|
-
'images':
|
|
159
|
-
'variants':
|
|
160
|
-
'additionalFiles':
|
|
150
|
+
'slug': json['slug'] == null ? undefined : json['slug'],
|
|
151
|
+
'seoMetadata': json['seoMetadata'] == null ? undefined : SeoMetadataFromJSON(json['seoMetadata']),
|
|
152
|
+
'tags': json['tags'] == null ? undefined : json['tags'],
|
|
153
|
+
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
154
|
+
'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
|
|
155
|
+
'publishedAt': json['publishedAt'] == null ? undefined : (new Date(json['publishedAt'])),
|
|
156
|
+
'images': json['images'] == null ? undefined : ((json['images'] as Array<any>).map(ImageFromJSON)),
|
|
157
|
+
'variants': json['variants'] == null ? undefined : ((json['variants'] as Array<any>).map(VariantFromJSON)),
|
|
158
|
+
'additionalFiles': json['additionalFiles'] == null ? undefined : ((json['additionalFiles'] as Array<any>).map(ProductAdditionalFilesInnerFromJSON)),
|
|
161
159
|
};
|
|
162
160
|
}
|
|
163
161
|
|
|
164
162
|
export function ProductToJSON(value?: Product | null): any {
|
|
165
|
-
if (value
|
|
166
|
-
return
|
|
167
|
-
}
|
|
168
|
-
if (value === null) {
|
|
169
|
-
return null;
|
|
163
|
+
if (value == null) {
|
|
164
|
+
return value;
|
|
170
165
|
}
|
|
171
166
|
return {
|
|
172
167
|
|
|
173
|
-
'id': value
|
|
174
|
-
'ref': value
|
|
175
|
-
'title': value
|
|
176
|
-
'description': value
|
|
177
|
-
'seoMetadata': SeoMetadataToJSON(value
|
|
178
|
-
'tags': value
|
|
179
|
-
'createdAt': value
|
|
180
|
-
'updatedAt': value
|
|
181
|
-
'publishedAt': value
|
|
182
|
-
'images': value
|
|
183
|
-
'variants': value
|
|
184
|
-
'additionalFiles': value
|
|
168
|
+
'id': value['id'],
|
|
169
|
+
'ref': value['ref'],
|
|
170
|
+
'title': value['title'],
|
|
171
|
+
'description': value['description'],
|
|
172
|
+
'seoMetadata': SeoMetadataToJSON(value['seoMetadata']),
|
|
173
|
+
'tags': value['tags'],
|
|
174
|
+
'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
|
175
|
+
'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
|
|
176
|
+
'publishedAt': value['publishedAt'] == null ? undefined : ((value['publishedAt']).toISOString()),
|
|
177
|
+
'images': value['images'] == null ? undefined : ((value['images'] as Array<any>).map(ImageToJSON)),
|
|
178
|
+
'variants': value['variants'] == null ? undefined : ((value['variants'] as Array<any>).map(VariantToJSON)),
|
|
179
|
+
'additionalFiles': value['additionalFiles'] == null ? undefined : ((value['additionalFiles'] as Array<any>).map(ProductAdditionalFilesInnerToJSON)),
|
|
185
180
|
};
|
|
186
181
|
}
|
|
187
182
|
|
|
@@ -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,9 +37,7 @@ export interface ProductAdditionalFilesInner {
|
|
|
37
37
|
* Check if a given object implements the ProductAdditionalFilesInner interface.
|
|
38
38
|
*/
|
|
39
39
|
export function instanceOfProductAdditionalFilesInner(value: object): boolean {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return isInstance;
|
|
40
|
+
return true;
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
export function ProductAdditionalFilesInnerFromJSON(json: any): ProductAdditionalFilesInner {
|
|
@@ -47,27 +45,24 @@ export function ProductAdditionalFilesInnerFromJSON(json: any): ProductAdditiona
|
|
|
47
45
|
}
|
|
48
46
|
|
|
49
47
|
export function ProductAdditionalFilesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductAdditionalFilesInner {
|
|
50
|
-
if (
|
|
48
|
+
if (json == null) {
|
|
51
49
|
return json;
|
|
52
50
|
}
|
|
53
51
|
return {
|
|
54
52
|
|
|
55
|
-
'id':
|
|
56
|
-
'src':
|
|
53
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
54
|
+
'src': json['src'] == null ? undefined : json['src'],
|
|
57
55
|
};
|
|
58
56
|
}
|
|
59
57
|
|
|
60
58
|
export function ProductAdditionalFilesInnerToJSON(value?: ProductAdditionalFilesInner | null): any {
|
|
61
|
-
if (value
|
|
62
|
-
return
|
|
63
|
-
}
|
|
64
|
-
if (value === null) {
|
|
65
|
-
return null;
|
|
59
|
+
if (value == null) {
|
|
60
|
+
return value;
|
|
66
61
|
}
|
|
67
62
|
return {
|
|
68
63
|
|
|
69
|
-
'id': value
|
|
70
|
-
'src': value
|
|
64
|
+
'id': value['id'],
|
|
65
|
+
'src': value['src'],
|
|
71
66
|
};
|
|
72
67
|
}
|
|
73
68
|
|
|
@@ -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
|
import type { Product } from './Product';
|
|
17
17
|
import {
|
|
18
18
|
ProductFromJSON,
|
|
@@ -44,9 +44,7 @@ export interface ProductsResponse {
|
|
|
44
44
|
* Check if a given object implements the ProductsResponse interface.
|
|
45
45
|
*/
|
|
46
46
|
export function instanceOfProductsResponse(value: object): boolean {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return isInstance;
|
|
47
|
+
return true;
|
|
50
48
|
}
|
|
51
49
|
|
|
52
50
|
export function ProductsResponseFromJSON(json: any): ProductsResponse {
|
|
@@ -54,27 +52,24 @@ export function ProductsResponseFromJSON(json: any): ProductsResponse {
|
|
|
54
52
|
}
|
|
55
53
|
|
|
56
54
|
export function ProductsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductsResponse {
|
|
57
|
-
if (
|
|
55
|
+
if (json == null) {
|
|
58
56
|
return json;
|
|
59
57
|
}
|
|
60
58
|
return {
|
|
61
59
|
|
|
62
|
-
'products':
|
|
63
|
-
'nextPageToken':
|
|
60
|
+
'products': json['products'] == null ? undefined : ((json['products'] as Array<any>).map(ProductFromJSON)),
|
|
61
|
+
'nextPageToken': json['nextPageToken'] == null ? undefined : json['nextPageToken'],
|
|
64
62
|
};
|
|
65
63
|
}
|
|
66
64
|
|
|
67
65
|
export function ProductsResponseToJSON(value?: ProductsResponse | null): any {
|
|
68
|
-
if (value
|
|
69
|
-
return
|
|
70
|
-
}
|
|
71
|
-
if (value === null) {
|
|
72
|
-
return null;
|
|
66
|
+
if (value == null) {
|
|
67
|
+
return value;
|
|
73
68
|
}
|
|
74
69
|
return {
|
|
75
70
|
|
|
76
|
-
'products': value
|
|
77
|
-
'nextPageToken': value
|
|
71
|
+
'products': value['products'] == null ? undefined : ((value['products'] as Array<any>).map(ProductToJSON)),
|
|
72
|
+
'nextPageToken': value['nextPageToken'],
|
|
78
73
|
};
|
|
79
74
|
}
|
|
80
75
|
|