@teemill/product-catalog 1.7.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 (100) 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 +18 -2
  5. package/dist/apis/ProductsApi.js +72 -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 +13 -7
  15. package/dist/models/CreateProductRequest.js +30 -31
  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/CreateProductRequestVariantsInner.d.ts +1 -1
  21. package/dist/models/CreateProductRequestVariantsInner.js +1 -1
  22. package/dist/models/CreateProductRequestVariantsInnerApplicationsInner.d.ts +1 -1
  23. package/dist/models/CreateProductRequestVariantsInnerApplicationsInner.js +1 -1
  24. package/dist/models/CreateProductRequestVariantsInnerAttributesInner.d.ts +1 -1
  25. package/dist/models/CreateProductRequestVariantsInnerAttributesInner.js +1 -1
  26. package/dist/models/CreateProductRequestVariantsInnerImagesInner.d.ts +1 -1
  27. package/dist/models/CreateProductRequestVariantsInnerImagesInner.js +1 -1
  28. package/dist/models/CreateProductRequestVariantsInnerRetailPrice.d.ts +1 -1
  29. package/dist/models/CreateProductRequestVariantsInnerRetailPrice.js +1 -1
  30. package/dist/models/CreateProductVariant.d.ts +59 -0
  31. package/dist/models/CreateProductVariant.js +61 -0
  32. package/dist/models/CreateProductVariantApplicationsInner.d.ts +63 -0
  33. package/dist/models/CreateProductVariantApplicationsInner.js +73 -0
  34. package/dist/models/CreateProductVariantAttributesInner.d.ts +37 -0
  35. package/dist/models/CreateProductVariantAttributesInner.js +51 -0
  36. package/dist/models/CreateProductVariantRetailPrice.d.ts +37 -0
  37. package/dist/models/CreateProductVariantRetailPrice.js +51 -0
  38. package/dist/models/Image.d.ts +1 -1
  39. package/dist/models/Image.js +19 -24
  40. package/dist/models/ImportProducts200Response.d.ts +1 -1
  41. package/dist/models/ImportProducts200Response.js +7 -12
  42. package/dist/models/ModelFile.d.ts +31 -0
  43. package/dist/models/ModelFile.js +45 -0
  44. package/dist/models/Price.d.ts +1 -1
  45. package/dist/models/Price.js +9 -14
  46. package/dist/models/Product.d.ts +1 -1
  47. package/dist/models/Product.js +32 -35
  48. package/dist/models/ProductAdditionalFilesInner.d.ts +1 -1
  49. package/dist/models/ProductAdditionalFilesInner.js +9 -14
  50. package/dist/models/ProductsResponse.d.ts +1 -1
  51. package/dist/models/ProductsResponse.js +9 -14
  52. package/dist/models/SeoMetadata.d.ts +1 -1
  53. package/dist/models/SeoMetadata.js +7 -12
  54. package/dist/models/Stock.d.ts +1 -1
  55. package/dist/models/Stock.js +7 -12
  56. package/dist/models/UpdateProductRequest.d.ts +87 -0
  57. package/dist/models/UpdateProductRequest.js +65 -0
  58. package/dist/models/Variant.d.ts +1 -1
  59. package/dist/models/Variant.js +33 -36
  60. package/dist/models/VariantProduct.d.ts +1 -1
  61. package/dist/models/VariantProduct.js +9 -14
  62. package/dist/models/VariantsResponse.d.ts +1 -1
  63. package/dist/models/VariantsResponse.js +9 -14
  64. package/dist/models/index.d.ts +7 -5
  65. package/dist/models/index.js +7 -5
  66. package/dist/runtime.d.ts +1 -1
  67. package/dist/runtime.js +1 -1
  68. package/package.json +1 -1
  69. package/src/apis/ProductsApi.ts +78 -1
  70. package/src/apis/VariantsApi.ts +1 -1
  71. package/src/models/ApiError.ts +10 -15
  72. package/src/models/Attribute.ts +14 -19
  73. package/src/models/AttributeThumbnail.ts +10 -15
  74. package/src/models/CreateProductRequest.ts +48 -45
  75. package/src/models/CreateProductRequestImagesInner.ts +60 -0
  76. package/src/models/CreateProductRequestSeoMetadata.ts +8 -13
  77. package/src/models/CreateProductRequestVariantsInner.ts +1 -1
  78. package/src/models/CreateProductRequestVariantsInnerApplicationsInner.ts +1 -1
  79. package/src/models/CreateProductRequestVariantsInnerAttributesInner.ts +1 -1
  80. package/src/models/CreateProductRequestVariantsInnerImagesInner.ts +1 -1
  81. package/src/models/CreateProductRequestVariantsInnerRetailPrice.ts +1 -1
  82. package/src/models/CreateProductVariant.ts +119 -0
  83. package/src/models/CreateProductVariantApplicationsInner.ts +103 -0
  84. package/src/models/CreateProductVariantAttributesInner.ts +70 -0
  85. package/src/models/CreateProductVariantRetailPrice.ts +70 -0
  86. package/src/models/Image.ts +20 -25
  87. package/src/models/ImportProducts200Response.ts +8 -13
  88. package/src/models/ModelFile.ts +60 -0
  89. package/src/models/Price.ts +10 -15
  90. package/src/models/Product.ts +31 -36
  91. package/src/models/ProductAdditionalFilesInner.ts +10 -15
  92. package/src/models/ProductsResponse.ts +10 -15
  93. package/src/models/SeoMetadata.ts +8 -13
  94. package/src/models/Stock.ts +8 -13
  95. package/src/models/UpdateProductRequest.ts +145 -0
  96. package/src/models/Variant.ts +32 -37
  97. package/src/models/VariantProduct.ts +10 -15
  98. package/src/models/VariantsResponse.ts +10 -15
  99. package/src/models/index.ts +7 -5
  100. package/src/runtime.ts +1 -1
