@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
@@ -10,20 +10,22 @@ src/models/ApiError.ts
10
10
  src/models/Attribute.ts
11
11
  src/models/AttributeThumbnail.ts
12
12
  src/models/CreateProductRequest.ts
13
+ src/models/CreateProductRequestImagesInner.ts
13
14
  src/models/CreateProductRequestSeoMetadata.ts
14
- src/models/CreateProductRequestVariantsInner.ts
15
- src/models/CreateProductRequestVariantsInnerApplicationsInner.ts
16
- src/models/CreateProductRequestVariantsInnerAttributesInner.ts
17
- src/models/CreateProductRequestVariantsInnerImagesInner.ts
18
- src/models/CreateProductRequestVariantsInnerRetailPrice.ts
15
+ src/models/CreateProductVariant.ts
16
+ src/models/CreateProductVariantApplicationsInner.ts
17
+ src/models/CreateProductVariantAttributesInner.ts
18
+ src/models/CreateProductVariantRetailPrice.ts
19
19
  src/models/Image.ts
20
20
  src/models/ImportProducts200Response.ts
21
+ src/models/ModelFile.ts
21
22
  src/models/Price.ts
22
23
  src/models/Product.ts
23
24
  src/models/ProductAdditionalFilesInner.ts
24
25
  src/models/ProductsResponse.ts
25
26
  src/models/SeoMetadata.ts
26
27
  src/models/Stock.ts
28
+ src/models/UpdateProductRequest.ts
27
29
  src/models/Variant.ts
28
30
  src/models/VariantProduct.ts
29
31
  src/models/VariantsResponse.ts
@@ -1 +1 @@
1
- 7.3.0
1
+ 7.4.0
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @teemill/product-catalog@1.7.0
1
+ ## @teemill/product-catalog@1.9.0
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @teemill/product-catalog@1.7.0 --save
39
+ npm install @teemill/product-catalog@1.9.0 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -2,7 +2,7 @@
2
2
  * Product Catalog API
3
3
  * Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
4
4
  *
