@teemill/gfn-catalog 1.3.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 (139) hide show
  1. package/.openapi-generator/FILES +9 -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 +3 -3
  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 +1 -1
  11. package/dist/apis/VariantsApi.js +9 -9
  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 +1 -1
  15. package/dist/esm/apis/ProductsApi.js +3 -3
  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 +1 -1
  21. package/dist/esm/apis/VariantsApi.js +9 -9
  22. package/dist/esm/apis/index.d.ts +2 -0
  23. package/dist/esm/apis/index.js +2 -0
  24. package/dist/esm/models/ApiError.d.ts +2 -2
  25. package/dist/esm/models/ApiError.js +2 -2
  26. package/dist/esm/models/ApiValidationError.d.ts +39 -0
  27. package/dist/esm/models/ApiValidationError.js +44 -0
  28. package/dist/esm/models/Attribute.d.ts +2 -2
  29. package/dist/esm/models/Attribute.js +3 -3
  30. package/dist/esm/models/AttributeThumbnail.d.ts +2 -2
  31. package/dist/esm/models/AttributeThumbnail.js +1 -1
  32. package/dist/esm/models/ExportTransactionsRequest.d.ts +43 -0
  33. package/dist/esm/models/ExportTransactionsRequest.js +42 -0
  34. package/dist/esm/models/Image.d.ts +2 -2
  35. package/dist/esm/models/Image.js +1 -1
  36. package/dist/esm/models/ListStatements200Response.d.ts +38 -0
  37. package/dist/esm/models/ListStatements200Response.js +41 -0
  38. package/dist/esm/models/ListTransactions200Response.d.ts +38 -0
  39. package/dist/esm/models/ListTransactions200Response.js +41 -0
  40. package/dist/esm/models/Product.d.ts +2 -2
  41. package/dist/esm/models/Product.js +2 -2
  42. package/dist/esm/models/ProductsResponse.d.ts +2 -2
  43. package/dist/esm/models/ProductsResponse.js +1 -1
  44. package/dist/esm/models/Statement.d.ts +61 -0
  45. package/dist/esm/models/Statement.js +60 -0
  46. package/dist/esm/models/Stock.d.ts +2 -2
  47. package/dist/esm/models/Stock.js +1 -1
  48. package/dist/esm/models/StockResponse.d.ts +2 -2
  49. package/dist/esm/models/StockResponse.js +1 -1
  50. package/dist/esm/models/Transaction.d.ts +68 -0
  51. package/dist/esm/models/Transaction.js +61 -0
  52. package/dist/esm/models/TransactionOrder.d.ts +37 -0
  53. package/dist/esm/models/TransactionOrder.js +44 -0
  54. package/dist/esm/models/Variant.d.ts +4 -4
  55. package/dist/esm/models/Variant.js +5 -5
  56. package/dist/esm/models/VariantManufacturerOrigin.d.ts +2 -2
  57. package/dist/esm/models/VariantManufacturerOrigin.js +1 -1
  58. package/dist/esm/models/VariantProduct.d.ts +2 -2
  59. package/dist/esm/models/VariantProduct.js +1 -1
  60. package/dist/esm/models/VariantStock.d.ts +2 -2
  61. package/dist/esm/models/VariantStock.js +1 -1
  62. package/dist/esm/models/VariantsResponse.d.ts +2 -2
  63. package/dist/esm/models/VariantsResponse.js +1 -1
  64. package/dist/esm/models/index.d.ts +7 -0
  65. package/dist/esm/models/index.js +7 -0
  66. package/dist/esm/runtime.d.ts +1 -1
  67. package/dist/esm/runtime.js +1 -1
  68. package/dist/models/ApiError.d.ts +2 -2
  69. package/dist/models/ApiError.js +2 -2
  70. package/dist/models/ApiValidationError.d.ts +39 -0
  71. package/dist/models/ApiValidationError.js +51 -0
  72. package/dist/models/Attribute.d.ts +2 -2
  73. package/dist/models/Attribute.js +3 -3
  74. package/dist/models/AttributeThumbnail.d.ts +2 -2
  75. package/dist/models/AttributeThumbnail.js +1 -1
  76. package/dist/models/ExportTransactionsRequest.d.ts +43 -0
  77. package/dist/models/ExportTransactionsRequest.js +49 -0
  78. package/dist/models/Image.d.ts +2 -2
  79. package/dist/models/Image.js +1 -1
  80. package/dist/models/ListStatements200Response.d.ts +38 -0
  81. package/dist/models/ListStatements200Response.js +48 -0
  82. package/dist/models/ListTransactions200Response.d.ts +38 -0
  83. package/dist/models/ListTransactions200Response.js +48 -0
  84. package/dist/models/Product.d.ts +2 -2
  85. package/dist/models/Product.js +2 -2
  86. package/dist/models/ProductsResponse.d.ts +2 -2
  87. package/dist/models/ProductsResponse.js +1 -1
  88. package/dist/models/Statement.d.ts +61 -0
  89. package/dist/models/Statement.js +67 -0
  90. package/dist/models/Stock.d.ts +2 -2
  91. package/dist/models/Stock.js +1 -1
  92. package/dist/models/StockResponse.d.ts +2 -2
  93. package/dist/models/StockResponse.js +1 -1
  94. package/dist/models/Transaction.d.ts +68 -0
  95. package/dist/models/Transaction.js +68 -0
  96. package/dist/models/TransactionOrder.d.ts +37 -0
  97. package/dist/models/TransactionOrder.js +51 -0
  98. package/dist/models/Variant.d.ts +4 -4
  99. package/dist/models/Variant.js +5 -5
  100. package/dist/models/VariantManufacturerOrigin.d.ts +2 -2
  101. package/dist/models/VariantManufacturerOrigin.js +1 -1
  102. package/dist/models/VariantProduct.d.ts +2 -2
  103. package/dist/models/VariantProduct.js +1 -1
  104. package/dist/models/VariantStock.d.ts +2 -2
  105. package/dist/models/VariantStock.js +1 -1
  106. package/dist/models/VariantsResponse.d.ts +2 -2
  107. package/dist/models/VariantsResponse.js +1 -1
  108. package/dist/models/index.d.ts +7 -0
  109. package/dist/models/index.js +7 -0
  110. package/dist/runtime.d.ts +1 -1
  111. package/dist/runtime.js +1 -1
  112. package/package.json +2 -2
  113. package/src/apis/ProductsApi.ts +4 -1
  114. package/src/apis/StatementsApi.ts +177 -0
  115. package/src/apis/TransactionsApi.ts +180 -0
  116. package/src/apis/VariantsApi.ts +4 -1
  117. package/src/apis/index.ts +2 -0
  118. package/src/models/ApiError.ts +3 -3
  119. package/src/models/ApiValidationError.ts +70 -0
  120. package/src/models/Attribute.ts +4 -4
  121. package/src/models/AttributeThumbnail.ts +2 -2
  122. package/src/models/ExportTransactionsRequest.ts +76 -0
  123. package/src/models/Image.ts +2 -2
  124. package/src/models/ListStatements200Response.ts +75 -0
  125. package/src/models/ListTransactions200Response.ts +75 -0
  126. package/src/models/Product.ts +3 -3
  127. package/src/models/ProductsResponse.ts +2 -2
  128. package/src/models/Statement.ts +106 -0
  129. package/src/models/Stock.ts +2 -2
  130. package/src/models/StockResponse.ts +2 -2
  131. package/src/models/Transaction.ts +120 -0
  132. package/src/models/TransactionOrder.ts +70 -0
  133. package/src/models/Variant.ts +16 -16
  134. package/src/models/VariantManufacturerOrigin.ts +2 -2
  135. package/src/models/VariantProduct.ts +2 -2
  136. package/src/models/VariantStock.ts +2 -2
  137. package/src/models/VariantsResponse.ts +2 -2
  138. package/src/models/index.ts +7 -0
  139. package/src/runtime.ts +1 -1
