@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.
Files changed (46) hide show
  1. package/.openapi-generator/FILES +1 -0
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +2 -2
  4. package/dist/apis/ProductsApi.d.ts +1 -1
  5. package/dist/apis/ProductsApi.js +1 -1
  6. package/dist/apis/VariantsApi.d.ts +1 -1
  7. package/dist/apis/VariantsApi.js +1 -1
  8. package/dist/models/ApiError.d.ts +1 -1
  9. package/dist/models/ApiError.js +10 -14
  10. package/dist/models/Attribute.d.ts +1 -1
  11. package/dist/models/Attribute.js +15 -18
  12. package/dist/models/AttributeThumbnail.d.ts +1 -1
  13. package/dist/models/AttributeThumbnail.js +9 -14
  14. package/dist/models/Image.d.ts +1 -1
  15. package/dist/models/Image.js +19 -24
  16. package/dist/models/Product.d.ts +19 -1
  17. package/dist/models/Product.js +20 -18
  18. package/dist/models/ProductsResponse.d.ts +1 -1
  19. package/dist/models/ProductsResponse.js +9 -14
  20. package/dist/models/Variant.d.ts +8 -1
  21. package/dist/models/Variant.js +22 -22
  22. package/dist/models/VariantProduct.d.ts +1 -1
  23. package/dist/models/VariantProduct.js +9 -14
  24. package/dist/models/VariantStock.d.ts +31 -0
  25. package/dist/models/VariantStock.js +45 -0
  26. package/dist/models/VariantsResponse.d.ts +1 -1
  27. package/dist/models/VariantsResponse.js +9 -14
  28. package/dist/models/index.d.ts +1 -0
  29. package/dist/models/index.js +1 -0
  30. package/dist/runtime.d.ts +1 -1
  31. package/dist/runtime.js +2 -2
  32. package/package.json +1 -1
  33. package/src/apis/ProductsApi.ts +1 -1
  34. package/src/apis/VariantsApi.ts +1 -1
  35. package/src/models/ApiError.ts +10 -15
  36. package/src/models/Attribute.ts +14 -19
  37. package/src/models/AttributeThumbnail.ts +10 -15
  38. package/src/models/Image.ts +20 -25
  39. package/src/models/Product.ts +38 -19
  40. package/src/models/ProductsResponse.ts +10 -15
  41. package/src/models/Variant.ts +32 -23
  42. package/src/models/VariantProduct.ts +10 -15
  43. package/src/models/VariantStock.ts +60 -0
  44. package/src/models/VariantsResponse.ts +10 -15
  45. package/src/models/index.ts +1 -0
  46. package/src/runtime.ts +2 -2
