@teemill/gfn-catalog 1.2.0 → 1.3.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 (92) hide show
  1. package/.openapi-generator/FILES +1 -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/VariantsApi.d.ts +19 -2
  7. package/dist/apis/VariantsApi.js +170 -245
  8. package/dist/esm/apis/ProductsApi.d.ts +35 -0
  9. package/dist/esm/apis/ProductsApi.js +81 -0
  10. package/dist/esm/apis/VariantsApi.d.ts +82 -0
  11. package/dist/esm/apis/VariantsApi.js +225 -0
  12. package/dist/esm/apis/index.d.ts +2 -0
  13. package/dist/esm/apis/index.js +4 -0
  14. package/dist/esm/index.d.ts +3 -0
  15. package/dist/esm/index.js +5 -0
  16. package/dist/esm/models/ApiError.d.ts +37 -0
  17. package/dist/esm/models/ApiError.js +42 -0
  18. package/dist/esm/models/Attribute.d.ts +50 -0
  19. package/dist/esm/models/Attribute.js +49 -0
  20. package/dist/esm/models/AttributeThumbnail.d.ts +46 -0
  21. package/dist/esm/models/AttributeThumbnail.js +48 -0
  22. package/dist/esm/models/Image.d.ts +67 -0
  23. package/dist/esm/models/Image.js +50 -0
  24. package/dist/esm/models/Product.d.ts +67 -0
  25. package/dist/esm/models/Product.js +52 -0
  26. package/dist/esm/models/ProductsResponse.d.ts +38 -0
  27. package/dist/esm/models/ProductsResponse.js +41 -0
  28. package/dist/esm/models/Stock.d.ts +31 -0
  29. package/dist/esm/models/Stock.js +38 -0
  30. package/dist/esm/models/StockResponse.d.ts +38 -0
  31. package/dist/esm/models/StockResponse.js +41 -0
  32. package/dist/esm/models/Variant.d.ts +78 -0
  33. package/dist/esm/models/Variant.js +61 -0
  34. package/dist/esm/models/VariantManufacturerOrigin.d.ts +37 -0
  35. package/dist/esm/models/VariantManufacturerOrigin.js +40 -0
  36. package/dist/esm/models/VariantProduct.d.ts +37 -0
  37. package/dist/esm/models/VariantProduct.js +40 -0
  38. package/dist/esm/models/VariantStock.d.ts +50 -0
  39. package/dist/esm/models/VariantStock.js +45 -0
  40. package/dist/esm/models/VariantsResponse.d.ts +38 -0
  41. package/dist/esm/models/VariantsResponse.js +41 -0
  42. package/dist/esm/models/index.d.ts +13 -0
  43. package/dist/esm/models/index.js +15 -0
  44. package/dist/esm/runtime.d.ts +187 -0
  45. package/dist/esm/runtime.js +333 -0
  46. package/dist/models/ApiError.d.ts +1 -1
  47. package/dist/models/ApiError.js +1 -1
  48. package/dist/models/Attribute.d.ts +1 -1
  49. package/dist/models/Attribute.js +2 -2
  50. package/dist/models/AttributeThumbnail.d.ts +1 -1
  51. package/dist/models/AttributeThumbnail.js +1 -1
  52. package/dist/models/Image.d.ts +1 -1
  53. package/dist/models/Image.js +1 -1
  54. package/dist/models/Product.d.ts +1 -1
  55. package/dist/models/Product.js +1 -1
  56. package/dist/models/ProductsResponse.d.ts +1 -1
  57. package/dist/models/ProductsResponse.js +2 -2
  58. package/dist/models/Stock.d.ts +1 -1
  59. package/dist/models/Stock.js +1 -1
  60. package/dist/models/StockResponse.d.ts +1 -1
  61. package/dist/models/StockResponse.js +2 -2
  62. package/dist/models/Variant.d.ts +1 -1
  63. package/dist/models/Variant.js +6 -6
  64. package/dist/models/VariantManufacturerOrigin.d.ts +1 -1
  65. package/dist/models/VariantManufacturerOrigin.js +1 -1
  66. package/dist/models/VariantProduct.d.ts +1 -1
  67. package/dist/models/VariantProduct.js +1 -1
  68. package/dist/models/VariantStock.d.ts +1 -1
  69. package/dist/models/VariantStock.js +2 -2
  70. package/dist/models/VariantsResponse.d.ts +1 -1
  71. package/dist/models/VariantsResponse.js +2 -2
  72. package/dist/runtime.d.ts +1 -1
  73. package/dist/runtime.js +223 -439
  74. package/package.json +4 -2
  75. package/src/apis/ProductsApi.ts +1 -1
  76. package/src/apis/VariantsApi.ts +84 -1
  77. package/src/models/ApiError.ts +1 -1
  78. package/src/models/Attribute.ts +1 -1
  79. package/src/models/AttributeThumbnail.ts +1 -1
  80. package/src/models/Image.ts +1 -1
  81. package/src/models/Product.ts +1 -1
  82. package/src/models/ProductsResponse.ts +1 -1
  83. package/src/models/Stock.ts +1 -1
  84. package/src/models/StockResponse.ts +1 -1
  85. package/src/models/Variant.ts +1 -1
  86. package/src/models/VariantManufacturerOrigin.ts +1 -1
  87. package/src/models/VariantProduct.ts +1 -1
  88. package/src/models/VariantStock.ts +1 -1
  89. package/src/models/VariantsResponse.ts +1 -1
  90. package/src/runtime.ts +1 -1
  91. package/tsconfig.esm.json +7 -0
  92. package/tsconfig.json +2 -2
