@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/.openapi-generator/FILES
CHANGED
|
@@ -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/
|
|
15
|
-
src/models/
|
|
16
|
-
src/models/
|
|
17
|
-
src/models/
|
|
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.
|
|
1
|
+
7.4.0
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @teemill/product-catalog@1.
|
|
1
|
+
## @teemill/product-catalog@1.9.1
|
|
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.
|
|
39
|
+
npm install @teemill/product-catalog@1.9.1 --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.
|
|
5
|
+
* The version of the OpenAPI document: 1.9.1
|
|
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;
|
|
@@ -31,6 +31,11 @@ export interface ImportProductsRequest {
|
|
|
31
31
|
project: string;
|
|
32
32
|
body?: string;
|
|
33
33
|
}
|
|
34
|
+
export interface UpdateProductOperationRequest {
|
|
35
|
+
project: string;
|
|
36
|
+
productId: string;
|
|
37
|
+
updateProductRequest?: UpdateProductRequest;
|
|
38
|
+
}
|
|
34
39
|
/**
|
|
35
40
|
*
|
|
36
41
|
*/
|
|
@@ -75,4 +80,14 @@ export declare class ProductsApi extends runtime.BaseAPI {
|
|
|
75
80
|
* Import products
|
|
76
81
|
*/
|
|
77
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>;
|
|
78
93
|
}
|
package/dist/apis/ProductsApi.js
CHANGED
|
@@ -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.
|
|
8
|
+
* The version of the OpenAPI document: 1.9.1
|
|
9
9
|
* Contact: hello@teemill.com
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -360,6 +360,74 @@ var ProductsApi = /** @class */ (function (_super) {
|
|
|
360
360
|
});
|
|
361
361
|
});
|
|
362
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
|
+
};
|
|
363
431
|
return ProductsApi;
|
|
364
432
|
}(runtime.BaseAPI));
|
|
365
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.
|
|
5
|
+
* The version of the OpenAPI document: 1.9.1
|
|
6
6
|
* Contact: hello@teemill.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/apis/VariantsApi.js
CHANGED
|
@@ -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.
|
|
8
|
+
* The version of the OpenAPI document: 1.9.1
|
|
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.
|
|
5
|
+
* The version of the OpenAPI document: 1.9.1
|
|
6
6
|
* Contact: hello@teemill.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/models/ApiError.js
CHANGED
|
@@ -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.
|
|
8
|
+
* The version of the OpenAPI document: 1.9.1
|
|
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
|
-
|
|
23
|
-
|
|
24
|
-
return
|
|
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 (
|
|
31
|
+
if (json == null) {
|
|
33
32
|
return json;
|
|
34
33
|
}
|
|
35
34
|
return {
|
|
36
|
-
'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
|
|
43
|
-
return
|
|
44
|
-
}
|
|
45
|
-
if (value === null) {
|
|
46
|
-
return null;
|
|
41
|
+
if (value == null) {
|
|
42
|
+
return value;
|
|
47
43
|
}
|
|
48
44
|
return {
|
|
49
|
-
'code': value
|
|
50
|
-
'message': value
|
|
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.
|
|
5
|
+
* The version of the OpenAPI document: 1.9.1
|
|
6
6
|
* Contact: hello@teemill.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/models/Attribute.js
CHANGED
|
@@ -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.
|
|
8
|
+
* The version of the OpenAPI document: 1.9.1
|
|
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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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 (
|
|
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':
|
|
41
|
-
'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
|
|
47
|
-
return
|
|
48
|
-
}
|
|
49
|
-
if (value === null) {
|
|
50
|
-
return null;
|
|
46
|
+
if (value == null) {
|
|
47
|
+
return value;
|
|
51
48
|
}
|
|
52
49
|
return {
|
|
53
|
-
'name': value
|
|
54
|
-
'value': value
|
|
55
|
-
'thumbnail': (0, AttributeThumbnail_1.AttributeThumbnailToJSON)(value
|
|
56
|
-
'tags': value
|
|
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.
|
|
5
|
+
* The version of the OpenAPI document: 1.9.1
|
|
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.
|
|
8
|
+
* The version of the OpenAPI document: 1.9.1
|
|
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
|
-
|
|
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 (
|
|
37
|
+
if (json == null) {
|
|
40
38
|
return json;
|
|
41
39
|
}
|
|
42
40
|
return {
|
|
43
|
-
'type':
|
|
44
|
-
'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
|
|
50
|
-
return
|
|
51
|
-
}
|
|
52
|
-
if (value === null) {
|
|
53
|
-
return null;
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
54
49
|
}
|
|
55
50
|
return {
|
|
56
|
-
'type': value
|
|
57
|
-
'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.
|
|
5
|
+
* The version of the OpenAPI document: 1.9.1
|
|
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 {
|
|
14
|
-
import type { CreateProductRequestVariantsInnerImagesInner } from './CreateProductRequestVariantsInnerImagesInner';
|
|
14
|
+
import type { CreateProductVariant } from './CreateProductVariant';
|
|
15
15
|
/**
|
|
16
16
|
*
|
|
17
17
|
* @export
|
|
@@ -62,22 +62,22 @@ export interface CreateProductRequest {
|
|
|
62
62
|
tags?: Array<string>;
|
|
63
63
|
/**
|
|
64
64
|
* Variants
|
|
65
|
-
* @type {Array<
|
|
65
|
+
* @type {Array<CreateProductVariant>}
|
|
66
66
|
* @memberof CreateProductRequest
|
|
67
67
|
*/
|
|
68
|
-
variants: Array<
|
|
68
|
+
variants: Array<CreateProductVariant>;
|
|
69
69
|
/**
|
|
70
70
|
* Images to attach to the product. For example, photos of models using/wearing the product.
|
|
71
|
-
* @type {Array<
|
|
71
|
+
* @type {Array<CreateProductRequestImagesInner>}
|
|
72
72
|
* @memberof CreateProductRequest
|
|
73
73
|
*/
|
|
74
|
-
images?: Array<
|
|
74
|
+
images?: Array<CreateProductRequestImagesInner>;
|
|
75
75
|
/**
|
|
76
76
|
* Additional files to attach to the product. For example, original design files e.g. PSD, AI, etc.
|
|
77
|
-
* @type {Array<
|
|
77
|
+
* @type {Array<CreateProductRequestImagesInner>}
|
|
78
78
|
* @memberof CreateProductRequest
|
|
79
79
|
*/
|
|
80
|
-
additionalFiles?: Array<
|
|
80
|
+
additionalFiles?: Array<CreateProductRequestImagesInner>;
|
|
81
81
|
}
|
|
82
82
|
/**
|
|
83
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.
|
|
8
|
+
* The version of the OpenAPI document: 1.9.1
|
|
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
|
|
17
|
+
var CreateProductRequestImagesInner_1 = require("./CreateProductRequestImagesInner");
|
|
18
18
|
var CreateProductRequestSeoMetadata_1 = require("./CreateProductRequestSeoMetadata");
|
|
19
|
-
var
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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,41 +33,38 @@ function CreateProductRequestFromJSON(json) {
|
|
|
33
33
|
}
|
|
34
34
|
exports.CreateProductRequestFromJSON = CreateProductRequestFromJSON;
|
|
35
35
|
function CreateProductRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
-
if (
|
|
36
|
+
if (json == null) {
|
|
37
37
|
return json;
|
|
38
38
|
}
|
|
39
39
|
return {
|
|
40
40
|
'gfnProductRef': json['gfnProductRef'],
|
|
41
|
-
'title':
|
|
42
|
-
'description':
|
|
43
|
-
'enabled':
|
|
44
|
-
'slug':
|
|
45
|
-
'seoMetadata':
|
|
46
|
-
'tags':
|
|
47
|
-
'variants': (json['variants'].map(
|
|
48
|
-
'images':
|
|
49
|
-
'additionalFiles':
|
|
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)),
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
exports.CreateProductRequestFromJSONTyped = CreateProductRequestFromJSONTyped;
|
|
53
53
|
function CreateProductRequestToJSON(value) {
|
|
54
|
-
if (value
|
|
55
|
-
return
|
|
56
|
-
}
|
|
57
|
-
if (value === null) {
|
|
58
|
-
return null;
|
|
54
|
+
if (value == null) {
|
|
55
|
+
return value;
|
|
59
56
|
}
|
|
60
57
|
return {
|
|
61
|
-
'gfnProductRef': value
|
|
62
|
-
'title': value
|
|
63
|
-
'description': value
|
|
64
|
-
'enabled': value
|
|
65
|
-
'slug': value
|
|
66
|
-
'seoMetadata': (0, CreateProductRequestSeoMetadata_1.CreateProductRequestSeoMetadataToJSON)(value
|
|
67
|
-
'tags': value
|
|
68
|
-
'variants': (value
|
|
69
|
-
'images': value
|
|
70
|
-
'additionalFiles': value
|
|
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)),
|
|
71
68
|
};
|
|
72
69
|
}
|
|
73
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.1
|
|
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;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Product Catalog API
|
|
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
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.9.1
|
|
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.CreateProductRequestImagesInnerToJSON = exports.CreateProductRequestImagesInnerFromJSONTyped = exports.CreateProductRequestImagesInnerFromJSON = exports.instanceOfCreateProductRequestImagesInner = void 0;
|
|
17
|
+
/**
|
|
18
|
+
* Check if a given object implements the CreateProductRequestImagesInner interface.
|
|
19
|
+
*/
|
|
20
|
+
function instanceOfCreateProductRequestImagesInner(value) {
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
exports.instanceOfCreateProductRequestImagesInner = instanceOfCreateProductRequestImagesInner;
|
|
24
|
+
function CreateProductRequestImagesInnerFromJSON(json) {
|
|
25
|
+
return CreateProductRequestImagesInnerFromJSONTyped(json, false);
|
|
26
|
+
}
|
|
27
|
+
exports.CreateProductRequestImagesInnerFromJSON = CreateProductRequestImagesInnerFromJSON;
|
|
28
|
+
function CreateProductRequestImagesInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
|
+
if (json == null) {
|
|
30
|
+
return json;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
'src': json['src'] == null ? undefined : json['src'],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
exports.CreateProductRequestImagesInnerFromJSONTyped = CreateProductRequestImagesInnerFromJSONTyped;
|
|
37
|
+
function CreateProductRequestImagesInnerToJSON(value) {
|
|
38
|
+
if (value == null) {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'src': value['src'],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
exports.CreateProductRequestImagesInnerToJSON = CreateProductRequestImagesInnerToJSON;
|