@teemill/gfn-catalog 1.3.0 → 2.0.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 (120) hide show
  1. package/.openapi-generator/FILES +7 -19
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +3 -3
  4. package/api.ts +1646 -0
  5. package/base.ts +86 -0
  6. package/common.ts +150 -0
  7. package/configuration.ts +110 -0
  8. package/dist/api.d.ts +1074 -0
  9. package/dist/api.js +1014 -0
  10. package/dist/base.d.ts +66 -0
  11. package/dist/base.js +65 -0
  12. package/dist/common.d.ts +65 -0
  13. package/dist/common.js +161 -0
  14. package/dist/configuration.d.ts +91 -0
  15. package/dist/configuration.js +43 -0
  16. package/dist/esm/api.d.ts +1074 -0
  17. package/dist/esm/api.js +995 -0
  18. package/dist/esm/base.d.ts +66 -0
  19. package/dist/esm/{models/AttributeThumbnail.js → base.js} +38 -26
  20. package/dist/esm/common.d.ts +65 -0
  21. package/dist/esm/common.js +149 -0
  22. package/dist/esm/configuration.d.ts +91 -0
  23. package/dist/esm/configuration.js +39 -0
  24. package/dist/esm/index.d.ts +13 -3
  25. package/dist/esm/index.js +13 -3
  26. package/dist/index.d.ts +13 -3
  27. package/dist/index.js +15 -5
  28. package/git_push.sh +57 -0
  29. package/{dist/models/Stock.d.ts → index.ts} +8 -21
  30. package/package.json +15 -3
  31. package/tsconfig.json +4 -6
  32. package/dist/apis/ProductsApi.d.ts +0 -35
  33. package/dist/apis/ProductsApi.js +0 -85
  34. package/dist/apis/VariantsApi.d.ts +0 -82
  35. package/dist/apis/VariantsApi.js +0 -229
  36. package/dist/apis/index.d.ts +0 -2
  37. package/dist/apis/index.js +0 -20
  38. package/dist/esm/apis/ProductsApi.d.ts +0 -35
  39. package/dist/esm/apis/ProductsApi.js +0 -81
  40. package/dist/esm/apis/VariantsApi.d.ts +0 -82
  41. package/dist/esm/apis/VariantsApi.js +0 -225
  42. package/dist/esm/apis/index.d.ts +0 -2
  43. package/dist/esm/apis/index.js +0 -4
  44. package/dist/esm/models/ApiError.d.ts +0 -37
  45. package/dist/esm/models/ApiError.js +0 -42
  46. package/dist/esm/models/Attribute.d.ts +0 -50
  47. package/dist/esm/models/Attribute.js +0 -49
  48. package/dist/esm/models/AttributeThumbnail.d.ts +0 -46
  49. package/dist/esm/models/Image.d.ts +0 -67
  50. package/dist/esm/models/Image.js +0 -50
  51. package/dist/esm/models/Product.d.ts +0 -67
  52. package/dist/esm/models/Product.js +0 -52
  53. package/dist/esm/models/ProductsResponse.d.ts +0 -38
  54. package/dist/esm/models/ProductsResponse.js +0 -41
  55. package/dist/esm/models/Stock.d.ts +0 -31
  56. package/dist/esm/models/Stock.js +0 -38
  57. package/dist/esm/models/StockResponse.d.ts +0 -38
  58. package/dist/esm/models/StockResponse.js +0 -41
  59. package/dist/esm/models/Variant.d.ts +0 -78
  60. package/dist/esm/models/Variant.js +0 -61
  61. package/dist/esm/models/VariantManufacturerOrigin.d.ts +0 -37
  62. package/dist/esm/models/VariantManufacturerOrigin.js +0 -40
  63. package/dist/esm/models/VariantProduct.d.ts +0 -37
  64. package/dist/esm/models/VariantProduct.js +0 -40
  65. package/dist/esm/models/VariantStock.d.ts +0 -50
  66. package/dist/esm/models/VariantStock.js +0 -45
  67. package/dist/esm/models/VariantsResponse.d.ts +0 -38
  68. package/dist/esm/models/VariantsResponse.js +0 -41
  69. package/dist/esm/models/index.d.ts +0 -13
  70. package/dist/esm/models/index.js +0 -15
  71. package/dist/esm/runtime.d.ts +0 -187
  72. package/dist/esm/runtime.js +0 -333
  73. package/dist/models/ApiError.d.ts +0 -37
  74. package/dist/models/ApiError.js +0 -49
  75. package/dist/models/Attribute.d.ts +0 -50
  76. package/dist/models/Attribute.js +0 -56
  77. package/dist/models/AttributeThumbnail.d.ts +0 -46
  78. package/dist/models/AttributeThumbnail.js +0 -55
  79. package/dist/models/Image.d.ts +0 -67
  80. package/dist/models/Image.js +0 -57
  81. package/dist/models/Product.d.ts +0 -67
  82. package/dist/models/Product.js +0 -59
  83. package/dist/models/ProductsResponse.d.ts +0 -38
  84. package/dist/models/ProductsResponse.js +0 -48
  85. package/dist/models/Stock.js +0 -45
  86. package/dist/models/StockResponse.d.ts +0 -38
  87. package/dist/models/StockResponse.js +0 -48
  88. package/dist/models/Variant.d.ts +0 -78
  89. package/dist/models/Variant.js +0 -68
  90. package/dist/models/VariantManufacturerOrigin.d.ts +0 -37
  91. package/dist/models/VariantManufacturerOrigin.js +0 -47
  92. package/dist/models/VariantProduct.d.ts +0 -37
  93. package/dist/models/VariantProduct.js +0 -47
  94. package/dist/models/VariantStock.d.ts +0 -50
  95. package/dist/models/VariantStock.js +0 -52
  96. package/dist/models/VariantsResponse.d.ts +0 -38
  97. package/dist/models/VariantsResponse.js +0 -48
  98. package/dist/models/index.d.ts +0 -13
  99. package/dist/models/index.js +0 -31
  100. package/dist/runtime.d.ts +0 -187
  101. package/dist/runtime.js +0 -349
  102. package/src/apis/ProductsApi.ts +0 -113
  103. package/src/apis/VariantsApi.ts +0 -342
  104. package/src/apis/index.ts +0 -4
  105. package/src/index.ts +0 -5
  106. package/src/models/ApiError.ts +0 -69
  107. package/src/models/Attribute.ts +0 -93
  108. package/src/models/AttributeThumbnail.ts +0 -80
  109. package/src/models/Image.ts +0 -108
  110. package/src/models/Product.ts +0 -109
  111. package/src/models/ProductsResponse.ts +0 -75
  112. package/src/models/Stock.ts +0 -60
  113. package/src/models/StockResponse.ts +0 -75
  114. package/src/models/Variant.ts +0 -149
  115. package/src/models/VariantManufacturerOrigin.ts +0 -68
  116. package/src/models/VariantProduct.ts +0 -68
  117. package/src/models/VariantStock.ts +0 -91
  118. package/src/models/VariantsResponse.ts +0 -75
  119. package/src/models/index.ts +0 -15
  120. package/src/runtime.ts +0 -441
