@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.
Files changed (85) hide show
  1. package/.openapi-generator/FILES +7 -5
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +2 -2
  4. package/dist/apis/ProductsApi.d.ts +17 -2
  5. package/dist/apis/ProductsApi.js +69 -1
  6. package/dist/apis/VariantsApi.d.ts +1 -1
  7. package/dist/apis/VariantsApi.js +1 -1
  8. package/dist/models/ApiError.d.ts +1 -1
  9. package/dist/models/ApiError.js +10 -14
  10. package/dist/models/Attribute.d.ts +1 -1
  11. package/dist/models/Attribute.js +15 -18
  12. package/dist/models/AttributeThumbnail.d.ts +1 -1
  13. package/dist/models/AttributeThumbnail.js +9 -14
  14. package/dist/models/CreateProductRequest.d.ts +9 -9
  15. package/dist/models/CreateProductRequest.js +30 -33
  16. package/dist/models/CreateProductRequestImagesInner.d.ts +31 -0
  17. package/dist/models/CreateProductRequestImagesInner.js +45 -0
  18. package/dist/models/CreateProductRequestSeoMetadata.d.ts +1 -1
  19. package/dist/models/CreateProductRequestSeoMetadata.js +7 -12
  20. package/dist/models/CreateProductVariant.d.ts +59 -0
  21. package/dist/models/CreateProductVariant.js +61 -0
  22. package/dist/models/CreateProductVariantApplicationsInner.d.ts +63 -0
  23. package/dist/models/CreateProductVariantApplicationsInner.js +73 -0
  24. package/dist/models/CreateProductVariantAttributesInner.d.ts +37 -0
  25. package/dist/models/CreateProductVariantAttributesInner.js +51 -0
  26. package/dist/models/CreateProductVariantRetailPrice.d.ts +37 -0
  27. package/dist/models/CreateProductVariantRetailPrice.js +51 -0
  28. package/dist/models/Image.d.ts +1 -1
  29. package/dist/models/Image.js +19 -24
  30. package/dist/models/ImportProducts200Response.d.ts +1 -1
  31. package/dist/models/ImportProducts200Response.js +7 -12
  32. package/dist/models/ModelFile.d.ts +31 -0
  33. package/dist/models/ModelFile.js +45 -0
  34. package/dist/models/Price.d.ts +1 -1
  35. package/dist/models/Price.js +9 -14
  36. package/dist/models/Product.d.ts +1 -1
  37. package/dist/models/Product.js +32 -35
  38. package/dist/models/ProductAdditionalFilesInner.d.ts +1 -1
  39. package/dist/models/ProductAdditionalFilesInner.js +9 -14
  40. package/dist/models/ProductsResponse.d.ts +1 -1
  41. package/dist/models/ProductsResponse.js +9 -14
  42. package/dist/models/SeoMetadata.d.ts +1 -1
  43. package/dist/models/SeoMetadata.js +7 -12
  44. package/dist/models/Stock.d.ts +1 -1
  45. package/dist/models/Stock.js +7 -12
  46. package/dist/models/UpdateProductRequest.d.ts +87 -0
  47. package/dist/models/UpdateProductRequest.js +65 -0
  48. package/dist/models/Variant.d.ts +1 -1
  49. package/dist/models/Variant.js +33 -36
  50. package/dist/models/VariantProduct.d.ts +1 -1
  51. package/dist/models/VariantProduct.js +9 -14
  52. package/dist/models/VariantsResponse.d.ts +1 -1
  53. package/dist/models/VariantsResponse.js +9 -14
  54. package/dist/models/index.d.ts +7 -5
  55. package/dist/models/index.js +7 -5
  56. package/dist/runtime.d.ts +1 -1
  57. package/dist/runtime.js +1 -1
  58. package/package.json +1 -1
  59. package/src/apis/ProductsApi.ts +73 -1
  60. package/src/apis/VariantsApi.ts +1 -1
  61. package/src/models/ApiError.ts +10 -15
  62. package/src/models/Attribute.ts +14 -19
  63. package/src/models/AttributeThumbnail.ts +10 -15
  64. package/src/models/CreateProductRequest.ts +44 -49
  65. package/src/models/CreateProductRequestImagesInner.ts +60 -0
  66. package/src/models/CreateProductRequestSeoMetadata.ts +8 -13
  67. package/src/models/CreateProductVariant.ts +119 -0
  68. package/src/models/CreateProductVariantApplicationsInner.ts +103 -0
  69. package/src/models/CreateProductVariantAttributesInner.ts +70 -0
  70. package/src/models/CreateProductVariantRetailPrice.ts +70 -0
  71. package/src/models/Image.ts +20 -25
  72. package/src/models/ImportProducts200Response.ts +8 -13
  73. package/src/models/ModelFile.ts +60 -0
  74. package/src/models/Price.ts +10 -15
  75. package/src/models/Product.ts +31 -36
  76. package/src/models/ProductAdditionalFilesInner.ts +10 -15
  77. package/src/models/ProductsResponse.ts +10 -15
  78. package/src/models/SeoMetadata.ts +8 -13
  79. package/src/models/Stock.ts +8 -13
  80. package/src/models/UpdateProductRequest.ts +145 -0
  81. package/src/models/Variant.ts +32 -37
  82. package/src/models/VariantProduct.ts +10 -15
  83. package/src/models/VariantsResponse.ts +10 -15
  84. package/src/models/index.ts +7 -5
  85. 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
