@teemill/gfn-catalog 1.2.0 → 1.4.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 (143) hide show
  1. package/.openapi-generator/FILES +10 -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 +47 -128
  6. package/dist/apis/StatementsApi.d.ts +48 -0
  7. package/dist/apis/StatementsApi.js +127 -0
  8. package/dist/apis/TransactionsApi.d.ts +48 -0
  9. package/dist/apis/TransactionsApi.js +129 -0
  10. package/dist/apis/VariantsApi.d.ts +19 -2
  11. package/dist/apis/VariantsApi.js +170 -245
  12. package/dist/apis/index.d.ts +2 -0
  13. package/dist/apis/index.js +2 -0
  14. package/dist/esm/apis/ProductsApi.d.ts +35 -0
  15. package/dist/esm/apis/ProductsApi.js +81 -0
  16. package/dist/esm/apis/StatementsApi.d.ts +48 -0
  17. package/dist/esm/apis/StatementsApi.js +123 -0
  18. package/dist/esm/apis/TransactionsApi.d.ts +48 -0
  19. package/dist/esm/apis/TransactionsApi.js +125 -0
  20. package/dist/esm/apis/VariantsApi.d.ts +82 -0
  21. package/dist/esm/apis/VariantsApi.js +225 -0
  22. package/dist/esm/apis/index.d.ts +4 -0
  23. package/dist/esm/apis/index.js +6 -0
  24. package/dist/esm/index.d.ts +3 -0
  25. package/dist/esm/index.js +5 -0
  26. package/dist/esm/models/ApiError.d.ts +37 -0
  27. package/dist/esm/models/ApiError.js +42 -0
  28. package/dist/esm/models/ApiValidationError.d.ts +39 -0
  29. package/dist/esm/models/ApiValidationError.js +44 -0
  30. package/dist/esm/models/Attribute.d.ts +50 -0
  31. package/dist/esm/models/Attribute.js +49 -0
  32. package/dist/esm/models/AttributeThumbnail.d.ts +46 -0
  33. package/dist/esm/models/AttributeThumbnail.js +48 -0
  34. package/dist/esm/models/ExportTransactionsRequest.d.ts +43 -0
  35. package/dist/esm/models/ExportTransactionsRequest.js +42 -0
  36. package/dist/esm/models/Image.d.ts +67 -0
  37. package/dist/esm/models/Image.js +50 -0
  38. package/dist/esm/models/ListStatements200Response.d.ts +38 -0
  39. package/dist/esm/models/ListStatements200Response.js +41 -0
  40. package/dist/esm/models/ListTransactions200Response.d.ts +38 -0
  41. package/dist/esm/models/ListTransactions200Response.js +41 -0
  42. package/dist/esm/models/Product.d.ts +67 -0
  43. package/dist/esm/models/Product.js +52 -0
  44. package/dist/esm/models/ProductsResponse.d.ts +38 -0
  45. package/dist/esm/models/ProductsResponse.js +41 -0
  46. package/dist/esm/models/Statement.d.ts +61 -0
  47. package/dist/esm/models/Statement.js +60 -0
  48. package/dist/esm/models/Stock.d.ts +31 -0
  49. package/dist/esm/models/Stock.js +38 -0
  50. package/dist/esm/models/StockResponse.d.ts +38 -0
  51. package/dist/esm/models/StockResponse.js +41 -0
  52. package/dist/esm/models/Transaction.d.ts +68 -0
  53. package/dist/esm/models/Transaction.js +61 -0
  54. package/dist/esm/models/TransactionOrder.d.ts +37 -0
  55. package/dist/esm/models/TransactionOrder.js +44 -0
  56. package/dist/esm/models/Variant.d.ts +78 -0
  57. package/dist/esm/models/Variant.js +61 -0
  58. package/dist/esm/models/VariantManufacturerOrigin.d.ts +37 -0
  59. package/dist/esm/models/VariantManufacturerOrigin.js +40 -0
  60. package/dist/esm/models/VariantProduct.d.ts +37 -0
  61. package/dist/esm/models/VariantProduct.js +40 -0
  62. package/dist/esm/models/VariantStock.d.ts +50 -0
  63. package/dist/esm/models/VariantStock.js +45 -0
  64. package/dist/esm/models/VariantsResponse.d.ts +38 -0
  65. package/dist/esm/models/VariantsResponse.js +41 -0
  66. package/dist/esm/models/index.d.ts +20 -0
  67. package/dist/esm/models/index.js +22 -0
  68. package/dist/esm/runtime.d.ts +187 -0
  69. package/dist/esm/runtime.js +333 -0
  70. package/dist/models/ApiError.d.ts +2 -2
  71. package/dist/models/ApiError.js +2 -2
  72. package/dist/models/ApiValidationError.d.ts +39 -0
  73. package/dist/models/ApiValidationError.js +51 -0
  74. package/dist/models/Attribute.d.ts +2 -2
  75. package/dist/models/Attribute.js +4 -4
  76. package/dist/models/AttributeThumbnail.d.ts +2 -2
  77. package/dist/models/AttributeThumbnail.js +1 -1
  78. package/dist/models/ExportTransactionsRequest.d.ts +43 -0
  79. package/dist/models/ExportTransactionsRequest.js +49 -0
  80. package/dist/models/Image.d.ts +2 -2
  81. package/dist/models/Image.js +1 -1
  82. package/dist/models/ListStatements200Response.d.ts +38 -0
  83. package/dist/models/ListStatements200Response.js +48 -0
  84. package/dist/models/ListTransactions200Response.d.ts +38 -0
  85. package/dist/models/ListTransactions200Response.js +48 -0
  86. package/dist/models/Product.d.ts +2 -2
  87. package/dist/models/Product.js +2 -2
  88. package/dist/models/ProductsResponse.d.ts +2 -2
  89. package/dist/models/ProductsResponse.js +2 -2
  90. package/dist/models/Statement.d.ts +61 -0
  91. package/dist/models/Statement.js +67 -0
  92. package/dist/models/Stock.d.ts +2 -2
  93. package/dist/models/Stock.js +1 -1
  94. package/dist/models/StockResponse.d.ts +2 -2
  95. package/dist/models/StockResponse.js +2 -2
  96. package/dist/models/Transaction.d.ts +68 -0
  97. package/dist/models/Transaction.js +68 -0
  98. package/dist/models/TransactionOrder.d.ts +37 -0
  99. package/dist/models/TransactionOrder.js +51 -0
  100. package/dist/models/Variant.d.ts +4 -4
  101. package/dist/models/Variant.js +8 -8
  102. package/dist/models/VariantManufacturerOrigin.d.ts +2 -2
  103. package/dist/models/VariantManufacturerOrigin.js +1 -1
  104. package/dist/models/VariantProduct.d.ts +2 -2
  105. package/dist/models/VariantProduct.js +1 -1
  106. package/dist/models/VariantStock.d.ts +2 -2
  107. package/dist/models/VariantStock.js +2 -2
  108. package/dist/models/VariantsResponse.d.ts +2 -2
  109. package/dist/models/VariantsResponse.js +2 -2
  110. package/dist/models/index.d.ts +7 -0
  111. package/dist/models/index.js +7 -0
  112. package/dist/runtime.d.ts +1 -1
  113. package/dist/runtime.js +223 -439
  114. package/package.json +5 -3
  115. package/src/apis/ProductsApi.ts +4 -1
  116. package/src/apis/StatementsApi.ts +177 -0
  117. package/src/apis/TransactionsApi.ts +180 -0
  118. package/src/apis/VariantsApi.ts +87 -1
  119. package/src/apis/index.ts +2 -0
  120. package/src/models/ApiError.ts +3 -3
  121. package/src/models/ApiValidationError.ts +70 -0
  122. package/src/models/Attribute.ts +4 -4
  123. package/src/models/AttributeThumbnail.ts +2 -2
  124. package/src/models/ExportTransactionsRequest.ts +76 -0
  125. package/src/models/Image.ts +2 -2
  126. package/src/models/ListStatements200Response.ts +75 -0
  127. package/src/models/ListTransactions200Response.ts +75 -0
  128. package/src/models/Product.ts +3 -3
  129. package/src/models/ProductsResponse.ts +2 -2
  130. package/src/models/Statement.ts +106 -0
  131. package/src/models/Stock.ts +2 -2
  132. package/src/models/StockResponse.ts +2 -2
  133. package/src/models/Transaction.ts +120 -0
  134. package/src/models/TransactionOrder.ts +70 -0
  135. package/src/models/Variant.ts +16 -16
  136. package/src/models/VariantManufacturerOrigin.ts +2 -2
  137. package/src/models/VariantProduct.ts +2 -2
  138. package/src/models/VariantStock.ts +2 -2
  139. package/src/models/VariantsResponse.ts +2 -2
  140. package/src/models/index.ts +7 -0
  141. package/src/runtime.ts +1 -1
  142. package/tsconfig.esm.json +7 -0
  143. package/tsconfig.json +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.2.0
