@teemill/gfn-catalog 1.3.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +7 -19
- package/.openapi-generator/VERSION +1 -1
- package/README.md +3 -3
- package/api.ts +1646 -0
- package/base.ts +86 -0
- package/common.ts +150 -0
- package/configuration.ts +110 -0
- package/dist/api.d.ts +1074 -0
- package/dist/api.js +1014 -0
- package/dist/base.d.ts +66 -0
- package/dist/base.js +65 -0
- package/dist/common.d.ts +65 -0
- package/dist/common.js +161 -0
- package/dist/configuration.d.ts +91 -0
- package/dist/configuration.js +43 -0
- package/dist/esm/api.d.ts +1074 -0
- package/dist/esm/api.js +995 -0
- package/dist/esm/base.d.ts +66 -0
- package/dist/esm/{models/AttributeThumbnail.js → base.js} +38 -26
- package/dist/esm/common.d.ts +65 -0
- package/dist/esm/common.js +149 -0
- package/dist/esm/configuration.d.ts +91 -0
- package/dist/esm/configuration.js +39 -0
- package/dist/esm/index.d.ts +13 -3
- package/dist/esm/index.js +13 -3
- package/dist/index.d.ts +13 -3
- package/dist/index.js +15 -5
- package/git_push.sh +57 -0
- package/{dist/models/Stock.d.ts → index.ts} +8 -21
- package/package.json +15 -3
- package/tsconfig.json +4 -6
- package/dist/apis/ProductsApi.d.ts +0 -35
- package/dist/apis/ProductsApi.js +0 -85
- package/dist/apis/VariantsApi.d.ts +0 -82
- package/dist/apis/VariantsApi.js +0 -229
- package/dist/apis/index.d.ts +0 -2
- package/dist/apis/index.js +0 -20
- package/dist/esm/apis/ProductsApi.d.ts +0 -35
- package/dist/esm/apis/ProductsApi.js +0 -81
- package/dist/esm/apis/VariantsApi.d.ts +0 -82
- package/dist/esm/apis/VariantsApi.js +0 -225
- package/dist/esm/apis/index.d.ts +0 -2
- package/dist/esm/apis/index.js +0 -4
- package/dist/esm/models/ApiError.d.ts +0 -37
- package/dist/esm/models/ApiError.js +0 -42
- package/dist/esm/models/Attribute.d.ts +0 -50
- package/dist/esm/models/Attribute.js +0 -49
- package/dist/esm/models/AttributeThumbnail.d.ts +0 -46
- package/dist/esm/models/Image.d.ts +0 -67
- package/dist/esm/models/Image.js +0 -50
- package/dist/esm/models/Product.d.ts +0 -67
- package/dist/esm/models/Product.js +0 -52
- package/dist/esm/models/ProductsResponse.d.ts +0 -38
- package/dist/esm/models/ProductsResponse.js +0 -41
- package/dist/esm/models/Stock.d.ts +0 -31
- package/dist/esm/models/Stock.js +0 -38
- package/dist/esm/models/StockResponse.d.ts +0 -38
- package/dist/esm/models/StockResponse.js +0 -41
- package/dist/esm/models/Variant.d.ts +0 -78
- package/dist/esm/models/Variant.js +0 -61
- package/dist/esm/models/VariantManufacturerOrigin.d.ts +0 -37
- package/dist/esm/models/VariantManufacturerOrigin.js +0 -40
- package/dist/esm/models/VariantProduct.d.ts +0 -37
- package/dist/esm/models/VariantProduct.js +0 -40
- package/dist/esm/models/VariantStock.d.ts +0 -50
- package/dist/esm/models/VariantStock.js +0 -45
- package/dist/esm/models/VariantsResponse.d.ts +0 -38
- package/dist/esm/models/VariantsResponse.js +0 -41
- package/dist/esm/models/index.d.ts +0 -13
- package/dist/esm/models/index.js +0 -15
- package/dist/esm/runtime.d.ts +0 -187
- package/dist/esm/runtime.js +0 -333
- package/dist/models/ApiError.d.ts +0 -37
- package/dist/models/ApiError.js +0 -49
- package/dist/models/Attribute.d.ts +0 -50
- package/dist/models/Attribute.js +0 -56
- package/dist/models/AttributeThumbnail.d.ts +0 -46
- package/dist/models/AttributeThumbnail.js +0 -55
- package/dist/models/Image.d.ts +0 -67
- package/dist/models/Image.js +0 -57
- package/dist/models/Product.d.ts +0 -67
- package/dist/models/Product.js +0 -59
- package/dist/models/ProductsResponse.d.ts +0 -38
- package/dist/models/ProductsResponse.js +0 -48
- package/dist/models/Stock.js +0 -45
- package/dist/models/StockResponse.d.ts +0 -38
- package/dist/models/StockResponse.js +0 -48
- package/dist/models/Variant.d.ts +0 -78
- package/dist/models/Variant.js +0 -68
- package/dist/models/VariantManufacturerOrigin.d.ts +0 -37
- package/dist/models/VariantManufacturerOrigin.js +0 -47
- package/dist/models/VariantProduct.d.ts +0 -37
- package/dist/models/VariantProduct.js +0 -47
- package/dist/models/VariantStock.d.ts +0 -50
- package/dist/models/VariantStock.js +0 -52
- package/dist/models/VariantsResponse.d.ts +0 -38
- package/dist/models/VariantsResponse.js +0 -48
- package/dist/models/index.d.ts +0 -13
- package/dist/models/index.js +0 -31
- package/dist/runtime.d.ts +0 -187
- package/dist/runtime.js +0 -349
- package/src/apis/ProductsApi.ts +0 -113
- package/src/apis/VariantsApi.ts +0 -342
- package/src/apis/index.ts +0 -4
- package/src/index.ts +0 -5
- package/src/models/ApiError.ts +0 -69
- package/src/models/Attribute.ts +0 -93
- package/src/models/AttributeThumbnail.ts +0 -80
- package/src/models/Image.ts +0 -108
- package/src/models/Product.ts +0 -109
- package/src/models/ProductsResponse.ts +0 -75
- package/src/models/Stock.ts +0 -60
- package/src/models/StockResponse.ts +0 -75
- package/src/models/Variant.ts +0 -149
- package/src/models/VariantManufacturerOrigin.ts +0 -68
- package/src/models/VariantProduct.ts +0 -68
- package/src/models/VariantStock.ts +0 -91
- package/src/models/VariantsResponse.ts +0 -75
- package/src/models/index.ts +0 -15
- package/src/runtime.ts +0 -441
package/src/apis/VariantsApi.ts
DELETED
|
@@ -1,342 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* GFN Catalog API
|
|
5
|
-
* Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 1.3.0
|
|
8
|
-
* Contact: hello@teemill.com
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import * as runtime from '../runtime';
|
|
17
|
-
import type {
|
|
18
|
-
ApiError,
|
|
19
|
-
StockResponse,
|
|
20
|
-
Variant,
|
|
21
|
-
VariantStock,
|
|
22
|
-
VariantsResponse,
|
|
23
|
-
} from '../models/index';
|
|
24
|
-
import {
|
|
25
|
-
ApiErrorFromJSON,
|
|
26
|
-
ApiErrorToJSON,
|
|
27
|
-
StockResponseFromJSON,
|
|
28
|
-
StockResponseToJSON,
|
|
29
|
-
VariantFromJSON,
|
|
30
|
-
VariantToJSON,
|
|
31
|
-
VariantStockFromJSON,
|
|
32
|
-
VariantStockToJSON,
|
|
33
|
-
VariantsResponseFromJSON,
|
|
34
|
-
VariantsResponseToJSON,
|
|
35
|
-
} from '../models/index';
|
|
36
|
-
|
|
37
|
-
export interface GetStockRequest {
|
|
38
|
-
project: string;
|
|
39
|
-
variantId: string;
|
|
40
|
-
fulfillmentProjects?: string;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface GetVariantRequest {
|
|
44
|
-
project: string;
|
|
45
|
-
variantId: string;
|
|
46
|
-
fields?: string;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface ListStockRequest {
|
|
50
|
-
project: string;
|
|
51
|
-
fulfillmentProjects?: string;
|
|
52
|
-
pageToken?: number;
|
|
53
|
-
pageSize?: number;
|
|
54
|
-
search?: string;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface ListVariantsRequest {
|
|
58
|
-
project: string;
|
|
59
|
-
pageToken?: number;
|
|
60
|
-
pageSize?: number;
|
|
61
|
-
fields?: string;
|
|
62
|
-
search?: string;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
*
|
|
67
|
-
*/
|
|
68
|
-
export class VariantsApi extends runtime.BaseAPI {
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Gets the stock level for the GFN variant with the given ID.
|
|
72
|
-
* Get GFN variant stock
|
|
73
|
-
*/
|
|
74
|
-
async getStockRaw(requestParameters: GetStockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VariantStock>> {
|
|
75
|
-
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
76
|
-
throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling getStock.');
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
if (requestParameters.variantId === null || requestParameters.variantId === undefined) {
|
|
80
|
-
throw new runtime.RequiredError('variantId','Required parameter requestParameters.variantId was null or undefined when calling getStock.');
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
const queryParameters: any = {};
|
|
84
|
-
|
|
85
|
-
if (requestParameters.project !== undefined) {
|
|
86
|
-
queryParameters['project'] = requestParameters.project;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
if (requestParameters.fulfillmentProjects !== undefined) {
|
|
90
|
-
queryParameters['fulfillmentProjects'] = requestParameters.fulfillmentProjects;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
94
|
-
|
|
95
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
96
|
-
// oauth required
|
|
97
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
101
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
const response = await this.request({
|
|
105
|
-
path: `/v1/gfn/catalog/stock/{variantId}`.replace(`{${"variantId"}}`, encodeURIComponent(String(requestParameters.variantId))),
|
|
106
|
-
method: 'GET',
|
|
107
|
-
headers: headerParameters,
|
|
108
|
-
query: queryParameters,
|
|
109
|
-
}, initOverrides);
|
|
110
|
-
|
|
111
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => VariantStockFromJSON(jsonValue));
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Gets the stock level for the GFN variant with the given ID.
|
|
116
|
-
* Get GFN variant stock
|
|
117
|
-
*/
|
|
118
|
-
async getStock(
|
|
119
|
-
project: string, variantId: string,
|
|
120
|
-
optionalParameters: runtime.OptionalOnly<GetStockRequest> = {},
|
|
121
|
-
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
122
|
-
): Promise<VariantStock> {
|
|
123
|
-
const response = await this.getStockRaw(
|
|
124
|
-
{
|
|
125
|
-
project: project,variantId: variantId,
|
|
126
|
-
...optionalParameters,
|
|
127
|
-
},
|
|
128
|
-
initOverrides
|
|
129
|
-
);
|
|
130
|
-
|
|
131
|
-
return await response.value();
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Gets a GFN variant by the given ID.
|
|
136
|
-
* Get a GFN variant
|
|
137
|
-
*/
|
|
138
|
-
async getVariantRaw(requestParameters: GetVariantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Variant>> {
|
|
139
|
-
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
140
|
-
throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling getVariant.');
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
if (requestParameters.variantId === null || requestParameters.variantId === undefined) {
|
|
144
|
-
throw new runtime.RequiredError('variantId','Required parameter requestParameters.variantId was null or undefined when calling getVariant.');
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
const queryParameters: any = {};
|
|
148
|
-
|
|
149
|
-
if (requestParameters.project !== undefined) {
|
|
150
|
-
queryParameters['project'] = requestParameters.project;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
if (requestParameters.fields !== undefined) {
|
|
154
|
-
queryParameters['fields'] = requestParameters.fields;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
158
|
-
|
|
159
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
160
|
-
// oauth required
|
|
161
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
165
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
const response = await this.request({
|
|
169
|
-
path: `/v1/gfn/catalog/variants/{variantId}`.replace(`{${"variantId"}}`, encodeURIComponent(String(requestParameters.variantId))),
|
|
170
|
-
method: 'GET',
|
|
171
|
-
headers: headerParameters,
|
|
172
|
-
query: queryParameters,
|
|
173
|
-
}, initOverrides);
|
|
174
|
-
|
|
175
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => VariantFromJSON(jsonValue));
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* Gets a GFN variant by the given ID.
|
|
180
|
-
* Get a GFN variant
|
|
181
|
-
*/
|
|
182
|
-
async getVariant(
|
|
183
|
-
project: string, variantId: string,
|
|
184
|
-
optionalParameters: runtime.OptionalOnly<GetVariantRequest> = {},
|
|
185
|
-
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
186
|
-
): Promise<Variant> {
|
|
187
|
-
const response = await this.getVariantRaw(
|
|
188
|
-
{
|
|
189
|
-
project: project,variantId: variantId,
|
|
190
|
-
...optionalParameters,
|
|
191
|
-
},
|
|
192
|
-
initOverrides
|
|
193
|
-
);
|
|
194
|
-
|
|
195
|
-
return await response.value();
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* Lists the stock levels for all GFN variants available to the project.
|
|
200
|
-
* List GFN variant stock
|
|
201
|
-
*/
|
|
202
|
-
async listStockRaw(requestParameters: ListStockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StockResponse>> {
|
|
203
|
-
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
204
|
-
throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling listStock.');
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
const queryParameters: any = {};
|
|
208
|
-
|
|
209
|
-
if (requestParameters.project !== undefined) {
|
|
210
|
-
queryParameters['project'] = requestParameters.project;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
if (requestParameters.fulfillmentProjects !== undefined) {
|
|
214
|
-
queryParameters['fulfillmentProjects'] = requestParameters.fulfillmentProjects;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
if (requestParameters.pageToken !== undefined) {
|
|
218
|
-
queryParameters['pageToken'] = requestParameters.pageToken;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
if (requestParameters.pageSize !== undefined) {
|
|
222
|
-
queryParameters['pageSize'] = requestParameters.pageSize;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
if (requestParameters.search !== undefined) {
|
|
226
|
-
queryParameters['search'] = requestParameters.search;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
230
|
-
|
|
231
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
232
|
-
// oauth required
|
|
233
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
237
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
const response = await this.request({
|
|
241
|
-
path: `/v1/gfn/catalog/stock`,
|
|
242
|
-
method: 'GET',
|
|
243
|
-
headers: headerParameters,
|
|
244
|
-
query: queryParameters,
|
|
245
|
-
}, initOverrides);
|
|
246
|
-
|
|
247
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => StockResponseFromJSON(jsonValue));
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* Lists the stock levels for all GFN variants available to the project.
|
|
252
|
-
* List GFN variant stock
|
|
253
|
-
*/
|
|
254
|
-
async listStock(
|
|
255
|
-
project: string,
|
|
256
|
-
optionalParameters: runtime.OptionalOnly<ListStockRequest> = {},
|
|
257
|
-
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
258
|
-
): Promise<StockResponse> {
|
|
259
|
-
const response = await this.listStockRaw(
|
|
260
|
-
{
|
|
261
|
-
project: project,
|
|
262
|
-
...optionalParameters,
|
|
263
|
-
},
|
|
264
|
-
initOverrides
|
|
265
|
-
);
|
|
266
|
-
|
|
267
|
-
return await response.value();
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Lists all GFN variants available to the project. Can be filtered by product ID, SKU, and attribute values using the search parameter.
|
|
272
|
-
* List GFN variants
|
|
273
|
-
*/
|
|
274
|
-
async listVariantsRaw(requestParameters: ListVariantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VariantsResponse>> {
|
|
275
|
-
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
276
|
-
throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling listVariants.');
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
const queryParameters: any = {};
|
|
280
|
-
|
|
281
|
-
if (requestParameters.project !== undefined) {
|
|
282
|
-
queryParameters['project'] = requestParameters.project;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
if (requestParameters.pageToken !== undefined) {
|
|
286
|
-
queryParameters['pageToken'] = requestParameters.pageToken;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
if (requestParameters.pageSize !== undefined) {
|
|
290
|
-
queryParameters['pageSize'] = requestParameters.pageSize;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
if (requestParameters.fields !== undefined) {
|
|
294
|
-
queryParameters['fields'] = requestParameters.fields;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
if (requestParameters.search !== undefined) {
|
|
298
|
-
queryParameters['search'] = requestParameters.search;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
302
|
-
|
|
303
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
304
|
-
// oauth required
|
|
305
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
309
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
const response = await this.request({
|
|
313
|
-
path: `/v1/gfn/catalog/variants`,
|
|
314
|
-
method: 'GET',
|
|
315
|
-
headers: headerParameters,
|
|
316
|
-
query: queryParameters,
|
|
317
|
-
}, initOverrides);
|
|
318
|
-
|
|
319
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => VariantsResponseFromJSON(jsonValue));
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* Lists all GFN variants available to the project. Can be filtered by product ID, SKU, and attribute values using the search parameter.
|
|
324
|
-
* List GFN variants
|
|
325
|
-
*/
|
|
326
|
-
async listVariants(
|
|
327
|
-
project: string,
|
|
328
|
-
optionalParameters: runtime.OptionalOnly<ListVariantsRequest> = {},
|
|
329
|
-
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
330
|
-
): Promise<VariantsResponse> {
|
|
331
|
-
const response = await this.listVariantsRaw(
|
|
332
|
-
{
|
|
333
|
-
project: project,
|
|
334
|
-
...optionalParameters,
|
|
335
|
-
},
|
|
336
|
-
initOverrides
|
|
337
|
-
);
|
|
338
|
-
|
|
339
|
-
return await response.value();
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
}
|
package/src/apis/index.ts
DELETED
package/src/index.ts
DELETED
package/src/models/ApiError.ts
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* GFN Catalog API
|
|
5
|
-
* Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 1.3.0
|
|
8
|
-
* Contact: hello@teemill.com
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import { mapValues } from '../runtime';
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @export
|
|
19
|
-
* @interface ApiError
|
|
20
|
-
*/
|
|
21
|
-
export interface ApiError {
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @type {string}
|
|
25
|
-
* @memberof ApiError
|
|
26
|
-
*/
|
|
27
|
-
code?: string;
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
* @type {string}
|
|
31
|
-
* @memberof ApiError
|
|
32
|
-
*/
|
|
33
|
-
message: string;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Check if a given object implements the ApiError interface.
|
|
38
|
-
*/
|
|
39
|
-
export function instanceOfApiError(value: object): boolean {
|
|
40
|
-
if (!('message' in value)) return false;
|
|
41
|
-
return true;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export function ApiErrorFromJSON(json: any): ApiError {
|
|
45
|
-
return ApiErrorFromJSONTyped(json, false);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export function ApiErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiError {
|
|
49
|
-
if (json == null) {
|
|
50
|
-
return json;
|
|
51
|
-
}
|
|
52
|
-
return {
|
|
53
|
-
|
|
54
|
-
'code': json['code'] == null ? undefined : json['code'],
|
|
55
|
-
'message': json['message'],
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export function ApiErrorToJSON(value?: ApiError | null): any {
|
|
60
|
-
if (value == null) {
|
|
61
|
-
return value;
|
|
62
|
-
}
|
|
63
|
-
return {
|
|
64
|
-
|
|
65
|
-
'code': value['code'],
|
|
66
|
-
'message': value['message'],
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
|
package/src/models/Attribute.ts
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* GFN Catalog API
|
|
5
|
-
* Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 1.3.0
|
|
8
|
-
* Contact: hello@teemill.com
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import { mapValues } from '../runtime';
|
|
16
|
-
import type { AttributeThumbnail } from './AttributeThumbnail';
|
|
17
|
-
import {
|
|
18
|
-
AttributeThumbnailFromJSON,
|
|
19
|
-
AttributeThumbnailFromJSONTyped,
|
|
20
|
-
AttributeThumbnailToJSON,
|
|
21
|
-
} from './AttributeThumbnail';
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
*
|
|
25
|
-
* @export
|
|
26
|
-
* @interface Attribute
|
|
27
|
-
*/
|
|
28
|
-
export interface Attribute {
|
|
29
|
-
/**
|
|
30
|
-
* Attribute name
|
|
31
|
-
* @type {string}
|
|
32
|
-
* @memberof Attribute
|
|
33
|
-
*/
|
|
34
|
-
name: string;
|
|
35
|
-
/**
|
|
36
|
-
* Attribute value
|
|
37
|
-
* @type {string}
|
|
38
|
-
* @memberof Attribute
|
|
39
|
-
*/
|
|
40
|
-
value: string;
|
|
41
|
-
/**
|
|
42
|
-
*
|
|
43
|
-
* @type {AttributeThumbnail}
|
|
44
|
-
* @memberof Attribute
|
|
45
|
-
*/
|
|
46
|
-
thumbnail?: AttributeThumbnail;
|
|
47
|
-
/**
|
|
48
|
-
* Attribute tags
|
|
49
|
-
* @type {Array<string>}
|
|
50
|
-
* @memberof Attribute
|
|
51
|
-
*/
|
|
52
|
-
tags?: Array<string>;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Check if a given object implements the Attribute interface.
|
|
57
|
-
*/
|
|
58
|
-
export function instanceOfAttribute(value: object): boolean {
|
|
59
|
-
if (!('name' in value)) return false;
|
|
60
|
-
if (!('value' in value)) return false;
|
|
61
|
-
return true;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export function AttributeFromJSON(json: any): Attribute {
|
|
65
|
-
return AttributeFromJSONTyped(json, false);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export function AttributeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Attribute {
|
|
69
|
-
if (json == null) {
|
|
70
|
-
return json;
|
|
71
|
-
}
|
|
72
|
-
return {
|
|
73
|
-
|
|
74
|
-
'name': json['name'],
|
|
75
|
-
'value': json['value'],
|
|
76
|
-
'thumbnail': json['thumbnail'] == null ? undefined : AttributeThumbnailFromJSON(json['thumbnail']),
|
|
77
|
-
'tags': json['tags'] == null ? undefined : json['tags'],
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export function AttributeToJSON(value?: Attribute | null): any {
|
|
82
|
-
if (value == null) {
|
|
83
|
-
return value;
|
|
84
|
-
}
|
|
85
|
-
return {
|
|
86
|
-
|
|
87
|
-
'name': value['name'],
|
|
88
|
-
'value': value['value'],
|
|
89
|
-
'thumbnail': AttributeThumbnailToJSON(value['thumbnail']),
|
|
90
|
-
'tags': value['tags'],
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* GFN Catalog API
|
|
5
|
-
* Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 1.3.0
|
|
8
|
-
* Contact: hello@teemill.com
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import { mapValues } from '../runtime';
|
|
16
|
-
/**
|
|
17
|
-
* Attribute thumbnail
|
|
18
|
-
* @export
|
|
19
|
-
* @interface AttributeThumbnail
|
|
20
|
-
*/
|
|
21
|
-
export interface AttributeThumbnail {
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @type {string}
|
|
25
|
-
* @memberof AttributeThumbnail
|
|
26
|
-
*/
|
|
27
|
-
type?: AttributeThumbnailTypeEnum;
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
* @type {string}
|
|
31
|
-
* @memberof AttributeThumbnail
|
|
32
|
-
*/
|
|
33
|
-
value?: string;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* @export
|
|
39
|
-
*/
|
|
40
|
-
export const AttributeThumbnailTypeEnum = {
|
|
41
|
-
Text: 'text',
|
|
42
|
-
Color: 'color',
|
|
43
|
-
Image: 'image'
|
|
44
|
-
} as const;
|
|
45
|
-
export type AttributeThumbnailTypeEnum = typeof AttributeThumbnailTypeEnum[keyof typeof AttributeThumbnailTypeEnum];
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Check if a given object implements the AttributeThumbnail interface.
|
|
50
|
-
*/
|
|
51
|
-
export function instanceOfAttributeThumbnail(value: object): boolean {
|
|
52
|
-
return true;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export function AttributeThumbnailFromJSON(json: any): AttributeThumbnail {
|
|
56
|
-
return AttributeThumbnailFromJSONTyped(json, false);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export function AttributeThumbnailFromJSONTyped(json: any, ignoreDiscriminator: boolean): AttributeThumbnail {
|
|
60
|
-
if (json == null) {
|
|
61
|
-
return json;
|
|
62
|
-
}
|
|
63
|
-
return {
|
|
64
|
-
|
|
65
|
-
'type': json['type'] == null ? undefined : json['type'],
|
|
66
|
-
'value': json['value'] == null ? undefined : json['value'],
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export function AttributeThumbnailToJSON(value?: AttributeThumbnail | null): any {
|
|
71
|
-
if (value == null) {
|
|
72
|
-
return value;
|
|
73
|
-
}
|
|
74
|
-
return {
|
|
75
|
-
|
|
76
|
-
'type': value['type'],
|
|
77
|
-
'value': value['value'],
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
|