@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).
@@ -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 {
@@ -48,6 +51,7 @@ export interface GetProductRequest {
48
51
  export interface GetProductsRequest {
49
52
  project: string;
50
53
  pageToken?: number;
54
+ search?: string;
51
55
  pageSize?: number;
52
56
  fields?: string;
53
57
  }
@@ -57,6 +61,12 @@ export interface ImportProductsRequest {
57
61
  body?: string;
58
62
  }
59
63
 
64
+ export interface UpdateProductOperationRequest {
65
+ project: string;
66
+ productId: string;
67
+ updateProductRequest?: UpdateProductRequest;
68
+ }
69
+
60
70
  /**
61
71
  *
62
72
  */
@@ -204,6 +214,10 @@ export class ProductsApi extends runtime.BaseAPI {
204
214
  queryParameters['pageToken'] = requestParameters.pageToken;
205
215
  }
206
216
 
217
+ if (requestParameters.search !== undefined) {
218
+ queryParameters['search'] = requestParameters.search;
219
+ }
220
+
207
221
  if (requestParameters.pageSize !== undefined) {
208
222
  queryParameters['pageSize'] = requestParameters.pageSize;
209
223
  }
@@ -312,4 +326,67 @@ export class ProductsApi extends runtime.BaseAPI {
312
326
  return await response.value();
313
327
  }
314
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
+
315
392
  }
@@ -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).
@@ -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,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
- let isInstance = true;
41
- isInstance = isInstance && "message" in value;
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 ((json === undefined) || (json === null)) {
49
+ if (json == null) {
52
50
  return json;
53
51
  }
54
52
  return {
55
53
 
56
- 'code': !exists(json, 'code') ? undefined : json['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 === undefined) {
63
- return undefined;
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.code,
71
- 'message': value.message,
65
+ 'code': value['code'],
66
+ 'message': value['message'],
72
67
  };
73
68
  }
74
69
 
@@ -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 { AttributeThumbnail } from './AttributeThumbnail';
17
17
  import {
18
18
  AttributeThumbnailFromJSON,
@@ -56,11 +56,9 @@ export interface Attribute {
56
56
  * Check if a given object implements the Attribute interface.
57
57
  */
58
58
  export function instanceOfAttribute(value: object): boolean {
59
- let isInstance = true;
60
- isInstance = isInstance && "name" in value;
61
- isInstance = isInstance && "value" in value;
62
-
63
- return isInstance;
59
+ if (!('name' in value)) return false;
60
+ if (!('value' in value)) return false;
61
+ return true;
64
62
  }
65
63
 
66
64
  export function AttributeFromJSON(json: any): Attribute {
@@ -68,31 +66,28 @@ export function AttributeFromJSON(json: any): Attribute {
68
66
  }
69
67
 
70
68
  export function AttributeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Attribute {
71
- if ((json === undefined) || (json === null)) {
69
+ if (json == null) {
72
70
  return json;
73
71
  }
74
72
  return {
75
73
 
76
74
  'name': json['name'],
77
75
  'value': json['value'],
78
- 'thumbnail': !exists(json, 'thumbnail') ? undefined : AttributeThumbnailFromJSON(json['thumbnail']),
79
- 'tags': !exists(json, 'tags') ? undefined : json['tags'],
76
+ 'thumbnail': json['thumbnail'] == null ? undefined : AttributeThumbnailFromJSON(json['thumbnail']),
77
+ 'tags': json['tags'] == null ? undefined : json['tags'],
80
78
  };
81
79
  }
82
80
 
83
81
  export function AttributeToJSON(value?: Attribute | null): any {
84
- if (value === undefined) {
85
- return undefined;
86
- }
87
- if (value === null) {
88
- return null;
82
+ if (value == null) {
83
+ return value;
89
84
  }
90
85
  return {
91
86
 
92
- 'name': value.name,
93
- 'value': value.value,
94
- 'thumbnail': AttributeThumbnailToJSON(value.thumbnail),
95
- 'tags': value.tags,
87
+ 'name': value['name'],
88
+ 'value': value['value'],
89
+ 'thumbnail': AttributeThumbnailToJSON(value['thumbnail']),
90
+ 'tags': value['tags'],
96
91
  };
97
92
  }
98
93
 
@@ -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
  * Attribute thumbnail, intended for interfaces like storefront colour selector.
18
18
  * @export
@@ -49,9 +49,7 @@ export type AttributeThumbnailTypeEnum = typeof AttributeThumbnailTypeEnum[keyof
49
49
  * Check if a given object implements the AttributeThumbnail interface.
50
50
  */
51
51
  export function instanceOfAttributeThumbnail(value: object): boolean {
52
- let isInstance = true;
53
-
54
- return isInstance;
52
+ return true;
55
53
  }
56
54
 
57
55
  export function AttributeThumbnailFromJSON(json: any): AttributeThumbnail {
@@ -59,27 +57,24 @@ export function AttributeThumbnailFromJSON(json: any): AttributeThumbnail {
59
57
  }
60
58
 
61
59
  export function AttributeThumbnailFromJSONTyped(json: any, ignoreDiscriminator: boolean): AttributeThumbnail {
62
- if ((json === undefined) || (json === null)) {
60
+ if (json == null) {
63
61
  return json;
64
62
  }
65
63
  return {
66
64
 
67
- 'type': !exists(json, 'type') ? undefined : json['type'],
68
- 'value': !exists(json, 'value') ? undefined : json['value'],
65
+ 'type': json['type'] == null ? undefined : json['type'],
66
+ 'value': json['value'] == null ? undefined : json['value'],
69
67
  };
70
68
  }
71
69
 
72
70
  export function AttributeThumbnailToJSON(value?: AttributeThumbnail | null): any {
73
- if (value === undefined) {
74
- return undefined;
75
- }
76
- if (value === null) {
77
- return null;
71
+ if (value == null) {
72
+ return value;
78
73
  }
79
74
  return {
80
75
 
81
- 'type': value.type,
82
- 'value': value.value,
76
+ 'type': value['type'],
77
+ 'value': value['value'],
83
78
  };
84
79
  }
85
80
 
@@ -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,25 +12,25 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
 
15
- import { exists, mapValues } from '../runtime';
15
+ import { mapValues } from '../runtime';
16
+ import type { CreateProductRequestImagesInner } from './CreateProductRequestImagesInner';
17
+ import {
18
+ CreateProductRequestImagesInnerFromJSON,
19
+ CreateProductRequestImagesInnerFromJSONTyped,
20
+ CreateProductRequestImagesInnerToJSON,
21
+ } from './CreateProductRequestImagesInner';
16
22
  import type { CreateProductRequestSeoMetadata } from './CreateProductRequestSeoMetadata';
17
23
  import {
18
24
  CreateProductRequestSeoMetadataFromJSON,
19
25
  CreateProductRequestSeoMetadataFromJSONTyped,
20
26
  CreateProductRequestSeoMetadataToJSON,
21
27
  } from './CreateProductRequestSeoMetadata';
22
- import type { CreateProductRequestVariantsInner } from './CreateProductRequestVariantsInner';
23
- import {
24
- CreateProductRequestVariantsInnerFromJSON,
25
- CreateProductRequestVariantsInnerFromJSONTyped,
26
- CreateProductRequestVariantsInnerToJSON,
27
- } from './CreateProductRequestVariantsInner';
28
- import type { CreateProductRequestVariantsInnerImagesInner } from './CreateProductRequestVariantsInnerImagesInner';
28
+ import type { CreateProductVariant } from './CreateProductVariant';
29
29
  import {
30
- CreateProductRequestVariantsInnerImagesInnerFromJSON,
31
- CreateProductRequestVariantsInnerImagesInnerFromJSONTyped,
32
- CreateProductRequestVariantsInnerImagesInnerToJSON,
33
- } from './CreateProductRequestVariantsInnerImagesInner';
30
+ CreateProductVariantFromJSON,
31
+ CreateProductVariantFromJSONTyped,
32
+ CreateProductVariantToJSON,
33
+ } from './CreateProductVariant';
34
34
 
35
35
  /**
36
36
  *
@@ -82,27 +82,31 @@ export interface CreateProductRequest {
82
82
  tags?: Array<string>;
83
83
  /**
84
84
  * Variants
85
- * @type {Array<CreateProductRequestVariantsInner>}
85
+ * @type {Array<CreateProductVariant>}
86
86
  * @memberof CreateProductRequest
87
87
  */
88
- variants: Array<CreateProductRequestVariantsInner>;
88
+ variants: Array<CreateProductVariant>;
89
+ /**
90
+ * Images to attach to the product. For example, photos of models using/wearing the product.
91
+ * @type {Array<CreateProductRequestImagesInner>}
92
+ * @memberof CreateProductRequest
93
+ */
94
+ images?: Array<CreateProductRequestImagesInner>;
89
95
  /**
90
96
  * Additional files to attach to the product. For example, original design files e.g. PSD, AI, etc.
91
- * @type {Array<CreateProductRequestVariantsInnerImagesInner>}
97
+ * @type {Array<CreateProductRequestImagesInner>}
92
98
  * @memberof CreateProductRequest
93
99
  */
94
- additionalFiles?: Array<CreateProductRequestVariantsInnerImagesInner>;
100
+ additionalFiles?: Array<CreateProductRequestImagesInner>;
95
101
  }
96
102
 
97
103
  /**
98
104
  * Check if a given object implements the CreateProductRequest interface.
99
105
  */
100
106
  export function instanceOfCreateProductRequest(value: object): boolean {
101
- let isInstance = true;
102
- isInstance = isInstance && "gfnProductRef" in value;
103
- isInstance = isInstance && "variants" in value;
104
-
105
- return isInstance;
107
+ if (!('gfnProductRef' in value)) return false;
108
+ if (!('variants' in value)) return false;
109
+ return true;
106
110
  }
107
111
 
108
112
  export function CreateProductRequestFromJSON(json: any): CreateProductRequest {
@@ -110,41 +114,40 @@ export function CreateProductRequestFromJSON(json: any): CreateProductRequest {
110
114
  }
111
115
 
112
116
  export function CreateProductRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateProductRequest {
113
- if ((json === undefined) || (json === null)) {
117
+ if (json == null) {
114
118
  return json;
115
119
  }
116
120
  return {
117
121
 
118
122
  'gfnProductRef': json['gfnProductRef'],
119
- 'title': !exists(json, 'title') ? undefined : json['title'],
120
- 'description': !exists(json, 'description') ? undefined : json['description'],
121
- 'enabled': !exists(json, 'enabled') ? undefined : json['enabled'],
122
- 'slug': !exists(json, 'slug') ? undefined : json['slug'],
123
- 'seoMetadata': !exists(json, 'seoMetadata') ? undefined : CreateProductRequestSeoMetadataFromJSON(json['seoMetadata']),
124
- 'tags': !exists(json, 'tags') ? undefined : json['tags'],
125
- 'variants': ((json['variants'] as Array<any>).map(CreateProductRequestVariantsInnerFromJSON)),
126
- 'additionalFiles': !exists(json, 'additionalFiles') ? undefined : ((json['additionalFiles'] as Array<any>).map(CreateProductRequestVariantsInnerImagesInnerFromJSON)),
123
+ 'title': json['title'] == null ? undefined : json['title'],
124
+ 'description': json['description'] == null ? undefined : json['description'],
125
+ 'enabled': json['enabled'] == null ? undefined : json['enabled'],
126
+ 'slug': json['slug'] == null ? undefined : json['slug'],
127
+ 'seoMetadata': json['seoMetadata'] == null ? undefined : CreateProductRequestSeoMetadataFromJSON(json['seoMetadata']),
128
+ 'tags': json['tags'] == null ? undefined : json['tags'],
129
+ 'variants': ((json['variants'] as Array<any>).map(CreateProductVariantFromJSON)),
130
+ 'images': json['images'] == null ? undefined : ((json['images'] as Array<any>).map(CreateProductRequestImagesInnerFromJSON)),
131
+ 'additionalFiles': json['additionalFiles'] == null ? undefined : ((json['additionalFiles'] as Array<any>).map(CreateProductRequestImagesInnerFromJSON)),
127
132
  };
128
133
  }
129
134
 
130
135
  export function CreateProductRequestToJSON(value?: CreateProductRequest | null): any {
131
- if (value === undefined) {
132
- return undefined;
133
- }
134
- if (value === null) {
135
- return null;
136
+ if (value == null) {
137
+ return value;
136
138
  }
137
139
  return {
138
140
 
139
- 'gfnProductRef': value.gfnProductRef,
140
- 'title': value.title,
141
- 'description': value.description,
142
- 'enabled': value.enabled,
143
- 'slug': value.slug,
144
- 'seoMetadata': CreateProductRequestSeoMetadataToJSON(value.seoMetadata),
145
- 'tags': value.tags,
146
- 'variants': ((value.variants as Array<any>).map(CreateProductRequestVariantsInnerToJSON)),
147
- 'additionalFiles': value.additionalFiles === undefined ? undefined : ((value.additionalFiles as Array<any>).map(CreateProductRequestVariantsInnerImagesInnerToJSON)),
141
+ 'gfnProductRef': value['gfnProductRef'],
142
+ 'title': value['title'],
143
+ 'description': value['description'],
144
+ 'enabled': value['enabled'],
145
+ 'slug': value['slug'],
146
+ 'seoMetadata': CreateProductRequestSeoMetadataToJSON(value['seoMetadata']),
147
+ 'tags': value['tags'],
148
+ 'variants': ((value['variants'] as Array<any>).map(CreateProductVariantToJSON)),
149
+ 'images': value['images'] == null ? undefined : ((value['images'] as Array<any>).map(CreateProductRequestImagesInnerToJSON)),
150
+ 'additionalFiles': value['additionalFiles'] == null ? undefined : ((value['additionalFiles'] as Array<any>).map(CreateProductRequestImagesInnerToJSON)),
148
151
  };
149
152
  }
150
153
 
@@ -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 CreateProductRequestImagesInner
20
+ */
21
+ export interface CreateProductRequestImagesInner {
22
+ /**
23
+ * Publicly available file URL.
24
+ * @type {string}
25
+ * @memberof CreateProductRequestImagesInner
26
+ */
27
+ src?: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the CreateProductRequestImagesInner interface.
32
+ */
33
+ export function instanceOfCreateProductRequestImagesInner(value: object): boolean {
34
+ return true;
35
+ }
36
+
37
+ export function CreateProductRequestImagesInnerFromJSON(json: any): CreateProductRequestImagesInner {
38
+ return CreateProductRequestImagesInnerFromJSONTyped(json, false);
39
+ }
40
+
41
+ export function CreateProductRequestImagesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateProductRequestImagesInner {
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 CreateProductRequestImagesInnerToJSON(value?: CreateProductRequestImagesInner | 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.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 CreateProductRequestSeoMetadata {
31
31
  * Check if a given object implements the CreateProductRequestSeoMetadata interface.
32
32
  */
33
33
  export function instanceOfCreateProductRequestSeoMetadata(value: object): boolean {
34
- let isInstance = true;
35
-
36
- return isInstance;
34
+ return true;
37
35
  }
38
36
 
39
37
  export function CreateProductRequestSeoMetadataFromJSON(json: any): CreateProductRequestSeoMetadata {
@@ -41,25 +39,22 @@ export function CreateProductRequestSeoMetadataFromJSON(json: any): CreateProduc
41
39
  }
42
40
 
43
41
  export function CreateProductRequestSeoMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateProductRequestSeoMetadata {
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 CreateProductRequestSeoMetadataToJSON(value?: CreateProductRequestSeoMetadata | 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.8.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -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.8.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -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.8.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -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.8.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -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.8.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).