@teemill/product-catalog 1.0.2

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 (54) hide show
  1. package/.openapi-generator/FILES +22 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +45 -0
  5. package/dist/apis/ProductsApi.d.ts +49 -0
  6. package/dist/apis/ProductsApi.js +199 -0
  7. package/dist/apis/VariantsApi.d.ts +49 -0
  8. package/dist/apis/VariantsApi.js +199 -0
  9. package/dist/apis/index.d.ts +2 -0
  10. package/dist/apis/index.js +20 -0
  11. package/dist/index.d.ts +3 -0
  12. package/dist/index.js +21 -0
  13. package/dist/models/ApiError.d.ts +37 -0
  14. package/dist/models/ApiError.js +53 -0
  15. package/dist/models/Attribute.d.ts +37 -0
  16. package/dist/models/Attribute.js +52 -0
  17. package/dist/models/Image.d.ts +67 -0
  18. package/dist/models/Image.js +62 -0
  19. package/dist/models/Price.d.ts +37 -0
  20. package/dist/models/Price.js +52 -0
  21. package/dist/models/Product.d.ts +93 -0
  22. package/dist/models/Product.js +73 -0
  23. package/dist/models/ProductsResponse.d.ts +38 -0
  24. package/dist/models/ProductsResponse.js +53 -0
  25. package/dist/models/Stock.d.ts +31 -0
  26. package/dist/models/Stock.js +50 -0
  27. package/dist/models/Variant.d.ts +114 -0
  28. package/dist/models/Variant.js +81 -0
  29. package/dist/models/VariantProduct.d.ts +37 -0
  30. package/dist/models/VariantProduct.js +52 -0
  31. package/dist/models/VariantsResponse.d.ts +38 -0
  32. package/dist/models/VariantsResponse.js +53 -0
  33. package/dist/models/index.d.ts +10 -0
  34. package/dist/models/index.js +28 -0
  35. package/dist/runtime.d.ts +182 -0
  36. package/dist/runtime.js +562 -0
  37. package/package.json +19 -0
  38. package/src/apis/ProductsApi.ts +149 -0
  39. package/src/apis/VariantsApi.ts +149 -0
  40. package/src/apis/index.ts +4 -0
  41. package/src/index.ts +5 -0
  42. package/src/models/ApiError.ts +74 -0
  43. package/src/models/Attribute.ts +73 -0
  44. package/src/models/Image.ts +113 -0
  45. package/src/models/Price.ts +73 -0
  46. package/src/models/Product.ts +159 -0
  47. package/src/models/ProductsResponse.ts +80 -0
  48. package/src/models/Stock.ts +65 -0
  49. package/src/models/Variant.ts +200 -0
  50. package/src/models/VariantProduct.ts +73 -0
  51. package/src/models/VariantsResponse.ts +80 -0
  52. package/src/models/index.ts +12 -0
  53. package/src/runtime.ts +431 -0
  54. package/tsconfig.json +20 -0
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Product Catalog API
3
+ * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
+ *
5
+ * The version of the OpenAPI document: 1.0.2
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 ApiError
16
+ */
17
+ export interface ApiError {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof ApiError
22
+ */
23
+ code?: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof ApiError
28
+ */
29
+ message: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the ApiError interface.
33
+ */
34
+ export declare function instanceOfApiError(value: object): boolean;
35
+ export declare function ApiErrorFromJSON(json: any): ApiError;
36
+ export declare function ApiErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiError;
37
+ export declare function ApiErrorToJSON(value?: ApiError | null): any;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Product Catalog API
6
+ * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
+ *
8
+ * The version of the OpenAPI document: 1.0.2
9
+ * Contact: hello@teemill.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ApiErrorToJSON = exports.ApiErrorFromJSONTyped = exports.ApiErrorFromJSON = exports.instanceOfApiError = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ /**
19
+ * Check if a given object implements the ApiError interface.
20
+ */
21
+ function instanceOfApiError(value) {
22
+ var isInstance = true;
23
+ isInstance = isInstance && "message" in value;
24
+ return isInstance;
25
+ }
26
+ exports.instanceOfApiError = instanceOfApiError;
27
+ function ApiErrorFromJSON(json) {
28
+ return ApiErrorFromJSONTyped(json, false);
29
+ }
30
+ exports.ApiErrorFromJSON = ApiErrorFromJSON;
31
+ function ApiErrorFromJSONTyped(json, ignoreDiscriminator) {
32
+ if ((json === undefined) || (json === null)) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'code': !(0, runtime_1.exists)(json, 'code') ? undefined : json['code'],
37
+ 'message': json['message'],
38
+ };
39
+ }
40
+ exports.ApiErrorFromJSONTyped = ApiErrorFromJSONTyped;
41
+ function ApiErrorToJSON(value) {
42
+ if (value === undefined) {
43
+ return undefined;
44
+ }
45
+ if (value === null) {
46
+ return null;
47
+ }
48
+ return {
49
+ 'code': value.code,
50
+ 'message': value.message,
51
+ };
52
+ }
53
+ exports.ApiErrorToJSON = ApiErrorToJSON;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Product Catalog API
3
+ * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
+ *
5
+ * The version of the OpenAPI document: 1.0.2
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 Attribute
16
+ */
17
+ export interface Attribute {
18
+ /**
19
+ * Attribute name
20
+ * @type {string}
21
+ * @memberof Attribute
22
+ */
23
+ name?: string;
24
+ /**
25
+ * Attribute value
26
+ * @type {string}
27
+ * @memberof Attribute
28
+ */
29
+ value?: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the Attribute interface.
33
+ */
34
+ export declare function instanceOfAttribute(value: object): boolean;
35
+ export declare function AttributeFromJSON(json: any): Attribute;
36
+ export declare function AttributeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Attribute;
37
+ export declare function AttributeToJSON(value?: Attribute | null): any;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Product Catalog API
6
+ * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
+ *
8
+ * The version of the OpenAPI document: 1.0.2
9
+ * Contact: hello@teemill.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.AttributeToJSON = exports.AttributeFromJSONTyped = exports.AttributeFromJSON = exports.instanceOfAttribute = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ /**
19
+ * Check if a given object implements the Attribute interface.
20
+ */
21
+ function instanceOfAttribute(value) {
22
+ var isInstance = true;
23
+ return isInstance;
24
+ }
25
+ exports.instanceOfAttribute = instanceOfAttribute;
26
+ function AttributeFromJSON(json) {
27
+ return AttributeFromJSONTyped(json, false);
28
+ }
29
+ exports.AttributeFromJSON = AttributeFromJSON;
30
+ function AttributeFromJSONTyped(json, ignoreDiscriminator) {
31
+ if ((json === undefined) || (json === null)) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'],
36
+ 'value': !(0, runtime_1.exists)(json, 'value') ? undefined : json['value'],
37
+ };
38
+ }
39
+ exports.AttributeFromJSONTyped = AttributeFromJSONTyped;
40
+ function AttributeToJSON(value) {
41
+ if (value === undefined) {
42
+ return undefined;
43
+ }
44
+ if (value === null) {
45
+ return null;
46
+ }
47
+ return {
48
+ 'name': value.name,
49
+ 'value': value.value,
50
+ };
51
+ }
52
+ exports.AttributeToJSON = AttributeToJSON;
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Product Catalog API
3
+ * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
+ *
5
+ * The version of the OpenAPI document: 1.0.2
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
+ * Image description
14
+ * @export
15
+ * @interface Image
16
+ */
17
+ export interface Image {
18
+ /**
19
+ * Unique object identifier
20
+ * @type {string}
21
+ * @memberof Image
22
+ */
23
+ id?: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof Image
28
+ */
29
+ src?: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof Image
34
+ */
35
+ alt?: string;
36
+ /**
37
+ * List of variant Ids
38
+ * @type {Array<string>}
39
+ * @memberof Image
40
+ */
41
+ variantIds?: Array<string>;
42
+ /**
43
+ *
44
+ * @type {number}
45
+ * @memberof Image
46
+ */
47
+ sortOrder?: number;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof Image
52
+ */
53
+ createdAt?: string;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof Image
58
+ */
59
+ updatedAt?: string;
60
+ }
61
+ /**
62
+ * Check if a given object implements the Image interface.
63
+ */
64
+ export declare function instanceOfImage(value: object): boolean;
65
+ export declare function ImageFromJSON(json: any): Image;
66
+ export declare function ImageFromJSONTyped(json: any, ignoreDiscriminator: boolean): Image;
67
+ export declare function ImageToJSON(value?: Image | null): any;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Product Catalog API
6
+ * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
+ *
8
+ * The version of the OpenAPI document: 1.0.2
9
+ * Contact: hello@teemill.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ImageToJSON = exports.ImageFromJSONTyped = exports.ImageFromJSON = exports.instanceOfImage = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ /**
19
+ * Check if a given object implements the Image interface.
20
+ */
21
+ function instanceOfImage(value) {
22
+ var isInstance = true;
23
+ return isInstance;
24
+ }
25
+ exports.instanceOfImage = instanceOfImage;
26
+ function ImageFromJSON(json) {
27
+ return ImageFromJSONTyped(json, false);
28
+ }
29
+ exports.ImageFromJSON = ImageFromJSON;
30
+ function ImageFromJSONTyped(json, ignoreDiscriminator) {
31
+ if ((json === undefined) || (json === null)) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'id': !(0, runtime_1.exists)(json, 'id') ? undefined : json['id'],
36
+ 'src': !(0, runtime_1.exists)(json, 'src') ? undefined : json['src'],
37
+ 'alt': !(0, runtime_1.exists)(json, 'alt') ? undefined : json['alt'],
38
+ 'variantIds': !(0, runtime_1.exists)(json, 'variantIds') ? undefined : json['variantIds'],
39
+ 'sortOrder': !(0, runtime_1.exists)(json, 'sortOrder') ? undefined : json['sortOrder'],
40
+ 'createdAt': !(0, runtime_1.exists)(json, 'createdAt') ? undefined : json['createdAt'],
41
+ 'updatedAt': !(0, runtime_1.exists)(json, 'updatedAt') ? undefined : json['updatedAt'],
42
+ };
43
+ }
44
+ exports.ImageFromJSONTyped = ImageFromJSONTyped;
45
+ function ImageToJSON(value) {
46
+ if (value === undefined) {
47
+ return undefined;
48
+ }
49
+ if (value === null) {
50
+ return null;
51
+ }
52
+ return {
53
+ 'id': value.id,
54
+ 'src': value.src,
55
+ 'alt': value.alt,
56
+ 'variantIds': value.variantIds,
57
+ 'sortOrder': value.sortOrder,
58
+ 'createdAt': value.createdAt,
59
+ 'updatedAt': value.updatedAt,
60
+ };
61
+ }
62
+ exports.ImageToJSON = ImageToJSON;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Product Catalog API
3
+ * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
+ *
5
+ * The version of the OpenAPI document: 1.0.2
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
+ * Standard price definition that defines the amount, tax rate and currency.
14
+ * @export
15
+ * @interface Price
16
+ */
17
+ export interface Price {
18
+ /**
19
+ * Price including tax in the specified currency.
20
+ * @type {number}
21
+ * @memberof Price
22
+ */
23
+ amount?: number;
24
+ /**
25
+ * Currency code for the currency the price is valued in.
26
+ * @type {string}
27
+ * @memberof Price
28
+ */
29
+ currencyCode?: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the Price interface.
33
+ */
34
+ export declare function instanceOfPrice(value: object): boolean;
35
+ export declare function PriceFromJSON(json: any): Price;
36
+ export declare function PriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Price;
37
+ export declare function PriceToJSON(value?: Price | null): any;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Product Catalog API
6
+ * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
+ *
8
+ * The version of the OpenAPI document: 1.0.2
9
+ * Contact: hello@teemill.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.PriceToJSON = exports.PriceFromJSONTyped = exports.PriceFromJSON = exports.instanceOfPrice = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ /**
19
+ * Check if a given object implements the Price interface.
20
+ */
21
+ function instanceOfPrice(value) {
22
+ var isInstance = true;
23
+ return isInstance;
24
+ }
25
+ exports.instanceOfPrice = instanceOfPrice;
26
+ function PriceFromJSON(json) {
27
+ return PriceFromJSONTyped(json, false);
28
+ }
29
+ exports.PriceFromJSON = PriceFromJSON;
30
+ function PriceFromJSONTyped(json, ignoreDiscriminator) {
31
+ if ((json === undefined) || (json === null)) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'amount': !(0, runtime_1.exists)(json, 'amount') ? undefined : json['amount'],
36
+ 'currencyCode': !(0, runtime_1.exists)(json, 'currencyCode') ? undefined : json['currencyCode'],
37
+ };
38
+ }
39
+ exports.PriceFromJSONTyped = PriceFromJSONTyped;
40
+ function PriceToJSON(value) {
41
+ if (value === undefined) {
42
+ return undefined;
43
+ }
44
+ if (value === null) {
45
+ return null;
46
+ }
47
+ return {
48
+ 'amount': value.amount,
49
+ 'currencyCode': value.currencyCode,
50
+ };
51
+ }
52
+ exports.PriceToJSON = PriceToJSON;
@@ -0,0 +1,93 @@
1
+ /**
2
+ * Product Catalog API
3
+ * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
+ *
5
+ * The version of the OpenAPI document: 1.0.2
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
+ import type { Image } from './Image';
13
+ import type { Variant } from './Variant';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface Product
18
+ */
19
+ export interface Product {
20
+ /**
21
+ * Unique object identifier
22
+ * @type {string}
23
+ * @memberof Product
24
+ */
25
+ id?: string;
26
+ /**
27
+ * A reference to the resource location
28
+ * @type {string}
29
+ * @memberof Product
30
+ */
31
+ ref?: string;
32
+ /**
33
+ *
34
+ * @type {string}
35
+ * @memberof Product
36
+ */
37
+ title: string;
38
+ /**
39
+ *
40
+ * @type {string}
41
+ * @memberof Product
42
+ */
43
+ description: string;
44
+ /**
45
+ *
46
+ * @type {string}
47
+ * @memberof Product
48
+ */
49
+ readonly slug?: string;
50
+ /**
51
+ *
52
+ * @type {Array<string>}
53
+ * @memberof Product
54
+ */
55
+ tags?: Array<string>;
56
+ /**
57
+ *
58
+ * @type {Date}
59
+ * @memberof Product
60
+ */
61
+ createdAt?: Date;
62
+ /**
63
+ *
64
+ * @type {Date}
65
+ * @memberof Product
66
+ */
67
+ updatedAt?: Date;
68
+ /**
69
+ *
70
+ * @type {Date}
71
+ * @memberof Product
72
+ */
73
+ publishedAt?: Date;
74
+ /**
75
+ * Images
76
+ * @type {Array<Image>}
77
+ * @memberof Product
78
+ */
79
+ images?: Array<Image>;
80
+ /**
81
+ * Variants
82
+ * @type {Array<Variant>}
83
+ * @memberof Product
84
+ */
85
+ variants?: Array<Variant>;
86
+ }
87
+ /**
88
+ * Check if a given object implements the Product interface.
89
+ */
90
+ export declare function instanceOfProduct(value: object): boolean;
91
+ export declare function ProductFromJSON(json: any): Product;
92
+ export declare function ProductFromJSONTyped(json: any, ignoreDiscriminator: boolean): Product;
93
+ export declare function ProductToJSON(value?: Product | null): any;
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Product Catalog API
6
+ * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
+ *
8
+ * The version of the OpenAPI document: 1.0.2
9
+ * Contact: hello@teemill.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ProductToJSON = exports.ProductFromJSONTyped = exports.ProductFromJSON = exports.instanceOfProduct = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ var Image_1 = require("./Image");
19
+ var Variant_1 = require("./Variant");
20
+ /**
21
+ * Check if a given object implements the Product interface.
22
+ */
23
+ function instanceOfProduct(value) {
24
+ var isInstance = true;
25
+ isInstance = isInstance && "title" in value;
26
+ isInstance = isInstance && "description" in value;
27
+ return isInstance;
28
+ }
29
+ exports.instanceOfProduct = instanceOfProduct;
30
+ function ProductFromJSON(json) {
31
+ return ProductFromJSONTyped(json, false);
32
+ }
33
+ exports.ProductFromJSON = ProductFromJSON;
34
+ function ProductFromJSONTyped(json, ignoreDiscriminator) {
35
+ if ((json === undefined) || (json === null)) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'id': !(0, runtime_1.exists)(json, 'id') ? undefined : json['id'],
40
+ 'ref': !(0, runtime_1.exists)(json, 'ref') ? undefined : json['ref'],
41
+ 'title': json['title'],
42
+ 'description': json['description'],
43
+ 'slug': !(0, runtime_1.exists)(json, 'slug') ? undefined : json['slug'],
44
+ 'tags': !(0, runtime_1.exists)(json, 'tags') ? undefined : json['tags'],
45
+ 'createdAt': !(0, runtime_1.exists)(json, 'createdAt') ? undefined : (new Date(json['createdAt'])),
46
+ 'updatedAt': !(0, runtime_1.exists)(json, 'updatedAt') ? undefined : (new Date(json['updatedAt'])),
47
+ 'publishedAt': !(0, runtime_1.exists)(json, 'publishedAt') ? undefined : (new Date(json['publishedAt'])),
48
+ 'images': !(0, runtime_1.exists)(json, 'images') ? undefined : (json['images'].map(Image_1.ImageFromJSON)),
49
+ 'variants': !(0, runtime_1.exists)(json, 'variants') ? undefined : (json['variants'].map(Variant_1.VariantFromJSON)),
50
+ };
51
+ }
52
+ exports.ProductFromJSONTyped = ProductFromJSONTyped;
53
+ function ProductToJSON(value) {
54
+ if (value === undefined) {
55
+ return undefined;
56
+ }
57
+ if (value === null) {
58
+ return null;
59
+ }
60
+ return {
61
+ 'id': value.id,
62
+ 'ref': value.ref,
63
+ 'title': value.title,
64
+ 'description': value.description,
65
+ 'tags': value.tags,
66
+ 'createdAt': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
67
+ 'updatedAt': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()),
68
+ 'publishedAt': value.publishedAt === undefined ? undefined : (value.publishedAt.toISOString()),
69
+ 'images': value.images === undefined ? undefined : (value.images.map(Image_1.ImageToJSON)),
70
+ 'variants': value.variants === undefined ? undefined : (value.variants.map(Variant_1.VariantToJSON)),
71
+ };
72
+ }
73
+ exports.ProductToJSON = ProductToJSON;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Product Catalog API
3
+ * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
+ *
5
+ * The version of the OpenAPI document: 1.0.2
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
+ import type { Product } from './Product';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ProductsResponse
17
+ */
18
+ export interface ProductsResponse {
19
+ /**
20
+ *
21
+ * @type {Array<Product>}
22
+ * @memberof ProductsResponse
23
+ */
24
+ products?: Array<Product>;
25
+ /**
26
+ *
27
+ * @type {number}
28
+ * @memberof ProductsResponse
29
+ */
30
+ nextPageToken?: number;
31
+ }
32
+ /**
33
+ * Check if a given object implements the ProductsResponse interface.
34
+ */
35
+ export declare function instanceOfProductsResponse(value: object): boolean;
36
+ export declare function ProductsResponseFromJSON(json: any): ProductsResponse;
37
+ export declare function ProductsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductsResponse;
38
+ export declare function ProductsResponseToJSON(value?: ProductsResponse | null): any;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Product Catalog API
6
+ * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
+ *
8
+ * The version of the OpenAPI document: 1.0.2
9
+ * Contact: hello@teemill.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ProductsResponseToJSON = exports.ProductsResponseFromJSONTyped = exports.ProductsResponseFromJSON = exports.instanceOfProductsResponse = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ var Product_1 = require("./Product");
19
+ /**
20
+ * Check if a given object implements the ProductsResponse interface.
21
+ */
22
+ function instanceOfProductsResponse(value) {
23
+ var isInstance = true;
24
+ return isInstance;
25
+ }
26
+ exports.instanceOfProductsResponse = instanceOfProductsResponse;
27
+ function ProductsResponseFromJSON(json) {
28
+ return ProductsResponseFromJSONTyped(json, false);
29
+ }
30
+ exports.ProductsResponseFromJSON = ProductsResponseFromJSON;
31
+ function ProductsResponseFromJSONTyped(json, ignoreDiscriminator) {
32
+ if ((json === undefined) || (json === null)) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'products': !(0, runtime_1.exists)(json, 'products') ? undefined : (json['products'].map(Product_1.ProductFromJSON)),
37
+ 'nextPageToken': !(0, runtime_1.exists)(json, 'nextPageToken') ? undefined : json['nextPageToken'],
38
+ };
39
+ }
40
+ exports.ProductsResponseFromJSONTyped = ProductsResponseFromJSONTyped;
41
+ function ProductsResponseToJSON(value) {
42
+ if (value === undefined) {
43
+ return undefined;
44
+ }
45
+ if (value === null) {
46
+ return null;
47
+ }
48
+ return {
49
+ 'products': value.products === undefined ? undefined : (value.products.map(Product_1.ProductToJSON)),
50
+ 'nextPageToken': value.nextPageToken,
51
+ };
52
+ }
53
+ exports.ProductsResponseToJSON = ProductsResponseToJSON;