@@ -0,0 +1,82 @@
1
+ /**
2
+ * GFN Catalog API
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 1.3.0
6
+ * Contact: hello@teemill.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { StockResponse, Variant, VariantStock, VariantsResponse } from '../models/index';
14
+ export interface GetStockRequest {
15
+ project: string;
16
+ variantId: string;
17
+ fulfillmentProjects?: string;
18
+ }
19
+ export interface GetVariantRequest {
20
+ project: string;
21
+ variantId: string;
22
+ fields?: string;
23
+ }
24
+ export interface ListStockRequest {
25
+ project: string;
26
+ fulfillmentProjects?: string;
27
+ pageToken?: number;
28
+ pageSize?: number;
29
+ search?: string;
30
+ }
31
+ export interface ListVariantsRequest {
32
+ project: string;
33
+ pageToken?: number;
34
+ pageSize?: number;
35
+ fields?: string;
36
+ search?: string;
37
+ }
38
+ /**
39
+ *
40
+ */
41
+ export declare class VariantsApi extends runtime.BaseAPI {
42
+ /**
43
+ * Gets the stock level for the GFN variant with the given ID.
44
+ * Get GFN variant stock
45
+ */
46
+ getStockRaw(requestParameters: GetStockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VariantStock>>;
47
+ /**
48
+ * Gets the stock level for the GFN variant with the given ID.
49
+ * Get GFN variant stock
50
+ */
51
+ getStock(project: string, variantId: string, optionalParameters?: runtime.OptionalOnly<GetStockRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VariantStock>;
52
+ /**
53
+ * Gets a GFN variant by the given ID.
54
+ * Get a GFN variant
55
+ */
56
+ getVariantRaw(requestParameters: GetVariantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Variant>>;
57
+ /**
58
+ * Gets a GFN variant by the given ID.
59
+ * Get a GFN variant
60
+ */
61
+ getVariant(project: string, variantId: string, optionalParameters?: runtime.OptionalOnly<GetVariantRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Variant>;
62
+ /**
63
+ * Lists the stock levels for all GFN variants available to the project.
64
+ * List GFN variant stock
65
+ */
66
+ listStockRaw(requestParameters: ListStockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StockResponse>>;
67
+ /**
68
+ * Lists the stock levels for all GFN variants available to the project.
69
+ * List GFN variant stock
70
+ */
71
+ listStock(project: string, optionalParameters?: runtime.OptionalOnly<ListStockRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StockResponse>;
72
+ /**
73
+ * Lists all GFN variants available to the project. Can be filtered by product ID, SKU, and attribute values using the search parameter.
74
+ * List GFN variants
75
+ */
76
+ listVariantsRaw(requestParameters: ListVariantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VariantsResponse>>;
77
+ /**
78
+ * Lists all GFN variants available to the project. Can be filtered by product ID, SKU, and attribute values using the search parameter.
79
+ * List GFN variants
80
+ */
81
+ listVariants(project: string, optionalParameters?: runtime.OptionalOnly<ListVariantsRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VariantsResponse>;
82
+ }
@@ -0,0 +1,225 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GFN Catalog API
5
+ * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
6
+ *
7
+ * The version of the OpenAPI document: 1.3.0
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime';
24
+ import { StockResponseFromJSON, VariantFromJSON, VariantStockFromJSON, VariantsResponseFromJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class VariantsApi extends runtime.BaseAPI {
29
+ /**
30
+ * Gets the stock level for the GFN variant with the given ID.
31
+ * Get GFN variant stock
32
+ */
33
+ getStockRaw(requestParameters, initOverrides) {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ if (requestParameters.project === null || requestParameters.project === undefined) {
36
+ throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling getStock.');
37
+ }
38
+ if (requestParameters.variantId === null || requestParameters.variantId === undefined) {
39
+ throw new runtime.RequiredError('variantId', 'Required parameter requestParameters.variantId was null or undefined when calling getStock.');
40
+ }
41
+ const queryParameters = {};
42
+ if (requestParameters.project !== undefined) {
43
+ queryParameters['project'] = requestParameters.project;
44
+ }
45
+ if (requestParameters.fulfillmentProjects !== undefined) {
46
+ queryParameters['fulfillmentProjects'] = requestParameters.fulfillmentProjects;
47
+ }
48
+ const headerParameters = {};
49
+ if (this.configuration && this.configuration.accessToken) {
50
+ // oauth required
51
+ headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
52
+ }
53
+ if (this.configuration && this.configuration.apiKey) {
54
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
55
+ }
56
+ const response = yield this.request({
57
+ path: `/v1/gfn/catalog/stock/{variantId}`.replace(`{${"variantId"}}`, encodeURIComponent(String(requestParameters.variantId))),
58
+ method: 'GET',
59
+ headers: headerParameters,
60
+ query: queryParameters,
61
+ }, initOverrides);
62
+ return new runtime.JSONApiResponse(response, (jsonValue) => VariantStockFromJSON(jsonValue));
63
+ });
64
+ }
65
+ /**
66
+ * Gets the stock level for the GFN variant with the given ID.
67
+ * Get GFN variant stock
68
+ */
69
+ getStock(project, variantId, optionalParameters = {}, initOverrides) {
70
+ return __awaiter(this, void 0, void 0, function* () {
71
+ const response = yield this.getStockRaw(Object.assign({ project: project, variantId: variantId }, optionalParameters), initOverrides);
72
+ return yield response.value();
73
+ });
74
+ }
75
+ /**
76
+ * Gets a GFN variant by the given ID.
77
+ * Get a GFN variant
78
+ */
79
+ getVariantRaw(requestParameters, initOverrides) {
80
+ return __awaiter(this, void 0, void 0, function* () {
81
+ if (requestParameters.project === null || requestParameters.project === undefined) {
82
+ throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling getVariant.');
83
+ }
84
+ if (requestParameters.variantId === null || requestParameters.variantId === undefined) {
85
+ throw new runtime.RequiredError('variantId', 'Required parameter requestParameters.variantId was null or undefined when calling getVariant.');
86
+ }
87
+ const queryParameters = {};
88
+ if (requestParameters.project !== undefined) {
89
+ queryParameters['project'] = requestParameters.project;
90
+ }
91
+ if (requestParameters.fields !== undefined) {
92
+ queryParameters['fields'] = requestParameters.fields;
93
+ }
94
+ const headerParameters = {};
95
+ if (this.configuration && this.configuration.accessToken) {
96
+ // oauth required
97
+ headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
98
+ }
99
+ if (this.configuration && this.configuration.apiKey) {
100
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
101
+ }
102
+ const response = yield this.request({
103
+ path: `/v1/gfn/catalog/variants/{variantId}`.replace(`{${"variantId"}}`, encodeURIComponent(String(requestParameters.variantId))),
104
+ method: 'GET',
105
+ headers: headerParameters,
106
+ query: queryParameters,
107
+ }, initOverrides);
108
+ return new runtime.JSONApiResponse(response, (jsonValue) => VariantFromJSON(jsonValue));
109
+ });
110
+ }
111
+ /**
112
+ * Gets a GFN variant by the given ID.
113
+ * Get a GFN variant
114
+ */
115
+ getVariant(project, variantId, optionalParameters = {}, initOverrides) {
116
+ return __awaiter(this, void 0, void 0, function* () {
117
+ const response = yield this.getVariantRaw(Object.assign({ project: project, variantId: variantId }, optionalParameters), initOverrides);
118
+ return yield response.value();
119
+ });
120
+ }
121
+ /**
122
+ * Lists the stock levels for all GFN variants available to the project.
123
+ * List GFN variant stock
124
+ */
125
+ listStockRaw(requestParameters, initOverrides) {
126
+ return __awaiter(this, void 0, void 0, function* () {
127
+ if (requestParameters.project === null || requestParameters.project === undefined) {
128
+ throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling listStock.');
129
+ }
130
+ const queryParameters = {};
131
+ if (requestParameters.project !== undefined) {
132
+ queryParameters['project'] = requestParameters.project;
133
+ }
134
+ if (requestParameters.fulfillmentProjects !== undefined) {
135
+ queryParameters['fulfillmentProjects'] = requestParameters.fulfillmentProjects;
136
+ }
137
+ if (requestParameters.pageToken !== undefined) {
138
+ queryParameters['pageToken'] = requestParameters.pageToken;
139
+ }
140
+ if (requestParameters.pageSize !== undefined) {
141
+ queryParameters['pageSize'] = requestParameters.pageSize;
142
+ }
143
+ if (requestParameters.search !== undefined) {
144
+ queryParameters['search'] = requestParameters.search;
145
+ }
146
+ const headerParameters = {};
147
+ if (this.configuration && this.configuration.accessToken) {
148
+ // oauth required
149
+ headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
150
+ }
151
+ if (this.configuration && this.configuration.apiKey) {
152
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
153
+ }
154
+ const response = yield this.request({
155
+ path: `/v1/gfn/catalog/stock`,
156
+ method: 'GET',
157
+ headers: headerParameters,
158
+ query: queryParameters,
159
+ }, initOverrides);
160
+ return new runtime.JSONApiResponse(response, (jsonValue) => StockResponseFromJSON(jsonValue));
161
+ });
162
+ }
163
+ /**
164
+ * Lists the stock levels for all GFN variants available to the project.
165
+ * List GFN variant stock
166
+ */
167
+ listStock(project, optionalParameters = {}, initOverrides) {
168
+ return __awaiter(this, void 0, void 0, function* () {
169
+ const response = yield this.listStockRaw(Object.assign({ project: project }, optionalParameters), initOverrides);
170
+ return yield response.value();
171
+ });
172
+ }
173
+ /**
174
+ * Lists all GFN variants available to the project. Can be filtered by product ID, SKU, and attribute values using the search parameter.
175
+ * List GFN variants
176
+ */
177
+ listVariantsRaw(requestParameters, initOverrides) {
178
+ return __awaiter(this, void 0, void 0, function* () {
179
+ if (requestParameters.project === null || requestParameters.project === undefined) {
180
+ throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling listVariants.');
181
+ }
182
+ const queryParameters = {};
183
+ if (requestParameters.project !== undefined) {
184
+ queryParameters['project'] = requestParameters.project;
185
+ }
186
+ if (requestParameters.pageToken !== undefined) {
187
+ queryParameters['pageToken'] = requestParameters.pageToken;
188
+ }
189
+ if (requestParameters.pageSize !== undefined) {
190
+ queryParameters['pageSize'] = requestParameters.pageSize;
191
+ }
192
+ if (requestParameters.fields !== undefined) {
193
+ queryParameters['fields'] = requestParameters.fields;
194
+ }
195
+ if (requestParameters.search !== undefined) {
196
+ queryParameters['search'] = requestParameters.search;
197
+ }
198
+ const headerParameters = {};
199
+ if (this.configuration && this.configuration.accessToken) {
200
+ // oauth required
201
+ headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
202
+ }
203
+ if (this.configuration && this.configuration.apiKey) {
204
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
205
+ }
206
+ const response = yield this.request({
207
+ path: `/v1/gfn/catalog/variants`,
208
+ method: 'GET',
209
+ headers: headerParameters,
210
+ query: queryParameters,
211
+ }, initOverrides);
212
+ return new runtime.JSONApiResponse(response, (jsonValue) => VariantsResponseFromJSON(jsonValue));
213
+ });
214
+ }
215
+ /**
216
+ * Lists all GFN variants available to the project. Can be filtered by product ID, SKU, and attribute values using the search parameter.
217
+ * List GFN variants
218
+ */
219
+ listVariants(project, optionalParameters = {}, initOverrides) {
220
+ return __awaiter(this, void 0, void 0, function* () {
221
+ const response = yield this.listVariantsRaw(Object.assign({ project: project }, optionalParameters), initOverrides);
222
+ return yield response.value();
223
+ });
224
+ }
225
+ }
@@ -0,0 +1,2 @@
1
+ export * from './ProductsApi';
2
+ export * from './VariantsApi';
@@ -0,0 +1,4 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './ProductsApi';
4
+ export * from './VariantsApi';
@@ -0,0 +1,3 @@
1
+ export * from './runtime';
2
+ export * from './apis/index';
3
+ export * from './models/index';
@@ -0,0 +1,5 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './runtime';
4
+ export * from './apis/index';
5
+ export * from './models/index';
@@ -0,0 +1,37 @@
1
+ /**
2
+ * GFN Catalog API
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 1.3.0
6
+ * Contact: hello@teemill.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface ApiError
16
+ */
17
+ export interface ApiError {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof ApiError
22
+ */
23
+ code?: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof ApiError
28
+ */
29
+ message: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the ApiError interface.
33
+ */
34
+ export declare function instanceOfApiError(value: object): boolean;
35
+ export declare function ApiErrorFromJSON(json: any): ApiError;
36
+ export declare function ApiErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiError;
37
+ export declare function ApiErrorToJSON(value?: ApiError | null): any;
@@ -0,0 +1,42 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GFN Catalog API
5
+ * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
6
+ *
7
+ * The version of the OpenAPI document: 1.3.0
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Check if a given object implements the ApiError interface.
16
+ */
17
+ export function instanceOfApiError(value) {
18
+ if (!('message' in value))
19
+ return false;
20
+ return true;
21
+ }
22
+ export function ApiErrorFromJSON(json) {
23
+ return ApiErrorFromJSONTyped(json, false);
24
+ }
25
+ export function ApiErrorFromJSONTyped(json, ignoreDiscriminator) {
26
+ if (json == null) {
27
+ return json;
28
+ }
29
+ return {
30
+ 'code': json['code'] == null ? undefined : json['code'],
31
+ 'message': json['message'],
32
+ };
33
+ }
34
+ export function ApiErrorToJSON(value) {
35
+ if (value == null) {
36
+ return value;
37
+ }
38
+ return {
39
+ 'code': value['code'],
40
+ 'message': value['message'],
41
+ };
42
+ }
@@ -0,0 +1,50 @@
1
+ /**
2
+ * GFN Catalog API
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 1.3.0
6
+ * Contact: hello@teemill.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { AttributeThumbnail } from './AttributeThumbnail';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface Attribute
17
+ */
18
+ export interface Attribute {
19
+ /**
20
+ * Attribute name
21
+ * @type {string}
22
+ * @memberof Attribute
23
+ */
24
+ name: string;
25
+ /**
26
+ * Attribute value
27
+ * @type {string}
28
+ * @memberof Attribute
29
+ */
30
+ value: string;
31
+ /**
32
+ *
33
+ * @type {AttributeThumbnail}
34
+ * @memberof Attribute
35
+ */
36
+ thumbnail?: AttributeThumbnail;
37
+ /**
38
+ * Attribute tags
39
+ * @type {Array<string>}
40
+ * @memberof Attribute
41
+ */
42
+ tags?: Array<string>;
43
+ }
44
+ /**
45
+ * Check if a given object implements the Attribute interface.
46
+ */
47
+ export declare function instanceOfAttribute(value: object): boolean;
48
+ export declare function AttributeFromJSON(json: any): Attribute;
49
+ export declare function AttributeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Attribute;
50
+ export declare function AttributeToJSON(value?: Attribute | null): any;
@@ -0,0 +1,49 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GFN Catalog API
5
+ * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
6
+ *
7
+ * The version of the OpenAPI document: 1.3.0
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import { AttributeThumbnailFromJSON, AttributeThumbnailToJSON, } from './AttributeThumbnail';
15
+ /**
16
+ * Check if a given object implements the Attribute interface.
17
+ */
18
+ export function instanceOfAttribute(value) {
19
+ if (!('name' in value))
20
+ return false;
21
+ if (!('value' in value))
22
+ return false;
23
+ return true;
24
+ }
25
+ export function AttributeFromJSON(json) {
26
+ return AttributeFromJSONTyped(json, false);
27
+ }
28
+ export function AttributeFromJSONTyped(json, ignoreDiscriminator) {
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'name': json['name'],
34
+ 'value': json['value'],
35
+ 'thumbnail': json['thumbnail'] == null ? undefined : AttributeThumbnailFromJSON(json['thumbnail']),
36
+ 'tags': json['tags'] == null ? undefined : json['tags'],
37
+ };
38
+ }
39
+ export function AttributeToJSON(value) {
40
+ if (value == null) {
41
+ return value;
42
+ }
43
+ return {
44
+ 'name': value['name'],
45
+ 'value': value['value'],
46
+ 'thumbnail': AttributeThumbnailToJSON(value['thumbnail']),
47
+ 'tags': value['tags'],
48
+ };
49
+ }
@@ -0,0 +1,46 @@
1
+ /**
2
+ * GFN Catalog API
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 1.3.0
6
+ * Contact: hello@teemill.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Attribute thumbnail
14
+ * @export
15
+ * @interface AttributeThumbnail
16
+ */
17
+ export interface AttributeThumbnail {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof AttributeThumbnail
22
+ */
23
+ type?: AttributeThumbnailTypeEnum;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof AttributeThumbnail
28
+ */
29
+ value?: string;
30
+ }
31
+ /**
32
+ * @export
33
+ */
34
+ export declare const AttributeThumbnailTypeEnum: {
35
+ readonly Text: "text";
36
+ readonly Color: "color";
37
+ readonly Image: "image";
38
+ };
39
+ export type AttributeThumbnailTypeEnum = typeof AttributeThumbnailTypeEnum[keyof typeof AttributeThumbnailTypeEnum];
40
+ /**
41
+ * Check if a given object implements the AttributeThumbnail interface.
42
+ */
43
+ export declare function instanceOfAttributeThumbnail(value: object): boolean;
44
+ export declare function AttributeThumbnailFromJSON(json: any): AttributeThumbnail;
45
+ export declare function AttributeThumbnailFromJSONTyped(json: any, ignoreDiscriminator: boolean): AttributeThumbnail;
46
+ export declare function AttributeThumbnailToJSON(value?: AttributeThumbnail | null): any;
@@ -0,0 +1,48 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GFN Catalog API
5
+ * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
6
+ *
7
+ * The version of the OpenAPI document: 1.3.0
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * @export
16
+ */
17
+ export const AttributeThumbnailTypeEnum = {
18
+ Text: 'text',
19
+ Color: 'color',
20
+ Image: 'image'
21
+ };
22
+ /**
23
+ * Check if a given object implements the AttributeThumbnail interface.
24
+ */
25
+ export function instanceOfAttributeThumbnail(value) {
26
+ return true;
27
+ }
28
+ export function AttributeThumbnailFromJSON(json) {
29
+ return AttributeThumbnailFromJSONTyped(json, false);
30
+ }
31
+ export function AttributeThumbnailFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'type': json['type'] == null ? undefined : json['type'],
37
+ 'value': json['value'] == null ? undefined : json['value'],
38
+ };
39
+ }
40
+ export function AttributeThumbnailToJSON(value) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ return {
45
+ 'type': value['type'],
46
+ 'value': value['value'],
47
+ };
48
+ }