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