7
+ * The version of the OpenAPI document: 1.4.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -48,7 +48,7 @@ export type AttributeThumbnailTypeEnum = typeof AttributeThumbnailTypeEnum[keyof
48
48
  /**
49
49
  * Check if a given object implements the AttributeThumbnail interface.
50
50
  */
51
- export function instanceOfAttributeThumbnail(value: object): boolean {
51
+ export function instanceOfAttributeThumbnail(value: object): value is AttributeThumbnail {
52
52
  return true;
53
53
  }
54
54
 
@@ -0,0 +1,76 @@
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 ExportTransactionsRequest
20
+ */
21
+ export interface ExportTransactionsRequest {
22
+ /**
23
+ * The start date for the export
24
+ * @type {Date}
25
+ * @memberof ExportTransactionsRequest
26
+ */
27
+ start?: Date;
28
+ /**
29
+ * The end date for the export
30
+ * @type {Date}
31
+ * @memberof ExportTransactionsRequest
32
+ */
33
+ end?: Date;
34
+ /**
35
+ * Include only transactions from this statement
36
+ * @type {string}
37
+ * @memberof ExportTransactionsRequest
38
+ */
39
+ statement?: string;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the ExportTransactionsRequest interface.
44
+ */
45
+ export function instanceOfExportTransactionsRequest(value: object): value is ExportTransactionsRequest {
46
+ return true;
47
+ }
48
+
49
+ export function ExportTransactionsRequestFromJSON(json: any): ExportTransactionsRequest {
50
+ return ExportTransactionsRequestFromJSONTyped(json, false);
51
+ }
52
+
53
+ export function ExportTransactionsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExportTransactionsRequest {
54
+ if (json == null) {
55
+ return json;
56
+ }
57
+ return {
58
+
59
+ 'start': json['start'] == null ? undefined : (new Date(json['start'])),
60
+ 'end': json['end'] == null ? undefined : (new Date(json['end'])),
61
+ 'statement': json['statement'] == null ? undefined : json['statement'],
62
+ };
63
+ }
64
+
65
+ export function ExportTransactionsRequestToJSON(value?: ExportTransactionsRequest | null): any {
66
+ if (value == null) {
67
+ return value;
68
+ }
69
+ return {
70
+
71
+ 'start': value['start'] == null ? undefined : ((value['start']).toISOString()),
72
+ 'end': value['end'] == null ? undefined : ((value['end']).toISOString()),
73
+ 'statement': value['statement'],
74
+ };
75
+ }
76
+
@@ -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.2.0
7
+ * The version of the OpenAPI document: 1.4.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -66,7 +66,7 @@ export interface Image {
66
66
  /**
67
67
  * Check if a given object implements the Image interface.
68
68
  */
69
- export function instanceOfImage(value: object): boolean {
69
+ export function instanceOfImage(value: object): value is Image {
70
70
  return true;
71
71
  }
72
72
 
@@ -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.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 { Statement } from './Statement';
17
+ import {
18
+ StatementFromJSON,
19
+ StatementFromJSONTyped,
20
+ StatementToJSON,
21
+ } from './Statement';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface ListStatements200Response
27
+ */
28
+ export interface ListStatements200Response {
29
+ /**
30
+ *
31
+ * @type {Array<Statement>}
32
+ * @memberof ListStatements200Response
33
+ */
34
+ statements?: Array<Statement>;
35
+ /**
36
+ *
37
+ * @type {number}
38
+ * @memberof ListStatements200Response
39
+ */
40
+ nextPageToken?: number;
41
+ }
42
+
43
+ /**
44
+ * Check if a given object implements the ListStatements200Response interface.
45
+ */
46
+ export function instanceOfListStatements200Response(value: object): value is ListStatements200Response {
47
+ return true;
48
+ }
49
+
50
+ export function ListStatements200ResponseFromJSON(json: any): ListStatements200Response {
51
+ return ListStatements200ResponseFromJSONTyped(json, false);
52
+ }
53
+
54
+ export function ListStatements200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListStatements200Response {
55
+ if (json == null) {
56
+ return json;
57
+ }
58
+ return {
59
+
60
+ 'statements': json['statements'] == null ? undefined : ((json['statements'] as Array<any>).map(StatementFromJSON)),
61
+ 'nextPageToken': json['nextPageToken'] == null ? undefined : json['nextPageToken'],
62
+ };
63
+ }
64
+
65
+ export function ListStatements200ResponseToJSON(value?: ListStatements200Response | null): any {
66
+ if (value == null) {
67
+ return value;
68
+ }
69
+ return {
70
+
71
+ 'statements': value['statements'] == null ? undefined : ((value['statements'] as Array<any>).map(StatementToJSON)),
72
+ 'nextPageToken': value['nextPageToken'],
73
+ };
74
+ }
75
+
@@ -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.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 { Transaction } from './Transaction';
17
+ import {
18
+ TransactionFromJSON,
19
+ TransactionFromJSONTyped,
20
+ TransactionToJSON,
21
+ } from './Transaction';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface ListTransactions200Response
27
+ */
28
+ export interface ListTransactions200Response {
29
+ /**
30
+ *
31
+ * @type {Array<Transaction>}
32
+ * @memberof ListTransactions200Response
33
+ */
34
+ transactions?: Array<Transaction>;
35
+ /**
36
+ *
37
+ * @type {number}
38
+ * @memberof ListTransactions200Response
39
+ */
40
+ nextPageToken?: number;
41
+ }
42
+
43
+ /**
44
+ * Check if a given object implements the ListTransactions200Response interface.
45
+ */
46
+ export function instanceOfListTransactions200Response(value: object): value is ListTransactions200Response {
47
+ return true;
48
+ }
49
+
50
+ export function ListTransactions200ResponseFromJSON(json: any): ListTransactions200Response {
51
+ return ListTransactions200ResponseFromJSONTyped(json, false);
52
+ }
53
+
54
+ export function ListTransactions200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListTransactions200Response {
55
+ if (json == null) {
56
+ return json;
57
+ }
58
+ return {
59
+
60
+ 'transactions': json['transactions'] == null ? undefined : ((json['transactions'] as Array<any>).map(TransactionFromJSON)),
61
+ 'nextPageToken': json['nextPageToken'] == null ? undefined : json['nextPageToken'],
62
+ };
63
+ }
64
+
65
+ export function ListTransactions200ResponseToJSON(value?: ListTransactions200Response | null): any {
66
+ if (value == null) {
67
+ return value;
68
+ }
69
+ return {
70
+
71
+ 'transactions': value['transactions'] == null ? undefined : ((value['transactions'] as Array<any>).map(TransactionToJSON)),
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.2.0
7
+ * The version of the OpenAPI document: 1.4.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -66,8 +66,8 @@ export interface Product {
66
66
  /**
67
67
  * Check if a given object implements the Product interface.
68
68
  */
69
- export function instanceOfProduct(value: object): boolean {
70
- if (!('title' in value)) return false;
69
+ export function instanceOfProduct(value: object): value is Product {
70
+ if (!('title' in value) || value['title'] === undefined) return false;
71
71
  return true;
72
72
  }
73
73
 
@@ -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.2.0
7
+ * The version of the OpenAPI document: 1.4.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -43,7 +43,7 @@ export interface ProductsResponse {
43
43
  /**
44
44
  * Check if a given object implements the ProductsResponse interface.
45
45
  */
46
- export function instanceOfProductsResponse(value: object): boolean {
46
+ export function instanceOfProductsResponse(value: object): value is ProductsResponse {
47
47
  return true;
48
48
  }
49
49
 
@@ -0,0 +1,106 @@
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
+
@@ -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.2.0
7
+ * The version of the OpenAPI document: 1.4.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -30,7 +30,7 @@ export interface Stock {
30
30
  /**
31
31
  * Check if a given object implements the Stock interface.
32
32
  */
33
- export function instanceOfStock(value: object): boolean {
33
+ export function instanceOfStock(value: object): value is Stock {
34
34
  return true;
35
35
  }
36
36
 
@@ -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.2.0
7
+ * The version of the OpenAPI document: 1.4.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -43,7 +43,7 @@ export interface StockResponse {
43
43
  /**
44
44
  * Check if a given object implements the StockResponse interface.
45
45
  */
46
- export function instanceOfStockResponse(value: object): boolean {
46
+ export function instanceOfStockResponse(value: object): value is StockResponse {
47
47
  return true;
48
48
  }
49
49
 
@@ -0,0 +1,120 @@
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
+
@@ -0,0 +1,70 @@
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
+