@@ -0,0 +1,180 @@
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
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ ApiError,
19
+ ApiValidationError,
20
+ ExportTransactionsRequest,
21
+ ListTransactions200Response,
22
+ } from '../models/index';
23
+ import {
24
+ ApiErrorFromJSON,
25
+ ApiErrorToJSON,
26
+ ApiValidationErrorFromJSON,
27
+ ApiValidationErrorToJSON,
28
+ ExportTransactionsRequestFromJSON,
29
+ ExportTransactionsRequestToJSON,
30
+ ListTransactions200ResponseFromJSON,
31
+ ListTransactions200ResponseToJSON,
32
+ } from '../models/index';
33
+
34
+ export interface ExportTransactionsOperationRequest {
35
+ project: string;
36
+ exportTransactionsRequest: ExportTransactionsRequest;
37
+ }
38
+
39
+ export interface ListTransactionsRequest {
40
+ project: string;
41
+ pageToken?: number;
42
+ pageSize?: number;
43
+ statementId?: string;
44
+ }
45
+
46
+ /**
47
+ *
48
+ */
49
+ export class TransactionsApi extends runtime.BaseAPI {
50
+
51
+ /**
52
+ * Exports all GFN transactions available to the project
53
+ * Export GFN transactions
54
+ */
55
+ async exportTransactionsRaw(requestParameters: ExportTransactionsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
56
+ if (requestParameters.project === null || requestParameters.project === undefined) {
57
+ throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling exportTransactions.');
58
+ }
59
+
60
+ if (requestParameters.exportTransactionsRequest === null || requestParameters.exportTransactionsRequest === undefined) {
61
+ throw new runtime.RequiredError('exportTransactionsRequest','Required parameter requestParameters.exportTransactionsRequest was null or undefined when calling exportTransactions.');
62
+ }
63
+
64
+ const queryParameters: any = {};
65
+
66
+ if (requestParameters.project !== undefined) {
67
+ queryParameters['project'] = requestParameters.project;
68
+ }
69
+
70
+ const headerParameters: runtime.HTTPHeaders = {};
71
+
72
+ headerParameters['Content-Type'] = 'application/json';
73
+
74
+ if (this.configuration && this.configuration.accessToken) {
75
+ // oauth required
76
+ headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
77
+ }
78
+
79
+ if (this.configuration && this.configuration.apiKey) {
80
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
81
+ }
82
+
83
+ const response = await this.request({
84
+ path: `/v1/gfn/transactions/export`,
85
+ method: 'POST',
86
+ headers: headerParameters,
87
+ query: queryParameters,
88
+ body: ExportTransactionsRequestToJSON(requestParameters.exportTransactionsRequest),
89
+ }, initOverrides);
90
+
91
+ return new runtime.BlobApiResponse(response);
92
+ }
93
+
94
+ /**
95
+ * Exports all GFN transactions available to the project
96
+ * Export GFN transactions
97
+ */
98
+ async exportTransactions(
99
+ project: string, exportTransactionsRequest: ExportTransactionsRequest,
100
+ initOverrides?: RequestInit | runtime.InitOverrideFunction
101
+ ): Promise<Blob> {
102
+ const response = await this.exportTransactionsRaw(
103
+ {
104
+ project: project,exportTransactionsRequest: exportTransactionsRequest,
105
+ },
106
+ initOverrides
107
+ );
108
+
109
+ return await response.value();
110
+ }
111
+
112
+ /**
113
+ * Lists all GFN transactions available to the project
114
+ * List GFN transactions
115
+ */
116
+ async listTransactionsRaw(requestParameters: ListTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListTransactions200Response>> {
117
+ if (requestParameters.project === null || requestParameters.project === undefined) {
118
+ throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling listTransactions.');
119
+ }
120
+
121
+ const queryParameters: any = {};
122
+
123
+ if (requestParameters.project !== undefined) {
124
+ queryParameters['project'] = requestParameters.project;
125
+ }
126
+
127
+ if (requestParameters.pageToken !== undefined) {
128
+ queryParameters['pageToken'] = requestParameters.pageToken;
129
+ }
130
+
131
+ if (requestParameters.pageSize !== undefined) {
132
+ queryParameters['pageSize'] = requestParameters.pageSize;
133
+ }
134
+
135
+ if (requestParameters.statementId !== undefined) {
136
+ queryParameters['statementId'] = requestParameters.statementId;
137
+ }
138
+
139
+ const headerParameters: runtime.HTTPHeaders = {};
140
+
141
+ if (this.configuration && this.configuration.accessToken) {
142
+ // oauth required
143
+ headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
144
+ }
145
+
146
+ if (this.configuration && this.configuration.apiKey) {
147
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
148
+ }
149
+
150
+ const response = await this.request({
151
+ path: `/v1/gfn/transactions`,
152
+ method: 'GET',
153
+ headers: headerParameters,
154
+ query: queryParameters,
155
+ }, initOverrides);
156
+
157
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListTransactions200ResponseFromJSON(jsonValue));
158
+ }
159
+
160
+ /**
161
+ * Lists all GFN transactions available to the project
162
+ * List GFN transactions
163
+ */
164
+ async listTransactions(
165
+ project: string,
166
+ optionalParameters: runtime.OptionalOnly<ListTransactionsRequest> = {},
167
+ initOverrides?: RequestInit | runtime.InitOverrideFunction
168
+ ): Promise<ListTransactions200Response> {
169
+ const response = await this.listTransactionsRaw(
170
+ {
171
+ project: project,
172
+ ...optionalParameters,
173
+ },
174
+ initOverrides
175
+ );
176
+
177
+ return await response.value();
178
+ }
179
+
180
+ }
@@ -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.3.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).
@@ -16,6 +16,7 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  ApiError,
19
+ ApiValidationError,
19
20
  StockResponse,