5
- * The version of the OpenAPI document: 1.7.0
5
+ * The version of the OpenAPI document: 1.9.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { CreateProductRequest, ImportProducts200Response, Product, ProductsResponse } from '../models/index';
13
+ import type { CreateProductRequest, ImportProducts200Response, Product, ProductsResponse, UpdateProductRequest } from '../models/index';
14
14
  export interface CreateProductOperationRequest {
15
15
  project: string;
16
16
  createProductRequest?: CreateProductRequest;
@@ -23,6 +23,7 @@ export interface GetProductRequest {
23
23
  export interface GetProductsRequest {
24
24
  project: string;
25
25
  pageToken?: number;
26
+ search?: string;
26
27
  pageSize?: number;
27
28
  fields?: string;
28
29
  }
@@ -30,6 +31,11 @@ export interface ImportProductsRequest {
30
31
  project: string;
31
32
  body?: string;
32
33
  }
34
+ export interface UpdateProductOperationRequest {
35
+ project: string;
36
+ productId: string;
37
+ updateProductRequest?: UpdateProductRequest;
38
+ }
33
39
  /**
34
40
  *
35
41
  */
@@ -74,4 +80,14 @@ export declare class ProductsApi extends runtime.BaseAPI {
74
80
  * Import products
75
81
  */
76
82
  importProducts(project: string, optionalParameters?: runtime.OptionalOnly<ImportProductsRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ImportProducts200Response>;
83
+ /**
84
+ * Updates a product by a given ID.
85
+ * Update product
86
+ */
87
+ updateProductRaw(requestParameters: UpdateProductOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Product>>;
88
+ /**
89
+ * Updates a product by a given ID.
90
+ * Update product
91
+ */
92
+ updateProduct(project: string, productId: string, optionalParameters?: runtime.OptionalOnly<UpdateProductOperationRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Product>;
77
93
  }
@@ -5,7 +5,7 @@
5
5
  * Product Catalog API
6
6
  * Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
7
7
  *
8
- * The version of the OpenAPI document: 1.7.0
8
+ * The version of the OpenAPI document: 1.9.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -240,6 +240,9 @@ var ProductsApi = /** @class */ (function (_super) {
240
240
  if (requestParameters.pageToken !== undefined) {
241
241
  queryParameters['pageToken'] = requestParameters.pageToken;
242
242
  }
243
+ if (requestParameters.search !== undefined) {
244
+ queryParameters['search'] = requestParameters.search;
245
+ }
243
246
  if (requestParameters.pageSize !== undefined) {
244
247
  queryParameters['pageSize'] = requestParameters.pageSize;
245
248
  }
@@ -357,6 +360,74 @@ var ProductsApi = /** @class */ (function (_super) {
357
360
  });
358
361
  });
359
362
  };
363
+ /**
364
+ * Updates a product by a given ID.
365
+ * Update product
366
+ */
367
+ ProductsApi.prototype.updateProductRaw = function (requestParameters, initOverrides) {
368
+ return __awaiter(this, void 0, void 0, function () {
369
+ var queryParameters, headerParameters, _a, _b, response;
370
+ return __generator(this, function (_c) {
371
+ switch (_c.label) {
372
+ case 0:
373
+ if (requestParameters.project === null || requestParameters.project === undefined) {
374
+ throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling updateProduct.');
375
+ }
376
+ if (requestParameters.productId === null || requestParameters.productId === undefined) {
377
+ throw new runtime.RequiredError('productId', 'Required parameter requestParameters.productId was null or undefined when calling updateProduct.');
378
+ }
379
+ queryParameters = {};
380
+ if (requestParameters.project !== undefined) {
381
+ queryParameters['project'] = requestParameters.project;
382
+ }
383
+ headerParameters = {};
384
+ headerParameters['Content-Type'] = 'application/json';
385
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
386
+ // oauth required
387
+ _a = headerParameters;
388
+ _b = "Authorization";
389
+ return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
390
+ case 1:
391
+ // oauth required
392
+ _a[_b] = _c.sent();
393
+ _c.label = 2;
394
+ case 2:
395
+ if (this.configuration && this.configuration.apiKey) {
396
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
397
+ }
398
+ return [4 /*yield*/, this.request({
399
+ path: "/v1/catalog/products/{productId}".replace("{".concat("productId", "}"), encodeURIComponent(String(requestParameters.productId))),
400
+ method: 'PATCH',
401
+ headers: headerParameters,
402
+ query: queryParameters,
403
+ body: (0, index_1.UpdateProductRequestToJSON)(requestParameters.updateProductRequest),
404
+ }, initOverrides)];
405
+ case 3:
406
+ response = _c.sent();
407
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductFromJSON)(jsonValue); })];
408
+ }
409
+ });
410
+ });
411
+ };
412
+ /**
413
+ * Updates a product by a given ID.
414
+ * Update product
415
+ */
416
+ ProductsApi.prototype.updateProduct = function (project, productId, optionalParameters, initOverrides) {
417
+ if (optionalParameters === void 0) { optionalParameters = {}; }
418
+ return __awaiter(this, void 0, void 0, function () {
419
+ var response;
420
+ return __generator(this, function (_a) {
421
+ switch (_a.label) {
422
+ case 0: return [4 /*yield*/, this.updateProductRaw(__assign({ project: project, productId: productId }, optionalParameters), initOverrides)];
423
+ case 1:
424
+ response = _a.sent();
425
+ return [4 /*yield*/, response.value()];
426
+ case 2: return [2 /*return*/, _a.sent()];
427
+ }
428
+ });
429
+ });
430
+ };
360
431
  return ProductsApi;
361
432
  }(runtime.BaseAPI));
362
433
  exports.ProductsApi = ProductsApi;
@@ -2,7 +2,7 @@
2
2
  * Product Catalog API
3
3
  * Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
4
4
  *
5
- * The version of the OpenAPI document: 1.7.0
5
+ * The version of the OpenAPI document: 1.9.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -5,7 +5,7 @@
5
5
  * Product Catalog API
6
6
  * Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
7
7
  *
8
- * The version of the OpenAPI document: 1.7.0
8
+ * The version of the OpenAPI document: 1.9.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Product Catalog API
3
3
  * Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
4
4
  *
5
- * The version of the OpenAPI document: 1.7.0
5
+ * The version of the OpenAPI document: 1.9.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -5,7 +5,7 @@
5
5
  * Product Catalog API
6
6
  * Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
7
7
  *
