@ocelescope/api-base 0.7.0 → 0.8.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 +920 -1111
- package/dist/index.js +209 -395
- package/package.json +11 -11
package/dist/index.js
CHANGED
|
@@ -10,13 +10,17 @@ const customFetch$1 = async (config, options) => customFetch(config, options);
|
|
|
10
10
|
* Ocelescope Backend
|
|
11
11
|
* OpenAPI spec version: 0.1
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
const DotVisLayoutEngine = {
|
|
14
|
+
circo: "circo",
|
|
15
|
+
dot: "dot",
|
|
16
|
+
fdp: "fdp",
|
|
17
|
+
sfdp: "sfdp",
|
|
18
|
+
neato: "neato",
|
|
19
|
+
osage: "osage",
|
|
20
|
+
patchwork: "patchwork",
|
|
21
|
+
twopi: "twopi",
|
|
22
|
+
nop: "nop",
|
|
23
|
+
nop2: "nop2"
|
|
20
24
|
};
|
|
21
25
|
const GraphNodeShape = {
|
|
22
26
|
circle: "circle",
|
|
@@ -79,17 +83,13 @@ const TableColumnDataType = {
|
|
|
79
83
|
date: "date",
|
|
80
84
|
datetime: "datetime"
|
|
81
85
|
};
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
patchwork: "patchwork",
|
|
90
|
-
twopi: "twopi",
|
|
91
|
-
nop: "nop",
|
|
92
|
-
nop2: "nop2"
|
|
86
|
+
const TaskState = {
|
|
87
|
+
PENDING: "PENDING",
|
|
88
|
+
STARTED: "STARTED",
|
|
89
|
+
SUCCESS: "SUCCESS",
|
|
90
|
+
FAILURE: "FAILURE",
|
|
91
|
+
SKIPPED: "SKIPPED",
|
|
92
|
+
CANCELLED: "CANCELLED"
|
|
93
93
|
};
|
|
94
94
|
const withQueryKey$1 = (query, queryKey) => {
|
|
95
95
|
const result = { queryKey };
|
|
@@ -117,8 +117,9 @@ const upload = (bodyUpload, options, signal) => {
|
|
|
117
117
|
...signal ? { signal } : {}
|
|
118
118
|
}, options);
|
|
119
119
|
};
|
|
120
|
+
const getUploadMutationKey = () => ["upload"];
|
|
120
121
|
const getUploadMutationOptions = (options) => {
|
|
121
|
-
const mutationKey =
|
|
122
|
+
const mutationKey = getUploadMutationKey();
|
|
122
123
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
123
124
|
...options,
|
|
124
125
|
mutation: {
|
|
@@ -154,8 +155,9 @@ const logout = (options, signal) => {
|
|
|
154
155
|
...signal ? { signal } : {}
|
|
155
156
|
}, options);
|
|
156
157
|
};
|
|
158
|
+
const getLogoutMutationKey = () => ["logout"];
|
|
157
159
|
const getLogoutMutationOptions = (options) => {
|
|
158
|
-
const mutationKey =
|
|
160
|
+
const mutationKey = getLogoutMutationKey();
|
|
159
161
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
160
162
|
...options,
|
|
161
163
|
mutation: {
|
|
@@ -181,253 +183,6 @@ const useLogout = (options, queryClient) => {
|
|
|
181
183
|
return useMutation(getLogoutMutationOptions(options), queryClient);
|
|
182
184
|
};
|
|
183
185
|
/**
|
|
184
|
-
* @summary Create a discovery task
|
|
185
|
-
*/
|
|
186
|
-
const createDiscoveryTask = (ocelId, createDiscoveryTaskBody, options, signal) => {
|
|
187
|
-
return customFetch$1({
|
|
188
|
-
url: `/api/external/discovery/ocels/${ocelId}/tasks`,
|
|
189
|
-
method: "POST",
|
|
190
|
-
headers: { "Content-Type": "application/json" },
|
|
191
|
-
data: createDiscoveryTaskBody,
|
|
192
|
-
...signal ? { signal } : {}
|
|
193
|
-
}, options);
|
|
194
|
-
};
|
|
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
|
-
};
|
|
211
|
-
return {
|
|
212
|
-
mutationFn,
|
|
213
|
-
...mutationOptions
|
|
214
|
-
};
|
|
215
|
-
};
|
|
216
|
-
/**
|
|
217
|
-
* @summary Create a discovery task
|
|
218
|
-
*/
|
|
219
|
-
const useCreateDiscoveryTask = (options, queryClient) => {
|
|
220
|
-
return useMutation(getCreateDiscoveryTaskMutationOptions(options), queryClient);
|
|
221
|
-
};
|
|
222
|
-
/**
|
|
223
|
-
* @summary Get Discovery Task
|
|
224
|
-
*/
|
|
225
|
-
const discoveryTask = (taskId, options, signal) => {
|
|
226
|
-
return customFetch$1({
|
|
227
|
-
url: `/api/external/discovery/tasks/${taskId}`,
|
|
228
|
-
method: "GET",
|
|
229
|
-
...signal ? { signal } : {}
|
|
230
|
-
}, options);
|
|
231
|
-
};
|
|
232
|
-
const getDiscoveryTaskQueryKey = (taskId) => {
|
|
233
|
-
return [`/api/external/discovery/tasks/${taskId}`];
|
|
234
|
-
};
|
|
235
|
-
const getDiscoveryTaskQueryOptions = (taskId, options) => {
|
|
236
|
-
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
237
|
-
const queryKey = queryOptions?.queryKey ?? getDiscoveryTaskQueryKey(taskId);
|
|
238
|
-
const queryFn = ({ signal }) => discoveryTask(taskId, requestOptions, signal);
|
|
239
|
-
return {
|
|
240
|
-
queryKey,
|
|
241
|
-
queryFn,
|
|
242
|
-
enabled: taskId !== null && taskId !== void 0,
|
|
243
|
-
staleTime: 3e5,
|
|
244
|
-
...queryOptions
|
|
245
|
-
};
|
|
246
|
-
};
|
|
247
|
-
/**
|
|
248
|
-
* @summary Get Discovery Task
|
|
249
|
-
*/
|
|
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);
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* @summary Save Discovery
|
|
257
|
-
*/
|
|
258
|
-
const saveDiscovery = (taskId, options, signal) => {
|
|
259
|
-
return customFetch$1({
|
|
260
|
-
url: `/api/external/discovery/tasks/${taskId}`,
|
|
261
|
-
method: "POST",
|
|
262
|
-
...signal ? { signal } : {}
|
|
263
|
-
}, options);
|
|
264
|
-
};
|
|
265
|
-
const getSaveDiscoveryMutationOptions = (options) => {
|
|
266
|
-
const mutationKey = ["saveDiscovery"];
|
|
267
|
-
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
268
|
-
...options,
|
|
269
|
-
mutation: {
|
|
270
|
-
...options.mutation,
|
|
271
|
-
mutationKey
|
|
272
|
-
}
|
|
273
|
-
} : {
|
|
274
|
-
mutation: { mutationKey },
|
|
275
|
-
request: void 0
|
|
276
|
-
};
|
|
277
|
-
const mutationFn = (props) => {
|
|
278
|
-
const { taskId } = props ?? {};
|
|
279
|
-
return saveDiscovery(taskId, requestOptions);
|
|
280
|
-
};
|
|
281
|
-
return {
|
|
282
|
-
mutationFn,
|
|
283
|
-
...mutationOptions
|
|
284
|
-
};
|
|
285
|
-
};
|
|
286
|
-
/**
|
|
287
|
-
* @summary Save Discovery
|
|
288
|
-
*/
|
|
289
|
-
const useSaveDiscovery = (options, queryClient) => {
|
|
290
|
-
return useMutation(getSaveDiscoveryMutationOptions(options), queryClient);
|
|
291
|
-
};
|
|
292
|
-
/**
|
|
293
|
-
* @summary List filters available to discovery tasks
|
|
294
|
-
*/
|
|
295
|
-
const listDiscoveryFilters = (options, signal) => {
|
|
296
|
-
return customFetch$1({
|
|
297
|
-
url: `/api/external/discovery/filters`,
|
|
298
|
-
method: "GET",
|
|
299
|
-
...signal ? { signal } : {}
|
|
300
|
-
}, options);
|
|
301
|
-
};
|
|
302
|
-
const getListDiscoveryFiltersQueryKey = () => {
|
|
303
|
-
return [`/api/external/discovery/filters`];
|
|
304
|
-
};
|
|
305
|
-
const getListDiscoveryFiltersQueryOptions = (options) => {
|
|
306
|
-
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
307
|
-
const queryKey = queryOptions?.queryKey ?? getListDiscoveryFiltersQueryKey();
|
|
308
|
-
const queryFn = ({ signal }) => listDiscoveryFilters(requestOptions, signal);
|
|
309
|
-
return {
|
|
310
|
-
queryKey,
|
|
311
|
-
queryFn,
|
|
312
|
-
staleTime: 3e5,
|
|
313
|
-
...queryOptions
|
|
314
|
-
};
|
|
315
|
-
};
|
|
316
|
-
/**
|
|
317
|
-
* @summary List filters available to discovery tasks
|
|
318
|
-
*/
|
|
319
|
-
function useListDiscoveryFilters(options, queryClient) {
|
|
320
|
-
const queryOptions = getListDiscoveryFiltersQueryOptions(options);
|
|
321
|
-
const query = useQuery(queryOptions, queryClient);
|
|
322
|
-
return withQueryKey$1(query, queryOptions.queryKey);
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* @summary List discovery methods
|
|
326
|
-
*/
|
|
327
|
-
const listDiscoveryMethods = (options, signal) => {
|
|
328
|
-
return customFetch$1({
|
|
329
|
-
url: `/api/external/discovery/methods`,
|
|
330
|
-
method: "GET",
|
|
331
|
-
...signal ? { signal } : {}
|
|
332
|
-
}, options);
|
|
333
|
-
};
|
|
334
|
-
const getListDiscoveryMethodsQueryKey = () => {
|
|
335
|
-
return [`/api/external/discovery/methods`];
|
|
336
|
-
};
|
|
337
|
-
const getListDiscoveryMethodsQueryOptions = (options) => {
|
|
338
|
-
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
339
|
-
const queryKey = queryOptions?.queryKey ?? getListDiscoveryMethodsQueryKey();
|
|
340
|
-
const queryFn = ({ signal }) => listDiscoveryMethods(requestOptions, signal);
|
|
341
|
-
return {
|
|
342
|
-
queryKey,
|
|
343
|
-
queryFn,
|
|
344
|
-
staleTime: 3e5,
|
|
345
|
-
...queryOptions
|
|
346
|
-
};
|
|
347
|
-
};
|
|
348
|
-
/**
|
|
349
|
-
* @summary List discovery methods
|
|
350
|
-
*/
|
|
351
|
-
function useListDiscoveryMethods(options, queryClient) {
|
|
352
|
-
const queryOptions = getListDiscoveryMethodsQueryOptions(options);
|
|
353
|
-
const query = useQuery(queryOptions, queryClient);
|
|
354
|
-
return withQueryKey$1(query, queryOptions.queryKey);
|
|
355
|
-
}
|
|
356
|
-
/**
|
|
357
|
-
* @summary Disable a discovery method
|
|
358
|
-
*/
|
|
359
|
-
const disableDiscoveryMethod = (methodId, options, signal) => {
|
|
360
|
-
return customFetch$1({
|
|
361
|
-
url: `/api/external/discovery/methods/${methodId}/disable`,
|
|
362
|
-
method: "POST",
|
|
363
|
-
...signal ? { signal } : {}
|
|
364
|
-
}, options);
|
|
365
|
-
};
|
|
366
|
-
const getDisableDiscoveryMethodMutationOptions = (options) => {
|
|
367
|
-
const mutationKey = ["disableDiscoveryMethod"];
|
|
368
|
-
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
369
|
-
...options,
|
|
370
|
-
mutation: {
|
|
371
|
-
...options.mutation,
|
|
372
|
-
mutationKey
|
|
373
|
-
}
|
|
374
|
-
} : {
|
|
375
|
-
mutation: { mutationKey },
|
|
376
|
-
request: void 0
|
|
377
|
-
};
|
|
378
|
-
const mutationFn = (props) => {
|
|
379
|
-
const { methodId } = props ?? {};
|
|
380
|
-
return disableDiscoveryMethod(methodId, requestOptions);
|
|
381
|
-
};
|
|
382
|
-
return {
|
|
383
|
-
mutationFn,
|
|
384
|
-
...mutationOptions
|
|
385
|
-
};
|
|
386
|
-
};
|
|
387
|
-
/**
|
|
388
|
-
* @summary Disable a discovery method
|
|
389
|
-
*/
|
|
390
|
-
const useDisableDiscoveryMethod = (options, queryClient) => {
|
|
391
|
-
return useMutation(getDisableDiscoveryMethodMutationOptions(options), queryClient);
|
|
392
|
-
};
|
|
393
|
-
/**
|
|
394
|
-
* @summary Enable a discovery method
|
|
395
|
-
*/
|
|
396
|
-
const enableDiscoveryMethod = (methodId, options, signal) => {
|
|
397
|
-
return customFetch$1({
|
|
398
|
-
url: `/api/external/discovery/methods/${methodId}/enable`,
|
|
399
|
-
method: "POST",
|
|
400
|
-
...signal ? { signal } : {}
|
|
401
|
-
}, options);
|
|
402
|
-
};
|
|
403
|
-
const getEnableDiscoveryMethodMutationOptions = (options) => {
|
|
404
|
-
const mutationKey = ["enableDiscoveryMethod"];
|
|
405
|
-
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
406
|
-
...options,
|
|
407
|
-
mutation: {
|
|
408
|
-
...options.mutation,
|
|
409
|
-
mutationKey
|
|
410
|
-
}
|
|
411
|
-
} : {
|
|
412
|
-
mutation: { mutationKey },
|
|
413
|
-
request: void 0
|
|
414
|
-
};
|
|
415
|
-
const mutationFn = (props) => {
|
|
416
|
-
const { methodId } = props ?? {};
|
|
417
|
-
return enableDiscoveryMethod(methodId, requestOptions);
|
|
418
|
-
};
|
|
419
|
-
return {
|
|
420
|
-
mutationFn,
|
|
421
|
-
...mutationOptions
|
|
422
|
-
};
|
|
423
|
-
};
|
|
424
|
-
/**
|
|
425
|
-
* @summary Enable a discovery method
|
|
426
|
-
*/
|
|
427
|
-
const useEnableDiscoveryMethod = (options, queryClient) => {
|
|
428
|
-
return useMutation(getEnableDiscoveryMethodMutationOptions(options), queryClient);
|
|
429
|
-
};
|
|
430
|
-
/**
|
|
431
186
|
* @summary returns all tasks of a session
|
|
432
187
|
*/
|
|
433
188
|
const getSystemTasks = (params, options, signal) => {
|
|
@@ -496,20 +251,21 @@ function useGetSystemTask(taskId, options, queryClient) {
|
|
|
496
251
|
/**
|
|
497
252
|
* @summary Get Plugins
|
|
498
253
|
*/
|
|
499
|
-
const plugins = (options, signal) => {
|
|
254
|
+
const plugins = (params, options, signal) => {
|
|
500
255
|
return customFetch$1({
|
|
501
256
|
url: `/api/external/plugins`,
|
|
502
257
|
method: "GET",
|
|
258
|
+
params,
|
|
503
259
|
...signal ? { signal } : {}
|
|
504
260
|
}, options);
|
|
505
261
|
};
|
|
506
|
-
const getPluginsQueryKey = () => {
|
|
507
|
-
return [`/api/external/plugins
|
|
262
|
+
const getPluginsQueryKey = (params) => {
|
|
263
|
+
return [`/api/external/plugins`, ...params ? [params] : []];
|
|
508
264
|
};
|
|
509
|
-
const getPluginsQueryOptions = (options) => {
|
|
265
|
+
const getPluginsQueryOptions = (params, options) => {
|
|
510
266
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
511
|
-
const queryKey = queryOptions?.queryKey ?? getPluginsQueryKey();
|
|
512
|
-
const queryFn = ({ signal }) => plugins(requestOptions, signal);
|
|
267
|
+
const queryKey = queryOptions?.queryKey ?? getPluginsQueryKey(params);
|
|
268
|
+
const queryFn = ({ signal }) => plugins(params, requestOptions, signal);
|
|
513
269
|
return {
|
|
514
270
|
queryKey,
|
|
515
271
|
queryFn,
|
|
@@ -520,8 +276,8 @@ const getPluginsQueryOptions = (options) => {
|
|
|
520
276
|
/**
|
|
521
277
|
* @summary Get Plugins
|
|
522
278
|
*/
|
|
523
|
-
function usePlugins(options, queryClient) {
|
|
524
|
-
const queryOptions = getPluginsQueryOptions(options);
|
|
279
|
+
function usePlugins(params, options, queryClient) {
|
|
280
|
+
const queryOptions = getPluginsQueryOptions(params, options);
|
|
525
281
|
const query = useQuery(queryOptions, queryClient);
|
|
526
282
|
return withQueryKey$1(query, queryOptions.queryKey);
|
|
527
283
|
}
|
|
@@ -530,13 +286,13 @@ function usePlugins(options, queryClient) {
|
|
|
530
286
|
*/
|
|
531
287
|
const getPlugin = (pluginId, options, signal) => {
|
|
532
288
|
return customFetch$1({
|
|
533
|
-
url: `/api/external/plugins/${pluginId}`,
|
|
289
|
+
url: `/api/external/plugins/plugin/${pluginId}`,
|
|
534
290
|
method: "GET",
|
|
535
291
|
...signal ? { signal } : {}
|
|
536
292
|
}, options);
|
|
537
293
|
};
|
|
538
294
|
const getGetPluginQueryKey = (pluginId) => {
|
|
539
|
-
return [`/api/external/plugins/${pluginId}`];
|
|
295
|
+
return [`/api/external/plugins/plugin/${pluginId}`];
|
|
540
296
|
};
|
|
541
297
|
const getGetPluginQueryOptions = (pluginId, options) => {
|
|
542
298
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
@@ -563,13 +319,14 @@ function useGetPlugin(pluginId, options, queryClient) {
|
|
|
563
319
|
*/
|
|
564
320
|
const deletePlugin = (pluginId, options, signal) => {
|
|
565
321
|
return customFetch$1({
|
|
566
|
-
url: `/api/external/plugins/${pluginId}`,
|
|
322
|
+
url: `/api/external/plugins/plugin/${pluginId}`,
|
|
567
323
|
method: "DELETE",
|
|
568
324
|
...signal ? { signal } : {}
|
|
569
325
|
}, options);
|
|
570
326
|
};
|
|
327
|
+
const getDeletePluginMutationKey = () => ["deletePlugin"];
|
|
571
328
|
const getDeletePluginMutationOptions = (options) => {
|
|
572
|
-
const mutationKey =
|
|
329
|
+
const mutationKey = getDeletePluginMutationKey();
|
|
573
330
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
574
331
|
...options,
|
|
575
332
|
mutation: {
|
|
@@ -600,13 +357,13 @@ const useDeletePlugin = (options, queryClient) => {
|
|
|
600
357
|
*/
|
|
601
358
|
const getPluginMethod = (pluginId, methodName, options, signal) => {
|
|
602
359
|
return customFetch$1({
|
|
603
|
-
url: `/api/external/plugins/${pluginId}/${methodName}`,
|
|
360
|
+
url: `/api/external/plugins/plugin/${pluginId}/${methodName}`,
|
|
604
361
|
method: "GET",
|
|
605
362
|
...signal ? { signal } : {}
|
|
606
363
|
}, options);
|
|
607
364
|
};
|
|
608
365
|
const getGetPluginMethodQueryKey = (pluginId, methodName) => {
|
|
609
|
-
return [`/api/external/plugins/${pluginId}/${methodName}`];
|
|
366
|
+
return [`/api/external/plugins/plugin/${pluginId}/${methodName}`];
|
|
610
367
|
};
|
|
611
368
|
const getGetPluginMethodQueryOptions = (pluginId, methodName, options) => {
|
|
612
369
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
@@ -633,15 +390,16 @@ function useGetPluginMethod(pluginId, methodName, options, queryClient) {
|
|
|
633
390
|
*/
|
|
634
391
|
const runPlugin = (pluginId, methodName, bodyRunPlugin, options, signal) => {
|
|
635
392
|
return customFetch$1({
|
|
636
|
-
url: `/api/external/plugins/${pluginId}/${methodName}`,
|
|
393
|
+
url: `/api/external/plugins/plugin/${pluginId}/${methodName}`,
|
|
637
394
|
method: "POST",
|
|
638
395
|
headers: { "Content-Type": "application/json" },
|
|
639
396
|
data: bodyRunPlugin,
|
|
640
397
|
...signal ? { signal } : {}
|
|
641
398
|
}, options);
|
|
642
399
|
};
|
|
400
|
+
const getRunPluginMutationKey = () => ["runPlugin"];
|
|
643
401
|
const getRunPluginMutationOptions = (options) => {
|
|
644
|
-
const mutationKey =
|
|
402
|
+
const mutationKey = getRunPluginMutationKey();
|
|
645
403
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
646
404
|
...options,
|
|
647
405
|
mutation: {
|
|
@@ -670,24 +428,24 @@ const useRunPlugin = (options, queryClient) => {
|
|
|
670
428
|
/**
|
|
671
429
|
* @summary Get Plugin Result
|
|
672
430
|
*/
|
|
673
|
-
const pluginResult = (
|
|
431
|
+
const pluginResult = (taskId, options, signal) => {
|
|
674
432
|
return customFetch$1({
|
|
675
|
-
url: `/api/external/plugins
|
|
433
|
+
url: `/api/external/plugins/task/${taskId}`,
|
|
676
434
|
method: "GET",
|
|
677
435
|
...signal ? { signal } : {}
|
|
678
436
|
}, options);
|
|
679
437
|
};
|
|
680
|
-
const getPluginResultQueryKey = (
|
|
681
|
-
return [`/api/external/plugins
|
|
438
|
+
const getPluginResultQueryKey = (taskId) => {
|
|
439
|
+
return [`/api/external/plugins/task/${taskId}`];
|
|
682
440
|
};
|
|
683
|
-
const getPluginResultQueryOptions = (
|
|
441
|
+
const getPluginResultQueryOptions = (taskId, options) => {
|
|
684
442
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
685
|
-
const queryKey = queryOptions?.queryKey ?? getPluginResultQueryKey(
|
|
686
|
-
const queryFn = ({ signal }) => pluginResult(
|
|
443
|
+
const queryKey = queryOptions?.queryKey ?? getPluginResultQueryKey(taskId);
|
|
444
|
+
const queryFn = ({ signal }) => pluginResult(taskId, requestOptions, signal);
|
|
687
445
|
return {
|
|
688
446
|
queryKey,
|
|
689
447
|
queryFn,
|
|
690
|
-
enabled:
|
|
448
|
+
enabled: taskId !== null && taskId !== void 0,
|
|
691
449
|
staleTime: 3e5,
|
|
692
450
|
...queryOptions
|
|
693
451
|
};
|
|
@@ -695,8 +453,8 @@ const getPluginResultQueryOptions = (pluginId, methodName, taskId, options) => {
|
|
|
695
453
|
/**
|
|
696
454
|
* @summary Get Plugin Result
|
|
697
455
|
*/
|
|
698
|
-
function usePluginResult(
|
|
699
|
-
const queryOptions = getPluginResultQueryOptions(
|
|
456
|
+
function usePluginResult(taskId, options, queryClient) {
|
|
457
|
+
const queryOptions = getPluginResultQueryOptions(taskId, options);
|
|
700
458
|
const query = useQuery(queryOptions, queryClient);
|
|
701
459
|
return withQueryKey$1(query, queryOptions.queryKey);
|
|
702
460
|
}
|
|
@@ -704,17 +462,18 @@ function usePluginResult(pluginId, methodName, taskId, options, queryClient) {
|
|
|
704
462
|
* Save the selected results into the session as OCELs / resources.
|
|
705
463
|
* @summary Save Plugin Results
|
|
706
464
|
*/
|
|
707
|
-
const savePluginResults = (
|
|
465
|
+
const savePluginResults = (taskId, resultSelection, options, signal) => {
|
|
708
466
|
return customFetch$1({
|
|
709
|
-
url: `/api/external/plugins
|
|
467
|
+
url: `/api/external/plugins/task/${taskId}/save`,
|
|
710
468
|
method: "POST",
|
|
711
469
|
headers: { "Content-Type": "application/json" },
|
|
712
|
-
data:
|
|
470
|
+
data: resultSelection,
|
|
713
471
|
...signal ? { signal } : {}
|
|
714
472
|
}, options);
|
|
715
473
|
};
|
|
474
|
+
const getSavePluginResultsMutationKey = () => ["savePluginResults"];
|
|
716
475
|
const getSavePluginResultsMutationOptions = (options) => {
|
|
717
|
-
const mutationKey =
|
|
476
|
+
const mutationKey = getSavePluginResultsMutationKey();
|
|
718
477
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
719
478
|
...options,
|
|
720
479
|
mutation: {
|
|
@@ -726,8 +485,8 @@ const getSavePluginResultsMutationOptions = (options) => {
|
|
|
726
485
|
request: void 0
|
|
727
486
|
};
|
|
728
487
|
const mutationFn = (props) => {
|
|
729
|
-
const {
|
|
730
|
-
return savePluginResults(
|
|
488
|
+
const { taskId, data } = props ?? {};
|
|
489
|
+
return savePluginResults(taskId, data, requestOptions);
|
|
731
490
|
};
|
|
732
491
|
return {
|
|
733
492
|
mutationFn,
|
|
@@ -744,17 +503,18 @@ const useSavePluginResults = (options, queryClient) => {
|
|
|
744
503
|
* Bundle the selected results into a zip for download.
|
|
745
504
|
* @summary Download Plugin Results
|
|
746
505
|
*/
|
|
747
|
-
const downloadPluginResults = (
|
|
506
|
+
const downloadPluginResults = (taskId, bodyDownloadPluginResults, options, signal) => {
|
|
748
507
|
return customFetch$1({
|
|
749
|
-
url: `/api/external/plugins
|
|
508
|
+
url: `/api/external/plugins/task/${taskId}/download`,
|
|
750
509
|
method: "POST",
|
|
751
510
|
headers: { "Content-Type": "application/json" },
|
|
752
511
|
data: bodyDownloadPluginResults,
|
|
753
512
|
...signal ? { signal } : {}
|
|
754
513
|
}, options);
|
|
755
514
|
};
|
|
515
|
+
const getDownloadPluginResultsMutationKey = () => ["downloadPluginResults"];
|
|
756
516
|
const getDownloadPluginResultsMutationOptions = (options) => {
|
|
757
|
-
const mutationKey =
|
|
517
|
+
const mutationKey = getDownloadPluginResultsMutationKey();
|
|
758
518
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
759
519
|
...options,
|
|
760
520
|
mutation: {
|
|
@@ -766,8 +526,8 @@ const getDownloadPluginResultsMutationOptions = (options) => {
|
|
|
766
526
|
request: void 0
|
|
767
527
|
};
|
|
768
528
|
const mutationFn = (props) => {
|
|
769
|
-
const {
|
|
770
|
-
return downloadPluginResults(
|
|
529
|
+
const { taskId, data } = props ?? {};
|
|
530
|
+
return downloadPluginResults(taskId, data, requestOptions);
|
|
771
531
|
};
|
|
772
532
|
return {
|
|
773
533
|
mutationFn,
|
|
@@ -785,7 +545,7 @@ const useDownloadPluginResults = (options, queryClient) => {
|
|
|
785
545
|
*/
|
|
786
546
|
const getComputedValues = (pluginId, methodName, provider, bodyGetComputedValues, options, signal) => {
|
|
787
547
|
return customFetch$1({
|
|
788
|
-
url: `/api/external/plugins/${pluginId}/${methodName}/computed/${provider}`,
|
|
548
|
+
url: `/api/external/plugins/plugin/${pluginId}/${methodName}/computed/${provider}`,
|
|
789
549
|
method: "POST",
|
|
790
550
|
headers: { "Content-Type": "application/json" },
|
|
791
551
|
data: bodyGetComputedValues,
|
|
@@ -795,7 +555,7 @@ const getComputedValues = (pluginId, methodName, provider, bodyGetComputedValues
|
|
|
795
555
|
const getGetComputedValuesQueryKey = (pluginId, methodName, provider, bodyGetComputedValues) => {
|
|
796
556
|
return [
|
|
797
557
|
"POST",
|
|
798
|
-
`/api/external/plugins/${pluginId}/${methodName}/computed/${provider}`,
|
|
558
|
+
`/api/external/plugins/plugin/${pluginId}/${methodName}/computed/${provider}`,
|
|
799
559
|
bodyGetComputedValues
|
|
800
560
|
];
|
|
801
561
|
};
|
|
@@ -853,47 +613,6 @@ function useResources(params, options, queryClient) {
|
|
|
853
613
|
return withQueryKey$1(query, queryOptions.queryKey);
|
|
854
614
|
}
|
|
855
615
|
/**
|
|
856
|
-
* @summary Upload Resource
|
|
857
|
-
*/
|
|
858
|
-
const uploadResource = (bodyUploadResource, options, signal) => {
|
|
859
|
-
const formData = new FormData();
|
|
860
|
-
formData.append(`file`, bodyUploadResource.file);
|
|
861
|
-
return customFetch$1({
|
|
862
|
-
url: `/api/external/resources`,
|
|
863
|
-
method: "POST",
|
|
864
|
-
headers: { "Content-Type": "multipart/form-data" },
|
|
865
|
-
data: formData,
|
|
866
|
-
...signal ? { signal } : {}
|
|
867
|
-
}, options);
|
|
868
|
-
};
|
|
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
|
|
888
|
-
};
|
|
889
|
-
};
|
|
890
|
-
/**
|
|
891
|
-
* @summary Upload Resource
|
|
892
|
-
*/
|
|
893
|
-
const useUploadResource = (options, queryClient) => {
|
|
894
|
-
return useMutation(getUploadResourceMutationOptions(options), queryClient);
|
|
895
|
-
};
|
|
896
|
-
/**
|
|
897
616
|
* @summary Get Resource Meta
|
|
898
617
|
*/
|
|
899
618
|
const getResourceMeta = (options, signal) => {
|
|
@@ -1034,8 +753,9 @@ const deleteResource = (resourceId, options, signal) => {
|
|
|
1034
753
|
...signal ? { signal } : {}
|
|
1035
754
|
}, options);
|
|
1036
755
|
};
|
|
756
|
+
const getDeleteResourceMutationKey = () => ["deleteResource"];
|
|
1037
757
|
const getDeleteResourceMutationOptions = (options) => {
|
|
1038
|
-
const mutationKey =
|
|
758
|
+
const mutationKey = getDeleteResourceMutationKey();
|
|
1039
759
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1040
760
|
...options,
|
|
1041
761
|
mutation: {
|
|
@@ -1072,8 +792,9 @@ const renameResource = (resourceId, params, options, signal) => {
|
|
|
1072
792
|
...signal ? { signal } : {}
|
|
1073
793
|
}, options);
|
|
1074
794
|
};
|
|
795
|
+
const getRenameResourceMutationKey = () => ["renameResource"];
|
|
1075
796
|
const getRenameResourceMutationOptions = (options) => {
|
|
1076
|
-
const mutationKey =
|
|
797
|
+
const mutationKey = getRenameResourceMutationKey();
|
|
1077
798
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1078
799
|
...options,
|
|
1079
800
|
mutation: {
|
|
@@ -1179,6 +900,10 @@ const E2oOcelVersion = {
|
|
|
1179
900
|
original: "original",
|
|
1180
901
|
filtered: "filtered"
|
|
1181
902
|
};
|
|
903
|
+
const E2oQualifierOcelVersion = {
|
|
904
|
+
original: "original",
|
|
905
|
+
filtered: "filtered"
|
|
906
|
+
};
|
|
1182
907
|
const O2oDirection = {
|
|
1183
908
|
source: "source",
|
|
1184
909
|
target: "target"
|
|
@@ -1187,6 +912,10 @@ const O2oOcelVersion = {
|
|
|
1187
912
|
original: "original",
|
|
1188
913
|
filtered: "filtered"
|
|
1189
914
|
};
|
|
915
|
+
const O2oQualifierOcelVersion = {
|
|
916
|
+
original: "original",
|
|
917
|
+
filtered: "filtered"
|
|
918
|
+
};
|
|
1190
919
|
const E2oCombinationsDirection = {
|
|
1191
920
|
source: "source",
|
|
1192
921
|
target: "target"
|
|
@@ -1210,7 +939,9 @@ const QuantityInfoOcelVersion = {
|
|
|
1210
939
|
const DownloadOCELExt = {
|
|
1211
940
|
xml: ".xml",
|
|
1212
941
|
json: ".json",
|
|
1213
|
-
sqlite: ".sqlite"
|
|
942
|
+
sqlite: ".sqlite",
|
|
943
|
+
csv: ".csv",
|
|
944
|
+
ocelzip: ".ocel.zip"
|
|
1214
945
|
};
|
|
1215
946
|
const DownloadOCELOcelVersion = {
|
|
1216
947
|
original: "original",
|
|
@@ -1224,6 +955,10 @@ const DownloadVariantFlatLogOcelVersion = {
|
|
|
1224
955
|
original: "original",
|
|
1225
956
|
filtered: "filtered"
|
|
1226
957
|
};
|
|
958
|
+
const RunSqlQueryOcelVersion = {
|
|
959
|
+
original: "original",
|
|
960
|
+
filtered: "filtered"
|
|
961
|
+
};
|
|
1227
962
|
const withQueryKey = (query, queryKey) => {
|
|
1228
963
|
const result = { queryKey };
|
|
1229
964
|
for (const key of Object.keys(query)) {
|
|
@@ -1240,21 +975,20 @@ const withQueryKey = (query, queryKey) => {
|
|
|
1240
975
|
* Returns metadata for all uploaded OCELs along with any OCEL files currently being imported.
|
|
1241
976
|
* @summary List uploaded and uploading OCELs
|
|
1242
977
|
*/
|
|
1243
|
-
const getOcels = (
|
|
978
|
+
const getOcels = (options, signal) => {
|
|
1244
979
|
return customFetch$1({
|
|
1245
980
|
url: `/api/external/modules/ocel/v1/ocels`,
|
|
1246
981
|
method: "GET",
|
|
1247
|
-
params,
|
|
1248
982
|
...signal ? { signal } : {}
|
|
1249
983
|
}, options);
|
|
1250
984
|
};
|
|
1251
|
-
const getGetOcelsQueryKey = (
|
|
1252
|
-
return [`/api/external/modules/ocel/v1/ocels
|
|
985
|
+
const getGetOcelsQueryKey = () => {
|
|
986
|
+
return [`/api/external/modules/ocel/v1/ocels`];
|
|
1253
987
|
};
|
|
1254
|
-
const getGetOcelsQueryOptions = (
|
|
988
|
+
const getGetOcelsQueryOptions = (options) => {
|
|
1255
989
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1256
|
-
const queryKey = queryOptions?.queryKey ?? getGetOcelsQueryKey(
|
|
1257
|
-
const queryFn = ({ signal }) => getOcels(
|
|
990
|
+
const queryKey = queryOptions?.queryKey ?? getGetOcelsQueryKey();
|
|
991
|
+
const queryFn = ({ signal }) => getOcels(requestOptions, signal);
|
|
1258
992
|
return {
|
|
1259
993
|
queryKey,
|
|
1260
994
|
queryFn,
|
|
@@ -1265,8 +999,8 @@ const getGetOcelsQueryOptions = (params, options) => {
|
|
|
1265
999
|
/**
|
|
1266
1000
|
* @summary List uploaded and uploading OCELs
|
|
1267
1001
|
*/
|
|
1268
|
-
function useGetOcels(
|
|
1269
|
-
const queryOptions = getGetOcelsQueryOptions(
|
|
1002
|
+
function useGetOcels(options, queryClient) {
|
|
1003
|
+
const queryOptions = getGetOcelsQueryOptions(options);
|
|
1270
1004
|
const query = useQuery(queryOptions, queryClient);
|
|
1271
1005
|
return withQueryKey(query, queryOptions.queryKey);
|
|
1272
1006
|
}
|
|
@@ -1314,8 +1048,9 @@ const importDefaultOcel = (params, options, signal) => {
|
|
|
1314
1048
|
...signal ? { signal } : {}
|
|
1315
1049
|
}, options);
|
|
1316
1050
|
};
|
|
1051
|
+
const getImportDefaultOcelMutationKey = () => ["importDefaultOcel"];
|
|
1317
1052
|
const getImportDefaultOcelMutationOptions = (options) => {
|
|
1318
|
-
const mutationKey =
|
|
1053
|
+
const mutationKey = getImportDefaultOcelMutationKey();
|
|
1319
1054
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1320
1055
|
...options,
|
|
1321
1056
|
mutation: {
|
|
@@ -1342,38 +1077,6 @@ const useImportDefaultOcel = (options, queryClient) => {
|
|
|
1342
1077
|
return useMutation(getImportDefaultOcelMutationOptions(options), queryClient);
|
|
1343
1078
|
};
|
|
1344
1079
|
/**
|
|
1345
|
-
* @summary Get Extension Meta
|
|
1346
|
-
*/
|
|
1347
|
-
const getExtensionMeta = (options, signal) => {
|
|
1348
|
-
return customFetch$1({
|
|
1349
|
-
url: `/api/external/modules/ocel/v1/extension/meta`,
|
|
1350
|
-
method: "GET",
|
|
1351
|
-
...signal ? { signal } : {}
|
|
1352
|
-
}, options);
|
|
1353
|
-
};
|
|
1354
|
-
const getGetExtensionMetaQueryKey = () => {
|
|
1355
|
-
return [`/api/external/modules/ocel/v1/extension/meta`];
|
|
1356
|
-
};
|
|
1357
|
-
const getGetExtensionMetaQueryOptions = (options) => {
|
|
1358
|
-
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1359
|
-
const queryKey = queryOptions?.queryKey ?? getGetExtensionMetaQueryKey();
|
|
1360
|
-
const queryFn = ({ signal }) => getExtensionMeta(requestOptions, signal);
|
|
1361
|
-
return {
|
|
1362
|
-
queryKey,
|
|
1363
|
-
queryFn,
|
|
1364
|
-
staleTime: 3e5,
|
|
1365
|
-
...queryOptions
|
|
1366
|
-
};
|
|
1367
|
-
};
|
|
1368
|
-
/**
|
|
1369
|
-
* @summary Get Extension Meta
|
|
1370
|
-
*/
|
|
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
1080
|
* @summary Get general information about a OCEL
|
|
1378
1081
|
*/
|
|
1379
1082
|
const getOcel = (ocelId, options, signal) => {
|
|
@@ -1417,8 +1120,9 @@ const deleteOcel = (ocelId, options, signal) => {
|
|
|
1417
1120
|
...signal ? { signal } : {}
|
|
1418
1121
|
}, options);
|
|
1419
1122
|
};
|
|
1123
|
+
const getDeleteOcelMutationKey = () => ["deleteOcel"];
|
|
1420
1124
|
const getDeleteOcelMutationOptions = (options) => {
|
|
1421
|
-
const mutationKey =
|
|
1125
|
+
const mutationKey = getDeleteOcelMutationKey();
|
|
1422
1126
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1423
1127
|
...options,
|
|
1424
1128
|
mutation: {
|
|
@@ -1456,8 +1160,9 @@ const renameOcel = (ocelId, params, options, signal) => {
|
|
|
1456
1160
|
...signal ? { signal } : {}
|
|
1457
1161
|
}, options);
|
|
1458
1162
|
};
|
|
1163
|
+
const getRenameOcelMutationKey = () => ["renameOcel"];
|
|
1459
1164
|
const getRenameOcelMutationOptions = (options) => {
|
|
1460
|
-
const mutationKey =
|
|
1165
|
+
const mutationKey = getRenameOcelMutationKey();
|
|
1461
1166
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1462
1167
|
...options,
|
|
1463
1168
|
mutation: {
|
|
@@ -1927,6 +1632,40 @@ function useE2o(ocelId, params, options, queryClient) {
|
|
|
1927
1632
|
return withQueryKey(query, queryOptions.queryKey);
|
|
1928
1633
|
}
|
|
1929
1634
|
/**
|
|
1635
|
+
* @summary Get E2O Qualifier
|
|
1636
|
+
*/
|
|
1637
|
+
const e2oQualifier = (ocelId, params, options, signal) => {
|
|
1638
|
+
return customFetch$1({
|
|
1639
|
+
url: `/api/external/modules/ocel/v1/${ocelId}/relations/e2o/qualifiers`,
|
|
1640
|
+
method: "GET",
|
|
1641
|
+
params,
|
|
1642
|
+
...signal ? { signal } : {}
|
|
1643
|
+
}, options);
|
|
1644
|
+
};
|
|
1645
|
+
const getE2oQualifierQueryKey = (ocelId, params) => {
|
|
1646
|
+
return [`/api/external/modules/ocel/v1/${ocelId}/relations/e2o/qualifiers`, ...params ? [params] : []];
|
|
1647
|
+
};
|
|
1648
|
+
const getE2oQualifierQueryOptions = (ocelId, params, options) => {
|
|
1649
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1650
|
+
const queryKey = queryOptions?.queryKey ?? getE2oQualifierQueryKey(ocelId, params);
|
|
1651
|
+
const queryFn = ({ signal }) => e2oQualifier(ocelId, params, requestOptions, signal);
|
|
1652
|
+
return {
|
|
1653
|
+
queryKey,
|
|
1654
|
+
queryFn,
|
|
1655
|
+
enabled: ocelId !== null && ocelId !== void 0,
|
|
1656
|
+
staleTime: 3e5,
|
|
1657
|
+
...queryOptions
|
|
1658
|
+
};
|
|
1659
|
+
};
|
|
1660
|
+
/**
|
|
1661
|
+
* @summary Get E2O Qualifier
|
|
1662
|
+
*/
|
|
1663
|
+
function useE2oQualifier(ocelId, params, options, queryClient) {
|
|
1664
|
+
const queryOptions = getE2oQualifierQueryOptions(ocelId, params, options);
|
|
1665
|
+
const query = useQuery(queryOptions, queryClient);
|
|
1666
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
1667
|
+
}
|
|
1668
|
+
/**
|
|
1930
1669
|
* @summary Get O2O
|
|
1931
1670
|
*/
|
|
1932
1671
|
const o2o = (ocelId, params, options, signal) => {
|
|
@@ -1961,6 +1700,40 @@ function useO2o(ocelId, params, options, queryClient) {
|
|
|
1961
1700
|
return withQueryKey(query, queryOptions.queryKey);
|
|
1962
1701
|
}
|
|
1963
1702
|
/**
|
|
1703
|
+
* @summary Get O2O Qualifier
|
|
1704
|
+
*/
|
|
1705
|
+
const o2oQualifier = (ocelId, params, options, signal) => {
|
|
1706
|
+
return customFetch$1({
|
|
1707
|
+
url: `/api/external/modules/ocel/v1/${ocelId}/relations/o2o/qualifiers`,
|
|
1708
|
+
method: "GET",
|
|
1709
|
+
params,
|
|
1710
|
+
...signal ? { signal } : {}
|
|
1711
|
+
}, options);
|
|
1712
|
+
};
|
|
1713
|
+
const getO2oQualifierQueryKey = (ocelId, params) => {
|
|
1714
|
+
return [`/api/external/modules/ocel/v1/${ocelId}/relations/o2o/qualifiers`, ...params ? [params] : []];
|
|
1715
|
+
};
|
|
1716
|
+
const getO2oQualifierQueryOptions = (ocelId, params, options) => {
|
|
1717
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1718
|
+
const queryKey = queryOptions?.queryKey ?? getO2oQualifierQueryKey(ocelId, params);
|
|
1719
|
+
const queryFn = ({ signal }) => o2oQualifier(ocelId, params, requestOptions, signal);
|
|
1720
|
+
return {
|
|
1721
|
+
queryKey,
|
|
1722
|
+
queryFn,
|
|
1723
|
+
enabled: ocelId !== null && ocelId !== void 0,
|
|
1724
|
+
staleTime: 3e5,
|
|
1725
|
+
...queryOptions
|
|
1726
|
+
};
|
|
1727
|
+
};
|
|
1728
|
+
/**
|
|
1729
|
+
* @summary Get O2O Qualifier
|
|
1730
|
+
*/
|
|
1731
|
+
function useO2oQualifier(ocelId, params, options, queryClient) {
|
|
1732
|
+
const queryOptions = getO2oQualifierQueryOptions(ocelId, params, options);
|
|
1733
|
+
const query = useQuery(queryOptions, queryClient);
|
|
1734
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
1735
|
+
}
|
|
1736
|
+
/**
|
|
1964
1737
|
* @summary Get E2O Combinations
|
|
1965
1738
|
*/
|
|
1966
1739
|
const e2oCombinations = (ocelId, params, options, signal) => {
|
|
@@ -2165,5 +1938,46 @@ function useDownloadVariantFlatLog(ocelId, params, options, queryClient) {
|
|
|
2165
1938
|
const query = useQuery(queryOptions, queryClient);
|
|
2166
1939
|
return withQueryKey(query, queryOptions.queryKey);
|
|
2167
1940
|
}
|
|
1941
|
+
/**
|
|
1942
|
+
* @summary Run SQL against an OCEL
|
|
1943
|
+
*/
|
|
1944
|
+
const runSqlQuery = (ocelId, sqlQueryRequest, params, options, signal) => {
|
|
1945
|
+
return customFetch$1({
|
|
1946
|
+
url: `/api/external/modules/ocel/v1/${ocelId}/query`,
|
|
1947
|
+
method: "POST",
|
|
1948
|
+
headers: { "Content-Type": "application/json" },
|
|
1949
|
+
data: sqlQueryRequest,
|
|
1950
|
+
params,
|
|
1951
|
+
...signal ? { signal } : {}
|
|
1952
|
+
}, options);
|
|
1953
|
+
};
|
|
1954
|
+
const getRunSqlQueryQueryKey = (ocelId, sqlQueryRequest, params) => {
|
|
1955
|
+
return [
|
|
1956
|
+
"POST",
|
|
1957
|
+
`/api/external/modules/ocel/v1/${ocelId}/query`,
|
|
1958
|
+
...params ? [params] : [],
|
|
1959
|
+
sqlQueryRequest
|
|
1960
|
+
];
|
|
1961
|
+
};
|
|
1962
|
+
const getRunSqlQueryQueryOptions = (ocelId, sqlQueryRequest, params, options) => {
|
|
1963
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1964
|
+
const queryKey = queryOptions?.queryKey ?? getRunSqlQueryQueryKey(ocelId, sqlQueryRequest, params);
|
|
1965
|
+
const queryFn = ({ signal }) => runSqlQuery(ocelId, sqlQueryRequest, params, requestOptions, signal);
|
|
1966
|
+
return {
|
|
1967
|
+
queryKey,
|
|
1968
|
+
queryFn,
|
|
1969
|
+
enabled: ocelId !== null && ocelId !== void 0,
|
|
1970
|
+
staleTime: 3e5,
|
|
1971
|
+
...queryOptions
|
|
1972
|
+
};
|
|
1973
|
+
};
|
|
1974
|
+
/**
|
|
1975
|
+
* @summary Run SQL against an OCEL
|
|
1976
|
+
*/
|
|
1977
|
+
function useRunSqlQuery(ocelId, sqlQueryRequest, params, options, queryClient) {
|
|
1978
|
+
const queryOptions = getRunSqlQueryQueryOptions(ocelId, sqlQueryRequest, params, options);
|
|
1979
|
+
const query = useQuery(queryOptions, queryClient);
|
|
1980
|
+
return withQueryKey(query, queryOptions.queryKey);
|
|
1981
|
+
}
|
|
2168
1982
|
//#endregion
|
|
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,
|
|
1983
|
+
export { ActivitiesOcelVersion, AggregatedAttributesEntityType, AggregatedAttributesOcelVersion, AttributeNamesEntityType, AttributeNamesOcelVersion, DotVisLayoutEngine, DownloadFlatLogOcelVersion, DownloadOCELExt, DownloadOCELOcelVersion, DownloadVariantFlatLogOcelVersion, E2oCombinationsDirection, E2oCombinationsOcelVersion, E2oDirection, E2oOcelVersion, E2oQualifierOcelVersion, EventAttributesOcelVersion, EventCountsOcelVersion, EventIdsOcelVersion, GraphEdgeEndArrow, GraphEdgeStartArrow, GraphNodeLabelPos, GraphNodeShape, GraphvizLayoutConfigEngine, NodeStyleInnerSymbol, O2oCombinationsDirection, O2oCombinationsOcelVersion, O2oDirection, O2oOcelVersion, O2oQualifierOcelVersion, ObjectAttributesOcelVersion, ObjectCountsOcelVersion, ObjectIdsOcelVersion, ObjectTypesOcelVersion, ObjectVariantsOcelVersion, QuantityInfoOcelVersion, RunSqlQueryOcelVersion, TableColumnDataType, TaskState, TimeInfoOcelVersion, ValueType, activities, aggregatedAttributes, attributeNames, deleteOcel, deletePlugin, deleteResource, downloadFlatLog, downloadOCEL, downloadPluginResults, downloadResource, downloadResourceAsPnml, downloadVariantFlatLog, e2o, e2oCombinations, e2oQualifier, eventAttributes, eventCounts, eventIds, getActivitiesQueryKey, getActivitiesQueryOptions, getAggregatedAttributesQueryKey, getAggregatedAttributesQueryOptions, getAttributeNamesQueryKey, getAttributeNamesQueryOptions, getComputedValues, getDefaultOcel, getDeleteOcelMutationKey, getDeleteOcelMutationOptions, getDeletePluginMutationKey, getDeletePluginMutationOptions, getDeleteResourceMutationKey, getDeleteResourceMutationOptions, getDownloadFlatLogQueryKey, getDownloadFlatLogQueryOptions, getDownloadOCELQueryKey, getDownloadOCELQueryOptions, getDownloadPluginResultsMutationKey, getDownloadPluginResultsMutationOptions, getDownloadResourceAsPnmlQueryKey, getDownloadResourceAsPnmlQueryOptions, getDownloadResourceQueryKey, getDownloadResourceQueryOptions, getDownloadVariantFlatLogQueryKey, getDownloadVariantFlatLogQueryOptions, getE2oCombinationsQueryKey, getE2oCombinationsQueryOptions, getE2oQualifierQueryKey, getE2oQualifierQueryOptions, getE2oQueryKey, getE2oQueryOptions, getEventAttributesQueryKey, getEventAttributesQueryOptions, getEventCountsQueryKey, getEventCountsQueryOptions, getEventIdsQueryKey, getEventIdsQueryOptions, getGetComputedValuesQueryKey, getGetComputedValuesQueryOptions, getGetDefaultOcelQueryKey, getGetDefaultOcelQueryOptions, getGetOcelQueryKey, getGetOcelQueryOptions, getGetOcelsQueryKey, getGetOcelsQueryOptions, getGetPluginMethodQueryKey, getGetPluginMethodQueryOptions, getGetPluginQueryKey, getGetPluginQueryOptions, getGetResourceMetaQueryKey, getGetResourceMetaQueryOptions, getGetSystemTaskQueryKey, getGetSystemTaskQueryOptions, getGetSystemTasksQueryKey, getGetSystemTasksQueryOptions, getImportDefaultOcelMutationKey, getImportDefaultOcelMutationOptions, getLogoutMutationKey, getLogoutMutationOptions, getO2oCombinationsQueryKey, getO2oCombinationsQueryOptions, getO2oQualifierQueryKey, getO2oQualifierQueryOptions, getO2oQueryKey, getO2oQueryOptions, getObjectAttributesQueryKey, getObjectAttributesQueryOptions, getObjectCountsQueryKey, getObjectCountsQueryOptions, getObjectIdsQueryKey, getObjectIdsQueryOptions, getObjectTypesQueryKey, getObjectTypesQueryOptions, getObjectVariantsQueryKey, getObjectVariantsQueryOptions, getOcel, getOcels, getPlugin, getPluginMethod, getPluginResultQueryKey, getPluginResultQueryOptions, getPluginsQueryKey, getPluginsQueryOptions, getQuantityInfoQueryKey, getQuantityInfoQueryOptions, getRenameOcelMutationKey, getRenameOcelMutationOptions, getRenameResourceMutationKey, getRenameResourceMutationOptions, getResourceMeta, getResourceQueryKey, getResourceQueryOptions, getResourcesQueryKey, getResourcesQueryOptions, getRunPluginMutationKey, getRunPluginMutationOptions, getRunSqlQueryQueryKey, getRunSqlQueryQueryOptions, getSavePluginResultsMutationKey, getSavePluginResultsMutationOptions, getSystemTask, getSystemTasks, getTimeInfoQueryKey, getTimeInfoQueryOptions, getUploadMutationKey, getUploadMutationOptions, importDefaultOcel, logout, o2o, o2oCombinations, o2oQualifier, objectAttributes, objectCounts, objectIds, objectTypes, objectVariants, pluginResult, plugins, quantityInfo, renameOcel, renameResource, resource, resources, runPlugin, runSqlQuery, savePluginResults, timeInfo, upload, useActivities, useAggregatedAttributes, useAttributeNames, useDeleteOcel, useDeletePlugin, useDeleteResource, useDownloadFlatLog, useDownloadOCEL, useDownloadPluginResults, useDownloadResource, useDownloadResourceAsPnml, useDownloadVariantFlatLog, useE2o, useE2oCombinations, useE2oQualifier, useEventAttributes, useEventCounts, useEventIds, useGetComputedValues, useGetDefaultOcel, useGetOcel, useGetOcels, useGetPlugin, useGetPluginMethod, useGetResourceMeta, useGetSystemTask, useGetSystemTasks, useImportDefaultOcel, useLogout, useO2o, useO2oCombinations, useO2oQualifier, useObjectAttributes, useObjectCounts, useObjectIds, useObjectTypes, useObjectVariants, usePluginResult, usePlugins, useQuantityInfo, useRenameOcel, useRenameResource, useResource, useResources, useRunPlugin, useRunSqlQuery, useSavePluginResults, useTimeInfo, useUpload };
|