@teemill/product-catalog 1.8.0 → 1.9.1
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.
- package/.openapi-generator/FILES +7 -5
- package/.openapi-generator/VERSION +1 -1
- package/README.md +2 -2
- package/dist/apis/ProductsApi.d.ts +17 -2
- package/dist/apis/ProductsApi.js +69 -1
- package/dist/apis/VariantsApi.d.ts +1 -1
- package/dist/apis/VariantsApi.js +1 -1
- package/dist/models/ApiError.d.ts +1 -1
- package/dist/models/ApiError.js +10 -14
- package/dist/models/Attribute.d.ts +1 -1
- package/dist/models/Attribute.js +15 -18
- package/dist/models/AttributeThumbnail.d.ts +1 -1
- package/dist/models/AttributeThumbnail.js +9 -14
- package/dist/models/CreateProductRequest.d.ts +9 -9
- package/dist/models/CreateProductRequest.js +30 -33
- package/dist/models/CreateProductRequestImagesInner.d.ts +31 -0
- package/dist/models/CreateProductRequestImagesInner.js +45 -0
- package/dist/models/CreateProductRequestSeoMetadata.d.ts +1 -1
- package/dist/models/CreateProductRequestSeoMetadata.js +7 -12
- package/dist/models/CreateProductVariant.d.ts +59 -0
- package/dist/models/CreateProductVariant.js +61 -0
- package/dist/models/CreateProductVariantApplicationsInner.d.ts +63 -0
- package/dist/models/CreateProductVariantApplicationsInner.js +73 -0
- package/dist/models/CreateProductVariantAttributesInner.d.ts +37 -0
- package/dist/models/CreateProductVariantAttributesInner.js +51 -0
- package/dist/models/CreateProductVariantRetailPrice.d.ts +37 -0
- package/dist/models/CreateProductVariantRetailPrice.js +51 -0
- package/dist/models/Image.d.ts +1 -1
- package/dist/models/Image.js +19 -24
- package/dist/models/ImportProducts200Response.d.ts +1 -1
- package/dist/models/ImportProducts200Response.js +7 -12
- package/dist/models/ModelFile.d.ts +31 -0
- package/dist/models/ModelFile.js +45 -0
- package/dist/models/Price.d.ts +1 -1
- package/dist/models/Price.js +9 -14
- package/dist/models/Product.d.ts +7 -1
- package/dist/models/Product.js +34 -35
- package/dist/models/ProductAdditionalFilesInner.d.ts +1 -1
- package/dist/models/ProductAdditionalFilesInner.js +9 -14
- package/dist/models/ProductsResponse.d.ts +1 -1
- package/dist/models/ProductsResponse.js +9 -14
- package/dist/models/SeoMetadata.d.ts +1 -1
- package/dist/models/SeoMetadata.js +7 -12
- package/dist/models/Stock.d.ts +1 -1
- package/dist/models/Stock.js +7 -12
- package/dist/models/UpdateProductRequest.d.ts +87 -0
- package/dist/models/UpdateProductRequest.js +65 -0
- package/dist/models/Variant.d.ts +1 -1
- package/dist/models/Variant.js +33 -36
- package/dist/models/VariantProduct.d.ts +1 -1
- package/dist/models/VariantProduct.js +9 -14
- package/dist/models/VariantsResponse.d.ts +1 -1
- package/dist/models/VariantsResponse.js +9 -14
- package/dist/models/index.d.ts +7 -5
- package/dist/models/index.js +7 -5
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +1 -1
- package/package.json +1 -1
- package/src/apis/ProductsApi.ts +73 -1
- package/src/apis/VariantsApi.ts +1 -1
- package/src/models/ApiError.ts +10 -15
- package/src/models/Attribute.ts +14 -19
- package/src/models/AttributeThumbnail.ts +10 -15
- package/src/models/CreateProductRequest.ts +44 -49
- package/src/models/CreateProductRequestImagesInner.ts +60 -0
- package/src/models/CreateProductRequestSeoMetadata.ts +8 -13
- package/src/models/CreateProductVariant.ts +119 -0
- package/src/models/CreateProductVariantApplicationsInner.ts +103 -0
- package/src/models/CreateProductVariantAttributesInner.ts +70 -0
- package/src/models/CreateProductVariantRetailPrice.ts +70 -0
- package/src/models/Image.ts +20 -25
- package/src/models/ImportProducts200Response.ts +8 -13
- package/src/models/ModelFile.ts +60 -0
- package/src/models/Price.ts +10 -15
- package/src/models/Product.ts +39 -36
- package/src/models/ProductAdditionalFilesInner.ts +10 -15
- package/src/models/ProductsResponse.ts +10 -15
- package/src/models/SeoMetadata.ts +8 -13
- package/src/models/Stock.ts +8 -13
- package/src/models/UpdateProductRequest.ts +145 -0
- package/src/models/Variant.ts +32 -37
- package/src/models/VariantProduct.ts +10 -15
- package/src/models/VariantsResponse.ts +10 -15
- package/src/models/index.ts +7 -5
- package/src/runtime.ts +1 -1
package/src/models/Attribute.ts
CHANGED
|
@@ -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
|
+
* The version of the OpenAPI document: 1.9.1
|
|
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 {
|
|
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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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 (
|
|
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':
|
|
79
|
-
'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
|
|
85
|
-
return
|
|
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
|
|
93
|
-
'value': value
|
|
94
|
-
'thumbnail': AttributeThumbnailToJSON(value
|
|
95
|
-
'tags': value
|
|
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
|
+
* The version of the OpenAPI document: 1.9.1
|
|
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 {
|
|
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
|
-
|
|
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 (
|
|
60
|
+
if (json == null) {
|
|
63
61
|
return json;
|
|
64
62
|
}
|
|
65
63
|
return {
|
|
66
64
|
|
|
67
|
-
'type':
|
|
68
|
-
'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
|
|
74
|
-
return
|
|
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
|
|
82
|
-
'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
|
+
* The version of the OpenAPI document: 1.9.1
|
|
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 {
|
|
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 {
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
} from './
|
|
30
|
+
CreateProductVariantFromJSON,
|
|
31
|
+
CreateProductVariantFromJSONTyped,
|
|
32
|
+
CreateProductVariantToJSON,
|
|
33
|
+
} from './CreateProductVariant';
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
*
|
|
@@ -82,33 +82,31 @@ export interface CreateProductRequest {
|
|
|
82
82
|
tags?: Array<string>;
|
|
83
83
|
/**
|
|
84
84
|
* Variants
|
|
85
|
-
* @type {Array<
|
|
85
|
+
* @type {Array<CreateProductVariant>}
|
|
86
86
|
* @memberof CreateProductRequest
|
|
87
87
|
*/
|
|
88
|
-
variants: Array<
|
|
88
|
+
variants: Array<CreateProductVariant>;
|
|
89
89
|
/**
|
|
90
90
|
* Images to attach to the product. For example, photos of models using/wearing the product.
|
|
91
|
-
* @type {Array<
|
|
91
|
+
* @type {Array<CreateProductRequestImagesInner>}
|
|
92
92
|
* @memberof CreateProductRequest
|
|
93
93
|
*/
|
|
94
|
-
images?: Array<
|
|
94
|
+
images?: Array<CreateProductRequestImagesInner>;
|
|
95
95
|
/**
|
|
96
96
|
* Additional files to attach to the product. For example, original design files e.g. PSD, AI, etc.
|
|
97
|
-
* @type {Array<
|
|
97
|
+
* @type {Array<CreateProductRequestImagesInner>}
|
|
98
98
|
* @memberof CreateProductRequest
|
|
99
99
|
*/
|
|
100
|
-
additionalFiles?: Array<
|
|
100
|
+
additionalFiles?: Array<CreateProductRequestImagesInner>;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
104
|
* Check if a given object implements the CreateProductRequest interface.
|
|
105
105
|
*/
|
|
106
106
|
export function instanceOfCreateProductRequest(value: object): boolean {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
return isInstance;
|
|
107
|
+
if (!('gfnProductRef' in value)) return false;
|
|
108
|
+
if (!('variants' in value)) return false;
|
|
109
|
+
return true;
|
|
112
110
|
}
|
|
113
111
|
|
|
114
112
|
export function CreateProductRequestFromJSON(json: any): CreateProductRequest {
|
|
@@ -116,43 +114,40 @@ export function CreateProductRequestFromJSON(json: any): CreateProductRequest {
|
|
|
116
114
|
}
|
|
117
115
|
|
|
118
116
|
export function CreateProductRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateProductRequest {
|
|
119
|
-
if (
|
|
117
|
+
if (json == null) {
|
|
120
118
|
return json;
|
|
121
119
|
}
|
|
122
120
|
return {
|
|
123
121
|
|
|
124
122
|
'gfnProductRef': json['gfnProductRef'],
|
|
125
|
-
'title':
|
|
126
|
-
'description':
|
|
127
|
-
'enabled':
|
|
128
|
-
'slug':
|
|
129
|
-
'seoMetadata':
|
|
130
|
-
'tags':
|
|
131
|
-
'variants': ((json['variants'] as Array<any>).map(
|
|
132
|
-
'images':
|
|
133
|
-
'additionalFiles':
|
|
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)),
|
|
134
132
|
};
|
|
135
133
|
}
|
|
136
134
|
|
|
137
135
|
export function CreateProductRequestToJSON(value?: CreateProductRequest | null): any {
|
|
138
|
-
if (value
|
|
139
|
-
return
|
|
140
|
-
}
|
|
141
|
-
if (value === null) {
|
|
142
|
-
return null;
|
|
136
|
+
if (value == null) {
|
|
137
|
+
return value;
|
|
143
138
|
}
|
|
144
139
|
return {
|
|
145
140
|
|
|
146
|
-
'gfnProductRef': value
|
|
147
|
-
'title': value
|
|
148
|
-
'description': value
|
|
149
|
-
'enabled': value
|
|
150
|
-
'slug': value
|
|
151
|
-
'seoMetadata': CreateProductRequestSeoMetadataToJSON(value
|
|
152
|
-
'tags': value
|
|
153
|
-
'variants': ((value
|
|
154
|
-
'images': value
|
|
155
|
-
'additionalFiles': value
|
|
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)),
|
|
156
151
|
};
|
|
157
152
|
}
|
|
158
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.1
|
|
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
|
+
* The version of the OpenAPI document: 1.9.1
|
|
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 {
|
|
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
|
-
|
|
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 (
|
|
42
|
+
if (json == null) {
|
|
45
43
|
return json;
|
|
46
44
|
}
|
|
47
45
|
return {
|
|
48
46
|
|
|
49
|
-
'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
|
|
55
|
-
return
|
|
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
|
|
57
|
+
'title': value['title'],
|
|
63
58
|
};
|
|
64
59
|
}
|
|
65
60
|
|
|
@@ -0,0 +1,119 @@
|
|
|
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.1
|
|
8
|
+
* Contact: hello@teemill.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { CreateProductRequestImagesInner } from './CreateProductRequestImagesInner';
|
|
17
|
+
import {
|
|
18
|
+
CreateProductRequestImagesInnerFromJSON,
|
|
19
|
+
CreateProductRequestImagesInnerFromJSONTyped,
|
|
20
|
+
CreateProductRequestImagesInnerToJSON,
|
|
21
|
+
} from './CreateProductRequestImagesInner';
|
|
22
|
+
import type { CreateProductVariantApplicationsInner } from './CreateProductVariantApplicationsInner';
|
|
23
|
+
import {
|
|
24
|
+
CreateProductVariantApplicationsInnerFromJSON,
|
|
25
|
+
CreateProductVariantApplicationsInnerFromJSONTyped,
|
|
26
|
+
CreateProductVariantApplicationsInnerToJSON,
|
|
27
|
+
} from './CreateProductVariantApplicationsInner';
|
|
28
|
+
import type { CreateProductVariantAttributesInner } from './CreateProductVariantAttributesInner';
|
|
29
|
+
import {
|
|
30
|
+
CreateProductVariantAttributesInnerFromJSON,
|
|
31
|
+
CreateProductVariantAttributesInnerFromJSONTyped,
|
|
32
|
+
CreateProductVariantAttributesInnerToJSON,
|
|
33
|
+
} from './CreateProductVariantAttributesInner';
|
|
34
|
+
import type { CreateProductVariantRetailPrice } from './CreateProductVariantRetailPrice';
|
|
35
|
+
import {
|
|
36
|
+
CreateProductVariantRetailPriceFromJSON,
|
|
37
|
+
CreateProductVariantRetailPriceFromJSONTyped,
|
|
38
|
+
CreateProductVariantRetailPriceToJSON,
|
|
39
|
+
} from './CreateProductVariantRetailPrice';
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @export
|
|
44
|
+
* @interface CreateProductVariant
|
|
45
|
+
*/
|
|
46
|
+
export interface CreateProductVariant {
|
|
47
|
+
/**
|
|
48
|
+
* Attributes associated to a variant such as Colour and Size.
|
|
49
|
+
* @type {Array<CreateProductVariantAttributesInner>}
|
|
50
|
+
* @memberof CreateProductVariant
|
|
51
|
+
*/
|
|
52
|
+
attributes: Array<CreateProductVariantAttributesInner>;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {CreateProductVariantRetailPrice}
|
|
56
|
+
* @memberof CreateProductVariant
|
|
57
|
+
*/
|
|
58
|
+
retailPrice: CreateProductVariantRetailPrice;
|
|
59
|
+
/**
|
|
60
|
+
* A custom stock keeping unit for the variant.
|
|
61
|
+
* @type {string}
|
|
62
|
+
* @memberof CreateProductVariant
|
|
63
|
+
*/
|
|
64
|
+
sku?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Design applications. If not provided, the product will be blank.
|
|
67
|
+
* @type {Array<CreateProductVariantApplicationsInner>}
|
|
68
|
+
* @memberof CreateProductVariant
|
|
69
|
+
*/
|
|
70
|
+
applications?: Array<CreateProductVariantApplicationsInner>;
|
|
71
|
+
/**
|
|
72
|
+
* Only use if you want to override the main product image. If not provided, mockups will be generated using the design applications and the warehouse product provided. Accepts PNG and JPEG files.
|
|
73
|
+
* @type {Array<CreateProductRequestImagesInner>}
|
|
74
|
+
* @memberof CreateProductVariant
|
|
75
|
+
*/
|
|
76
|
+
images?: Array<CreateProductRequestImagesInner>;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Check if a given object implements the CreateProductVariant interface.
|
|
81
|
+
*/
|
|
82
|
+
export function instanceOfCreateProductVariant(value: object): boolean {
|
|
83
|
+
if (!('attributes' in value)) return false;
|
|
84
|
+
if (!('retailPrice' in value)) return false;
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function CreateProductVariantFromJSON(json: any): CreateProductVariant {
|
|
89
|
+
return CreateProductVariantFromJSONTyped(json, false);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function CreateProductVariantFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateProductVariant {
|
|
93
|
+
if (json == null) {
|
|
94
|
+
return json;
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
|
|
98
|
+
'attributes': ((json['attributes'] as Array<any>).map(CreateProductVariantAttributesInnerFromJSON)),
|
|
99
|
+
'retailPrice': CreateProductVariantRetailPriceFromJSON(json['retailPrice']),
|
|
100
|
+
'sku': json['sku'] == null ? undefined : json['sku'],
|
|
101
|
+
'applications': json['applications'] == null ? undefined : ((json['applications'] as Array<any>).map(CreateProductVariantApplicationsInnerFromJSON)),
|
|
102
|
+
'images': json['images'] == null ? undefined : ((json['images'] as Array<any>).map(CreateProductRequestImagesInnerFromJSON)),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function CreateProductVariantToJSON(value?: CreateProductVariant | null): any {
|
|
107
|
+
if (value == null) {
|
|
108
|
+
return value;
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
|
|
112
|
+
'attributes': ((value['attributes'] as Array<any>).map(CreateProductVariantAttributesInnerToJSON)),
|
|
113
|
+
'retailPrice': CreateProductVariantRetailPriceToJSON(value['retailPrice']),
|
|
114
|
+
'sku': value['sku'],
|
|
115
|
+
'applications': value['applications'] == null ? undefined : ((value['applications'] as Array<any>).map(CreateProductVariantApplicationsInnerToJSON)),
|
|
116
|
+
'images': value['images'] == null ? undefined : ((value['images'] as Array<any>).map(CreateProductRequestImagesInnerToJSON)),
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
@@ -0,0 +1,103 @@
|
|
|
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.1
|
|
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 CreateProductVariantApplicationsInner
|
|
20
|
+
*/
|
|
21
|
+
export interface CreateProductVariantApplicationsInner {
|
|
22
|
+
/**
|
|
23
|
+
* Technology to use for the application.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof CreateProductVariantApplicationsInner
|
|
26
|
+
*/
|
|
27
|
+
technology: CreateProductVariantApplicationsInnerTechnologyEnum;
|
|
28
|
+
/**
|
|
29
|
+
* Placement of the application. Available placements depend on the chosen product and technology.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof CreateProductVariantApplicationsInner
|
|
32
|
+
*/
|
|
33
|
+
placement: CreateProductVariantApplicationsInnerPlacementEnum;
|
|
34
|
+
/**
|
|
35
|
+
* Publicly available design file URL. This will fill the design area of the warehouse product. It will be centered horizontally and aligned to the top of the design area. Accepts PNG and JPEG files.
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof CreateProductVariantApplicationsInner
|
|
38
|
+
*/
|
|
39
|
+
src: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @export
|
|
45
|
+
*/
|
|
46
|
+
export const CreateProductVariantApplicationsInnerTechnologyEnum = {
|
|
47
|
+
Dtg: 'dtg',
|
|
48
|
+
Embroidery: 'embroidery',
|
|
49
|
+
Dtf: 'dtf'
|
|
50
|
+
} as const;
|
|
51
|
+
export type CreateProductVariantApplicationsInnerTechnologyEnum = typeof CreateProductVariantApplicationsInnerTechnologyEnum[keyof typeof CreateProductVariantApplicationsInnerTechnologyEnum];
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @export
|
|
55
|
+
*/
|
|
56
|
+
export const CreateProductVariantApplicationsInnerPlacementEnum = {
|
|
57
|
+
Front: 'front',
|
|
58
|
+
Back: 'back',
|
|
59
|
+
Left: 'left',
|
|
60
|
+
Right: 'right',
|
|
61
|
+
Neck: 'neck'
|
|
62
|
+
} as const;
|
|
63
|
+
export type CreateProductVariantApplicationsInnerPlacementEnum = typeof CreateProductVariantApplicationsInnerPlacementEnum[keyof typeof CreateProductVariantApplicationsInnerPlacementEnum];
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Check if a given object implements the CreateProductVariantApplicationsInner interface.
|
|
68
|
+
*/
|
|
69
|
+
export function instanceOfCreateProductVariantApplicationsInner(value: object): boolean {
|
|
70
|
+
if (!('technology' in value)) return false;
|
|
71
|
+
if (!('placement' in value)) return false;
|
|
72
|
+
if (!('src' in value)) return false;
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function CreateProductVariantApplicationsInnerFromJSON(json: any): CreateProductVariantApplicationsInner {
|
|
77
|
+
return CreateProductVariantApplicationsInnerFromJSONTyped(json, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function CreateProductVariantApplicationsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateProductVariantApplicationsInner {
|
|
81
|
+
if (json == null) {
|
|
82
|
+
return json;
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'technology': json['technology'],
|
|
87
|
+
'placement': json['placement'],
|
|
88
|
+
'src': json['src'],
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function CreateProductVariantApplicationsInnerToJSON(value?: CreateProductVariantApplicationsInner | null): any {
|
|
93
|
+
if (value == null) {
|
|
94
|
+
return value;
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
|
|
98
|
+
'technology': value['technology'],
|
|
99
|
+
'placement': value['placement'],
|
|
100
|
+
'src': value['src'],
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|