@ocelescope/api-base 0.0.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +661 -0
- package/README.md +14 -18
- package/dist/index.d.ts +1801 -1248
- package/dist/index.js +1341 -1218
- package/package.json +10 -9
package/dist/index.js
CHANGED
|
@@ -1,36 +1,22 @@
|
|
|
1
1
|
import { useMutation, useQuery } from "@tanstack/react-query";
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { customFetch } from "@ocelescope/api-client";
|
|
4
3
|
//#region src/lib/fetcher.ts
|
|
5
|
-
const customFetch = async (
|
|
6
|
-
|
|
4
|
+
const customFetch$1 = async (config, options) => customFetch(config, options);
|
|
7
5
|
//#endregion
|
|
8
|
-
//#region src/api/base.ts
|
|
6
|
+
//#region src/api/base/index.ts
|
|
9
7
|
/**
|
|
10
|
-
* Generated by orval v8.
|
|
8
|
+
* Generated by orval v8.5.2 🍺
|
|
11
9
|
* Do not edit manually.
|
|
12
10
|
* Ocelescope Backend
|
|
13
11
|
* OpenAPI spec version: 0.1
|
|
14
12
|
*/
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
patchwork: "patchwork",
|
|
23
|
-
twopi: "twopi",
|
|
24
|
-
nop: "nop",
|
|
25
|
-
nop2: "nop2"
|
|
26
|
-
};
|
|
27
|
-
const E2OCountFilterDirection = {
|
|
28
|
-
source: "source",
|
|
29
|
-
target: "target"
|
|
30
|
-
};
|
|
31
|
-
const EventTypeFilterMode = {
|
|
32
|
-
exclude: "exclude",
|
|
33
|
-
include: "include"
|
|
13
|
+
const TaskState = {
|
|
14
|
+
PENDING: "PENDING",
|
|
15
|
+
STARTED: "STARTED",
|
|
16
|
+
SUCCESS: "SUCCESS",
|
|
17
|
+
FAILURE: "FAILURE",
|
|
18
|
+
SKIPPED: "SKIPPED",
|
|
19
|
+
CANCELLED: "CANCELLED"
|
|
34
20
|
};
|
|
35
21
|
const GraphNodeShape = {
|
|
36
22
|
circle: "circle",
|
|
@@ -63,274 +49,30 @@ const TableColumnDataType = {
|
|
|
63
49
|
date: "date",
|
|
64
50
|
datetime: "datetime"
|
|
65
51
|
};
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
};
|
|
78
|
-
const TaskState = {
|
|
79
|
-
PENDING: "PENDING",
|
|
80
|
-
STARTED: "STARTED",
|
|
81
|
-
SUCCESS: "SUCCESS",
|
|
82
|
-
FAILURE: "FAILURE",
|
|
83
|
-
SKIPPED: "SKIPPED",
|
|
84
|
-
CANCELLED: "CANCELLED"
|
|
85
|
-
};
|
|
86
|
-
const E2oDirection = {
|
|
87
|
-
source: "source",
|
|
88
|
-
target: "target"
|
|
89
|
-
};
|
|
90
|
-
const O2oDirection = {
|
|
91
|
-
source: "source",
|
|
92
|
-
target: "target"
|
|
93
|
-
};
|
|
94
|
-
const DownloadOcelOcelsDownloadGetExt = {
|
|
95
|
-
xml: ".xml",
|
|
96
|
-
json: ".json",
|
|
97
|
-
sqlite: ".sqlite"
|
|
98
|
-
};
|
|
99
|
-
/**
|
|
100
|
-
* @summary Get Events
|
|
101
|
-
*/
|
|
102
|
-
const getOcelotPaginatedEventsUrl = (params) => {
|
|
103
|
-
const normalizedParams = new URLSearchParams();
|
|
104
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
105
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
106
|
-
});
|
|
107
|
-
const stringifiedParams = normalizedParams.toString();
|
|
108
|
-
return stringifiedParams.length > 0 ? `/api/external/ocelot/events?${stringifiedParams}` : `/api/external/ocelot/events`;
|
|
109
|
-
};
|
|
110
|
-
const ocelotPaginatedEvents = async (params, options) => {
|
|
111
|
-
return customFetch(getOcelotPaginatedEventsUrl(params), {
|
|
112
|
-
...options,
|
|
113
|
-
method: "GET"
|
|
114
|
-
});
|
|
115
|
-
};
|
|
116
|
-
const getOcelotPaginatedEventsQueryKey = (params) => {
|
|
117
|
-
return [`/api/external/ocelot/events`, ...params ? [params] : []];
|
|
118
|
-
};
|
|
119
|
-
const getOcelotPaginatedEventsQueryOptions = (params, options) => {
|
|
120
|
-
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
121
|
-
const queryKey = queryOptions?.queryKey ?? getOcelotPaginatedEventsQueryKey(params);
|
|
122
|
-
const queryFn = ({ signal }) => ocelotPaginatedEvents(params, {
|
|
123
|
-
signal,
|
|
124
|
-
...requestOptions
|
|
125
|
-
});
|
|
126
|
-
return {
|
|
127
|
-
queryKey,
|
|
128
|
-
queryFn,
|
|
129
|
-
staleTime: 3e5,
|
|
130
|
-
...queryOptions
|
|
131
|
-
};
|
|
132
|
-
};
|
|
133
|
-
/**
|
|
134
|
-
* @summary Get Events
|
|
135
|
-
*/
|
|
136
|
-
function useOcelotPaginatedEvents(params, options, queryClient) {
|
|
137
|
-
const queryOptions = getOcelotPaginatedEventsQueryOptions(params, options);
|
|
138
|
-
return {
|
|
139
|
-
...useQuery(queryOptions, queryClient),
|
|
140
|
-
queryKey: queryOptions.queryKey
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* @summary Get Objects
|
|
145
|
-
*/
|
|
146
|
-
const getOcelotPaginatedObjectsUrl = (params) => {
|
|
147
|
-
const normalizedParams = new URLSearchParams();
|
|
148
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
149
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
150
|
-
});
|
|
151
|
-
const stringifiedParams = normalizedParams.toString();
|
|
152
|
-
return stringifiedParams.length > 0 ? `/api/external/ocelot/objects?${stringifiedParams}` : `/api/external/ocelot/objects`;
|
|
153
|
-
};
|
|
154
|
-
const ocelotPaginatedObjects = async (params, options) => {
|
|
155
|
-
return customFetch(getOcelotPaginatedObjectsUrl(params), {
|
|
156
|
-
...options,
|
|
157
|
-
method: "GET"
|
|
158
|
-
});
|
|
159
|
-
};
|
|
160
|
-
const getOcelotPaginatedObjectsQueryKey = (params) => {
|
|
161
|
-
return [`/api/external/ocelot/objects`, ...params ? [params] : []];
|
|
162
|
-
};
|
|
163
|
-
const getOcelotPaginatedObjectsQueryOptions = (params, options) => {
|
|
164
|
-
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
165
|
-
const queryKey = queryOptions?.queryKey ?? getOcelotPaginatedObjectsQueryKey(params);
|
|
166
|
-
const queryFn = ({ signal }) => ocelotPaginatedObjects(params, {
|
|
167
|
-
signal,
|
|
168
|
-
...requestOptions
|
|
169
|
-
});
|
|
170
|
-
return {
|
|
171
|
-
queryKey,
|
|
172
|
-
queryFn,
|
|
173
|
-
staleTime: 3e5,
|
|
174
|
-
...queryOptions
|
|
175
|
-
};
|
|
176
|
-
};
|
|
177
|
-
/**
|
|
178
|
-
* @summary Get Objects
|
|
179
|
-
*/
|
|
180
|
-
function useOcelotPaginatedObjects(params, options, queryClient) {
|
|
181
|
-
const queryOptions = getOcelotPaginatedObjectsQueryOptions(params, options);
|
|
182
|
-
return {
|
|
183
|
-
...useQuery(queryOptions, queryClient),
|
|
184
|
-
queryKey: queryOptions.queryKey
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* @summary Get Object Changes
|
|
189
|
-
*/
|
|
190
|
-
const getOcelotGetObjectChangesUrl = (objectId, params) => {
|
|
191
|
-
const normalizedParams = new URLSearchParams();
|
|
192
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
193
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
194
|
-
});
|
|
195
|
-
const stringifiedParams = normalizedParams.toString();
|
|
196
|
-
return stringifiedParams.length > 0 ? `/api/external/ocelot/objects/changes/${objectId}?${stringifiedParams}` : `/api/external/ocelot/objects/changes/${objectId}`;
|
|
197
|
-
};
|
|
198
|
-
const ocelotGetObjectChanges = async (objectId, params, options) => {
|
|
199
|
-
return customFetch(getOcelotGetObjectChangesUrl(objectId, params), {
|
|
200
|
-
...options,
|
|
201
|
-
method: "GET"
|
|
202
|
-
});
|
|
203
|
-
};
|
|
204
|
-
const getOcelotGetObjectChangesQueryKey = (objectId, params) => {
|
|
205
|
-
return [`/api/external/ocelot/objects/changes/${objectId}`, ...params ? [params] : []];
|
|
206
|
-
};
|
|
207
|
-
const getOcelotGetObjectChangesQueryOptions = (objectId, params, options) => {
|
|
208
|
-
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
209
|
-
const queryKey = queryOptions?.queryKey ?? getOcelotGetObjectChangesQueryKey(objectId, params);
|
|
210
|
-
const queryFn = ({ signal }) => ocelotGetObjectChanges(objectId, params, {
|
|
211
|
-
signal,
|
|
212
|
-
...requestOptions
|
|
213
|
-
});
|
|
214
|
-
return {
|
|
215
|
-
queryKey,
|
|
216
|
-
queryFn,
|
|
217
|
-
enabled: !!objectId,
|
|
218
|
-
staleTime: 3e5,
|
|
219
|
-
...queryOptions
|
|
220
|
-
};
|
|
221
|
-
};
|
|
222
|
-
/**
|
|
223
|
-
* @summary Get Object Changes
|
|
224
|
-
*/
|
|
225
|
-
function useOcelotGetObjectChanges(objectId, params, options, queryClient) {
|
|
226
|
-
const queryOptions = getOcelotGetObjectChangesQueryOptions(objectId, params, options);
|
|
227
|
-
return {
|
|
228
|
-
...useQuery(queryOptions, queryClient),
|
|
229
|
-
queryKey: queryOptions.queryKey
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* @summary Get Objects Info
|
|
234
|
-
*/
|
|
235
|
-
const getOcelotObjectInfoUrl = (params) => {
|
|
236
|
-
const normalizedParams = new URLSearchParams();
|
|
237
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
238
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
239
|
-
});
|
|
240
|
-
const stringifiedParams = normalizedParams.toString();
|
|
241
|
-
return stringifiedParams.length > 0 ? `/api/external/ocelot/objectInfo?${stringifiedParams}` : `/api/external/ocelot/objectInfo`;
|
|
242
|
-
};
|
|
243
|
-
const ocelotObjectInfo = async (params, options) => {
|
|
244
|
-
return customFetch(getOcelotObjectInfoUrl(params), {
|
|
245
|
-
...options,
|
|
246
|
-
method: "GET"
|
|
247
|
-
});
|
|
248
|
-
};
|
|
249
|
-
const getOcelotObjectInfoQueryKey = (params) => {
|
|
250
|
-
return [`/api/external/ocelot/objectInfo`, ...params ? [params] : []];
|
|
251
|
-
};
|
|
252
|
-
const getOcelotObjectInfoQueryOptions = (params, options) => {
|
|
253
|
-
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
254
|
-
const queryKey = queryOptions?.queryKey ?? getOcelotObjectInfoQueryKey(params);
|
|
255
|
-
const queryFn = ({ signal }) => ocelotObjectInfo(params, {
|
|
256
|
-
signal,
|
|
257
|
-
...requestOptions
|
|
258
|
-
});
|
|
259
|
-
return {
|
|
260
|
-
queryKey,
|
|
261
|
-
queryFn,
|
|
262
|
-
staleTime: 3e5,
|
|
263
|
-
...queryOptions
|
|
264
|
-
};
|
|
265
|
-
};
|
|
266
|
-
/**
|
|
267
|
-
* @summary Get Objects Info
|
|
268
|
-
*/
|
|
269
|
-
function useOcelotObjectInfo(params, options, queryClient) {
|
|
270
|
-
const queryOptions = getOcelotObjectInfoQueryOptions(params, options);
|
|
271
|
-
return {
|
|
272
|
-
...useQuery(queryOptions, queryClient),
|
|
273
|
-
queryKey: queryOptions.queryKey
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* @summary Get Event Info
|
|
278
|
-
*/
|
|
279
|
-
const getOcelotEventInfoUrl = (params) => {
|
|
280
|
-
const normalizedParams = new URLSearchParams();
|
|
281
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
282
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
283
|
-
});
|
|
284
|
-
const stringifiedParams = normalizedParams.toString();
|
|
285
|
-
return stringifiedParams.length > 0 ? `/api/external/ocelot/eventInfo?${stringifiedParams}` : `/api/external/ocelot/eventInfo`;
|
|
286
|
-
};
|
|
287
|
-
const ocelotEventInfo = async (params, options) => {
|
|
288
|
-
return customFetch(getOcelotEventInfoUrl(params), {
|
|
289
|
-
...options,
|
|
290
|
-
method: "GET"
|
|
291
|
-
});
|
|
292
|
-
};
|
|
293
|
-
const getOcelotEventInfoQueryKey = (params) => {
|
|
294
|
-
return [`/api/external/ocelot/eventInfo`, ...params ? [params] : []];
|
|
295
|
-
};
|
|
296
|
-
const getOcelotEventInfoQueryOptions = (params, options) => {
|
|
297
|
-
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
298
|
-
const queryKey = queryOptions?.queryKey ?? getOcelotEventInfoQueryKey(params);
|
|
299
|
-
const queryFn = ({ signal }) => ocelotEventInfo(params, {
|
|
300
|
-
signal,
|
|
301
|
-
...requestOptions
|
|
302
|
-
});
|
|
303
|
-
return {
|
|
304
|
-
queryKey,
|
|
305
|
-
queryFn,
|
|
306
|
-
staleTime: 3e5,
|
|
307
|
-
...queryOptions
|
|
308
|
-
};
|
|
52
|
+
const DotVisLayoutEngine = {
|
|
53
|
+
circo: "circo",
|
|
54
|
+
dot: "dot",
|
|
55
|
+
fdp: "fdp",
|
|
56
|
+
sfdp: "sfdp",
|
|
57
|
+
neato: "neato",
|
|
58
|
+
osage: "osage",
|
|
59
|
+
patchwork: "patchwork",
|
|
60
|
+
twopi: "twopi",
|
|
61
|
+
nop: "nop",
|
|
62
|
+
nop2: "nop2"
|
|
309
63
|
};
|
|
310
64
|
/**
|
|
311
|
-
* @summary Get Event Info
|
|
312
|
-
*/
|
|
313
|
-
function useOcelotEventInfo(params, options, queryClient) {
|
|
314
|
-
const queryOptions = getOcelotEventInfoQueryOptions(params, options);
|
|
315
|
-
return {
|
|
316
|
-
...useQuery(queryOptions, queryClient),
|
|
317
|
-
queryKey: queryOptions.queryKey
|
|
318
|
-
};
|
|
319
|
-
}
|
|
320
|
-
/**
|
|
321
65
|
* @summary Upload ocels, resources or tasks
|
|
322
66
|
*/
|
|
323
|
-
const
|
|
324
|
-
return `/api/external/session/upload`;
|
|
325
|
-
};
|
|
326
|
-
const upload = async (bodyUpload, options) => {
|
|
67
|
+
const upload = (bodyUpload, options, signal) => {
|
|
327
68
|
const formData = new FormData();
|
|
328
69
|
bodyUpload.files.forEach((value) => formData.append(`files`, value));
|
|
329
|
-
return customFetch(
|
|
330
|
-
|
|
70
|
+
return customFetch$1({
|
|
71
|
+
url: `/api/external/session/upload`,
|
|
331
72
|
method: "POST",
|
|
332
|
-
|
|
333
|
-
|
|
73
|
+
data: formData,
|
|
74
|
+
...signal ? { signal } : {}
|
|
75
|
+
}, options);
|
|
334
76
|
};
|
|
335
77
|
const getUploadMutationOptions = (options) => {
|
|
336
78
|
const mutationKey = ["upload"];
|
|
@@ -362,14 +104,12 @@ const useUpload = (options, queryClient) => {
|
|
|
362
104
|
/**
|
|
363
105
|
* @summary Deletes the Session
|
|
364
106
|
*/
|
|
365
|
-
const
|
|
366
|
-
return
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
method: "POST"
|
|
372
|
-
});
|
|
107
|
+
const logout = (options, signal) => {
|
|
108
|
+
return customFetch$1({
|
|
109
|
+
url: `/api/external/session/logout`,
|
|
110
|
+
method: "POST",
|
|
111
|
+
...signal ? { signal } : {}
|
|
112
|
+
}, options);
|
|
373
113
|
};
|
|
374
114
|
const getLogoutMutationOptions = (options) => {
|
|
375
115
|
const mutationKey = ["logout"];
|
|
@@ -398,74 +138,19 @@ const useLogout = (options, queryClient) => {
|
|
|
398
138
|
return useMutation(getLogoutMutationOptions(options), queryClient);
|
|
399
139
|
};
|
|
400
140
|
/**
|
|
401
|
-
*
|
|
402
|
-
* @summary List uploaded and uploading OCELs
|
|
403
|
-
*/
|
|
404
|
-
const getGetOcelsUrl = (params) => {
|
|
405
|
-
const normalizedParams = new URLSearchParams();
|
|
406
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
407
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
408
|
-
});
|
|
409
|
-
const stringifiedParams = normalizedParams.toString();
|
|
410
|
-
return stringifiedParams.length > 0 ? `/api/external/ocels?${stringifiedParams}` : `/api/external/ocels`;
|
|
411
|
-
};
|
|
412
|
-
const getOcels = async (params, options) => {
|
|
413
|
-
return customFetch(getGetOcelsUrl(params), {
|
|
414
|
-
...options,
|
|
415
|
-
method: "GET"
|
|
416
|
-
});
|
|
417
|
-
};
|
|
418
|
-
const getGetOcelsQueryKey = (params) => {
|
|
419
|
-
return [`/api/external/ocels`, ...params ? [params] : []];
|
|
420
|
-
};
|
|
421
|
-
const getGetOcelsQueryOptions = (params, options) => {
|
|
422
|
-
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
423
|
-
const queryKey = queryOptions?.queryKey ?? getGetOcelsQueryKey(params);
|
|
424
|
-
const queryFn = ({ signal }) => getOcels(params, {
|
|
425
|
-
signal,
|
|
426
|
-
...requestOptions
|
|
427
|
-
});
|
|
428
|
-
return {
|
|
429
|
-
queryKey,
|
|
430
|
-
queryFn,
|
|
431
|
-
staleTime: 3e5,
|
|
432
|
-
...queryOptions
|
|
433
|
-
};
|
|
434
|
-
};
|
|
435
|
-
/**
|
|
436
|
-
* @summary List uploaded and uploading OCELs
|
|
437
|
-
*/
|
|
438
|
-
function useGetOcels(params, options, queryClient) {
|
|
439
|
-
const queryOptions = getGetOcelsQueryOptions(params, options);
|
|
440
|
-
return {
|
|
441
|
-
...useQuery(queryOptions, queryClient),
|
|
442
|
-
queryKey: queryOptions.queryKey
|
|
443
|
-
};
|
|
444
|
-
}
|
|
445
|
-
/**
|
|
446
|
-
* @summary Set Filter
|
|
141
|
+
* @summary Create a discovery task
|
|
447
142
|
*/
|
|
448
|
-
const
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
452
|
-
});
|
|
453
|
-
const stringifiedParams = normalizedParams.toString();
|
|
454
|
-
return stringifiedParams.length > 0 ? `/api/external/ocels?${stringifiedParams}` : `/api/external/ocels`;
|
|
455
|
-
};
|
|
456
|
-
const setFilters = async (oCELFilterNull, params, options) => {
|
|
457
|
-
return customFetch(getSetFiltersUrl(params), {
|
|
458
|
-
...options,
|
|
143
|
+
const createDiscoveryTask = (ocelId, createDiscoveryTaskBody, options, signal) => {
|
|
144
|
+
return customFetch$1({
|
|
145
|
+
url: `/api/external/discovery/ocels/${ocelId}/tasks`,
|
|
459
146
|
method: "POST",
|
|
460
|
-
headers: {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
const getSetFiltersMutationOptions = (options) => {
|
|
468
|
-
const mutationKey = ["setFilters"];
|
|
147
|
+
headers: { "Content-Type": "application/json" },
|
|
148
|
+
data: createDiscoveryTaskBody,
|
|
149
|
+
...signal ? { signal } : {}
|
|
150
|
+
}, options);
|
|
151
|
+
};
|
|
152
|
+
const getCreateDiscoveryTaskMutationOptions = (options) => {
|
|
153
|
+
const mutationKey = ["createDiscoveryTask"];
|
|
469
154
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
470
155
|
...options,
|
|
471
156
|
mutation: {
|
|
@@ -477,8 +162,8 @@ const getSetFiltersMutationOptions = (options) => {
|
|
|
477
162
|
request: void 0
|
|
478
163
|
};
|
|
479
164
|
const mutationFn = (props) => {
|
|
480
|
-
const {
|
|
481
|
-
return
|
|
165
|
+
const { ocelId, data } = props ?? {};
|
|
166
|
+
return createDiscoveryTask(ocelId, data, requestOptions);
|
|
482
167
|
};
|
|
483
168
|
return {
|
|
484
169
|
mutationFn,
|
|
@@ -486,76 +171,58 @@ const getSetFiltersMutationOptions = (options) => {
|
|
|
486
171
|
};
|
|
487
172
|
};
|
|
488
173
|
/**
|
|
489
|
-
* @summary
|
|
174
|
+
* @summary Create a discovery task
|
|
490
175
|
*/
|
|
491
|
-
const
|
|
492
|
-
return useMutation(
|
|
176
|
+
const useCreateDiscoveryTask = (options, queryClient) => {
|
|
177
|
+
return useMutation(getCreateDiscoveryTaskMutationOptions(options), queryClient);
|
|
493
178
|
};
|
|
494
179
|
/**
|
|
495
|
-
*
|
|
496
|
-
* @summary Delete an uploaded OCEL
|
|
180
|
+
* @summary Get Discovery Task
|
|
497
181
|
*/
|
|
498
|
-
const
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
return stringifiedParams.length > 0 ? `/api/external/ocels/ocel/delete?${stringifiedParams}` : `/api/external/ocels/ocel/delete`;
|
|
182
|
+
const discoveryTask = (taskId, options, signal) => {
|
|
183
|
+
return customFetch$1({
|
|
184
|
+
url: `/api/external/discovery/tasks/${taskId}`,
|
|
185
|
+
method: "GET",
|
|
186
|
+
...signal ? { signal } : {}
|
|
187
|
+
}, options);
|
|
505
188
|
};
|
|
506
|
-
const
|
|
507
|
-
return
|
|
508
|
-
...options,
|
|
509
|
-
method: "POST"
|
|
510
|
-
});
|
|
189
|
+
const getDiscoveryTaskQueryKey = (taskId) => {
|
|
190
|
+
return [`/api/external/discovery/tasks/${taskId}`];
|
|
511
191
|
};
|
|
512
|
-
const
|
|
513
|
-
const
|
|
514
|
-
const
|
|
515
|
-
|
|
516
|
-
mutation: {
|
|
517
|
-
...options.mutation,
|
|
518
|
-
mutationKey
|
|
519
|
-
}
|
|
520
|
-
} : {
|
|
521
|
-
mutation: { mutationKey },
|
|
522
|
-
request: void 0
|
|
523
|
-
};
|
|
524
|
-
const mutationFn = (props) => {
|
|
525
|
-
const { params } = props ?? {};
|
|
526
|
-
return deleteOcel(params, requestOptions);
|
|
527
|
-
};
|
|
192
|
+
const getDiscoveryTaskQueryOptions = (taskId, options) => {
|
|
193
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
194
|
+
const queryKey = queryOptions?.queryKey ?? getDiscoveryTaskQueryKey(taskId);
|
|
195
|
+
const queryFn = ({ signal }) => discoveryTask(taskId, requestOptions, signal);
|
|
528
196
|
return {
|
|
529
|
-
|
|
530
|
-
|
|
197
|
+
queryKey,
|
|
198
|
+
queryFn,
|
|
199
|
+
enabled: !!taskId,
|
|
200
|
+
staleTime: 3e5,
|
|
201
|
+
...queryOptions
|
|
531
202
|
};
|
|
532
203
|
};
|
|
533
204
|
/**
|
|
534
|
-
* @summary
|
|
205
|
+
* @summary Get Discovery Task
|
|
535
206
|
*/
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
207
|
+
function useDiscoveryTask(taskId, options, queryClient) {
|
|
208
|
+
const queryOptions = getDiscoveryTaskQueryOptions(taskId, options);
|
|
209
|
+
return {
|
|
210
|
+
...useQuery(queryOptions, queryClient),
|
|
211
|
+
queryKey: queryOptions.queryKey
|
|
212
|
+
};
|
|
213
|
+
}
|
|
539
214
|
/**
|
|
540
|
-
*
|
|
541
|
-
* @summary Rename an uploaded OCEL
|
|
215
|
+
* @summary Save Discovery
|
|
542
216
|
*/
|
|
543
|
-
const
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
return stringifiedParams.length > 0 ? `/api/external/ocels/ocel/rename?${stringifiedParams}` : `/api/external/ocels/ocel/rename`;
|
|
550
|
-
};
|
|
551
|
-
const renameOcel = async (params, options) => {
|
|
552
|
-
return customFetch(getRenameOcelUrl(params), {
|
|
553
|
-
...options,
|
|
554
|
-
method: "POST"
|
|
555
|
-
});
|
|
217
|
+
const saveDiscovery = (taskId, options, signal) => {
|
|
218
|
+
return customFetch$1({
|
|
219
|
+
url: `/api/external/discovery/tasks/${taskId}`,
|
|
220
|
+
method: "POST",
|
|
221
|
+
...signal ? { signal } : {}
|
|
222
|
+
}, options);
|
|
556
223
|
};
|
|
557
|
-
const
|
|
558
|
-
const mutationKey = ["
|
|
224
|
+
const getSaveDiscoveryMutationOptions = (options) => {
|
|
225
|
+
const mutationKey = ["saveDiscovery"];
|
|
559
226
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
560
227
|
...options,
|
|
561
228
|
mutation: {
|
|
@@ -567,8 +234,8 @@ const getRenameOcelMutationOptions = (options) => {
|
|
|
567
234
|
request: void 0
|
|
568
235
|
};
|
|
569
236
|
const mutationFn = (props) => {
|
|
570
|
-
const {
|
|
571
|
-
return
|
|
237
|
+
const { taskId } = props ?? {};
|
|
238
|
+
return saveDiscovery(taskId, requestOptions);
|
|
572
239
|
};
|
|
573
240
|
return {
|
|
574
241
|
mutationFn,
|
|
@@ -576,38 +243,28 @@ const getRenameOcelMutationOptions = (options) => {
|
|
|
576
243
|
};
|
|
577
244
|
};
|
|
578
245
|
/**
|
|
579
|
-
* @summary
|
|
246
|
+
* @summary Save Discovery
|
|
580
247
|
*/
|
|
581
|
-
const
|
|
582
|
-
return useMutation(
|
|
248
|
+
const useSaveDiscovery = (options, queryClient) => {
|
|
249
|
+
return useMutation(getSaveDiscoveryMutationOptions(options), queryClient);
|
|
583
250
|
};
|
|
584
251
|
/**
|
|
585
|
-
* @summary
|
|
252
|
+
* @summary List filters available to discovery tasks
|
|
586
253
|
*/
|
|
587
|
-
const
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
return stringifiedParams.length > 0 ? `/api/external/ocels/objects/attributes?${stringifiedParams}` : `/api/external/ocels/objects/attributes`;
|
|
594
|
-
};
|
|
595
|
-
const objectAttributes = async (params, options) => {
|
|
596
|
-
return customFetch(getObjectAttributesUrl(params), {
|
|
597
|
-
...options,
|
|
598
|
-
method: "GET"
|
|
599
|
-
});
|
|
254
|
+
const listDiscoveryFilters = (options, signal) => {
|
|
255
|
+
return customFetch$1({
|
|
256
|
+
url: `/api/external/discovery/filters`,
|
|
257
|
+
method: "GET",
|
|
258
|
+
...signal ? { signal } : {}
|
|
259
|
+
}, options);
|
|
600
260
|
};
|
|
601
|
-
const
|
|
602
|
-
return [`/api/external/
|
|
261
|
+
const getListDiscoveryFiltersQueryKey = () => {
|
|
262
|
+
return [`/api/external/discovery/filters`];
|
|
603
263
|
};
|
|
604
|
-
const
|
|
264
|
+
const getListDiscoveryFiltersQueryOptions = (options) => {
|
|
605
265
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
606
|
-
const queryKey = queryOptions?.queryKey ??
|
|
607
|
-
const queryFn = ({ signal }) =>
|
|
608
|
-
signal,
|
|
609
|
-
...requestOptions
|
|
610
|
-
});
|
|
266
|
+
const queryKey = queryOptions?.queryKey ?? getListDiscoveryFiltersQueryKey();
|
|
267
|
+
const queryFn = ({ signal }) => listDiscoveryFilters(requestOptions, signal);
|
|
611
268
|
return {
|
|
612
269
|
queryKey,
|
|
613
270
|
queryFn,
|
|
@@ -616,42 +273,32 @@ const getObjectAttributesQueryOptions = (params, options) => {
|
|
|
616
273
|
};
|
|
617
274
|
};
|
|
618
275
|
/**
|
|
619
|
-
* @summary
|
|
276
|
+
* @summary List filters available to discovery tasks
|
|
620
277
|
*/
|
|
621
|
-
function
|
|
622
|
-
const queryOptions =
|
|
278
|
+
function useListDiscoveryFilters(options, queryClient) {
|
|
279
|
+
const queryOptions = getListDiscoveryFiltersQueryOptions(options);
|
|
623
280
|
return {
|
|
624
281
|
...useQuery(queryOptions, queryClient),
|
|
625
282
|
queryKey: queryOptions.queryKey
|
|
626
283
|
};
|
|
627
284
|
}
|
|
628
285
|
/**
|
|
629
|
-
* @summary
|
|
286
|
+
* @summary List discovery methods
|
|
630
287
|
*/
|
|
631
|
-
const
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
return stringifiedParams.length > 0 ? `/api/external/ocels/events/attributes?${stringifiedParams}` : `/api/external/ocels/events/attributes`;
|
|
638
|
-
};
|
|
639
|
-
const eventAttributes = async (params, options) => {
|
|
640
|
-
return customFetch(getEventAttributesUrl(params), {
|
|
641
|
-
...options,
|
|
642
|
-
method: "GET"
|
|
643
|
-
});
|
|
288
|
+
const listDiscoveryMethods = (options, signal) => {
|
|
289
|
+
return customFetch$1({
|
|
290
|
+
url: `/api/external/discovery/methods`,
|
|
291
|
+
method: "GET",
|
|
292
|
+
...signal ? { signal } : {}
|
|
293
|
+
}, options);
|
|
644
294
|
};
|
|
645
|
-
const
|
|
646
|
-
return [`/api/external/
|
|
295
|
+
const getListDiscoveryMethodsQueryKey = () => {
|
|
296
|
+
return [`/api/external/discovery/methods`];
|
|
647
297
|
};
|
|
648
|
-
const
|
|
298
|
+
const getListDiscoveryMethodsQueryOptions = (options) => {
|
|
649
299
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
650
|
-
const queryKey = queryOptions?.queryKey ??
|
|
651
|
-
const queryFn = ({ signal }) =>
|
|
652
|
-
signal,
|
|
653
|
-
...requestOptions
|
|
654
|
-
});
|
|
300
|
+
const queryKey = queryOptions?.queryKey ?? getListDiscoveryMethodsQueryKey();
|
|
301
|
+
const queryFn = ({ signal }) => listDiscoveryMethods(requestOptions, signal);
|
|
655
302
|
return {
|
|
656
303
|
queryKey,
|
|
657
304
|
queryFn,
|
|
@@ -660,86 +307,107 @@ const getEventAttributesQueryOptions = (params, options) => {
|
|
|
660
307
|
};
|
|
661
308
|
};
|
|
662
309
|
/**
|
|
663
|
-
* @summary
|
|
310
|
+
* @summary List discovery methods
|
|
664
311
|
*/
|
|
665
|
-
function
|
|
666
|
-
const queryOptions =
|
|
312
|
+
function useListDiscoveryMethods(options, queryClient) {
|
|
313
|
+
const queryOptions = getListDiscoveryMethodsQueryOptions(options);
|
|
667
314
|
return {
|
|
668
315
|
...useQuery(queryOptions, queryClient),
|
|
669
316
|
queryKey: queryOptions.queryKey
|
|
670
317
|
};
|
|
671
318
|
}
|
|
672
319
|
/**
|
|
673
|
-
* @summary
|
|
320
|
+
* @summary Disable a discovery method
|
|
674
321
|
*/
|
|
675
|
-
const
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
return stringifiedParams.length > 0 ? `/api/external/ocels/events/counts?${stringifiedParams}` : `/api/external/ocels/events/counts`;
|
|
322
|
+
const disableDiscoveryMethod = (methodId, options, signal) => {
|
|
323
|
+
return customFetch$1({
|
|
324
|
+
url: `/api/external/discovery/methods/${methodId}/disable`,
|
|
325
|
+
method: "POST",
|
|
326
|
+
...signal ? { signal } : {}
|
|
327
|
+
}, options);
|
|
682
328
|
};
|
|
683
|
-
const
|
|
684
|
-
|
|
329
|
+
const getDisableDiscoveryMethodMutationOptions = (options) => {
|
|
330
|
+
const mutationKey = ["disableDiscoveryMethod"];
|
|
331
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
685
332
|
...options,
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
const
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
});
|
|
333
|
+
mutation: {
|
|
334
|
+
...options.mutation,
|
|
335
|
+
mutationKey
|
|
336
|
+
}
|
|
337
|
+
} : {
|
|
338
|
+
mutation: { mutationKey },
|
|
339
|
+
request: void 0
|
|
340
|
+
};
|
|
341
|
+
const mutationFn = (props) => {
|
|
342
|
+
const { methodId } = props ?? {};
|
|
343
|
+
return disableDiscoveryMethod(methodId, requestOptions);
|
|
344
|
+
};
|
|
699
345
|
return {
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
staleTime: 3e5,
|
|
703
|
-
...queryOptions
|
|
346
|
+
mutationFn,
|
|
347
|
+
...mutationOptions
|
|
704
348
|
};
|
|
705
349
|
};
|
|
706
350
|
/**
|
|
707
|
-
* @summary
|
|
351
|
+
* @summary Disable a discovery method
|
|
352
|
+
*/
|
|
353
|
+
const useDisableDiscoveryMethod = (options, queryClient) => {
|
|
354
|
+
return useMutation(getDisableDiscoveryMethodMutationOptions(options), queryClient);
|
|
355
|
+
};
|
|
356
|
+
/**
|
|
357
|
+
* @summary Enable a discovery method
|
|
708
358
|
*/
|
|
709
|
-
|
|
710
|
-
|
|
359
|
+
const enableDiscoveryMethod = (methodId, options, signal) => {
|
|
360
|
+
return customFetch$1({
|
|
361
|
+
url: `/api/external/discovery/methods/${methodId}/enable`,
|
|
362
|
+
method: "POST",
|
|
363
|
+
...signal ? { signal } : {}
|
|
364
|
+
}, options);
|
|
365
|
+
};
|
|
366
|
+
const getEnableDiscoveryMethodMutationOptions = (options) => {
|
|
367
|
+
const mutationKey = ["enableDiscoveryMethod"];
|
|
368
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
369
|
+
...options,
|
|
370
|
+
mutation: {
|
|
371
|
+
...options.mutation,
|
|
372
|
+
mutationKey
|
|
373
|
+
}
|
|
374
|
+
} : {
|
|
375
|
+
mutation: { mutationKey },
|
|
376
|
+
request: void 0
|
|
377
|
+
};
|
|
378
|
+
const mutationFn = (props) => {
|
|
379
|
+
const { methodId } = props ?? {};
|
|
380
|
+
return enableDiscoveryMethod(methodId, requestOptions);
|
|
381
|
+
};
|
|
711
382
|
return {
|
|
712
|
-
|
|
713
|
-
|
|
383
|
+
mutationFn,
|
|
384
|
+
...mutationOptions
|
|
714
385
|
};
|
|
715
|
-
}
|
|
386
|
+
};
|
|
716
387
|
/**
|
|
717
|
-
* @summary
|
|
388
|
+
* @summary Enable a discovery method
|
|
718
389
|
*/
|
|
719
|
-
const
|
|
720
|
-
|
|
721
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
722
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
723
|
-
});
|
|
724
|
-
const stringifiedParams = normalizedParams.toString();
|
|
725
|
-
return stringifiedParams.length > 0 ? `/api/external/ocels/events/time?${stringifiedParams}` : `/api/external/ocels/events/time`;
|
|
390
|
+
const useEnableDiscoveryMethod = (options, queryClient) => {
|
|
391
|
+
return useMutation(getEnableDiscoveryMethodMutationOptions(options), queryClient);
|
|
726
392
|
};
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
393
|
+
/**
|
|
394
|
+
* @summary returns all tasks of a session
|
|
395
|
+
*/
|
|
396
|
+
const getSystemTasks = (params, options, signal) => {
|
|
397
|
+
return customFetch$1({
|
|
398
|
+
url: `/api/external/tasks/system`,
|
|
399
|
+
method: "GET",
|
|
400
|
+
params,
|
|
401
|
+
...signal ? { signal } : {}
|
|
402
|
+
}, options);
|
|
732
403
|
};
|
|
733
|
-
const
|
|
734
|
-
return [`/api/external/
|
|
404
|
+
const getGetSystemTasksQueryKey = (params) => {
|
|
405
|
+
return [`/api/external/tasks/system`, ...params ? [params] : []];
|
|
735
406
|
};
|
|
736
|
-
const
|
|
407
|
+
const getGetSystemTasksQueryOptions = (params, options) => {
|
|
737
408
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
738
|
-
const queryKey = queryOptions?.queryKey ??
|
|
739
|
-
const queryFn = ({ signal }) =>
|
|
740
|
-
signal,
|
|
741
|
-
...requestOptions
|
|
742
|
-
});
|
|
409
|
+
const queryKey = queryOptions?.queryKey ?? getGetSystemTasksQueryKey(params);
|
|
410
|
+
const queryFn = ({ signal }) => getSystemTasks(params, requestOptions, signal);
|
|
743
411
|
return {
|
|
744
412
|
queryKey,
|
|
745
413
|
queryFn,
|
|
@@ -748,86 +416,67 @@ const getTimeInfoQueryOptions = (params, options) => {
|
|
|
748
416
|
};
|
|
749
417
|
};
|
|
750
418
|
/**
|
|
751
|
-
* @summary
|
|
419
|
+
* @summary returns all tasks of a session
|
|
752
420
|
*/
|
|
753
|
-
function
|
|
754
|
-
const queryOptions =
|
|
421
|
+
function useGetSystemTasks(params, options, queryClient) {
|
|
422
|
+
const queryOptions = getGetSystemTasksQueryOptions(params, options);
|
|
755
423
|
return {
|
|
756
424
|
...useQuery(queryOptions, queryClient),
|
|
757
425
|
queryKey: queryOptions.queryKey
|
|
758
426
|
};
|
|
759
427
|
}
|
|
760
428
|
/**
|
|
761
|
-
* @summary
|
|
429
|
+
* @summary returns the task of a given taskId
|
|
762
430
|
*/
|
|
763
|
-
const
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
return stringifiedParams.length > 0 ? `/api/external/ocels/objects/counts?${stringifiedParams}` : `/api/external/ocels/objects/counts`;
|
|
770
|
-
};
|
|
771
|
-
const objectCounts = async (params, options) => {
|
|
772
|
-
return customFetch(getObjectCountsUrl(params), {
|
|
773
|
-
...options,
|
|
774
|
-
method: "GET"
|
|
775
|
-
});
|
|
431
|
+
const getSystemTask = (taskId, options, signal) => {
|
|
432
|
+
return customFetch$1({
|
|
433
|
+
url: `/api/external/tasks/system/${taskId}`,
|
|
434
|
+
method: "GET",
|
|
435
|
+
...signal ? { signal } : {}
|
|
436
|
+
}, options);
|
|
776
437
|
};
|
|
777
|
-
const
|
|
778
|
-
return [`/api/external/
|
|
438
|
+
const getGetSystemTaskQueryKey = (taskId) => {
|
|
439
|
+
return [`/api/external/tasks/system/${taskId}`];
|
|
779
440
|
};
|
|
780
|
-
const
|
|
441
|
+
const getGetSystemTaskQueryOptions = (taskId, options) => {
|
|
781
442
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
782
|
-
const queryKey = queryOptions?.queryKey ??
|
|
783
|
-
const queryFn = ({ signal }) =>
|
|
784
|
-
signal,
|
|
785
|
-
...requestOptions
|
|
786
|
-
});
|
|
443
|
+
const queryKey = queryOptions?.queryKey ?? getGetSystemTaskQueryKey(taskId);
|
|
444
|
+
const queryFn = ({ signal }) => getSystemTask(taskId, requestOptions, signal);
|
|
787
445
|
return {
|
|
788
446
|
queryKey,
|
|
789
447
|
queryFn,
|
|
448
|
+
enabled: !!taskId,
|
|
790
449
|
staleTime: 3e5,
|
|
791
450
|
...queryOptions
|
|
792
451
|
};
|
|
793
452
|
};
|
|
794
453
|
/**
|
|
795
|
-
* @summary
|
|
454
|
+
* @summary returns the task of a given taskId
|
|
796
455
|
*/
|
|
797
|
-
function
|
|
798
|
-
const queryOptions =
|
|
456
|
+
function useGetSystemTask(taskId, options, queryClient) {
|
|
457
|
+
const queryOptions = getGetSystemTaskQueryOptions(taskId, options);
|
|
799
458
|
return {
|
|
800
459
|
...useQuery(queryOptions, queryClient),
|
|
801
460
|
queryKey: queryOptions.queryKey
|
|
802
461
|
};
|
|
803
462
|
}
|
|
804
463
|
/**
|
|
805
|
-
* @summary Get
|
|
464
|
+
* @summary Get Plugins
|
|
806
465
|
*/
|
|
807
|
-
const
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
return stringifiedParams.length > 0 ? `/api/external/ocels/relations/e2o?${stringifiedParams}` : `/api/external/ocels/relations/e2o`;
|
|
466
|
+
const plugins = (options, signal) => {
|
|
467
|
+
return customFetch$1({
|
|
468
|
+
url: `/api/external/plugins`,
|
|
469
|
+
method: "GET",
|
|
470
|
+
...signal ? { signal } : {}
|
|
471
|
+
}, options);
|
|
814
472
|
};
|
|
815
|
-
const
|
|
816
|
-
return
|
|
817
|
-
...options,
|
|
818
|
-
method: "GET"
|
|
819
|
-
});
|
|
820
|
-
};
|
|
821
|
-
const getE2oQueryKey = (params) => {
|
|
822
|
-
return [`/api/external/ocels/relations/e2o`, ...params ? [params] : []];
|
|
473
|
+
const getPluginsQueryKey = () => {
|
|
474
|
+
return [`/api/external/plugins`];
|
|
823
475
|
};
|
|
824
|
-
const
|
|
476
|
+
const getPluginsQueryOptions = (options) => {
|
|
825
477
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
826
|
-
const queryKey = queryOptions?.queryKey ??
|
|
827
|
-
const queryFn = ({ signal }) =>
|
|
828
|
-
signal,
|
|
829
|
-
...requestOptions
|
|
830
|
-
});
|
|
478
|
+
const queryKey = queryOptions?.queryKey ?? getPluginsQueryKey();
|
|
479
|
+
const queryFn = ({ signal }) => plugins(requestOptions, signal);
|
|
831
480
|
return {
|
|
832
481
|
queryKey,
|
|
833
482
|
queryFn,
|
|
@@ -836,293 +485,251 @@ const getE2oQueryOptions = (params, options) => {
|
|
|
836
485
|
};
|
|
837
486
|
};
|
|
838
487
|
/**
|
|
839
|
-
* @summary Get
|
|
488
|
+
* @summary Get Plugins
|
|
840
489
|
*/
|
|
841
|
-
function
|
|
842
|
-
const queryOptions =
|
|
490
|
+
function usePlugins(options, queryClient) {
|
|
491
|
+
const queryOptions = getPluginsQueryOptions(options);
|
|
843
492
|
return {
|
|
844
493
|
...useQuery(queryOptions, queryClient),
|
|
845
494
|
queryKey: queryOptions.queryKey
|
|
846
495
|
};
|
|
847
496
|
}
|
|
848
497
|
/**
|
|
849
|
-
* @summary Get
|
|
498
|
+
* @summary Get Plugin
|
|
850
499
|
*/
|
|
851
|
-
const
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
return stringifiedParams.length > 0 ? `/api/external/ocels/relations/o2o?${stringifiedParams}` : `/api/external/ocels/relations/o2o`;
|
|
858
|
-
};
|
|
859
|
-
const o2o = async (params, options) => {
|
|
860
|
-
return customFetch(getO2oUrl(params), {
|
|
861
|
-
...options,
|
|
862
|
-
method: "GET"
|
|
863
|
-
});
|
|
500
|
+
const getPlugin = (pluginId, options, signal) => {
|
|
501
|
+
return customFetch$1({
|
|
502
|
+
url: `/api/external/plugins/${pluginId}`,
|
|
503
|
+
method: "GET",
|
|
504
|
+
...signal ? { signal } : {}
|
|
505
|
+
}, options);
|
|
864
506
|
};
|
|
865
|
-
const
|
|
866
|
-
return [`/api/external/
|
|
507
|
+
const getGetPluginQueryKey = (pluginId) => {
|
|
508
|
+
return [`/api/external/plugins/${pluginId}`];
|
|
867
509
|
};
|
|
868
|
-
const
|
|
510
|
+
const getGetPluginQueryOptions = (pluginId, options) => {
|
|
869
511
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
870
|
-
const queryKey = queryOptions?.queryKey ??
|
|
871
|
-
const queryFn = ({ signal }) =>
|
|
872
|
-
signal,
|
|
873
|
-
...requestOptions
|
|
874
|
-
});
|
|
512
|
+
const queryKey = queryOptions?.queryKey ?? getGetPluginQueryKey(pluginId);
|
|
513
|
+
const queryFn = ({ signal }) => getPlugin(pluginId, requestOptions, signal);
|
|
875
514
|
return {
|
|
876
515
|
queryKey,
|
|
877
516
|
queryFn,
|
|
517
|
+
enabled: !!pluginId,
|
|
878
518
|
staleTime: 3e5,
|
|
879
519
|
...queryOptions
|
|
880
520
|
};
|
|
881
521
|
};
|
|
882
522
|
/**
|
|
883
|
-
* @summary Get
|
|
523
|
+
* @summary Get Plugin
|
|
884
524
|
*/
|
|
885
|
-
function
|
|
886
|
-
const queryOptions =
|
|
525
|
+
function useGetPlugin(pluginId, options, queryClient) {
|
|
526
|
+
const queryOptions = getGetPluginQueryOptions(pluginId, options);
|
|
887
527
|
return {
|
|
888
528
|
...useQuery(queryOptions, queryClient),
|
|
889
529
|
queryKey: queryOptions.queryKey
|
|
890
530
|
};
|
|
891
531
|
}
|
|
892
532
|
/**
|
|
893
|
-
* @summary
|
|
533
|
+
* @summary Delete Plugin
|
|
894
534
|
*/
|
|
895
|
-
const
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
return stringifiedParams.length > 0 ? `/api/external/ocels/events/ids?${stringifiedParams}` : `/api/external/ocels/events/ids`;
|
|
535
|
+
const deletePlugin = (pluginId, options, signal) => {
|
|
536
|
+
return customFetch$1({
|
|
537
|
+
url: `/api/external/plugins/${pluginId}`,
|
|
538
|
+
method: "DELETE",
|
|
539
|
+
...signal ? { signal } : {}
|
|
540
|
+
}, options);
|
|
902
541
|
};
|
|
903
|
-
const
|
|
904
|
-
|
|
542
|
+
const getDeletePluginMutationOptions = (options) => {
|
|
543
|
+
const mutationKey = ["deletePlugin"];
|
|
544
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
905
545
|
...options,
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
const
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
});
|
|
546
|
+
mutation: {
|
|
547
|
+
...options.mutation,
|
|
548
|
+
mutationKey
|
|
549
|
+
}
|
|
550
|
+
} : {
|
|
551
|
+
mutation: { mutationKey },
|
|
552
|
+
request: void 0
|
|
553
|
+
};
|
|
554
|
+
const mutationFn = (props) => {
|
|
555
|
+
const { pluginId } = props ?? {};
|
|
556
|
+
return deletePlugin(pluginId, requestOptions);
|
|
557
|
+
};
|
|
919
558
|
return {
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
staleTime: 3e5,
|
|
923
|
-
...queryOptions
|
|
559
|
+
mutationFn,
|
|
560
|
+
...mutationOptions
|
|
924
561
|
};
|
|
925
562
|
};
|
|
926
563
|
/**
|
|
927
|
-
* @summary
|
|
564
|
+
* @summary Delete Plugin
|
|
928
565
|
*/
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
...useQuery(queryOptions, queryClient),
|
|
933
|
-
queryKey: queryOptions.queryKey
|
|
934
|
-
};
|
|
935
|
-
}
|
|
566
|
+
const useDeletePlugin = (options, queryClient) => {
|
|
567
|
+
return useMutation(getDeletePluginMutationOptions(options), queryClient);
|
|
568
|
+
};
|
|
936
569
|
/**
|
|
937
|
-
* @summary Get
|
|
570
|
+
* @summary Get Plugin Method
|
|
938
571
|
*/
|
|
939
|
-
const
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
return stringifiedParams.length > 0 ? `/api/external/ocels/objects/ids?${stringifiedParams}` : `/api/external/ocels/objects/ids`;
|
|
946
|
-
};
|
|
947
|
-
const objectIds = async (params, options) => {
|
|
948
|
-
return customFetch(getObjectIdsUrl(params), {
|
|
949
|
-
...options,
|
|
950
|
-
method: "GET"
|
|
951
|
-
});
|
|
572
|
+
const getPluginMethod = (pluginId, methodName, options, signal) => {
|
|
573
|
+
return customFetch$1({
|
|
574
|
+
url: `/api/external/plugins/${pluginId}/${methodName}`,
|
|
575
|
+
method: "GET",
|
|
576
|
+
...signal ? { signal } : {}
|
|
577
|
+
}, options);
|
|
952
578
|
};
|
|
953
|
-
const
|
|
954
|
-
return [`/api/external/
|
|
579
|
+
const getGetPluginMethodQueryKey = (pluginId, methodName) => {
|
|
580
|
+
return [`/api/external/plugins/${pluginId}/${methodName}`];
|
|
955
581
|
};
|
|
956
|
-
const
|
|
582
|
+
const getGetPluginMethodQueryOptions = (pluginId, methodName, options) => {
|
|
957
583
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
958
|
-
const queryKey = queryOptions?.queryKey ??
|
|
959
|
-
const queryFn = ({ signal }) =>
|
|
960
|
-
signal,
|
|
961
|
-
...requestOptions
|
|
962
|
-
});
|
|
584
|
+
const queryKey = queryOptions?.queryKey ?? getGetPluginMethodQueryKey(pluginId, methodName);
|
|
585
|
+
const queryFn = ({ signal }) => getPluginMethod(pluginId, methodName, requestOptions, signal);
|
|
963
586
|
return {
|
|
964
587
|
queryKey,
|
|
965
588
|
queryFn,
|
|
589
|
+
enabled: !!(pluginId && methodName),
|
|
966
590
|
staleTime: 3e5,
|
|
967
591
|
...queryOptions
|
|
968
592
|
};
|
|
969
593
|
};
|
|
970
594
|
/**
|
|
971
|
-
* @summary Get
|
|
595
|
+
* @summary Get Plugin Method
|
|
972
596
|
*/
|
|
973
|
-
function
|
|
974
|
-
const queryOptions =
|
|
597
|
+
function useGetPluginMethod(pluginId, methodName, options, queryClient) {
|
|
598
|
+
const queryOptions = getGetPluginMethodQueryOptions(pluginId, methodName, options);
|
|
975
599
|
return {
|
|
976
600
|
...useQuery(queryOptions, queryClient),
|
|
977
601
|
queryKey: queryOptions.queryKey
|
|
978
602
|
};
|
|
979
603
|
}
|
|
980
604
|
/**
|
|
981
|
-
* @summary
|
|
605
|
+
* @summary Run Plugin
|
|
982
606
|
*/
|
|
983
|
-
const
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
607
|
+
const runPlugin = (pluginId, methodName, bodyRunPlugin, options, signal) => {
|
|
608
|
+
return customFetch$1({
|
|
609
|
+
url: `/api/external/plugins/${pluginId}/${methodName}`,
|
|
610
|
+
method: "POST",
|
|
611
|
+
headers: { "Content-Type": "application/json" },
|
|
612
|
+
data: bodyRunPlugin,
|
|
613
|
+
...signal ? { signal } : {}
|
|
614
|
+
}, options);
|
|
990
615
|
};
|
|
991
|
-
const
|
|
992
|
-
|
|
616
|
+
const getRunPluginMutationOptions = (options) => {
|
|
617
|
+
const mutationKey = ["runPlugin"];
|
|
618
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
993
619
|
...options,
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
const
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
});
|
|
620
|
+
mutation: {
|
|
621
|
+
...options.mutation,
|
|
622
|
+
mutationKey
|
|
623
|
+
}
|
|
624
|
+
} : {
|
|
625
|
+
mutation: { mutationKey },
|
|
626
|
+
request: void 0
|
|
627
|
+
};
|
|
628
|
+
const mutationFn = (props) => {
|
|
629
|
+
const { pluginId, methodName, data } = props ?? {};
|
|
630
|
+
return runPlugin(pluginId, methodName, data, requestOptions);
|
|
631
|
+
};
|
|
1007
632
|
return {
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
staleTime: 3e5,
|
|
1011
|
-
...queryOptions
|
|
633
|
+
mutationFn,
|
|
634
|
+
...mutationOptions
|
|
1012
635
|
};
|
|
1013
636
|
};
|
|
1014
637
|
/**
|
|
1015
|
-
* @summary
|
|
638
|
+
* @summary Run Plugin
|
|
1016
639
|
*/
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
...useQuery(queryOptions, queryClient),
|
|
1021
|
-
queryKey: queryOptions.queryKey
|
|
1022
|
-
};
|
|
1023
|
-
}
|
|
640
|
+
const useRunPlugin = (options, queryClient) => {
|
|
641
|
+
return useMutation(getRunPluginMutationOptions(options), queryClient);
|
|
642
|
+
};
|
|
1024
643
|
/**
|
|
1025
|
-
* @summary Get
|
|
644
|
+
* @summary Get Plugin Result
|
|
1026
645
|
*/
|
|
1027
|
-
const
|
|
1028
|
-
return
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
method: "GET"
|
|
1034
|
-
});
|
|
646
|
+
const pluginResult = (pluginId, methodName, taskId, options, signal) => {
|
|
647
|
+
return customFetch$1({
|
|
648
|
+
url: `/api/external/plugins/${pluginId}/${methodName}/result/${taskId}`,
|
|
649
|
+
method: "GET",
|
|
650
|
+
...signal ? { signal } : {}
|
|
651
|
+
}, options);
|
|
1035
652
|
};
|
|
1036
|
-
const
|
|
1037
|
-
return [`/api/external/
|
|
653
|
+
const getPluginResultQueryKey = (pluginId, methodName, taskId) => {
|
|
654
|
+
return [`/api/external/plugins/${pluginId}/${methodName}/result/${taskId}`];
|
|
1038
655
|
};
|
|
1039
|
-
const
|
|
656
|
+
const getPluginResultQueryOptions = (pluginId, methodName, taskId, options) => {
|
|
1040
657
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1041
|
-
const queryKey = queryOptions?.queryKey ??
|
|
1042
|
-
const queryFn = ({ signal }) =>
|
|
1043
|
-
signal,
|
|
1044
|
-
...requestOptions
|
|
1045
|
-
});
|
|
658
|
+
const queryKey = queryOptions?.queryKey ?? getPluginResultQueryKey(pluginId, methodName, taskId);
|
|
659
|
+
const queryFn = ({ signal }) => pluginResult(pluginId, methodName, taskId, requestOptions, signal);
|
|
1046
660
|
return {
|
|
1047
661
|
queryKey,
|
|
1048
662
|
queryFn,
|
|
663
|
+
enabled: !!(pluginId && methodName && taskId),
|
|
1049
664
|
staleTime: 3e5,
|
|
1050
665
|
...queryOptions
|
|
1051
666
|
};
|
|
1052
667
|
};
|
|
1053
668
|
/**
|
|
1054
|
-
* @summary Get
|
|
669
|
+
* @summary Get Plugin Result
|
|
1055
670
|
*/
|
|
1056
|
-
function
|
|
1057
|
-
const queryOptions =
|
|
671
|
+
function usePluginResult(pluginId, methodName, taskId, options, queryClient) {
|
|
672
|
+
const queryOptions = getPluginResultQueryOptions(pluginId, methodName, taskId, options);
|
|
1058
673
|
return {
|
|
1059
674
|
...useQuery(queryOptions, queryClient),
|
|
1060
675
|
queryKey: queryOptions.queryKey
|
|
1061
676
|
};
|
|
1062
677
|
}
|
|
1063
678
|
/**
|
|
1064
|
-
*
|
|
679
|
+
* Save the selected results into the session as OCELs / resources.
|
|
680
|
+
* @summary Save Plugin Results
|
|
1065
681
|
*/
|
|
1066
|
-
const
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
682
|
+
const savePluginResults = (pluginId, methodName, taskId, bodySavePluginResults, options, signal) => {
|
|
683
|
+
return customFetch$1({
|
|
684
|
+
url: `/api/external/plugins/${pluginId}/${methodName}/result/${taskId}/save`,
|
|
685
|
+
method: "POST",
|
|
686
|
+
headers: { "Content-Type": "application/json" },
|
|
687
|
+
data: bodySavePluginResults,
|
|
688
|
+
...signal ? { signal } : {}
|
|
689
|
+
}, options);
|
|
1073
690
|
};
|
|
1074
|
-
const
|
|
1075
|
-
|
|
691
|
+
const getSavePluginResultsMutationOptions = (options) => {
|
|
692
|
+
const mutationKey = ["savePluginResults"];
|
|
693
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1076
694
|
...options,
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
}
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
const
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
});
|
|
695
|
+
mutation: {
|
|
696
|
+
...options.mutation,
|
|
697
|
+
mutationKey
|
|
698
|
+
}
|
|
699
|
+
} : {
|
|
700
|
+
mutation: { mutationKey },
|
|
701
|
+
request: void 0
|
|
702
|
+
};
|
|
703
|
+
const mutationFn = (props) => {
|
|
704
|
+
const { pluginId, methodName, taskId, data } = props ?? {};
|
|
705
|
+
return savePluginResults(pluginId, methodName, taskId, data, requestOptions);
|
|
706
|
+
};
|
|
1090
707
|
return {
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
staleTime: 3e5,
|
|
1094
|
-
...queryOptions
|
|
708
|
+
mutationFn,
|
|
709
|
+
...mutationOptions
|
|
1095
710
|
};
|
|
1096
711
|
};
|
|
1097
712
|
/**
|
|
1098
|
-
* @summary
|
|
713
|
+
* @summary Save Plugin Results
|
|
1099
714
|
*/
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
...useQuery(queryOptions, queryClient),
|
|
1104
|
-
queryKey: queryOptions.queryKey
|
|
1105
|
-
};
|
|
1106
|
-
}
|
|
715
|
+
const useSavePluginResults = (options, queryClient) => {
|
|
716
|
+
return useMutation(getSavePluginResultsMutationOptions(options), queryClient);
|
|
717
|
+
};
|
|
1107
718
|
/**
|
|
1108
|
-
*
|
|
719
|
+
* Bundle the selected results into a zip for download.
|
|
720
|
+
* @summary Download Plugin Results
|
|
1109
721
|
*/
|
|
1110
|
-
const
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
};
|
|
1118
|
-
const importDefaultOcel = async (params, options) => {
|
|
1119
|
-
return customFetch(getImportDefaultOcelUrl(params), {
|
|
1120
|
-
...options,
|
|
1121
|
-
method: "POST"
|
|
1122
|
-
});
|
|
722
|
+
const downloadPluginResults = (pluginId, methodName, taskId, bodyDownloadPluginResults, options, signal) => {
|
|
723
|
+
return customFetch$1({
|
|
724
|
+
url: `/api/external/plugins/${pluginId}/${methodName}/result/${taskId}/download`,
|
|
725
|
+
method: "POST",
|
|
726
|
+
headers: { "Content-Type": "application/json" },
|
|
727
|
+
data: bodyDownloadPluginResults,
|
|
728
|
+
...signal ? { signal } : {}
|
|
729
|
+
}, options);
|
|
1123
730
|
};
|
|
1124
|
-
const
|
|
1125
|
-
const mutationKey = ["
|
|
731
|
+
const getDownloadPluginResultsMutationOptions = (options) => {
|
|
732
|
+
const mutationKey = ["downloadPluginResults"];
|
|
1126
733
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1127
734
|
...options,
|
|
1128
735
|
mutation: {
|
|
@@ -1134,8 +741,8 @@ const getImportDefaultOcelMutationOptions = (options) => {
|
|
|
1134
741
|
request: void 0
|
|
1135
742
|
};
|
|
1136
743
|
const mutationFn = (props) => {
|
|
1137
|
-
const {
|
|
1138
|
-
return
|
|
744
|
+
const { pluginId, methodName, taskId, data } = props ?? {};
|
|
745
|
+
return downloadPluginResults(pluginId, methodName, taskId, data, requestOptions);
|
|
1139
746
|
};
|
|
1140
747
|
return {
|
|
1141
748
|
mutationFn,
|
|
@@ -1143,82 +750,66 @@ const getImportDefaultOcelMutationOptions = (options) => {
|
|
|
1143
750
|
};
|
|
1144
751
|
};
|
|
1145
752
|
/**
|
|
1146
|
-
* @summary
|
|
753
|
+
* @summary Download Plugin Results
|
|
1147
754
|
*/
|
|
1148
|
-
const
|
|
1149
|
-
return useMutation(
|
|
755
|
+
const useDownloadPluginResults = (options, queryClient) => {
|
|
756
|
+
return useMutation(getDownloadPluginResultsMutationOptions(options), queryClient);
|
|
1150
757
|
};
|
|
1151
758
|
/**
|
|
1152
|
-
* @summary
|
|
759
|
+
* @summary Get Computed
|
|
1153
760
|
*/
|
|
1154
|
-
const
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
};
|
|
1162
|
-
const downloadOcelOcelsDownloadGet = async (params, options) => {
|
|
1163
|
-
return customFetch(getDownloadOcelOcelsDownloadGetUrl(params), {
|
|
1164
|
-
...options,
|
|
1165
|
-
method: "GET"
|
|
1166
|
-
});
|
|
761
|
+
const getComputedValues = (pluginId, methodName, provider, bodyGetComputedValues, options, signal) => {
|
|
762
|
+
return customFetch$1({
|
|
763
|
+
url: `/api/external/plugins/${pluginId}/${methodName}/computed/${provider}`,
|
|
764
|
+
method: "POST",
|
|
765
|
+
headers: { "Content-Type": "application/json" },
|
|
766
|
+
data: bodyGetComputedValues,
|
|
767
|
+
...signal ? { signal } : {}
|
|
768
|
+
}, options);
|
|
1167
769
|
};
|
|
1168
|
-
const
|
|
1169
|
-
return [`/api/external/
|
|
770
|
+
const getGetComputedValuesQueryKey = (pluginId, methodName, provider, bodyGetComputedValues) => {
|
|
771
|
+
return [`/api/external/plugins/${pluginId}/${methodName}/computed/${provider}`, bodyGetComputedValues];
|
|
1170
772
|
};
|
|
1171
|
-
const
|
|
773
|
+
const getGetComputedValuesQueryOptions = (pluginId, methodName, provider, bodyGetComputedValues, options) => {
|
|
1172
774
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1173
|
-
const queryKey = queryOptions?.queryKey ??
|
|
1174
|
-
const queryFn = ({ signal }) =>
|
|
1175
|
-
signal,
|
|
1176
|
-
...requestOptions
|
|
1177
|
-
});
|
|
775
|
+
const queryKey = queryOptions?.queryKey ?? getGetComputedValuesQueryKey(pluginId, methodName, provider, bodyGetComputedValues);
|
|
776
|
+
const queryFn = ({ signal }) => getComputedValues(pluginId, methodName, provider, bodyGetComputedValues, requestOptions, signal);
|
|
1178
777
|
return {
|
|
1179
778
|
queryKey,
|
|
1180
779
|
queryFn,
|
|
780
|
+
enabled: !!(pluginId && methodName && provider),
|
|
1181
781
|
staleTime: 3e5,
|
|
1182
782
|
...queryOptions
|
|
1183
783
|
};
|
|
1184
784
|
};
|
|
1185
785
|
/**
|
|
1186
|
-
* @summary
|
|
786
|
+
* @summary Get Computed
|
|
1187
787
|
*/
|
|
1188
|
-
function
|
|
1189
|
-
const queryOptions =
|
|
788
|
+
function useGetComputedValues(pluginId, methodName, provider, bodyGetComputedValues, options, queryClient) {
|
|
789
|
+
const queryOptions = getGetComputedValuesQueryOptions(pluginId, methodName, provider, bodyGetComputedValues, options);
|
|
1190
790
|
return {
|
|
1191
791
|
...useQuery(queryOptions, queryClient),
|
|
1192
792
|
queryKey: queryOptions.queryKey
|
|
1193
793
|
};
|
|
1194
794
|
}
|
|
1195
795
|
/**
|
|
1196
|
-
* @summary
|
|
796
|
+
* @summary Get Resources
|
|
1197
797
|
*/
|
|
1198
|
-
const
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
};
|
|
1206
|
-
const getSystemTasks = async (params, options) => {
|
|
1207
|
-
return customFetch(getGetSystemTasksUrl(params), {
|
|
1208
|
-
...options,
|
|
1209
|
-
method: "GET"
|
|
1210
|
-
});
|
|
798
|
+
const resources = (params, options, signal) => {
|
|
799
|
+
return customFetch$1({
|
|
800
|
+
url: `/api/external/resources`,
|
|
801
|
+
method: "GET",
|
|
802
|
+
params,
|
|
803
|
+
...signal ? { signal } : {}
|
|
804
|
+
}, options);
|
|
1211
805
|
};
|
|
1212
|
-
const
|
|
1213
|
-
return [`/api/external/
|
|
806
|
+
const getResourcesQueryKey = (params) => {
|
|
807
|
+
return [`/api/external/resources`, ...params ? [params] : []];
|
|
1214
808
|
};
|
|
1215
|
-
const
|
|
809
|
+
const getResourcesQueryOptions = (params, options) => {
|
|
1216
810
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1217
|
-
const queryKey = queryOptions?.queryKey ??
|
|
1218
|
-
const queryFn = ({ signal }) =>
|
|
1219
|
-
signal,
|
|
1220
|
-
...requestOptions
|
|
1221
|
-
});
|
|
811
|
+
const queryKey = queryOptions?.queryKey ?? getResourcesQueryKey(params);
|
|
812
|
+
const queryFn = ({ signal }) => resources(params, requestOptions, signal);
|
|
1222
813
|
return {
|
|
1223
814
|
queryKey,
|
|
1224
815
|
queryFn,
|
|
@@ -1227,195 +818,244 @@ const getGetSystemTasksQueryOptions = (params, options) => {
|
|
|
1227
818
|
};
|
|
1228
819
|
};
|
|
1229
820
|
/**
|
|
1230
|
-
* @summary
|
|
821
|
+
* @summary Get Resources
|
|
1231
822
|
*/
|
|
1232
|
-
function
|
|
1233
|
-
const queryOptions =
|
|
823
|
+
function useResources(params, options, queryClient) {
|
|
824
|
+
const queryOptions = getResourcesQueryOptions(params, options);
|
|
1234
825
|
return {
|
|
1235
826
|
...useQuery(queryOptions, queryClient),
|
|
1236
827
|
queryKey: queryOptions.queryKey
|
|
1237
828
|
};
|
|
1238
829
|
}
|
|
1239
830
|
/**
|
|
1240
|
-
* @summary
|
|
831
|
+
* @summary Upload Resource
|
|
1241
832
|
*/
|
|
1242
|
-
const
|
|
1243
|
-
|
|
833
|
+
const uploadResource = (bodyUploadResource, options, signal) => {
|
|
834
|
+
const formData = new FormData();
|
|
835
|
+
formData.append(`file`, bodyUploadResource.file);
|
|
836
|
+
return customFetch$1({
|
|
837
|
+
url: `/api/external/resources`,
|
|
838
|
+
method: "POST",
|
|
839
|
+
data: formData,
|
|
840
|
+
...signal ? { signal } : {}
|
|
841
|
+
}, options);
|
|
1244
842
|
};
|
|
1245
|
-
const
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
843
|
+
const getUploadResourceMutationOptions = (options) => {
|
|
844
|
+
const mutationKey = ["uploadResource"];
|
|
845
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
846
|
+
...options,
|
|
847
|
+
mutation: {
|
|
848
|
+
...options.mutation,
|
|
849
|
+
mutationKey
|
|
850
|
+
}
|
|
851
|
+
} : {
|
|
852
|
+
mutation: { mutationKey },
|
|
853
|
+
request: void 0
|
|
854
|
+
};
|
|
855
|
+
const mutationFn = (props) => {
|
|
856
|
+
const { data } = props ?? {};
|
|
857
|
+
return uploadResource(data, requestOptions);
|
|
858
|
+
};
|
|
859
|
+
return {
|
|
860
|
+
mutationFn,
|
|
861
|
+
...mutationOptions
|
|
862
|
+
};
|
|
1250
863
|
};
|
|
1251
|
-
|
|
1252
|
-
|
|
864
|
+
/**
|
|
865
|
+
* @summary Upload Resource
|
|
866
|
+
*/
|
|
867
|
+
const useUploadResource = (options, queryClient) => {
|
|
868
|
+
return useMutation(getUploadResourceMutationOptions(options), queryClient);
|
|
1253
869
|
};
|
|
1254
|
-
|
|
870
|
+
/**
|
|
871
|
+
* @summary Get Resource Meta
|
|
872
|
+
*/
|
|
873
|
+
const getResourceMeta = (options, signal) => {
|
|
874
|
+
return customFetch$1({
|
|
875
|
+
url: `/api/external/resources/meta`,
|
|
876
|
+
method: "GET",
|
|
877
|
+
...signal ? { signal } : {}
|
|
878
|
+
}, options);
|
|
879
|
+
};
|
|
880
|
+
const getGetResourceMetaQueryKey = () => {
|
|
881
|
+
return [`/api/external/resources/meta`];
|
|
882
|
+
};
|
|
883
|
+
const getGetResourceMetaQueryOptions = (options) => {
|
|
1255
884
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1256
|
-
const queryKey = queryOptions?.queryKey ??
|
|
1257
|
-
const queryFn = ({ signal }) =>
|
|
1258
|
-
signal,
|
|
1259
|
-
...requestOptions
|
|
1260
|
-
});
|
|
885
|
+
const queryKey = queryOptions?.queryKey ?? getGetResourceMetaQueryKey();
|
|
886
|
+
const queryFn = ({ signal }) => getResourceMeta(requestOptions, signal);
|
|
1261
887
|
return {
|
|
1262
888
|
queryKey,
|
|
1263
889
|
queryFn,
|
|
1264
|
-
enabled: !!taskId,
|
|
1265
890
|
staleTime: 3e5,
|
|
1266
891
|
...queryOptions
|
|
1267
892
|
};
|
|
1268
893
|
};
|
|
1269
894
|
/**
|
|
1270
|
-
* @summary
|
|
895
|
+
* @summary Get Resource Meta
|
|
1271
896
|
*/
|
|
1272
|
-
function
|
|
1273
|
-
const queryOptions =
|
|
897
|
+
function useGetResourceMeta(options, queryClient) {
|
|
898
|
+
const queryOptions = getGetResourceMetaQueryOptions(options);
|
|
1274
899
|
return {
|
|
1275
900
|
...useQuery(queryOptions, queryClient),
|
|
1276
901
|
queryKey: queryOptions.queryKey
|
|
1277
902
|
};
|
|
1278
903
|
}
|
|
1279
904
|
/**
|
|
1280
|
-
* @summary
|
|
905
|
+
* @summary Download Resource
|
|
1281
906
|
*/
|
|
1282
|
-
const
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
return stringifiedParams.length > 0 ? `/api/external/tasks/plugin?${stringifiedParams}` : `/api/external/tasks/plugin`;
|
|
1289
|
-
};
|
|
1290
|
-
const getPluginTasks = async (params, options) => {
|
|
1291
|
-
return customFetch(getGetPluginTasksUrl(params), {
|
|
1292
|
-
...options,
|
|
1293
|
-
method: "GET"
|
|
1294
|
-
});
|
|
907
|
+
const downloadResource = (resourceId, options, signal) => {
|
|
908
|
+
return customFetch$1({
|
|
909
|
+
url: `/api/external/resources/resource/${resourceId}/download`,
|
|
910
|
+
method: "GET",
|
|
911
|
+
...signal ? { signal } : {}
|
|
912
|
+
}, options);
|
|
1295
913
|
};
|
|
1296
|
-
const
|
|
1297
|
-
return [`/api/external/
|
|
914
|
+
const getDownloadResourceQueryKey = (resourceId) => {
|
|
915
|
+
return [`/api/external/resources/resource/${resourceId}/download`];
|
|
1298
916
|
};
|
|
1299
|
-
const
|
|
917
|
+
const getDownloadResourceQueryOptions = (resourceId, options) => {
|
|
1300
918
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1301
|
-
const queryKey = queryOptions?.queryKey ??
|
|
1302
|
-
const queryFn = ({ signal }) =>
|
|
1303
|
-
signal,
|
|
1304
|
-
...requestOptions
|
|
1305
|
-
});
|
|
919
|
+
const queryKey = queryOptions?.queryKey ?? getDownloadResourceQueryKey(resourceId);
|
|
920
|
+
const queryFn = ({ signal }) => downloadResource(resourceId, requestOptions, signal);
|
|
1306
921
|
return {
|
|
1307
922
|
queryKey,
|
|
1308
923
|
queryFn,
|
|
924
|
+
enabled: !!resourceId,
|
|
1309
925
|
staleTime: 3e5,
|
|
1310
926
|
...queryOptions
|
|
1311
927
|
};
|
|
1312
928
|
};
|
|
1313
929
|
/**
|
|
1314
|
-
* @summary
|
|
930
|
+
* @summary Download Resource
|
|
1315
931
|
*/
|
|
1316
|
-
function
|
|
1317
|
-
const queryOptions =
|
|
932
|
+
function useDownloadResource(resourceId, options, queryClient) {
|
|
933
|
+
const queryOptions = getDownloadResourceQueryOptions(resourceId, options);
|
|
1318
934
|
return {
|
|
1319
935
|
...useQuery(queryOptions, queryClient),
|
|
1320
936
|
queryKey: queryOptions.queryKey
|
|
1321
937
|
};
|
|
1322
938
|
}
|
|
1323
939
|
/**
|
|
1324
|
-
* @summary
|
|
940
|
+
* @summary Download Resource As Pnml
|
|
1325
941
|
*/
|
|
1326
|
-
const
|
|
1327
|
-
return
|
|
1328
|
-
}
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
method: "GET"
|
|
1333
|
-
});
|
|
942
|
+
const downloadResourceAsPnml = (resourceId, options, signal) => {
|
|
943
|
+
return customFetch$1({
|
|
944
|
+
url: `/api/external/resources/resource/${resourceId}/download/pnml`,
|
|
945
|
+
method: "GET",
|
|
946
|
+
...signal ? { signal } : {}
|
|
947
|
+
}, options);
|
|
1334
948
|
};
|
|
1335
|
-
const
|
|
1336
|
-
return [`/api/external/
|
|
949
|
+
const getDownloadResourceAsPnmlQueryKey = (resourceId) => {
|
|
950
|
+
return [`/api/external/resources/resource/${resourceId}/download/pnml`];
|
|
1337
951
|
};
|
|
1338
|
-
const
|
|
952
|
+
const getDownloadResourceAsPnmlQueryOptions = (resourceId, options) => {
|
|
1339
953
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1340
|
-
const queryKey = queryOptions?.queryKey ??
|
|
1341
|
-
const queryFn = ({ signal }) =>
|
|
1342
|
-
signal,
|
|
1343
|
-
...requestOptions
|
|
1344
|
-
});
|
|
954
|
+
const queryKey = queryOptions?.queryKey ?? getDownloadResourceAsPnmlQueryKey(resourceId);
|
|
955
|
+
const queryFn = ({ signal }) => downloadResourceAsPnml(resourceId, requestOptions, signal);
|
|
1345
956
|
return {
|
|
1346
957
|
queryKey,
|
|
1347
958
|
queryFn,
|
|
1348
|
-
enabled: !!
|
|
959
|
+
enabled: !!resourceId,
|
|
1349
960
|
staleTime: 3e5,
|
|
1350
961
|
...queryOptions
|
|
1351
962
|
};
|
|
1352
963
|
};
|
|
1353
964
|
/**
|
|
1354
|
-
* @summary
|
|
965
|
+
* @summary Download Resource As Pnml
|
|
1355
966
|
*/
|
|
1356
|
-
function
|
|
1357
|
-
const queryOptions =
|
|
967
|
+
function useDownloadResourceAsPnml(resourceId, options, queryClient) {
|
|
968
|
+
const queryOptions = getDownloadResourceAsPnmlQueryOptions(resourceId, options);
|
|
1358
969
|
return {
|
|
1359
970
|
...useQuery(queryOptions, queryClient),
|
|
1360
971
|
queryKey: queryOptions.queryKey
|
|
1361
972
|
};
|
|
1362
973
|
}
|
|
1363
974
|
/**
|
|
1364
|
-
* @summary Get
|
|
975
|
+
* @summary Get Resource
|
|
1365
976
|
*/
|
|
1366
|
-
const
|
|
1367
|
-
return
|
|
1368
|
-
}
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
method: "GET"
|
|
1373
|
-
});
|
|
977
|
+
const resource = (resourceId, options, signal) => {
|
|
978
|
+
return customFetch$1({
|
|
979
|
+
url: `/api/external/resources/resource/${resourceId}`,
|
|
980
|
+
method: "GET",
|
|
981
|
+
...signal ? { signal } : {}
|
|
982
|
+
}, options);
|
|
1374
983
|
};
|
|
1375
|
-
const
|
|
1376
|
-
return [`/api/external/
|
|
984
|
+
const getResourceQueryKey = (resourceId) => {
|
|
985
|
+
return [`/api/external/resources/resource/${resourceId}`];
|
|
1377
986
|
};
|
|
1378
|
-
const
|
|
987
|
+
const getResourceQueryOptions = (resourceId, options) => {
|
|
1379
988
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1380
|
-
const queryKey = queryOptions?.queryKey ??
|
|
1381
|
-
const queryFn = ({ signal }) =>
|
|
1382
|
-
signal,
|
|
1383
|
-
...requestOptions
|
|
1384
|
-
});
|
|
989
|
+
const queryKey = queryOptions?.queryKey ?? getResourceQueryKey(resourceId);
|
|
990
|
+
const queryFn = ({ signal }) => resource(resourceId, requestOptions, signal);
|
|
1385
991
|
return {
|
|
1386
992
|
queryKey,
|
|
1387
993
|
queryFn,
|
|
994
|
+
enabled: !!resourceId,
|
|
1388
995
|
staleTime: 3e5,
|
|
1389
996
|
...queryOptions
|
|
1390
997
|
};
|
|
1391
998
|
};
|
|
1392
999
|
/**
|
|
1393
|
-
* @summary Get
|
|
1000
|
+
* @summary Get Resource
|
|
1394
1001
|
*/
|
|
1395
|
-
function
|
|
1396
|
-
const queryOptions =
|
|
1002
|
+
function useResource(resourceId, options, queryClient) {
|
|
1003
|
+
const queryOptions = getResourceQueryOptions(resourceId, options);
|
|
1397
1004
|
return {
|
|
1398
1005
|
...useQuery(queryOptions, queryClient),
|
|
1399
1006
|
queryKey: queryOptions.queryKey
|
|
1400
1007
|
};
|
|
1401
1008
|
}
|
|
1402
1009
|
/**
|
|
1403
|
-
* @summary
|
|
1010
|
+
* @summary Delete Resource
|
|
1404
1011
|
*/
|
|
1405
|
-
const
|
|
1406
|
-
return
|
|
1012
|
+
const deleteResource = (resourceId, options, signal) => {
|
|
1013
|
+
return customFetch$1({
|
|
1014
|
+
url: `/api/external/resources/resource/${resourceId}`,
|
|
1015
|
+
method: "DELETE",
|
|
1016
|
+
...signal ? { signal } : {}
|
|
1017
|
+
}, options);
|
|
1407
1018
|
};
|
|
1408
|
-
const
|
|
1409
|
-
const
|
|
1410
|
-
|
|
1411
|
-
return customFetch(getUploadPluginUrl(), {
|
|
1019
|
+
const getDeleteResourceMutationOptions = (options) => {
|
|
1020
|
+
const mutationKey = ["deleteResource"];
|
|
1021
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1412
1022
|
...options,
|
|
1023
|
+
mutation: {
|
|
1024
|
+
...options.mutation,
|
|
1025
|
+
mutationKey
|
|
1026
|
+
}
|
|
1027
|
+
} : {
|
|
1028
|
+
mutation: { mutationKey },
|
|
1029
|
+
request: void 0
|
|
1030
|
+
};
|
|
1031
|
+
const mutationFn = (props) => {
|
|
1032
|
+
const { resourceId } = props ?? {};
|
|
1033
|
+
return deleteResource(resourceId, requestOptions);
|
|
1034
|
+
};
|
|
1035
|
+
return {
|
|
1036
|
+
mutationFn,
|
|
1037
|
+
...mutationOptions
|
|
1038
|
+
};
|
|
1039
|
+
};
|
|
1040
|
+
/**
|
|
1041
|
+
* @summary Delete Resource
|
|
1042
|
+
*/
|
|
1043
|
+
const useDeleteResource = (options, queryClient) => {
|
|
1044
|
+
return useMutation(getDeleteResourceMutationOptions(options), queryClient);
|
|
1045
|
+
};
|
|
1046
|
+
/**
|
|
1047
|
+
* @summary Rename Resource
|
|
1048
|
+
*/
|
|
1049
|
+
const renameResource = (resourceId, params, options, signal) => {
|
|
1050
|
+
return customFetch$1({
|
|
1051
|
+
url: `/api/external/resources/resource/${resourceId}`,
|
|
1413
1052
|
method: "POST",
|
|
1414
|
-
|
|
1415
|
-
|
|
1053
|
+
params,
|
|
1054
|
+
...signal ? { signal } : {}
|
|
1055
|
+
}, options);
|
|
1416
1056
|
};
|
|
1417
|
-
const
|
|
1418
|
-
const mutationKey = ["
|
|
1057
|
+
const getRenameResourceMutationOptions = (options) => {
|
|
1058
|
+
const mutationKey = ["renameResource"];
|
|
1419
1059
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1420
1060
|
...options,
|
|
1421
1061
|
mutation: {
|
|
@@ -1427,8 +1067,8 @@ const getUploadPluginMutationOptions = (options) => {
|
|
|
1427
1067
|
request: void 0
|
|
1428
1068
|
};
|
|
1429
1069
|
const mutationFn = (props) => {
|
|
1430
|
-
const {
|
|
1431
|
-
return
|
|
1070
|
+
const { resourceId, params } = props ?? {};
|
|
1071
|
+
return renameResource(resourceId, params, requestOptions);
|
|
1432
1072
|
};
|
|
1433
1073
|
return {
|
|
1434
1074
|
mutationFn,
|
|
@@ -1436,65 +1076,136 @@ const getUploadPluginMutationOptions = (options) => {
|
|
|
1436
1076
|
};
|
|
1437
1077
|
};
|
|
1438
1078
|
/**
|
|
1439
|
-
* @summary
|
|
1079
|
+
* @summary Rename Resource
|
|
1440
1080
|
*/
|
|
1441
|
-
const
|
|
1442
|
-
return useMutation(
|
|
1081
|
+
const useRenameResource = (options, queryClient) => {
|
|
1082
|
+
return useMutation(getRenameResourceMutationOptions(options), queryClient);
|
|
1443
1083
|
};
|
|
1084
|
+
//#endregion
|
|
1085
|
+
//#region src/api/ocel/index.ts
|
|
1444
1086
|
/**
|
|
1445
|
-
*
|
|
1087
|
+
* Generated by orval v8.5.2 🍺
|
|
1088
|
+
* Do not edit manually.
|
|
1089
|
+
* OCEL
|
|
1090
|
+
* OpenAPI spec version: 1.0
|
|
1446
1091
|
*/
|
|
1447
|
-
const
|
|
1448
|
-
|
|
1092
|
+
const ValueType = {
|
|
1093
|
+
empty: "empty",
|
|
1094
|
+
string: "string",
|
|
1095
|
+
bool: "bool",
|
|
1096
|
+
int: "int",
|
|
1097
|
+
float: "float",
|
|
1098
|
+
date: "date"
|
|
1449
1099
|
};
|
|
1450
|
-
const
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
method: "GET"
|
|
1454
|
-
});
|
|
1100
|
+
const AggregatedAttributesEntityType = {
|
|
1101
|
+
events: "events",
|
|
1102
|
+
objects: "objects"
|
|
1455
1103
|
};
|
|
1456
|
-
const
|
|
1457
|
-
|
|
1104
|
+
const E2oDirection = {
|
|
1105
|
+
source: "source",
|
|
1106
|
+
target: "target"
|
|
1458
1107
|
};
|
|
1459
|
-
const
|
|
1108
|
+
const O2oDirection = {
|
|
1109
|
+
source: "source",
|
|
1110
|
+
target: "target"
|
|
1111
|
+
};
|
|
1112
|
+
const E2oCombinationsDirection = {
|
|
1113
|
+
source: "source",
|
|
1114
|
+
target: "target"
|
|
1115
|
+
};
|
|
1116
|
+
const O2oCombinationsDirection = {
|
|
1117
|
+
source: "source",
|
|
1118
|
+
target: "target"
|
|
1119
|
+
};
|
|
1120
|
+
const DownloadOCELExt = {
|
|
1121
|
+
xml: ".xml",
|
|
1122
|
+
json: ".json",
|
|
1123
|
+
sqlite: ".sqlite"
|
|
1124
|
+
};
|
|
1125
|
+
/**
|
|
1126
|
+
* Returns metadata for all uploaded OCELs along with any OCEL files currently being imported.
|
|
1127
|
+
* @summary List uploaded and uploading OCELs
|
|
1128
|
+
*/
|
|
1129
|
+
const getOcels = (params, options, signal) => {
|
|
1130
|
+
return customFetch$1({
|
|
1131
|
+
url: `/api/external/modules/ocel/v1/ocels`,
|
|
1132
|
+
method: "GET",
|
|
1133
|
+
params,
|
|
1134
|
+
...signal ? { signal } : {}
|
|
1135
|
+
}, options);
|
|
1136
|
+
};
|
|
1137
|
+
const getGetOcelsQueryKey = (params) => {
|
|
1138
|
+
return [`/api/external/modules/ocel/v1/ocels`, ...params ? [params] : []];
|
|
1139
|
+
};
|
|
1140
|
+
const getGetOcelsQueryOptions = (params, options) => {
|
|
1460
1141
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1461
|
-
const queryKey = queryOptions?.queryKey ??
|
|
1462
|
-
const queryFn = ({ signal }) =>
|
|
1463
|
-
signal,
|
|
1464
|
-
...requestOptions
|
|
1465
|
-
});
|
|
1142
|
+
const queryKey = queryOptions?.queryKey ?? getGetOcelsQueryKey(params);
|
|
1143
|
+
const queryFn = ({ signal }) => getOcels(params, requestOptions, signal);
|
|
1466
1144
|
return {
|
|
1467
1145
|
queryKey,
|
|
1468
1146
|
queryFn,
|
|
1469
|
-
enabled: !!pluginId,
|
|
1470
1147
|
staleTime: 3e5,
|
|
1471
1148
|
...queryOptions
|
|
1472
1149
|
};
|
|
1473
1150
|
};
|
|
1474
1151
|
/**
|
|
1475
|
-
* @summary
|
|
1152
|
+
* @summary List uploaded and uploading OCELs
|
|
1476
1153
|
*/
|
|
1477
|
-
function
|
|
1478
|
-
const queryOptions =
|
|
1154
|
+
function useGetOcels(params, options, queryClient) {
|
|
1155
|
+
const queryOptions = getGetOcelsQueryOptions(params, options);
|
|
1479
1156
|
return {
|
|
1480
1157
|
...useQuery(queryOptions, queryClient),
|
|
1481
1158
|
queryKey: queryOptions.queryKey
|
|
1482
1159
|
};
|
|
1483
1160
|
}
|
|
1484
1161
|
/**
|
|
1485
|
-
* @summary
|
|
1162
|
+
* @summary Get default OCEL metadata
|
|
1486
1163
|
*/
|
|
1487
|
-
const
|
|
1488
|
-
return
|
|
1164
|
+
const getDefaultOcel = (params, options, signal) => {
|
|
1165
|
+
return customFetch$1({
|
|
1166
|
+
url: `/api/external/modules/ocel/v1/default`,
|
|
1167
|
+
method: "GET",
|
|
1168
|
+
params,
|
|
1169
|
+
...signal ? { signal } : {}
|
|
1170
|
+
}, options);
|
|
1489
1171
|
};
|
|
1490
|
-
const
|
|
1491
|
-
return
|
|
1492
|
-
...options,
|
|
1493
|
-
method: "DELETE"
|
|
1494
|
-
});
|
|
1172
|
+
const getGetDefaultOcelQueryKey = (params) => {
|
|
1173
|
+
return [`/api/external/modules/ocel/v1/default`, ...params ? [params] : []];
|
|
1495
1174
|
};
|
|
1496
|
-
const
|
|
1497
|
-
const
|
|
1175
|
+
const getGetDefaultOcelQueryOptions = (params, options) => {
|
|
1176
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1177
|
+
const queryKey = queryOptions?.queryKey ?? getGetDefaultOcelQueryKey(params);
|
|
1178
|
+
const queryFn = ({ signal }) => getDefaultOcel(params, requestOptions, signal);
|
|
1179
|
+
return {
|
|
1180
|
+
queryKey,
|
|
1181
|
+
queryFn,
|
|
1182
|
+
staleTime: 3e5,
|
|
1183
|
+
...queryOptions
|
|
1184
|
+
};
|
|
1185
|
+
};
|
|
1186
|
+
/**
|
|
1187
|
+
* @summary Get default OCEL metadata
|
|
1188
|
+
*/
|
|
1189
|
+
function useGetDefaultOcel(params, options, queryClient) {
|
|
1190
|
+
const queryOptions = getGetDefaultOcelQueryOptions(params, options);
|
|
1191
|
+
return {
|
|
1192
|
+
...useQuery(queryOptions, queryClient),
|
|
1193
|
+
queryKey: queryOptions.queryKey
|
|
1194
|
+
};
|
|
1195
|
+
}
|
|
1196
|
+
/**
|
|
1197
|
+
* @summary Import default OCEL
|
|
1198
|
+
*/
|
|
1199
|
+
const importDefaultOcel = (params, options, signal) => {
|
|
1200
|
+
return customFetch$1({
|
|
1201
|
+
url: `/api/external/modules/ocel/v1/default`,
|
|
1202
|
+
method: "POST",
|
|
1203
|
+
params,
|
|
1204
|
+
...signal ? { signal } : {}
|
|
1205
|
+
}, options);
|
|
1206
|
+
};
|
|
1207
|
+
const getImportDefaultOcelMutationOptions = (options) => {
|
|
1208
|
+
const mutationKey = ["importDefaultOcel"];
|
|
1498
1209
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1499
1210
|
...options,
|
|
1500
1211
|
mutation: {
|
|
@@ -1506,8 +1217,8 @@ const getDeletePluginMutationOptions = (options) => {
|
|
|
1506
1217
|
request: void 0
|
|
1507
1218
|
};
|
|
1508
1219
|
const mutationFn = (props) => {
|
|
1509
|
-
const {
|
|
1510
|
-
return
|
|
1220
|
+
const { params } = props ?? {};
|
|
1221
|
+
return importDefaultOcel(params, requestOptions);
|
|
1511
1222
|
};
|
|
1512
1223
|
return {
|
|
1513
1224
|
mutationFn,
|
|
@@ -1515,70 +1226,93 @@ const getDeletePluginMutationOptions = (options) => {
|
|
|
1515
1226
|
};
|
|
1516
1227
|
};
|
|
1517
1228
|
/**
|
|
1518
|
-
* @summary
|
|
1229
|
+
* @summary Import default OCEL
|
|
1519
1230
|
*/
|
|
1520
|
-
const
|
|
1521
|
-
return useMutation(
|
|
1231
|
+
const useImportDefaultOcel = (options, queryClient) => {
|
|
1232
|
+
return useMutation(getImportDefaultOcelMutationOptions(options), queryClient);
|
|
1522
1233
|
};
|
|
1523
1234
|
/**
|
|
1524
|
-
* @summary Get
|
|
1235
|
+
* @summary Get Extension Meta
|
|
1525
1236
|
*/
|
|
1526
|
-
const
|
|
1527
|
-
return
|
|
1237
|
+
const getExtensionMeta = (options, signal) => {
|
|
1238
|
+
return customFetch$1({
|
|
1239
|
+
url: `/api/external/modules/ocel/v1/extension/meta`,
|
|
1240
|
+
method: "GET",
|
|
1241
|
+
...signal ? { signal } : {}
|
|
1242
|
+
}, options);
|
|
1528
1243
|
};
|
|
1529
|
-
const
|
|
1530
|
-
return
|
|
1531
|
-
...options,
|
|
1532
|
-
method: "GET"
|
|
1533
|
-
});
|
|
1534
|
-
};
|
|
1535
|
-
const getGetPluginMethodQueryKey = (pluginId, methodName) => {
|
|
1536
|
-
return [`/api/external/plugins/${pluginId}/${methodName}`];
|
|
1244
|
+
const getGetExtensionMetaQueryKey = () => {
|
|
1245
|
+
return [`/api/external/modules/ocel/v1/extension/meta`];
|
|
1537
1246
|
};
|
|
1538
|
-
const
|
|
1247
|
+
const getGetExtensionMetaQueryOptions = (options) => {
|
|
1539
1248
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1540
|
-
const queryKey = queryOptions?.queryKey ??
|
|
1541
|
-
const queryFn = ({ signal }) =>
|
|
1542
|
-
signal,
|
|
1543
|
-
...requestOptions
|
|
1544
|
-
});
|
|
1249
|
+
const queryKey = queryOptions?.queryKey ?? getGetExtensionMetaQueryKey();
|
|
1250
|
+
const queryFn = ({ signal }) => getExtensionMeta(requestOptions, signal);
|
|
1545
1251
|
return {
|
|
1546
1252
|
queryKey,
|
|
1547
1253
|
queryFn,
|
|
1548
|
-
enabled: !!(pluginId && methodName),
|
|
1549
1254
|
staleTime: 3e5,
|
|
1550
1255
|
...queryOptions
|
|
1551
1256
|
};
|
|
1552
1257
|
};
|
|
1553
1258
|
/**
|
|
1554
|
-
* @summary Get
|
|
1259
|
+
* @summary Get Extension Meta
|
|
1555
1260
|
*/
|
|
1556
|
-
function
|
|
1557
|
-
const queryOptions =
|
|
1261
|
+
function useGetExtensionMeta(options, queryClient) {
|
|
1262
|
+
const queryOptions = getGetExtensionMetaQueryOptions(options);
|
|
1558
1263
|
return {
|
|
1559
1264
|
...useQuery(queryOptions, queryClient),
|
|
1560
1265
|
queryKey: queryOptions.queryKey
|
|
1561
1266
|
};
|
|
1562
1267
|
}
|
|
1563
1268
|
/**
|
|
1564
|
-
* @summary
|
|
1269
|
+
* @summary Get general information about a OCEL
|
|
1565
1270
|
*/
|
|
1566
|
-
const
|
|
1567
|
-
return
|
|
1271
|
+
const getOcel = (ocelId, options, signal) => {
|
|
1272
|
+
return customFetch$1({
|
|
1273
|
+
url: `/api/external/modules/ocel/v1/${ocelId}`,
|
|
1274
|
+
method: "GET",
|
|
1275
|
+
...signal ? { signal } : {}
|
|
1276
|
+
}, options);
|
|
1568
1277
|
};
|
|
1569
|
-
const
|
|
1570
|
-
return
|
|
1571
|
-
|
|
1278
|
+
const getGetOcelQueryKey = (ocelId) => {
|
|
1279
|
+
return [`/api/external/modules/ocel/v1/${ocelId}`];
|
|
1280
|
+
};
|
|
1281
|
+
const getGetOcelQueryOptions = (ocelId, options) => {
|
|
1282
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1283
|
+
const queryKey = queryOptions?.queryKey ?? getGetOcelQueryKey(ocelId);
|
|
1284
|
+
const queryFn = ({ signal }) => getOcel(ocelId, requestOptions, signal);
|
|
1285
|
+
return {
|
|
1286
|
+
queryKey,
|
|
1287
|
+
queryFn,
|
|
1288
|
+
enabled: !!ocelId,
|
|
1289
|
+
staleTime: 3e5,
|
|
1290
|
+
...queryOptions
|
|
1291
|
+
};
|
|
1292
|
+
};
|
|
1293
|
+
/**
|
|
1294
|
+
* @summary Get general information about a OCEL
|
|
1295
|
+
*/
|
|
1296
|
+
function useGetOcel(ocelId, options, queryClient) {
|
|
1297
|
+
const queryOptions = getGetOcelQueryOptions(ocelId, options);
|
|
1298
|
+
return {
|
|
1299
|
+
...useQuery(queryOptions, queryClient),
|
|
1300
|
+
queryKey: queryOptions.queryKey
|
|
1301
|
+
};
|
|
1302
|
+
}
|
|
1303
|
+
/**
|
|
1304
|
+
* Deletes the uploaded OCEL with the given `ocel_id`.
|
|
1305
|
+
* @summary Delete an uploaded OCEL
|
|
1306
|
+
*/
|
|
1307
|
+
const deleteOcel = (ocelId, options, signal) => {
|
|
1308
|
+
return customFetch$1({
|
|
1309
|
+
url: `/api/external/modules/ocel/v1/${ocelId}/delete`,
|
|
1572
1310
|
method: "POST",
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
...options?.headers
|
|
1576
|
-
},
|
|
1577
|
-
body: JSON.stringify(bodyRunPlugin)
|
|
1578
|
-
});
|
|
1311
|
+
...signal ? { signal } : {}
|
|
1312
|
+
}, options);
|
|
1579
1313
|
};
|
|
1580
|
-
const
|
|
1581
|
-
const mutationKey = ["
|
|
1314
|
+
const getDeleteOcelMutationOptions = (options) => {
|
|
1315
|
+
const mutationKey = ["deleteOcel"];
|
|
1582
1316
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1583
1317
|
...options,
|
|
1584
1318
|
mutation: {
|
|
@@ -1590,8 +1324,8 @@ const getRunPluginMutationOptions = (options) => {
|
|
|
1590
1324
|
request: void 0
|
|
1591
1325
|
};
|
|
1592
1326
|
const mutationFn = (props) => {
|
|
1593
|
-
const {
|
|
1594
|
-
return
|
|
1327
|
+
const { ocelId } = props ?? {};
|
|
1328
|
+
return deleteOcel(ocelId, requestOptions);
|
|
1595
1329
|
};
|
|
1596
1330
|
return {
|
|
1597
1331
|
mutationFn,
|
|
@@ -1599,30 +1333,25 @@ const getRunPluginMutationOptions = (options) => {
|
|
|
1599
1333
|
};
|
|
1600
1334
|
};
|
|
1601
1335
|
/**
|
|
1602
|
-
* @summary
|
|
1336
|
+
* @summary Delete an uploaded OCEL
|
|
1603
1337
|
*/
|
|
1604
|
-
const
|
|
1605
|
-
return useMutation(
|
|
1606
|
-
};
|
|
1338
|
+
const useDeleteOcel = (options, queryClient) => {
|
|
1339
|
+
return useMutation(getDeleteOcelMutationOptions(options), queryClient);
|
|
1340
|
+
};
|
|
1607
1341
|
/**
|
|
1608
|
-
*
|
|
1342
|
+
* Renames the OCEL with the given `ocel_id` to `new_name`.
|
|
1343
|
+
* @summary Rename an uploaded OCEL
|
|
1609
1344
|
*/
|
|
1610
|
-
const
|
|
1611
|
-
return
|
|
1612
|
-
}
|
|
1613
|
-
const getComputedValues = async (pluginId, methodName, provider, bodyGetComputedValues, options) => {
|
|
1614
|
-
return customFetch(getGetComputedValuesUrl(pluginId, methodName, provider), {
|
|
1615
|
-
...options,
|
|
1345
|
+
const renameOcel = (ocelId, params, options, signal) => {
|
|
1346
|
+
return customFetch$1({
|
|
1347
|
+
url: `/api/external/modules/ocel/v1/${ocelId}/rename`,
|
|
1616
1348
|
method: "POST",
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
};
|
|
1624
|
-
const getGetComputedValuesMutationOptions = (options) => {
|
|
1625
|
-
const mutationKey = ["getComputedValues"];
|
|
1349
|
+
params,
|
|
1350
|
+
...signal ? { signal } : {}
|
|
1351
|
+
}, options);
|
|
1352
|
+
};
|
|
1353
|
+
const getRenameOcelMutationOptions = (options) => {
|
|
1354
|
+
const mutationKey = ["renameOcel"];
|
|
1626
1355
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1627
1356
|
...options,
|
|
1628
1357
|
mutation: {
|
|
@@ -1634,8 +1363,8 @@ const getGetComputedValuesMutationOptions = (options) => {
|
|
|
1634
1363
|
request: void 0
|
|
1635
1364
|
};
|
|
1636
1365
|
const mutationFn = (props) => {
|
|
1637
|
-
const {
|
|
1638
|
-
return
|
|
1366
|
+
const { ocelId, params } = props ?? {};
|
|
1367
|
+
return renameOcel(ocelId, params, requestOptions);
|
|
1639
1368
|
};
|
|
1640
1369
|
return {
|
|
1641
1370
|
mutationFn,
|
|
@@ -1643,338 +1372,732 @@ const getGetComputedValuesMutationOptions = (options) => {
|
|
|
1643
1372
|
};
|
|
1644
1373
|
};
|
|
1645
1374
|
/**
|
|
1646
|
-
* @summary
|
|
1375
|
+
* @summary Rename an uploaded OCEL
|
|
1647
1376
|
*/
|
|
1648
|
-
const
|
|
1649
|
-
return useMutation(
|
|
1377
|
+
const useRenameOcel = (options, queryClient) => {
|
|
1378
|
+
return useMutation(getRenameOcelMutationOptions(options), queryClient);
|
|
1650
1379
|
};
|
|
1651
1380
|
/**
|
|
1652
|
-
* @summary Get
|
|
1381
|
+
* @summary Get Aggr Attributes
|
|
1653
1382
|
*/
|
|
1654
|
-
const
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1383
|
+
const aggregatedAttributes = (ocelId, params, options, signal) => {
|
|
1384
|
+
return customFetch$1({
|
|
1385
|
+
url: `/api/external/modules/ocel/v1/${ocelId}/attributes`,
|
|
1386
|
+
method: "GET",
|
|
1387
|
+
params,
|
|
1388
|
+
...signal ? { signal } : {}
|
|
1389
|
+
}, options);
|
|
1661
1390
|
};
|
|
1662
|
-
const
|
|
1663
|
-
return
|
|
1664
|
-
...options,
|
|
1665
|
-
method: "GET"
|
|
1666
|
-
});
|
|
1391
|
+
const getAggregatedAttributesQueryKey = (ocelId, params) => {
|
|
1392
|
+
return [`/api/external/modules/ocel/v1/${ocelId}/attributes`, ...params ? [params] : []];
|
|
1667
1393
|
};
|
|
1668
|
-
const
|
|
1669
|
-
|
|
1394
|
+
const getAggregatedAttributesQueryOptions = (ocelId, params, options) => {
|
|
1395
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1396
|
+
const queryKey = queryOptions?.queryKey ?? getAggregatedAttributesQueryKey(ocelId, params);
|
|
1397
|
+
const queryFn = ({ signal }) => aggregatedAttributes(ocelId, params, requestOptions, signal);
|
|
1398
|
+
return {
|
|
1399
|
+
queryKey,
|
|
1400
|
+
queryFn,
|
|
1401
|
+
enabled: !!ocelId,
|
|
1402
|
+
staleTime: 3e5,
|
|
1403
|
+
...queryOptions
|
|
1404
|
+
};
|
|
1670
1405
|
};
|
|
1671
|
-
|
|
1406
|
+
/**
|
|
1407
|
+
* @summary Get Aggr Attributes
|
|
1408
|
+
*/
|
|
1409
|
+
function useAggregatedAttributes(ocelId, params, options, queryClient) {
|
|
1410
|
+
const queryOptions = getAggregatedAttributesQueryOptions(ocelId, params, options);
|
|
1411
|
+
return {
|
|
1412
|
+
...useQuery(queryOptions, queryClient),
|
|
1413
|
+
queryKey: queryOptions.queryKey
|
|
1414
|
+
};
|
|
1415
|
+
}
|
|
1416
|
+
/**
|
|
1417
|
+
* @summary Get Object Attributes
|
|
1418
|
+
*/
|
|
1419
|
+
const objectAttributes = (ocelId, params, options, signal) => {
|
|
1420
|
+
return customFetch$1({
|
|
1421
|
+
url: `/api/external/modules/ocel/v1/${ocelId}/objects/attributes`,
|
|
1422
|
+
method: "GET",
|
|
1423
|
+
params,
|
|
1424
|
+
...signal ? { signal } : {}
|
|
1425
|
+
}, options);
|
|
1426
|
+
};
|
|
1427
|
+
const getObjectAttributesQueryKey = (ocelId, params) => {
|
|
1428
|
+
return [`/api/external/modules/ocel/v1/${ocelId}/objects/attributes`, ...params ? [params] : []];
|
|
1429
|
+
};
|
|
1430
|
+
const getObjectAttributesQueryOptions = (ocelId, params, options) => {
|
|
1672
1431
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1673
|
-
const queryKey = queryOptions?.queryKey ??
|
|
1674
|
-
const queryFn = ({ signal }) =>
|
|
1675
|
-
signal,
|
|
1676
|
-
...requestOptions
|
|
1677
|
-
});
|
|
1432
|
+
const queryKey = queryOptions?.queryKey ?? getObjectAttributesQueryKey(ocelId, params);
|
|
1433
|
+
const queryFn = ({ signal }) => objectAttributes(ocelId, params, requestOptions, signal);
|
|
1678
1434
|
return {
|
|
1679
1435
|
queryKey,
|
|
1680
1436
|
queryFn,
|
|
1437
|
+
enabled: !!ocelId,
|
|
1681
1438
|
staleTime: 3e5,
|
|
1682
1439
|
...queryOptions
|
|
1683
1440
|
};
|
|
1684
1441
|
};
|
|
1685
1442
|
/**
|
|
1686
|
-
* @summary Get
|
|
1443
|
+
* @summary Get Object Attributes
|
|
1687
1444
|
*/
|
|
1688
|
-
function
|
|
1689
|
-
const queryOptions =
|
|
1445
|
+
function useObjectAttributes(ocelId, params, options, queryClient) {
|
|
1446
|
+
const queryOptions = getObjectAttributesQueryOptions(ocelId, params, options);
|
|
1690
1447
|
return {
|
|
1691
1448
|
...useQuery(queryOptions, queryClient),
|
|
1692
1449
|
queryKey: queryOptions.queryKey
|
|
1693
1450
|
};
|
|
1694
1451
|
}
|
|
1695
1452
|
/**
|
|
1696
|
-
* @summary
|
|
1453
|
+
* @summary Get Event Attributes
|
|
1697
1454
|
*/
|
|
1698
|
-
const
|
|
1699
|
-
return
|
|
1455
|
+
const eventAttributes = (ocelId, params, options, signal) => {
|
|
1456
|
+
return customFetch$1({
|
|
1457
|
+
url: `/api/external/modules/ocel/v1/${ocelId}/events/attributes`,
|
|
1458
|
+
method: "GET",
|
|
1459
|
+
params,
|
|
1460
|
+
...signal ? { signal } : {}
|
|
1461
|
+
}, options);
|
|
1700
1462
|
};
|
|
1701
|
-
const
|
|
1702
|
-
|
|
1703
|
-
formData.append(`file`, bodyUploadResource.file);
|
|
1704
|
-
return customFetch(getUploadResourceUrl(), {
|
|
1705
|
-
...options,
|
|
1706
|
-
method: "POST",
|
|
1707
|
-
body: formData
|
|
1708
|
-
});
|
|
1463
|
+
const getEventAttributesQueryKey = (ocelId, params) => {
|
|
1464
|
+
return [`/api/external/modules/ocel/v1/${ocelId}/events/attributes`, ...params ? [params] : []];
|
|
1709
1465
|
};
|
|
1710
|
-
const
|
|
1711
|
-
const
|
|
1712
|
-
const
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
request: void 0
|
|
1466
|
+
const getEventAttributesQueryOptions = (ocelId, params, options) => {
|
|
1467
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1468
|
+
const queryKey = queryOptions?.queryKey ?? getEventAttributesQueryKey(ocelId, params);
|
|
1469
|
+
const queryFn = ({ signal }) => eventAttributes(ocelId, params, requestOptions, signal);
|
|
1470
|
+
return {
|
|
1471
|
+
queryKey,
|
|
1472
|
+
queryFn,
|
|
1473
|
+
enabled: !!ocelId,
|
|
1474
|
+
staleTime: 3e5,
|
|
1475
|
+
...queryOptions
|
|
1721
1476
|
};
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1477
|
+
};
|
|
1478
|
+
/**
|
|
1479
|
+
* @summary Get Event Attributes
|
|
1480
|
+
*/
|
|
1481
|
+
function useEventAttributes(ocelId, params, options, queryClient) {
|
|
1482
|
+
const queryOptions = getEventAttributesQueryOptions(ocelId, params, options);
|
|
1483
|
+
return {
|
|
1484
|
+
...useQuery(queryOptions, queryClient),
|
|
1485
|
+
queryKey: queryOptions.queryKey
|
|
1725
1486
|
};
|
|
1487
|
+
}
|
|
1488
|
+
/**
|
|
1489
|
+
* @summary Get Attribute Names
|
|
1490
|
+
*/
|
|
1491
|
+
const attributeNames = (ocelId, params, options, signal) => {
|
|
1492
|
+
return customFetch$1({
|
|
1493
|
+
url: `/api/external/modules/ocel/v1/${ocelId}/attribute/names`,
|
|
1494
|
+
method: "GET",
|
|
1495
|
+
params,
|
|
1496
|
+
...signal ? { signal } : {}
|
|
1497
|
+
}, options);
|
|
1498
|
+
};
|
|
1499
|
+
const getAttributeNamesQueryKey = (ocelId, params) => {
|
|
1500
|
+
return [`/api/external/modules/ocel/v1/${ocelId}/attribute/names`, ...params ? [params] : []];
|
|
1501
|
+
};
|
|
1502
|
+
const getAttributeNamesQueryOptions = (ocelId, params, options) => {
|
|
1503
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1504
|
+
const queryKey = queryOptions?.queryKey ?? getAttributeNamesQueryKey(ocelId, params);
|
|
1505
|
+
const queryFn = ({ signal }) => attributeNames(ocelId, params, requestOptions, signal);
|
|
1726
1506
|
return {
|
|
1727
|
-
|
|
1728
|
-
|
|
1507
|
+
queryKey,
|
|
1508
|
+
queryFn,
|
|
1509
|
+
enabled: !!ocelId,
|
|
1510
|
+
staleTime: 3e5,
|
|
1511
|
+
...queryOptions
|
|
1729
1512
|
};
|
|
1730
1513
|
};
|
|
1731
1514
|
/**
|
|
1732
|
-
* @summary
|
|
1515
|
+
* @summary Get Attribute Names
|
|
1733
1516
|
*/
|
|
1734
|
-
|
|
1735
|
-
|
|
1517
|
+
function useAttributeNames(ocelId, params, options, queryClient) {
|
|
1518
|
+
const queryOptions = getAttributeNamesQueryOptions(ocelId, params, options);
|
|
1519
|
+
return {
|
|
1520
|
+
...useQuery(queryOptions, queryClient),
|
|
1521
|
+
queryKey: queryOptions.queryKey
|
|
1522
|
+
};
|
|
1523
|
+
}
|
|
1524
|
+
/**
|
|
1525
|
+
* @summary Get Object Types
|
|
1526
|
+
*/
|
|
1527
|
+
const objectTypes = (ocelId, params, options, signal) => {
|
|
1528
|
+
return customFetch$1({
|
|
1529
|
+
url: `/api/external/modules/ocel/v1/${ocelId}/objects/types`,
|
|
1530
|
+
method: "GET",
|
|
1531
|
+
params,
|
|
1532
|
+
...signal ? { signal } : {}
|
|
1533
|
+
}, options);
|
|
1534
|
+
};
|
|
1535
|
+
const getObjectTypesQueryKey = (ocelId, params) => {
|
|
1536
|
+
return [`/api/external/modules/ocel/v1/${ocelId}/objects/types`, ...params ? [params] : []];
|
|
1537
|
+
};
|
|
1538
|
+
const getObjectTypesQueryOptions = (ocelId, params, options) => {
|
|
1539
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1540
|
+
const queryKey = queryOptions?.queryKey ?? getObjectTypesQueryKey(ocelId, params);
|
|
1541
|
+
const queryFn = ({ signal }) => objectTypes(ocelId, params, requestOptions, signal);
|
|
1542
|
+
return {
|
|
1543
|
+
queryKey,
|
|
1544
|
+
queryFn,
|
|
1545
|
+
enabled: !!ocelId,
|
|
1546
|
+
staleTime: 3e5,
|
|
1547
|
+
...queryOptions
|
|
1548
|
+
};
|
|
1736
1549
|
};
|
|
1737
1550
|
/**
|
|
1738
|
-
* @summary Get
|
|
1551
|
+
* @summary Get Object Types
|
|
1552
|
+
*/
|
|
1553
|
+
function useObjectTypes(ocelId, params, options, queryClient) {
|
|
1554
|
+
const queryOptions = getObjectTypesQueryOptions(ocelId, params, options);
|
|
1555
|
+
return {
|
|
1556
|
+
...useQuery(queryOptions, queryClient),
|
|
1557
|
+
queryKey: queryOptions.queryKey
|
|
1558
|
+
};
|
|
1559
|
+
}
|
|
1560
|
+
/**
|
|
1561
|
+
* @summary Get Object Counts
|
|
1739
1562
|
*/
|
|
1740
|
-
const
|
|
1741
|
-
return
|
|
1563
|
+
const objectCounts = (ocelId, params, options, signal) => {
|
|
1564
|
+
return customFetch$1({
|
|
1565
|
+
url: `/api/external/modules/ocel/v1/${ocelId}/objects/counts`,
|
|
1566
|
+
method: "GET",
|
|
1567
|
+
params,
|
|
1568
|
+
...signal ? { signal } : {}
|
|
1569
|
+
}, options);
|
|
1742
1570
|
};
|
|
1743
|
-
const
|
|
1744
|
-
return
|
|
1745
|
-
...options,
|
|
1746
|
-
method: "GET"
|
|
1747
|
-
});
|
|
1571
|
+
const getObjectCountsQueryKey = (ocelId, params) => {
|
|
1572
|
+
return [`/api/external/modules/ocel/v1/${ocelId}/objects/counts`, ...params ? [params] : []];
|
|
1748
1573
|
};
|
|
1749
|
-
const
|
|
1750
|
-
|
|
1574
|
+
const getObjectCountsQueryOptions = (ocelId, params, options) => {
|
|
1575
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1576
|
+
const queryKey = queryOptions?.queryKey ?? getObjectCountsQueryKey(ocelId, params);
|
|
1577
|
+
const queryFn = ({ signal }) => objectCounts(ocelId, params, requestOptions, signal);
|
|
1578
|
+
return {
|
|
1579
|
+
queryKey,
|
|
1580
|
+
queryFn,
|
|
1581
|
+
enabled: !!ocelId,
|
|
1582
|
+
staleTime: 3e5,
|
|
1583
|
+
...queryOptions
|
|
1584
|
+
};
|
|
1751
1585
|
};
|
|
1752
|
-
|
|
1586
|
+
/**
|
|
1587
|
+
* @summary Get Object Counts
|
|
1588
|
+
*/
|
|
1589
|
+
function useObjectCounts(ocelId, params, options, queryClient) {
|
|
1590
|
+
const queryOptions = getObjectCountsQueryOptions(ocelId, params, options);
|
|
1591
|
+
return {
|
|
1592
|
+
...useQuery(queryOptions, queryClient),
|
|
1593
|
+
queryKey: queryOptions.queryKey
|
|
1594
|
+
};
|
|
1595
|
+
}
|
|
1596
|
+
/**
|
|
1597
|
+
* @summary Get Object Ids
|
|
1598
|
+
*/
|
|
1599
|
+
const objectIds = (ocelId, params, options, signal) => {
|
|
1600
|
+
return customFetch$1({
|
|
1601
|
+
url: `/api/external/modules/ocel/v1/${ocelId}/objects/ids`,
|
|
1602
|
+
method: "GET",
|
|
1603
|
+
params,
|
|
1604
|
+
...signal ? { signal } : {}
|
|
1605
|
+
}, options);
|
|
1606
|
+
};
|
|
1607
|
+
const getObjectIdsQueryKey = (ocelId, params) => {
|
|
1608
|
+
return [`/api/external/modules/ocel/v1/${ocelId}/objects/ids`, ...params ? [params] : []];
|
|
1609
|
+
};
|
|
1610
|
+
const getObjectIdsQueryOptions = (ocelId, params, options) => {
|
|
1753
1611
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1754
|
-
const queryKey = queryOptions?.queryKey ??
|
|
1755
|
-
const queryFn = ({ signal }) =>
|
|
1756
|
-
signal,
|
|
1757
|
-
...requestOptions
|
|
1758
|
-
});
|
|
1612
|
+
const queryKey = queryOptions?.queryKey ?? getObjectIdsQueryKey(ocelId, params);
|
|
1613
|
+
const queryFn = ({ signal }) => objectIds(ocelId, params, requestOptions, signal);
|
|
1759
1614
|
return {
|
|
1760
1615
|
queryKey,
|
|
1761
1616
|
queryFn,
|
|
1617
|
+
enabled: !!ocelId,
|
|
1762
1618
|
staleTime: 3e5,
|
|
1763
1619
|
...queryOptions
|
|
1764
1620
|
};
|
|
1765
1621
|
};
|
|
1766
1622
|
/**
|
|
1767
|
-
* @summary Get
|
|
1623
|
+
* @summary Get Object Ids
|
|
1768
1624
|
*/
|
|
1769
|
-
function
|
|
1770
|
-
const queryOptions =
|
|
1625
|
+
function useObjectIds(ocelId, params, options, queryClient) {
|
|
1626
|
+
const queryOptions = getObjectIdsQueryOptions(ocelId, params, options);
|
|
1771
1627
|
return {
|
|
1772
1628
|
...useQuery(queryOptions, queryClient),
|
|
1773
1629
|
queryKey: queryOptions.queryKey
|
|
1774
1630
|
};
|
|
1775
1631
|
}
|
|
1776
1632
|
/**
|
|
1777
|
-
*
|
|
1633
|
+
* Returns the object variants for a single object type. Each variant is a distinct activity sequence, together with the number of events it contains and the number of cases (objects) that follow it.
|
|
1634
|
+
* @summary Get the variants of an object type
|
|
1778
1635
|
*/
|
|
1779
|
-
const
|
|
1780
|
-
return
|
|
1636
|
+
const objectVariants = (ocelId, params, options, signal) => {
|
|
1637
|
+
return customFetch$1({
|
|
1638
|
+
url: `/api/external/modules/ocel/v1/${ocelId}/objects/variants`,
|
|
1639
|
+
method: "GET",
|
|
1640
|
+
params,
|
|
1641
|
+
...signal ? { signal } : {}
|
|
1642
|
+
}, options);
|
|
1781
1643
|
};
|
|
1782
|
-
const
|
|
1783
|
-
return
|
|
1784
|
-
...options,
|
|
1785
|
-
method: "GET"
|
|
1786
|
-
});
|
|
1644
|
+
const getObjectVariantsQueryKey = (ocelId, params) => {
|
|
1645
|
+
return [`/api/external/modules/ocel/v1/${ocelId}/objects/variants`, ...params ? [params] : []];
|
|
1787
1646
|
};
|
|
1788
|
-
const
|
|
1789
|
-
|
|
1647
|
+
const getObjectVariantsQueryOptions = (ocelId, params, options) => {
|
|
1648
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1649
|
+
const queryKey = queryOptions?.queryKey ?? getObjectVariantsQueryKey(ocelId, params);
|
|
1650
|
+
const queryFn = ({ signal }) => objectVariants(ocelId, params, requestOptions, signal);
|
|
1651
|
+
return {
|
|
1652
|
+
queryKey,
|
|
1653
|
+
queryFn,
|
|
1654
|
+
enabled: !!ocelId,
|
|
1655
|
+
staleTime: 3e5,
|
|
1656
|
+
...queryOptions
|
|
1657
|
+
};
|
|
1790
1658
|
};
|
|
1791
|
-
|
|
1659
|
+
/**
|
|
1660
|
+
* @summary Get the variants of an object type
|
|
1661
|
+
*/
|
|
1662
|
+
function useObjectVariants(ocelId, params, options, queryClient) {
|
|
1663
|
+
const queryOptions = getObjectVariantsQueryOptions(ocelId, params, options);
|
|
1664
|
+
return {
|
|
1665
|
+
...useQuery(queryOptions, queryClient),
|
|
1666
|
+
queryKey: queryOptions.queryKey
|
|
1667
|
+
};
|
|
1668
|
+
}
|
|
1669
|
+
/**
|
|
1670
|
+
* @summary Get Activities
|
|
1671
|
+
*/
|
|
1672
|
+
const activities = (ocelId, params, options, signal) => {
|
|
1673
|
+
return customFetch$1({
|
|
1674
|
+
url: `/api/external/modules/ocel/v1/${ocelId}/events/activityNames`,
|
|
1675
|
+
method: "GET",
|
|
1676
|
+
params,
|
|
1677
|
+
...signal ? { signal } : {}
|
|
1678
|
+
}, options);
|
|
1679
|
+
};
|
|
1680
|
+
const getActivitiesQueryKey = (ocelId, params) => {
|
|
1681
|
+
return [`/api/external/modules/ocel/v1/${ocelId}/events/activityNames`, ...params ? [params] : []];
|
|
1682
|
+
};
|
|
1683
|
+
const getActivitiesQueryOptions = (ocelId, params, options) => {
|
|
1792
1684
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1793
|
-
const queryKey = queryOptions?.queryKey ??
|
|
1794
|
-
const queryFn = ({ signal }) =>
|
|
1795
|
-
signal,
|
|
1796
|
-
...requestOptions
|
|
1797
|
-
});
|
|
1685
|
+
const queryKey = queryOptions?.queryKey ?? getActivitiesQueryKey(ocelId, params);
|
|
1686
|
+
const queryFn = ({ signal }) => activities(ocelId, params, requestOptions, signal);
|
|
1798
1687
|
return {
|
|
1799
1688
|
queryKey,
|
|
1800
1689
|
queryFn,
|
|
1801
|
-
enabled: !!
|
|
1690
|
+
enabled: !!ocelId,
|
|
1802
1691
|
staleTime: 3e5,
|
|
1803
1692
|
...queryOptions
|
|
1804
1693
|
};
|
|
1805
1694
|
};
|
|
1806
1695
|
/**
|
|
1807
|
-
* @summary
|
|
1696
|
+
* @summary Get Activities
|
|
1808
1697
|
*/
|
|
1809
|
-
function
|
|
1810
|
-
const queryOptions =
|
|
1698
|
+
function useActivities(ocelId, params, options, queryClient) {
|
|
1699
|
+
const queryOptions = getActivitiesQueryOptions(ocelId, params, options);
|
|
1811
1700
|
return {
|
|
1812
1701
|
...useQuery(queryOptions, queryClient),
|
|
1813
1702
|
queryKey: queryOptions.queryKey
|
|
1814
1703
|
};
|
|
1815
1704
|
}
|
|
1816
1705
|
/**
|
|
1817
|
-
* @summary Get
|
|
1706
|
+
* @summary Get Event Counts
|
|
1818
1707
|
*/
|
|
1819
|
-
const
|
|
1820
|
-
return
|
|
1708
|
+
const eventCounts = (ocelId, params, options, signal) => {
|
|
1709
|
+
return customFetch$1({
|
|
1710
|
+
url: `/api/external/modules/ocel/v1/${ocelId}/events/counts`,
|
|
1711
|
+
method: "GET",
|
|
1712
|
+
params,
|
|
1713
|
+
...signal ? { signal } : {}
|
|
1714
|
+
}, options);
|
|
1821
1715
|
};
|
|
1822
|
-
const
|
|
1823
|
-
return
|
|
1824
|
-
...options,
|
|
1825
|
-
method: "GET"
|
|
1826
|
-
});
|
|
1716
|
+
const getEventCountsQueryKey = (ocelId, params) => {
|
|
1717
|
+
return [`/api/external/modules/ocel/v1/${ocelId}/events/counts`, ...params ? [params] : []];
|
|
1827
1718
|
};
|
|
1828
|
-
const
|
|
1829
|
-
|
|
1719
|
+
const getEventCountsQueryOptions = (ocelId, params, options) => {
|
|
1720
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1721
|
+
const queryKey = queryOptions?.queryKey ?? getEventCountsQueryKey(ocelId, params);
|
|
1722
|
+
const queryFn = ({ signal }) => eventCounts(ocelId, params, requestOptions, signal);
|
|
1723
|
+
return {
|
|
1724
|
+
queryKey,
|
|
1725
|
+
queryFn,
|
|
1726
|
+
enabled: !!ocelId,
|
|
1727
|
+
staleTime: 3e5,
|
|
1728
|
+
...queryOptions
|
|
1729
|
+
};
|
|
1830
1730
|
};
|
|
1831
|
-
|
|
1731
|
+
/**
|
|
1732
|
+
* @summary Get Event Counts
|
|
1733
|
+
*/
|
|
1734
|
+
function useEventCounts(ocelId, params, options, queryClient) {
|
|
1735
|
+
const queryOptions = getEventCountsQueryOptions(ocelId, params, options);
|
|
1736
|
+
return {
|
|
1737
|
+
...useQuery(queryOptions, queryClient),
|
|
1738
|
+
queryKey: queryOptions.queryKey
|
|
1739
|
+
};
|
|
1740
|
+
}
|
|
1741
|
+
/**
|
|
1742
|
+
* @summary Get Event Ids
|
|
1743
|
+
*/
|
|
1744
|
+
const eventIds = (ocelId, params, options, signal) => {
|
|
1745
|
+
return customFetch$1({
|
|
1746
|
+
url: `/api/external/modules/ocel/v1/${ocelId}/events/ids`,
|
|
1747
|
+
method: "GET",
|
|
1748
|
+
params,
|
|
1749
|
+
...signal ? { signal } : {}
|
|
1750
|
+
}, options);
|
|
1751
|
+
};
|
|
1752
|
+
const getEventIdsQueryKey = (ocelId, params) => {
|
|
1753
|
+
return [`/api/external/modules/ocel/v1/${ocelId}/events/ids`, ...params ? [params] : []];
|
|
1754
|
+
};
|
|
1755
|
+
const getEventIdsQueryOptions = (ocelId, params, options) => {
|
|
1832
1756
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1833
|
-
const queryKey = queryOptions?.queryKey ??
|
|
1834
|
-
const queryFn = ({ signal }) =>
|
|
1835
|
-
signal,
|
|
1836
|
-
...requestOptions
|
|
1837
|
-
});
|
|
1757
|
+
const queryKey = queryOptions?.queryKey ?? getEventIdsQueryKey(ocelId, params);
|
|
1758
|
+
const queryFn = ({ signal }) => eventIds(ocelId, params, requestOptions, signal);
|
|
1838
1759
|
return {
|
|
1839
1760
|
queryKey,
|
|
1840
1761
|
queryFn,
|
|
1841
|
-
enabled: !!
|
|
1762
|
+
enabled: !!ocelId,
|
|
1842
1763
|
staleTime: 3e5,
|
|
1843
1764
|
...queryOptions
|
|
1844
1765
|
};
|
|
1845
1766
|
};
|
|
1846
1767
|
/**
|
|
1847
|
-
* @summary Get
|
|
1768
|
+
* @summary Get Event Ids
|
|
1848
1769
|
*/
|
|
1849
|
-
function
|
|
1850
|
-
const queryOptions =
|
|
1770
|
+
function useEventIds(ocelId, params, options, queryClient) {
|
|
1771
|
+
const queryOptions = getEventIdsQueryOptions(ocelId, params, options);
|
|
1851
1772
|
return {
|
|
1852
1773
|
...useQuery(queryOptions, queryClient),
|
|
1853
1774
|
queryKey: queryOptions.queryKey
|
|
1854
1775
|
};
|
|
1855
1776
|
}
|
|
1856
1777
|
/**
|
|
1857
|
-
* @summary
|
|
1778
|
+
* @summary Get Time Info
|
|
1858
1779
|
*/
|
|
1859
|
-
const
|
|
1860
|
-
return
|
|
1780
|
+
const timeInfo = (ocelId, params, options, signal) => {
|
|
1781
|
+
return customFetch$1({
|
|
1782
|
+
url: `/api/external/modules/ocel/v1/${ocelId}/events/time`,
|
|
1783
|
+
method: "GET",
|
|
1784
|
+
params,
|
|
1785
|
+
...signal ? { signal } : {}
|
|
1786
|
+
}, options);
|
|
1861
1787
|
};
|
|
1862
|
-
const
|
|
1863
|
-
return
|
|
1864
|
-
...options,
|
|
1865
|
-
method: "DELETE"
|
|
1866
|
-
});
|
|
1788
|
+
const getTimeInfoQueryKey = (ocelId, params) => {
|
|
1789
|
+
return [`/api/external/modules/ocel/v1/${ocelId}/events/time`, ...params ? [params] : []];
|
|
1867
1790
|
};
|
|
1868
|
-
const
|
|
1869
|
-
const
|
|
1870
|
-
const
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
request: void 0
|
|
1791
|
+
const getTimeInfoQueryOptions = (ocelId, params, options) => {
|
|
1792
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1793
|
+
const queryKey = queryOptions?.queryKey ?? getTimeInfoQueryKey(ocelId, params);
|
|
1794
|
+
const queryFn = ({ signal }) => timeInfo(ocelId, params, requestOptions, signal);
|
|
1795
|
+
return {
|
|
1796
|
+
queryKey,
|
|
1797
|
+
queryFn,
|
|
1798
|
+
enabled: !!ocelId,
|
|
1799
|
+
staleTime: 3e5,
|
|
1800
|
+
...queryOptions
|
|
1879
1801
|
};
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1802
|
+
};
|
|
1803
|
+
/**
|
|
1804
|
+
* @summary Get Time Info
|
|
1805
|
+
*/
|
|
1806
|
+
function useTimeInfo(ocelId, params, options, queryClient) {
|
|
1807
|
+
const queryOptions = getTimeInfoQueryOptions(ocelId, params, options);
|
|
1808
|
+
return {
|
|
1809
|
+
...useQuery(queryOptions, queryClient),
|
|
1810
|
+
queryKey: queryOptions.queryKey
|
|
1883
1811
|
};
|
|
1812
|
+
}
|
|
1813
|
+
/**
|
|
1814
|
+
* @summary Get E2O
|
|
1815
|
+
*/
|
|
1816
|
+
const e2o = (ocelId, params, options, signal) => {
|
|
1817
|
+
return customFetch$1({
|
|
1818
|
+
url: `/api/external/modules/ocel/v1/${ocelId}/relations/e2o`,
|
|
1819
|
+
method: "GET",
|
|
1820
|
+
params,
|
|
1821
|
+
...signal ? { signal } : {}
|
|
1822
|
+
}, options);
|
|
1823
|
+
};
|
|
1824
|
+
const getE2oQueryKey = (ocelId, params) => {
|
|
1825
|
+
return [`/api/external/modules/ocel/v1/${ocelId}/relations/e2o`, ...params ? [params] : []];
|
|
1826
|
+
};
|
|
1827
|
+
const getE2oQueryOptions = (ocelId, params, options) => {
|
|
1828
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1829
|
+
const queryKey = queryOptions?.queryKey ?? getE2oQueryKey(ocelId, params);
|
|
1830
|
+
const queryFn = ({ signal }) => e2o(ocelId, params, requestOptions, signal);
|
|
1884
1831
|
return {
|
|
1885
|
-
|
|
1886
|
-
|
|
1832
|
+
queryKey,
|
|
1833
|
+
queryFn,
|
|
1834
|
+
enabled: !!ocelId,
|
|
1835
|
+
staleTime: 3e5,
|
|
1836
|
+
...queryOptions
|
|
1887
1837
|
};
|
|
1888
1838
|
};
|
|
1889
1839
|
/**
|
|
1890
|
-
* @summary
|
|
1840
|
+
* @summary Get E2O
|
|
1891
1841
|
*/
|
|
1892
|
-
|
|
1893
|
-
|
|
1842
|
+
function useE2o(ocelId, params, options, queryClient) {
|
|
1843
|
+
const queryOptions = getE2oQueryOptions(ocelId, params, options);
|
|
1844
|
+
return {
|
|
1845
|
+
...useQuery(queryOptions, queryClient),
|
|
1846
|
+
queryKey: queryOptions.queryKey
|
|
1847
|
+
};
|
|
1848
|
+
}
|
|
1849
|
+
/**
|
|
1850
|
+
* @summary Get O2O
|
|
1851
|
+
*/
|
|
1852
|
+
const o2o = (ocelId, params, options, signal) => {
|
|
1853
|
+
return customFetch$1({
|
|
1854
|
+
url: `/api/external/modules/ocel/v1/${ocelId}/relations/o2o`,
|
|
1855
|
+
method: "GET",
|
|
1856
|
+
params,
|
|
1857
|
+
...signal ? { signal } : {}
|
|
1858
|
+
}, options);
|
|
1859
|
+
};
|
|
1860
|
+
const getO2oQueryKey = (ocelId, params) => {
|
|
1861
|
+
return [`/api/external/modules/ocel/v1/${ocelId}/relations/o2o`, ...params ? [params] : []];
|
|
1862
|
+
};
|
|
1863
|
+
const getO2oQueryOptions = (ocelId, params, options) => {
|
|
1864
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1865
|
+
const queryKey = queryOptions?.queryKey ?? getO2oQueryKey(ocelId, params);
|
|
1866
|
+
const queryFn = ({ signal }) => o2o(ocelId, params, requestOptions, signal);
|
|
1867
|
+
return {
|
|
1868
|
+
queryKey,
|
|
1869
|
+
queryFn,
|
|
1870
|
+
enabled: !!ocelId,
|
|
1871
|
+
staleTime: 3e5,
|
|
1872
|
+
...queryOptions
|
|
1873
|
+
};
|
|
1894
1874
|
};
|
|
1895
1875
|
/**
|
|
1896
|
-
* @summary
|
|
1876
|
+
* @summary Get O2O
|
|
1897
1877
|
*/
|
|
1898
|
-
|
|
1899
|
-
const
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1878
|
+
function useO2o(ocelId, params, options, queryClient) {
|
|
1879
|
+
const queryOptions = getO2oQueryOptions(ocelId, params, options);
|
|
1880
|
+
return {
|
|
1881
|
+
...useQuery(queryOptions, queryClient),
|
|
1882
|
+
queryKey: queryOptions.queryKey
|
|
1883
|
+
};
|
|
1884
|
+
}
|
|
1885
|
+
/**
|
|
1886
|
+
* @summary Get E2O Combinations
|
|
1887
|
+
*/
|
|
1888
|
+
const e2oCombinations = (ocelId, params, options, signal) => {
|
|
1889
|
+
return customFetch$1({
|
|
1890
|
+
url: `/api/external/modules/ocel/v1/${ocelId}/relations/e2o/combinations`,
|
|
1891
|
+
method: "GET",
|
|
1892
|
+
params,
|
|
1893
|
+
...signal ? { signal } : {}
|
|
1894
|
+
}, options);
|
|
1905
1895
|
};
|
|
1906
|
-
const
|
|
1907
|
-
return
|
|
1908
|
-
...options,
|
|
1909
|
-
method: "POST"
|
|
1910
|
-
});
|
|
1896
|
+
const getE2oCombinationsQueryKey = (ocelId, params) => {
|
|
1897
|
+
return [`/api/external/modules/ocel/v1/${ocelId}/relations/e2o/combinations`, ...params ? [params] : []];
|
|
1911
1898
|
};
|
|
1912
|
-
const
|
|
1913
|
-
const
|
|
1914
|
-
const
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
request: void 0
|
|
1899
|
+
const getE2oCombinationsQueryOptions = (ocelId, params, options) => {
|
|
1900
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1901
|
+
const queryKey = queryOptions?.queryKey ?? getE2oCombinationsQueryKey(ocelId, params);
|
|
1902
|
+
const queryFn = ({ signal }) => e2oCombinations(ocelId, params, requestOptions, signal);
|
|
1903
|
+
return {
|
|
1904
|
+
queryKey,
|
|
1905
|
+
queryFn,
|
|
1906
|
+
enabled: !!ocelId,
|
|
1907
|
+
staleTime: 3e5,
|
|
1908
|
+
...queryOptions
|
|
1923
1909
|
};
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1910
|
+
};
|
|
1911
|
+
/**
|
|
1912
|
+
* @summary Get E2O Combinations
|
|
1913
|
+
*/
|
|
1914
|
+
function useE2oCombinations(ocelId, params, options, queryClient) {
|
|
1915
|
+
const queryOptions = getE2oCombinationsQueryOptions(ocelId, params, options);
|
|
1916
|
+
return {
|
|
1917
|
+
...useQuery(queryOptions, queryClient),
|
|
1918
|
+
queryKey: queryOptions.queryKey
|
|
1927
1919
|
};
|
|
1920
|
+
}
|
|
1921
|
+
/**
|
|
1922
|
+
* @summary Get O2O Combinations
|
|
1923
|
+
*/
|
|
1924
|
+
const o2oCombinations = (ocelId, params, options, signal) => {
|
|
1925
|
+
return customFetch$1({
|
|
1926
|
+
url: `/api/external/modules/ocel/v1/${ocelId}/relations/o2o/combinations`,
|
|
1927
|
+
method: "GET",
|
|
1928
|
+
params,
|
|
1929
|
+
...signal ? { signal } : {}
|
|
1930
|
+
}, options);
|
|
1931
|
+
};
|
|
1932
|
+
const getO2oCombinationsQueryKey = (ocelId, params) => {
|
|
1933
|
+
return [`/api/external/modules/ocel/v1/${ocelId}/relations/o2o/combinations`, ...params ? [params] : []];
|
|
1934
|
+
};
|
|
1935
|
+
const getO2oCombinationsQueryOptions = (ocelId, params, options) => {
|
|
1936
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1937
|
+
const queryKey = queryOptions?.queryKey ?? getO2oCombinationsQueryKey(ocelId, params);
|
|
1938
|
+
const queryFn = ({ signal }) => o2oCombinations(ocelId, params, requestOptions, signal);
|
|
1928
1939
|
return {
|
|
1929
|
-
|
|
1930
|
-
|
|
1940
|
+
queryKey,
|
|
1941
|
+
queryFn,
|
|
1942
|
+
enabled: !!ocelId,
|
|
1943
|
+
staleTime: 3e5,
|
|
1944
|
+
...queryOptions
|
|
1931
1945
|
};
|
|
1932
1946
|
};
|
|
1933
1947
|
/**
|
|
1934
|
-
* @summary
|
|
1948
|
+
* @summary Get O2O Combinations
|
|
1935
1949
|
*/
|
|
1936
|
-
|
|
1937
|
-
|
|
1950
|
+
function useO2oCombinations(ocelId, params, options, queryClient) {
|
|
1951
|
+
const queryOptions = getO2oCombinationsQueryOptions(ocelId, params, options);
|
|
1952
|
+
return {
|
|
1953
|
+
...useQuery(queryOptions, queryClient),
|
|
1954
|
+
queryKey: queryOptions.queryKey
|
|
1955
|
+
};
|
|
1956
|
+
}
|
|
1957
|
+
/**
|
|
1958
|
+
* @summary Get Quantity Info
|
|
1959
|
+
*/
|
|
1960
|
+
const quantityInfo = (ocelId, params, options, signal) => {
|
|
1961
|
+
return customFetch$1({
|
|
1962
|
+
url: `/api/external/modules/ocel/v1/${ocelId}/quantity/info`,
|
|
1963
|
+
method: "GET",
|
|
1964
|
+
params,
|
|
1965
|
+
...signal ? { signal } : {}
|
|
1966
|
+
}, options);
|
|
1967
|
+
};
|
|
1968
|
+
const getQuantityInfoQueryKey = (ocelId, params) => {
|
|
1969
|
+
return [`/api/external/modules/ocel/v1/${ocelId}/quantity/info`, ...params ? [params] : []];
|
|
1970
|
+
};
|
|
1971
|
+
const getQuantityInfoQueryOptions = (ocelId, params, options) => {
|
|
1972
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1973
|
+
const queryKey = queryOptions?.queryKey ?? getQuantityInfoQueryKey(ocelId, params);
|
|
1974
|
+
const queryFn = ({ signal }) => quantityInfo(ocelId, params, requestOptions, signal);
|
|
1975
|
+
return {
|
|
1976
|
+
queryKey,
|
|
1977
|
+
queryFn,
|
|
1978
|
+
enabled: !!ocelId,
|
|
1979
|
+
staleTime: 3e5,
|
|
1980
|
+
...queryOptions
|
|
1981
|
+
};
|
|
1938
1982
|
};
|
|
1939
1983
|
/**
|
|
1940
|
-
* @summary
|
|
1984
|
+
* @summary Get Quantity Info
|
|
1985
|
+
*/
|
|
1986
|
+
function useQuantityInfo(ocelId, params, options, queryClient) {
|
|
1987
|
+
const queryOptions = getQuantityInfoQueryOptions(ocelId, params, options);
|
|
1988
|
+
return {
|
|
1989
|
+
...useQuery(queryOptions, queryClient),
|
|
1990
|
+
queryKey: queryOptions.queryKey
|
|
1991
|
+
};
|
|
1992
|
+
}
|
|
1993
|
+
/**
|
|
1994
|
+
* @summary Download OCEL
|
|
1941
1995
|
*/
|
|
1942
|
-
const
|
|
1943
|
-
return
|
|
1996
|
+
const downloadOCEL = (ocelId, params, options, signal) => {
|
|
1997
|
+
return customFetch$1({
|
|
1998
|
+
url: `/api/external/modules/ocel/v1/${ocelId}/download`,
|
|
1999
|
+
method: "GET",
|
|
2000
|
+
params,
|
|
2001
|
+
...signal ? { signal } : {}
|
|
2002
|
+
}, options);
|
|
1944
2003
|
};
|
|
1945
|
-
const
|
|
1946
|
-
return
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
}
|
|
2004
|
+
const getDownloadOCELQueryKey = (ocelId, params) => {
|
|
2005
|
+
return [`/api/external/modules/ocel/v1/${ocelId}/download`, ...params ? [params] : []];
|
|
2006
|
+
};
|
|
2007
|
+
const getDownloadOCELQueryOptions = (ocelId, params, options) => {
|
|
2008
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
2009
|
+
const queryKey = queryOptions?.queryKey ?? getDownloadOCELQueryKey(ocelId, params);
|
|
2010
|
+
const queryFn = ({ signal }) => downloadOCEL(ocelId, params, requestOptions, signal);
|
|
2011
|
+
return {
|
|
2012
|
+
queryKey,
|
|
2013
|
+
queryFn,
|
|
2014
|
+
enabled: !!ocelId,
|
|
2015
|
+
staleTime: 3e5,
|
|
2016
|
+
...queryOptions
|
|
2017
|
+
};
|
|
2018
|
+
};
|
|
2019
|
+
/**
|
|
2020
|
+
* @summary Download OCEL
|
|
2021
|
+
*/
|
|
2022
|
+
function useDownloadOCEL(ocelId, params, options, queryClient) {
|
|
2023
|
+
const queryOptions = getDownloadOCELQueryOptions(ocelId, params, options);
|
|
2024
|
+
return {
|
|
2025
|
+
...useQuery(queryOptions, queryClient),
|
|
2026
|
+
queryKey: queryOptions.queryKey
|
|
2027
|
+
};
|
|
2028
|
+
}
|
|
2029
|
+
/**
|
|
2030
|
+
* @summary Download OCEL as a xes
|
|
2031
|
+
*/
|
|
2032
|
+
const downloadFlatLog = (ocelId, params, options, signal) => {
|
|
2033
|
+
return customFetch$1({
|
|
2034
|
+
url: `/api/external/modules/ocel/v1/${ocelId}/download/xes`,
|
|
2035
|
+
method: "GET",
|
|
2036
|
+
params,
|
|
2037
|
+
...signal ? { signal } : {}
|
|
2038
|
+
}, options);
|
|
2039
|
+
};
|
|
2040
|
+
const getDownloadFlatLogQueryKey = (ocelId, params) => {
|
|
2041
|
+
return [`/api/external/modules/ocel/v1/${ocelId}/download/xes`, ...params ? [params] : []];
|
|
2042
|
+
};
|
|
2043
|
+
const getDownloadFlatLogQueryOptions = (ocelId, params, options) => {
|
|
2044
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
2045
|
+
const queryKey = queryOptions?.queryKey ?? getDownloadFlatLogQueryKey(ocelId, params);
|
|
2046
|
+
const queryFn = ({ signal }) => downloadFlatLog(ocelId, params, requestOptions, signal);
|
|
2047
|
+
return {
|
|
2048
|
+
queryKey,
|
|
2049
|
+
queryFn,
|
|
2050
|
+
enabled: !!ocelId,
|
|
2051
|
+
staleTime: 3e5,
|
|
2052
|
+
...queryOptions
|
|
2053
|
+
};
|
|
2054
|
+
};
|
|
2055
|
+
/**
|
|
2056
|
+
* @summary Download OCEL as a xes
|
|
2057
|
+
*/
|
|
2058
|
+
function useDownloadFlatLog(ocelId, params, options, queryClient) {
|
|
2059
|
+
const queryOptions = getDownloadFlatLogQueryOptions(ocelId, params, options);
|
|
2060
|
+
return {
|
|
2061
|
+
...useQuery(queryOptions, queryClient),
|
|
2062
|
+
queryKey: queryOptions.queryKey
|
|
2063
|
+
};
|
|
2064
|
+
}
|
|
2065
|
+
/**
|
|
2066
|
+
* Filters the OCEL to the objects of `object_type` that follow any of the given `variant_ids`, then flattens that sub-log by `object_type` into a XES file (one trace per object).
|
|
2067
|
+
* @summary Download selected object variants as a flat XES log
|
|
2068
|
+
*/
|
|
2069
|
+
const downloadVariantFlatLog = (ocelId, params, options, signal) => {
|
|
2070
|
+
return customFetch$1({
|
|
2071
|
+
url: `/api/external/modules/ocel/v1/${ocelId}/objects/variants/download/xes`,
|
|
2072
|
+
method: "GET",
|
|
2073
|
+
params,
|
|
2074
|
+
...signal ? { signal } : {}
|
|
2075
|
+
}, options);
|
|
1950
2076
|
};
|
|
1951
|
-
const
|
|
1952
|
-
return [`/api/external/
|
|
2077
|
+
const getDownloadVariantFlatLogQueryKey = (ocelId, params) => {
|
|
2078
|
+
return [`/api/external/modules/ocel/v1/${ocelId}/objects/variants/download/xes`, ...params ? [params] : []];
|
|
1953
2079
|
};
|
|
1954
|
-
const
|
|
2080
|
+
const getDownloadVariantFlatLogQueryOptions = (ocelId, params, options) => {
|
|
1955
2081
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1956
|
-
const queryKey = queryOptions?.queryKey ??
|
|
1957
|
-
const queryFn = ({ signal }) =>
|
|
1958
|
-
signal,
|
|
1959
|
-
...requestOptions
|
|
1960
|
-
});
|
|
2082
|
+
const queryKey = queryOptions?.queryKey ?? getDownloadVariantFlatLogQueryKey(ocelId, params);
|
|
2083
|
+
const queryFn = ({ signal }) => downloadVariantFlatLog(ocelId, params, requestOptions, signal);
|
|
1961
2084
|
return {
|
|
1962
2085
|
queryKey,
|
|
1963
2086
|
queryFn,
|
|
2087
|
+
enabled: !!ocelId,
|
|
1964
2088
|
staleTime: 3e5,
|
|
1965
2089
|
...queryOptions
|
|
1966
2090
|
};
|
|
1967
2091
|
};
|
|
1968
2092
|
/**
|
|
1969
|
-
* @summary
|
|
2093
|
+
* @summary Download selected object variants as a flat XES log
|
|
1970
2094
|
*/
|
|
1971
|
-
function
|
|
1972
|
-
const queryOptions =
|
|
2095
|
+
function useDownloadVariantFlatLog(ocelId, params, options, queryClient) {
|
|
2096
|
+
const queryOptions = getDownloadVariantFlatLogQueryOptions(ocelId, params, options);
|
|
1973
2097
|
return {
|
|
1974
2098
|
...useQuery(queryOptions, queryClient),
|
|
1975
2099
|
queryKey: queryOptions.queryKey
|
|
1976
2100
|
};
|
|
1977
2101
|
}
|
|
1978
|
-
|
|
1979
2102
|
//#endregion
|
|
1980
|
-
export { DotVisLayoutEngine,
|
|
2103
|
+
export { AggregatedAttributesEntityType, DotVisLayoutEngine, DownloadOCELExt, E2oCombinationsDirection, E2oDirection, GraphNodeLabelPos, GraphNodeShape, GraphvizLayoutConfigEngine, O2oCombinationsDirection, O2oDirection, TableColumnDataType, TaskState, ValueType, activities, aggregatedAttributes, attributeNames, createDiscoveryTask, deleteOcel, deletePlugin, deleteResource, disableDiscoveryMethod, discoveryTask, downloadFlatLog, downloadOCEL, downloadPluginResults, downloadResource, downloadResourceAsPnml, downloadVariantFlatLog, e2o, e2oCombinations, enableDiscoveryMethod, eventAttributes, eventCounts, eventIds, getActivitiesQueryKey, getActivitiesQueryOptions, getAggregatedAttributesQueryKey, getAggregatedAttributesQueryOptions, getAttributeNamesQueryKey, getAttributeNamesQueryOptions, getComputedValues, getCreateDiscoveryTaskMutationOptions, getDefaultOcel, getDeleteOcelMutationOptions, getDeletePluginMutationOptions, getDeleteResourceMutationOptions, getDisableDiscoveryMethodMutationOptions, getDiscoveryTaskQueryKey, getDiscoveryTaskQueryOptions, getDownloadFlatLogQueryKey, getDownloadFlatLogQueryOptions, getDownloadOCELQueryKey, getDownloadOCELQueryOptions, getDownloadPluginResultsMutationOptions, getDownloadResourceAsPnmlQueryKey, getDownloadResourceAsPnmlQueryOptions, getDownloadResourceQueryKey, getDownloadResourceQueryOptions, getDownloadVariantFlatLogQueryKey, getDownloadVariantFlatLogQueryOptions, getE2oCombinationsQueryKey, getE2oCombinationsQueryOptions, getE2oQueryKey, getE2oQueryOptions, getEnableDiscoveryMethodMutationOptions, getEventAttributesQueryKey, getEventAttributesQueryOptions, getEventCountsQueryKey, getEventCountsQueryOptions, getEventIdsQueryKey, getEventIdsQueryOptions, getExtensionMeta, getGetComputedValuesQueryKey, getGetComputedValuesQueryOptions, getGetDefaultOcelQueryKey, getGetDefaultOcelQueryOptions, getGetExtensionMetaQueryKey, getGetExtensionMetaQueryOptions, getGetOcelQueryKey, getGetOcelQueryOptions, getGetOcelsQueryKey, getGetOcelsQueryOptions, getGetPluginMethodQueryKey, getGetPluginMethodQueryOptions, getGetPluginQueryKey, getGetPluginQueryOptions, getGetResourceMetaQueryKey, getGetResourceMetaQueryOptions, getGetSystemTaskQueryKey, getGetSystemTaskQueryOptions, getGetSystemTasksQueryKey, getGetSystemTasksQueryOptions, getImportDefaultOcelMutationOptions, getListDiscoveryFiltersQueryKey, getListDiscoveryFiltersQueryOptions, getListDiscoveryMethodsQueryKey, getListDiscoveryMethodsQueryOptions, getLogoutMutationOptions, getO2oCombinationsQueryKey, getO2oCombinationsQueryOptions, getO2oQueryKey, getO2oQueryOptions, getObjectAttributesQueryKey, getObjectAttributesQueryOptions, getObjectCountsQueryKey, getObjectCountsQueryOptions, getObjectIdsQueryKey, getObjectIdsQueryOptions, getObjectTypesQueryKey, getObjectTypesQueryOptions, getObjectVariantsQueryKey, getObjectVariantsQueryOptions, getOcel, getOcels, getPlugin, getPluginMethod, getPluginResultQueryKey, getPluginResultQueryOptions, getPluginsQueryKey, getPluginsQueryOptions, getQuantityInfoQueryKey, getQuantityInfoQueryOptions, getRenameOcelMutationOptions, getRenameResourceMutationOptions, getResourceMeta, getResourceQueryKey, getResourceQueryOptions, getResourcesQueryKey, getResourcesQueryOptions, getRunPluginMutationOptions, getSaveDiscoveryMutationOptions, getSavePluginResultsMutationOptions, getSystemTask, getSystemTasks, getTimeInfoQueryKey, getTimeInfoQueryOptions, getUploadMutationOptions, getUploadResourceMutationOptions, importDefaultOcel, listDiscoveryFilters, listDiscoveryMethods, logout, o2o, o2oCombinations, objectAttributes, objectCounts, objectIds, objectTypes, objectVariants, pluginResult, plugins, quantityInfo, renameOcel, renameResource, resource, resources, runPlugin, saveDiscovery, savePluginResults, timeInfo, upload, uploadResource, useActivities, useAggregatedAttributes, useAttributeNames, useCreateDiscoveryTask, useDeleteOcel, useDeletePlugin, useDeleteResource, useDisableDiscoveryMethod, useDiscoveryTask, useDownloadFlatLog, useDownloadOCEL, useDownloadPluginResults, useDownloadResource, useDownloadResourceAsPnml, useDownloadVariantFlatLog, useE2o, useE2oCombinations, useEnableDiscoveryMethod, useEventAttributes, useEventCounts, useEventIds, useGetComputedValues, useGetDefaultOcel, useGetExtensionMeta, useGetOcel, useGetOcels, useGetPlugin, useGetPluginMethod, useGetResourceMeta, useGetSystemTask, useGetSystemTasks, useImportDefaultOcel, useListDiscoveryFilters, useListDiscoveryMethods, useLogout, useO2o, useO2oCombinations, useObjectAttributes, useObjectCounts, useObjectIds, useObjectTypes, useObjectVariants, usePluginResult, usePlugins, useQuantityInfo, useRenameOcel, useRenameResource, useResource, useResources, useRunPlugin, useSaveDiscovery, useSavePluginResults, useTimeInfo, useUpload, useUploadResource };
|