@@ -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.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 { exists, mapValues } from '../runtime';
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
- let isInstance = true;
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 ((json === undefined) || (json === null)) {
78
+ if (json == null) {
81
79
  return json;
82
80
  }
83
81
  return {
84
82
 
85
- 'id': !exists(json, 'id') ? undefined : json['id'],
86
- 'src': !exists(json, 'src') ? undefined : json['src'],
87
- 'alt': !exists(json, 'alt') ? undefined : json['alt'],
88
- 'variantIds': !exists(json, 'variantIds') ? undefined : json['variantIds'],
89
- 'sortOrder': !exists(json, 'sortOrder') ? undefined : json['sortOrder'],
90
- 'createdAt': !exists(json, 'createdAt') ? undefined : json['createdAt'],
91
- 'updatedAt': !exists(json, 'updatedAt') ? undefined : json['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 === undefined) {
97
- return undefined;
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.id,
105
- 'src': value.src,
106
- 'alt': value.alt,
107
- 'variantIds': value.variantIds,
108
- 'sortOrder': value.sortOrder,
109
- 'createdAt': value.createdAt,
110
- 'updatedAt': value.updatedAt,
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
 
@@ -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.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 { exists, mapValues } from '../runtime';
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
- let isInstance = true;
53
- isInstance = isInstance && "title" in value;
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 ((json === undefined) || (json === null)) {
79
+ if (json == null) {
64
80
  return json;
65
81
  }
66
82
  return {
67
83
 
68
- 'id': !exists(json, 'id') ? undefined : json['id'],
69
- 'ref': !exists(json, 'ref') ? undefined : json['ref'],
84
+ 'id': json['id'] == null ? undefined : json['id'],
85
+ 'ref': json['ref'] == null ? undefined : json['ref'],
70
86
  'title': json['title'],
71
- 'styleCode': !exists(json, 'styleCode') ? undefined : json['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 === undefined) {
77
- return undefined;
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.id,
85
- 'ref': value.ref,
86
- 'title': value.title,
87
- 'styleCode': value.styleCode,
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.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 { exists, mapValues } from '../runtime';
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
- let isInstance = true;
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 ((json === undefined) || (json === null)) {
55
+ if (json == null) {
58
56
  return json;
59
57
  }
60
58
  return {
61
59
 
62
- 'products': !exists(json, 'products') ? undefined : ((json['products'] as Array<any>).map(ProductFromJSON)),
63
- 'nextPageToken': !exists(json, 'nextPageToken') ? undefined : json['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 === undefined) {
69
- return undefined;
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.products === undefined ? undefined : ((value.products as Array<any>).map(ProductToJSON)),
77
- 'nextPageToken': value.nextPageToken,
71
+ 'products': value['products'] == null ? undefined : ((value['products'] as Array<any>).map(ProductToJSON)),
72
+ 'nextPageToken': value['nextPageToken'],
78
73
  };
79
74
  }
80
75
 
@@ -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.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 { exists, mapValues } from '../runtime';
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
- let isInstance = true;
84
- isInstance = isInstance && "sku" in value;
85
- isInstance = isInstance && "attributes" in value;
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 ((json === undefined) || (json === null)) {
105
+ if (json == null) {
96
106
  return json;
97
107
  }
98
108
  return {
99
109
 
100
- 'id': !exists(json, 'id') ? undefined : json['id'],
101
- 'ref': !exists(json, 'ref') ? undefined : json['ref'],
102
- 'product': !exists(json, 'product') ? undefined : VariantProductFromJSON(json['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
- 'images': !exists(json, 'images') ? undefined : ((json['images'] as Array<any>).map(ImageFromJSON)),
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 === undefined) {
111
- return undefined;
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.id,
119
- 'ref': value.ref,
120
- 'product': VariantProductToJSON(value.product),
121
- 'sku': value.sku,
122
- 'attributes': ((value.attributes as Array<any>).map(AttributeToJSON)),
123
- 'images': value.images === undefined ? undefined : ((value.images as Array<any>).map(ImageToJSON)),
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.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 { exists, mapValues } from '../runtime';
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
- let isInstance = true;
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 ((json === undefined) || (json === null)) {
48
+ if (json == null) {
51
49
  return json;
52
50
  }
53
51
  return {
54
52
 
55
- 'id': !exists(json, 'id') ? undefined : json['id'],
56
- 'ref': !exists(json, 'ref') ? undefined : json['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 === undefined) {
62
- return undefined;
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.id,
70
- 'ref': value.ref,
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.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 { exists, mapValues } from '../runtime';
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
- let isInstance = true;
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 ((json === undefined) || (json === null)) {
55
+ if (json == null) {
58
56
  return json;
59
57
  }
60
58
  return {
61
59
 
62
- 'variants': !exists(json, 'variants') ? undefined : ((json['variants'] as Array<any>).map(VariantFromJSON)),
63
- 'nextPageToken': !exists(json, 'nextPageToken') ? undefined : json['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 === undefined) {
69
- return undefined;
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.variants === undefined ? undefined : ((value.variants as Array<any>).map(VariantToJSON)),
77
- 'nextPageToken': value.nextPageToken,
71
+ 'variants': value['variants'] == null ? undefined : ((value['variants'] as Array<any>).map(VariantToJSON)),
72
+ 'nextPageToken': value['nextPageToken'],
78
73
  };
79
74
  }
80
75
 
@@ -8,4 +8,5 @@ export * from './Product';
8
8
  export * from './ProductsResponse';
9
9
  export * from './Variant';
10
10
  export * from './VariantProduct';
11
+ export * from './VariantStock';
11
12
  export * from './VariantsResponse';
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.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 = "http://api.localhost".replace(/\/+$/, "");
22
+ export const BASE_PATH = "https://api.teemill.com".replace(/\/+$/, "");
23
23
 
24
24
  export interface ConfigurationParameters {
25
25
  basePath?: string; // override base path