@vanillabp/bc-official-gui-client 0.1.0 → 0.1.3
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/dist/index.d.ts +2125 -27
- package/dist/index.js +1740 -3
- package/dist/index.js.map +1 -0
- package/package.json +19 -12
- package/dist/apis/OfficialTasklistApi.d.ts +0 -338
- package/dist/apis/OfficialTasklistApi.js +0 -378
- package/dist/apis/OfficialWorkflowModulesApi.d.ts +0 -75
- package/dist/apis/OfficialWorkflowModulesApi.js +0 -66
- package/dist/apis/OfficialWorkflowlistApi.d.ts +0 -182
- package/dist/apis/OfficialWorkflowlistApi.js +0 -197
- package/dist/apis/index.d.ts +0 -25
- package/dist/apis/index.js +0 -3
- package/dist/chunk-4TPCCB4K.js +0 -45
- package/dist/models/Group.d.ts +0 -47
- package/dist/models/Group.js +0 -39
- package/dist/models/KwicRequest.d.ts +0 -36
- package/dist/models/KwicRequest.js +0 -38
- package/dist/models/KwicResult.d.ts +0 -39
- package/dist/models/KwicResult.js +0 -37
- package/dist/models/KwicResults.d.ts +0 -36
- package/dist/models/KwicResults.js +0 -38
- package/dist/models/Page.d.ts +0 -51
- package/dist/models/Page.js +0 -43
- package/dist/models/Person.d.ts +0 -65
- package/dist/models/Person.js +0 -45
- package/dist/models/SearchQuery.d.ts +0 -45
- package/dist/models/SearchQuery.js +0 -39
- package/dist/models/UiUriType.d.ts +0 -25
- package/dist/models/UiUriType.js +0 -20
- package/dist/models/UserSearchResult.d.ts +0 -36
- package/dist/models/UserSearchResult.js +0 -38
- package/dist/models/UserTask.d.ts +0 -208
- package/dist/models/UserTask.js +0 -110
- package/dist/models/UserTaskEvent.d.ts +0 -45
- package/dist/models/UserTaskEvent.js +0 -40
- package/dist/models/UserTaskIds.d.ts +0 -33
- package/dist/models/UserTaskIds.js +0 -34
- package/dist/models/UserTaskRetrieveMode.d.ts +0 -28
- package/dist/models/UserTaskRetrieveMode.js +0 -23
- package/dist/models/UserTasks.d.ts +0 -52
- package/dist/models/UserTasks.js +0 -48
- package/dist/models/UserTasksRequest.d.ts +0 -73
- package/dist/models/UserTasksRequest.js +0 -54
- package/dist/models/UserTasksUpdateRequest.d.ts +0 -66
- package/dist/models/UserTasksUpdateRequest.js +0 -50
- package/dist/models/Workflow.d.ts +0 -150
- package/dist/models/Workflow.js +0 -91
- package/dist/models/WorkflowEvent.d.ts +0 -45
- package/dist/models/WorkflowEvent.js +0 -40
- package/dist/models/WorkflowModule.d.ts +0 -45
- package/dist/models/WorkflowModule.js +0 -40
- package/dist/models/WorkflowModules.d.ts +0 -36
- package/dist/models/WorkflowModules.js +0 -38
- package/dist/models/Workflows.d.ts +0 -58
- package/dist/models/Workflows.js +0 -51
- package/dist/models/WorkflowsRequest.d.ts +0 -66
- package/dist/models/WorkflowsRequest.js +0 -48
- package/dist/models/WorkflowsUpdateRequest.d.ts +0 -60
- package/dist/models/WorkflowsUpdateRequest.js +0 -48
- package/dist/models/index.d.ts +0 -23
- package/dist/models/index.js +0 -23
- package/dist/runtime.d.ts +0 -184
- package/dist/runtime.js +0 -315
package/dist/runtime.js
DELETED
|
@@ -1,315 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__async,
|
|
3
|
-
__spreadProps,
|
|
4
|
-
__spreadValues
|
|
5
|
-
} from "./chunk-4TPCCB4K.js";
|
|
6
|
-
const BASE_PATH = "/gui/api/v1".replace(/\/+$/, "");
|
|
7
|
-
class Configuration {
|
|
8
|
-
constructor(configuration = {}) {
|
|
9
|
-
this.configuration = configuration;
|
|
10
|
-
}
|
|
11
|
-
set config(configuration) {
|
|
12
|
-
this.configuration = configuration;
|
|
13
|
-
}
|
|
14
|
-
get basePath() {
|
|
15
|
-
return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH;
|
|
16
|
-
}
|
|
17
|
-
get fetchApi() {
|
|
18
|
-
return this.configuration.fetchApi;
|
|
19
|
-
}
|
|
20
|
-
get middleware() {
|
|
21
|
-
return this.configuration.middleware || [];
|
|
22
|
-
}
|
|
23
|
-
get queryParamsStringify() {
|
|
24
|
-
return this.configuration.queryParamsStringify || querystring;
|
|
25
|
-
}
|
|
26
|
-
get username() {
|
|
27
|
-
return this.configuration.username;
|
|
28
|
-
}
|
|
29
|
-
get password() {
|
|
30
|
-
return this.configuration.password;
|
|
31
|
-
}
|
|
32
|
-
get apiKey() {
|
|
33
|
-
const apiKey = this.configuration.apiKey;
|
|
34
|
-
if (apiKey) {
|
|
35
|
-
return typeof apiKey === "function" ? apiKey : () => apiKey;
|
|
36
|
-
}
|
|
37
|
-
return void 0;
|
|
38
|
-
}
|
|
39
|
-
get accessToken() {
|
|
40
|
-
const accessToken = this.configuration.accessToken;
|
|
41
|
-
if (accessToken) {
|
|
42
|
-
return typeof accessToken === "function" ? accessToken : () => __async(this, null, function* () {
|
|
43
|
-
return accessToken;
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
return void 0;
|
|
47
|
-
}
|
|
48
|
-
get headers() {
|
|
49
|
-
return this.configuration.headers;
|
|
50
|
-
}
|
|
51
|
-
get credentials() {
|
|
52
|
-
return this.configuration.credentials;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
const DefaultConfig = new Configuration();
|
|
56
|
-
const _BaseAPI = class {
|
|
57
|
-
constructor(configuration = DefaultConfig) {
|
|
58
|
-
this.configuration = configuration;
|
|
59
|
-
this.fetchApi = (url, init) => __async(this, null, function* () {
|
|
60
|
-
let fetchParams = { url, init };
|
|
61
|
-
for (const middleware of this.middleware) {
|
|
62
|
-
if (middleware.pre) {
|
|
63
|
-
fetchParams = (yield middleware.pre(__spreadValues({
|
|
64
|
-
fetch: this.fetchApi
|
|
65
|
-
}, fetchParams))) || fetchParams;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
let response = void 0;
|
|
69
|
-
try {
|
|
70
|
-
response = yield (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
|
|
71
|
-
} catch (e) {
|
|
72
|
-
for (const middleware of this.middleware) {
|
|
73
|
-
if (middleware.onError) {
|
|
74
|
-
response = (yield middleware.onError({
|
|
75
|
-
fetch: this.fetchApi,
|
|
76
|
-
url: fetchParams.url,
|
|
77
|
-
init: fetchParams.init,
|
|
78
|
-
error: e,
|
|
79
|
-
response: response ? response.clone() : void 0
|
|
80
|
-
})) || response;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
if (response === void 0) {
|
|
84
|
-
if (e instanceof Error) {
|
|
85
|
-
throw new FetchError(e, "The request failed and the interceptors did not return an alternative response");
|
|
86
|
-
} else {
|
|
87
|
-
throw e;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
for (const middleware of this.middleware) {
|
|
92
|
-
if (middleware.post) {
|
|
93
|
-
response = (yield middleware.post({
|
|
94
|
-
fetch: this.fetchApi,
|
|
95
|
-
url: fetchParams.url,
|
|
96
|
-
init: fetchParams.init,
|
|
97
|
-
response: response.clone()
|
|
98
|
-
})) || response;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
return response;
|
|
102
|
-
});
|
|
103
|
-
this.middleware = configuration.middleware;
|
|
104
|
-
}
|
|
105
|
-
withMiddleware(...middlewares) {
|
|
106
|
-
const next = this.clone();
|
|
107
|
-
next.middleware = next.middleware.concat(...middlewares);
|
|
108
|
-
return next;
|
|
109
|
-
}
|
|
110
|
-
withPreMiddleware(...preMiddlewares) {
|
|
111
|
-
const middlewares = preMiddlewares.map((pre) => ({ pre }));
|
|
112
|
-
return this.withMiddleware(...middlewares);
|
|
113
|
-
}
|
|
114
|
-
withPostMiddleware(...postMiddlewares) {
|
|
115
|
-
const middlewares = postMiddlewares.map((post) => ({ post }));
|
|
116
|
-
return this.withMiddleware(...middlewares);
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Check if the given MIME is a JSON MIME.
|
|
120
|
-
* JSON MIME examples:
|
|
121
|
-
* application/json
|
|
122
|
-
* application/json; charset=UTF8
|
|
123
|
-
* APPLICATION/JSON
|
|
124
|
-
* application/vnd.company+json
|
|
125
|
-
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
126
|
-
* @return True if the given MIME is JSON, false otherwise.
|
|
127
|
-
*/
|
|
128
|
-
isJsonMime(mime) {
|
|
129
|
-
if (!mime) {
|
|
130
|
-
return false;
|
|
131
|
-
}
|
|
132
|
-
return _BaseAPI.jsonRegex.test(mime);
|
|
133
|
-
}
|
|
134
|
-
request(context, initOverrides) {
|
|
135
|
-
return __async(this, null, function* () {
|
|
136
|
-
const { url, init } = yield this.createFetchParams(context, initOverrides);
|
|
137
|
-
const response = yield this.fetchApi(url, init);
|
|
138
|
-
if (response && (response.status >= 200 && response.status < 300)) {
|
|
139
|
-
return response;
|
|
140
|
-
}
|
|
141
|
-
throw new ResponseError(response, "Response returned an error code");
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
createFetchParams(context, initOverrides) {
|
|
145
|
-
return __async(this, null, function* () {
|
|
146
|
-
let url = this.configuration.basePath + context.path;
|
|
147
|
-
if (context.query !== void 0 && Object.keys(context.query).length !== 0) {
|
|
148
|
-
url += "?" + this.configuration.queryParamsStringify(context.query);
|
|
149
|
-
}
|
|
150
|
-
const headers = Object.assign({}, this.configuration.headers, context.headers);
|
|
151
|
-
Object.keys(headers).forEach((key) => headers[key] === void 0 ? delete headers[key] : {});
|
|
152
|
-
const initOverrideFn = typeof initOverrides === "function" ? initOverrides : () => __async(this, null, function* () {
|
|
153
|
-
return initOverrides;
|
|
154
|
-
});
|
|
155
|
-
const initParams = {
|
|
156
|
-
method: context.method,
|
|
157
|
-
headers,
|
|
158
|
-
body: context.body,
|
|
159
|
-
credentials: this.configuration.credentials
|
|
160
|
-
};
|
|
161
|
-
const overriddenInit = __spreadValues(__spreadValues({}, initParams), yield initOverrideFn({
|
|
162
|
-
init: initParams,
|
|
163
|
-
context
|
|
164
|
-
}));
|
|
165
|
-
const init = __spreadProps(__spreadValues({}, overriddenInit), {
|
|
166
|
-
body: isFormData(overriddenInit.body) || overriddenInit.body instanceof URLSearchParams || isBlob(overriddenInit.body) ? overriddenInit.body : JSON.stringify(overriddenInit.body)
|
|
167
|
-
});
|
|
168
|
-
return { url, init };
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Create a shallow clone of `this` by constructing a new instance
|
|
173
|
-
* and then shallow cloning data members.
|
|
174
|
-
*/
|
|
175
|
-
clone() {
|
|
176
|
-
const constructor = this.constructor;
|
|
177
|
-
const next = new constructor(this.configuration);
|
|
178
|
-
next.middleware = this.middleware.slice();
|
|
179
|
-
return next;
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
let BaseAPI = _BaseAPI;
|
|
183
|
-
BaseAPI.jsonRegex = new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$", "i");
|
|
184
|
-
;
|
|
185
|
-
function isBlob(value) {
|
|
186
|
-
return typeof Blob !== "undefined" && value instanceof Blob;
|
|
187
|
-
}
|
|
188
|
-
function isFormData(value) {
|
|
189
|
-
return typeof FormData !== "undefined" && value instanceof FormData;
|
|
190
|
-
}
|
|
191
|
-
class ResponseError extends Error {
|
|
192
|
-
constructor(response, msg) {
|
|
193
|
-
super(msg);
|
|
194
|
-
this.response = response;
|
|
195
|
-
this.name = "ResponseError";
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
class FetchError extends Error {
|
|
199
|
-
constructor(cause, msg) {
|
|
200
|
-
super(msg);
|
|
201
|
-
this.cause = cause;
|
|
202
|
-
this.name = "FetchError";
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
class RequiredError extends Error {
|
|
206
|
-
constructor(field, msg) {
|
|
207
|
-
super(msg);
|
|
208
|
-
this.field = field;
|
|
209
|
-
this.name = "RequiredError";
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
const COLLECTION_FORMATS = {
|
|
213
|
-
csv: ",",
|
|
214
|
-
ssv: " ",
|
|
215
|
-
tsv: " ",
|
|
216
|
-
pipes: "|"
|
|
217
|
-
};
|
|
218
|
-
function exists(json, key) {
|
|
219
|
-
const value = json[key];
|
|
220
|
-
return value !== null && value !== void 0;
|
|
221
|
-
}
|
|
222
|
-
function querystring(params, prefix = "") {
|
|
223
|
-
return Object.keys(params).map((key) => querystringSingleKey(key, params[key], prefix)).filter((part) => part.length > 0).join("&");
|
|
224
|
-
}
|
|
225
|
-
function querystringSingleKey(key, value, keyPrefix = "") {
|
|
226
|
-
const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
|
|
227
|
-
if (value instanceof Array) {
|
|
228
|
-
const multiValue = value.map((singleValue) => encodeURIComponent(String(singleValue))).join(`&${encodeURIComponent(fullKey)}=`);
|
|
229
|
-
return `${encodeURIComponent(fullKey)}=${multiValue}`;
|
|
230
|
-
}
|
|
231
|
-
if (value instanceof Set) {
|
|
232
|
-
const valueAsArray = Array.from(value);
|
|
233
|
-
return querystringSingleKey(key, valueAsArray, keyPrefix);
|
|
234
|
-
}
|
|
235
|
-
if (value instanceof Date) {
|
|
236
|
-
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
|
|
237
|
-
}
|
|
238
|
-
if (value instanceof Object) {
|
|
239
|
-
return querystring(value, fullKey);
|
|
240
|
-
}
|
|
241
|
-
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
|
242
|
-
}
|
|
243
|
-
function mapValues(data, fn) {
|
|
244
|
-
return Object.keys(data).reduce(
|
|
245
|
-
(acc, key) => __spreadProps(__spreadValues({}, acc), { [key]: fn(data[key]) }),
|
|
246
|
-
{}
|
|
247
|
-
);
|
|
248
|
-
}
|
|
249
|
-
function canConsumeForm(consumes) {
|
|
250
|
-
for (const consume of consumes) {
|
|
251
|
-
if ("multipart/form-data" === consume.contentType) {
|
|
252
|
-
return true;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
return false;
|
|
256
|
-
}
|
|
257
|
-
class JSONApiResponse {
|
|
258
|
-
constructor(raw, transformer = (jsonValue) => jsonValue) {
|
|
259
|
-
this.raw = raw;
|
|
260
|
-
this.transformer = transformer;
|
|
261
|
-
}
|
|
262
|
-
value() {
|
|
263
|
-
return __async(this, null, function* () {
|
|
264
|
-
return this.transformer(yield this.raw.json());
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
class VoidApiResponse {
|
|
269
|
-
constructor(raw) {
|
|
270
|
-
this.raw = raw;
|
|
271
|
-
}
|
|
272
|
-
value() {
|
|
273
|
-
return __async(this, null, function* () {
|
|
274
|
-
return void 0;
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
class BlobApiResponse {
|
|
279
|
-
constructor(raw) {
|
|
280
|
-
this.raw = raw;
|
|
281
|
-
}
|
|
282
|
-
value() {
|
|
283
|
-
return __async(this, null, function* () {
|
|
284
|
-
return yield this.raw.blob();
|
|
285
|
-
});
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
class TextApiResponse {
|
|
289
|
-
constructor(raw) {
|
|
290
|
-
this.raw = raw;
|
|
291
|
-
}
|
|
292
|
-
value() {
|
|
293
|
-
return __async(this, null, function* () {
|
|
294
|
-
return yield this.raw.text();
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
export {
|
|
299
|
-
BASE_PATH,
|
|
300
|
-
BaseAPI,
|
|
301
|
-
BlobApiResponse,
|
|
302
|
-
COLLECTION_FORMATS,
|
|
303
|
-
Configuration,
|
|
304
|
-
DefaultConfig,
|
|
305
|
-
FetchError,
|
|
306
|
-
JSONApiResponse,
|
|
307
|
-
RequiredError,
|
|
308
|
-
ResponseError,
|
|
309
|
-
TextApiResponse,
|
|
310
|
-
VoidApiResponse,
|
|
311
|
-
canConsumeForm,
|
|
312
|
-
exists,
|
|
313
|
-
mapValues,
|
|
314
|
-
querystring
|
|
315
|
-
};
|