@teemill/gfn-catalog 1.0.1 → 1.2.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 (55) hide show
  1. package/.openapi-generator/FILES +4 -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 +17 -2
  7. package/dist/apis/VariantsApi.js +70 -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/Stock.d.ts +31 -0
  21. package/dist/models/Stock.js +45 -0
  22. package/dist/models/StockResponse.d.ts +38 -0
  23. package/dist/models/StockResponse.js +48 -0
  24. package/dist/models/Variant.d.ts +15 -1
  25. package/dist/models/Variant.js +25 -22
  26. package/dist/models/VariantManufacturerOrigin.d.ts +37 -0
  27. package/dist/models/VariantManufacturerOrigin.js +47 -0
  28. package/dist/models/VariantProduct.d.ts +1 -1
  29. package/dist/models/VariantProduct.js +9 -14
  30. package/dist/models/VariantStock.d.ts +50 -0
  31. package/dist/models/VariantStock.js +52 -0
  32. package/dist/models/VariantsResponse.d.ts +1 -1
  33. package/dist/models/VariantsResponse.js +9 -14
  34. package/dist/models/index.d.ts +4 -0
  35. package/dist/models/index.js +4 -0
  36. package/dist/runtime.d.ts +1 -1
  37. package/dist/runtime.js +2 -2
  38. package/package.json +1 -1
  39. package/src/apis/ProductsApi.ts +1 -1
  40. package/src/apis/VariantsApi.ts +74 -1
  41. package/src/models/ApiError.ts +10 -15
  42. package/src/models/Attribute.ts +14 -19
  43. package/src/models/AttributeThumbnail.ts +10 -15
  44. package/src/models/Image.ts +20 -25
  45. package/src/models/Product.ts +38 -19
  46. package/src/models/ProductsResponse.ts +10 -15
  47. package/src/models/Stock.ts +60 -0
  48. package/src/models/StockResponse.ts +75 -0
  49. package/src/models/Variant.ts +46 -23
  50. package/src/models/VariantManufacturerOrigin.ts +68 -0
  51. package/src/models/VariantProduct.ts +10 -15
  52. package/src/models/VariantStock.ts +91 -0
  53. package/src/models/VariantsResponse.ts +10 -15
  54. package/src/models/index.ts +4 -0
  55. 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.1
7
+ * The version of the OpenAPI document: 1.2.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
 
