@teemill/gfn-catalog 1.4.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 (164) hide show
  1. package/.openapi-generator/FILES +7 -28
  2. package/README.md +3 -3
  3. package/api.ts +1646 -0
  4. package/base.ts +86 -0
  5. package/common.ts +150 -0
  6. package/configuration.ts +110 -0
  7. package/dist/api.d.ts +1074 -0
  8. package/dist/api.js +1014 -0
  9. package/dist/base.d.ts +66 -0
  10. package/dist/base.js +65 -0
  11. package/dist/common.d.ts +65 -0
  12. package/dist/common.js +161 -0
  13. package/dist/configuration.d.ts +91 -0
  14. package/dist/configuration.js +43 -0
  15. package/dist/esm/api.d.ts +1074 -0
  16. package/dist/esm/api.js +995 -0
  17. package/dist/esm/base.d.ts +66 -0
  18. package/dist/esm/{models/AttributeThumbnail.js → base.js} +38 -26
  19. package/dist/esm/common.d.ts +65 -0
  20. package/dist/esm/common.js +149 -0
  21. package/dist/esm/configuration.d.ts +91 -0
  22. package/dist/esm/configuration.js +39 -0
  23. package/dist/esm/index.d.ts +13 -3
  24. package/dist/esm/index.js +13 -3
  25. package/dist/index.d.ts +13 -3
  26. package/dist/index.js +15 -5
  27. package/git_push.sh +57 -0
  28. package/{dist/models/Stock.d.ts → index.ts} +8 -21
  29. package/package.json +14 -2
  30. package/tsconfig.json +4 -6
  31. package/dist/apis/ProductsApi.d.ts +0 -35
  32. package/dist/apis/ProductsApi.js +0 -85
  33. package/dist/apis/StatementsApi.d.ts +0 -48
  34. package/dist/apis/StatementsApi.js +0 -127
  35. package/dist/apis/TransactionsApi.d.ts +0 -48
  36. package/dist/apis/TransactionsApi.js +0 -129
  37. package/dist/apis/VariantsApi.d.ts +0 -82
  38. package/dist/apis/VariantsApi.js +0 -229
  39. package/dist/apis/index.d.ts +0 -4
  40. package/dist/apis/index.js +0 -22
  41. package/dist/esm/apis/ProductsApi.d.ts +0 -35
  42. package/dist/esm/apis/ProductsApi.js +0 -81
  43. package/dist/esm/apis/StatementsApi.d.ts +0 -48
  44. package/dist/esm/apis/StatementsApi.js +0 -123
  45. package/dist/esm/apis/TransactionsApi.d.ts +0 -48
  46. package/dist/esm/apis/TransactionsApi.js +0 -125
  47. package/dist/esm/apis/VariantsApi.d.ts +0 -82
  48. package/dist/esm/apis/VariantsApi.js +0 -225
  49. package/dist/esm/apis/index.d.ts +0 -4
  50. package/dist/esm/apis/index.js +0 -6
  51. package/dist/esm/models/ApiError.d.ts +0 -37
  52. package/dist/esm/models/ApiError.js +0 -42
  53. package/dist/esm/models/ApiValidationError.d.ts +0 -39
  54. package/dist/esm/models/ApiValidationError.js +0 -44
  55. package/dist/esm/models/Attribute.d.ts +0 -50
  56. package/dist/esm/models/Attribute.js +0 -49
  57. package/dist/esm/models/AttributeThumbnail.d.ts +0 -46
  58. package/dist/esm/models/ExportTransactionsRequest.d.ts +0 -43
  59. package/dist/esm/models/ExportTransactionsRequest.js +0 -42
  60. package/dist/esm/models/Image.d.ts +0 -67
  61. package/dist/esm/models/Image.js +0 -50
  62. package/dist/esm/models/ListStatements200Response.d.ts +0 -38
  63. package/dist/esm/models/ListStatements200Response.js +0 -41
  64. package/dist/esm/models/ListTransactions200Response.d.ts +0 -38
  65. package/dist/esm/models/ListTransactions200Response.js +0 -41
  66. package/dist/esm/models/Product.d.ts +0 -67
  67. package/dist/esm/models/Product.js +0 -52
  68. package/dist/esm/models/ProductsResponse.d.ts +0 -38
  69. package/dist/esm/models/ProductsResponse.js +0 -41
  70. package/dist/esm/models/Statement.d.ts +0 -61
  71. package/dist/esm/models/Statement.js +0 -60
  72. package/dist/esm/models/Stock.d.ts +0 -31
  73. package/dist/esm/models/Stock.js +0 -38
  74. package/dist/esm/models/StockResponse.d.ts +0 -38
  75. package/dist/esm/models/StockResponse.js +0 -41
  76. package/dist/esm/models/Transaction.d.ts +0 -68
  77. package/dist/esm/models/Transaction.js +0 -61
  78. package/dist/esm/models/TransactionOrder.d.ts +0 -37
  79. package/dist/esm/models/TransactionOrder.js +0 -44
  80. package/dist/esm/models/Variant.d.ts +0 -78
  81. package/dist/esm/models/Variant.js +0 -61
  82. package/dist/esm/models/VariantManufacturerOrigin.d.ts +0 -37
  83. package/dist/esm/models/VariantManufacturerOrigin.js +0 -40
  84. package/dist/esm/models/VariantProduct.d.ts +0 -37
  85. package/dist/esm/models/VariantProduct.js +0 -40
  86. package/dist/esm/models/VariantStock.d.ts +0 -50
  87. package/dist/esm/models/VariantStock.js +0 -45
  88. package/dist/esm/models/VariantsResponse.d.ts +0 -38
  89. package/dist/esm/models/VariantsResponse.js +0 -41
  90. package/dist/esm/models/index.d.ts +0 -20
  91. package/dist/esm/models/index.js +0 -22
  92. package/dist/esm/runtime.d.ts +0 -187
  93. package/dist/esm/runtime.js +0 -333
  94. package/dist/models/ApiError.d.ts +0 -37
  95. package/dist/models/ApiError.js +0 -49
  96. package/dist/models/ApiValidationError.d.ts +0 -39
  97. package/dist/models/ApiValidationError.js +0 -51
  98. package/dist/models/Attribute.d.ts +0 -50
  99. package/dist/models/Attribute.js +0 -56
  100. package/dist/models/AttributeThumbnail.d.ts +0 -46
  101. package/dist/models/AttributeThumbnail.js +0 -55
  102. package/dist/models/ExportTransactionsRequest.d.ts +0 -43
  103. package/dist/models/ExportTransactionsRequest.js +0 -49
  104. package/dist/models/Image.d.ts +0 -67
  105. package/dist/models/Image.js +0 -57
  106. package/dist/models/ListStatements200Response.d.ts +0 -38
  107. package/dist/models/ListStatements200Response.js +0 -48
  108. package/dist/models/ListTransactions200Response.d.ts +0 -38
  109. package/dist/models/ListTransactions200Response.js +0 -48
  110. package/dist/models/Product.d.ts +0 -67
  111. package/dist/models/Product.js +0 -59
  112. package/dist/models/ProductsResponse.d.ts +0 -38
  113. package/dist/models/ProductsResponse.js +0 -48
  114. package/dist/models/Statement.d.ts +0 -61
  115. package/dist/models/Statement.js +0 -67
  116. package/dist/models/Stock.js +0 -45
  117. package/dist/models/StockResponse.d.ts +0 -38
  118. package/dist/models/StockResponse.js +0 -48
  119. package/dist/models/Transaction.d.ts +0 -68
  120. package/dist/models/Transaction.js +0 -68
  121. package/dist/models/TransactionOrder.d.ts +0 -37
  122. package/dist/models/TransactionOrder.js +0 -51
  123. package/dist/models/Variant.d.ts +0 -78
  124. package/dist/models/Variant.js +0 -68
  125. package/dist/models/VariantManufacturerOrigin.d.ts +0 -37
  126. package/dist/models/VariantManufacturerOrigin.js +0 -47
  127. package/dist/models/VariantProduct.d.ts +0 -37
  128. package/dist/models/VariantProduct.js +0 -47
  129. package/dist/models/VariantStock.d.ts +0 -50
  130. package/dist/models/VariantStock.js +0 -52
  131. package/dist/models/VariantsResponse.d.ts +0 -38
  132. package/dist/models/VariantsResponse.js +0 -48
  133. package/dist/models/index.d.ts +0 -20
  134. package/dist/models/index.js +0 -38
  135. package/dist/runtime.d.ts +0 -187
  136. package/dist/runtime.js +0 -349
  137. package/src/apis/ProductsApi.ts +0 -116
  138. package/src/apis/StatementsApi.ts +0 -177
  139. package/src/apis/TransactionsApi.ts +0 -180
  140. package/src/apis/VariantsApi.ts +0 -345
  141. package/src/apis/index.ts +0 -6
  142. package/src/index.ts +0 -5
  143. package/src/models/ApiError.ts +0 -69
  144. package/src/models/ApiValidationError.ts +0 -70
  145. package/src/models/Attribute.ts +0 -93
  146. package/src/models/AttributeThumbnail.ts +0 -80
  147. package/src/models/ExportTransactionsRequest.ts +0 -76
  148. package/src/models/Image.ts +0 -108
  149. package/src/models/ListStatements200Response.ts +0 -75
  150. package/src/models/ListTransactions200Response.ts +0 -75
  151. package/src/models/Product.ts +0 -109
  152. package/src/models/ProductsResponse.ts +0 -75
  153. package/src/models/Statement.ts +0 -106
  154. package/src/models/Stock.ts +0 -60
  155. package/src/models/StockResponse.ts +0 -75
  156. package/src/models/Transaction.ts +0 -120
  157. package/src/models/TransactionOrder.ts +0 -70
  158. package/src/models/Variant.ts +0 -149
  159. package/src/models/VariantManufacturerOrigin.ts +0 -68
  160. package/src/models/VariantProduct.ts +0 -68
  161. package/src/models/VariantStock.ts +0 -91
  162. package/src/models/VariantsResponse.ts +0 -75
  163. package/src/models/index.ts +0 -22
  164. package/src/runtime.ts +0 -441
