@teemill/gfn-catalog 1.1.0 → 1.2.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 +3 -0
- package/README.md +2 -2
- package/dist/apis/ProductsApi.d.ts +1 -1
- package/dist/apis/ProductsApi.js +1 -1
- package/dist/apis/VariantsApi.d.ts +17 -2
- package/dist/apis/VariantsApi.js +70 -1
- 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 +1 -1
- 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 +1 -1
- 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 +7 -4
- 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 +1 -1
- 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 +1 -1
- package/package.json +1 -1
- package/src/apis/ProductsApi.ts +1 -1
- package/src/apis/VariantsApi.ts +74 -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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* GFN Catalog API
|
|
3
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
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.2.0
|
|
6
6
|
* Contact: hello@teemill.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* GFN Catalog API
|
|
6
6
|
* 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.
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 1.
|
|
8
|
+
* The version of the OpenAPI document: 1.2.0
|
|
9
9
|
* Contact: hello@teemill.com
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
* GFN Catalog API
|
|
3
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
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.2.0
|
|
6
6
|
* Contact: hello@teemill.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { Stock } from './Stock';
|
|
12
13
|
/**
|
|
13
14
|
*
|
|
14
15
|
* @export
|
|
@@ -16,11 +17,29 @@
|
|
|
16
17
|
*/
|
|
17
18
|
export interface VariantStock {
|
|
18
19
|
/**
|
|
19
|
-
*
|
|
20
|
-
* @type {
|
|
20
|
+
* Unique object identifier
|
|
21
|
+
* @type {string}
|
|
21
22
|
* @memberof VariantStock
|
|
22
23
|
*/
|
|
23
|
-
|
|
24
|
+
id?: string;
|
|
25
|
+
/**
|
|
26
|
+
* A reference to the resource location
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof VariantStock
|
|
29
|
+
*/
|
|
30
|
+
ref?: string;
|
|
31
|
+
/**
|
|
32
|
+
* A reference to the resource location
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof VariantStock
|
|
35
|
+
*/
|
|
36
|
+
productRef?: string;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Stock}
|
|
40
|
+
* @memberof VariantStock
|
|
41
|
+
*/
|
|
42
|
+
stock?: Stock;
|
|
24
43
|
}
|
|
25
44
|
/**
|
|
26
45
|
* Check if a given object implements the VariantStock interface.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* GFN Catalog API
|
|
6
6
|
* 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.
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 1.
|
|
8
|
+
* The version of the OpenAPI document: 1.2.0
|
|
9
9
|
* Contact: hello@teemill.com
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.VariantStockToJSON = exports.VariantStockFromJSONTyped = exports.VariantStockFromJSON = exports.instanceOfVariantStock = void 0;
|
|
17
|
+
var Stock_1 = require("./Stock");
|
|
17
18
|
/**
|
|
18
19
|
* Check if a given object implements the VariantStock interface.
|
|
19
20
|
*/
|
|
@@ -30,7 +31,10 @@ function VariantStockFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
30
31
|
return json;
|
|
31
32
|
}
|
|
32
33
|
return {
|
|
33
|
-
'
|
|
34
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
35
|
+
'ref': json['ref'] == null ? undefined : json['ref'],
|
|
36
|
+
'productRef': json['productRef'] == null ? undefined : json['productRef'],
|
|
37
|
+
'stock': json['stock'] == null ? undefined : (0, Stock_1.StockFromJSON)(json['stock']),
|
|
34
38
|
};
|
|
35
39
|
}
|
|
36
40
|
exports.VariantStockFromJSONTyped = VariantStockFromJSONTyped;
|
|
@@ -39,7 +43,10 @@ function VariantStockToJSON(value) {
|
|
|
39
43
|
return value;
|
|
40
44
|
}
|
|
41
45
|
return {
|
|
42
|
-
'
|
|
46
|
+
'id': value['id'],
|
|
47
|
+
'ref': value['ref'],
|
|
48
|
+
'productRef': value['productRef'],
|
|
49
|
+
'stock': (0, Stock_1.StockToJSON)(value['stock']),
|
|
43
50
|
};
|
|
44
51
|
}
|
|
45
52
|
exports.VariantStockToJSON = VariantStockToJSON;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* GFN Catalog API
|
|
3
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
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.2.0
|
|
6
6
|
* Contact: hello@teemill.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* GFN Catalog API
|
|
6
6
|
* 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.
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 1.
|
|
8
|
+
* The version of the OpenAPI document: 1.2.0
|
|
9
9
|
* Contact: hello@teemill.com
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/models/index.d.ts
CHANGED
|
@@ -4,7 +4,10 @@ export * from './AttributeThumbnail';
|
|
|
4
4
|
export * from './Image';
|
|
5
5
|
export * from './Product';
|
|
6
6
|
export * from './ProductsResponse';
|
|
7
|
+
export * from './Stock';
|
|
8
|
+
export * from './StockResponse';
|
|
7
9
|
export * from './Variant';
|
|
10
|
+
export * from './VariantManufacturerOrigin';
|
|
8
11
|
export * from './VariantProduct';
|
|
9
12
|
export * from './VariantStock';
|
|
10
13
|
export * from './VariantsResponse';
|
package/dist/models/index.js
CHANGED
|
@@ -22,7 +22,10 @@ __exportStar(require("./AttributeThumbnail"), exports);
|
|
|
22
22
|
__exportStar(require("./Image"), exports);
|
|
23
23
|
__exportStar(require("./Product"), exports);
|
|
24
24
|
__exportStar(require("./ProductsResponse"), exports);
|
|
25
|
+
__exportStar(require("./Stock"), exports);
|
|
26
|
+
__exportStar(require("./StockResponse"), exports);
|
|
25
27
|
__exportStar(require("./Variant"), exports);
|
|
28
|
+
__exportStar(require("./VariantManufacturerOrigin"), exports);
|
|
26
29
|
__exportStar(require("./VariantProduct"), exports);
|
|
27
30
|
__exportStar(require("./VariantStock"), exports);
|
|
28
31
|
__exportStar(require("./VariantsResponse"), exports);
|
package/dist/runtime.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* GFN Catalog API
|
|
3
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
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.2.0
|
|
6
6
|
* Contact: hello@teemill.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/runtime.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* GFN Catalog API
|
|
6
6
|
* 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.
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 1.
|
|
8
|
+
* The version of the OpenAPI document: 1.2.0
|
|
9
9
|
* Contact: hello@teemill.com
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/package.json
CHANGED
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.2.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.2.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,12 +16,15 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
ApiError,
|
|
19
|
+
StockResponse,
|
|
19
20
|
Variant,
|
|
20
21
|
VariantsResponse,
|
|
21
22
|
} from '../models/index';
|
|
22
23
|
import {
|
|
23
24
|
ApiErrorFromJSON,
|
|
24
25
|
ApiErrorToJSON,
|
|
26
|
+
StockResponseFromJSON,
|
|
27
|
+
StockResponseToJSON,
|
|
25
28
|
VariantFromJSON,
|
|
26
29
|
VariantToJSON,
|
|
27
30
|
VariantsResponseFromJSON,
|
|
@@ -34,6 +37,12 @@ export interface GetVariantRequest {
|
|
|
34
37
|
fields?: string;
|
|
35
38
|
}
|
|
36
39
|
|
|
40
|
+
export interface ListStockRequest {
|
|
41
|
+
project: string;
|
|
42
|
+
pageToken?: number;
|
|
43
|
+
pageSize?: number;
|
|
44
|
+
}
|
|
45
|
+
|
|
37
46
|
export interface ListVariantsRequest {
|
|
38
47
|
project: string;
|
|
39
48
|
pageToken?: number;
|
|
@@ -111,6 +120,70 @@ export class VariantsApi extends runtime.BaseAPI {
|
|
|
111
120
|
return await response.value();
|
|
112
121
|
}
|
|
113
122
|
|
|
123
|
+
/**
|
|
124
|
+
* Lists the stock levels for all GFN variants available to the project.
|
|
125
|
+
* List GFN variant stock
|
|
126
|
+
*/
|
|
127
|
+
async listStockRaw(requestParameters: ListStockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StockResponse>> {
|
|
128
|
+
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
129
|
+
throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling listStock.');
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const queryParameters: any = {};
|
|
133
|
+
|
|
134
|
+
if (requestParameters.project !== undefined) {
|
|
135
|
+
queryParameters['project'] = requestParameters.project;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (requestParameters.pageToken !== undefined) {
|
|
139
|
+
queryParameters['pageToken'] = requestParameters.pageToken;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if (requestParameters.pageSize !== undefined) {
|
|
143
|
+
queryParameters['pageSize'] = requestParameters.pageSize;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
147
|
+
|
|
148
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
149
|
+
// oauth required
|
|
150
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
154
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
const response = await this.request({
|
|
158
|
+
path: `/v1/gfn/catalog/stock`,
|
|
159
|
+
method: 'GET',
|
|
160
|
+
headers: headerParameters,
|
|
161
|
+
query: queryParameters,
|
|
162
|
+
}, initOverrides);
|
|
163
|
+
|
|
164
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => StockResponseFromJSON(jsonValue));
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Lists the stock levels for all GFN variants available to the project.
|
|
169
|
+
* List GFN variant stock
|
|
170
|
+
*/
|
|
171
|
+
async listStock(
|
|
172
|
+
project: string,
|
|
173
|
+
optionalParameters: runtime.OptionalOnly<ListStockRequest> = {},
|
|
174
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
175
|
+
): Promise<StockResponse> {
|
|
176
|
+
const response = await this.listStockRaw(
|
|
177
|
+
{
|
|
178
|
+
project: project,
|
|
179
|
+
...optionalParameters,
|
|
180
|
+
},
|
|
181
|
+
initOverrides
|
|
182
|
+
);
|
|
183
|
+
|
|
184
|
+
return await response.value();
|
|
185
|
+
}
|
|
186
|
+
|
|
114
187
|
/**
|
|
115
188
|
* Lists all GFN variants available to the project. Can be filtered by product ID, SKU, and attribute values using the search parameter.
|
|
116
189
|
* 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.2.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.2.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.2.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.2.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.2.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.2.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.2.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.2.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.2.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.2.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
|
+
|