@@ -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.2.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 Stock
20
+ */
21
+ export interface Stock {
22
+ /**
23
+ * Current stock level
24
+ * @type {number}
25
+ * @memberof Stock
26
+ */
27
+ level?: number;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the Stock interface.
32
+ */
33
+ export function instanceOfStock(value: object): boolean {
34
+ return true;
35
+ }
36
+
37
+ export function StockFromJSON(json: any): Stock {
38
+ return StockFromJSONTyped(json, false);
39
+ }
40
+
41
+ export function StockFromJSONTyped(json: any, ignoreDiscriminator: boolean): Stock {
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 StockToJSON(value?: Stock | null): any {
52
+ if (value == null) {
53
+ return value;
54
+ }
55
+ return {
56
+
57
+ 'level': value['level'],
58
+ };
59
+ }
60
+
@@ -0,0 +1,75 @@
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.2.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
+ import type { VariantStock } from './VariantStock';
17
+ import {
18
+ VariantStockFromJSON,
19
+ VariantStockFromJSONTyped,
20
+ VariantStockToJSON,
21
+ } from './VariantStock';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface StockResponse
27
+ */
28
+ export interface StockResponse {
29
+ /**
30
+ *
31
+ * @type {Array<VariantStock>}
32
+ * @memberof StockResponse
33
+ */
34
+ variants?: Array<VariantStock>;
35
+ /**
36
+ *
37
+ * @type {number}
38
+ * @memberof StockResponse
39
+ */
40
+ nextPageToken?: number;
41
+ }
42
+
43
+ /**
44
+ * Check if a given object implements the StockResponse interface.
45
+ */
46
+ export function instanceOfStockResponse(value: object): boolean {
47
+ return true;
48
+ }
49
+
50
+ export function StockResponseFromJSON(json: any): StockResponse {
51
+ return StockResponseFromJSONTyped(json, false);
52
+ }
53
+
54
+ export function StockResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): StockResponse {
55
+ if (json == null) {
56
+ return json;
57
+ }
58
+ return {
59
+
60
+ 'variants': json['variants'] == null ? undefined : ((json['variants'] as Array<any>).map(VariantStockFromJSON)),
61
+ 'nextPageToken': json['nextPageToken'] == null ? undefined : json['nextPageToken'],
62
+ };
63
+ }
64
+
65
+ export function StockResponseToJSON(value?: StockResponse | null): any {
66
+ if (value == null) {
67
+ return value;
68
+ }
69
+ return {
70
+
71
+ 'variants': value['variants'] == null ? undefined : ((value['variants'] as Array<any>).map(VariantStockToJSON)),
72
+ 'nextPageToken': value['nextPageToken'],
73
+ };
74
+ }
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.1
7
+ * The version of the OpenAPI document: 1.2.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,
@@ -25,6 +25,18 @@ import {
25
25
  ImageFromJSONTyped,
26
26
  ImageToJSON,
27
27
  } from './Image';
28
+ import type { Stock } from './Stock';
29
+ import {
30
+ StockFromJSON,
31
+ StockFromJSONTyped,
32
+ StockToJSON,
33
+ } from './Stock';
34
+ import type { VariantManufacturerOrigin } from './VariantManufacturerOrigin';
35
+ import {
36
+ VariantManufacturerOriginFromJSON,
37
+ VariantManufacturerOriginFromJSONTyped,
38
+ VariantManufacturerOriginToJSON,
39
+ } from './VariantManufacturerOrigin';
28
40
  import type { VariantProduct } from './VariantProduct';
29
41
  import {
30
42
  VariantProductFromJSON,
@@ -68,6 +80,18 @@ export interface Variant {
68
80
  * @memberof Variant
69
81
  */
70
82
  attributes: Array<Attribute>;
83
+ /**
84
+ *
85
+ * @type {VariantManufacturerOrigin}
86
+ * @memberof Variant
87
+ */
88
+ manufacturerOrigin?: VariantManufacturerOrigin;
89
+ /**
90
+ *
91
+ * @type {Stock}
92
+ * @memberof Variant
93
+ */
94
+ stock?: Stock;
71
95
  /**
72
96
  * Images
73
97
  * @type {Array<Image>}
@@ -80,11 +104,9 @@ export interface Variant {
80
104
  * Check if a given object implements the Variant interface.
81
105
  */
82
106
  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;
107
+ if (!('sku' in value)) return false;
108
+ if (!('attributes' in value)) return false;
109
+ return true;
88
110
  }
89
111
 
90
112
  export function VariantFromJSON(json: any): Variant {
@@ -92,35 +114,36 @@ export function VariantFromJSON(json: any): Variant {
92
114
  }
93
115
 
94
116
  export function VariantFromJSONTyped(json: any, ignoreDiscriminator: boolean): Variant {
95
- if ((json === undefined) || (json === null)) {
117
+ if (json == null) {
96
118
  return json;
97
119
  }
98
120
  return {
99
121
 
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']),
122
+ 'id': json['id'] == null ? undefined : json['id'],
123
+ 'ref': json['ref'] == null ? undefined : json['ref'],
124
+ 'product': json['product'] == null ? undefined : VariantProductFromJSON(json['product']),
103
125
  'sku': json['sku'],
104
126
  'attributes': ((json['attributes'] as Array<any>).map(AttributeFromJSON)),
105
- 'images': !exists(json, 'images') ? undefined : ((json['images'] as Array<any>).map(ImageFromJSON)),
127
+ 'manufacturerOrigin': json['manufacturerOrigin'] == null ? undefined : VariantManufacturerOriginFromJSON(json['manufacturerOrigin']),
128
+ 'stock': json['stock'] == null ? undefined : StockFromJSON(json['stock']),
129
+ 'images': json['images'] == null ? undefined : ((json['images'] as Array<any>).map(ImageFromJSON)),
106
130
  };
107
131
  }
108
132
 
109
133
  export function VariantToJSON(value?: Variant | null): any {
110
- if (value === undefined) {
111
- return undefined;
112
- }
113
- if (value === null) {
114
- return null;
134
+ if (value == null) {
135
+ return value;
115
136
  }
116
137
  return {
117
138
 
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)),
139
+ 'id': value['id'],
140
+ 'ref': value['ref'],
141
+ 'product': VariantProductToJSON(value['product']),
142
+ 'sku': value['sku'],
143
+ 'attributes': ((value['attributes'] as Array<any>).map(AttributeToJSON)),
144
+ 'manufacturerOrigin': VariantManufacturerOriginToJSON(value['manufacturerOrigin']),
145
+ 'stock': StockToJSON(value['stock']),
146
+ 'images': value['images'] == null ? undefined : ((value['images'] as Array<any>).map(ImageToJSON)),
124
147
  };
125
148
  }
126
149
 
@@ -0,0 +1,68 @@
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.2.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
+ * Where the product was originally produced or manufactured
18
+ * @export
19
+ * @interface VariantManufacturerOrigin
20
+ */
21
+ export interface VariantManufacturerOrigin {
22
+ /**
23
+ * Country of origin (ISO 3166-1 alpha-2).
24
+ * @type {string}
25
+ * @memberof VariantManufacturerOrigin
26
+ */
27
+ country?: string;
28
+ /**
29
+ * Name of the country of origin
30
+ * @type {string}
31
+ * @memberof VariantManufacturerOrigin
32
+ */
33
+ name?: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the VariantManufacturerOrigin interface.
38
+ */
39
+ export function instanceOfVariantManufacturerOrigin(value: object): boolean {
40
+ return true;
41
+ }
42
+
43
+ export function VariantManufacturerOriginFromJSON(json: any): VariantManufacturerOrigin {
44
+ return VariantManufacturerOriginFromJSONTyped(json, false);
45
+ }
46
+
47
+ export function VariantManufacturerOriginFromJSONTyped(json: any, ignoreDiscriminator: boolean): VariantManufacturerOrigin {
48
+ if (json == null) {
49
+ return json;
50
+ }
51
+ return {
52
+
53
+ 'country': json['country'] == null ? undefined : json['country'],
54
+ 'name': json['name'] == null ? undefined : json['name'],
55
+ };
56
+ }
57
+
58
+ export function VariantManufacturerOriginToJSON(value?: VariantManufacturerOrigin | null): any {
59
+ if (value == null) {
60
+ return value;
61
+ }
62
+ return {
63
+
64
+ 'country': value['country'],
65
+ 'name': value['name'],
66
+ };
67
+ }
68
+
@@ -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.1
7
+ * The version of the OpenAPI document: 1.2.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,91 @@
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.2.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
+ import type { Stock } from './Stock';
17
+ import {
18
+ StockFromJSON,
19
+ StockFromJSONTyped,
20
+ StockToJSON,
21
+ } from './Stock';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface VariantStock
27
+ */
28
+ export interface VariantStock {
29
+ /**
30
+ * Unique object identifier
31
+ * @type {string}
32
+ * @memberof VariantStock
33
+ */
34
+ id?: string;
35
+ /**
36
+ * A reference to the resource location
37
+ * @type {string}
38
+ * @memberof VariantStock
39
+ */
40
+ ref?: string;
41
+ /**
42
+ * A reference to the resource location
43
+ * @type {string}
44
+ * @memberof VariantStock
45
+ */
46
+ productRef?: string;
47
+ /**
48
+ *
49
+ * @type {Stock}
50
+ * @memberof VariantStock
51
+ */
52
+ stock?: Stock;
53
+ }
54
+
55
+ /**
56
+ * Check if a given object implements the VariantStock interface.
57
+ */
58
+ export function instanceOfVariantStock(value: object): boolean {
59
+ return true;
60
+ }
61
+
62
+ export function VariantStockFromJSON(json: any): VariantStock {
63
+ return VariantStockFromJSONTyped(json, false);
64
+ }
65
+
66
+ export function VariantStockFromJSONTyped(json: any, ignoreDiscriminator: boolean): VariantStock {
67
+ if (json == null) {
68
+ return json;
69
+ }
70
+ return {
71
+
72
+ 'id': json['id'] == null ? undefined : json['id'],
73
+ 'ref': json['ref'] == null ? undefined : json['ref'],
74
+ 'productRef': json['productRef'] == null ? undefined : json['productRef'],
75
+ 'stock': json['stock'] == null ? undefined : StockFromJSON(json['stock']),
76
+ };
77
+ }
78
+
79
+ export function VariantStockToJSON(value?: VariantStock | null): any {
80
+ if (value == null) {
81
+ return value;
82
+ }
83
+ return {
84
+
85
+ 'id': value['id'],
86
+ 'ref': value['ref'],
87
+ 'productRef': value['productRef'],
88
+ 'stock': StockToJSON(value['stock']),
89
+ };
90
+ }
91
+
@@ -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.1
7
+ * The version of the OpenAPI document: 1.2.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
 
@@ -6,6 +6,10 @@ export * from './AttributeThumbnail';
6
6
  export * from './Image';
7
7
  export * from './Product';
8
8
  export * from './ProductsResponse';
9
+ export * from './Stock';
10
+ export * from './StockResponse';
9
11
  export * from './Variant';
12
+ export * from './VariantManufacturerOrigin';
10
13
  export * from './VariantProduct';
14
+ export * from './VariantStock';
11
15
  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.1
7
+ * The version of the OpenAPI document: 1.2.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