@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.
- package/.openapi-generator/FILES +7 -5
- package/.openapi-generator/VERSION +1 -1
- package/README.md +2 -2
- package/dist/apis/ProductsApi.d.ts +18 -2
- package/dist/apis/ProductsApi.js +72 -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 +13 -7
- package/dist/models/CreateProductRequest.js +30 -31
- 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/CreateProductRequestVariantsInner.d.ts +1 -1
- package/dist/models/CreateProductRequestVariantsInner.js +1 -1
- package/dist/models/CreateProductRequestVariantsInnerApplicationsInner.d.ts +1 -1
- package/dist/models/CreateProductRequestVariantsInnerApplicationsInner.js +1 -1
- package/dist/models/CreateProductRequestVariantsInnerAttributesInner.d.ts +1 -1
- package/dist/models/CreateProductRequestVariantsInnerAttributesInner.js +1 -1
- package/dist/models/CreateProductRequestVariantsInnerImagesInner.d.ts +1 -1
- package/dist/models/CreateProductRequestVariantsInnerImagesInner.js +1 -1
- package/dist/models/CreateProductRequestVariantsInnerRetailPrice.d.ts +1 -1
- package/dist/models/CreateProductRequestVariantsInnerRetailPrice.js +1 -1
- 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 +1 -1
- package/dist/models/Product.js +32 -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 +78 -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 +48 -45
- package/src/models/CreateProductRequestImagesInner.ts +60 -0
- package/src/models/CreateProductRequestSeoMetadata.ts +8 -13
- package/src/models/CreateProductRequestVariantsInner.ts +1 -1
- package/src/models/CreateProductRequestVariantsInnerApplicationsInner.ts +1 -1
- package/src/models/CreateProductRequestVariantsInnerAttributesInner.ts +1 -1
- package/src/models/CreateProductRequestVariantsInnerImagesInner.ts +1 -1
- package/src/models/CreateProductRequestVariantsInnerRetailPrice.ts +1 -1
- 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 +31 -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/apis/ProductsApi.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.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
|
}
|
package/src/apis/VariantsApi.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.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/src/models/ApiError.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.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 {
|
|
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
|
-
|
|
41
|
-
|
|
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 (
|
|
49
|
+
if (json == null) {
|
|
52
50
|
return json;
|
|
53
51
|
}
|
|
54
52
|
return {
|
|
55
53
|
|
|
56
|
-
'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
|
|
63
|
-
return
|
|
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
|
|
71
|
-
'message': value
|
|
65
|
+
'code': value['code'],
|
|
66
|
+
'message': value['message'],
|
|
72
67
|
};
|
|
73
68
|
}
|
|
74
69
|
|
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.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 {
|
|
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.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 {
|
|
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.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 {
|
|
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,27 +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
|
+
/**
|
|
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<
|
|
97
|
+
* @type {Array<CreateProductRequestImagesInner>}
|
|
92
98
|
* @memberof CreateProductRequest
|
|
93
99
|
*/
|
|
94
|
-
additionalFiles?: Array<
|
|
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
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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 (
|
|
117
|
+
if (json == null) {
|
|
114
118
|
return json;
|
|
115
119
|
}
|
|
116
120
|
return {
|
|
117
121
|
|
|
118
122
|
'gfnProductRef': json['gfnProductRef'],
|
|
119
|
-
'title':
|
|
120
|
-
'description':
|
|
121
|
-
'enabled':
|
|
122
|
-
'slug':
|
|
123
|
-
'seoMetadata':
|
|
124
|
-
'tags':
|
|
125
|
-
'variants': ((json['variants'] as Array<any>).map(
|
|
126
|
-
'
|
|
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
|
|
132
|
-
return
|
|
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
|
|
140
|
-
'title': value
|
|
141
|
-
'description': value
|
|
142
|
-
'enabled': value
|
|
143
|
-
'slug': value
|
|
144
|
-
'seoMetadata': CreateProductRequestSeoMetadataToJSON(value
|
|
145
|
-
'tags': value
|
|
146
|
-
'variants': ((value
|
|
147
|
-
'
|
|
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
|
+
* 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 {
|
|
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
|
|
|
@@ -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.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
|
+
* 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
|
+
* 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
|
+
* 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
|
+
* 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).
|