@teemill/gfn-catalog 1.0.1 → 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/src/models/Image.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.0
|
|
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
|
* Image description
|
|
18
18
|
* @export
|
|
@@ -67,9 +67,7 @@ export interface Image {
|
|
|
67
67
|
* Check if a given object implements the Image interface.
|
|
68
68
|
*/
|
|
69
69
|
export function instanceOfImage(value: object): boolean {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
return isInstance;
|
|
70
|
+
return true;
|
|
73
71
|
}
|
|
74
72
|
|
|
75
73
|
export function ImageFromJSON(json: any): Image {
|
|
@@ -77,37 +75,34 @@ export function ImageFromJSON(json: any): Image {
|
|
|
77
75
|
}
|
|
78
76
|
|
|
79
77
|
export function ImageFromJSONTyped(json: any, ignoreDiscriminator: boolean): Image {
|
|
80
|
-
if (
|
|
78
|
+
if (json == null) {
|
|
81
79
|
return json;
|
|
82
80
|
}
|
|
83
81
|
return {
|
|
84
82
|
|
|
85
|
-
'id':
|
|
86
|
-
'src':
|
|
87
|
-
'alt':
|
|
88
|
-
'variantIds':
|
|
89
|
-
'sortOrder':
|
|
90
|
-
'createdAt':
|
|
91
|
-
'updatedAt':
|
|
83
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
84
|
+
'src': json['src'] == null ? undefined : json['src'],
|
|
85
|
+
'alt': json['alt'] == null ? undefined : json['alt'],
|
|
86
|
+
'variantIds': json['variantIds'] == null ? undefined : json['variantIds'],
|
|
87
|
+
'sortOrder': json['sortOrder'] == null ? undefined : json['sortOrder'],
|
|
88
|
+
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
|
|
89
|
+
'updatedAt': json['updatedAt'] == null ? undefined : json['updatedAt'],
|
|
92
90
|
};
|
|
93
91
|
}
|
|
94
92
|
|
|
95
93
|
export function ImageToJSON(value?: Image | null): any {
|
|
96
|
-
if (value
|
|
97
|
-
return
|
|
98
|
-
}
|
|
99
|
-
if (value === null) {
|
|
100
|
-
return null;
|
|
94
|
+
if (value == null) {
|
|
95
|
+
return value;
|
|
101
96
|
}
|
|
102
97
|
return {
|
|
103
98
|
|
|
104
|
-
'id': value
|
|
105
|
-
'src': value
|
|
106
|
-
'alt': value
|
|
107
|
-
'variantIds': value
|
|
108
|
-
'sortOrder': value
|
|
109
|
-
'createdAt': value
|
|
110
|
-
'updatedAt': value
|
|
99
|
+
'id': value['id'],
|
|
100
|
+
'src': value['src'],
|
|
101
|
+
'alt': value['alt'],
|
|
102
|
+
'variantIds': value['variantIds'],
|
|
103
|
+
'sortOrder': value['sortOrder'],
|
|
104
|
+
'createdAt': value['createdAt'],
|
|
105
|
+
'updatedAt': value['updatedAt'],
|
|
111
106
|
};
|
|
112
107
|
}
|
|
113
108
|
|
package/src/models/Product.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.0
|
|
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
|
|
@@ -43,16 +43,32 @@ export interface Product {
|
|
|
43
43
|
* @memberof Product
|
|
44
44
|
*/
|
|
45
45
|
styleCode?: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof Product
|
|
50
|
+
*/
|
|
51
|
+
material?: string;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof Product
|
|
56
|
+
*/
|
|
57
|
+
description?: string;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof Product
|
|
62
|
+
*/
|
|
63
|
+
specifications?: string;
|
|
46
64
|
}
|
|
47
65
|
|
|
48
66
|
/**
|
|
49
67
|
* Check if a given object implements the Product interface.
|
|
50
68
|
*/
|
|
51
69
|
export function instanceOfProduct(value: object): boolean {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
return isInstance;
|
|
70
|
+
if (!('title' in value)) return false;
|
|
71
|
+
return true;
|
|
56
72
|
}
|
|
57
73
|
|
|
58
74
|
export function ProductFromJSON(json: any): Product {
|
|
@@ -60,31 +76,34 @@ export function ProductFromJSON(json: any): Product {
|
|
|
60
76
|
}
|
|
61
77
|
|
|
62
78
|
export function ProductFromJSONTyped(json: any, ignoreDiscriminator: boolean): Product {
|
|
63
|
-
if (
|
|
79
|
+
if (json == null) {
|
|
64
80
|
return json;
|
|
65
81
|
}
|
|
66
82
|
return {
|
|
67
83
|
|
|
68
|
-
'id':
|
|
69
|
-
'ref':
|
|
84
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
85
|
+
'ref': json['ref'] == null ? undefined : json['ref'],
|
|
70
86
|
'title': json['title'],
|
|
71
|
-
'styleCode':
|
|
87
|
+
'styleCode': json['styleCode'] == null ? undefined : json['styleCode'],
|
|
88
|
+
'material': json['material'] == null ? undefined : json['material'],
|
|
89
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
90
|
+
'specifications': json['specifications'] == null ? undefined : json['specifications'],
|
|
72
91
|
};
|
|
73
92
|
}
|
|
74
93
|
|
|
75
94
|
export function ProductToJSON(value?: Product | null): any {
|
|
76
|
-
if (value
|
|
77
|
-
return
|
|
78
|
-
}
|
|
79
|
-
if (value === null) {
|
|
80
|
-
return null;
|
|
95
|
+
if (value == null) {
|
|
96
|
+
return value;
|
|
81
97
|
}
|
|
82
98
|
return {
|
|
83
99
|
|
|
84
|
-
'id': value
|
|
85
|
-
'ref': value
|
|
86
|
-
'title': value
|
|
87
|
-
'styleCode': value
|
|
100
|
+
'id': value['id'],
|
|
101
|
+
'ref': value['ref'],
|
|
102
|
+
'title': value['title'],
|
|
103
|
+
'styleCode': value['styleCode'],
|
|
104
|
+
'material': value['material'],
|
|
105
|
+
'description': value['description'],
|
|
106
|
+
'specifications': value['specifications'],
|
|
88
107
|
};
|
|
89
108
|
}
|
|
90
109
|
|
|
@@ -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.0
|
|
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 { Product } from './Product';
|
|
17
17
|
import {
|
|
18
18
|
ProductFromJSON,
|
|
@@ -44,9 +44,7 @@ export interface ProductsResponse {
|
|
|
44
44
|
* Check if a given object implements the ProductsResponse interface.
|
|
45
45
|
*/
|
|
46
46
|
export function instanceOfProductsResponse(value: object): boolean {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return isInstance;
|
|
47
|
+
return true;
|
|
50
48
|
}
|
|
51
49
|
|
|
52
50
|
export function ProductsResponseFromJSON(json: any): ProductsResponse {
|
|
@@ -54,27 +52,24 @@ export function ProductsResponseFromJSON(json: any): ProductsResponse {
|
|
|
54
52
|
}
|
|
55
53
|
|
|
56
54
|
export function ProductsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductsResponse {
|
|
57
|
-
if (
|
|
55
|
+
if (json == null) {
|
|
58
56
|
return json;
|
|
59
57
|
}
|
|
60
58
|
return {
|
|
61
59
|
|
|
62
|
-
'products':
|
|
63
|
-
'nextPageToken':
|
|
60
|
+
'products': json['products'] == null ? undefined : ((json['products'] as Array<any>).map(ProductFromJSON)),
|
|
61
|
+
'nextPageToken': json['nextPageToken'] == null ? undefined : json['nextPageToken'],
|
|
64
62
|
};
|
|
65
63
|
}
|
|
66
64
|
|
|
67
65
|
export function ProductsResponseToJSON(value?: ProductsResponse | null): any {
|
|
68
|
-
if (value
|
|
69
|
-
return
|
|
70
|
-
}
|
|
71
|
-
if (value === null) {
|
|
72
|
-
return null;
|
|
66
|
+
if (value == null) {
|
|
67
|
+
return value;
|
|
73
68
|
}
|
|
74
69
|
return {
|
|
75
70
|
|
|
76
|
-
'products': value
|
|
77
|
-
'nextPageToken': value
|
|
71
|
+
'products': value['products'] == null ? undefined : ((value['products'] as Array<any>).map(ProductToJSON)),
|
|
72
|
+
'nextPageToken': value['nextPageToken'],
|
|
78
73
|
};
|
|
79
74
|
}
|
|
80
75
|
|
package/src/models/Variant.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.0
|
|
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 { Attribute } from './Attribute';
|
|
17
17
|
import {
|
|
18
18
|
AttributeFromJSON,
|
|
@@ -31,6 +31,12 @@ import {
|
|
|
31
31
|
VariantProductFromJSONTyped,
|
|
32
32
|
VariantProductToJSON,
|
|
33
33
|
} from './VariantProduct';
|
|
34
|
+
import type { VariantStock } from './VariantStock';
|
|
35
|
+
import {
|
|
36
|
+
VariantStockFromJSON,
|
|
37
|
+
VariantStockFromJSONTyped,
|
|
38
|
+
VariantStockToJSON,
|
|
39
|
+
} from './VariantStock';
|
|
34
40
|
|
|
35
41
|
/**
|
|
36
42
|
*
|
|
@@ -68,6 +74,12 @@ export interface Variant {
|
|
|
68
74
|
* @memberof Variant
|
|
69
75
|
*/
|
|
70
76
|
attributes: Array<Attribute>;
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
* @type {VariantStock}
|
|
80
|
+
* @memberof Variant
|
|
81
|
+
*/
|
|
82
|
+
stock?: VariantStock;
|
|
71
83
|
/**
|
|
72
84
|
* Images
|
|
73
85
|
* @type {Array<Image>}
|
|
@@ -80,11 +92,9 @@ export interface Variant {
|
|
|
80
92
|
* Check if a given object implements the Variant interface.
|
|
81
93
|
*/
|
|
82
94
|
export function instanceOfVariant(value: object): boolean {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
return isInstance;
|
|
95
|
+
if (!('sku' in value)) return false;
|
|
96
|
+
if (!('attributes' in value)) return false;
|
|
97
|
+
return true;
|
|
88
98
|
}
|
|
89
99
|
|
|
90
100
|
export function VariantFromJSON(json: any): Variant {
|
|
@@ -92,35 +102,34 @@ export function VariantFromJSON(json: any): Variant {
|
|
|
92
102
|
}
|
|
93
103
|
|
|
94
104
|
export function VariantFromJSONTyped(json: any, ignoreDiscriminator: boolean): Variant {
|
|
95
|
-
if (
|
|
105
|
+
if (json == null) {
|
|
96
106
|
return json;
|
|
97
107
|
}
|
|
98
108
|
return {
|
|
99
109
|
|
|
100
|
-
'id':
|
|
101
|
-
'ref':
|
|
102
|
-
'product':
|
|
110
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
111
|
+
'ref': json['ref'] == null ? undefined : json['ref'],
|
|
112
|
+
'product': json['product'] == null ? undefined : VariantProductFromJSON(json['product']),
|
|
103
113
|
'sku': json['sku'],
|
|
104
114
|
'attributes': ((json['attributes'] as Array<any>).map(AttributeFromJSON)),
|
|
105
|
-
'
|
|
115
|
+
'stock': json['stock'] == null ? undefined : VariantStockFromJSON(json['stock']),
|
|
116
|
+
'images': json['images'] == null ? undefined : ((json['images'] as Array<any>).map(ImageFromJSON)),
|
|
106
117
|
};
|
|
107
118
|
}
|
|
108
119
|
|
|
109
120
|
export function VariantToJSON(value?: Variant | null): any {
|
|
110
|
-
if (value
|
|
111
|
-
return
|
|
112
|
-
}
|
|
113
|
-
if (value === null) {
|
|
114
|
-
return null;
|
|
121
|
+
if (value == null) {
|
|
122
|
+
return value;
|
|
115
123
|
}
|
|
116
124
|
return {
|
|
117
125
|
|
|
118
|
-
'id': value
|
|
119
|
-
'ref': value
|
|
120
|
-
'product': VariantProductToJSON(value
|
|
121
|
-
'sku': value
|
|
122
|
-
'attributes': ((value
|
|
123
|
-
'
|
|
126
|
+
'id': value['id'],
|
|
127
|
+
'ref': value['ref'],
|
|
128
|
+
'product': VariantProductToJSON(value['product']),
|
|
129
|
+
'sku': value['sku'],
|
|
130
|
+
'attributes': ((value['attributes'] as Array<any>).map(AttributeToJSON)),
|
|
131
|
+
'stock': VariantStockToJSON(value['stock']),
|
|
132
|
+
'images': value['images'] == null ? undefined : ((value['images'] as Array<any>).map(ImageToJSON)),
|
|
124
133
|
};
|
|
125
134
|
}
|
|
126
135
|
|
|
@@ -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.0
|
|
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,9 +37,7 @@ export interface VariantProduct {
|
|
|
37
37
|
* Check if a given object implements the VariantProduct interface.
|
|
38
38
|
*/
|
|
39
39
|
export function instanceOfVariantProduct(value: object): boolean {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return isInstance;
|
|
40
|
+
return true;
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
export function VariantProductFromJSON(json: any): VariantProduct {
|
|
@@ -47,27 +45,24 @@ export function VariantProductFromJSON(json: any): VariantProduct {
|
|
|
47
45
|
}
|
|
48
46
|
|
|
49
47
|
export function VariantProductFromJSONTyped(json: any, ignoreDiscriminator: boolean): VariantProduct {
|
|
50
|
-
if (
|
|
48
|
+
if (json == null) {
|
|
51
49
|
return json;
|
|
52
50
|
}
|
|
53
51
|
return {
|
|
54
52
|
|
|
55
|
-
'id':
|
|
56
|
-
'ref':
|
|
53
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
54
|
+
'ref': json['ref'] == null ? undefined : json['ref'],
|
|
57
55
|
};
|
|
58
56
|
}
|
|
59
57
|
|
|
60
58
|
export function VariantProductToJSON(value?: VariantProduct | null): any {
|
|
61
|
-
if (value
|
|
62
|
-
return
|
|
63
|
-
}
|
|
64
|
-
if (value === null) {
|
|
65
|
-
return null;
|
|
59
|
+
if (value == null) {
|
|
60
|
+
return value;
|
|
66
61
|
}
|
|
67
62
|
return {
|
|
68
63
|
|
|
69
|
-
'id': value
|
|
70
|
-
'ref': value
|
|
64
|
+
'id': value['id'],
|
|
65
|
+
'ref': value['ref'],
|
|
71
66
|
};
|
|
72
67
|
}
|
|
73
68
|
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GFN Catalog API
|
|
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
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.1.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 VariantStock
|
|
20
|
+
*/
|
|
21
|
+
export interface VariantStock {
|
|
22
|
+
/**
|
|
23
|
+
* Current stock level
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof VariantStock
|
|
26
|
+
*/
|
|
27
|
+
level?: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the VariantStock interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfVariantStock(value: object): boolean {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function VariantStockFromJSON(json: any): VariantStock {
|
|
38
|
+
return VariantStockFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function VariantStockFromJSONTyped(json: any, ignoreDiscriminator: boolean): VariantStock {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
|
|
47
|
+
'level': json['level'] == null ? undefined : json['level'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function VariantStockToJSON(value?: VariantStock | null): any {
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
|
|
57
|
+
'level': value['level'],
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
@@ -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.0
|
|
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 { Variant } from './Variant';
|
|
17
17
|
import {
|
|
18
18
|
VariantFromJSON,
|
|
@@ -44,9 +44,7 @@ export interface VariantsResponse {
|
|
|
44
44
|
* Check if a given object implements the VariantsResponse interface.
|
|
45
45
|
*/
|
|
46
46
|
export function instanceOfVariantsResponse(value: object): boolean {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return isInstance;
|
|
47
|
+
return true;
|
|
50
48
|
}
|
|
51
49
|
|
|
52
50
|
export function VariantsResponseFromJSON(json: any): VariantsResponse {
|
|
@@ -54,27 +52,24 @@ export function VariantsResponseFromJSON(json: any): VariantsResponse {
|
|
|
54
52
|
}
|
|
55
53
|
|
|
56
54
|
export function VariantsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): VariantsResponse {
|
|
57
|
-
if (
|
|
55
|
+
if (json == null) {
|
|
58
56
|
return json;
|
|
59
57
|
}
|
|
60
58
|
return {
|
|
61
59
|
|
|
62
|
-
'variants':
|
|
63
|
-
'nextPageToken':
|
|
60
|
+
'variants': json['variants'] == null ? undefined : ((json['variants'] as Array<any>).map(VariantFromJSON)),
|
|
61
|
+
'nextPageToken': json['nextPageToken'] == null ? undefined : json['nextPageToken'],
|
|
64
62
|
};
|
|
65
63
|
}
|
|
66
64
|
|
|
67
65
|
export function VariantsResponseToJSON(value?: VariantsResponse | null): any {
|
|
68
|
-
if (value
|
|
69
|
-
return
|
|
70
|
-
}
|
|
71
|
-
if (value === null) {
|
|
72
|
-
return null;
|
|
66
|
+
if (value == null) {
|
|
67
|
+
return value;
|
|
73
68
|
}
|
|
74
69
|
return {
|
|
75
70
|
|
|
76
|
-
'variants': value
|
|
77
|
-
'nextPageToken': value
|
|
71
|
+
'variants': value['variants'] == null ? undefined : ((value['variants'] as Array<any>).map(VariantToJSON)),
|
|
72
|
+
'nextPageToken': value['nextPageToken'],
|
|
78
73
|
};
|
|
79
74
|
}
|
|
80
75
|
|
package/src/models/index.ts
CHANGED
package/src/runtime.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.0
|
|
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).
|
|
@@ -19,7 +19,7 @@ export type OptionalProperties<T> = {
|
|
|
19
19
|
|
|
20
20
|
export type OptionalOnly<T> = Partial<Pick<T, OptionalProperties<T>>>;
|
|
21
21
|
|
|
22
|
-
export const BASE_PATH = "
|
|
22
|
+
export const BASE_PATH = "https://api.teemill.com".replace(/\/+$/, "");
|
|
23
23
|
|
|
24
24
|
export interface ConfigurationParameters {
|
|
25
25
|
basePath?: string; // override base path
|