@@ -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.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.7.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.7.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
 
@@ -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.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
  * SEO metadata for the product
18
18
  * @export
@@ -31,9 +31,7 @@ export interface SeoMetadata {
31
31
  * Check if a given object implements the SeoMetadata interface.
32
32
  */
33
33
  export function instanceOfSeoMetadata(value: object): boolean {
34
- let isInstance = true;
35
-
36
- return isInstance;
34
+ return true;
37
35
  }
38
36
 
39
37
  export function SeoMetadataFromJSON(json: any): SeoMetadata {
@@ -41,25 +39,22 @@ export function SeoMetadataFromJSON(json: any): SeoMetadata {
41
39
  }
42
40
 
43
41
  export function SeoMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SeoMetadata {
44
- if ((json === undefined) || (json === null)) {
42
+ if (json == null) {
45
43
  return json;
46
44
  }
47
45
  return {
48
46
 
49
- 'title': !exists(json, 'title') ? undefined : json['title'],
47
+ 'title': json['title'] == null ? undefined : json['title'],
50
48
  };
51
49
  }
52
50
 
53
51
  export function SeoMetadataToJSON(value?: SeoMetadata | 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
- 'title': value.title,
57
+ 'title': value['title'],
63
58
  };
64
59
  }
65
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.7.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 Stock {
31
31
  * Check if a given object implements the Stock interface.
32
32
  */
33
33
  export function instanceOfStock(value: object): boolean {
34
- let isInstance = true;
35
-
36
- return isInstance;
34
+ return true;
37
35
  }
38
36
 
39
37
  export function StockFromJSON(json: any): Stock {
@@ -41,25 +39,22 @@ export function StockFromJSON(json: any): Stock {
41
39
  }
42
40
 
43
41
  export function StockFromJSONTyped(json: any, ignoreDiscriminator: boolean): Stock {
44
- if ((json === undefined) || (json === null)) {
42
+ if (json == null) {
45
43
  return json;
46
44
  }
47
45
  return {
48
46
 
49
- 'level': !exists(json, 'level') ? undefined : json['level'],
47
+ 'level': json['level'] == null ? undefined : json['level'],
50
48
  };
51
49
  }
52
50
 
53
51
  export function StockToJSON(value?: Stock | 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
- 'level': value.level,
57
+ 'level': value['level'],
63
58
  };
64
59
  }
65
60
 
@@ -0,0 +1,145 @@
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
+ import type { CreateProductRequestSeoMetadata } from './CreateProductRequestSeoMetadata';
17
+ import {
18
+ CreateProductRequestSeoMetadataFromJSON,
19
+ CreateProductRequestSeoMetadataFromJSONTyped,
20
+ CreateProductRequestSeoMetadataToJSON,
21
+ } from './CreateProductRequestSeoMetadata';
22
+ import type { CreateProductVariant } from './CreateProductVariant';
23
+ import {
24
+ CreateProductVariantFromJSON,
25
+ CreateProductVariantFromJSONTyped,
26
+ CreateProductVariantToJSON,
27
+ } from './CreateProductVariant';
28
+
29
+ /**
30
+ *
31
+ * @export
32
+ * @interface UpdateProductRequest
33
+ */
34
+ export interface UpdateProductRequest {
35
+ /**
36
+ * Reference to the product in the GFN catalog that will be used as a base for this product. A list of available products for the given project can be obtained from the GFN Catalog API.
37
+ * @type {string}
38
+ * @memberof UpdateProductRequest
39
+ */
40
+ gfnProductRef?: string;
41
+ /**
42
+ * Product title
43
+ * @type {string}
44
+ * @memberof UpdateProductRequest
45
+ */
46
+ title?: string;
47
+ /**
48
+ * Product description
49
+ * @type {string}
50
+ * @memberof UpdateProductRequest
51
+ */
52
+ description?: string;
53
+ /**
54
+ * Whether the product is enabled upon creation.
55
+ * @type {boolean}
56
+ * @memberof UpdateProductRequest
57
+ */
58
+ enabled?: boolean;
59
+ /**
60
+ * A custom URL slug for the product. This must be unique for each product on the project.
61
+ * @type {string}
62
+ * @memberof UpdateProductRequest
63
+ */
64
+ slug?: string;
65
+ /**
66
+ *
67
+ * @type {CreateProductRequestSeoMetadata}
68
+ * @memberof UpdateProductRequest
69
+ */
70
+ seoMetadata?: CreateProductRequestSeoMetadata;
71
+ /**
72
+ * Additional product tags used for searching and filtering.
73
+ * @type {Array<string>}
74
+ * @memberof UpdateProductRequest
75
+ */
76
+ tags?: Array<string>;
77
+ /**
78
+ * Variants
79
+ * @type {Array<CreateProductVariant>}
80
+ * @memberof UpdateProductRequest
81
+ */
82
+ variants?: Array<CreateProductVariant>;
83
+ /**
84
+ * Images to attach to the product. For example, photos of models using/wearing the product.
85
+ * @type {Array<any>}
86
+ * @memberof UpdateProductRequest
87
+ */
88
+ images?: Array<any>;
89
+ /**
90
+ * Additional files to attach to the product. For example, original design files e.g. PSD, AI, etc.
91
+ * @type {Array<any>}
92
+ * @memberof UpdateProductRequest
93
+ */
94
+ additionalFiles?: Array<any>;
95
+ }
96
+
97
+ /**
98
+ * Check if a given object implements the UpdateProductRequest interface.
99
+ */
100
+ export function instanceOfUpdateProductRequest(value: object): boolean {
101
+ return true;
102
+ }
103
+
104
+ export function UpdateProductRequestFromJSON(json: any): UpdateProductRequest {
105
+ return UpdateProductRequestFromJSONTyped(json, false);
106
+ }
107
+
108
+ export function UpdateProductRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateProductRequest {
109
+ if (json == null) {
110
+ return json;
111
+ }
112
+ return {
113
+
114
+ 'gfnProductRef': json['gfnProductRef'] == null ? undefined : json['gfnProductRef'],
115
+ 'title': json['title'] == null ? undefined : json['title'],
116
+ 'description': json['description'] == null ? undefined : json['description'],
117
+ 'enabled': json['enabled'] == null ? undefined : json['enabled'],
118
+ 'slug': json['slug'] == null ? undefined : json['slug'],
119
+ 'seoMetadata': json['seoMetadata'] == null ? undefined : CreateProductRequestSeoMetadataFromJSON(json['seoMetadata']),
120
+ 'tags': json['tags'] == null ? undefined : json['tags'],
121
+ 'variants': json['variants'] == null ? undefined : ((json['variants'] as Array<any>).map(CreateProductVariantFromJSON)),
122
+ 'images': json['images'] == null ? undefined : json['images'],
123
+ 'additionalFiles': json['additionalFiles'] == null ? undefined : json['additionalFiles'],
124
+ };
125
+ }
126
+
127
+ export function UpdateProductRequestToJSON(value?: UpdateProductRequest | null): any {
128
+ if (value == null) {
129
+ return value;
130
+ }
131
+ return {
132
+
133
+ 'gfnProductRef': value['gfnProductRef'],
134
+ 'title': value['title'],
135
+ 'description': value['description'],
136
+ 'enabled': value['enabled'],
137
+ 'slug': value['slug'],
138
+ 'seoMetadata': CreateProductRequestSeoMetadataToJSON(value['seoMetadata']),
139
+ 'tags': value['tags'],
140
+ 'variants': value['variants'] == null ? undefined : ((value['variants'] as Array<any>).map(CreateProductVariantToJSON)),
141
+ 'images': value['images'],
142
+ 'additionalFiles': value['additionalFiles'],
143
+ };
144
+ }
145
+
@@ -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.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 { Attribute } from './Attribute';
17
17
  import {
18
18
  AttributeFromJSON,
@@ -140,11 +140,9 @@ export interface Variant {
140
140
  * Check if a given object implements the Variant interface.
141
141
  */
142
142
  export function instanceOfVariant(value: object): boolean {
143
- let isInstance = true;
144
- isInstance = isInstance && "attributes" in value;
145
- isInstance = isInstance && "sku" in value;
146
-
147
- return isInstance;
143
+ if (!('attributes' in value)) return false;
144
+ if (!('sku' in value)) return false;
145
+ return true;
148
146
  }
149
147
 
150
148
  export function VariantFromJSON(json: any): Variant {
@@ -152,49 +150,46 @@ export function VariantFromJSON(json: any): Variant {
152
150
  }
153
151
 
154
152
  export function VariantFromJSONTyped(json: any, ignoreDiscriminator: boolean): Variant {
155
- if ((json === undefined) || (json === null)) {
153
+ if (json == null) {
156
154
  return json;
157
155
  }
158
156
  return {
159
157
 
160
- 'id': !exists(json, 'id') ? undefined : json['id'],
158
+ 'id': json['id'] == null ? undefined : json['id'],
161
159
  'attributes': ((json['attributes'] as Array<any>).map(AttributeFromJSON)),
162
160
  'sku': json['sku'],
163
- 'ref': !exists(json, 'ref') ? undefined : json['ref'],
164
- 'product': !exists(json, 'product') ? undefined : VariantProductFromJSON(json['product']),
165
- 'sortOrder': !exists(json, 'sortOrder') ? undefined : json['sortOrder'],
166
- 'retailPrice': !exists(json, 'retailPrice') ? undefined : PriceFromJSON(json['retailPrice']),
167
- 'salePrice': !exists(json, 'salePrice') ? undefined : PriceFromJSON(json['salePrice']),
168
- 'price': !exists(json, 'price') ? undefined : PriceFromJSON(json['price']),
169
- 'stock': !exists(json, 'stock') ? undefined : StockFromJSON(json['stock']),
170
- 'createdAt': !exists(json, 'createdAt') ? undefined : (new Date(json['createdAt'])),
171
- 'updatedAt': !exists(json, 'updatedAt') ? undefined : (new Date(json['updatedAt'])),
172
- 'publishedAt': !exists(json, 'publishedAt') ? undefined : (new Date(json['publishedAt'])),
173
- 'images': !exists(json, 'images') ? undefined : ((json['images'] as Array<any>).map(ImageFromJSON)),
161
+ 'ref': json['ref'] == null ? undefined : json['ref'],
162
+ 'product': json['product'] == null ? undefined : VariantProductFromJSON(json['product']),
163
+ 'sortOrder': json['sortOrder'] == null ? undefined : json['sortOrder'],
164
+ 'retailPrice': json['retailPrice'] == null ? undefined : PriceFromJSON(json['retailPrice']),
165
+ 'salePrice': json['salePrice'] == null ? undefined : PriceFromJSON(json['salePrice']),
166
+ 'price': json['price'] == null ? undefined : PriceFromJSON(json['price']),
167
+ 'stock': json['stock'] == null ? undefined : StockFromJSON(json['stock']),
168
+ 'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
169
+ 'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
170
+ 'publishedAt': json['publishedAt'] == null ? undefined : (new Date(json['publishedAt'])),
171
+ 'images': json['images'] == null ? undefined : ((json['images'] as Array<any>).map(ImageFromJSON)),
174
172
  };
175
173
  }
176
174
 
177
175
  export function VariantToJSON(value?: Variant | null): any {
178
- if (value === undefined) {
179
- return undefined;
180
- }
181
- if (value === null) {
182
- return null;
176
+ if (value == null) {
177
+ return value;
183
178
  }
184
179
  return {
185
180
 
186
- 'id': value.id,
187
- 'attributes': ((value.attributes as Array<any>).map(AttributeToJSON)),
188
- 'sku': value.sku,
189
- 'ref': value.ref,
190
- 'product': VariantProductToJSON(value.product),
191
- 'retailPrice': PriceToJSON(value.retailPrice),
192
- 'salePrice': PriceToJSON(value.salePrice),
193
- 'stock': StockToJSON(value.stock),
194
- 'createdAt': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
195
- 'updatedAt': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()),
196
- 'publishedAt': value.publishedAt === undefined ? undefined : (value.publishedAt.toISOString()),
197
- 'images': value.images === undefined ? undefined : ((value.images as Array<any>).map(ImageToJSON)),
181
+ 'id': value['id'],
182
+ 'attributes': ((value['attributes'] as Array<any>).map(AttributeToJSON)),
183
+ 'sku': value['sku'],
184
+ 'ref': value['ref'],
185
+ 'product': VariantProductToJSON(value['product']),
186
+ 'retailPrice': PriceToJSON(value['retailPrice']),
187
+ 'salePrice': PriceToJSON(value['salePrice']),
188
+ 'stock': StockToJSON(value['stock']),
189
+ 'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
190
+ 'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
191
+ 'publishedAt': value['publishedAt'] == null ? undefined : ((value['publishedAt']).toISOString()),
192
+ 'images': value['images'] == null ? undefined : ((value['images'] as Array<any>).map(ImageToJSON)),
198
193
  };
199
194
  }
200
195