@teemill/gfn-catalog 1.4.0 → 2.0.2
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 +6 -28
- package/README.md +3 -3
- package/api.ts +1892 -0
- package/base.ts +86 -0
- package/common.ts +150 -0
- package/configuration.ts +110 -0
- package/dist/api.d.ts +1287 -0
- package/dist/api.js +966 -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 +1287 -0
- package/dist/esm/api.js +947 -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 +14 -2
- package/tsconfig.json +4 -6
- package/dist/apis/ProductsApi.d.ts +0 -35
- package/dist/apis/ProductsApi.js +0 -85
- package/dist/apis/StatementsApi.d.ts +0 -48
- package/dist/apis/StatementsApi.js +0 -127
- package/dist/apis/TransactionsApi.d.ts +0 -48
- package/dist/apis/TransactionsApi.js +0 -129
- package/dist/apis/VariantsApi.d.ts +0 -82
- package/dist/apis/VariantsApi.js +0 -229
- package/dist/apis/index.d.ts +0 -4
- package/dist/apis/index.js +0 -22
- package/dist/esm/apis/ProductsApi.d.ts +0 -35
- package/dist/esm/apis/ProductsApi.js +0 -81
- package/dist/esm/apis/StatementsApi.d.ts +0 -48
- package/dist/esm/apis/StatementsApi.js +0 -123
- package/dist/esm/apis/TransactionsApi.d.ts +0 -48
- package/dist/esm/apis/TransactionsApi.js +0 -125
- 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 -4
- package/dist/esm/apis/index.js +0 -6
- package/dist/esm/models/ApiError.d.ts +0 -37
- package/dist/esm/models/ApiError.js +0 -42
- package/dist/esm/models/ApiValidationError.d.ts +0 -39
- package/dist/esm/models/ApiValidationError.js +0 -44
- 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/ExportTransactionsRequest.d.ts +0 -43
- package/dist/esm/models/ExportTransactionsRequest.js +0 -42
- package/dist/esm/models/Image.d.ts +0 -67
- package/dist/esm/models/Image.js +0 -50
- package/dist/esm/models/ListStatements200Response.d.ts +0 -38
- package/dist/esm/models/ListStatements200Response.js +0 -41
- package/dist/esm/models/ListTransactions200Response.d.ts +0 -38
- package/dist/esm/models/ListTransactions200Response.js +0 -41
- 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/Statement.d.ts +0 -61
- package/dist/esm/models/Statement.js +0 -60
- 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/Transaction.d.ts +0 -68
- package/dist/esm/models/Transaction.js +0 -61
- package/dist/esm/models/TransactionOrder.d.ts +0 -37
- package/dist/esm/models/TransactionOrder.js +0 -44
- 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 -20
- package/dist/esm/models/index.js +0 -22
- 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/ApiValidationError.d.ts +0 -39
- package/dist/models/ApiValidationError.js +0 -51
- 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/ExportTransactionsRequest.d.ts +0 -43
- package/dist/models/ExportTransactionsRequest.js +0 -49
- package/dist/models/Image.d.ts +0 -67
- package/dist/models/Image.js +0 -57
- package/dist/models/ListStatements200Response.d.ts +0 -38
- package/dist/models/ListStatements200Response.js +0 -48
- package/dist/models/ListTransactions200Response.d.ts +0 -38
- package/dist/models/ListTransactions200Response.js +0 -48
- 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/Statement.d.ts +0 -61
- package/dist/models/Statement.js +0 -67
- 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/Transaction.d.ts +0 -68
- package/dist/models/Transaction.js +0 -68
- package/dist/models/TransactionOrder.d.ts +0 -37
- package/dist/models/TransactionOrder.js +0 -51
- 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 -20
- package/dist/models/index.js +0 -38
- package/dist/runtime.d.ts +0 -187
- package/dist/runtime.js +0 -349
- package/src/apis/ProductsApi.ts +0 -116
- package/src/apis/StatementsApi.ts +0 -177
- package/src/apis/TransactionsApi.ts +0 -180
- package/src/apis/VariantsApi.ts +0 -345
- package/src/apis/index.ts +0 -6
- package/src/index.ts +0 -5
- package/src/models/ApiError.ts +0 -69
- package/src/models/ApiValidationError.ts +0 -70
- package/src/models/Attribute.ts +0 -93
- package/src/models/AttributeThumbnail.ts +0 -80
- package/src/models/ExportTransactionsRequest.ts +0 -76
- package/src/models/Image.ts +0 -108
- package/src/models/ListStatements200Response.ts +0 -75
- package/src/models/ListTransactions200Response.ts +0 -75
- package/src/models/Product.ts +0 -109
- package/src/models/ProductsResponse.ts +0 -75
- package/src/models/Statement.ts +0 -106
- package/src/models/Stock.ts +0 -60
- package/src/models/StockResponse.ts +0 -75
- package/src/models/Transaction.ts +0 -120
- package/src/models/TransactionOrder.ts +0 -70
- 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 -22
- package/src/runtime.ts +0 -441
package/dist/apis/VariantsApi.js
DELETED
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* GFN Catalog API
|
|
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
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: 1.4.0
|
|
9
|
-
* Contact: hello@teemill.com
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
-
* https://openapi-generator.tech
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*/
|
|
15
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.VariantsApi = void 0;
|
|
26
|
-
const runtime = require("../runtime");
|
|
27
|
-
const index_1 = require("../models/index");
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
*/
|
|
31
|
-
class VariantsApi extends runtime.BaseAPI {
|
|
32
|
-
/**
|
|
33
|
-
* Gets the stock level for the GFN variant with the given ID.
|
|
34
|
-
* Get GFN variant stock
|
|
35
|
-
*/
|
|
36
|
-
getStockRaw(requestParameters, initOverrides) {
|
|
37
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
39
|
-
throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling getStock.');
|
|
40
|
-
}
|
|
41
|
-
if (requestParameters.variantId === null || requestParameters.variantId === undefined) {
|
|
42
|
-
throw new runtime.RequiredError('variantId', 'Required parameter requestParameters.variantId was null or undefined when calling getStock.');
|
|
43
|
-
}
|
|
44
|
-
const queryParameters = {};
|
|
45
|
-
if (requestParameters.project !== undefined) {
|
|
46
|
-
queryParameters['project'] = requestParameters.project;
|
|
47
|
-
}
|
|
48
|
-
if (requestParameters.fulfillmentProjects !== undefined) {
|
|
49
|
-
queryParameters['fulfillmentProjects'] = requestParameters.fulfillmentProjects;
|
|
50
|
-
}
|
|
51
|
-
const headerParameters = {};
|
|
52
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
53
|
-
// oauth required
|
|
54
|
-
headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
|
|
55
|
-
}
|
|
56
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
57
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
58
|
-
}
|
|
59
|
-
const response = yield this.request({
|
|
60
|
-
path: `/v1/gfn/catalog/stock/{variantId}`.replace(`{${"variantId"}}`, encodeURIComponent(String(requestParameters.variantId))),
|
|
61
|
-
method: 'GET',
|
|
62
|
-
headers: headerParameters,
|
|
63
|
-
query: queryParameters,
|
|
64
|
-
}, initOverrides);
|
|
65
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.VariantStockFromJSON)(jsonValue));
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Gets the stock level for the GFN variant with the given ID.
|
|
70
|
-
* Get GFN variant stock
|
|
71
|
-
*/
|
|
72
|
-
getStock(project_1, variantId_1) {
|
|
73
|
-
return __awaiter(this, arguments, void 0, function* (project, variantId, optionalParameters = {}, initOverrides) {
|
|
74
|
-
const response = yield this.getStockRaw(Object.assign({ project: project, variantId: variantId }, optionalParameters), initOverrides);
|
|
75
|
-
return yield response.value();
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Gets a GFN variant by the given ID.
|
|
80
|
-
* Get a GFN variant
|
|
81
|
-
*/
|
|
82
|
-
getVariantRaw(requestParameters, initOverrides) {
|
|
83
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
-
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
85
|
-
throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling getVariant.');
|
|
86
|
-
}
|
|
87
|
-
if (requestParameters.variantId === null || requestParameters.variantId === undefined) {
|
|
88
|
-
throw new runtime.RequiredError('variantId', 'Required parameter requestParameters.variantId was null or undefined when calling getVariant.');
|
|
89
|
-
}
|
|
90
|
-
const queryParameters = {};
|
|
91
|
-
if (requestParameters.project !== undefined) {
|
|
92
|
-
queryParameters['project'] = requestParameters.project;
|
|
93
|
-
}
|
|
94
|
-
if (requestParameters.fields !== undefined) {
|
|
95
|
-
queryParameters['fields'] = requestParameters.fields;
|
|
96
|
-
}
|
|
97
|
-
const headerParameters = {};
|
|
98
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
99
|
-
// oauth required
|
|
100
|
-
headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
|
|
101
|
-
}
|
|
102
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
103
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
104
|
-
}
|
|
105
|
-
const response = yield this.request({
|
|
106
|
-
path: `/v1/gfn/catalog/variants/{variantId}`.replace(`{${"variantId"}}`, encodeURIComponent(String(requestParameters.variantId))),
|
|
107
|
-
method: 'GET',
|
|
108
|
-
headers: headerParameters,
|
|
109
|
-
query: queryParameters,
|
|
110
|
-
}, initOverrides);
|
|
111
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.VariantFromJSON)(jsonValue));
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Gets a GFN variant by the given ID.
|
|
116
|
-
* Get a GFN variant
|
|
117
|
-
*/
|
|
118
|
-
getVariant(project_1, variantId_1) {
|
|
119
|
-
return __awaiter(this, arguments, void 0, function* (project, variantId, optionalParameters = {}, initOverrides) {
|
|
120
|
-
const response = yield this.getVariantRaw(Object.assign({ project: project, variantId: variantId }, optionalParameters), initOverrides);
|
|
121
|
-
return yield response.value();
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Lists the stock levels for all GFN variants available to the project.
|
|
126
|
-
* List GFN variant stock
|
|
127
|
-
*/
|
|
128
|
-
listStockRaw(requestParameters, initOverrides) {
|
|
129
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
-
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
131
|
-
throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling listStock.');
|
|
132
|
-
}
|
|
133
|
-
const queryParameters = {};
|
|
134
|
-
if (requestParameters.project !== undefined) {
|
|
135
|
-
queryParameters['project'] = requestParameters.project;
|
|
136
|
-
}
|
|
137
|
-
if (requestParameters.fulfillmentProjects !== undefined) {
|
|
138
|
-
queryParameters['fulfillmentProjects'] = requestParameters.fulfillmentProjects;
|
|
139
|
-
}
|
|
140
|
-
if (requestParameters.pageToken !== undefined) {
|
|
141
|
-
queryParameters['pageToken'] = requestParameters.pageToken;
|
|
142
|
-
}
|
|
143
|
-
if (requestParameters.pageSize !== undefined) {
|
|
144
|
-
queryParameters['pageSize'] = requestParameters.pageSize;
|
|
145
|
-
}
|
|
146
|
-
if (requestParameters.search !== undefined) {
|
|
147
|
-
queryParameters['search'] = requestParameters.search;
|
|
148
|
-
}
|
|
149
|
-
const headerParameters = {};
|
|
150
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
151
|
-
// oauth required
|
|
152
|
-
headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
|
|
153
|
-
}
|
|
154
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
155
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
156
|
-
}
|
|
157
|
-
const response = yield this.request({
|
|
158
|
-
path: `/v1/gfn/catalog/stock`,
|
|
159
|
-
method: 'GET',
|
|
160
|
-
headers: headerParameters,
|
|
161
|
-
query: queryParameters,
|
|
162
|
-
}, initOverrides);
|
|
163
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.StockResponseFromJSON)(jsonValue));
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Lists the stock levels for all GFN variants available to the project.
|
|
168
|
-
* List GFN variant stock
|
|
169
|
-
*/
|
|
170
|
-
listStock(project_1) {
|
|
171
|
-
return __awaiter(this, arguments, void 0, function* (project, optionalParameters = {}, initOverrides) {
|
|
172
|
-
const response = yield this.listStockRaw(Object.assign({ project: project }, optionalParameters), initOverrides);
|
|
173
|
-
return yield response.value();
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Lists all GFN variants available to the project. Can be filtered by product ID, SKU, and attribute values using the search parameter.
|
|
178
|
-
* List GFN variants
|
|
179
|
-
*/
|
|
180
|
-
listVariantsRaw(requestParameters, initOverrides) {
|
|
181
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
182
|
-
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
183
|
-
throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling listVariants.');
|
|
184
|
-
}
|
|
185
|
-
const queryParameters = {};
|
|
186
|
-
if (requestParameters.project !== undefined) {
|
|
187
|
-
queryParameters['project'] = requestParameters.project;
|
|
188
|
-
}
|
|
189
|
-
if (requestParameters.pageToken !== undefined) {
|
|
190
|
-
queryParameters['pageToken'] = requestParameters.pageToken;
|
|
191
|
-
}
|
|
192
|
-
if (requestParameters.pageSize !== undefined) {
|
|
193
|
-
queryParameters['pageSize'] = requestParameters.pageSize;
|
|
194
|
-
}
|
|
195
|
-
if (requestParameters.fields !== undefined) {
|
|
196
|
-
queryParameters['fields'] = requestParameters.fields;
|
|
197
|
-
}
|
|
198
|
-
if (requestParameters.search !== undefined) {
|
|
199
|
-
queryParameters['search'] = requestParameters.search;
|
|
200
|
-
}
|
|
201
|
-
const headerParameters = {};
|
|
202
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
203
|
-
// oauth required
|
|
204
|
-
headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
|
|
205
|
-
}
|
|
206
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
207
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
208
|
-
}
|
|
209
|
-
const response = yield this.request({
|
|
210
|
-
path: `/v1/gfn/catalog/variants`,
|
|
211
|
-
method: 'GET',
|
|
212
|
-
headers: headerParameters,
|
|
213
|
-
query: queryParameters,
|
|
214
|
-
}, initOverrides);
|
|
215
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.VariantsResponseFromJSON)(jsonValue));
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* Lists all GFN variants available to the project. Can be filtered by product ID, SKU, and attribute values using the search parameter.
|
|
220
|
-
* List GFN variants
|
|
221
|
-
*/
|
|
222
|
-
listVariants(project_1) {
|
|
223
|
-
return __awaiter(this, arguments, void 0, function* (project, optionalParameters = {}, initOverrides) {
|
|
224
|
-
const response = yield this.listVariantsRaw(Object.assign({ project: project }, optionalParameters), initOverrides);
|
|
225
|
-
return yield response.value();
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
exports.VariantsApi = VariantsApi;
|
package/dist/apis/index.d.ts
DELETED
package/dist/apis/index.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
/* tslint:disable */
|
|
18
|
-
/* eslint-disable */
|
|
19
|
-
__exportStar(require("./ProductsApi"), exports);
|
|
20
|
-
__exportStar(require("./StatementsApi"), exports);
|
|
21
|
-
__exportStar(require("./TransactionsApi"), exports);
|
|
22
|
-
__exportStar(require("./VariantsApi"), exports);
|
|
@@ -1,35 +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.4.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 { ProductsResponse } from '../models/index';
|
|
14
|
-
export interface ListProductsRequest {
|
|
15
|
-
project: string;
|
|
16
|
-
pageToken?: number;
|
|
17
|
-
pageSize?: number;
|
|
18
|
-
fields?: string;
|
|
19
|
-
search?: string;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
export declare class ProductsApi extends runtime.BaseAPI {
|
|
25
|
-
/**
|
|
26
|
-
* Lists all GFN products available to the project. Can be filtered by style codes using the search parameter.
|
|
27
|
-
* List GFN products
|
|
28
|
-
*/
|
|
29
|
-
listProductsRaw(requestParameters: ListProductsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProductsResponse>>;
|
|
30
|
-
/**
|
|
31
|
-
* Lists all GFN products available to the project. Can be filtered by style codes using the search parameter.
|
|
32
|
-
* List GFN products
|
|
33
|
-
*/
|
|
34
|
-
listProducts(project: string, optionalParameters?: runtime.OptionalOnly<ListProductsRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductsResponse>;
|
|
35
|
-
}
|
|
@@ -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.4.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_1) {
|
|
76
|
-
return __awaiter(this, arguments, void 0, function* (project, optionalParameters = {}, initOverrides) {
|
|
77
|
-
const response = yield this.listProductsRaw(Object.assign({ project: project }, optionalParameters), initOverrides);
|
|
78
|
-
return yield response.value();
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
}
|
|
@@ -1,48 +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.4.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 { ListStatements200Response, Statement } from '../models/index';
|
|
14
|
-
export interface GetStatementRequest {
|
|
15
|
-
project: string;
|
|
16
|
-
statementId: string;
|
|
17
|
-
}
|
|
18
|
-
export interface ListStatementsRequest {
|
|
19
|
-
project: string;
|
|
20
|
-
pageToken?: number;
|
|
21
|
-
pageSize?: number;
|
|
22
|
-
search?: string;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
*/
|
|
27
|
-
export declare class StatementsApi extends runtime.BaseAPI {
|
|
28
|
-
/**
|
|
29
|
-
* Gets a GFN statement by the given ID.
|
|
30
|
-
* Get a GFN statement
|
|
31
|
-
*/
|
|
32
|
-
getStatementRaw(requestParameters: GetStatementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Statement>>;
|
|
33
|
-
/**
|
|
34
|
-
* Gets a GFN statement by the given ID.
|
|
35
|
-
* Get a GFN statement
|
|
36
|
-
*/
|
|
37
|
-
getStatement(project: string, statementId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Statement>;
|
|
38
|
-
/**
|
|
39
|
-
* Lists GFN statements available to the project
|
|
40
|
-
* List GFN statements
|
|
41
|
-
*/
|
|
42
|
-
listStatementsRaw(requestParameters: ListStatementsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListStatements200Response>>;
|
|
43
|
-
/**
|
|
44
|
-
* Lists GFN statements available to the project
|
|
45
|
-
* List GFN statements
|
|
46
|
-
*/
|
|
47
|
-
listStatements(project: string, optionalParameters?: runtime.OptionalOnly<ListStatementsRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListStatements200Response>;
|
|
48
|
-
}
|
|
@@ -1,123 +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.4.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 { ListStatements200ResponseFromJSON, StatementFromJSON, } from '../models/index';
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
|
-
export class StatementsApi extends runtime.BaseAPI {
|
|
29
|
-
/**
|
|
30
|
-
* Gets a GFN statement by the given ID.
|
|
31
|
-
* Get a GFN statement
|
|
32
|
-
*/
|
|
33
|
-
getStatementRaw(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 getStatement.');
|
|
37
|
-
}
|
|
38
|
-
if (requestParameters.statementId === null || requestParameters.statementId === undefined) {
|
|
39
|
-
throw new runtime.RequiredError('statementId', 'Required parameter requestParameters.statementId was null or undefined when calling getStatement.');
|
|
40
|
-
}
|
|
41
|
-
const queryParameters = {};
|
|
42
|
-
if (requestParameters.project !== undefined) {
|
|
43
|
-
queryParameters['project'] = requestParameters.project;
|
|
44
|
-
}
|
|
45
|
-
const headerParameters = {};
|
|
46
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
47
|
-
// oauth required
|
|
48
|
-
headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
|
|
49
|
-
}
|
|
50
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
51
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
52
|
-
}
|
|
53
|
-
const response = yield this.request({
|
|
54
|
-
path: `/v1/gfn/statements/{statementId}`.replace(`{${"statementId"}}`, encodeURIComponent(String(requestParameters.statementId))),
|
|
55
|
-
method: 'GET',
|
|
56
|
-
headers: headerParameters,
|
|
57
|
-
query: queryParameters,
|
|
58
|
-
}, initOverrides);
|
|
59
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => StatementFromJSON(jsonValue));
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Gets a GFN statement by the given ID.
|
|
64
|
-
* Get a GFN statement
|
|
65
|
-
*/
|
|
66
|
-
getStatement(project, statementId, initOverrides) {
|
|
67
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
-
const response = yield this.getStatementRaw({
|
|
69
|
-
project: project, statementId: statementId,
|
|
70
|
-
}, initOverrides);
|
|
71
|
-
return yield response.value();
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Lists GFN statements available to the project
|
|
76
|
-
* List GFN statements
|
|
77
|
-
*/
|
|
78
|
-
listStatementsRaw(requestParameters, initOverrides) {
|
|
79
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
-
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
81
|
-
throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling listStatements.');
|
|
82
|
-
}
|
|
83
|
-
const queryParameters = {};
|
|
84
|
-
if (requestParameters.project !== undefined) {
|
|
85
|
-
queryParameters['project'] = requestParameters.project;
|
|
86
|
-
}
|
|
87
|
-
if (requestParameters.pageToken !== undefined) {
|
|
88
|
-
queryParameters['pageToken'] = requestParameters.pageToken;
|
|
89
|
-
}
|
|
90
|
-
if (requestParameters.pageSize !== undefined) {
|
|
91
|
-
queryParameters['pageSize'] = requestParameters.pageSize;
|
|
92
|
-
}
|
|
93
|
-
if (requestParameters.search !== undefined) {
|
|
94
|
-
queryParameters['search'] = requestParameters.search;
|
|
95
|
-
}
|
|
96
|
-
const headerParameters = {};
|
|
97
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
98
|
-
// oauth required
|
|
99
|
-
headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
|
|
100
|
-
}
|
|
101
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
102
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
103
|
-
}
|
|
104
|
-
const response = yield this.request({
|
|
105
|
-
path: `/v1/gfn/statements`,
|
|
106
|
-
method: 'GET',
|
|
107
|
-
headers: headerParameters,
|
|
108
|
-
query: queryParameters,
|
|
109
|
-
}, initOverrides);
|
|
110
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => ListStatements200ResponseFromJSON(jsonValue));
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Lists GFN statements available to the project
|
|
115
|
-
* List GFN statements
|
|
116
|
-
*/
|
|
117
|
-
listStatements(project_1) {
|
|
118
|
-
return __awaiter(this, arguments, void 0, function* (project, optionalParameters = {}, initOverrides) {
|
|
119
|
-
const response = yield this.listStatementsRaw(Object.assign({ project: project }, optionalParameters), initOverrides);
|
|
120
|
-
return yield response.value();
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
}
|
|
@@ -1,48 +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.4.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 { ExportTransactionsRequest, ListTransactions200Response } from '../models/index';
|
|
14
|
-
export interface ExportTransactionsOperationRequest {
|
|
15
|
-
project: string;
|
|
16
|
-
exportTransactionsRequest: ExportTransactionsRequest;
|
|
17
|
-
}
|
|
18
|
-
export interface ListTransactionsRequest {
|
|
19
|
-
project: string;
|
|
20
|
-
pageToken?: number;
|
|
21
|
-
pageSize?: number;
|
|
22
|
-
statementId?: string;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
*/
|
|
27
|
-
export declare class TransactionsApi extends runtime.BaseAPI {
|
|
28
|
-
/**
|
|
29
|
-
* Exports all GFN transactions available to the project
|
|
30
|
-
* Export GFN transactions
|
|
31
|
-
*/
|
|
32
|
-
exportTransactionsRaw(requestParameters: ExportTransactionsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
|
|
33
|
-
/**
|
|
34
|
-
* Exports all GFN transactions available to the project
|
|
35
|
-
* Export GFN transactions
|
|
36
|
-
*/
|
|
37
|
-
exportTransactions(project: string, exportTransactionsRequest: ExportTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
|
|
38
|
-
/**
|
|
39
|
-
* Lists all GFN transactions available to the project
|
|
40
|
-
* List GFN transactions
|
|
41
|
-
*/
|
|
42
|
-
listTransactionsRaw(requestParameters: ListTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListTransactions200Response>>;
|
|
43
|
-
/**
|
|
44
|
-
* Lists all GFN transactions available to the project
|
|
45
|
-
* List GFN transactions
|
|
46
|
-
*/
|
|
47
|
-
listTransactions(project: string, optionalParameters?: runtime.OptionalOnly<ListTransactionsRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListTransactions200Response>;
|
|
48
|
-
}
|