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