+
@@ -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.8.0
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 { exists, mapValues } from '../runtime';
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
- let isInstance = true;
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 ((json === undefined) || (json === null)) {
78
+ if (json == null) {
81
79
  return json;
82
80
  }
83
81
  return {
84
82
 
85
- 'id': !exists(json, 'id') ? undefined : json['id'],
86
- 'src': !exists(json, 'src') ? undefined : json['src'],
87
- 'alt': !exists(json, 'alt') ? undefined : json['alt'],
88
- 'variantIds': !exists(json, 'variantIds') ? undefined : json['variantIds'],
89
- 'sortOrder': !exists(json, 'sortOrder') ? undefined : json['sortOrder'],
90
- 'createdAt': !exists(json, 'createdAt') ? undefined : json['createdAt'],
91
- 'updatedAt': !exists(json, 'updatedAt') ? undefined : json['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 === undefined) {
97
- return undefined;
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.id,
105
- 'src': value.src,
106
- 'alt': value.alt,
107
- 'variantIds': value.variantIds,
108
- 'sortOrder': value.sortOrder,
109
- 'createdAt': value.createdAt,
110
- 'updatedAt': value.updatedAt,
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.8.0
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 { exists, mapValues } from '../runtime';
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
- let isInstance = true;
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 ((json === undefined) || (json === null)) {
42
+ if (json == null) {
45
43
  return json;
46
44
  }
47
45
  return {
48
46
 
49
- 'importId': !exists(json, 'importId') ? undefined : json['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 === undefined) {
55
- return undefined;
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.importId,
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
+
@@ -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.8.0
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 { exists, mapValues } from '../runtime';
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
- let isInstance = true;
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 ((json === undefined) || (json === null)) {
48
+ if (json == null) {
51
49
  return json;
52
50
  }
53
51
  return {
54
52
 
55
- 'amount': !exists(json, 'amount') ? undefined : json['amount'],
56
- 'currencyCode': !exists(json, 'currencyCode') ? undefined : json['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 === undefined) {
62
- return undefined;
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.amount,
70
- 'currencyCode': value.currencyCode,
64
+ 'amount': value['amount'],
65
+ 'currencyCode': value['currencyCode'],
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.8.0
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 { exists, mapValues } from '../runtime';
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
- let isInstance = true;
132
- isInstance = isInstance && "title" in value;
133
- isInstance = isInstance && "description" in value;
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 ((json === undefined) || (json === null)) {
141
+ if (json == null) {
144
142
  return json;
145
143
  }
146
144
  return {
147
145
 
148
- 'id': !exists(json, 'id') ? undefined : json['id'],
149
- 'ref': !exists(json, 'ref') ? undefined : json['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': !exists(json, 'slug') ? undefined : json['slug'],
153
- 'seoMetadata': !exists(json, 'seoMetadata') ? undefined : SeoMetadataFromJSON(json['seoMetadata']),
154
- 'tags': !exists(json, 'tags') ? undefined : json['tags'],
155
- 'createdAt': !exists(json, 'createdAt') ? undefined : (new Date(json['createdAt'])),
156
- 'updatedAt': !exists(json, 'updatedAt') ? undefined : (new Date(json['updatedAt'])),
157
- 'publishedAt': !exists(json, 'publishedAt') ? undefined : (new Date(json['publishedAt'])),
158
- 'images': !exists(json, 'images') ? undefined : ((json['images'] as Array<any>).map(ImageFromJSON)),
159
- 'variants': !exists(json, 'variants') ? undefined : ((json['variants'] as Array<any>).map(VariantFromJSON)),
160
- 'additionalFiles': !exists(json, 'additionalFiles') ? undefined : ((json['additionalFiles'] as Array<any>).map(ProductAdditionalFilesInnerFromJSON)),
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 === undefined) {
166
- return undefined;
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.id,
174
- 'ref': value.ref,
175
- 'title': value.title,
176
- 'description': value.description,
177
- 'seoMetadata': SeoMetadataToJSON(value.seoMetadata),
178
- 'tags': value.tags,
179
- 'createdAt': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
180
- 'updatedAt': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()),
181
- 'publishedAt': value.publishedAt === undefined ? undefined : (value.publishedAt.toISOString()),
182
- 'images': value.images === undefined ? undefined : ((value.images as Array<any>).map(ImageToJSON)),
183
- 'variants': value.variants === undefined ? undefined : ((value.variants as Array<any>).map(VariantToJSON)),
184
- 'additionalFiles': value.additionalFiles === undefined ? undefined : ((value.additionalFiles as Array<any>).map(ProductAdditionalFilesInnerToJSON)),
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.8.0
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 { exists, mapValues } from '../runtime';
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
- let isInstance = true;
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 ((json === undefined) || (json === null)) {
48
+ if (json == null) {
51
49
  return json;
52
50
  }
53
51
  return {
54
52
 
55
- 'id': !exists(json, 'id') ? undefined : json['id'],
56
- 'src': !exists(json, 'src') ? undefined : json['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 === undefined) {
62
- return undefined;
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.id,
70
- 'src': value.src,
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.8.0
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 { exists, mapValues } from '../runtime';
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
- let isInstance = true;
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 ((json === undefined) || (json === null)) {
55
+ if (json == null) {
58
56
  return json;
59
57
  }
60
58
  return {
61
59
 
62
- 'products': !exists(json, 'products') ? undefined : ((json['products'] as Array<any>).map(ProductFromJSON)),
63
- 'nextPageToken': !exists(json, 'nextPageToken') ? undefined : json['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 === undefined) {
69
- return undefined;
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.products === undefined ? undefined : ((value.products as Array<any>).map(ProductToJSON)),
77
- 'nextPageToken': value.nextPageToken,
71
+ 'products': value['products'] == null ? undefined : ((value['products'] as Array<any>).map(ProductToJSON)),
72
+ 'nextPageToken': value['nextPageToken'],
78
73
  };
79
74
  }
80
75