@teemill/gfn-catalog 1.2.0 → 1.4.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 +10 -0
- package/.openapi-generator/VERSION +1 -1
- package/README.md +2 -2
- package/dist/apis/ProductsApi.d.ts +1 -1
- package/dist/apis/ProductsApi.js +47 -128
- package/dist/apis/StatementsApi.d.ts +48 -0
- package/dist/apis/StatementsApi.js +127 -0
- package/dist/apis/TransactionsApi.d.ts +48 -0
- package/dist/apis/TransactionsApi.js +129 -0
- package/dist/apis/VariantsApi.d.ts +19 -2
- package/dist/apis/VariantsApi.js +170 -245
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/esm/apis/ProductsApi.d.ts +35 -0
- package/dist/esm/apis/ProductsApi.js +81 -0
- package/dist/esm/apis/StatementsApi.d.ts +48 -0
- package/dist/esm/apis/StatementsApi.js +123 -0
- package/dist/esm/apis/TransactionsApi.d.ts +48 -0
- package/dist/esm/apis/TransactionsApi.js +125 -0
- package/dist/esm/apis/VariantsApi.d.ts +82 -0
- package/dist/esm/apis/VariantsApi.js +225 -0
- package/dist/esm/apis/index.d.ts +4 -0
- package/dist/esm/apis/index.js +6 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/models/ApiError.d.ts +37 -0
- package/dist/esm/models/ApiError.js +42 -0
- package/dist/esm/models/ApiValidationError.d.ts +39 -0
- package/dist/esm/models/ApiValidationError.js +44 -0
- package/dist/esm/models/Attribute.d.ts +50 -0
- package/dist/esm/models/Attribute.js +49 -0
- package/dist/esm/models/AttributeThumbnail.d.ts +46 -0
- package/dist/esm/models/AttributeThumbnail.js +48 -0
- package/dist/esm/models/ExportTransactionsRequest.d.ts +43 -0
- package/dist/esm/models/ExportTransactionsRequest.js +42 -0
- package/dist/esm/models/Image.d.ts +67 -0
- package/dist/esm/models/Image.js +50 -0
- package/dist/esm/models/ListStatements200Response.d.ts +38 -0
- package/dist/esm/models/ListStatements200Response.js +41 -0
- package/dist/esm/models/ListTransactions200Response.d.ts +38 -0
- package/dist/esm/models/ListTransactions200Response.js +41 -0
- package/dist/esm/models/Product.d.ts +67 -0
- package/dist/esm/models/Product.js +52 -0
- package/dist/esm/models/ProductsResponse.d.ts +38 -0
- package/dist/esm/models/ProductsResponse.js +41 -0
- package/dist/esm/models/Statement.d.ts +61 -0
- package/dist/esm/models/Statement.js +60 -0
- package/dist/esm/models/Stock.d.ts +31 -0
- package/dist/esm/models/Stock.js +38 -0
- package/dist/esm/models/StockResponse.d.ts +38 -0
- package/dist/esm/models/StockResponse.js +41 -0
- package/dist/esm/models/Transaction.d.ts +68 -0
- package/dist/esm/models/Transaction.js +61 -0
- package/dist/esm/models/TransactionOrder.d.ts +37 -0
- package/dist/esm/models/TransactionOrder.js +44 -0
- package/dist/esm/models/Variant.d.ts +78 -0
- package/dist/esm/models/Variant.js +61 -0
- package/dist/esm/models/VariantManufacturerOrigin.d.ts +37 -0
- package/dist/esm/models/VariantManufacturerOrigin.js +40 -0
- package/dist/esm/models/VariantProduct.d.ts +37 -0
- package/dist/esm/models/VariantProduct.js +40 -0
- package/dist/esm/models/VariantStock.d.ts +50 -0
- package/dist/esm/models/VariantStock.js +45 -0
- package/dist/esm/models/VariantsResponse.d.ts +38 -0
- package/dist/esm/models/VariantsResponse.js +41 -0
- package/dist/esm/models/index.d.ts +20 -0
- package/dist/esm/models/index.js +22 -0
- package/dist/esm/runtime.d.ts +187 -0
- package/dist/esm/runtime.js +333 -0
- package/dist/models/ApiError.d.ts +2 -2
- package/dist/models/ApiError.js +2 -2
- package/dist/models/ApiValidationError.d.ts +39 -0
- package/dist/models/ApiValidationError.js +51 -0
- package/dist/models/Attribute.d.ts +2 -2
- package/dist/models/Attribute.js +4 -4
- package/dist/models/AttributeThumbnail.d.ts +2 -2
- package/dist/models/AttributeThumbnail.js +1 -1
- package/dist/models/ExportTransactionsRequest.d.ts +43 -0
- package/dist/models/ExportTransactionsRequest.js +49 -0
- package/dist/models/Image.d.ts +2 -2
- package/dist/models/Image.js +1 -1
- package/dist/models/ListStatements200Response.d.ts +38 -0
- package/dist/models/ListStatements200Response.js +48 -0
- package/dist/models/ListTransactions200Response.d.ts +38 -0
- package/dist/models/ListTransactions200Response.js +48 -0
- package/dist/models/Product.d.ts +2 -2
- package/dist/models/Product.js +2 -2
- package/dist/models/ProductsResponse.d.ts +2 -2
- package/dist/models/ProductsResponse.js +2 -2
- package/dist/models/Statement.d.ts +61 -0
- package/dist/models/Statement.js +67 -0
- package/dist/models/Stock.d.ts +2 -2
- package/dist/models/Stock.js +1 -1
- package/dist/models/StockResponse.d.ts +2 -2
- package/dist/models/StockResponse.js +2 -2
- package/dist/models/Transaction.d.ts +68 -0
- package/dist/models/Transaction.js +68 -0
- package/dist/models/TransactionOrder.d.ts +37 -0
- package/dist/models/TransactionOrder.js +51 -0
- package/dist/models/Variant.d.ts +4 -4
- package/dist/models/Variant.js +8 -8
- package/dist/models/VariantManufacturerOrigin.d.ts +2 -2
- package/dist/models/VariantManufacturerOrigin.js +1 -1
- package/dist/models/VariantProduct.d.ts +2 -2
- package/dist/models/VariantProduct.js +1 -1
- package/dist/models/VariantStock.d.ts +2 -2
- package/dist/models/VariantStock.js +2 -2
- package/dist/models/VariantsResponse.d.ts +2 -2
- package/dist/models/VariantsResponse.js +2 -2
- package/dist/models/index.d.ts +7 -0
- package/dist/models/index.js +7 -0
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +223 -439
- package/package.json +5 -3
- package/src/apis/ProductsApi.ts +4 -1
- package/src/apis/StatementsApi.ts +177 -0
- package/src/apis/TransactionsApi.ts +180 -0
- package/src/apis/VariantsApi.ts +87 -1
- package/src/apis/index.ts +2 -0
- package/src/models/ApiError.ts +3 -3
- package/src/models/ApiValidationError.ts +70 -0
- package/src/models/Attribute.ts +4 -4
- package/src/models/AttributeThumbnail.ts +2 -2
- package/src/models/ExportTransactionsRequest.ts +76 -0
- package/src/models/Image.ts +2 -2
- package/src/models/ListStatements200Response.ts +75 -0
- package/src/models/ListTransactions200Response.ts +75 -0
- package/src/models/Product.ts +3 -3
- package/src/models/ProductsResponse.ts +2 -2
- package/src/models/Statement.ts +106 -0
- package/src/models/Stock.ts +2 -2
- package/src/models/StockResponse.ts +2 -2
- package/src/models/Transaction.ts +120 -0
- package/src/models/TransactionOrder.ts +70 -0
- package/src/models/Variant.ts +16 -16
- package/src/models/VariantManufacturerOrigin.ts +2 -2
- package/src/models/VariantProduct.ts +2 -2
- package/src/models/VariantStock.ts +2 -2
- package/src/models/VariantsResponse.ts +2 -2
- package/src/models/index.ts +7 -0
- package/src/runtime.ts +1 -1
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +2 -2
package/.openapi-generator/FILES
CHANGED
|
@@ -3,17 +3,26 @@
|
|
|
3
3
|
README.md
|
|
4
4
|
package.json
|
|
5
5
|
src/apis/ProductsApi.ts
|
|
6
|
+
src/apis/StatementsApi.ts
|
|
7
|
+
src/apis/TransactionsApi.ts
|
|
6
8
|
src/apis/VariantsApi.ts
|
|
7
9
|
src/apis/index.ts
|
|
8
10
|
src/index.ts
|
|
9
11
|
src/models/ApiError.ts
|
|
12
|
+
src/models/ApiValidationError.ts
|
|
10
13
|
src/models/Attribute.ts
|
|
11
14
|
src/models/AttributeThumbnail.ts
|
|
15
|
+
src/models/ExportTransactionsRequest.ts
|
|
12
16
|
src/models/Image.ts
|
|
17
|
+
src/models/ListStatements200Response.ts
|
|
18
|
+
src/models/ListTransactions200Response.ts
|
|
13
19
|
src/models/Product.ts
|
|
14
20
|
src/models/ProductsResponse.ts
|
|
21
|
+
src/models/Statement.ts
|
|
15
22
|
src/models/Stock.ts
|
|
16
23
|
src/models/StockResponse.ts
|
|
24
|
+
src/models/Transaction.ts
|
|
25
|
+
src/models/TransactionOrder.ts
|
|
17
26
|
src/models/Variant.ts
|
|
18
27
|
src/models/VariantManufacturerOrigin.ts
|
|
19
28
|
src/models/VariantProduct.ts
|
|
@@ -21,4 +30,5 @@ src/models/VariantStock.ts
|
|
|
21
30
|
src/models/VariantsResponse.ts
|
|
22
31
|
src/models/index.ts
|
|
23
32
|
src/runtime.ts
|
|
33
|
+
tsconfig.esm.json
|
|
24
34
|
tsconfig.json
|
|
@@ -1 +1 @@
|
|
|
1
|
-
7.
|
|
1
|
+
7.6.0
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @teemill/gfn-catalog@1.
|
|
1
|
+
## @teemill/gfn-catalog@1.4.0
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @teemill/gfn-catalog@1.
|
|
39
|
+
npm install @teemill/gfn-catalog@1.4.0 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -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.4.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/apis/ProductsApi.js
CHANGED
|
@@ -5,39 +5,13 @@
|
|
|
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.4.0
|
|
9
9
|
* Contact: hello@teemill.com
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
12
|
* https://openapi-generator.tech
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
|
-
var __extends = (this && this.__extends) || (function () {
|
|
16
|
-
var extendStatics = function (d, b) {
|
|
17
|
-
extendStatics = Object.setPrototypeOf ||
|
|
18
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
-
return extendStatics(d, b);
|
|
21
|
-
};
|
|
22
|
-
return function (d, b) {
|
|
23
|
-
if (typeof b !== "function" && b !== null)
|
|
24
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
-
extendStatics(d, b);
|
|
26
|
-
function __() { this.constructor = d; }
|
|
27
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
-
};
|
|
29
|
-
})();
|
|
30
|
-
var __assign = (this && this.__assign) || function () {
|
|
31
|
-
__assign = Object.assign || function(t) {
|
|
32
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
33
|
-
s = arguments[i];
|
|
34
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
35
|
-
t[p] = s[p];
|
|
36
|
-
}
|
|
37
|
-
return t;
|
|
38
|
-
};
|
|
39
|
-
return __assign.apply(this, arguments);
|
|
40
|
-
};
|
|
41
15
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
42
16
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
43
17
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -47,120 +21,65 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
47
21
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48
22
|
});
|
|
49
23
|
};
|
|
50
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
51
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
52
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
53
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
|
-
function step(op) {
|
|
55
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
56
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
57
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
58
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
59
|
-
switch (op[0]) {
|
|
60
|
-
case 0: case 1: t = op; break;
|
|
61
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
62
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
63
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
64
|
-
default:
|
|
65
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
66
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
67
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
68
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
69
|
-
if (t[2]) _.ops.pop();
|
|
70
|
-
_.trys.pop(); continue;
|
|
71
|
-
}
|
|
72
|
-
op = body.call(thisArg, _);
|
|
73
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
74
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
78
25
|
exports.ProductsApi = void 0;
|
|
79
|
-
|
|
80
|
-
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
81
28
|
/**
|
|
82
29
|
*
|
|
83
30
|
*/
|
|
84
|
-
|
|
85
|
-
__extends(ProductsApi, _super);
|
|
86
|
-
function ProductsApi() {
|
|
87
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
88
|
-
}
|
|
31
|
+
class ProductsApi extends runtime.BaseAPI {
|
|
89
32
|
/**
|
|
90
33
|
* Lists all GFN products available to the project. Can be filtered by style codes using the search parameter.
|
|
91
34
|
* List GFN products
|
|
92
35
|
*/
|
|
93
|
-
|
|
94
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
130
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
131
|
-
}
|
|
132
|
-
return [4 /*yield*/, this.request({
|
|
133
|
-
path: "/v1/gfn/catalog/products",
|
|
134
|
-
method: 'GET',
|
|
135
|
-
headers: headerParameters,
|
|
136
|
-
query: queryParameters,
|
|
137
|
-
}, initOverrides)];
|
|
138
|
-
case 3:
|
|
139
|
-
response = _c.sent();
|
|
140
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductsResponseFromJSON)(jsonValue); })];
|
|
141
|
-
}
|
|
142
|
-
});
|
|
36
|
+
listProductsRaw(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 listProducts.');
|
|
40
|
+
}
|
|
41
|
+
const queryParameters = {};
|
|
42
|
+
if (requestParameters.project !== undefined) {
|
|
43
|
+
queryParameters['project'] = requestParameters.project;
|
|
44
|
+
}
|
|
45
|
+
if (requestParameters.pageToken !== undefined) {
|
|
46
|
+
queryParameters['pageToken'] = requestParameters.pageToken;
|
|
47
|
+
}
|
|
48
|
+
if (requestParameters.pageSize !== undefined) {
|
|
49
|
+
queryParameters['pageSize'] = requestParameters.pageSize;
|
|
50
|
+
}
|
|
51
|
+
if (requestParameters.fields !== undefined) {
|
|
52
|
+
queryParameters['fields'] = requestParameters.fields;
|
|
53
|
+
}
|
|
54
|
+
if (requestParameters.search !== undefined) {
|
|
55
|
+
queryParameters['search'] = requestParameters.search;
|
|
56
|
+
}
|
|
57
|
+
const headerParameters = {};
|
|
58
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
59
|
+
// oauth required
|
|
60
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
|
|
61
|
+
}
|
|
62
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
63
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
64
|
+
}
|
|
65
|
+
const response = yield this.request({
|
|
66
|
+
path: `/v1/gfn/catalog/products`,
|
|
67
|
+
method: 'GET',
|
|
68
|
+
headers: headerParameters,
|
|
69
|
+
query: queryParameters,
|
|
70
|
+
}, initOverrides);
|
|
71
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ProductsResponseFromJSON)(jsonValue));
|
|
143
72
|
});
|
|
144
|
-
}
|
|
73
|
+
}
|
|
145
74
|
/**
|
|
146
75
|
* Lists all GFN products available to the project. Can be filtered by style codes using the search parameter.
|
|
147
76
|
* List GFN products
|
|
148
77
|
*/
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
return __generator(this, function (_a) {
|
|
154
|
-
switch (_a.label) {
|
|
155
|
-
case 0: return [4 /*yield*/, this.listProductsRaw(__assign({ project: project }, optionalParameters), initOverrides)];
|
|
156
|
-
case 1:
|
|
157
|
-
response = _a.sent();
|
|
158
|
-
return [4 /*yield*/, response.value()];
|
|
159
|
-
case 2: return [2 /*return*/, _a.sent()];
|
|
160
|
-
}
|
|
161
|
-
});
|
|
78
|
+
listProducts(project_1) {
|
|
79
|
+
return __awaiter(this, arguments, void 0, function* (project, optionalParameters = {}, initOverrides) {
|
|
80
|
+
const response = yield this.listProductsRaw(Object.assign({ project: project }, optionalParameters), initOverrides);
|
|
81
|
+
return yield response.value();
|
|
162
82
|
});
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
}(runtime.BaseAPI));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
166
85
|
exports.ProductsApi = ProductsApi;
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
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.StatementsApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class StatementsApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Gets a GFN statement by the given ID.
|
|
34
|
+
* Get a GFN statement
|
|
35
|
+
*/
|
|
36
|
+
getStatementRaw(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 getStatement.');
|
|
40
|
+
}
|
|
41
|
+
if (requestParameters.statementId === null || requestParameters.statementId === undefined) {
|
|
42
|
+
throw new runtime.RequiredError('statementId', 'Required parameter requestParameters.statementId was null or undefined when calling getStatement.');
|
|
43
|
+
}
|
|
44
|
+
const queryParameters = {};
|
|
45
|
+
if (requestParameters.project !== undefined) {
|
|
46
|
+
queryParameters['project'] = requestParameters.project;
|
|
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/statements/{statementId}`.replace(`{${"statementId"}}`, encodeURIComponent(String(requestParameters.statementId))),
|
|
58
|
+
method: 'GET',
|
|
59
|
+
headers: headerParameters,
|
|
60
|
+
query: queryParameters,
|
|
61
|
+
}, initOverrides);
|
|
62
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.StatementFromJSON)(jsonValue));
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Gets a GFN statement by the given ID.
|
|
67
|
+
* Get a GFN statement
|
|
68
|
+
*/
|
|
69
|
+
getStatement(project, statementId, initOverrides) {
|
|
70
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
+
const response = yield this.getStatementRaw({
|
|
72
|
+
project: project, statementId: statementId,
|
|
73
|
+
}, initOverrides);
|
|
74
|
+
return yield response.value();
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Lists GFN statements available to the project
|
|
79
|
+
* List GFN statements
|
|
80
|
+
*/
|
|
81
|
+
listStatementsRaw(requestParameters, initOverrides) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
84
|
+
throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling listStatements.');
|
|
85
|
+
}
|
|
86
|
+
const queryParameters = {};
|
|
87
|
+
if (requestParameters.project !== undefined) {
|
|
88
|
+
queryParameters['project'] = requestParameters.project;
|
|
89
|
+
}
|
|
90
|
+
if (requestParameters.pageToken !== undefined) {
|
|
91
|
+
queryParameters['pageToken'] = requestParameters.pageToken;
|
|
92
|
+
}
|
|
93
|
+
if (requestParameters.pageSize !== undefined) {
|
|
94
|
+
queryParameters['pageSize'] = requestParameters.pageSize;
|
|
95
|
+
}
|
|
96
|
+
if (requestParameters.search !== undefined) {
|
|
97
|
+
queryParameters['search'] = requestParameters.search;
|
|
98
|
+
}
|
|
99
|
+
const headerParameters = {};
|
|
100
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
101
|
+
// oauth required
|
|
102
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
|
|
103
|
+
}
|
|
104
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
105
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
106
|
+
}
|
|
107
|
+
const response = yield this.request({
|
|
108
|
+
path: `/v1/gfn/statements`,
|
|
109
|
+
method: 'GET',
|
|
110
|
+
headers: headerParameters,
|
|
111
|
+
query: queryParameters,
|
|
112
|
+
}, initOverrides);
|
|
113
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ListStatements200ResponseFromJSON)(jsonValue));
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Lists GFN statements available to the project
|
|
118
|
+
* List GFN statements
|
|
119
|
+
*/
|
|
120
|
+
listStatements(project_1) {
|
|
121
|
+
return __awaiter(this, arguments, void 0, function* (project, optionalParameters = {}, initOverrides) {
|
|
122
|
+
const response = yield this.listStatementsRaw(Object.assign({ project: project }, optionalParameters), initOverrides);
|
|
123
|
+
return yield response.value();
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
exports.StatementsApi = StatementsApi;
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
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.TransactionsApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class TransactionsApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Exports all GFN transactions available to the project
|
|
34
|
+
* Export GFN transactions
|
|
35
|
+
*/
|
|
36
|
+
exportTransactionsRaw(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 exportTransactions.');
|
|
40
|
+
}
|
|
41
|
+
if (requestParameters.exportTransactionsRequest === null || requestParameters.exportTransactionsRequest === undefined) {
|
|
42
|
+
throw new runtime.RequiredError('exportTransactionsRequest', 'Required parameter requestParameters.exportTransactionsRequest was null or undefined when calling exportTransactions.');
|
|
43
|
+
}
|
|
44
|
+
const queryParameters = {};
|
|
45
|
+
if (requestParameters.project !== undefined) {
|
|
46
|
+
queryParameters['project'] = requestParameters.project;
|
|
47
|
+
}
|
|
48
|
+
const headerParameters = {};
|
|
49
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
50
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
51
|
+
// oauth required
|
|
52
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
|
|
53
|
+
}
|
|
54
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
55
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
56
|
+
}
|
|
57
|
+
const response = yield this.request({
|
|
58
|
+
path: `/v1/gfn/transactions/export`,
|
|
59
|
+
method: 'POST',
|
|
60
|
+
headers: headerParameters,
|
|
61
|
+
query: queryParameters,
|
|
62
|
+
body: (0, index_1.ExportTransactionsRequestToJSON)(requestParameters.exportTransactionsRequest),
|
|
63
|
+
}, initOverrides);
|
|
64
|
+
return new runtime.BlobApiResponse(response);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Exports all GFN transactions available to the project
|
|
69
|
+
* Export GFN transactions
|
|
70
|
+
*/
|
|
71
|
+
exportTransactions(project, exportTransactionsRequest, initOverrides) {
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
const response = yield this.exportTransactionsRaw({
|
|
74
|
+
project: project, exportTransactionsRequest: exportTransactionsRequest,
|
|
75
|
+
}, initOverrides);
|
|
76
|
+
return yield response.value();
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Lists all GFN transactions available to the project
|
|
81
|
+
* List GFN transactions
|
|
82
|
+
*/
|
|
83
|
+
listTransactionsRaw(requestParameters, initOverrides) {
|
|
84
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
86
|
+
throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling listTransactions.');
|
|
87
|
+
}
|
|
88
|
+
const queryParameters = {};
|
|
89
|
+
if (requestParameters.project !== undefined) {
|
|
90
|
+
queryParameters['project'] = requestParameters.project;
|
|
91
|
+
}
|
|
92
|
+
if (requestParameters.pageToken !== undefined) {
|
|
93
|
+
queryParameters['pageToken'] = requestParameters.pageToken;
|
|
94
|
+
}
|
|
95
|
+
if (requestParameters.pageSize !== undefined) {
|
|
96
|
+
queryParameters['pageSize'] = requestParameters.pageSize;
|
|
97
|
+
}
|
|
98
|
+
if (requestParameters.statementId !== undefined) {
|
|
99
|
+
queryParameters['statementId'] = requestParameters.statementId;
|
|
100
|
+
}
|
|
101
|
+
const headerParameters = {};
|
|
102
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
103
|
+
// oauth required
|
|
104
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
|
|
105
|
+
}
|
|
106
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
107
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
108
|
+
}
|
|
109
|
+
const response = yield this.request({
|
|
110
|
+
path: `/v1/gfn/transactions`,
|
|
111
|
+
method: 'GET',
|
|
112
|
+
headers: headerParameters,
|
|
113
|
+
query: queryParameters,
|
|
114
|
+
}, initOverrides);
|
|
115
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ListTransactions200ResponseFromJSON)(jsonValue));
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Lists all GFN transactions available to the project
|
|
120
|
+
* List GFN transactions
|
|
121
|
+
*/
|
|
122
|
+
listTransactions(project_1) {
|
|
123
|
+
return __awaiter(this, arguments, void 0, function* (project, optionalParameters = {}, initOverrides) {
|
|
124
|
+
const response = yield this.listTransactionsRaw(Object.assign({ project: project }, optionalParameters), initOverrides);
|
|
125
|
+
return yield response.value();
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
exports.TransactionsApi = TransactionsApi;
|