@teemill/gfn-catalog 1.1.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.
- package/.openapi-generator/FILES +4 -0
- package/.openapi-generator/VERSION +1 -1
- package/README.md +2 -2
- package/dist/apis/ProductsApi.d.ts +1 -1
- package/dist/apis/ProductsApi.js +47 -128
- package/dist/apis/VariantsApi.d.ts +34 -2
- package/dist/apis/VariantsApi.js +180 -186
- package/dist/esm/apis/ProductsApi.d.ts +35 -0
- package/dist/esm/apis/ProductsApi.js +81 -0
- package/dist/esm/apis/VariantsApi.d.ts +82 -0
- package/dist/esm/apis/VariantsApi.js +225 -0
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +4 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/models/ApiError.d.ts +37 -0
- package/dist/esm/models/ApiError.js +42 -0
- package/dist/esm/models/Attribute.d.ts +50 -0
- package/dist/esm/models/Attribute.js +49 -0
- package/dist/esm/models/AttributeThumbnail.d.ts +46 -0
- package/dist/esm/models/AttributeThumbnail.js +48 -0
- package/dist/esm/models/Image.d.ts +67 -0
- package/dist/esm/models/Image.js +50 -0
- package/dist/esm/models/Product.d.ts +67 -0
- package/dist/esm/models/Product.js +52 -0
- package/dist/esm/models/ProductsResponse.d.ts +38 -0
- package/dist/esm/models/ProductsResponse.js +41 -0
- package/dist/esm/models/Stock.d.ts +31 -0
- package/dist/esm/models/Stock.js +38 -0
- package/dist/esm/models/StockResponse.d.ts +38 -0
- package/dist/esm/models/StockResponse.js +41 -0
- package/dist/esm/models/Variant.d.ts +78 -0
- package/dist/esm/models/Variant.js +61 -0
- package/dist/esm/models/VariantManufacturerOrigin.d.ts +37 -0
- package/dist/esm/models/VariantManufacturerOrigin.js +40 -0
- package/dist/esm/models/VariantProduct.d.ts +37 -0
- package/dist/esm/models/VariantProduct.js +40 -0
- package/dist/esm/models/VariantStock.d.ts +50 -0
- package/dist/esm/models/VariantStock.js +45 -0
- package/dist/esm/models/VariantsResponse.d.ts +38 -0
- package/dist/esm/models/VariantsResponse.js +41 -0
- package/dist/esm/models/index.d.ts +13 -0
- package/dist/esm/models/index.js +15 -0
- package/dist/esm/runtime.d.ts +187 -0
- package/dist/esm/runtime.js +333 -0
- package/dist/models/ApiError.d.ts +1 -1
- package/dist/models/ApiError.js +1 -1
- package/dist/models/Attribute.d.ts +1 -1
- package/dist/models/Attribute.js +2 -2
- package/dist/models/AttributeThumbnail.d.ts +1 -1
- package/dist/models/AttributeThumbnail.js +1 -1
- package/dist/models/Image.d.ts +1 -1
- package/dist/models/Image.js +1 -1
- package/dist/models/Product.d.ts +1 -1
- package/dist/models/Product.js +1 -1
- package/dist/models/ProductsResponse.d.ts +1 -1
- package/dist/models/ProductsResponse.js +2 -2
- package/dist/models/Stock.d.ts +31 -0
- package/dist/models/Stock.js +45 -0
- package/dist/models/StockResponse.d.ts +38 -0
- package/dist/models/StockResponse.js +48 -0
- package/dist/models/Variant.d.ts +11 -4
- package/dist/models/Variant.js +10 -7
- package/dist/models/VariantManufacturerOrigin.d.ts +37 -0
- package/dist/models/VariantManufacturerOrigin.js +47 -0
- package/dist/models/VariantProduct.d.ts +1 -1
- package/dist/models/VariantProduct.js +1 -1
- package/dist/models/VariantStock.d.ts +23 -4
- package/dist/models/VariantStock.js +10 -3
- package/dist/models/VariantsResponse.d.ts +1 -1
- package/dist/models/VariantsResponse.js +2 -2
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +223 -439
- package/package.json +4 -2
- package/src/apis/ProductsApi.ts +1 -1
- package/src/apis/VariantsApi.ts +157 -1
- package/src/models/ApiError.ts +1 -1
- package/src/models/Attribute.ts +1 -1
- package/src/models/AttributeThumbnail.ts +1 -1
- package/src/models/Image.ts +1 -1
- package/src/models/Product.ts +1 -1
- package/src/models/ProductsResponse.ts +1 -1
- package/src/models/Stock.ts +60 -0
- package/src/models/StockResponse.ts +75 -0
- package/src/models/Variant.ts +25 -11
- package/src/models/VariantManufacturerOrigin.ts +68 -0
- package/src/models/VariantProduct.ts +1 -1
- package/src/models/VariantStock.ts +37 -6
- package/src/models/VariantsResponse.ts +1 -1
- package/src/models/index.ts +3 -0
- package/src/runtime.ts +1 -1
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teemill/gfn-catalog",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "OpenAPI client for @teemill/gfn-catalog",
|
|
5
5
|
"author": "OpenAPI-Generator",
|
|
6
6
|
"repository": {
|
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
},
|
|
10
10
|
"main": "./dist/index.js",
|
|
11
11
|
"typings": "./dist/index.d.ts",
|
|
12
|
+
"module": "./dist/esm/index.js",
|
|
13
|
+
"sideEffects": false,
|
|
12
14
|
"scripts": {
|
|
13
|
-
"build": "tsc",
|
|
15
|
+
"build": "tsc && tsc -p tsconfig.esm.json",
|
|
14
16
|
"prepare": "npm run build"
|
|
15
17
|
},
|
|
16
18
|
"devDependencies": {
|
package/src/apis/ProductsApi.ts
CHANGED
|
@@ -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.
|
|
7
|
+
* The version of the OpenAPI document: 1.3.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/src/apis/VariantsApi.ts
CHANGED
|
@@ -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.
|
|
7
|
+
* The version of the OpenAPI document: 1.3.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,24 +16,44 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
ApiError,
|
|
19
|
+
StockResponse,
|
|
19
20
|
Variant,
|
|
21
|
+
VariantStock,
|
|
20
22
|
VariantsResponse,
|
|
21
23
|
} from '../models/index';
|
|
22
24
|
import {
|
|
23
25
|
ApiErrorFromJSON,
|
|
24
26
|
ApiErrorToJSON,
|
|
27
|
+
StockResponseFromJSON,
|
|
28
|
+
StockResponseToJSON,
|
|
25
29
|
VariantFromJSON,
|
|
26
30
|
VariantToJSON,
|
|
31
|
+
VariantStockFromJSON,
|
|
32
|
+
VariantStockToJSON,
|
|
27
33
|
VariantsResponseFromJSON,
|
|
28
34
|
VariantsResponseToJSON,
|
|
29
35
|
} from '../models/index';
|
|
30
36
|
|
|
37
|
+
export interface GetStockRequest {
|
|
38
|
+
project: string;
|
|
39
|
+
variantId: string;
|
|
40
|
+
fulfillmentProjects?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
31
43
|
export interface GetVariantRequest {
|
|
32
44
|
project: string;
|
|
33
45
|
variantId: string;
|
|
34
46
|
fields?: string;
|
|
35
47
|
}
|
|
36
48
|
|
|
49
|
+
export interface ListStockRequest {
|
|
50
|
+
project: string;
|
|
51
|
+
fulfillmentProjects?: string;
|
|
52
|
+
pageToken?: number;
|
|
53
|
+
pageSize?: number;
|
|
54
|
+
search?: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
37
57
|
export interface ListVariantsRequest {
|
|
38
58
|
project: string;
|
|
39
59
|
pageToken?: number;
|
|
@@ -47,6 +67,70 @@ export interface ListVariantsRequest {
|
|
|
47
67
|
*/
|
|
48
68
|
export class VariantsApi extends runtime.BaseAPI {
|
|
49
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
|
+
|
|
50
134
|
/**
|
|
51
135
|
* Gets a GFN variant by the given ID.
|
|
52
136
|
* Get a GFN variant
|
|
@@ -111,6 +195,78 @@ export class VariantsApi extends runtime.BaseAPI {
|
|
|
111
195
|
return await response.value();
|
|
112
196
|
}
|
|
113
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
|
+
|
|
114
270
|
/**
|
|
115
271
|
* Lists all GFN variants available to the project. Can be filtered by product ID, SKU, and attribute values using the search parameter.
|
|
116
272
|
* List GFN variants
|
package/src/models/ApiError.ts
CHANGED
|
@@ -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.
|
|
7
|
+
* The version of the OpenAPI document: 1.3.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/src/models/Attribute.ts
CHANGED
|
@@ -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.
|
|
7
|
+
* The version of the OpenAPI document: 1.3.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -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.
|
|
7
|
+
* The version of the OpenAPI document: 1.3.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/src/models/Image.ts
CHANGED
|
@@ -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.
|
|
7
|
+
* The version of the OpenAPI document: 1.3.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/src/models/Product.ts
CHANGED
|
@@ -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.
|
|
7
|
+
* The version of the OpenAPI document: 1.3.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -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.
|
|
7
|
+
* The version of the OpenAPI document: 1.3.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -0,0 +1,60 @@
|
|
|
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 Stock
|
|
20
|
+
*/
|
|
21
|
+
export interface Stock {
|
|
22
|
+
/**
|
|
23
|
+
* Current stock level
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof Stock
|
|
26
|
+
*/
|
|
27
|
+
level?: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the Stock interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfStock(value: object): boolean {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function StockFromJSON(json: any): Stock {
|
|
38
|
+
return StockFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function StockFromJSONTyped(json: any, ignoreDiscriminator: boolean): Stock {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
|
|
47
|
+
'level': json['level'] == null ? undefined : json['level'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function StockToJSON(value?: Stock | null): any {
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
|
|
57
|
+
'level': value['level'],
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
@@ -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.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 { VariantStock } from './VariantStock';
|
|
17
|
+
import {
|
|
18
|
+
VariantStockFromJSON,
|
|
19
|
+
VariantStockFromJSONTyped,
|
|
20
|
+
VariantStockToJSON,
|
|
21
|
+
} from './VariantStock';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface StockResponse
|
|
27
|
+
*/
|
|
28
|
+
export interface StockResponse {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {Array<VariantStock>}
|
|
32
|
+
* @memberof StockResponse
|
|
33
|
+
*/
|
|
34
|
+
variants?: Array<VariantStock>;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {number}
|
|
38
|
+
* @memberof StockResponse
|
|
39
|
+
*/
|
|
40
|
+
nextPageToken?: number;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the StockResponse interface.
|
|
45
|
+
*/
|
|
46
|
+
export function instanceOfStockResponse(value: object): boolean {
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function StockResponseFromJSON(json: any): StockResponse {
|
|
51
|
+
return StockResponseFromJSONTyped(json, false);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function StockResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): StockResponse {
|
|
55
|
+
if (json == null) {
|
|
56
|
+
return json;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
|
|
60
|
+
'variants': json['variants'] == null ? undefined : ((json['variants'] as Array<any>).map(VariantStockFromJSON)),
|
|
61
|
+
'nextPageToken': json['nextPageToken'] == null ? undefined : json['nextPageToken'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function StockResponseToJSON(value?: StockResponse | null): any {
|
|
66
|
+
if (value == null) {
|
|
67
|
+
return value;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'variants': value['variants'] == null ? undefined : ((value['variants'] as Array<any>).map(VariantStockToJSON)),
|
|
72
|
+
'nextPageToken': value['nextPageToken'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
package/src/models/Variant.ts
CHANGED
|
@@ -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.
|
|
7
|
+
* The version of the OpenAPI document: 1.3.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -25,18 +25,24 @@ import {
|
|
|
25
25
|
ImageFromJSONTyped,
|
|
26
26
|
ImageToJSON,
|
|
27
27
|
} from './Image';
|
|
28
|
+
import type { Stock } from './Stock';
|
|
29
|
+
import {
|
|
30
|
+
StockFromJSON,
|
|
31
|
+
StockFromJSONTyped,
|
|
32
|
+
StockToJSON,
|
|
33
|
+
} from './Stock';
|
|
34
|
+
import type { VariantManufacturerOrigin } from './VariantManufacturerOrigin';
|
|
35
|
+
import {
|
|
36
|
+
VariantManufacturerOriginFromJSON,
|
|
37
|
+
VariantManufacturerOriginFromJSONTyped,
|
|
38
|
+
VariantManufacturerOriginToJSON,
|
|
39
|
+
} from './VariantManufacturerOrigin';
|
|
28
40
|
import type { VariantProduct } from './VariantProduct';
|
|
29
41
|
import {
|
|
30
42
|
VariantProductFromJSON,
|
|
31
43
|
VariantProductFromJSONTyped,
|
|
32
44
|
VariantProductToJSON,
|
|
33
45
|
} from './VariantProduct';
|
|
34
|
-
import type { VariantStock } from './VariantStock';
|
|
35
|
-
import {
|
|
36
|
-
VariantStockFromJSON,
|
|
37
|
-
VariantStockFromJSONTyped,
|
|
38
|
-
VariantStockToJSON,
|
|
39
|
-
} from './VariantStock';
|
|
40
46
|
|
|
41
47
|
/**
|
|
42
48
|
*
|
|
@@ -76,10 +82,16 @@ export interface Variant {
|
|
|
76
82
|
attributes: Array<Attribute>;
|
|
77
83
|
/**
|
|
78
84
|
*
|
|
79
|
-
* @type {
|
|
85
|
+
* @type {VariantManufacturerOrigin}
|
|
86
|
+
* @memberof Variant
|
|
87
|
+
*/
|
|
88
|
+
manufacturerOrigin?: VariantManufacturerOrigin;
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* @type {Stock}
|
|
80
92
|
* @memberof Variant
|
|
81
93
|
*/
|
|
82
|
-
stock?:
|
|
94
|
+
stock?: Stock;
|
|
83
95
|
/**
|
|
84
96
|
* Images
|
|
85
97
|
* @type {Array<Image>}
|
|
@@ -112,7 +124,8 @@ export function VariantFromJSONTyped(json: any, ignoreDiscriminator: boolean): V
|
|
|
112
124
|
'product': json['product'] == null ? undefined : VariantProductFromJSON(json['product']),
|
|
113
125
|
'sku': json['sku'],
|
|
114
126
|
'attributes': ((json['attributes'] as Array<any>).map(AttributeFromJSON)),
|
|
115
|
-
'
|
|
127
|
+
'manufacturerOrigin': json['manufacturerOrigin'] == null ? undefined : VariantManufacturerOriginFromJSON(json['manufacturerOrigin']),
|
|
128
|
+
'stock': json['stock'] == null ? undefined : StockFromJSON(json['stock']),
|
|
116
129
|
'images': json['images'] == null ? undefined : ((json['images'] as Array<any>).map(ImageFromJSON)),
|
|
117
130
|
};
|
|
118
131
|
}
|
|
@@ -128,7 +141,8 @@ export function VariantToJSON(value?: Variant | null): any {
|
|
|
128
141
|
'product': VariantProductToJSON(value['product']),
|
|
129
142
|
'sku': value['sku'],
|
|
130
143
|
'attributes': ((value['attributes'] as Array<any>).map(AttributeToJSON)),
|
|
131
|
-
'
|
|
144
|
+
'manufacturerOrigin': VariantManufacturerOriginToJSON(value['manufacturerOrigin']),
|
|
145
|
+
'stock': StockToJSON(value['stock']),
|
|
132
146
|
'images': value['images'] == null ? undefined : ((value['images'] as Array<any>).map(ImageToJSON)),
|
|
133
147
|
};
|
|
134
148
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
* Where the product was originally produced or manufactured
|
|
18
|
+
* @export
|
|
19
|
+
* @interface VariantManufacturerOrigin
|
|
20
|
+
*/
|
|
21
|
+
export interface VariantManufacturerOrigin {
|
|
22
|
+
/**
|
|
23
|
+
* Country of origin (ISO 3166-1 alpha-2).
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof VariantManufacturerOrigin
|
|
26
|
+
*/
|
|
27
|
+
country?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Name of the country of origin
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof VariantManufacturerOrigin
|
|
32
|
+
*/
|
|
33
|
+
name?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the VariantManufacturerOrigin interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfVariantManufacturerOrigin(value: object): boolean {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function VariantManufacturerOriginFromJSON(json: any): VariantManufacturerOrigin {
|
|
44
|
+
return VariantManufacturerOriginFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function VariantManufacturerOriginFromJSONTyped(json: any, ignoreDiscriminator: boolean): VariantManufacturerOrigin {
|
|
48
|
+
if (json == null) {
|
|
49
|
+
return json;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
|
|
53
|
+
'country': json['country'] == null ? undefined : json['country'],
|
|
54
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function VariantManufacturerOriginToJSON(value?: VariantManufacturerOrigin | null): any {
|
|
59
|
+
if (value == null) {
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
|
|
64
|
+
'country': value['country'],
|
|
65
|
+
'name': value['name'],
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
@@ -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.
|
|
7
|
+
* The version of the OpenAPI document: 1.3.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -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.
|
|
7
|
+
* The version of the OpenAPI document: 1.3.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { Stock } from './Stock';
|
|
17
|
+
import {
|
|
18
|
+
StockFromJSON,
|
|
19
|
+
StockFromJSONTyped,
|
|
20
|
+
StockToJSON,
|
|
21
|
+
} from './Stock';
|
|
22
|
+
|
|
16
23
|
/**
|
|
17
24
|
*
|
|
18
25
|
* @export
|
|
@@ -20,11 +27,29 @@ import { mapValues } from '../runtime';
|
|
|
20
27
|
*/
|
|
21
28
|
export interface VariantStock {
|
|
22
29
|
/**
|
|
23
|
-
*
|
|
24
|
-
* @type {
|
|
30
|
+
* Unique object identifier
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof VariantStock
|
|
33
|
+
*/
|
|
34
|
+
id?: string;
|
|
35
|
+
/**
|
|
36
|
+
* A reference to the resource location
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof VariantStock
|
|
39
|
+
*/
|
|
40
|
+
ref?: string;
|
|
41
|
+
/**
|
|
42
|
+
* A reference to the resource location
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof VariantStock
|
|
45
|
+
*/
|
|
46
|
+
productRef?: string;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {Stock}
|
|
25
50
|
* @memberof VariantStock
|
|
26
51
|
*/
|
|
27
|
-
|
|
52
|
+
stock?: Stock;
|
|
28
53
|
}
|
|
29
54
|
|
|
30
55
|
/**
|
|
@@ -44,7 +69,10 @@ export function VariantStockFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
44
69
|
}
|
|
45
70
|
return {
|
|
46
71
|
|
|
47
|
-
'
|
|
72
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
73
|
+
'ref': json['ref'] == null ? undefined : json['ref'],
|
|
74
|
+
'productRef': json['productRef'] == null ? undefined : json['productRef'],
|
|
75
|
+
'stock': json['stock'] == null ? undefined : StockFromJSON(json['stock']),
|
|
48
76
|
};
|
|
49
77
|
}
|
|
50
78
|
|
|
@@ -54,7 +82,10 @@ export function VariantStockToJSON(value?: VariantStock | null): any {
|
|
|
54
82
|
}
|
|
55
83
|
return {
|
|
56
84
|
|
|
57
|
-
'
|
|
85
|
+
'id': value['id'],
|
|
86
|
+
'ref': value['ref'],
|
|
87
|
+
'productRef': value['productRef'],
|
|
88
|
+
'stock': StockToJSON(value['stock']),
|
|
58
89
|
};
|
|
59
90
|
}
|
|
60
91
|
|