@@ -1,108 +0,0 @@
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.3.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
- * Image description
18
- * @export
19
- * @interface Image
20
- */
21
- export interface Image {
22
- /**
23
- * Unique object identifier
24
- * @type {string}
25
- * @memberof Image
26
- */
27
- id?: string;
28
- /**
29
- *
30
- * @type {string}
31
- * @memberof Image
32
- */
33
- src?: string;
34
- /**
35
- *
36
- * @type {string}
37
- * @memberof Image
38
- */
39
- alt?: string;
40
- /**
41
- * List of variant Ids
42
- * @type {Array<string>}
43
- * @memberof Image
44
- */
45
- variantIds?: Array<string>;
46
- /**
47
- *
48
- * @type {number}
49
- * @memberof Image
50
- */
51
- sortOrder?: number;
52
- /**
53
- *
54
- * @type {string}
55
- * @memberof Image
56
- */
57
- createdAt?: string;
58
- /**
59
- *
60
- * @type {string}
61
- * @memberof Image
62
- */
63
- updatedAt?: string;
64
- }
65
-
66
- /**
67
- * Check if a given object implements the Image interface.
68
- */
69
- export function instanceOfImage(value: object): boolean {
70
- return true;
71
- }
72
-
73
- export function ImageFromJSON(json: any): Image {
74
- return ImageFromJSONTyped(json, false);
75
- }
76
-
77
- export function ImageFromJSONTyped(json: any, ignoreDiscriminator: boolean): Image {
78
- if (json == null) {
79
- return json;
80
- }
81
- return {
82
-
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'],
90
- };
91
- }
92
-
93
- export function ImageToJSON(value?: Image | null): any {
94
- if (value == null) {
95
- return value;
96
- }
97
- return {
98
-
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'],
106
- };
107
- }
108
-
@@ -1,109 +0,0 @@
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.3.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 Product
20
- */
21
- export interface Product {
22
- /**
23
- * Unique object identifier
24
- * @type {string}
25
- * @memberof Product
26
- */
27
- id?: string;
28
- /**
29
- * A reference to the resource location
30
- * @type {string}
31
- * @memberof Product
32
- */
33
- ref?: string;
34
- /**
35
- *
36
- * @type {string}
37
- * @memberof Product
38
- */
39
- title: string;
40
- /**
41
- *
42
- * @type {string}
43
- * @memberof Product
44
- */
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;
64
- }
65
-
66
- /**
67
- * Check if a given object implements the Product interface.
68
- */
69
- export function instanceOfProduct(value: object): boolean {
70
- if (!('title' in value)) return false;
71
- return true;
72
- }
73
-
74
- export function ProductFromJSON(json: any): Product {
75
- return ProductFromJSONTyped(json, false);
76
- }
77
-
78
- export function ProductFromJSONTyped(json: any, ignoreDiscriminator: boolean): Product {
79
- if (json == null) {
80
- return json;
81
- }
82
- return {
83
-
84
- 'id': json['id'] == null ? undefined : json['id'],
85
- 'ref': json['ref'] == null ? undefined : json['ref'],
86
- 'title': json['title'],
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'],
91
- };
92
- }
93
-
94
- export function ProductToJSON(value?: Product | null): any {
95
- if (value == null) {
96
- return value;
97
- }
98
- return {
99
-
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'],
107
- };
108
- }
109
-
@@ -1,75 +0,0 @@
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.3.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 { Product } from './Product';
17
- import {
18
- ProductFromJSON,
19
- ProductFromJSONTyped,
20
- ProductToJSON,
21
- } from './Product';
22
-
23
- /**
24
- *
25
- * @export
26
- * @interface ProductsResponse
27
- */
28
- export interface ProductsResponse {
29
- /**
30
- *
31
- * @type {Array<Product>}
32
- * @memberof ProductsResponse
33
- */
34
- products?: Array<Product>;
35
- /**
36
- *
37
- * @type {number}
38
- * @memberof ProductsResponse
39
- */
40
- nextPageToken?: number;
41
- }
42
-
43
- /**
44
- * Check if a given object implements the ProductsResponse interface.
45
- */
46
- export function instanceOfProductsResponse(value: object): boolean {
47
- return true;
48
- }
49
-
50
- export function ProductsResponseFromJSON(json: any): ProductsResponse {
51
- return ProductsResponseFromJSONTyped(json, false);
52
- }
53
-
54
- export function ProductsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductsResponse {
55
- if (json == null) {
56
- return json;
57
- }
58
- return {
59
-
60
- 'products': json['products'] == null ? undefined : ((json['products'] as Array<any>).map(ProductFromJSON)),
61
- 'nextPageToken': json['nextPageToken'] == null ? undefined : json['nextPageToken'],
62
- };
63
- }
64
-
65
- export function ProductsResponseToJSON(value?: ProductsResponse | null): any {
66
- if (value == null) {
67
- return value;
68
- }
69
- return {
70
-
71
- 'products': value['products'] == null ? undefined : ((value['products'] as Array<any>).map(ProductToJSON)),
72
- 'nextPageToken': value['nextPageToken'],
73
- };
74
- }
75
-
@@ -1,60 +0,0 @@
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.3.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
-
@@ -1,75 +0,0 @@
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.3.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
-
@@ -1,149 +0,0 @@
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.3.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 { Attribute } from './Attribute';
17
- import {
18
- AttributeFromJSON,
19
- AttributeFromJSONTyped,
20
- AttributeToJSON,
21
- } from './Attribute';
22
- import type { Image } from './Image';
23
- import {
24
- ImageFromJSON,
25
- ImageFromJSONTyped,
26
- ImageToJSON,
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';
40
- import type { VariantProduct } from './VariantProduct';
41
- import {
42
- VariantProductFromJSON,
43
- VariantProductFromJSONTyped,
44
- VariantProductToJSON,
45
- } from './VariantProduct';
46
-
47
- /**
48
- *
49
- * @export
50
- * @interface Variant
51
- */
52
- export interface Variant {
53
- /**
54
- * Unique object identifier
55
- * @type {string}
56
- * @memberof Variant
57
- */
58
- id?: string;
59
- /**
60
- * A reference to the resource location
61
- * @type {string}
62
- * @memberof Variant
63
- */
64
- ref?: string;
65
- /**
66
- *
67
- * @type {VariantProduct}
68
- * @memberof Variant
69
- */
70
- product?: VariantProduct;
71
- /**
72
- *
73
- * @type {string}
74
- * @memberof Variant
75
- */
76
- sku: string;
77
- /**
78
- * Attributes associated to a variant such as Colour and Size. An attribute can have thumbnail type of `text`, `color`, or `image`. Attribute tags are intended for grouping and filtering, e.g. by a group of colours.
79
- * @type {Array<Attribute>}
80
- * @memberof Variant
81
- */
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;
95
- /**
96
- * Images
97
- * @type {Array<Image>}
98
- * @memberof Variant
99
- */
100
- images?: Array<Image>;
101
- }
102
-
103
- /**
104
- * Check if a given object implements the Variant interface.
105
- */
106
- export function instanceOfVariant(value: object): boolean {
107
- if (!('sku' in value)) return false;
108
- if (!('attributes' in value)) return false;
109
- return true;
110
- }
111
-
112
- export function VariantFromJSON(json: any): Variant {
113
- return VariantFromJSONTyped(json, false);
114
- }
115
-
116
- export function VariantFromJSONTyped(json: any, ignoreDiscriminator: boolean): Variant {
117
- if (json == null) {
118
- return json;
119
- }
120
- return {
121
-
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']),
125
- 'sku': json['sku'],
126
- 'attributes': ((json['attributes'] as Array<any>).map(AttributeFromJSON)),
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)),
130
- };
131
- }
132
-
133
- export function VariantToJSON(value?: Variant | null): any {
134
- if (value == null) {
135
- return value;
136
- }
137
- return {
138
-
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)),
147
- };
148
- }
149
-
@@ -1,68 +0,0 @@
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.3.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
-