8
- * The version of the OpenAPI document: 1.7.0
8
+ * The version of the OpenAPI document: 1.9.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -14,14 +14,13 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.ApiErrorToJSON = exports.ApiErrorFromJSONTyped = exports.ApiErrorFromJSON = exports.instanceOfApiError = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  /**
19
18
  * Check if a given object implements the ApiError interface.
20
19
  */
21
20
  function instanceOfApiError(value) {
22
- var isInstance = true;
23
- isInstance = isInstance && "message" in value;
24
- return isInstance;
21
+ if (!('message' in value))
22
+ return false;
23
+ return true;
25
24
  }
26
25
  exports.instanceOfApiError = instanceOfApiError;
27
26
  function ApiErrorFromJSON(json) {
@@ -29,25 +28,22 @@ function ApiErrorFromJSON(json) {
29
28
  }
30
29
  exports.ApiErrorFromJSON = ApiErrorFromJSON;
31
30
  function ApiErrorFromJSONTyped(json, ignoreDiscriminator) {
32
- if ((json === undefined) || (json === null)) {
31
+ if (json == null) {
33
32
  return json;
34
33
  }
35
34
  return {
36
- 'code': !(0, runtime_1.exists)(json, 'code') ? undefined : json['code'],
35
+ 'code': json['code'] == null ? undefined : json['code'],
37
36
  'message': json['message'],
38
37
  };
39
38
  }
40
39
  exports.ApiErrorFromJSONTyped = ApiErrorFromJSONTyped;
41
40
  function ApiErrorToJSON(value) {
42
- if (value === undefined) {
43
- return undefined;
44
- }
45
- if (value === null) {
46
- return null;
41
+ if (value == null) {
42
+ return value;
47
43
  }
48
44
  return {
49
- 'code': value.code,
50
- 'message': value.message,
45
+ 'code': value['code'],
46
+ 'message': value['message'],
51
47
  };
52
48
  }
53
49
  exports.ApiErrorToJSON = ApiErrorToJSON;
@@ -2,7 +2,7 @@
2
2
  * Product Catalog API
3
3
  * Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
4
4
  *
5
- * The version of the OpenAPI document: 1.7.0
5
+ * The version of the OpenAPI document: 1.9.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -5,7 +5,7 @@
5
5
  * Product Catalog API
6
6
  * Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
7
7
  *
8
- * The version of the OpenAPI document: 1.7.0
8
+ * The version of the OpenAPI document: 1.9.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -14,16 +14,16 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.AttributeToJSON = exports.AttributeFromJSONTyped = exports.AttributeFromJSON = exports.instanceOfAttribute = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  var AttributeThumbnail_1 = require("./AttributeThumbnail");
19
18
  /**
20
19
  * Check if a given object implements the Attribute interface.
21
20
  */
22
21
  function instanceOfAttribute(value) {
23
- var isInstance = true;
24
- isInstance = isInstance && "name" in value;
25
- isInstance = isInstance && "value" in value;
26
- return isInstance;
22
+ if (!('name' in value))
23
+ return false;
24
+ if (!('value' in value))
25
+ return false;
26
+ return true;
27
27
  }
28
28
  exports.instanceOfAttribute = instanceOfAttribute;
29
29
  function AttributeFromJSON(json) {
@@ -31,29 +31,26 @@ function AttributeFromJSON(json) {
31
31
  }
32
32
  exports.AttributeFromJSON = AttributeFromJSON;
33
33
  function AttributeFromJSONTyped(json, ignoreDiscriminator) {
34
- if ((json === undefined) || (json === null)) {
34
+ if (json == null) {
35
35
  return json;
36
36
  }
37
37
  return {
38
38
  'name': json['name'],
39
39
  'value': json['value'],
40
- 'thumbnail': !(0, runtime_1.exists)(json, 'thumbnail') ? undefined : (0, AttributeThumbnail_1.AttributeThumbnailFromJSON)(json['thumbnail']),
41
- 'tags': !(0, runtime_1.exists)(json, 'tags') ? undefined : json['tags'],
40
+ 'thumbnail': json['thumbnail'] == null ? undefined : (0, AttributeThumbnail_1.AttributeThumbnailFromJSON)(json['thumbnail']),
41
+ 'tags': json['tags'] == null ? undefined : json['tags'],
42
42
  };
43
43
  }
44
44
  exports.AttributeFromJSONTyped = AttributeFromJSONTyped;
45
45
  function AttributeToJSON(value) {
46
- if (value === undefined) {
47
- return undefined;
48
- }
49
- if (value === null) {
50
- return null;
46
+ if (value == null) {
47
+ return value;
51
48
  }
52
49
  return {
53
- 'name': value.name,
54
- 'value': value.value,
55
- 'thumbnail': (0, AttributeThumbnail_1.AttributeThumbnailToJSON)(value.thumbnail),
56
- 'tags': value.tags,
50
+ 'name': value['name'],
51
+ 'value': value['value'],
52
+ 'thumbnail': (0, AttributeThumbnail_1.AttributeThumbnailToJSON)(value['thumbnail']),
53
+ 'tags': value['tags'],
57
54
  };
58
55
  }
59
56
  exports.AttributeToJSON = AttributeToJSON;
@@ -2,7 +2,7 @@
2
2
  * Product Catalog API
3
3
  * Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
4
4
  *
5
- * The version of the OpenAPI document: 1.7.0
5
+ * The version of the OpenAPI document: 1.9.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -5,7 +5,7 @@
5
5
  * Product Catalog API
6
6
  * Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
7
7
  *
8
- * The version of the OpenAPI document: 1.7.0
8
+ * The version of the OpenAPI document: 1.9.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -14,7 +14,6 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.AttributeThumbnailToJSON = exports.AttributeThumbnailFromJSONTyped = exports.AttributeThumbnailFromJSON = exports.instanceOfAttributeThumbnail = exports.AttributeThumbnailTypeEnum = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  /**
19
18
  * @export
20
19
  */
@@ -27,8 +26,7 @@ exports.AttributeThumbnailTypeEnum = {
27
26
  * Check if a given object implements the AttributeThumbnail interface.
28
27
  */
29
28
  function instanceOfAttributeThumbnail(value) {
30
- var isInstance = true;
31
- return isInstance;
29
+ return true;
32
30
  }
33
31
  exports.instanceOfAttributeThumbnail = instanceOfAttributeThumbnail;
34
32
  function AttributeThumbnailFromJSON(json) {
@@ -36,25 +34,22 @@ function AttributeThumbnailFromJSON(json) {
36
34
  }
37
35
  exports.AttributeThumbnailFromJSON = AttributeThumbnailFromJSON;
38
36
  function AttributeThumbnailFromJSONTyped(json, ignoreDiscriminator) {
39
- if ((json === undefined) || (json === null)) {
37
+ if (json == null) {
40
38
  return json;
41
39
  }
42
40
  return {
43
- 'type': !(0, runtime_1.exists)(json, 'type') ? undefined : json['type'],
44
- 'value': !(0, runtime_1.exists)(json, 'value') ? undefined : json['value'],
41
+ 'type': json['type'] == null ? undefined : json['type'],
42
+ 'value': json['value'] == null ? undefined : json['value'],
45
43
  };
46
44
  }
47
45
  exports.AttributeThumbnailFromJSONTyped = AttributeThumbnailFromJSONTyped;
48
46
  function AttributeThumbnailToJSON(value) {
49
- if (value === undefined) {
50
- return undefined;
51
- }
52
- if (value === null) {
53
- return null;
47
+ if (value == null) {
48
+ return value;
54
49
  }
55
50
  return {
56
- 'type': value.type,
57
- 'value': value.value,
51
+ 'type': value['type'],
52
+ 'value': value['value'],
58
53
  };
59
54
  }
60
55
  exports.AttributeThumbnailToJSON = AttributeThumbnailToJSON;
@@ -2,16 +2,16 @@
2
2
  * Product Catalog API
3
3
  * Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
4
4
  *
5
- * The version of the OpenAPI document: 1.7.0
5
+ * The version of the OpenAPI document: 1.9.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { CreateProductRequestImagesInner } from './CreateProductRequestImagesInner';
12
13
  import type { CreateProductRequestSeoMetadata } from './CreateProductRequestSeoMetadata';
13
- import type { CreateProductRequestVariantsInner } from './CreateProductRequestVariantsInner';
14
- import type { CreateProductRequestVariantsInnerImagesInner } from './CreateProductRequestVariantsInnerImagesInner';
14
+ import type { CreateProductVariant } from './CreateProductVariant';
15
15
  /**
16
16
  *
17
17
  * @export
@@ -62,16 +62,22 @@ export interface CreateProductRequest {
62
62
  tags?: Array<string>;
63
63
  /**
64
64
  * Variants
65
- * @type {Array<CreateProductRequestVariantsInner>}
65
+ * @type {Array<CreateProductVariant>}
66
66
  * @memberof CreateProductRequest
67
67
  */
68
- variants: Array<CreateProductRequestVariantsInner>;
68
+ variants: Array<CreateProductVariant>;
69
+ /**
70
+ * Images to attach to the product. For example, photos of models using/wearing the product.
71
+ * @type {Array<CreateProductRequestImagesInner>}
72
+ * @memberof CreateProductRequest
73
+ */
74
+ images?: Array<CreateProductRequestImagesInner>;
69
75
  /**
70
76
  * Additional files to attach to the product. For example, original design files e.g. PSD, AI, etc.
71
- * @type {Array<CreateProductRequestVariantsInnerImagesInner>}
77
+ * @type {Array<CreateProductRequestImagesInner>}
72
78
  * @memberof CreateProductRequest
73
79
  */
74
- additionalFiles?: Array<CreateProductRequestVariantsInnerImagesInner>;
80
+ additionalFiles?: Array<CreateProductRequestImagesInner>;
75
81
  }
76
82
  /**
77
83
  * Check if a given object implements the CreateProductRequest interface.
@@ -5,7 +5,7 @@
5
5
  * Product Catalog API
6
6
  * Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
7
7
  *
8
- * The version of the OpenAPI document: 1.7.0
8
+ * The version of the OpenAPI document: 1.9.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -14,18 +14,18 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.CreateProductRequestToJSON = exports.CreateProductRequestFromJSONTyped = exports.CreateProductRequestFromJSON = exports.instanceOfCreateProductRequest = void 0;
17
- var runtime_1 = require("../runtime");
17
+ var CreateProductRequestImagesInner_1 = require("./CreateProductRequestImagesInner");
18
18
  var CreateProductRequestSeoMetadata_1 = require("./CreateProductRequestSeoMetadata");
19
- var CreateProductRequestVariantsInner_1 = require("./CreateProductRequestVariantsInner");
20
- var CreateProductRequestVariantsInnerImagesInner_1 = require("./CreateProductRequestVariantsInnerImagesInner");
19
+ var CreateProductVariant_1 = require("./CreateProductVariant");
21
20
  /**
22
21
  * Check if a given object implements the CreateProductRequest interface.
23
22
  */
24
23
  function instanceOfCreateProductRequest(value) {
25
- var isInstance = true;
26
- isInstance = isInstance && "gfnProductRef" in value;
27
- isInstance = isInstance && "variants" in value;
28
- return isInstance;
24
+ if (!('gfnProductRef' in value))
25
+ return false;
26
+ if (!('variants' in value))
27
+ return false;
28
+ return true;
29
29
  }
30
30
  exports.instanceOfCreateProductRequest = instanceOfCreateProductRequest;
31
31
  function CreateProductRequestFromJSON(json) {
@@ -33,39 +33,38 @@ function CreateProductRequestFromJSON(json) {
33
33
  }
34
34
  exports.CreateProductRequestFromJSON = CreateProductRequestFromJSON;
35
35
  function CreateProductRequestFromJSONTyped(json, ignoreDiscriminator) {
36
- if ((json === undefined) || (json === null)) {
36
+ if (json == null) {
37
37
  return json;
38
38
  }
39
39
  return {
40
40
  'gfnProductRef': json['gfnProductRef'],
41
- 'title': !(0, runtime_1.exists)(json, 'title') ? undefined : json['title'],
42
- 'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'],
43
- 'enabled': !(0, runtime_1.exists)(json, 'enabled') ? undefined : json['enabled'],
44
- 'slug': !(0, runtime_1.exists)(json, 'slug') ? undefined : json['slug'],
45
- 'seoMetadata': !(0, runtime_1.exists)(json, 'seoMetadata') ? undefined : (0, CreateProductRequestSeoMetadata_1.CreateProductRequestSeoMetadataFromJSON)(json['seoMetadata']),
46
- 'tags': !(0, runtime_1.exists)(json, 'tags') ? undefined : json['tags'],
47
- 'variants': (json['variants'].map(CreateProductRequestVariantsInner_1.CreateProductRequestVariantsInnerFromJSON)),
48
- 'additionalFiles': !(0, runtime_1.exists)(json, 'additionalFiles') ? undefined : (json['additionalFiles'].map(CreateProductRequestVariantsInnerImagesInner_1.CreateProductRequestVariantsInnerImagesInnerFromJSON)),
41
+ 'title': json['title'] == null ? undefined : json['title'],
42
+ 'description': json['description'] == null ? undefined : json['description'],
43
+ 'enabled': json['enabled'] == null ? undefined : json['enabled'],
44
+ 'slug': json['slug'] == null ? undefined : json['slug'],
45
+ 'seoMetadata': json['seoMetadata'] == null ? undefined : (0, CreateProductRequestSeoMetadata_1.CreateProductRequestSeoMetadataFromJSON)(json['seoMetadata']),
46
+ 'tags': json['tags'] == null ? undefined : json['tags'],
47
+ 'variants': (json['variants'].map(CreateProductVariant_1.CreateProductVariantFromJSON)),
48
+ 'images': json['images'] == null ? undefined : (json['images'].map(CreateProductRequestImagesInner_1.CreateProductRequestImagesInnerFromJSON)),
49
+ 'additionalFiles': json['additionalFiles'] == null ? undefined : (json['additionalFiles'].map(CreateProductRequestImagesInner_1.CreateProductRequestImagesInnerFromJSON)),
49
50
  };
50
51
  }
51
52
  exports.CreateProductRequestFromJSONTyped = CreateProductRequestFromJSONTyped;
52
53
  function CreateProductRequestToJSON(value) {
53
- if (value === undefined) {
54
- return undefined;
55
- }
56
- if (value === null) {
57
- return null;
54
+ if (value == null) {
55
+ return value;
58
56
  }
59
57
  return {
60
- 'gfnProductRef': value.gfnProductRef,
61
- 'title': value.title,
62
- 'description': value.description,
63
- 'enabled': value.enabled,
64
- 'slug': value.slug,
65
- 'seoMetadata': (0, CreateProductRequestSeoMetadata_1.CreateProductRequestSeoMetadataToJSON)(value.seoMetadata),
66
- 'tags': value.tags,
67
- 'variants': (value.variants.map(CreateProductRequestVariantsInner_1.CreateProductRequestVariantsInnerToJSON)),
68
- 'additionalFiles': value.additionalFiles === undefined ? undefined : (value.additionalFiles.map(CreateProductRequestVariantsInnerImagesInner_1.CreateProductRequestVariantsInnerImagesInnerToJSON)),
58
+ 'gfnProductRef': value['gfnProductRef'],
59
+ 'title': value['title'],
60
+ 'description': value['description'],
61
+ 'enabled': value['enabled'],
62
+ 'slug': value['slug'],
63
+ 'seoMetadata': (0, CreateProductRequestSeoMetadata_1.CreateProductRequestSeoMetadataToJSON)(value['seoMetadata']),
64
+ 'tags': value['tags'],
65
+ 'variants': (value['variants'].map(CreateProductVariant_1.CreateProductVariantToJSON)),
66
+ 'images': value['images'] == null ? undefined : (value['images'].map(CreateProductRequestImagesInner_1.CreateProductRequestImagesInnerToJSON)),
67
+ 'additionalFiles': value['additionalFiles'] == null ? undefined : (value['additionalFiles'].map(CreateProductRequestImagesInner_1.CreateProductRequestImagesInnerToJSON)),
69
68
  };
70
69
  }
71
70
  exports.CreateProductRequestToJSON = CreateProductRequestToJSON;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Product Catalog API
3
+ * Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
4
+ *
5
+ * The version of the OpenAPI document: 1.9.0
6
+ * Contact: hello@teemill.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface CreateProductRequestImagesInner
16
+ */
17
+ export interface CreateProductRequestImagesInner {
18
+ /**
19
+ * Publicly available file URL.
20
+ * @type {string}
21
+ * @memberof CreateProductRequestImagesInner
22
+ */
23
+ src?: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the CreateProductRequestImagesInner interface.
27
+ */
28
+ export declare function instanceOfCreateProductRequestImagesInner(value: object): boolean;
29
+ export declare function CreateProductRequestImagesInnerFromJSON(json: any): CreateProductRequestImagesInner;
30
+ export declare function CreateProductRequestImagesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateProductRequestImagesInner;
31
+ export declare function CreateProductRequestImagesInnerToJSON(value?: CreateProductRequestImagesInner | null): any;