20
21
  Variant,
21
22
  VariantStock,
@@ -24,6 +25,8 @@ import type {
24
25
  import {
25
26
  ApiErrorFromJSON,
26
27
  ApiErrorToJSON,
28
+ ApiValidationErrorFromJSON,
29
+ ApiValidationErrorToJSON,
27
30
  StockResponseFromJSON,
28
31
  StockResponseToJSON,
29
32
  VariantFromJSON,
package/src/apis/index.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export * from './ProductsApi';
4
+ export * from './StatementsApi';
5
+ export * from './TransactionsApi';
4
6
  export * from './VariantsApi';
@@ -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.3.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).
@@ -36,8 +36,8 @@ export interface ApiError {
36
36
  /**
37
37
  * Check if a given object implements the ApiError interface.
38
38
  */
39
- export function instanceOfApiError(value: object): boolean {
40
- if (!('message' in value)) return false;
39
+ export function instanceOfApiError(value: object): value is ApiError {
40
+ if (!('message' in value) || value['message'] === undefined) return false;
41
41
  return true;
42
42
  }
43
43
 
@@ -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 ApiValidationError
20
+ */
21
+ export interface ApiValidationError {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ApiValidationError
26
+ */
27
+ message: string;
28
+ /**
29
+ *
30
+ * @type {{ [key: string]: Array<string>; }}
31
+ * @memberof ApiValidationError
32
+ */
33
+ errors: { [key: string]: Array<string>; };
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the ApiValidationError interface.
38
+ */
39
+ export function instanceOfApiValidationError(value: object): value is ApiValidationError {
40
+ if (!('message' in value) || value['message'] === undefined) return false;
41
+ if (!('errors' in value) || value['errors'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function ApiValidationErrorFromJSON(json: any): ApiValidationError {
46
+ return ApiValidationErrorFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function ApiValidationErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiValidationError {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'message': json['message'],
56
+ 'errors': json['errors'],
57
+ };
58
+ }
59
+
60
+ export function ApiValidationErrorToJSON(value?: ApiValidationError | null): any {
61
+ if (value == null) {
62
+ return value;
63
+ }
64
+ return {
65
+
66
+ 'message': value['message'],
67
+ 'errors': value['errors'],
68
+ };
69
+ }
70
+
@@ -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.3.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).
@@ -55,9 +55,9 @@ export interface Attribute {
55
55
  /**
56
56
  * Check if a given object implements the Attribute interface.
57
57
  */
58
- export function instanceOfAttribute(value: object): boolean {
59
- if (!('name' in value)) return false;
60
- if (!('value' in value)) return false;
58
+ export function instanceOfAttribute(value: object): value is Attribute {
59
+ if (!('name' in value) || value['name'] === undefined) return false;
60
+ if (!('value' in value) || value['value'] === undefined) return false;
61
61
  return true;
62
62
  }
63
63
 
@@ -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.3.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.3.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.3.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.3.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