@@ -1,106 +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.4.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 Statement
20
- */
21
- export interface Statement {
22
- /**
23
- * Unique object identifier
24
- * @type {string}
25
- * @memberof Statement
26
- */
27
- id: string;
28
- /**
29
- * A reference to the resource location
30
- * @type {string}
31
- * @memberof Statement
32
- */
33
- ref: string;
34
- /**
35
- *
36
- * @type {number}
37
- * @memberof Statement
38
- */
39
- total: number;
40
- /**
41
- *
42
- * @type {string}
43
- * @memberof Statement
44
- */
45
- startDate: string;
46
- /**
47
- *
48
- * @type {string}
49
- * @memberof Statement
50
- */
51
- endDate: string;
52
- /**
53
- *
54
- * @type {string}
55
- * @memberof Statement
56
- */
57
- createdAt: string;
58
- }
59
-
60
- /**
61
- * Check if a given object implements the Statement interface.
62
- */
63
- export function instanceOfStatement(value: object): value is Statement {
64
- if (!('id' in value) || value['id'] === undefined) return false;
65
- if (!('ref' in value) || value['ref'] === undefined) return false;
66
- if (!('total' in value) || value['total'] === undefined) return false;
67
- if (!('startDate' in value) || value['startDate'] === undefined) return false;
68
- if (!('endDate' in value) || value['endDate'] === undefined) return false;
69
- if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
70
- return true;
71
- }
72
-
73
- export function StatementFromJSON(json: any): Statement {
74
- return StatementFromJSONTyped(json, false);
75
- }
76
-
77
- export function StatementFromJSONTyped(json: any, ignoreDiscriminator: boolean): Statement {
78
- if (json == null) {
79
- return json;
80
- }
81
- return {
82
-
83
- 'id': json['id'],
84
- 'ref': json['ref'],
85
- 'total': json['total'],
86
- 'startDate': json['startDate'],
87
- 'endDate': json['endDate'],
88
- 'createdAt': json['createdAt'],
89
- };
90
- }
91
-
92
- export function StatementToJSON(value?: Statement | null): any {
93
- if (value == null) {
94
- return value;
95
- }
96
- return {
97
-
98
- 'id': value['id'],
99
- 'ref': value['ref'],
100
- 'total': value['total'],
101
- 'startDate': value['startDate'],
102
- 'endDate': value['endDate'],
103
- 'createdAt': value['createdAt'],
104
- };
105
- }
106
-
@@ -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.4.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): value is Stock {
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.4.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): value is StockResponse {
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,120 +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.4.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 { TransactionOrder } from './TransactionOrder';
17
- import {
18
- TransactionOrderFromJSON,
19
- TransactionOrderFromJSONTyped,
20
- TransactionOrderToJSON,
21
- } from './TransactionOrder';
22
-
23
- /**
24
- *
25
- * @export
26
- * @interface Transaction
27
- */
28
- export interface Transaction {
29
- /**
30
- * Unique object identifier
31
- * @type {string}
32
- * @memberof Transaction
33
- */
34
- id: string;
35
- /**
36
- * A reference to the resource location
37
- * @type {string}
38
- * @memberof Transaction
39
- */
40
- ref: string;
41
- /**
42
- * A reference to the resource location
43
- * @type {string}
44
- * @memberof Transaction
45
- */
46
- statement?: string;
47
- /**
48
- *
49
- * @type {TransactionOrder}
50
- * @memberof Transaction
51
- */
52
- order: TransactionOrder;
53
- /**
54
- *
55
- * @type {TransactionOrder}
56
- * @memberof Transaction
57
- */
58
- fulfillment?: TransactionOrder;
59
- /**
60
- *
61
- * @type {number}
62
- * @memberof Transaction
63
- */
64
- total: number;
65
- /**
66
- *
67
- * @type {string}
68
- * @memberof Transaction
69
- */
70
- issuedAt: string;
71
- }
72
-
73
- /**
74
- * Check if a given object implements the Transaction interface.
75
- */
76
- export function instanceOfTransaction(value: object): value is Transaction {
77
- if (!('id' in value) || value['id'] === undefined) return false;
78
- if (!('ref' in value) || value['ref'] === undefined) return false;
79
- if (!('order' in value) || value['order'] === undefined) return false;
80
- if (!('total' in value) || value['total'] === undefined) return false;
81
- if (!('issuedAt' in value) || value['issuedAt'] === undefined) return false;
82
- return true;
83
- }
84
-
85
- export function TransactionFromJSON(json: any): Transaction {
86
- return TransactionFromJSONTyped(json, false);
87
- }
88
-
89
- export function TransactionFromJSONTyped(json: any, ignoreDiscriminator: boolean): Transaction {
90
- if (json == null) {
91
- return json;
92
- }
93
- return {
94
-
95
- 'id': json['id'],
96
- 'ref': json['ref'],
97
- 'statement': json['statement'] == null ? undefined : json['statement'],
98
- 'order': TransactionOrderFromJSON(json['order']),
99
- 'fulfillment': json['fulfillment'] == null ? undefined : TransactionOrderFromJSON(json['fulfillment']),
100
- 'total': json['total'],
101
- 'issuedAt': json['issuedAt'],
102
- };
103
- }
104
-
105
- export function TransactionToJSON(value?: Transaction | null): any {
106
- if (value == null) {
107
- return value;
108
- }
109
- return {
110
-
111
- 'id': value['id'],
112
- 'ref': value['ref'],
113
- 'statement': value['statement'],
114
- 'order': TransactionOrderToJSON(value['order']),
115
- 'fulfillment': TransactionOrderToJSON(value['fulfillment']),
116
- 'total': value['total'],
117
- 'issuedAt': value['issuedAt'],
118
- };
119
- }
120
-
@@ -1,70 +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.4.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 TransactionOrder
20
- */
21
- export interface TransactionOrder {
22
- /**
23
- * A reference to the resource location
24
- * @type {string}
25
- * @memberof TransactionOrder
26
- */
27
- ref: string;
28
- /**
29
- * A reference to the resource location
30
- * @type {string}
31
- * @memberof TransactionOrder
32
- */
33
- project: string;
34
- }
35
-
36
- /**
37
- * Check if a given object implements the TransactionOrder interface.
38
- */
39
- export function instanceOfTransactionOrder(value: object): value is TransactionOrder {
40
- if (!('ref' in value) || value['ref'] === undefined) return false;
41
- if (!('project' in value) || value['project'] === undefined) return false;
42
- return true;
43
- }
44
-
45
- export function TransactionOrderFromJSON(json: any): TransactionOrder {
46
- return TransactionOrderFromJSONTyped(json, false);
47
- }
48
-
49
- export function TransactionOrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionOrder {
50
- if (json == null) {
51
- return json;
52
- }
53
- return {
54
-
55
- 'ref': json['ref'],
56
- 'project': json['project'],
57
- };
58
- }
59
-
60
- export function TransactionOrderToJSON(value?: TransactionOrder | null): any {
61
- if (value == null) {
62
- return value;
63
- }
64
- return {
65
-
66
- 'ref': value['ref'],
67
- 'project': value['project'],
68
- };
69
- }
70
-
@@ -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.4.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 { VariantManufacturerOrigin } from './VariantManufacturerOrigin';
17
- import {
18
- VariantManufacturerOriginFromJSON,
19
- VariantManufacturerOriginFromJSONTyped,
20
- VariantManufacturerOriginToJSON,
21
- } from './VariantManufacturerOrigin';
22
- import type { VariantProduct } from './VariantProduct';
23
- import {
24
- VariantProductFromJSON,
25
- VariantProductFromJSONTyped,
26
- VariantProductToJSON,
27
- } from './VariantProduct';
28
- import type { Attribute } from './Attribute';
29
- import {
30
- AttributeFromJSON,
31
- AttributeFromJSONTyped,
32
- AttributeToJSON,
33
- } from './Attribute';
34
- import type { Image } from './Image';
35
- import {
36
- ImageFromJSON,
37
- ImageFromJSONTyped,
38
- ImageToJSON,
39
- } from './Image';
40
- import type { Stock } from './Stock';
41
- import {
42
- StockFromJSON,
43
- StockFromJSONTyped,
44
- StockToJSON,
45
- } from './Stock';
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): value is Variant {
107
- if (!('sku' in value) || value['sku'] === undefined) return false;
108
- if (!('attributes' in value) || value['attributes'] === undefined) 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.4.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): value is VariantManufacturerOrigin {
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
-