@teemill/gfn-catalog 1.0.0 → 1.1.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 +1 -0
- package/.openapi-generator/VERSION +1 -1
- package/README.md +2 -2
- package/dist/apis/ProductsApi.d.ts +1 -1
- package/dist/apis/ProductsApi.js +1 -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/Image.d.ts +1 -1
- package/dist/models/Image.js +19 -24
- package/dist/models/Product.d.ts +19 -1
- package/dist/models/Product.js +20 -18
- package/dist/models/ProductsResponse.d.ts +1 -1
- package/dist/models/ProductsResponse.js +9 -14
- package/dist/models/Variant.d.ts +8 -1
- package/dist/models/Variant.js +22 -22
- package/dist/models/VariantProduct.d.ts +1 -1
- package/dist/models/VariantProduct.js +9 -14
- package/dist/models/VariantStock.d.ts +31 -0
- package/dist/models/VariantStock.js +45 -0
- package/dist/models/VariantsResponse.d.ts +1 -1
- package/dist/models/VariantsResponse.js +9 -14
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +2 -2
- package/package.json +1 -1
- package/src/apis/ProductsApi.ts +1 -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/Image.ts +20 -25
- package/src/models/Product.ts +38 -19
- package/src/models/ProductsResponse.ts +10 -15
- package/src/models/Variant.ts +32 -23
- package/src/models/VariantProduct.ts +10 -15
- package/src/models/VariantStock.ts +60 -0
- package/src/models/VariantsResponse.ts +10 -15
- package/src/models/index.ts +1 -0
- package/src/runtime.ts +2 -2
package/dist/models/Variant.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* GFN Catalog API
|
|
6
6
|
* Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 1.
|
|
8
|
+
* The version of the OpenAPI document: 1.1.0
|
|
9
9
|
* Contact: hello@teemill.com
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -14,18 +14,19 @@
|
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.VariantToJSON = exports.VariantFromJSONTyped = exports.VariantFromJSON = exports.instanceOfVariant = void 0;
|
|
17
|
-
var runtime_1 = require("../runtime");
|
|
18
17
|
var Attribute_1 = require("./Attribute");
|
|
19
18
|
var Image_1 = require("./Image");
|
|
20
19
|
var VariantProduct_1 = require("./VariantProduct");
|
|
20
|
+
var VariantStock_1 = require("./VariantStock");
|
|
21
21
|
/**
|
|
22
22
|
* Check if a given object implements the Variant interface.
|
|
23
23
|
*/
|
|
24
24
|
function instanceOfVariant(value) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
if (!('sku' in value))
|
|
26
|
+
return false;
|
|
27
|
+
if (!('attributes' in value))
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
29
30
|
}
|
|
30
31
|
exports.instanceOfVariant = instanceOfVariant;
|
|
31
32
|
function VariantFromJSON(json) {
|
|
@@ -33,33 +34,32 @@ function VariantFromJSON(json) {
|
|
|
33
34
|
}
|
|
34
35
|
exports.VariantFromJSON = VariantFromJSON;
|
|
35
36
|
function VariantFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
-
if (
|
|
37
|
+
if (json == null) {
|
|
37
38
|
return json;
|
|
38
39
|
}
|
|
39
40
|
return {
|
|
40
|
-
'id':
|
|
41
|
-
'ref':
|
|
42
|
-
'product':
|
|
41
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
42
|
+
'ref': json['ref'] == null ? undefined : json['ref'],
|
|
43
|
+
'product': json['product'] == null ? undefined : (0, VariantProduct_1.VariantProductFromJSON)(json['product']),
|
|
43
44
|
'sku': json['sku'],
|
|
44
45
|
'attributes': (json['attributes'].map(Attribute_1.AttributeFromJSON)),
|
|
45
|
-
'
|
|
46
|
+
'stock': json['stock'] == null ? undefined : (0, VariantStock_1.VariantStockFromJSON)(json['stock']),
|
|
47
|
+
'images': json['images'] == null ? undefined : (json['images'].map(Image_1.ImageFromJSON)),
|
|
46
48
|
};
|
|
47
49
|
}
|
|
48
50
|
exports.VariantFromJSONTyped = VariantFromJSONTyped;
|
|
49
51
|
function VariantToJSON(value) {
|
|
50
|
-
if (value
|
|
51
|
-
return
|
|
52
|
-
}
|
|
53
|
-
if (value === null) {
|
|
54
|
-
return null;
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
55
54
|
}
|
|
56
55
|
return {
|
|
57
|
-
'id': value
|
|
58
|
-
'ref': value
|
|
59
|
-
'product': (0, VariantProduct_1.VariantProductToJSON)(value
|
|
60
|
-
'sku': value
|
|
61
|
-
'attributes': (value
|
|
62
|
-
'
|
|
56
|
+
'id': value['id'],
|
|
57
|
+
'ref': value['ref'],
|
|
58
|
+
'product': (0, VariantProduct_1.VariantProductToJSON)(value['product']),
|
|
59
|
+
'sku': value['sku'],
|
|
60
|
+
'attributes': (value['attributes'].map(Attribute_1.AttributeToJSON)),
|
|
61
|
+
'stock': (0, VariantStock_1.VariantStockToJSON)(value['stock']),
|
|
62
|
+
'images': value['images'] == null ? undefined : (value['images'].map(Image_1.ImageToJSON)),
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
65
|
exports.VariantToJSON = VariantToJSON;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* GFN Catalog API
|
|
3
3
|
* Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.1.0
|
|
6
6
|
* Contact: hello@teemill.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* GFN Catalog API
|
|
6
6
|
* Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 1.
|
|
8
|
+
* The version of the OpenAPI document: 1.1.0
|
|
9
9
|
* Contact: hello@teemill.com
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -14,13 +14,11 @@
|
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.VariantProductToJSON = exports.VariantProductFromJSONTyped = exports.VariantProductFromJSON = exports.instanceOfVariantProduct = void 0;
|
|
17
|
-
var runtime_1 = require("../runtime");
|
|
18
17
|
/**
|
|
19
18
|
* Check if a given object implements the VariantProduct interface.
|
|
20
19
|
*/
|
|
21
20
|
function instanceOfVariantProduct(value) {
|
|
22
|
-
|
|
23
|
-
return isInstance;
|
|
21
|
+
return true;
|
|
24
22
|
}
|
|
25
23
|
exports.instanceOfVariantProduct = instanceOfVariantProduct;
|
|
26
24
|
function VariantProductFromJSON(json) {
|
|
@@ -28,25 +26,22 @@ function VariantProductFromJSON(json) {
|
|
|
28
26
|
}
|
|
29
27
|
exports.VariantProductFromJSON = VariantProductFromJSON;
|
|
30
28
|
function VariantProductFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
-
if (
|
|
29
|
+
if (json == null) {
|
|
32
30
|
return json;
|
|
33
31
|
}
|
|
34
32
|
return {
|
|
35
|
-
'id':
|
|
36
|
-
'ref':
|
|
33
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
34
|
+
'ref': json['ref'] == null ? undefined : json['ref'],
|
|
37
35
|
};
|
|
38
36
|
}
|
|
39
37
|
exports.VariantProductFromJSONTyped = VariantProductFromJSONTyped;
|
|
40
38
|
function VariantProductToJSON(value) {
|
|
41
|
-
if (value
|
|
42
|
-
return
|
|
43
|
-
}
|
|
44
|
-
if (value === null) {
|
|
45
|
-
return null;
|
|
39
|
+
if (value == null) {
|
|
40
|
+
return value;
|
|
46
41
|
}
|
|
47
42
|
return {
|
|
48
|
-
'id': value
|
|
49
|
-
'ref': value
|
|
43
|
+
'id': value['id'],
|
|
44
|
+
'ref': value['ref'],
|
|
50
45
|
};
|
|
51
46
|
}
|
|
52
47
|
exports.VariantProductToJSON = VariantProductToJSON;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GFN Catalog API
|
|
3
|
+
* Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.1.0
|
|
6
|
+
* Contact: hello@teemill.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface VariantStock
|
|
16
|
+
*/
|
|
17
|
+
export interface VariantStock {
|
|
18
|
+
/**
|
|
19
|
+
* Current stock level
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof VariantStock
|
|
22
|
+
*/
|
|
23
|
+
level?: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the VariantStock interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfVariantStock(value: object): boolean;
|
|
29
|
+
export declare function VariantStockFromJSON(json: any): VariantStock;
|
|
30
|
+
export declare function VariantStockFromJSONTyped(json: any, ignoreDiscriminator: boolean): VariantStock;
|
|
31
|
+
export declare function VariantStockToJSON(value?: VariantStock | null): any;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* GFN Catalog API
|
|
6
|
+
* Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.1.0
|
|
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.VariantStockToJSON = exports.VariantStockFromJSONTyped = exports.VariantStockFromJSON = exports.instanceOfVariantStock = void 0;
|
|
17
|
+
/**
|
|
18
|
+
* Check if a given object implements the VariantStock interface.
|
|
19
|
+
*/
|
|
20
|
+
function instanceOfVariantStock(value) {
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
exports.instanceOfVariantStock = instanceOfVariantStock;
|
|
24
|
+
function VariantStockFromJSON(json) {
|
|
25
|
+
return VariantStockFromJSONTyped(json, false);
|
|
26
|
+
}
|
|
27
|
+
exports.VariantStockFromJSON = VariantStockFromJSON;
|
|
28
|
+
function VariantStockFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
|
+
if (json == null) {
|
|
30
|
+
return json;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
'level': json['level'] == null ? undefined : json['level'],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
exports.VariantStockFromJSONTyped = VariantStockFromJSONTyped;
|
|
37
|
+
function VariantStockToJSON(value) {
|
|
38
|
+
if (value == null) {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'level': value['level'],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
exports.VariantStockToJSON = VariantStockToJSON;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* GFN Catalog API
|
|
3
3
|
* Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.1.0
|
|
6
6
|
* Contact: hello@teemill.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* GFN Catalog API
|
|
6
6
|
* Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 1.
|
|
8
|
+
* The version of the OpenAPI document: 1.1.0
|
|
9
9
|
* Contact: hello@teemill.com
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -14,14 +14,12 @@
|
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.VariantsResponseToJSON = exports.VariantsResponseFromJSONTyped = exports.VariantsResponseFromJSON = exports.instanceOfVariantsResponse = void 0;
|
|
17
|
-
var runtime_1 = require("../runtime");
|
|
18
17
|
var Variant_1 = require("./Variant");
|
|
19
18
|
/**
|
|
20
19
|
* Check if a given object implements the VariantsResponse interface.
|
|
21
20
|
*/
|
|
22
21
|
function instanceOfVariantsResponse(value) {
|
|
23
|
-
|
|
24
|
-
return isInstance;
|
|
22
|
+
return true;
|
|
25
23
|
}
|
|
26
24
|
exports.instanceOfVariantsResponse = instanceOfVariantsResponse;
|
|
27
25
|
function VariantsResponseFromJSON(json) {
|
|
@@ -29,25 +27,22 @@ function VariantsResponseFromJSON(json) {
|
|
|
29
27
|
}
|
|
30
28
|
exports.VariantsResponseFromJSON = VariantsResponseFromJSON;
|
|
31
29
|
function VariantsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
-
if (
|
|
30
|
+
if (json == null) {
|
|
33
31
|
return json;
|
|
34
32
|
}
|
|
35
33
|
return {
|
|
36
|
-
'variants':
|
|
37
|
-
'nextPageToken':
|
|
34
|
+
'variants': json['variants'] == null ? undefined : (json['variants'].map(Variant_1.VariantFromJSON)),
|
|
35
|
+
'nextPageToken': json['nextPageToken'] == null ? undefined : json['nextPageToken'],
|
|
38
36
|
};
|
|
39
37
|
}
|
|
40
38
|
exports.VariantsResponseFromJSONTyped = VariantsResponseFromJSONTyped;
|
|
41
39
|
function VariantsResponseToJSON(value) {
|
|
42
|
-
if (value
|
|
43
|
-
return
|
|
44
|
-
}
|
|
45
|
-
if (value === null) {
|
|
46
|
-
return null;
|
|
40
|
+
if (value == null) {
|
|
41
|
+
return value;
|
|
47
42
|
}
|
|
48
43
|
return {
|
|
49
|
-
'variants': value
|
|
50
|
-
'nextPageToken': value
|
|
44
|
+
'variants': value['variants'] == null ? undefined : (value['variants'].map(Variant_1.VariantToJSON)),
|
|
45
|
+
'nextPageToken': value['nextPageToken'],
|
|
51
46
|
};
|
|
52
47
|
}
|
|
53
48
|
exports.VariantsResponseToJSON = VariantsResponseToJSON;
|
package/dist/models/index.d.ts
CHANGED
package/dist/models/index.js
CHANGED
|
@@ -24,4 +24,5 @@ __exportStar(require("./Product"), exports);
|
|
|
24
24
|
__exportStar(require("./ProductsResponse"), exports);
|
|
25
25
|
__exportStar(require("./Variant"), exports);
|
|
26
26
|
__exportStar(require("./VariantProduct"), exports);
|
|
27
|
+
__exportStar(require("./VariantStock"), exports);
|
|
27
28
|
__exportStar(require("./VariantsResponse"), exports);
|
package/dist/runtime.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* GFN Catalog API
|
|
3
3
|
* Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.1.0
|
|
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/runtime.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* GFN Catalog API
|
|
6
6
|
* Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 1.
|
|
8
|
+
* The version of the OpenAPI document: 1.1.0
|
|
9
9
|
* Contact: hello@teemill.com
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -76,7 +76,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
76
76
|
};
|
|
77
77
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
78
78
|
exports.TextApiResponse = exports.BlobApiResponse = exports.VoidApiResponse = exports.JSONApiResponse = exports.canConsumeForm = exports.mapValues = exports.querystring = exports.exists = exports.COLLECTION_FORMATS = exports.RequiredError = exports.FetchError = exports.ResponseError = exports.BaseAPI = exports.DefaultConfig = exports.Configuration = exports.BASE_PATH = void 0;
|
|
79
|
-
exports.BASE_PATH = "
|
|
79
|
+
exports.BASE_PATH = "https://api.teemill.com".replace(/\/+$/, "");
|
|
80
80
|
var Configuration = /** @class */ (function () {
|
|
81
81
|
function Configuration(configuration) {
|
|
82
82
|
if (configuration === void 0) { configuration = {}; }
|
package/package.json
CHANGED
package/src/apis/ProductsApi.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* GFN Catalog API
|
|
5
5
|
* Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.1.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/apis/VariantsApi.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* GFN Catalog API
|
|
5
5
|
* Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.1.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
|
* GFN Catalog API
|
|
5
5
|
* Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.1.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
|
* GFN Catalog API
|
|
5
5
|
* Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.1.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
|
* GFN Catalog API
|
|
5
5
|
* Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.1.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
|
|
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
|
|