@equinor/roma-framework 5.0.1 → 6.0.1-beta.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/_commonjsHelpers-CIHTj2Un.mjs +6997 -0
- package/cypress.mjs +31957 -49
- package/dev-portal/lib/api/roma/api/alarm-controller/alarm-controller.d.ts +97 -0
- package/dev-portal/lib/api/roma/api/alarm-group-controller/alarm-group-controller.d.ts +186 -0
- package/dev-portal/lib/api/roma/api/alarm-sse-controller/alarm-sse-controller.d.ts +36 -0
- package/dev-portal/lib/api/roma/api/app-controller/app-controller.d.ts +65 -31
- package/dev-portal/lib/api/roma/api/category-controller/category-controller.d.ts +57 -26
- package/dev-portal/lib/api/roma/api/environment-controller/environment-controller.d.ts +23 -10
- package/dev-portal/lib/api/roma/api/feedback-controller/feedback-controller.d.ts +29 -13
- package/dev-portal/lib/api/roma/api/health-controller/health-controller.d.ts +38 -0
- package/dev-portal/lib/api/roma/api/roma-configuration-controller/roma-configuration-controller.d.ts +99 -41
- package/dev-portal/lib/api/roma/api/server-side-event-controller/server-side-event-controller.d.ts +23 -7
- package/dev-portal/lib/api/roma/api/service-controller/service-controller.d.ts +57 -26
- package/dev-portal/lib/api/roma/api/setting-controller/setting-controller.d.ts +114 -47
- package/dev-portal/lib/api/roma/index.d.ts +4 -0
- package/dev-portal/lib/api/roma/model/adminDto.d.ts +6 -0
- package/dev-portal/lib/api/roma/model/adminDtoAdminType.d.ts +12 -0
- package/dev-portal/lib/api/roma/model/alarmDto.d.ts +19 -0
- package/dev-portal/lib/api/roma/model/alarmDtoPayload.d.ts +10 -0
- package/dev-portal/lib/api/roma/model/alarmDtoSeverity.d.ts +14 -0
- package/dev-portal/lib/api/roma/model/alarmDtoState.d.ts +12 -0
- package/dev-portal/lib/api/roma/model/alarmGroupDto.d.ts +16 -0
- package/dev-portal/lib/api/roma/model/appDto.d.ts +36 -11
- package/dev-portal/lib/api/roma/model/buildDto.d.ts +14 -0
- package/dev-portal/lib/api/roma/model/categoryDto.d.ts +4 -3
- package/dev-portal/lib/api/roma/model/clearAlarmRequest.d.ts +13 -0
- package/dev-portal/lib/api/roma/model/configDto.d.ts +6 -0
- package/dev-portal/lib/api/roma/model/environmentDto.d.ts +4 -4
- package/dev-portal/lib/api/roma/model/feedbackDetailsDto.d.ts +6 -3
- package/dev-portal/lib/api/roma/model/feedbackDto.d.ts +1 -1
- package/dev-portal/lib/api/roma/model/feedbackExpandedResponseDetailsDto.d.ts +7 -3
- package/dev-portal/lib/api/roma/model/feedbackExpandedResponseIssueDto.d.ts +3 -1
- package/dev-portal/lib/api/roma/model/feedbackPage.d.ts +7 -7
- package/dev-portal/lib/api/roma/model/feedbackResponseIssueDto.d.ts +3 -1
- package/dev-portal/lib/api/roma/model/feedbackSolutionDto.d.ts +2 -1
- package/dev-portal/lib/api/roma/model/getAllParams.d.ts +14 -0
- package/dev-portal/lib/api/roma/model/getAllRomaConfigurationTypes200Item.d.ts +1 -1
- package/dev-portal/lib/api/roma/model/index.d.ts +17 -1
- package/dev-portal/lib/api/roma/model/listFeedbacksByCurrentUserParams.d.ts +1 -1
- package/dev-portal/lib/api/roma/model/pageableObject.d.ts +2 -2
- package/dev-portal/lib/api/roma/model/raiseAlarmRequest.d.ts +15 -0
- package/dev-portal/lib/api/roma/model/raiseAlarmRequestPayload.d.ts +10 -0
- package/dev-portal/lib/api/roma/model/raiseAlarmRequestSeverity.d.ts +14 -0
- package/dev-portal/lib/api/roma/model/romaConfigurationDto.d.ts +10 -2
- package/dev-portal/lib/api/roma/model/serverSentEventAlarmDto.d.ts +9 -0
- package/dev-portal/lib/api/roma/model/serverSentEventStandardEventDto.d.ts +1 -2
- package/dev-portal/lib/api/roma/model/serviceDto.d.ts +13 -4
- package/dev-portal/lib/api/roma/model/settingDto.d.ts +10 -4
- package/dev-portal/lib/api/roma/model/sortObject.d.ts +3 -3
- package/dev-portal/lib/api/roma/model/uploadBundleBody.d.ts +1 -1
- package/dev-portal/lib/api/roma/model/versionDto.d.ts +4 -4
- package/dev-portal/lib/api/roma/model/visualizationDto.d.ts +12 -0
- package/dev-portal/lib/api/roma/use-client.d.ts +7 -7
- package/dev-portal/lib/dev-portal/AppViewer.d.ts +10 -0
- package/dev-portal/lib/dev-portal/EquinorLoader.d.ts +2 -2
- package/dev-portal/lib/dev-portal/PortalStyles.d.ts +8 -16
- package/dev-portal/lib/dev-portal/config/AppClient.d.ts +16 -15
- package/dev-portal/package.json +39 -3
- package/dev-portal/roma-framework.umd.js +39927 -35031
- package/lib/api/roma/api/alarm-controller/alarm-controller.d.ts +97 -0
- package/lib/api/roma/api/alarm-group-controller/alarm-group-controller.d.ts +186 -0
- package/lib/api/roma/api/alarm-sse-controller/alarm-sse-controller.d.ts +36 -0
- package/lib/api/roma/api/app-controller/app-controller.d.ts +65 -31
- package/lib/api/roma/api/category-controller/category-controller.d.ts +57 -26
- package/lib/api/roma/api/environment-controller/environment-controller.d.ts +23 -10
- package/lib/api/roma/api/feedback-controller/feedback-controller.d.ts +29 -13
- package/lib/api/roma/api/health-controller/health-controller.d.ts +38 -0
- package/lib/api/roma/api/roma-configuration-controller/roma-configuration-controller.d.ts +99 -41
- package/lib/api/roma/api/server-side-event-controller/server-side-event-controller.d.ts +23 -7
- package/lib/api/roma/api/service-controller/service-controller.d.ts +57 -26
- package/lib/api/roma/api/setting-controller/setting-controller.d.ts +114 -47
- package/lib/api/roma/index.d.ts +4 -0
- package/lib/api/roma/model/adminDto.d.ts +6 -0
- package/lib/api/roma/model/adminDtoAdminType.d.ts +12 -0
- package/lib/api/roma/model/alarmDto.d.ts +19 -0
- package/lib/api/roma/model/alarmDtoPayload.d.ts +10 -0
- package/lib/api/roma/model/alarmDtoSeverity.d.ts +14 -0
- package/lib/api/roma/model/alarmDtoState.d.ts +12 -0
- package/lib/api/roma/model/alarmGroupDto.d.ts +16 -0
- package/lib/api/roma/model/appDto.d.ts +36 -11
- package/lib/api/roma/model/buildDto.d.ts +14 -0
- package/lib/api/roma/model/categoryDto.d.ts +4 -3
- package/lib/api/roma/model/clearAlarmRequest.d.ts +13 -0
- package/lib/api/roma/model/configDto.d.ts +6 -0
- package/lib/api/roma/model/environmentDto.d.ts +4 -4
- package/lib/api/roma/model/feedbackDetailsDto.d.ts +6 -3
- package/lib/api/roma/model/feedbackDto.d.ts +1 -1
- package/lib/api/roma/model/feedbackExpandedResponseDetailsDto.d.ts +7 -3
- package/lib/api/roma/model/feedbackExpandedResponseIssueDto.d.ts +3 -1
- package/lib/api/roma/model/feedbackPage.d.ts +7 -7
- package/lib/api/roma/model/feedbackResponseIssueDto.d.ts +3 -1
- package/lib/api/roma/model/feedbackSolutionDto.d.ts +2 -1
- package/lib/api/roma/model/getAllParams.d.ts +14 -0
- package/lib/api/roma/model/getAllRomaConfigurationTypes200Item.d.ts +1 -1
- package/lib/api/roma/model/index.d.ts +17 -1
- package/lib/api/roma/model/listFeedbacksByCurrentUserParams.d.ts +1 -1
- package/lib/api/roma/model/pageableObject.d.ts +2 -2
- package/lib/api/roma/model/raiseAlarmRequest.d.ts +15 -0
- package/lib/api/roma/model/raiseAlarmRequestPayload.d.ts +10 -0
- package/lib/api/roma/model/raiseAlarmRequestSeverity.d.ts +14 -0
- package/lib/api/roma/model/romaConfigurationDto.d.ts +10 -2
- package/lib/api/roma/model/serverSentEventAlarmDto.d.ts +9 -0
- package/lib/api/roma/model/serverSentEventStandardEventDto.d.ts +1 -2
- package/lib/api/roma/model/serviceDto.d.ts +13 -4
- package/lib/api/roma/model/settingDto.d.ts +10 -4
- package/lib/api/roma/model/sortObject.d.ts +3 -3
- package/lib/api/roma/model/uploadBundleBody.d.ts +1 -1
- package/lib/api/roma/model/versionDto.d.ts +4 -4
- package/lib/api/roma/model/visualizationDto.d.ts +12 -0
- package/lib/api/roma/use-client.d.ts +7 -7
- package/lib/dev-portal/AppViewer.d.ts +10 -0
- package/lib/dev-portal/EquinorLoader.d.ts +2 -2
- package/lib/dev-portal/PortalStyles.d.ts +8 -16
- package/lib/dev-portal/config/AppClient.d.ts +16 -15
- package/package.json +39 -3
- package/roma-framework.mjs +1000 -1152
- package/router-BRrTrnno.mjs +0 -6322
package/roma-framework.mjs
CHANGED
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useFramework, FrameworkProvider } from "@equinor/fusion-framework-react";
|
|
3
3
|
import { configureModules } from "@equinor/fusion-framework-app";
|
|
4
|
-
import * as React from "react";
|
|
5
4
|
import { useState, useEffect, lazy, useRef, createContext, useContext, useMemo } from "react";
|
|
6
5
|
import { ModuleProvider } from "@equinor/fusion-framework-react-module";
|
|
7
6
|
import styled, { StyleSheetManager, keyframes } from "styled-components";
|
|
8
7
|
import { EdsProvider, StarProgress, Typography, Card, Button, TopBar, Chip, SideSheet, Menu, Tooltip, Icon, List } from "@equinor/eds-core-react";
|
|
9
|
-
import { E as EmptyError, o as operate, c as createOperatorSubscriber, i as innerFrom, a as identity, b as isFunction, I as IntlProvider,
|
|
8
|
+
import { E as EmptyError, o as operate, c as createOperatorSubscriber, i as innerFrom, a as identity, b as isFunction, I as IntlProvider, u as useParams, L as Link, B as BehaviorSubject, f as firstValueFrom, g as getDefaultExportFromCjs, d as of, e as from } from "./_commonjsHelpers-CIHTj2Un.mjs";
|
|
10
9
|
import { QueryClient, QueryClientProvider, useQueryClient, useMutation, useQuery } from "@tanstack/react-query";
|
|
11
10
|
import { useCurrentApp, useApps as useApps$1 } from "@equinor/fusion-framework-react/app";
|
|
12
11
|
import { App } from "@equinor/fusion-framework-module-app/app";
|
|
13
12
|
import { tokens } from "@equinor/eds-tokens";
|
|
14
|
-
import "react-dom";
|
|
15
13
|
import { comment_more, accessible, account_circle, help_outline } from "@equinor/eds-icons";
|
|
16
14
|
import { enableAppModule } from "@equinor/fusion-framework-module-app";
|
|
17
15
|
import { enableContext } from "@equinor/fusion-framework-module-context";
|
|
18
16
|
import { enableNavigation } from "@equinor/fusion-framework-module-navigation";
|
|
19
|
-
import { ModuleConfigBuilder } from "@equinor/fusion-framework-module";
|
|
17
|
+
import { ModuleConfigBuilder, SemanticVersion } from "@equinor/fusion-framework-module";
|
|
20
18
|
import { enableServiceDiscovery } from "@equinor/fusion-framework-module-service-discovery";
|
|
21
19
|
import { useHttpClient } from "@equinor/fusion-framework-react-module-http";
|
|
22
20
|
const createExtraScopePlugin = (scope) => {
|
|
@@ -359,717 +357,6 @@ function AppLoader({
|
|
|
359
357
|
error && /* @__PURE__ */ jsx(ErrorViewer, { error })
|
|
360
358
|
] });
|
|
361
359
|
}
|
|
362
|
-
function _extends$1() {
|
|
363
|
-
_extends$1 = Object.assign ? Object.assign.bind() : function(target) {
|
|
364
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
365
|
-
var source = arguments[i];
|
|
366
|
-
for (var key in source) {
|
|
367
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
368
|
-
target[key] = source[key];
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
return target;
|
|
373
|
-
};
|
|
374
|
-
return _extends$1.apply(this, arguments);
|
|
375
|
-
}
|
|
376
|
-
const DataRouterContext = /* @__PURE__ */ React.createContext(null);
|
|
377
|
-
if (process.env.NODE_ENV !== "production") {
|
|
378
|
-
DataRouterContext.displayName = "DataRouter";
|
|
379
|
-
}
|
|
380
|
-
const DataRouterStateContext = /* @__PURE__ */ React.createContext(null);
|
|
381
|
-
if (process.env.NODE_ENV !== "production") {
|
|
382
|
-
DataRouterStateContext.displayName = "DataRouterState";
|
|
383
|
-
}
|
|
384
|
-
const AwaitContext = /* @__PURE__ */ React.createContext(null);
|
|
385
|
-
if (process.env.NODE_ENV !== "production") {
|
|
386
|
-
AwaitContext.displayName = "Await";
|
|
387
|
-
}
|
|
388
|
-
const NavigationContext = /* @__PURE__ */ React.createContext(null);
|
|
389
|
-
if (process.env.NODE_ENV !== "production") {
|
|
390
|
-
NavigationContext.displayName = "Navigation";
|
|
391
|
-
}
|
|
392
|
-
const LocationContext = /* @__PURE__ */ React.createContext(null);
|
|
393
|
-
if (process.env.NODE_ENV !== "production") {
|
|
394
|
-
LocationContext.displayName = "Location";
|
|
395
|
-
}
|
|
396
|
-
const RouteContext = /* @__PURE__ */ React.createContext({
|
|
397
|
-
outlet: null,
|
|
398
|
-
matches: [],
|
|
399
|
-
isDataRoute: false
|
|
400
|
-
});
|
|
401
|
-
if (process.env.NODE_ENV !== "production") {
|
|
402
|
-
RouteContext.displayName = "Route";
|
|
403
|
-
}
|
|
404
|
-
const RouteErrorContext = /* @__PURE__ */ React.createContext(null);
|
|
405
|
-
if (process.env.NODE_ENV !== "production") {
|
|
406
|
-
RouteErrorContext.displayName = "RouteError";
|
|
407
|
-
}
|
|
408
|
-
function useHref(to, _temp) {
|
|
409
|
-
let {
|
|
410
|
-
relative
|
|
411
|
-
} = _temp === void 0 ? {} : _temp;
|
|
412
|
-
!useInRouterContext() ? process.env.NODE_ENV !== "production" ? invariant(
|
|
413
|
-
false,
|
|
414
|
-
// TODO: This error is probably because they somehow have 2 versions of the
|
|
415
|
-
// router loaded. We can help them understand how to avoid that.
|
|
416
|
-
"useHref() may be used only in the context of a <Router> component."
|
|
417
|
-
) : invariant(false) : void 0;
|
|
418
|
-
let {
|
|
419
|
-
basename,
|
|
420
|
-
navigator: navigator2
|
|
421
|
-
} = React.useContext(NavigationContext);
|
|
422
|
-
let {
|
|
423
|
-
hash,
|
|
424
|
-
pathname,
|
|
425
|
-
search
|
|
426
|
-
} = useResolvedPath(to, {
|
|
427
|
-
relative
|
|
428
|
-
});
|
|
429
|
-
let joinedPathname = pathname;
|
|
430
|
-
if (basename !== "/") {
|
|
431
|
-
joinedPathname = pathname === "/" ? basename : joinPaths([basename, pathname]);
|
|
432
|
-
}
|
|
433
|
-
return navigator2.createHref({
|
|
434
|
-
pathname: joinedPathname,
|
|
435
|
-
search,
|
|
436
|
-
hash
|
|
437
|
-
});
|
|
438
|
-
}
|
|
439
|
-
function useInRouterContext() {
|
|
440
|
-
return React.useContext(LocationContext) != null;
|
|
441
|
-
}
|
|
442
|
-
function useLocation() {
|
|
443
|
-
!useInRouterContext() ? process.env.NODE_ENV !== "production" ? invariant(
|
|
444
|
-
false,
|
|
445
|
-
// TODO: This error is probably because they somehow have 2 versions of the
|
|
446
|
-
// router loaded. We can help them understand how to avoid that.
|
|
447
|
-
"useLocation() may be used only in the context of a <Router> component."
|
|
448
|
-
) : invariant(false) : void 0;
|
|
449
|
-
return React.useContext(LocationContext).location;
|
|
450
|
-
}
|
|
451
|
-
const navigateEffectWarning = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
452
|
-
function useIsomorphicLayoutEffect(cb) {
|
|
453
|
-
let isStatic = React.useContext(NavigationContext).static;
|
|
454
|
-
if (!isStatic) {
|
|
455
|
-
React.useLayoutEffect(cb);
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
function useNavigate() {
|
|
459
|
-
let {
|
|
460
|
-
isDataRoute
|
|
461
|
-
} = React.useContext(RouteContext);
|
|
462
|
-
return isDataRoute ? useNavigateStable() : useNavigateUnstable();
|
|
463
|
-
}
|
|
464
|
-
function useNavigateUnstable() {
|
|
465
|
-
!useInRouterContext() ? process.env.NODE_ENV !== "production" ? invariant(
|
|
466
|
-
false,
|
|
467
|
-
// TODO: This error is probably because they somehow have 2 versions of the
|
|
468
|
-
// router loaded. We can help them understand how to avoid that.
|
|
469
|
-
"useNavigate() may be used only in the context of a <Router> component."
|
|
470
|
-
) : invariant(false) : void 0;
|
|
471
|
-
let dataRouterContext = React.useContext(DataRouterContext);
|
|
472
|
-
let {
|
|
473
|
-
basename,
|
|
474
|
-
future,
|
|
475
|
-
navigator: navigator2
|
|
476
|
-
} = React.useContext(NavigationContext);
|
|
477
|
-
let {
|
|
478
|
-
matches
|
|
479
|
-
} = React.useContext(RouteContext);
|
|
480
|
-
let {
|
|
481
|
-
pathname: locationPathname
|
|
482
|
-
} = useLocation();
|
|
483
|
-
let routePathnamesJson = JSON.stringify(getResolveToMatches(matches, future.v7_relativeSplatPath));
|
|
484
|
-
let activeRef = React.useRef(false);
|
|
485
|
-
useIsomorphicLayoutEffect(() => {
|
|
486
|
-
activeRef.current = true;
|
|
487
|
-
});
|
|
488
|
-
let navigate = React.useCallback(function(to, options) {
|
|
489
|
-
if (options === void 0) {
|
|
490
|
-
options = {};
|
|
491
|
-
}
|
|
492
|
-
process.env.NODE_ENV !== "production" ? warning(activeRef.current, navigateEffectWarning) : void 0;
|
|
493
|
-
if (!activeRef.current) return;
|
|
494
|
-
if (typeof to === "number") {
|
|
495
|
-
navigator2.go(to);
|
|
496
|
-
return;
|
|
497
|
-
}
|
|
498
|
-
let path = resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, options.relative === "path");
|
|
499
|
-
if (dataRouterContext == null && basename !== "/") {
|
|
500
|
-
path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
|
|
501
|
-
}
|
|
502
|
-
(!!options.replace ? navigator2.replace : navigator2.push)(path, options.state, options);
|
|
503
|
-
}, [basename, navigator2, routePathnamesJson, locationPathname, dataRouterContext]);
|
|
504
|
-
return navigate;
|
|
505
|
-
}
|
|
506
|
-
function useParams() {
|
|
507
|
-
let {
|
|
508
|
-
matches
|
|
509
|
-
} = React.useContext(RouteContext);
|
|
510
|
-
let routeMatch = matches[matches.length - 1];
|
|
511
|
-
return routeMatch ? routeMatch.params : {};
|
|
512
|
-
}
|
|
513
|
-
function useResolvedPath(to, _temp2) {
|
|
514
|
-
let {
|
|
515
|
-
relative
|
|
516
|
-
} = _temp2 === void 0 ? {} : _temp2;
|
|
517
|
-
let {
|
|
518
|
-
future
|
|
519
|
-
} = React.useContext(NavigationContext);
|
|
520
|
-
let {
|
|
521
|
-
matches
|
|
522
|
-
} = React.useContext(RouteContext);
|
|
523
|
-
let {
|
|
524
|
-
pathname: locationPathname
|
|
525
|
-
} = useLocation();
|
|
526
|
-
let routePathnamesJson = JSON.stringify(getResolveToMatches(matches, future.v7_relativeSplatPath));
|
|
527
|
-
return React.useMemo(() => resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, relative === "path"), [to, routePathnamesJson, locationPathname, relative]);
|
|
528
|
-
}
|
|
529
|
-
var DataRouterHook$1 = /* @__PURE__ */ (function(DataRouterHook2) {
|
|
530
|
-
DataRouterHook2["UseBlocker"] = "useBlocker";
|
|
531
|
-
DataRouterHook2["UseRevalidator"] = "useRevalidator";
|
|
532
|
-
DataRouterHook2["UseNavigateStable"] = "useNavigate";
|
|
533
|
-
return DataRouterHook2;
|
|
534
|
-
})(DataRouterHook$1 || {});
|
|
535
|
-
var DataRouterStateHook$1 = /* @__PURE__ */ (function(DataRouterStateHook2) {
|
|
536
|
-
DataRouterStateHook2["UseBlocker"] = "useBlocker";
|
|
537
|
-
DataRouterStateHook2["UseLoaderData"] = "useLoaderData";
|
|
538
|
-
DataRouterStateHook2["UseActionData"] = "useActionData";
|
|
539
|
-
DataRouterStateHook2["UseRouteError"] = "useRouteError";
|
|
540
|
-
DataRouterStateHook2["UseNavigation"] = "useNavigation";
|
|
541
|
-
DataRouterStateHook2["UseRouteLoaderData"] = "useRouteLoaderData";
|
|
542
|
-
DataRouterStateHook2["UseMatches"] = "useMatches";
|
|
543
|
-
DataRouterStateHook2["UseRevalidator"] = "useRevalidator";
|
|
544
|
-
DataRouterStateHook2["UseNavigateStable"] = "useNavigate";
|
|
545
|
-
DataRouterStateHook2["UseRouteId"] = "useRouteId";
|
|
546
|
-
return DataRouterStateHook2;
|
|
547
|
-
})(DataRouterStateHook$1 || {});
|
|
548
|
-
function getDataRouterConsoleError$1(hookName) {
|
|
549
|
-
return hookName + " must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router.";
|
|
550
|
-
}
|
|
551
|
-
function useDataRouterContext$1(hookName) {
|
|
552
|
-
let ctx = React.useContext(DataRouterContext);
|
|
553
|
-
!ctx ? process.env.NODE_ENV !== "production" ? invariant(false, getDataRouterConsoleError$1(hookName)) : invariant(false) : void 0;
|
|
554
|
-
return ctx;
|
|
555
|
-
}
|
|
556
|
-
function useRouteContext(hookName) {
|
|
557
|
-
let route = React.useContext(RouteContext);
|
|
558
|
-
!route ? process.env.NODE_ENV !== "production" ? invariant(false, getDataRouterConsoleError$1(hookName)) : invariant(false) : void 0;
|
|
559
|
-
return route;
|
|
560
|
-
}
|
|
561
|
-
function useCurrentRouteId(hookName) {
|
|
562
|
-
let route = useRouteContext(hookName);
|
|
563
|
-
let thisRoute = route.matches[route.matches.length - 1];
|
|
564
|
-
!thisRoute.route.id ? process.env.NODE_ENV !== "production" ? invariant(false, hookName + ' can only be used on routes that contain a unique "id"') : invariant(false) : void 0;
|
|
565
|
-
return thisRoute.route.id;
|
|
566
|
-
}
|
|
567
|
-
function useRouteId() {
|
|
568
|
-
return useCurrentRouteId(DataRouterStateHook$1.UseRouteId);
|
|
569
|
-
}
|
|
570
|
-
function useNavigateStable() {
|
|
571
|
-
let {
|
|
572
|
-
router
|
|
573
|
-
} = useDataRouterContext$1(DataRouterHook$1.UseNavigateStable);
|
|
574
|
-
let id = useCurrentRouteId(DataRouterStateHook$1.UseNavigateStable);
|
|
575
|
-
let activeRef = React.useRef(false);
|
|
576
|
-
useIsomorphicLayoutEffect(() => {
|
|
577
|
-
activeRef.current = true;
|
|
578
|
-
});
|
|
579
|
-
let navigate = React.useCallback(function(to, options) {
|
|
580
|
-
if (options === void 0) {
|
|
581
|
-
options = {};
|
|
582
|
-
}
|
|
583
|
-
process.env.NODE_ENV !== "production" ? warning(activeRef.current, navigateEffectWarning) : void 0;
|
|
584
|
-
if (!activeRef.current) return;
|
|
585
|
-
if (typeof to === "number") {
|
|
586
|
-
router.navigate(to);
|
|
587
|
-
} else {
|
|
588
|
-
router.navigate(to, _extends$1({
|
|
589
|
-
fromRouteId: id
|
|
590
|
-
}, options));
|
|
591
|
-
}
|
|
592
|
-
}, [router, id]);
|
|
593
|
-
return navigate;
|
|
594
|
-
}
|
|
595
|
-
new Promise(() => {
|
|
596
|
-
});
|
|
597
|
-
function _extends() {
|
|
598
|
-
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
599
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
600
|
-
var source = arguments[i];
|
|
601
|
-
for (var key in source) {
|
|
602
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
603
|
-
target[key] = source[key];
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
return target;
|
|
608
|
-
};
|
|
609
|
-
return _extends.apply(this, arguments);
|
|
610
|
-
}
|
|
611
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
612
|
-
if (source == null) return {};
|
|
613
|
-
var target = {};
|
|
614
|
-
var sourceKeys = Object.keys(source);
|
|
615
|
-
var key, i;
|
|
616
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
617
|
-
key = sourceKeys[i];
|
|
618
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
619
|
-
target[key] = source[key];
|
|
620
|
-
}
|
|
621
|
-
return target;
|
|
622
|
-
}
|
|
623
|
-
const defaultMethod = "get";
|
|
624
|
-
const defaultEncType = "application/x-www-form-urlencoded";
|
|
625
|
-
function isHtmlElement(object2) {
|
|
626
|
-
return object2 != null && typeof object2.tagName === "string";
|
|
627
|
-
}
|
|
628
|
-
function isButtonElement(object2) {
|
|
629
|
-
return isHtmlElement(object2) && object2.tagName.toLowerCase() === "button";
|
|
630
|
-
}
|
|
631
|
-
function isFormElement(object2) {
|
|
632
|
-
return isHtmlElement(object2) && object2.tagName.toLowerCase() === "form";
|
|
633
|
-
}
|
|
634
|
-
function isInputElement(object2) {
|
|
635
|
-
return isHtmlElement(object2) && object2.tagName.toLowerCase() === "input";
|
|
636
|
-
}
|
|
637
|
-
function isModifiedEvent(event) {
|
|
638
|
-
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
|
|
639
|
-
}
|
|
640
|
-
function shouldProcessLinkClick(event, target) {
|
|
641
|
-
return event.button === 0 && // Ignore everything but left clicks
|
|
642
|
-
(!target || target === "_self") && // Let browser handle "target=_blank" etc.
|
|
643
|
-
!isModifiedEvent(event);
|
|
644
|
-
}
|
|
645
|
-
let _formDataSupportsSubmitter = null;
|
|
646
|
-
function isFormDataSubmitterSupported() {
|
|
647
|
-
if (_formDataSupportsSubmitter === null) {
|
|
648
|
-
try {
|
|
649
|
-
new FormData(
|
|
650
|
-
document.createElement("form"),
|
|
651
|
-
// @ts-expect-error if FormData supports the submitter parameter, this will throw
|
|
652
|
-
0
|
|
653
|
-
);
|
|
654
|
-
_formDataSupportsSubmitter = false;
|
|
655
|
-
} catch (e) {
|
|
656
|
-
_formDataSupportsSubmitter = true;
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
return _formDataSupportsSubmitter;
|
|
660
|
-
}
|
|
661
|
-
const supportedFormEncTypes = /* @__PURE__ */ new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);
|
|
662
|
-
function getFormEncType(encType) {
|
|
663
|
-
if (encType != null && !supportedFormEncTypes.has(encType)) {
|
|
664
|
-
process.env.NODE_ENV !== "production" ? warning(false, '"' + encType + '" is not a valid `encType` for `<Form>`/`<fetcher.Form>` ' + ('and will default to "' + defaultEncType + '"')) : void 0;
|
|
665
|
-
return null;
|
|
666
|
-
}
|
|
667
|
-
return encType;
|
|
668
|
-
}
|
|
669
|
-
function getFormSubmissionInfo(target, basename) {
|
|
670
|
-
let method;
|
|
671
|
-
let action;
|
|
672
|
-
let encType;
|
|
673
|
-
let formData;
|
|
674
|
-
let body;
|
|
675
|
-
if (isFormElement(target)) {
|
|
676
|
-
let attr = target.getAttribute("action");
|
|
677
|
-
action = attr ? stripBasename(attr, basename) : null;
|
|
678
|
-
method = target.getAttribute("method") || defaultMethod;
|
|
679
|
-
encType = getFormEncType(target.getAttribute("enctype")) || defaultEncType;
|
|
680
|
-
formData = new FormData(target);
|
|
681
|
-
} else if (isButtonElement(target) || isInputElement(target) && (target.type === "submit" || target.type === "image")) {
|
|
682
|
-
let form = target.form;
|
|
683
|
-
if (form == null) {
|
|
684
|
-
throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');
|
|
685
|
-
}
|
|
686
|
-
let attr = target.getAttribute("formaction") || form.getAttribute("action");
|
|
687
|
-
action = attr ? stripBasename(attr, basename) : null;
|
|
688
|
-
method = target.getAttribute("formmethod") || form.getAttribute("method") || defaultMethod;
|
|
689
|
-
encType = getFormEncType(target.getAttribute("formenctype")) || getFormEncType(form.getAttribute("enctype")) || defaultEncType;
|
|
690
|
-
formData = new FormData(form, target);
|
|
691
|
-
if (!isFormDataSubmitterSupported()) {
|
|
692
|
-
let {
|
|
693
|
-
name,
|
|
694
|
-
type,
|
|
695
|
-
value
|
|
696
|
-
} = target;
|
|
697
|
-
if (type === "image") {
|
|
698
|
-
let prefix = name ? name + "." : "";
|
|
699
|
-
formData.append(prefix + "x", "0");
|
|
700
|
-
formData.append(prefix + "y", "0");
|
|
701
|
-
} else if (name) {
|
|
702
|
-
formData.append(name, value);
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
} else if (isHtmlElement(target)) {
|
|
706
|
-
throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');
|
|
707
|
-
} else {
|
|
708
|
-
method = defaultMethod;
|
|
709
|
-
action = null;
|
|
710
|
-
encType = defaultEncType;
|
|
711
|
-
body = target;
|
|
712
|
-
}
|
|
713
|
-
if (formData && encType === "text/plain") {
|
|
714
|
-
body = formData;
|
|
715
|
-
formData = void 0;
|
|
716
|
-
}
|
|
717
|
-
return {
|
|
718
|
-
action,
|
|
719
|
-
method: method.toLowerCase(),
|
|
720
|
-
encType,
|
|
721
|
-
formData,
|
|
722
|
-
body
|
|
723
|
-
};
|
|
724
|
-
}
|
|
725
|
-
const _excluded = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", "viewTransition"], _excluded2 = ["aria-current", "caseSensitive", "className", "end", "style", "to", "viewTransition", "children"], _excluded3 = ["fetcherKey", "navigate", "reloadDocument", "replace", "state", "method", "action", "onSubmit", "relative", "preventScrollReset", "viewTransition"];
|
|
726
|
-
const REACT_ROUTER_VERSION = "6";
|
|
727
|
-
try {
|
|
728
|
-
window.__reactRouterVersion = REACT_ROUTER_VERSION;
|
|
729
|
-
} catch (e) {
|
|
730
|
-
}
|
|
731
|
-
const ViewTransitionContext = /* @__PURE__ */ React.createContext({
|
|
732
|
-
isTransitioning: false
|
|
733
|
-
});
|
|
734
|
-
if (process.env.NODE_ENV !== "production") {
|
|
735
|
-
ViewTransitionContext.displayName = "ViewTransition";
|
|
736
|
-
}
|
|
737
|
-
const FetchersContext = /* @__PURE__ */ React.createContext(/* @__PURE__ */ new Map());
|
|
738
|
-
if (process.env.NODE_ENV !== "production") {
|
|
739
|
-
FetchersContext.displayName = "Fetchers";
|
|
740
|
-
}
|
|
741
|
-
if (process.env.NODE_ENV !== "production") ;
|
|
742
|
-
const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
743
|
-
const ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
744
|
-
const Link = /* @__PURE__ */ React.forwardRef(function LinkWithRef(_ref7, ref) {
|
|
745
|
-
let {
|
|
746
|
-
onClick,
|
|
747
|
-
relative,
|
|
748
|
-
reloadDocument,
|
|
749
|
-
replace,
|
|
750
|
-
state,
|
|
751
|
-
target,
|
|
752
|
-
to,
|
|
753
|
-
preventScrollReset,
|
|
754
|
-
viewTransition
|
|
755
|
-
} = _ref7, rest = _objectWithoutPropertiesLoose(_ref7, _excluded);
|
|
756
|
-
let {
|
|
757
|
-
basename
|
|
758
|
-
} = React.useContext(NavigationContext);
|
|
759
|
-
let absoluteHref;
|
|
760
|
-
let isExternal = false;
|
|
761
|
-
if (typeof to === "string" && ABSOLUTE_URL_REGEX.test(to)) {
|
|
762
|
-
absoluteHref = to;
|
|
763
|
-
if (isBrowser) {
|
|
764
|
-
try {
|
|
765
|
-
let currentUrl = new URL(window.location.href);
|
|
766
|
-
let targetUrl = to.startsWith("//") ? new URL(currentUrl.protocol + to) : new URL(to);
|
|
767
|
-
let path = stripBasename(targetUrl.pathname, basename);
|
|
768
|
-
if (targetUrl.origin === currentUrl.origin && path != null) {
|
|
769
|
-
to = path + targetUrl.search + targetUrl.hash;
|
|
770
|
-
} else {
|
|
771
|
-
isExternal = true;
|
|
772
|
-
}
|
|
773
|
-
} catch (e) {
|
|
774
|
-
process.env.NODE_ENV !== "production" ? warning(false, '<Link to="' + to + '"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.') : void 0;
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
let href = useHref(to, {
|
|
779
|
-
relative
|
|
780
|
-
});
|
|
781
|
-
let internalOnClick = useLinkClickHandler(to, {
|
|
782
|
-
replace,
|
|
783
|
-
state,
|
|
784
|
-
target,
|
|
785
|
-
preventScrollReset,
|
|
786
|
-
relative,
|
|
787
|
-
viewTransition
|
|
788
|
-
});
|
|
789
|
-
function handleClick(event) {
|
|
790
|
-
if (onClick) onClick(event);
|
|
791
|
-
if (!event.defaultPrevented) {
|
|
792
|
-
internalOnClick(event);
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
return (
|
|
796
|
-
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
797
|
-
/* @__PURE__ */ React.createElement("a", _extends({}, rest, {
|
|
798
|
-
href: absoluteHref || href,
|
|
799
|
-
onClick: isExternal || reloadDocument ? onClick : handleClick,
|
|
800
|
-
ref,
|
|
801
|
-
target
|
|
802
|
-
}))
|
|
803
|
-
);
|
|
804
|
-
});
|
|
805
|
-
if (process.env.NODE_ENV !== "production") {
|
|
806
|
-
Link.displayName = "Link";
|
|
807
|
-
}
|
|
808
|
-
const NavLink = /* @__PURE__ */ React.forwardRef(function NavLinkWithRef(_ref8, ref) {
|
|
809
|
-
let {
|
|
810
|
-
"aria-current": ariaCurrentProp = "page",
|
|
811
|
-
caseSensitive = false,
|
|
812
|
-
className: classNameProp = "",
|
|
813
|
-
end = false,
|
|
814
|
-
style: styleProp,
|
|
815
|
-
to,
|
|
816
|
-
viewTransition,
|
|
817
|
-
children
|
|
818
|
-
} = _ref8, rest = _objectWithoutPropertiesLoose(_ref8, _excluded2);
|
|
819
|
-
let path = useResolvedPath(to, {
|
|
820
|
-
relative: rest.relative
|
|
821
|
-
});
|
|
822
|
-
let location = useLocation();
|
|
823
|
-
let routerState = React.useContext(DataRouterStateContext);
|
|
824
|
-
let {
|
|
825
|
-
navigator: navigator2,
|
|
826
|
-
basename
|
|
827
|
-
} = React.useContext(NavigationContext);
|
|
828
|
-
let isTransitioning = routerState != null && // Conditional usage is OK here because the usage of a data router is static
|
|
829
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
830
|
-
useViewTransitionState(path) && viewTransition === true;
|
|
831
|
-
let toPathname = navigator2.encodeLocation ? navigator2.encodeLocation(path).pathname : path.pathname;
|
|
832
|
-
let locationPathname = location.pathname;
|
|
833
|
-
let nextLocationPathname = routerState && routerState.navigation && routerState.navigation.location ? routerState.navigation.location.pathname : null;
|
|
834
|
-
if (!caseSensitive) {
|
|
835
|
-
locationPathname = locationPathname.toLowerCase();
|
|
836
|
-
nextLocationPathname = nextLocationPathname ? nextLocationPathname.toLowerCase() : null;
|
|
837
|
-
toPathname = toPathname.toLowerCase();
|
|
838
|
-
}
|
|
839
|
-
if (nextLocationPathname && basename) {
|
|
840
|
-
nextLocationPathname = stripBasename(nextLocationPathname, basename) || nextLocationPathname;
|
|
841
|
-
}
|
|
842
|
-
const endSlashPosition = toPathname !== "/" && toPathname.endsWith("/") ? toPathname.length - 1 : toPathname.length;
|
|
843
|
-
let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === "/";
|
|
844
|
-
let isPending = nextLocationPathname != null && (nextLocationPathname === toPathname || !end && nextLocationPathname.startsWith(toPathname) && nextLocationPathname.charAt(toPathname.length) === "/");
|
|
845
|
-
let renderProps = {
|
|
846
|
-
isActive,
|
|
847
|
-
isPending,
|
|
848
|
-
isTransitioning
|
|
849
|
-
};
|
|
850
|
-
let ariaCurrent = isActive ? ariaCurrentProp : void 0;
|
|
851
|
-
let className;
|
|
852
|
-
if (typeof classNameProp === "function") {
|
|
853
|
-
className = classNameProp(renderProps);
|
|
854
|
-
} else {
|
|
855
|
-
className = [classNameProp, isActive ? "active" : null, isPending ? "pending" : null, isTransitioning ? "transitioning" : null].filter(Boolean).join(" ");
|
|
856
|
-
}
|
|
857
|
-
let style = typeof styleProp === "function" ? styleProp(renderProps) : styleProp;
|
|
858
|
-
return /* @__PURE__ */ React.createElement(Link, _extends({}, rest, {
|
|
859
|
-
"aria-current": ariaCurrent,
|
|
860
|
-
className,
|
|
861
|
-
ref,
|
|
862
|
-
style,
|
|
863
|
-
to,
|
|
864
|
-
viewTransition
|
|
865
|
-
}), typeof children === "function" ? children(renderProps) : children);
|
|
866
|
-
});
|
|
867
|
-
if (process.env.NODE_ENV !== "production") {
|
|
868
|
-
NavLink.displayName = "NavLink";
|
|
869
|
-
}
|
|
870
|
-
const Form = /* @__PURE__ */ React.forwardRef((_ref9, forwardedRef) => {
|
|
871
|
-
let {
|
|
872
|
-
fetcherKey,
|
|
873
|
-
navigate,
|
|
874
|
-
reloadDocument,
|
|
875
|
-
replace,
|
|
876
|
-
state,
|
|
877
|
-
method = defaultMethod,
|
|
878
|
-
action,
|
|
879
|
-
onSubmit,
|
|
880
|
-
relative,
|
|
881
|
-
preventScrollReset,
|
|
882
|
-
viewTransition
|
|
883
|
-
} = _ref9, props = _objectWithoutPropertiesLoose(_ref9, _excluded3);
|
|
884
|
-
let submit = useSubmit();
|
|
885
|
-
let formAction = useFormAction(action, {
|
|
886
|
-
relative
|
|
887
|
-
});
|
|
888
|
-
let formMethod = method.toLowerCase() === "get" ? "get" : "post";
|
|
889
|
-
let submitHandler = (event) => {
|
|
890
|
-
onSubmit && onSubmit(event);
|
|
891
|
-
if (event.defaultPrevented) return;
|
|
892
|
-
event.preventDefault();
|
|
893
|
-
let submitter = event.nativeEvent.submitter;
|
|
894
|
-
let submitMethod = (submitter == null ? void 0 : submitter.getAttribute("formmethod")) || method;
|
|
895
|
-
submit(submitter || event.currentTarget, {
|
|
896
|
-
fetcherKey,
|
|
897
|
-
method: submitMethod,
|
|
898
|
-
navigate,
|
|
899
|
-
replace,
|
|
900
|
-
state,
|
|
901
|
-
relative,
|
|
902
|
-
preventScrollReset,
|
|
903
|
-
viewTransition
|
|
904
|
-
});
|
|
905
|
-
};
|
|
906
|
-
return /* @__PURE__ */ React.createElement("form", _extends({
|
|
907
|
-
ref: forwardedRef,
|
|
908
|
-
method: formMethod,
|
|
909
|
-
action: formAction,
|
|
910
|
-
onSubmit: reloadDocument ? onSubmit : submitHandler
|
|
911
|
-
}, props));
|
|
912
|
-
});
|
|
913
|
-
if (process.env.NODE_ENV !== "production") {
|
|
914
|
-
Form.displayName = "Form";
|
|
915
|
-
}
|
|
916
|
-
if (process.env.NODE_ENV !== "production") ;
|
|
917
|
-
var DataRouterHook;
|
|
918
|
-
(function(DataRouterHook2) {
|
|
919
|
-
DataRouterHook2["UseScrollRestoration"] = "useScrollRestoration";
|
|
920
|
-
DataRouterHook2["UseSubmit"] = "useSubmit";
|
|
921
|
-
DataRouterHook2["UseSubmitFetcher"] = "useSubmitFetcher";
|
|
922
|
-
DataRouterHook2["UseFetcher"] = "useFetcher";
|
|
923
|
-
DataRouterHook2["useViewTransitionState"] = "useViewTransitionState";
|
|
924
|
-
})(DataRouterHook || (DataRouterHook = {}));
|
|
925
|
-
var DataRouterStateHook;
|
|
926
|
-
(function(DataRouterStateHook2) {
|
|
927
|
-
DataRouterStateHook2["UseFetcher"] = "useFetcher";
|
|
928
|
-
DataRouterStateHook2["UseFetchers"] = "useFetchers";
|
|
929
|
-
DataRouterStateHook2["UseScrollRestoration"] = "useScrollRestoration";
|
|
930
|
-
})(DataRouterStateHook || (DataRouterStateHook = {}));
|
|
931
|
-
function getDataRouterConsoleError(hookName) {
|
|
932
|
-
return hookName + " must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router.";
|
|
933
|
-
}
|
|
934
|
-
function useDataRouterContext(hookName) {
|
|
935
|
-
let ctx = React.useContext(DataRouterContext);
|
|
936
|
-
!ctx ? process.env.NODE_ENV !== "production" ? invariant(false, getDataRouterConsoleError(hookName)) : invariant(false) : void 0;
|
|
937
|
-
return ctx;
|
|
938
|
-
}
|
|
939
|
-
function useLinkClickHandler(to, _temp) {
|
|
940
|
-
let {
|
|
941
|
-
target,
|
|
942
|
-
replace: replaceProp,
|
|
943
|
-
state,
|
|
944
|
-
preventScrollReset,
|
|
945
|
-
relative,
|
|
946
|
-
viewTransition
|
|
947
|
-
} = _temp === void 0 ? {} : _temp;
|
|
948
|
-
let navigate = useNavigate();
|
|
949
|
-
let location = useLocation();
|
|
950
|
-
let path = useResolvedPath(to, {
|
|
951
|
-
relative
|
|
952
|
-
});
|
|
953
|
-
return React.useCallback((event) => {
|
|
954
|
-
if (shouldProcessLinkClick(event, target)) {
|
|
955
|
-
event.preventDefault();
|
|
956
|
-
let replace = replaceProp !== void 0 ? replaceProp : createPath(location) === createPath(path);
|
|
957
|
-
navigate(to, {
|
|
958
|
-
replace,
|
|
959
|
-
state,
|
|
960
|
-
preventScrollReset,
|
|
961
|
-
relative,
|
|
962
|
-
viewTransition
|
|
963
|
-
});
|
|
964
|
-
}
|
|
965
|
-
}, [location, navigate, path, replaceProp, state, target, to, preventScrollReset, relative, viewTransition]);
|
|
966
|
-
}
|
|
967
|
-
function validateClientSideSubmission() {
|
|
968
|
-
if (typeof document === "undefined") {
|
|
969
|
-
throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");
|
|
970
|
-
}
|
|
971
|
-
}
|
|
972
|
-
let fetcherId = 0;
|
|
973
|
-
let getUniqueFetcherId = () => "__" + String(++fetcherId) + "__";
|
|
974
|
-
function useSubmit() {
|
|
975
|
-
let {
|
|
976
|
-
router
|
|
977
|
-
} = useDataRouterContext(DataRouterHook.UseSubmit);
|
|
978
|
-
let {
|
|
979
|
-
basename
|
|
980
|
-
} = React.useContext(NavigationContext);
|
|
981
|
-
let currentRouteId = useRouteId();
|
|
982
|
-
return React.useCallback(function(target, options) {
|
|
983
|
-
if (options === void 0) {
|
|
984
|
-
options = {};
|
|
985
|
-
}
|
|
986
|
-
validateClientSideSubmission();
|
|
987
|
-
let {
|
|
988
|
-
action,
|
|
989
|
-
method,
|
|
990
|
-
encType,
|
|
991
|
-
formData,
|
|
992
|
-
body
|
|
993
|
-
} = getFormSubmissionInfo(target, basename);
|
|
994
|
-
if (options.navigate === false) {
|
|
995
|
-
let key = options.fetcherKey || getUniqueFetcherId();
|
|
996
|
-
router.fetch(key, currentRouteId, options.action || action, {
|
|
997
|
-
preventScrollReset: options.preventScrollReset,
|
|
998
|
-
formData,
|
|
999
|
-
body,
|
|
1000
|
-
formMethod: options.method || method,
|
|
1001
|
-
formEncType: options.encType || encType,
|
|
1002
|
-
flushSync: options.flushSync
|
|
1003
|
-
});
|
|
1004
|
-
} else {
|
|
1005
|
-
router.navigate(options.action || action, {
|
|
1006
|
-
preventScrollReset: options.preventScrollReset,
|
|
1007
|
-
formData,
|
|
1008
|
-
body,
|
|
1009
|
-
formMethod: options.method || method,
|
|
1010
|
-
formEncType: options.encType || encType,
|
|
1011
|
-
replace: options.replace,
|
|
1012
|
-
state: options.state,
|
|
1013
|
-
fromRouteId: currentRouteId,
|
|
1014
|
-
flushSync: options.flushSync,
|
|
1015
|
-
viewTransition: options.viewTransition
|
|
1016
|
-
});
|
|
1017
|
-
}
|
|
1018
|
-
}, [router, basename, currentRouteId]);
|
|
1019
|
-
}
|
|
1020
|
-
function useFormAction(action, _temp2) {
|
|
1021
|
-
let {
|
|
1022
|
-
relative
|
|
1023
|
-
} = _temp2 === void 0 ? {} : _temp2;
|
|
1024
|
-
let {
|
|
1025
|
-
basename
|
|
1026
|
-
} = React.useContext(NavigationContext);
|
|
1027
|
-
let routeContext = React.useContext(RouteContext);
|
|
1028
|
-
!routeContext ? process.env.NODE_ENV !== "production" ? invariant(false, "useFormAction must be used inside a RouteContext") : invariant(false) : void 0;
|
|
1029
|
-
let [match] = routeContext.matches.slice(-1);
|
|
1030
|
-
let path = _extends({}, useResolvedPath(action ? action : ".", {
|
|
1031
|
-
relative
|
|
1032
|
-
}));
|
|
1033
|
-
let location = useLocation();
|
|
1034
|
-
if (action == null) {
|
|
1035
|
-
path.search = location.search;
|
|
1036
|
-
let params = new URLSearchParams(path.search);
|
|
1037
|
-
let indexValues = params.getAll("index");
|
|
1038
|
-
let hasNakedIndexParam = indexValues.some((v) => v === "");
|
|
1039
|
-
if (hasNakedIndexParam) {
|
|
1040
|
-
params.delete("index");
|
|
1041
|
-
indexValues.filter((v) => v).forEach((v) => params.append("index", v));
|
|
1042
|
-
let qs = params.toString();
|
|
1043
|
-
path.search = qs ? "?" + qs : "";
|
|
1044
|
-
}
|
|
1045
|
-
}
|
|
1046
|
-
if ((!action || action === ".") && match.route.index) {
|
|
1047
|
-
path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index";
|
|
1048
|
-
}
|
|
1049
|
-
if (basename !== "/") {
|
|
1050
|
-
path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
|
|
1051
|
-
}
|
|
1052
|
-
return createPath(path);
|
|
1053
|
-
}
|
|
1054
|
-
function useViewTransitionState(to, opts) {
|
|
1055
|
-
if (opts === void 0) {
|
|
1056
|
-
opts = {};
|
|
1057
|
-
}
|
|
1058
|
-
let vtContext = React.useContext(ViewTransitionContext);
|
|
1059
|
-
!(vtContext != null) ? process.env.NODE_ENV !== "production" ? invariant(false, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?") : invariant(false) : void 0;
|
|
1060
|
-
let {
|
|
1061
|
-
basename
|
|
1062
|
-
} = useDataRouterContext(DataRouterHook.useViewTransitionState);
|
|
1063
|
-
let path = useResolvedPath(to, {
|
|
1064
|
-
relative: opts.relative
|
|
1065
|
-
});
|
|
1066
|
-
if (!vtContext.isTransitioning) {
|
|
1067
|
-
return false;
|
|
1068
|
-
}
|
|
1069
|
-
let currentPath = stripBasename(vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;
|
|
1070
|
-
let nextPath = stripBasename(vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;
|
|
1071
|
-
return matchPath(path.pathname, nextPath) != null || matchPath(path.pathname, currentPath) != null;
|
|
1072
|
-
}
|
|
1073
360
|
const AppContext = createContext({
|
|
1074
361
|
isLoading: false,
|
|
1075
362
|
apps: void 0
|
|
@@ -1122,6 +409,13 @@ const useApps = ({ includeHidden } = {}) => {
|
|
|
1122
409
|
return { isLoading, apps, error };
|
|
1123
410
|
}, [allApps, includeHidden, isLoading, error]);
|
|
1124
411
|
};
|
|
412
|
+
const handle = {
|
|
413
|
+
route: {
|
|
414
|
+
description: "App Viewer",
|
|
415
|
+
params: { appKey: "The key of the app to view" },
|
|
416
|
+
search: {}
|
|
417
|
+
}
|
|
418
|
+
};
|
|
1125
419
|
const AppViewer = () => {
|
|
1126
420
|
const { appKey } = useParams();
|
|
1127
421
|
const { apps } = useApps({ includeHidden: true });
|
|
@@ -1162,8 +456,9 @@ const slideLeft = keyframes`
|
|
|
1162
456
|
const TopBarFadeIn = styled(TopBar)`
|
|
1163
457
|
animation: ${fadeIn} 0.6s alternate ease-in-out;
|
|
1164
458
|
padding-left: 0;
|
|
1165
|
-
|
|
459
|
+
width: 100vw;
|
|
1166
460
|
left: 0;
|
|
461
|
+
position: fixed;
|
|
1167
462
|
`;
|
|
1168
463
|
const Styled = {
|
|
1169
464
|
Title: styled.div`
|
|
@@ -1234,7 +529,7 @@ const HeaderMenu = ({ menuState }) => {
|
|
|
1234
529
|
const user = useMemo(() => {
|
|
1235
530
|
return auth.account;
|
|
1236
531
|
}, [auth]);
|
|
1237
|
-
|
|
532
|
+
useMemo(() => {
|
|
1238
533
|
return user?.idTokenClaims?.roles ?? ["No access role"];
|
|
1239
534
|
}, [user]);
|
|
1240
535
|
const getFeedbackAreaFromTags = (currentApp2, applications2) => {
|
|
@@ -1317,27 +612,24 @@ const HeaderMenu = ({ menuState }) => {
|
|
|
1317
612
|
children: /* @__PURE__ */ jsx(Icon, { data: account_circle })
|
|
1318
613
|
}
|
|
1319
614
|
) }),
|
|
1320
|
-
/* @__PURE__ */
|
|
615
|
+
/* @__PURE__ */ jsx(
|
|
1321
616
|
StyledMenu,
|
|
1322
617
|
{
|
|
1323
618
|
onClose: () => menuState.setUserMenuOpen(false),
|
|
1324
619
|
anchorEl: userRef.current,
|
|
1325
620
|
open: menuState.userMenuOpen,
|
|
1326
|
-
children: [
|
|
1327
|
-
/* @__PURE__ */
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
{
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
] }),
|
|
1339
|
-
/* @__PURE__ */ jsx(Menu.Section, { title: "Roles", children: roles.map((r) => /* @__PURE__ */ jsx(Menu.Item, { children: r }, r)) })
|
|
1340
|
-
]
|
|
621
|
+
children: /* @__PURE__ */ jsxs(Menu.Section, { title: "Profile", children: [
|
|
622
|
+
/* @__PURE__ */ jsx(Menu.Item, { children: user.name }),
|
|
623
|
+
/* @__PURE__ */ jsx(
|
|
624
|
+
Menu.Item,
|
|
625
|
+
{
|
|
626
|
+
onClick: () => auth.logout({
|
|
627
|
+
redirectUri: window.location.origin
|
|
628
|
+
}),
|
|
629
|
+
children: "Sign out"
|
|
630
|
+
}
|
|
631
|
+
)
|
|
632
|
+
] })
|
|
1341
633
|
}
|
|
1342
634
|
),
|
|
1343
635
|
/* @__PURE__ */ jsx(Tooltip, { title: "Release notes", children: /* @__PURE__ */ jsx(
|
|
@@ -1382,7 +674,7 @@ const Header = () => {
|
|
|
1382
674
|
});
|
|
1383
675
|
}, []);
|
|
1384
676
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1385
|
-
/* @__PURE__ */ jsxs(
|
|
677
|
+
/* @__PURE__ */ jsx("div", { style: { width: "99vw", height: "64px" }, children: /* @__PURE__ */ jsxs(
|
|
1386
678
|
TopBarFadeIn,
|
|
1387
679
|
{
|
|
1388
680
|
id: "cli-top-bar",
|
|
@@ -1399,7 +691,7 @@ const Header = () => {
|
|
|
1399
691
|
/* @__PURE__ */ jsx(TopBar.Actions, { children: /* @__PURE__ */ jsx(HeaderMenu, { menuState: headerMenuState }) })
|
|
1400
692
|
]
|
|
1401
693
|
}
|
|
1402
|
-
),
|
|
694
|
+
) }),
|
|
1403
695
|
/* @__PURE__ */ jsx(SideSheets, { apps: allApps, menuState: headerMenuState })
|
|
1404
696
|
] });
|
|
1405
697
|
};
|
|
@@ -1749,6 +1041,7 @@ class Connection {
|
|
|
1749
1041
|
}
|
|
1750
1042
|
class SseModuleProvider {
|
|
1751
1043
|
#config;
|
|
1044
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1752
1045
|
#connections = {};
|
|
1753
1046
|
constructor(config) {
|
|
1754
1047
|
this.#config = config;
|
|
@@ -1805,9 +1098,11 @@ class SseConfigurator {
|
|
|
1805
1098
|
return { endpoints: this.#endpoints };
|
|
1806
1099
|
}
|
|
1807
1100
|
}
|
|
1101
|
+
const version = "0.0.2";
|
|
1808
1102
|
const moduleKey = "sse";
|
|
1809
1103
|
const module$1 = {
|
|
1810
1104
|
name: moduleKey,
|
|
1105
|
+
version: new SemanticVersion(version),
|
|
1811
1106
|
configure: () => new SseConfigurator(),
|
|
1812
1107
|
initialize: async (init) => {
|
|
1813
1108
|
const config = await init.config.createConfig(init);
|
|
@@ -4416,6 +3711,7 @@ ${error.join("\n")}`);
|
|
|
4416
3711
|
});
|
|
4417
3712
|
enableNavigation(config);
|
|
4418
3713
|
enableSse(config, "activity");
|
|
3714
|
+
enableSse(config, "roma-alarm");
|
|
4419
3715
|
config.onConfigured(() => {
|
|
4420
3716
|
console.info("Fusion config done");
|
|
4421
3717
|
});
|
|
@@ -4475,16 +3771,13 @@ const HttpErrorViewer = ({ error }) => {
|
|
|
4475
3771
|
};
|
|
4476
3772
|
const useCustomClient = () => {
|
|
4477
3773
|
const client = useHttpClient("portal");
|
|
4478
|
-
return async ({
|
|
4479
|
-
url,
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
data,
|
|
4484
|
-
signal
|
|
4485
|
-
}) => {
|
|
3774
|
+
return async (uriOrOptions, options) => {
|
|
3775
|
+
const { url, method, params, headers, signal, body } = {
|
|
3776
|
+
url: uriOrOptions,
|
|
3777
|
+
...options
|
|
3778
|
+
};
|
|
4486
3779
|
const response = await client.fetch(
|
|
4487
|
-
`${url}` + new URLSearchParams(params),
|
|
3780
|
+
`${url ?? uriOrOptions}` + new URLSearchParams(params),
|
|
4488
3781
|
{
|
|
4489
3782
|
method,
|
|
4490
3783
|
// Request method
|
|
@@ -4492,8 +3785,7 @@ const useCustomClient = () => {
|
|
|
4492
3785
|
// Abort signal
|
|
4493
3786
|
headers,
|
|
4494
3787
|
// Additional headers
|
|
4495
|
-
|
|
4496
|
-
// Add body if data is provided
|
|
3788
|
+
body
|
|
4497
3789
|
}
|
|
4498
3790
|
);
|
|
4499
3791
|
let value;
|
|
@@ -4526,13 +3818,15 @@ let HttpError$1 = class HttpError extends Error {
|
|
|
4526
3818
|
this.response = response;
|
|
4527
3819
|
}
|
|
4528
3820
|
};
|
|
3821
|
+
const getGetSettingByUserAndIdUrl = (userId, id) => {
|
|
3822
|
+
return `/api/settings/user/${userId}/id/${id}`;
|
|
3823
|
+
};
|
|
4529
3824
|
const useGetSettingByUserAndIdHook = () => {
|
|
4530
|
-
const
|
|
4531
|
-
return (userId, id,
|
|
4532
|
-
return
|
|
4533
|
-
|
|
4534
|
-
method: "
|
|
4535
|
-
signal
|
|
3825
|
+
const customFetcher = useCustomClient();
|
|
3826
|
+
return (userId, id, options) => {
|
|
3827
|
+
return customFetcher(getGetSettingByUserAndIdUrl(userId, id), {
|
|
3828
|
+
...options,
|
|
3829
|
+
method: "GET"
|
|
4536
3830
|
});
|
|
4537
3831
|
};
|
|
4538
3832
|
};
|
|
@@ -4540,10 +3834,10 @@ const getGetSettingByUserAndIdQueryKey = (userId, id) => {
|
|
|
4540
3834
|
return [`/api/settings/user/${userId}/id/${id}`];
|
|
4541
3835
|
};
|
|
4542
3836
|
const useGetSettingByUserAndIdQueryOptions = (userId, id, options) => {
|
|
4543
|
-
const { query: queryOptions } = options ?? {};
|
|
3837
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
4544
3838
|
const queryKey = queryOptions?.queryKey ?? getGetSettingByUserAndIdQueryKey(userId, id);
|
|
4545
3839
|
const getSettingByUserAndId = useGetSettingByUserAndIdHook();
|
|
4546
|
-
const queryFn = ({ signal }) => getSettingByUserAndId(userId, id, signal);
|
|
3840
|
+
const queryFn = ({ signal }) => getSettingByUserAndId(userId, id, { signal, ...requestOptions });
|
|
4547
3841
|
return {
|
|
4548
3842
|
queryKey,
|
|
4549
3843
|
queryFn,
|
|
@@ -4551,69 +3845,82 @@ const useGetSettingByUserAndIdQueryOptions = (userId, id, options) => {
|
|
|
4551
3845
|
...queryOptions
|
|
4552
3846
|
};
|
|
4553
3847
|
};
|
|
4554
|
-
|
|
3848
|
+
function useGetSettingByUserAndId(userId, id, options, queryClient) {
|
|
4555
3849
|
const queryOptions = useGetSettingByUserAndIdQueryOptions(
|
|
4556
3850
|
userId,
|
|
4557
3851
|
id,
|
|
4558
3852
|
options
|
|
4559
3853
|
);
|
|
4560
|
-
const query = useQuery(queryOptions);
|
|
4561
|
-
query
|
|
4562
|
-
|
|
3854
|
+
const query = useQuery(queryOptions, queryClient);
|
|
3855
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
3856
|
+
}
|
|
3857
|
+
const getUpdateByUserIdAndIdUrl = (userId, id) => {
|
|
3858
|
+
return `/api/settings/user/${userId}/id/${id}`;
|
|
4563
3859
|
};
|
|
4564
3860
|
const useUpdateByUserIdAndIdHook = () => {
|
|
4565
|
-
const
|
|
4566
|
-
return (userId, id, settingDto) => {
|
|
4567
|
-
return
|
|
4568
|
-
|
|
4569
|
-
method: "
|
|
4570
|
-
headers: { "Content-Type": "application/json" },
|
|
4571
|
-
|
|
3861
|
+
const customFetcher = useCustomClient();
|
|
3862
|
+
return (userId, id, settingDto, options) => {
|
|
3863
|
+
return customFetcher(getUpdateByUserIdAndIdUrl(userId, id), {
|
|
3864
|
+
...options,
|
|
3865
|
+
method: "PUT",
|
|
3866
|
+
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
3867
|
+
body: JSON.stringify(settingDto)
|
|
4572
3868
|
});
|
|
4573
3869
|
};
|
|
4574
3870
|
};
|
|
4575
3871
|
const useUpdateByUserIdAndIdMutationOptions = (options) => {
|
|
4576
|
-
const
|
|
3872
|
+
const mutationKey = ["updateByUserIdAndId"];
|
|
3873
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
4577
3874
|
const updateByUserIdAndId = useUpdateByUserIdAndIdHook();
|
|
4578
3875
|
const mutationFn = (props) => {
|
|
4579
3876
|
const { userId, id, data } = props ?? {};
|
|
4580
|
-
return updateByUserIdAndId(userId, id, data);
|
|
3877
|
+
return updateByUserIdAndId(userId, id, data, requestOptions);
|
|
4581
3878
|
};
|
|
4582
3879
|
return { mutationFn, ...mutationOptions };
|
|
4583
3880
|
};
|
|
4584
|
-
const useUpdateByUserIdAndId = (options) => {
|
|
4585
|
-
|
|
4586
|
-
|
|
3881
|
+
const useUpdateByUserIdAndId = (options, queryClient) => {
|
|
3882
|
+
return useMutation(
|
|
3883
|
+
useUpdateByUserIdAndIdMutationOptions(options),
|
|
3884
|
+
queryClient
|
|
3885
|
+
);
|
|
3886
|
+
};
|
|
3887
|
+
const getDeletePrivateSettingByIdUrl = (userId, id) => {
|
|
3888
|
+
return `/api/settings/user/${userId}/id/${id}`;
|
|
4587
3889
|
};
|
|
4588
3890
|
const useDeletePrivateSettingByIdHook = () => {
|
|
4589
|
-
const
|
|
4590
|
-
return (userId, id) => {
|
|
4591
|
-
return
|
|
4592
|
-
|
|
4593
|
-
method: "
|
|
3891
|
+
const customFetcher = useCustomClient();
|
|
3892
|
+
return (userId, id, options) => {
|
|
3893
|
+
return customFetcher(getDeletePrivateSettingByIdUrl(userId, id), {
|
|
3894
|
+
...options,
|
|
3895
|
+
method: "DELETE"
|
|
4594
3896
|
});
|
|
4595
3897
|
};
|
|
4596
3898
|
};
|
|
4597
3899
|
const useDeletePrivateSettingByIdMutationOptions = (options) => {
|
|
4598
|
-
const
|
|
3900
|
+
const mutationKey = ["deletePrivateSettingById"];
|
|
3901
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
4599
3902
|
const deletePrivateSettingById = useDeletePrivateSettingByIdHook();
|
|
4600
3903
|
const mutationFn = (props) => {
|
|
4601
3904
|
const { userId, id } = props ?? {};
|
|
4602
|
-
return deletePrivateSettingById(userId, id);
|
|
3905
|
+
return deletePrivateSettingById(userId, id, requestOptions);
|
|
4603
3906
|
};
|
|
4604
3907
|
return { mutationFn, ...mutationOptions };
|
|
4605
3908
|
};
|
|
4606
|
-
const useDeletePrivateSettingById = (options) => {
|
|
4607
|
-
|
|
4608
|
-
|
|
3909
|
+
const useDeletePrivateSettingById = (options, queryClient) => {
|
|
3910
|
+
return useMutation(
|
|
3911
|
+
useDeletePrivateSettingByIdMutationOptions(options),
|
|
3912
|
+
queryClient
|
|
3913
|
+
);
|
|
3914
|
+
};
|
|
3915
|
+
const getGetPublicSettingByUserAndIdUrl = (appShortName, id) => {
|
|
3916
|
+
return `/api/settings/application/${appShortName}/id/${id}`;
|
|
4609
3917
|
};
|
|
4610
3918
|
const useGetPublicSettingByUserAndIdHook = () => {
|
|
4611
|
-
const
|
|
4612
|
-
return (appShortName, id,
|
|
4613
|
-
return
|
|
4614
|
-
|
|
4615
|
-
method: "
|
|
4616
|
-
signal
|
|
3919
|
+
const customFetcher = useCustomClient();
|
|
3920
|
+
return (appShortName, id, options) => {
|
|
3921
|
+
return customFetcher(getGetPublicSettingByUserAndIdUrl(appShortName, id), {
|
|
3922
|
+
...options,
|
|
3923
|
+
method: "GET"
|
|
4617
3924
|
});
|
|
4618
3925
|
};
|
|
4619
3926
|
};
|
|
@@ -4621,10 +3928,13 @@ const getGetPublicSettingByUserAndIdQueryKey = (appShortName, id) => {
|
|
|
4621
3928
|
return [`/api/settings/application/${appShortName}/id/${id}`];
|
|
4622
3929
|
};
|
|
4623
3930
|
const useGetPublicSettingByUserAndIdQueryOptions = (appShortName, id, options) => {
|
|
4624
|
-
const { query: queryOptions } = options ?? {};
|
|
3931
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
4625
3932
|
const queryKey = queryOptions?.queryKey ?? getGetPublicSettingByUserAndIdQueryKey(appShortName, id);
|
|
4626
3933
|
const getPublicSettingByUserAndId = useGetPublicSettingByUserAndIdHook();
|
|
4627
|
-
const queryFn = ({ signal }) => getPublicSettingByUserAndId(appShortName, id,
|
|
3934
|
+
const queryFn = ({ signal }) => getPublicSettingByUserAndId(appShortName, id, {
|
|
3935
|
+
signal,
|
|
3936
|
+
...requestOptions
|
|
3937
|
+
});
|
|
4628
3938
|
return {
|
|
4629
3939
|
queryKey,
|
|
4630
3940
|
queryFn,
|
|
@@ -4632,69 +3942,90 @@ const useGetPublicSettingByUserAndIdQueryOptions = (appShortName, id, options) =
|
|
|
4632
3942
|
...queryOptions
|
|
4633
3943
|
};
|
|
4634
3944
|
};
|
|
4635
|
-
|
|
3945
|
+
function useGetPublicSettingByUserAndId(appShortName, id, options, queryClient) {
|
|
4636
3946
|
const queryOptions = useGetPublicSettingByUserAndIdQueryOptions(
|
|
4637
3947
|
appShortName,
|
|
4638
3948
|
id,
|
|
4639
3949
|
options
|
|
4640
3950
|
);
|
|
4641
|
-
const query = useQuery(queryOptions);
|
|
4642
|
-
query
|
|
4643
|
-
|
|
3951
|
+
const query = useQuery(queryOptions, queryClient);
|
|
3952
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
3953
|
+
}
|
|
3954
|
+
const getUpdatePublicSettingByAppShortNameAndIdUrl = (appShortName, id) => {
|
|
3955
|
+
return `/api/settings/application/${appShortName}/id/${id}`;
|
|
4644
3956
|
};
|
|
4645
3957
|
const useUpdatePublicSettingByAppShortNameAndIdHook = () => {
|
|
4646
|
-
const
|
|
4647
|
-
return (appShortName, id, settingDto) => {
|
|
4648
|
-
return
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
3958
|
+
const customFetcher = useCustomClient();
|
|
3959
|
+
return (appShortName, id, settingDto, options) => {
|
|
3960
|
+
return customFetcher(
|
|
3961
|
+
getUpdatePublicSettingByAppShortNameAndIdUrl(appShortName, id),
|
|
3962
|
+
{
|
|
3963
|
+
...options,
|
|
3964
|
+
method: "PUT",
|
|
3965
|
+
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
3966
|
+
body: JSON.stringify(settingDto)
|
|
3967
|
+
}
|
|
3968
|
+
);
|
|
4654
3969
|
};
|
|
4655
3970
|
};
|
|
4656
3971
|
const useUpdatePublicSettingByAppShortNameAndIdMutationOptions = (options) => {
|
|
4657
|
-
const
|
|
3972
|
+
const mutationKey = ["updatePublicSettingByAppShortNameAndId"];
|
|
3973
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
4658
3974
|
const updatePublicSettingByAppShortNameAndId = useUpdatePublicSettingByAppShortNameAndIdHook();
|
|
4659
3975
|
const mutationFn = (props) => {
|
|
4660
3976
|
const { appShortName, id, data } = props ?? {};
|
|
4661
|
-
return updatePublicSettingByAppShortNameAndId(
|
|
3977
|
+
return updatePublicSettingByAppShortNameAndId(
|
|
3978
|
+
appShortName,
|
|
3979
|
+
id,
|
|
3980
|
+
data,
|
|
3981
|
+
requestOptions
|
|
3982
|
+
);
|
|
4662
3983
|
};
|
|
4663
3984
|
return { mutationFn, ...mutationOptions };
|
|
4664
3985
|
};
|
|
4665
|
-
const useUpdatePublicSettingByAppShortNameAndId = (options) => {
|
|
4666
|
-
|
|
4667
|
-
|
|
3986
|
+
const useUpdatePublicSettingByAppShortNameAndId = (options, queryClient) => {
|
|
3987
|
+
return useMutation(
|
|
3988
|
+
useUpdatePublicSettingByAppShortNameAndIdMutationOptions(options),
|
|
3989
|
+
queryClient
|
|
3990
|
+
);
|
|
3991
|
+
};
|
|
3992
|
+
const getDeletePublicSettingByIdUrl = (appShortName, id) => {
|
|
3993
|
+
return `/api/settings/application/${appShortName}/id/${id}`;
|
|
4668
3994
|
};
|
|
4669
3995
|
const useDeletePublicSettingByIdHook = () => {
|
|
4670
|
-
const
|
|
4671
|
-
return (appShortName, id) => {
|
|
4672
|
-
return
|
|
4673
|
-
|
|
4674
|
-
method: "
|
|
3996
|
+
const customFetcher = useCustomClient();
|
|
3997
|
+
return (appShortName, id, options) => {
|
|
3998
|
+
return customFetcher(getDeletePublicSettingByIdUrl(appShortName, id), {
|
|
3999
|
+
...options,
|
|
4000
|
+
method: "DELETE"
|
|
4675
4001
|
});
|
|
4676
4002
|
};
|
|
4677
4003
|
};
|
|
4678
4004
|
const useDeletePublicSettingByIdMutationOptions = (options) => {
|
|
4679
|
-
const
|
|
4005
|
+
const mutationKey = ["deletePublicSettingById"];
|
|
4006
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
4680
4007
|
const deletePublicSettingById = useDeletePublicSettingByIdHook();
|
|
4681
4008
|
const mutationFn = (props) => {
|
|
4682
4009
|
const { appShortName, id } = props ?? {};
|
|
4683
|
-
return deletePublicSettingById(appShortName, id);
|
|
4010
|
+
return deletePublicSettingById(appShortName, id, requestOptions);
|
|
4684
4011
|
};
|
|
4685
4012
|
return { mutationFn, ...mutationOptions };
|
|
4686
4013
|
};
|
|
4687
|
-
const useDeletePublicSettingById = (options) => {
|
|
4688
|
-
|
|
4689
|
-
|
|
4014
|
+
const useDeletePublicSettingById = (options, queryClient) => {
|
|
4015
|
+
return useMutation(
|
|
4016
|
+
useDeletePublicSettingByIdMutationOptions(options),
|
|
4017
|
+
queryClient
|
|
4018
|
+
);
|
|
4019
|
+
};
|
|
4020
|
+
const getGetSettingsByUserIdUrl = (userId) => {
|
|
4021
|
+
return `/api/settings/user/${userId}`;
|
|
4690
4022
|
};
|
|
4691
4023
|
const useGetSettingsByUserIdHook = () => {
|
|
4692
|
-
const
|
|
4693
|
-
return (userId,
|
|
4694
|
-
return
|
|
4695
|
-
|
|
4696
|
-
method: "
|
|
4697
|
-
signal
|
|
4024
|
+
const customFetcher = useCustomClient();
|
|
4025
|
+
return (userId, options) => {
|
|
4026
|
+
return customFetcher(getGetSettingsByUserIdUrl(userId), {
|
|
4027
|
+
...options,
|
|
4028
|
+
method: "GET"
|
|
4698
4029
|
});
|
|
4699
4030
|
};
|
|
4700
4031
|
};
|
|
@@ -4702,10 +4033,10 @@ const getGetSettingsByUserIdQueryKey = (userId) => {
|
|
|
4702
4033
|
return [`/api/settings/user/${userId}`];
|
|
4703
4034
|
};
|
|
4704
4035
|
const useGetSettingsByUserIdQueryOptions = (userId, options) => {
|
|
4705
|
-
const { query: queryOptions } = options ?? {};
|
|
4036
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
4706
4037
|
const queryKey = queryOptions?.queryKey ?? getGetSettingsByUserIdQueryKey(userId);
|
|
4707
4038
|
const getSettingsByUserId = useGetSettingsByUserIdHook();
|
|
4708
|
-
const queryFn = ({ signal }) => getSettingsByUserId(userId, signal);
|
|
4039
|
+
const queryFn = ({ signal }) => getSettingsByUserId(userId, { signal, ...requestOptions });
|
|
4709
4040
|
return {
|
|
4710
4041
|
queryKey,
|
|
4711
4042
|
queryFn,
|
|
@@ -4713,43 +4044,50 @@ const useGetSettingsByUserIdQueryOptions = (userId, options) => {
|
|
|
4713
4044
|
...queryOptions
|
|
4714
4045
|
};
|
|
4715
4046
|
};
|
|
4716
|
-
|
|
4047
|
+
function useGetSettingsByUserId(userId, options, queryClient) {
|
|
4717
4048
|
const queryOptions = useGetSettingsByUserIdQueryOptions(userId, options);
|
|
4718
|
-
const query = useQuery(queryOptions);
|
|
4719
|
-
query
|
|
4720
|
-
|
|
4049
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4050
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4051
|
+
}
|
|
4052
|
+
const getCreateSettingByUserIdUrl = (userId) => {
|
|
4053
|
+
return `/api/settings/user/${userId}`;
|
|
4721
4054
|
};
|
|
4722
4055
|
const useCreateSettingByUserIdHook = () => {
|
|
4723
|
-
const
|
|
4724
|
-
return (userId, settingDto) => {
|
|
4725
|
-
return
|
|
4726
|
-
|
|
4727
|
-
method: "
|
|
4728
|
-
headers: { "Content-Type": "application/json" },
|
|
4729
|
-
|
|
4056
|
+
const customFetcher = useCustomClient();
|
|
4057
|
+
return (userId, settingDto, options) => {
|
|
4058
|
+
return customFetcher(getCreateSettingByUserIdUrl(userId), {
|
|
4059
|
+
...options,
|
|
4060
|
+
method: "POST",
|
|
4061
|
+
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
4062
|
+
body: JSON.stringify(settingDto)
|
|
4730
4063
|
});
|
|
4731
4064
|
};
|
|
4732
4065
|
};
|
|
4733
4066
|
const useCreateSettingByUserIdMutationOptions = (options) => {
|
|
4734
|
-
const
|
|
4067
|
+
const mutationKey = ["createSettingByUserId"];
|
|
4068
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
4735
4069
|
const createSettingByUserId = useCreateSettingByUserIdHook();
|
|
4736
4070
|
const mutationFn = (props) => {
|
|
4737
4071
|
const { userId, data } = props ?? {};
|
|
4738
|
-
return createSettingByUserId(userId, data);
|
|
4072
|
+
return createSettingByUserId(userId, data, requestOptions);
|
|
4739
4073
|
};
|
|
4740
4074
|
return { mutationFn, ...mutationOptions };
|
|
4741
4075
|
};
|
|
4742
|
-
const useCreateSettingByUserId = (options) => {
|
|
4743
|
-
|
|
4744
|
-
|
|
4076
|
+
const useCreateSettingByUserId = (options, queryClient) => {
|
|
4077
|
+
return useMutation(
|
|
4078
|
+
useCreateSettingByUserIdMutationOptions(options),
|
|
4079
|
+
queryClient
|
|
4080
|
+
);
|
|
4081
|
+
};
|
|
4082
|
+
const getGetSettingsByAppShortNameUrl = (appShortName) => {
|
|
4083
|
+
return `/api/settings/application/${appShortName}`;
|
|
4745
4084
|
};
|
|
4746
4085
|
const useGetSettingsByAppShortNameHook = () => {
|
|
4747
|
-
const
|
|
4748
|
-
return (appShortName,
|
|
4749
|
-
return
|
|
4750
|
-
|
|
4751
|
-
method: "
|
|
4752
|
-
signal
|
|
4086
|
+
const customFetcher = useCustomClient();
|
|
4087
|
+
return (appShortName, options) => {
|
|
4088
|
+
return customFetcher(getGetSettingsByAppShortNameUrl(appShortName), {
|
|
4089
|
+
...options,
|
|
4090
|
+
method: "GET"
|
|
4753
4091
|
});
|
|
4754
4092
|
};
|
|
4755
4093
|
};
|
|
@@ -4757,10 +4095,10 @@ const getGetSettingsByAppShortNameQueryKey = (appShortName) => {
|
|
|
4757
4095
|
return [`/api/settings/application/${appShortName}`];
|
|
4758
4096
|
};
|
|
4759
4097
|
const useGetSettingsByAppShortNameQueryOptions = (appShortName, options) => {
|
|
4760
|
-
const { query: queryOptions } = options ?? {};
|
|
4098
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
4761
4099
|
const queryKey = queryOptions?.queryKey ?? getGetSettingsByAppShortNameQueryKey(appShortName);
|
|
4762
4100
|
const getSettingsByAppShortName = useGetSettingsByAppShortNameHook();
|
|
4763
|
-
const queryFn = ({ signal }) => getSettingsByAppShortName(appShortName, signal);
|
|
4101
|
+
const queryFn = ({ signal }) => getSettingsByAppShortName(appShortName, { signal, ...requestOptions });
|
|
4764
4102
|
return {
|
|
4765
4103
|
queryKey,
|
|
4766
4104
|
queryFn,
|
|
@@ -4768,125 +4106,146 @@ const useGetSettingsByAppShortNameQueryOptions = (appShortName, options) => {
|
|
|
4768
4106
|
...queryOptions
|
|
4769
4107
|
};
|
|
4770
4108
|
};
|
|
4771
|
-
|
|
4109
|
+
function useGetSettingsByAppShortName(appShortName, options, queryClient) {
|
|
4772
4110
|
const queryOptions = useGetSettingsByAppShortNameQueryOptions(
|
|
4773
4111
|
appShortName,
|
|
4774
4112
|
options
|
|
4775
4113
|
);
|
|
4776
|
-
const query = useQuery(queryOptions);
|
|
4777
|
-
query
|
|
4778
|
-
|
|
4114
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4115
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4116
|
+
}
|
|
4117
|
+
const getCreatePublicSettingByUserIdUrl = (appShortName) => {
|
|
4118
|
+
return `/api/settings/application/${appShortName}`;
|
|
4779
4119
|
};
|
|
4780
4120
|
const useCreatePublicSettingByUserIdHook = () => {
|
|
4781
|
-
const
|
|
4782
|
-
return (appShortName, settingDto) => {
|
|
4783
|
-
return
|
|
4784
|
-
|
|
4785
|
-
method: "
|
|
4786
|
-
headers: { "Content-Type": "application/json" },
|
|
4787
|
-
|
|
4121
|
+
const customFetcher = useCustomClient();
|
|
4122
|
+
return (appShortName, settingDto, options) => {
|
|
4123
|
+
return customFetcher(getCreatePublicSettingByUserIdUrl(appShortName), {
|
|
4124
|
+
...options,
|
|
4125
|
+
method: "POST",
|
|
4126
|
+
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
4127
|
+
body: JSON.stringify(settingDto)
|
|
4788
4128
|
});
|
|
4789
4129
|
};
|
|
4790
4130
|
};
|
|
4791
4131
|
const useCreatePublicSettingByUserIdMutationOptions = (options) => {
|
|
4792
|
-
const
|
|
4132
|
+
const mutationKey = ["createPublicSettingByUserId"];
|
|
4133
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
4793
4134
|
const createPublicSettingByUserId = useCreatePublicSettingByUserIdHook();
|
|
4794
4135
|
const mutationFn = (props) => {
|
|
4795
4136
|
const { appShortName, data } = props ?? {};
|
|
4796
|
-
return createPublicSettingByUserId(appShortName, data);
|
|
4137
|
+
return createPublicSettingByUserId(appShortName, data, requestOptions);
|
|
4797
4138
|
};
|
|
4798
4139
|
return { mutationFn, ...mutationOptions };
|
|
4799
4140
|
};
|
|
4800
|
-
const useCreatePublicSettingByUserId = (options) => {
|
|
4801
|
-
|
|
4802
|
-
|
|
4141
|
+
const useCreatePublicSettingByUserId = (options, queryClient) => {
|
|
4142
|
+
return useMutation(
|
|
4143
|
+
useCreatePublicSettingByUserIdMutationOptions(options),
|
|
4144
|
+
queryClient
|
|
4145
|
+
);
|
|
4146
|
+
};
|
|
4147
|
+
const getUploadBundleUrl = (key) => {
|
|
4148
|
+
return `/api/apps/key/${key}/bundle`;
|
|
4803
4149
|
};
|
|
4804
4150
|
const useUploadBundleHook = () => {
|
|
4805
|
-
const
|
|
4806
|
-
return (key, uploadBundleBody) => {
|
|
4151
|
+
const customFetcher = useCustomClient();
|
|
4152
|
+
return (key, uploadBundleBody, options) => {
|
|
4807
4153
|
const formData = new FormData();
|
|
4808
|
-
formData.append(
|
|
4809
|
-
return
|
|
4810
|
-
|
|
4811
|
-
method: "
|
|
4812
|
-
|
|
4813
|
-
data: formData
|
|
4154
|
+
formData.append(`bundleFile`, uploadBundleBody.bundleFile);
|
|
4155
|
+
return customFetcher(getUploadBundleUrl(key), {
|
|
4156
|
+
...options,
|
|
4157
|
+
method: "PUT",
|
|
4158
|
+
body: formData
|
|
4814
4159
|
});
|
|
4815
4160
|
};
|
|
4816
4161
|
};
|
|
4817
4162
|
const useUploadBundleMutationOptions = (options) => {
|
|
4818
|
-
const
|
|
4163
|
+
const mutationKey = ["uploadBundle"];
|
|
4164
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
4819
4165
|
const uploadBundle = useUploadBundleHook();
|
|
4820
4166
|
const mutationFn = (props) => {
|
|
4821
4167
|
const { key, data } = props ?? {};
|
|
4822
|
-
return uploadBundle(key, data);
|
|
4168
|
+
return uploadBundle(key, data, requestOptions);
|
|
4823
4169
|
};
|
|
4824
4170
|
return { mutationFn, ...mutationOptions };
|
|
4825
4171
|
};
|
|
4826
|
-
const useUploadBundle = (options) => {
|
|
4827
|
-
|
|
4828
|
-
|
|
4172
|
+
const useUploadBundle = (options, queryClient) => {
|
|
4173
|
+
return useMutation(useUploadBundleMutationOptions(options), queryClient);
|
|
4174
|
+
};
|
|
4175
|
+
const getGetAllAppsUrl = () => {
|
|
4176
|
+
return `/api/apps`;
|
|
4829
4177
|
};
|
|
4830
4178
|
const useGetAllAppsHook = () => {
|
|
4831
|
-
const
|
|
4832
|
-
return (
|
|
4833
|
-
return
|
|
4179
|
+
const customFetcher = useCustomClient();
|
|
4180
|
+
return (options) => {
|
|
4181
|
+
return customFetcher(getGetAllAppsUrl(), {
|
|
4182
|
+
...options,
|
|
4183
|
+
method: "GET"
|
|
4184
|
+
});
|
|
4834
4185
|
};
|
|
4835
4186
|
};
|
|
4836
4187
|
const getGetAllAppsQueryKey = () => {
|
|
4837
4188
|
return [`/api/apps`];
|
|
4838
4189
|
};
|
|
4839
4190
|
const useGetAllAppsQueryOptions = (options) => {
|
|
4840
|
-
const { query: queryOptions } = options ?? {};
|
|
4191
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
4841
4192
|
const queryKey = queryOptions?.queryKey ?? getGetAllAppsQueryKey();
|
|
4842
4193
|
const getAllApps = useGetAllAppsHook();
|
|
4843
|
-
const queryFn = ({ signal }) => getAllApps(signal);
|
|
4194
|
+
const queryFn = ({ signal }) => getAllApps({ signal, ...requestOptions });
|
|
4844
4195
|
return { queryKey, queryFn, ...queryOptions };
|
|
4845
4196
|
};
|
|
4846
|
-
|
|
4197
|
+
function useGetAllApps(options, queryClient) {
|
|
4847
4198
|
const queryOptions = useGetAllAppsQueryOptions(options);
|
|
4848
|
-
const query = useQuery(queryOptions);
|
|
4849
|
-
query
|
|
4850
|
-
|
|
4199
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4200
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4201
|
+
}
|
|
4202
|
+
const getCreateOrUpdateAppUrl = () => {
|
|
4203
|
+
return `/api/apps`;
|
|
4851
4204
|
};
|
|
4852
4205
|
const useCreateOrUpdateAppHook = () => {
|
|
4853
|
-
const
|
|
4854
|
-
return (appDto) => {
|
|
4855
|
-
return
|
|
4856
|
-
|
|
4857
|
-
method: "
|
|
4858
|
-
headers: { "Content-Type": "application/json" },
|
|
4859
|
-
|
|
4206
|
+
const customFetcher = useCustomClient();
|
|
4207
|
+
return (appDto, options) => {
|
|
4208
|
+
return customFetcher(getCreateOrUpdateAppUrl(), {
|
|
4209
|
+
...options,
|
|
4210
|
+
method: "POST",
|
|
4211
|
+
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
4212
|
+
body: JSON.stringify(appDto)
|
|
4860
4213
|
});
|
|
4861
4214
|
};
|
|
4862
4215
|
};
|
|
4863
4216
|
const useCreateOrUpdateAppMutationOptions = (options) => {
|
|
4864
|
-
const
|
|
4217
|
+
const mutationKey = ["createOrUpdateApp"];
|
|
4218
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
4865
4219
|
const createOrUpdateApp = useCreateOrUpdateAppHook();
|
|
4866
4220
|
const mutationFn = (props) => {
|
|
4867
4221
|
const { data } = props ?? {};
|
|
4868
|
-
return createOrUpdateApp(data);
|
|
4222
|
+
return createOrUpdateApp(data, requestOptions);
|
|
4869
4223
|
};
|
|
4870
4224
|
return { mutationFn, ...mutationOptions };
|
|
4871
4225
|
};
|
|
4872
|
-
const useCreateOrUpdateApp = (options) => {
|
|
4873
|
-
|
|
4874
|
-
|
|
4226
|
+
const useCreateOrUpdateApp = (options, queryClient) => {
|
|
4227
|
+
return useMutation(useCreateOrUpdateAppMutationOptions(options), queryClient);
|
|
4228
|
+
};
|
|
4229
|
+
const getGetAppByKeyUrl = (key) => {
|
|
4230
|
+
return `/api/apps/key/${key}`;
|
|
4875
4231
|
};
|
|
4876
4232
|
const useGetAppByKeyHook = () => {
|
|
4877
|
-
const
|
|
4878
|
-
return (key,
|
|
4879
|
-
return
|
|
4233
|
+
const customFetcher = useCustomClient();
|
|
4234
|
+
return (key, options) => {
|
|
4235
|
+
return customFetcher(getGetAppByKeyUrl(key), {
|
|
4236
|
+
...options,
|
|
4237
|
+
method: "GET"
|
|
4238
|
+
});
|
|
4880
4239
|
};
|
|
4881
4240
|
};
|
|
4882
4241
|
const getGetAppByKeyQueryKey = (key) => {
|
|
4883
4242
|
return [`/api/apps/key/${key}`];
|
|
4884
4243
|
};
|
|
4885
4244
|
const useGetAppByKeyQueryOptions = (key, options) => {
|
|
4886
|
-
const { query: queryOptions } = options ?? {};
|
|
4245
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
4887
4246
|
const queryKey = queryOptions?.queryKey ?? getGetAppByKeyQueryKey(key);
|
|
4888
4247
|
const getAppByKey = useGetAppByKeyHook();
|
|
4889
|
-
const queryFn = ({ signal }) => getAppByKey(key, signal);
|
|
4248
|
+
const queryFn = ({ signal }) => getAppByKey(key, { signal, ...requestOptions });
|
|
4890
4249
|
return {
|
|
4891
4250
|
queryKey,
|
|
4892
4251
|
queryFn,
|
|
@@ -4894,84 +4253,102 @@ const useGetAppByKeyQueryOptions = (key, options) => {
|
|
|
4894
4253
|
...queryOptions
|
|
4895
4254
|
};
|
|
4896
4255
|
};
|
|
4897
|
-
|
|
4256
|
+
function useGetAppByKey(key, options, queryClient) {
|
|
4898
4257
|
const queryOptions = useGetAppByKeyQueryOptions(key, options);
|
|
4899
|
-
const query = useQuery(queryOptions);
|
|
4900
|
-
query
|
|
4901
|
-
|
|
4258
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4259
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4260
|
+
}
|
|
4261
|
+
const getDeleteAppByKeyUrl = (key) => {
|
|
4262
|
+
return `/api/apps/key/${key}`;
|
|
4902
4263
|
};
|
|
4903
4264
|
const useDeleteAppByKeyHook = () => {
|
|
4904
|
-
const
|
|
4905
|
-
return (key) => {
|
|
4906
|
-
return
|
|
4265
|
+
const customFetcher = useCustomClient();
|
|
4266
|
+
return (key, options) => {
|
|
4267
|
+
return customFetcher(getDeleteAppByKeyUrl(key), {
|
|
4268
|
+
...options,
|
|
4269
|
+
method: "DELETE"
|
|
4270
|
+
});
|
|
4907
4271
|
};
|
|
4908
4272
|
};
|
|
4909
4273
|
const useDeleteAppByKeyMutationOptions = (options) => {
|
|
4910
|
-
const
|
|
4274
|
+
const mutationKey = ["deleteAppByKey"];
|
|
4275
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
4911
4276
|
const deleteAppByKey = useDeleteAppByKeyHook();
|
|
4912
4277
|
const mutationFn = (props) => {
|
|
4913
4278
|
const { key } = props ?? {};
|
|
4914
|
-
return deleteAppByKey(key);
|
|
4279
|
+
return deleteAppByKey(key, requestOptions);
|
|
4915
4280
|
};
|
|
4916
4281
|
return { mutationFn, ...mutationOptions };
|
|
4917
4282
|
};
|
|
4918
|
-
const useDeleteAppByKey = (options) => {
|
|
4919
|
-
|
|
4920
|
-
|
|
4283
|
+
const useDeleteAppByKey = (options, queryClient) => {
|
|
4284
|
+
return useMutation(useDeleteAppByKeyMutationOptions(options), queryClient);
|
|
4285
|
+
};
|
|
4286
|
+
const getGetAllServicesUrl = () => {
|
|
4287
|
+
return `/api/apps/services`;
|
|
4921
4288
|
};
|
|
4922
4289
|
const useGetAllServicesHook = () => {
|
|
4923
|
-
const
|
|
4924
|
-
return (
|
|
4925
|
-
return
|
|
4290
|
+
const customFetcher = useCustomClient();
|
|
4291
|
+
return (options) => {
|
|
4292
|
+
return customFetcher(getGetAllServicesUrl(), {
|
|
4293
|
+
...options,
|
|
4294
|
+
method: "GET"
|
|
4295
|
+
});
|
|
4926
4296
|
};
|
|
4927
4297
|
};
|
|
4928
4298
|
const getGetAllServicesQueryKey = () => {
|
|
4929
4299
|
return [`/api/apps/services`];
|
|
4930
4300
|
};
|
|
4931
4301
|
const useGetAllServicesQueryOptions = (options) => {
|
|
4932
|
-
const { query: queryOptions } = options ?? {};
|
|
4302
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
4933
4303
|
const queryKey = queryOptions?.queryKey ?? getGetAllServicesQueryKey();
|
|
4934
4304
|
const getAllServices = useGetAllServicesHook();
|
|
4935
|
-
const queryFn = ({ signal }) => getAllServices(signal);
|
|
4305
|
+
const queryFn = ({ signal }) => getAllServices({ signal, ...requestOptions });
|
|
4936
4306
|
return { queryKey, queryFn, ...queryOptions };
|
|
4937
4307
|
};
|
|
4938
|
-
|
|
4308
|
+
function useGetAllServices(options, queryClient) {
|
|
4939
4309
|
const queryOptions = useGetAllServicesQueryOptions(options);
|
|
4940
|
-
const query = useQuery(queryOptions);
|
|
4941
|
-
query
|
|
4942
|
-
|
|
4310
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4311
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4312
|
+
}
|
|
4313
|
+
const getCreateOrUpdateServiceUrl = () => {
|
|
4314
|
+
return `/api/apps/services`;
|
|
4943
4315
|
};
|
|
4944
4316
|
const useCreateOrUpdateServiceHook = () => {
|
|
4945
|
-
const
|
|
4946
|
-
return (serviceDto) => {
|
|
4947
|
-
return
|
|
4948
|
-
|
|
4949
|
-
method: "
|
|
4950
|
-
headers: { "Content-Type": "application/json" },
|
|
4951
|
-
|
|
4317
|
+
const customFetcher = useCustomClient();
|
|
4318
|
+
return (serviceDto, options) => {
|
|
4319
|
+
return customFetcher(getCreateOrUpdateServiceUrl(), {
|
|
4320
|
+
...options,
|
|
4321
|
+
method: "POST",
|
|
4322
|
+
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
4323
|
+
body: JSON.stringify(serviceDto)
|
|
4952
4324
|
});
|
|
4953
4325
|
};
|
|
4954
4326
|
};
|
|
4955
4327
|
const useCreateOrUpdateServiceMutationOptions = (options) => {
|
|
4956
|
-
const
|
|
4328
|
+
const mutationKey = ["createOrUpdateService"];
|
|
4329
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
4957
4330
|
const createOrUpdateService = useCreateOrUpdateServiceHook();
|
|
4958
4331
|
const mutationFn = (props) => {
|
|
4959
4332
|
const { data } = props ?? {};
|
|
4960
|
-
return createOrUpdateService(data);
|
|
4333
|
+
return createOrUpdateService(data, requestOptions);
|
|
4961
4334
|
};
|
|
4962
4335
|
return { mutationFn, ...mutationOptions };
|
|
4963
4336
|
};
|
|
4964
|
-
const useCreateOrUpdateService = (options) => {
|
|
4965
|
-
|
|
4966
|
-
|
|
4337
|
+
const useCreateOrUpdateService = (options, queryClient) => {
|
|
4338
|
+
return useMutation(
|
|
4339
|
+
useCreateOrUpdateServiceMutationOptions(options),
|
|
4340
|
+
queryClient
|
|
4341
|
+
);
|
|
4342
|
+
};
|
|
4343
|
+
const getGetServiceByKeyUrl = (key) => {
|
|
4344
|
+
return `/api/apps/services/key/${key}`;
|
|
4967
4345
|
};
|
|
4968
4346
|
const useGetServiceByKeyHook = () => {
|
|
4969
|
-
const
|
|
4970
|
-
return (key,
|
|
4971
|
-
return
|
|
4972
|
-
|
|
4973
|
-
method: "
|
|
4974
|
-
signal
|
|
4347
|
+
const customFetcher = useCustomClient();
|
|
4348
|
+
return (key, options) => {
|
|
4349
|
+
return customFetcher(getGetServiceByKeyUrl(key), {
|
|
4350
|
+
...options,
|
|
4351
|
+
method: "GET"
|
|
4975
4352
|
});
|
|
4976
4353
|
};
|
|
4977
4354
|
};
|
|
@@ -4979,10 +4356,10 @@ const getGetServiceByKeyQueryKey = (key) => {
|
|
|
4979
4356
|
return [`/api/apps/services/key/${key}`];
|
|
4980
4357
|
};
|
|
4981
4358
|
const useGetServiceByKeyQueryOptions = (key, options) => {
|
|
4982
|
-
const { query: queryOptions } = options ?? {};
|
|
4359
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
4983
4360
|
const queryKey = queryOptions?.queryKey ?? getGetServiceByKeyQueryKey(key);
|
|
4984
4361
|
const getServiceByKey = useGetServiceByKeyHook();
|
|
4985
|
-
const queryFn = ({ signal }) => getServiceByKey(key, signal);
|
|
4362
|
+
const queryFn = ({ signal }) => getServiceByKey(key, { signal, ...requestOptions });
|
|
4986
4363
|
return {
|
|
4987
4364
|
queryKey,
|
|
4988
4365
|
queryFn,
|
|
@@ -4990,41 +4367,48 @@ const useGetServiceByKeyQueryOptions = (key, options) => {
|
|
|
4990
4367
|
...queryOptions
|
|
4991
4368
|
};
|
|
4992
4369
|
};
|
|
4993
|
-
|
|
4370
|
+
function useGetServiceByKey(key, options, queryClient) {
|
|
4994
4371
|
const queryOptions = useGetServiceByKeyQueryOptions(key, options);
|
|
4995
|
-
const query = useQuery(queryOptions);
|
|
4996
|
-
query
|
|
4997
|
-
|
|
4372
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4373
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4374
|
+
}
|
|
4375
|
+
const getDeleteServiceByKeyUrl = (key) => {
|
|
4376
|
+
return `/api/apps/services/key/${key}`;
|
|
4998
4377
|
};
|
|
4999
4378
|
const useDeleteServiceByKeyHook = () => {
|
|
5000
|
-
const
|
|
5001
|
-
return (key) => {
|
|
5002
|
-
return
|
|
5003
|
-
|
|
5004
|
-
method: "
|
|
4379
|
+
const customFetcher = useCustomClient();
|
|
4380
|
+
return (key, options) => {
|
|
4381
|
+
return customFetcher(getDeleteServiceByKeyUrl(key), {
|
|
4382
|
+
...options,
|
|
4383
|
+
method: "DELETE"
|
|
5005
4384
|
});
|
|
5006
4385
|
};
|
|
5007
4386
|
};
|
|
5008
4387
|
const useDeleteServiceByKeyMutationOptions = (options) => {
|
|
5009
|
-
const
|
|
4388
|
+
const mutationKey = ["deleteServiceByKey"];
|
|
4389
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
5010
4390
|
const deleteServiceByKey = useDeleteServiceByKeyHook();
|
|
5011
4391
|
const mutationFn = (props) => {
|
|
5012
4392
|
const { key } = props ?? {};
|
|
5013
|
-
return deleteServiceByKey(key);
|
|
4393
|
+
return deleteServiceByKey(key, requestOptions);
|
|
5014
4394
|
};
|
|
5015
4395
|
return { mutationFn, ...mutationOptions };
|
|
5016
4396
|
};
|
|
5017
|
-
const useDeleteServiceByKey = (options) => {
|
|
5018
|
-
|
|
5019
|
-
|
|
4397
|
+
const useDeleteServiceByKey = (options, queryClient) => {
|
|
4398
|
+
return useMutation(
|
|
4399
|
+
useDeleteServiceByKeyMutationOptions(options),
|
|
4400
|
+
queryClient
|
|
4401
|
+
);
|
|
4402
|
+
};
|
|
4403
|
+
const getGetAllCategoriesUrl = () => {
|
|
4404
|
+
return `/api/apps/categories`;
|
|
5020
4405
|
};
|
|
5021
4406
|
const useGetAllCategoriesHook = () => {
|
|
5022
|
-
const
|
|
5023
|
-
return (
|
|
5024
|
-
return
|
|
5025
|
-
|
|
5026
|
-
method: "
|
|
5027
|
-
signal
|
|
4407
|
+
const customFetcher = useCustomClient();
|
|
4408
|
+
return (options) => {
|
|
4409
|
+
return customFetcher(getGetAllCategoriesUrl(), {
|
|
4410
|
+
...options,
|
|
4411
|
+
method: "GET"
|
|
5028
4412
|
});
|
|
5029
4413
|
};
|
|
5030
4414
|
};
|
|
@@ -5032,49 +4416,56 @@ const getGetAllCategoriesQueryKey = () => {
|
|
|
5032
4416
|
return [`/api/apps/categories`];
|
|
5033
4417
|
};
|
|
5034
4418
|
const useGetAllCategoriesQueryOptions = (options) => {
|
|
5035
|
-
const { query: queryOptions } = options ?? {};
|
|
4419
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
5036
4420
|
const queryKey = queryOptions?.queryKey ?? getGetAllCategoriesQueryKey();
|
|
5037
4421
|
const getAllCategories = useGetAllCategoriesHook();
|
|
5038
|
-
const queryFn = ({ signal }) => getAllCategories(signal);
|
|
4422
|
+
const queryFn = ({ signal }) => getAllCategories({ signal, ...requestOptions });
|
|
5039
4423
|
return { queryKey, queryFn, ...queryOptions };
|
|
5040
4424
|
};
|
|
5041
|
-
|
|
4425
|
+
function useGetAllCategories(options, queryClient) {
|
|
5042
4426
|
const queryOptions = useGetAllCategoriesQueryOptions(options);
|
|
5043
|
-
const query = useQuery(queryOptions);
|
|
5044
|
-
query
|
|
5045
|
-
|
|
4427
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4428
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4429
|
+
}
|
|
4430
|
+
const getCreateOrUpdateCategoryUrl = () => {
|
|
4431
|
+
return `/api/apps/categories`;
|
|
5046
4432
|
};
|
|
5047
4433
|
const useCreateOrUpdateCategoryHook = () => {
|
|
5048
|
-
const
|
|
5049
|
-
return (categoryDto) => {
|
|
5050
|
-
return
|
|
5051
|
-
|
|
5052
|
-
method: "
|
|
5053
|
-
headers: { "Content-Type": "application/json" },
|
|
5054
|
-
|
|
4434
|
+
const customFetcher = useCustomClient();
|
|
4435
|
+
return (categoryDto, options) => {
|
|
4436
|
+
return customFetcher(getCreateOrUpdateCategoryUrl(), {
|
|
4437
|
+
...options,
|
|
4438
|
+
method: "POST",
|
|
4439
|
+
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
4440
|
+
body: JSON.stringify(categoryDto)
|
|
5055
4441
|
});
|
|
5056
4442
|
};
|
|
5057
4443
|
};
|
|
5058
4444
|
const useCreateOrUpdateCategoryMutationOptions = (options) => {
|
|
5059
|
-
const
|
|
4445
|
+
const mutationKey = ["createOrUpdateCategory"];
|
|
4446
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
5060
4447
|
const createOrUpdateCategory = useCreateOrUpdateCategoryHook();
|
|
5061
4448
|
const mutationFn = (props) => {
|
|
5062
4449
|
const { data } = props ?? {};
|
|
5063
|
-
return createOrUpdateCategory(data);
|
|
4450
|
+
return createOrUpdateCategory(data, requestOptions);
|
|
5064
4451
|
};
|
|
5065
4452
|
return { mutationFn, ...mutationOptions };
|
|
5066
4453
|
};
|
|
5067
|
-
const useCreateOrUpdateCategory = (options) => {
|
|
5068
|
-
|
|
5069
|
-
|
|
4454
|
+
const useCreateOrUpdateCategory = (options, queryClient) => {
|
|
4455
|
+
return useMutation(
|
|
4456
|
+
useCreateOrUpdateCategoryMutationOptions(options),
|
|
4457
|
+
queryClient
|
|
4458
|
+
);
|
|
4459
|
+
};
|
|
4460
|
+
const getGetCategoryByIdUrl = (id) => {
|
|
4461
|
+
return `/api/apps/categories/id/${id}`;
|
|
5070
4462
|
};
|
|
5071
4463
|
const useGetCategoryByIdHook = () => {
|
|
5072
|
-
const
|
|
5073
|
-
return (id,
|
|
5074
|
-
return
|
|
5075
|
-
|
|
5076
|
-
method: "
|
|
5077
|
-
signal
|
|
4464
|
+
const customFetcher = useCustomClient();
|
|
4465
|
+
return (id, options) => {
|
|
4466
|
+
return customFetcher(getGetCategoryByIdUrl(id), {
|
|
4467
|
+
...options,
|
|
4468
|
+
method: "GET"
|
|
5078
4469
|
});
|
|
5079
4470
|
};
|
|
5080
4471
|
};
|
|
@@ -5082,10 +4473,10 @@ const getGetCategoryByIdQueryKey = (id) => {
|
|
|
5082
4473
|
return [`/api/apps/categories/id/${id}`];
|
|
5083
4474
|
};
|
|
5084
4475
|
const useGetCategoryByIdQueryOptions = (id, options) => {
|
|
5085
|
-
const { query: queryOptions } = options ?? {};
|
|
4476
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
5086
4477
|
const queryKey = queryOptions?.queryKey ?? getGetCategoryByIdQueryKey(id);
|
|
5087
4478
|
const getCategoryById = useGetCategoryByIdHook();
|
|
5088
|
-
const queryFn = ({ signal }) => getCategoryById(id, signal);
|
|
4479
|
+
const queryFn = ({ signal }) => getCategoryById(id, { signal, ...requestOptions });
|
|
5089
4480
|
return {
|
|
5090
4481
|
queryKey,
|
|
5091
4482
|
queryFn,
|
|
@@ -5093,41 +4484,48 @@ const useGetCategoryByIdQueryOptions = (id, options) => {
|
|
|
5093
4484
|
...queryOptions
|
|
5094
4485
|
};
|
|
5095
4486
|
};
|
|
5096
|
-
|
|
4487
|
+
function useGetCategoryById(id, options, queryClient) {
|
|
5097
4488
|
const queryOptions = useGetCategoryByIdQueryOptions(id, options);
|
|
5098
|
-
const query = useQuery(queryOptions);
|
|
5099
|
-
query
|
|
5100
|
-
|
|
4489
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4490
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4491
|
+
}
|
|
4492
|
+
const getDeleteCategoryByIdUrl = (id) => {
|
|
4493
|
+
return `/api/apps/categories/id/${id}`;
|
|
5101
4494
|
};
|
|
5102
4495
|
const useDeleteCategoryByIdHook = () => {
|
|
5103
|
-
const
|
|
5104
|
-
return (id) => {
|
|
5105
|
-
return
|
|
5106
|
-
|
|
5107
|
-
method: "
|
|
4496
|
+
const customFetcher = useCustomClient();
|
|
4497
|
+
return (id, options) => {
|
|
4498
|
+
return customFetcher(getDeleteCategoryByIdUrl(id), {
|
|
4499
|
+
...options,
|
|
4500
|
+
method: "DELETE"
|
|
5108
4501
|
});
|
|
5109
4502
|
};
|
|
5110
4503
|
};
|
|
5111
4504
|
const useDeleteCategoryByIdMutationOptions = (options) => {
|
|
5112
|
-
const
|
|
4505
|
+
const mutationKey = ["deleteCategoryById"];
|
|
4506
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
5113
4507
|
const deleteCategoryById = useDeleteCategoryByIdHook();
|
|
5114
4508
|
const mutationFn = (props) => {
|
|
5115
4509
|
const { id } = props ?? {};
|
|
5116
|
-
return deleteCategoryById(id);
|
|
4510
|
+
return deleteCategoryById(id, requestOptions);
|
|
5117
4511
|
};
|
|
5118
4512
|
return { mutationFn, ...mutationOptions };
|
|
5119
4513
|
};
|
|
5120
|
-
const useDeleteCategoryById = (options) => {
|
|
5121
|
-
|
|
5122
|
-
|
|
4514
|
+
const useDeleteCategoryById = (options, queryClient) => {
|
|
4515
|
+
return useMutation(
|
|
4516
|
+
useDeleteCategoryByIdMutationOptions(options),
|
|
4517
|
+
queryClient
|
|
4518
|
+
);
|
|
4519
|
+
};
|
|
4520
|
+
const getStreamEventsUrl = () => {
|
|
4521
|
+
return `/eventstream/activitylog`;
|
|
5123
4522
|
};
|
|
5124
4523
|
const useStreamEventsHook = () => {
|
|
5125
|
-
const
|
|
5126
|
-
return (
|
|
5127
|
-
return
|
|
5128
|
-
|
|
5129
|
-
method: "
|
|
5130
|
-
signal
|
|
4524
|
+
const customFetcher = useCustomClient();
|
|
4525
|
+
return (options) => {
|
|
4526
|
+
return customFetcher(getStreamEventsUrl(), {
|
|
4527
|
+
...options,
|
|
4528
|
+
method: "GET"
|
|
5131
4529
|
});
|
|
5132
4530
|
};
|
|
5133
4531
|
};
|
|
@@ -5135,25 +4533,26 @@ const getStreamEventsQueryKey = () => {
|
|
|
5135
4533
|
return [`/eventstream/activitylog`];
|
|
5136
4534
|
};
|
|
5137
4535
|
const useStreamEventsQueryOptions = (options) => {
|
|
5138
|
-
const { query: queryOptions } = options ?? {};
|
|
4536
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
5139
4537
|
const queryKey = queryOptions?.queryKey ?? getStreamEventsQueryKey();
|
|
5140
4538
|
const streamEvents = useStreamEventsHook();
|
|
5141
|
-
const queryFn = ({ signal }) => streamEvents(signal);
|
|
4539
|
+
const queryFn = ({ signal }) => streamEvents({ signal, ...requestOptions });
|
|
5142
4540
|
return { queryKey, queryFn, ...queryOptions };
|
|
5143
4541
|
};
|
|
5144
|
-
|
|
4542
|
+
function useStreamEvents(options, queryClient) {
|
|
5145
4543
|
const queryOptions = useStreamEventsQueryOptions(options);
|
|
5146
|
-
const query = useQuery(queryOptions);
|
|
5147
|
-
query
|
|
5148
|
-
|
|
4544
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4545
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4546
|
+
}
|
|
4547
|
+
const getGetCurrentEnvironmentUrl = () => {
|
|
4548
|
+
return `/_discovery/environments/current`;
|
|
5149
4549
|
};
|
|
5150
4550
|
const useGetCurrentEnvironmentHook = () => {
|
|
5151
|
-
const
|
|
5152
|
-
return (
|
|
5153
|
-
return
|
|
5154
|
-
|
|
5155
|
-
method: "
|
|
5156
|
-
signal
|
|
4551
|
+
const customFetcher = useCustomClient();
|
|
4552
|
+
return (options) => {
|
|
4553
|
+
return customFetcher(getGetCurrentEnvironmentUrl(), {
|
|
4554
|
+
...options,
|
|
4555
|
+
method: "GET"
|
|
5157
4556
|
});
|
|
5158
4557
|
};
|
|
5159
4558
|
};
|
|
@@ -5161,28 +4560,49 @@ const getGetCurrentEnvironmentQueryKey = () => {
|
|
|
5161
4560
|
return [`/_discovery/environments/current`];
|
|
5162
4561
|
};
|
|
5163
4562
|
const useGetCurrentEnvironmentQueryOptions = (options) => {
|
|
5164
|
-
const { query: queryOptions } = options ?? {};
|
|
4563
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
5165
4564
|
const queryKey = queryOptions?.queryKey ?? getGetCurrentEnvironmentQueryKey();
|
|
5166
4565
|
const getCurrentEnvironment = useGetCurrentEnvironmentHook();
|
|
5167
|
-
const queryFn = ({ signal }) => getCurrentEnvironment(signal);
|
|
4566
|
+
const queryFn = ({ signal }) => getCurrentEnvironment({ signal, ...requestOptions });
|
|
5168
4567
|
return { queryKey, queryFn, ...queryOptions };
|
|
5169
4568
|
};
|
|
5170
|
-
|
|
4569
|
+
function useGetCurrentEnvironment(options, queryClient) {
|
|
5171
4570
|
const queryOptions = useGetCurrentEnvironmentQueryOptions(options);
|
|
5172
|
-
const query = useQuery(queryOptions);
|
|
5173
|
-
query
|
|
5174
|
-
|
|
4571
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4572
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4573
|
+
}
|
|
4574
|
+
const AdminDtoAdminType = {
|
|
4575
|
+
ServicePrincipal: "ServicePrincipal",
|
|
4576
|
+
User: "User"
|
|
4577
|
+
};
|
|
4578
|
+
const AlarmDtoSeverity = {
|
|
4579
|
+
LOW: "LOW",
|
|
4580
|
+
MEDIUM: "MEDIUM",
|
|
4581
|
+
HIGH: "HIGH",
|
|
4582
|
+
CRITICAL: "CRITICAL"
|
|
4583
|
+
};
|
|
4584
|
+
const AlarmDtoState = {
|
|
4585
|
+
ACTIVE: "ACTIVE",
|
|
4586
|
+
CLEARED: "CLEARED"
|
|
5175
4587
|
};
|
|
5176
4588
|
const GetAllRomaConfigurationTypes200Item = {
|
|
5177
4589
|
servicebus: "servicebus"
|
|
5178
4590
|
};
|
|
4591
|
+
const RaiseAlarmRequestSeverity = {
|
|
4592
|
+
LOW: "LOW",
|
|
4593
|
+
MEDIUM: "MEDIUM",
|
|
4594
|
+
HIGH: "HIGH",
|
|
4595
|
+
CRITICAL: "CRITICAL"
|
|
4596
|
+
};
|
|
4597
|
+
const getGetRomaConfigurationByIdUrl = (id) => {
|
|
4598
|
+
return `/api/configurations/id/${id}`;
|
|
4599
|
+
};
|
|
5179
4600
|
const useGetRomaConfigurationByIdHook = () => {
|
|
5180
|
-
const
|
|
5181
|
-
return (id,
|
|
5182
|
-
return
|
|
5183
|
-
|
|
5184
|
-
method: "
|
|
5185
|
-
signal
|
|
4601
|
+
const customFetcher = useCustomClient();
|
|
4602
|
+
return (id, options) => {
|
|
4603
|
+
return customFetcher(getGetRomaConfigurationByIdUrl(id), {
|
|
4604
|
+
...options,
|
|
4605
|
+
method: "GET"
|
|
5186
4606
|
});
|
|
5187
4607
|
};
|
|
5188
4608
|
};
|
|
@@ -5190,10 +4610,10 @@ const getGetRomaConfigurationByIdQueryKey = (id) => {
|
|
|
5190
4610
|
return [`/api/configurations/id/${id}`];
|
|
5191
4611
|
};
|
|
5192
4612
|
const useGetRomaConfigurationByIdQueryOptions = (id, options) => {
|
|
5193
|
-
const { query: queryOptions } = options ?? {};
|
|
4613
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
5194
4614
|
const queryKey = queryOptions?.queryKey ?? getGetRomaConfigurationByIdQueryKey(id);
|
|
5195
4615
|
const getRomaConfigurationById = useGetRomaConfigurationByIdHook();
|
|
5196
|
-
const queryFn = ({ signal }) => getRomaConfigurationById(id, signal);
|
|
4616
|
+
const queryFn = ({ signal }) => getRomaConfigurationById(id, { signal, ...requestOptions });
|
|
5197
4617
|
return {
|
|
5198
4618
|
queryKey,
|
|
5199
4619
|
queryFn,
|
|
@@ -5201,65 +4621,78 @@ const useGetRomaConfigurationByIdQueryOptions = (id, options) => {
|
|
|
5201
4621
|
...queryOptions
|
|
5202
4622
|
};
|
|
5203
4623
|
};
|
|
5204
|
-
|
|
4624
|
+
function useGetRomaConfigurationById(id, options, queryClient) {
|
|
5205
4625
|
const queryOptions = useGetRomaConfigurationByIdQueryOptions(id, options);
|
|
5206
|
-
const query = useQuery(queryOptions);
|
|
5207
|
-
query
|
|
5208
|
-
|
|
4626
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4627
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4628
|
+
}
|
|
4629
|
+
const getUpdateRomaConfigurationUrl = (id) => {
|
|
4630
|
+
return `/api/configurations/id/${id}`;
|
|
5209
4631
|
};
|
|
5210
4632
|
const useUpdateRomaConfigurationHook = () => {
|
|
5211
|
-
const
|
|
5212
|
-
return (id, romaConfigurationDto) => {
|
|
5213
|
-
return
|
|
5214
|
-
|
|
5215
|
-
method: "
|
|
5216
|
-
headers: { "Content-Type": "application/json" },
|
|
5217
|
-
|
|
4633
|
+
const customFetcher = useCustomClient();
|
|
4634
|
+
return (id, romaConfigurationDto, options) => {
|
|
4635
|
+
return customFetcher(getUpdateRomaConfigurationUrl(id), {
|
|
4636
|
+
...options,
|
|
4637
|
+
method: "PUT",
|
|
4638
|
+
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
4639
|
+
body: JSON.stringify(romaConfigurationDto)
|
|
5218
4640
|
});
|
|
5219
4641
|
};
|
|
5220
4642
|
};
|
|
5221
4643
|
const useUpdateRomaConfigurationMutationOptions = (options) => {
|
|
5222
|
-
const
|
|
4644
|
+
const mutationKey = ["updateRomaConfiguration"];
|
|
4645
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
5223
4646
|
const updateRomaConfiguration = useUpdateRomaConfigurationHook();
|
|
5224
4647
|
const mutationFn = (props) => {
|
|
5225
4648
|
const { id, data } = props ?? {};
|
|
5226
|
-
return updateRomaConfiguration(id, data);
|
|
4649
|
+
return updateRomaConfiguration(id, data, requestOptions);
|
|
5227
4650
|
};
|
|
5228
4651
|
return { mutationFn, ...mutationOptions };
|
|
5229
4652
|
};
|
|
5230
|
-
const useUpdateRomaConfiguration = (options) => {
|
|
5231
|
-
|
|
5232
|
-
|
|
4653
|
+
const useUpdateRomaConfiguration = (options, queryClient) => {
|
|
4654
|
+
return useMutation(
|
|
4655
|
+
useUpdateRomaConfigurationMutationOptions(options),
|
|
4656
|
+
queryClient
|
|
4657
|
+
);
|
|
4658
|
+
};
|
|
4659
|
+
const getDeleteRomaConfigurationUrl = (id) => {
|
|
4660
|
+
return `/api/configurations/id/${id}`;
|
|
5233
4661
|
};
|
|
5234
4662
|
const useDeleteRomaConfigurationHook = () => {
|
|
5235
|
-
const
|
|
5236
|
-
return (id) => {
|
|
5237
|
-
return
|
|
5238
|
-
|
|
5239
|
-
method: "
|
|
4663
|
+
const customFetcher = useCustomClient();
|
|
4664
|
+
return (id, options) => {
|
|
4665
|
+
return customFetcher(getDeleteRomaConfigurationUrl(id), {
|
|
4666
|
+
...options,
|
|
4667
|
+
method: "DELETE"
|
|
5240
4668
|
});
|
|
5241
4669
|
};
|
|
5242
4670
|
};
|
|
5243
4671
|
const useDeleteRomaConfigurationMutationOptions = (options) => {
|
|
5244
|
-
const
|
|
4672
|
+
const mutationKey = ["deleteRomaConfiguration"];
|
|
4673
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
5245
4674
|
const deleteRomaConfiguration = useDeleteRomaConfigurationHook();
|
|
5246
4675
|
const mutationFn = (props) => {
|
|
5247
4676
|
const { id } = props ?? {};
|
|
5248
|
-
return deleteRomaConfiguration(id);
|
|
4677
|
+
return deleteRomaConfiguration(id, requestOptions);
|
|
5249
4678
|
};
|
|
5250
4679
|
return { mutationFn, ...mutationOptions };
|
|
5251
4680
|
};
|
|
5252
|
-
const useDeleteRomaConfiguration = (options) => {
|
|
5253
|
-
|
|
5254
|
-
|
|
4681
|
+
const useDeleteRomaConfiguration = (options, queryClient) => {
|
|
4682
|
+
return useMutation(
|
|
4683
|
+
useDeleteRomaConfigurationMutationOptions(options),
|
|
4684
|
+
queryClient
|
|
4685
|
+
);
|
|
4686
|
+
};
|
|
4687
|
+
const getGetAllRomaConfigurationUrl = () => {
|
|
4688
|
+
return `/api/configurations`;
|
|
5255
4689
|
};
|
|
5256
4690
|
const useGetAllRomaConfigurationHook = () => {
|
|
5257
|
-
const
|
|
5258
|
-
return (
|
|
5259
|
-
return
|
|
5260
|
-
|
|
5261
|
-
method: "
|
|
5262
|
-
signal
|
|
4691
|
+
const customFetcher = useCustomClient();
|
|
4692
|
+
return (options) => {
|
|
4693
|
+
return customFetcher(getGetAllRomaConfigurationUrl(), {
|
|
4694
|
+
...options,
|
|
4695
|
+
method: "GET"
|
|
5263
4696
|
});
|
|
5264
4697
|
};
|
|
5265
4698
|
};
|
|
@@ -5267,49 +4700,56 @@ const getGetAllRomaConfigurationQueryKey = () => {
|
|
|
5267
4700
|
return [`/api/configurations`];
|
|
5268
4701
|
};
|
|
5269
4702
|
const useGetAllRomaConfigurationQueryOptions = (options) => {
|
|
5270
|
-
const { query: queryOptions } = options ?? {};
|
|
4703
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
5271
4704
|
const queryKey = queryOptions?.queryKey ?? getGetAllRomaConfigurationQueryKey();
|
|
5272
4705
|
const getAllRomaConfiguration = useGetAllRomaConfigurationHook();
|
|
5273
|
-
const queryFn = ({ signal }) => getAllRomaConfiguration(signal);
|
|
4706
|
+
const queryFn = ({ signal }) => getAllRomaConfiguration({ signal, ...requestOptions });
|
|
5274
4707
|
return { queryKey, queryFn, ...queryOptions };
|
|
5275
4708
|
};
|
|
5276
|
-
|
|
4709
|
+
function useGetAllRomaConfiguration(options, queryClient) {
|
|
5277
4710
|
const queryOptions = useGetAllRomaConfigurationQueryOptions(options);
|
|
5278
|
-
const query = useQuery(queryOptions);
|
|
5279
|
-
query
|
|
5280
|
-
|
|
4711
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4712
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4713
|
+
}
|
|
4714
|
+
const getAddRomaConfigurationUrl = () => {
|
|
4715
|
+
return `/api/configurations`;
|
|
5281
4716
|
};
|
|
5282
4717
|
const useAddRomaConfigurationHook = () => {
|
|
5283
|
-
const
|
|
5284
|
-
return (romaConfigurationDto) => {
|
|
5285
|
-
return
|
|
5286
|
-
|
|
5287
|
-
method: "
|
|
5288
|
-
headers: { "Content-Type": "application/json" },
|
|
5289
|
-
|
|
4718
|
+
const customFetcher = useCustomClient();
|
|
4719
|
+
return (romaConfigurationDto, options) => {
|
|
4720
|
+
return customFetcher(getAddRomaConfigurationUrl(), {
|
|
4721
|
+
...options,
|
|
4722
|
+
method: "POST",
|
|
4723
|
+
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
4724
|
+
body: JSON.stringify(romaConfigurationDto)
|
|
5290
4725
|
});
|
|
5291
4726
|
};
|
|
5292
4727
|
};
|
|
5293
4728
|
const useAddRomaConfigurationMutationOptions = (options) => {
|
|
5294
|
-
const
|
|
4729
|
+
const mutationKey = ["addRomaConfiguration"];
|
|
4730
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
5295
4731
|
const addRomaConfiguration = useAddRomaConfigurationHook();
|
|
5296
4732
|
const mutationFn = (props) => {
|
|
5297
4733
|
const { data } = props ?? {};
|
|
5298
|
-
return addRomaConfiguration(data);
|
|
4734
|
+
return addRomaConfiguration(data, requestOptions);
|
|
5299
4735
|
};
|
|
5300
4736
|
return { mutationFn, ...mutationOptions };
|
|
5301
4737
|
};
|
|
5302
|
-
const useAddRomaConfiguration = (options) => {
|
|
5303
|
-
|
|
5304
|
-
|
|
4738
|
+
const useAddRomaConfiguration = (options, queryClient) => {
|
|
4739
|
+
return useMutation(
|
|
4740
|
+
useAddRomaConfigurationMutationOptions(options),
|
|
4741
|
+
queryClient
|
|
4742
|
+
);
|
|
4743
|
+
};
|
|
4744
|
+
const getGetAllRomaConfigurationTypesUrl = () => {
|
|
4745
|
+
return `/api/configurations/types`;
|
|
5305
4746
|
};
|
|
5306
4747
|
const useGetAllRomaConfigurationTypesHook = () => {
|
|
5307
|
-
const
|
|
5308
|
-
return (
|
|
5309
|
-
return
|
|
5310
|
-
|
|
5311
|
-
method: "
|
|
5312
|
-
signal
|
|
4748
|
+
const customFetcher = useCustomClient();
|
|
4749
|
+
return (options) => {
|
|
4750
|
+
return customFetcher(getGetAllRomaConfigurationTypesUrl(), {
|
|
4751
|
+
...options,
|
|
4752
|
+
method: "GET"
|
|
5313
4753
|
});
|
|
5314
4754
|
};
|
|
5315
4755
|
};
|
|
@@ -5317,25 +4757,26 @@ const getGetAllRomaConfigurationTypesQueryKey = () => {
|
|
|
5317
4757
|
return [`/api/configurations/types`];
|
|
5318
4758
|
};
|
|
5319
4759
|
const useGetAllRomaConfigurationTypesQueryOptions = (options) => {
|
|
5320
|
-
const { query: queryOptions } = options ?? {};
|
|
4760
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
5321
4761
|
const queryKey = queryOptions?.queryKey ?? getGetAllRomaConfigurationTypesQueryKey();
|
|
5322
4762
|
const getAllRomaConfigurationTypes = useGetAllRomaConfigurationTypesHook();
|
|
5323
|
-
const queryFn = ({ signal }) => getAllRomaConfigurationTypes(signal);
|
|
4763
|
+
const queryFn = ({ signal }) => getAllRomaConfigurationTypes({ signal, ...requestOptions });
|
|
5324
4764
|
return { queryKey, queryFn, ...queryOptions };
|
|
5325
4765
|
};
|
|
5326
|
-
|
|
4766
|
+
function useGetAllRomaConfigurationTypes(options, queryClient) {
|
|
5327
4767
|
const queryOptions = useGetAllRomaConfigurationTypesQueryOptions(options);
|
|
5328
|
-
const query = useQuery(queryOptions);
|
|
5329
|
-
query
|
|
5330
|
-
|
|
4768
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4769
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4770
|
+
}
|
|
4771
|
+
const getGetAllRomaConfigurationByTypeUrl = (type) => {
|
|
4772
|
+
return `/api/configurations/types/type/${type}`;
|
|
5331
4773
|
};
|
|
5332
4774
|
const useGetAllRomaConfigurationByTypeHook = () => {
|
|
5333
|
-
const
|
|
5334
|
-
return (type,
|
|
5335
|
-
return
|
|
5336
|
-
|
|
5337
|
-
method: "
|
|
5338
|
-
signal
|
|
4775
|
+
const customFetcher = useCustomClient();
|
|
4776
|
+
return (type, options) => {
|
|
4777
|
+
return customFetcher(getGetAllRomaConfigurationByTypeUrl(type), {
|
|
4778
|
+
...options,
|
|
4779
|
+
method: "GET"
|
|
5339
4780
|
});
|
|
5340
4781
|
};
|
|
5341
4782
|
};
|
|
@@ -5343,10 +4784,10 @@ const getGetAllRomaConfigurationByTypeQueryKey = (type) => {
|
|
|
5343
4784
|
return [`/api/configurations/types/type/${type}`];
|
|
5344
4785
|
};
|
|
5345
4786
|
const useGetAllRomaConfigurationByTypeQueryOptions = (type, options) => {
|
|
5346
|
-
const { query: queryOptions } = options ?? {};
|
|
4787
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
5347
4788
|
const queryKey = queryOptions?.queryKey ?? getGetAllRomaConfigurationByTypeQueryKey(type);
|
|
5348
4789
|
const getAllRomaConfigurationByType = useGetAllRomaConfigurationByTypeHook();
|
|
5349
|
-
const queryFn = ({ signal }) => getAllRomaConfigurationByType(type, signal);
|
|
4790
|
+
const queryFn = ({ signal }) => getAllRomaConfigurationByType(type, { signal, ...requestOptions });
|
|
5350
4791
|
return {
|
|
5351
4792
|
queryKey,
|
|
5352
4793
|
queryFn,
|
|
@@ -5354,47 +4795,57 @@ const useGetAllRomaConfigurationByTypeQueryOptions = (type, options) => {
|
|
|
5354
4795
|
...queryOptions
|
|
5355
4796
|
};
|
|
5356
4797
|
};
|
|
5357
|
-
|
|
4798
|
+
function useGetAllRomaConfigurationByType(type, options, queryClient) {
|
|
5358
4799
|
const queryOptions = useGetAllRomaConfigurationByTypeQueryOptions(
|
|
5359
4800
|
type,
|
|
5360
4801
|
options
|
|
5361
4802
|
);
|
|
5362
|
-
const query = useQuery(queryOptions);
|
|
5363
|
-
query
|
|
5364
|
-
|
|
4803
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4804
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4805
|
+
}
|
|
4806
|
+
const getCreateFeedbackUrl = () => {
|
|
4807
|
+
return `/api/feedbacks`;
|
|
5365
4808
|
};
|
|
5366
4809
|
const useCreateFeedbackHook = () => {
|
|
5367
|
-
const
|
|
5368
|
-
return (feedbackDto) => {
|
|
5369
|
-
return
|
|
5370
|
-
|
|
5371
|
-
method: "
|
|
5372
|
-
headers: { "Content-Type": "application/json" },
|
|
5373
|
-
|
|
4810
|
+
const customFetcher = useCustomClient();
|
|
4811
|
+
return (feedbackDto, options) => {
|
|
4812
|
+
return customFetcher(getCreateFeedbackUrl(), {
|
|
4813
|
+
...options,
|
|
4814
|
+
method: "POST",
|
|
4815
|
+
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
4816
|
+
body: JSON.stringify(feedbackDto)
|
|
5374
4817
|
});
|
|
5375
4818
|
};
|
|
5376
4819
|
};
|
|
5377
4820
|
const useCreateFeedbackMutationOptions = (options) => {
|
|
5378
|
-
const
|
|
4821
|
+
const mutationKey = ["createFeedback"];
|
|
4822
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
5379
4823
|
const createFeedback = useCreateFeedbackHook();
|
|
5380
4824
|
const mutationFn = (props) => {
|
|
5381
4825
|
const { data } = props ?? {};
|
|
5382
|
-
return createFeedback(data);
|
|
4826
|
+
return createFeedback(data, requestOptions);
|
|
5383
4827
|
};
|
|
5384
4828
|
return { mutationFn, ...mutationOptions };
|
|
5385
4829
|
};
|
|
5386
|
-
const useCreateFeedback = (options) => {
|
|
5387
|
-
|
|
5388
|
-
|
|
4830
|
+
const useCreateFeedback = (options, queryClient) => {
|
|
4831
|
+
return useMutation(useCreateFeedbackMutationOptions(options), queryClient);
|
|
4832
|
+
};
|
|
4833
|
+
const getListFeedbacksByCurrentUserUrl = (params) => {
|
|
4834
|
+
const normalizedParams = new URLSearchParams();
|
|
4835
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
4836
|
+
if (value !== void 0) {
|
|
4837
|
+
normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
4838
|
+
}
|
|
4839
|
+
});
|
|
4840
|
+
const stringifiedParams = normalizedParams.toString();
|
|
4841
|
+
return stringifiedParams.length > 0 ? `/api/feedbacks/mine?${stringifiedParams}` : `/api/feedbacks/mine`;
|
|
5389
4842
|
};
|
|
5390
4843
|
const useListFeedbacksByCurrentUserHook = () => {
|
|
5391
|
-
const
|
|
5392
|
-
return (params,
|
|
5393
|
-
return
|
|
5394
|
-
|
|
5395
|
-
method: "
|
|
5396
|
-
params,
|
|
5397
|
-
signal
|
|
4844
|
+
const customFetcher = useCustomClient();
|
|
4845
|
+
return (params, options) => {
|
|
4846
|
+
return customFetcher(getListFeedbacksByCurrentUserUrl(params), {
|
|
4847
|
+
...options,
|
|
4848
|
+
method: "GET"
|
|
5398
4849
|
});
|
|
5399
4850
|
};
|
|
5400
4851
|
};
|
|
@@ -5402,21 +4853,327 @@ const getListFeedbacksByCurrentUserQueryKey = (params) => {
|
|
|
5402
4853
|
return [`/api/feedbacks/mine`, ...params ? [params] : []];
|
|
5403
4854
|
};
|
|
5404
4855
|
const useListFeedbacksByCurrentUserQueryOptions = (params, options) => {
|
|
5405
|
-
const { query: queryOptions } = options ?? {};
|
|
4856
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
5406
4857
|
const queryKey = queryOptions?.queryKey ?? getListFeedbacksByCurrentUserQueryKey(params);
|
|
5407
4858
|
const listFeedbacksByCurrentUser = useListFeedbacksByCurrentUserHook();
|
|
5408
|
-
const queryFn = ({ signal }) => listFeedbacksByCurrentUser(params, signal);
|
|
4859
|
+
const queryFn = ({ signal }) => listFeedbacksByCurrentUser(params, { signal, ...requestOptions });
|
|
5409
4860
|
return { queryKey, queryFn, ...queryOptions };
|
|
5410
4861
|
};
|
|
5411
|
-
|
|
4862
|
+
function useListFeedbacksByCurrentUser(params, options, queryClient) {
|
|
5412
4863
|
const queryOptions = useListFeedbacksByCurrentUserQueryOptions(
|
|
5413
4864
|
params,
|
|
5414
4865
|
options
|
|
5415
4866
|
);
|
|
5416
|
-
const query = useQuery(queryOptions);
|
|
5417
|
-
query
|
|
5418
|
-
|
|
4867
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4868
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4869
|
+
}
|
|
4870
|
+
const getGetByIdUrl = (id) => {
|
|
4871
|
+
return `/api/alarm-groups/${id}`;
|
|
4872
|
+
};
|
|
4873
|
+
const useGetByIdHook = () => {
|
|
4874
|
+
const customFetcher = useCustomClient();
|
|
4875
|
+
return (id, options) => {
|
|
4876
|
+
return customFetcher(getGetByIdUrl(id), {
|
|
4877
|
+
...options,
|
|
4878
|
+
method: "GET"
|
|
4879
|
+
});
|
|
4880
|
+
};
|
|
4881
|
+
};
|
|
4882
|
+
const getGetByIdQueryKey = (id) => {
|
|
4883
|
+
return [`/api/alarm-groups/${id}`];
|
|
4884
|
+
};
|
|
4885
|
+
const useGetByIdQueryOptions = (id, options) => {
|
|
4886
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
4887
|
+
const queryKey = queryOptions?.queryKey ?? getGetByIdQueryKey(id);
|
|
4888
|
+
const getById = useGetByIdHook();
|
|
4889
|
+
const queryFn = ({ signal }) => getById(id, { signal, ...requestOptions });
|
|
4890
|
+
return {
|
|
4891
|
+
queryKey,
|
|
4892
|
+
queryFn,
|
|
4893
|
+
enabled: !!id,
|
|
4894
|
+
...queryOptions
|
|
4895
|
+
};
|
|
4896
|
+
};
|
|
4897
|
+
function useGetById(id, options, queryClient) {
|
|
4898
|
+
const queryOptions = useGetByIdQueryOptions(id, options);
|
|
4899
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4900
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4901
|
+
}
|
|
4902
|
+
const getUpdateUrl = (id) => {
|
|
4903
|
+
return `/api/alarm-groups/${id}`;
|
|
4904
|
+
};
|
|
4905
|
+
const useUpdateHook = () => {
|
|
4906
|
+
const customFetcher = useCustomClient();
|
|
4907
|
+
return (id, alarmGroupDto, options) => {
|
|
4908
|
+
return customFetcher(getUpdateUrl(id), {
|
|
4909
|
+
...options,
|
|
4910
|
+
method: "PUT",
|
|
4911
|
+
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
4912
|
+
body: JSON.stringify(alarmGroupDto)
|
|
4913
|
+
});
|
|
4914
|
+
};
|
|
4915
|
+
};
|
|
4916
|
+
const useUpdateMutationOptions = (options) => {
|
|
4917
|
+
const mutationKey = ["update"];
|
|
4918
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
4919
|
+
const update = useUpdateHook();
|
|
4920
|
+
const mutationFn = (props) => {
|
|
4921
|
+
const { id, data } = props ?? {};
|
|
4922
|
+
return update(id, data, requestOptions);
|
|
4923
|
+
};
|
|
4924
|
+
return { mutationFn, ...mutationOptions };
|
|
4925
|
+
};
|
|
4926
|
+
const useUpdate = (options, queryClient) => {
|
|
4927
|
+
return useMutation(useUpdateMutationOptions(options), queryClient);
|
|
4928
|
+
};
|
|
4929
|
+
const getDeleteUrl = (id) => {
|
|
4930
|
+
return `/api/alarm-groups/${id}`;
|
|
4931
|
+
};
|
|
4932
|
+
const use_DeleteHook = () => {
|
|
4933
|
+
const customFetcher = useCustomClient();
|
|
4934
|
+
return (id, options) => {
|
|
4935
|
+
return customFetcher(getDeleteUrl(id), {
|
|
4936
|
+
...options,
|
|
4937
|
+
method: "DELETE"
|
|
4938
|
+
});
|
|
4939
|
+
};
|
|
4940
|
+
};
|
|
4941
|
+
const useDeleteMutationOptions = (options) => {
|
|
4942
|
+
const mutationKey = ["_delete"];
|
|
4943
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
4944
|
+
const _delete = use_DeleteHook();
|
|
4945
|
+
const mutationFn = (props) => {
|
|
4946
|
+
const { id } = props ?? {};
|
|
4947
|
+
return _delete(id, requestOptions);
|
|
4948
|
+
};
|
|
4949
|
+
return { mutationFn, ...mutationOptions };
|
|
4950
|
+
};
|
|
4951
|
+
const useDelete = (options, queryClient) => {
|
|
4952
|
+
return useMutation(useDeleteMutationOptions(options), queryClient);
|
|
4953
|
+
};
|
|
4954
|
+
const getReplaceMembersUrl = (id) => {
|
|
4955
|
+
return `/api/alarm-groups/${id}/members`;
|
|
4956
|
+
};
|
|
4957
|
+
const useReplaceMembersHook = () => {
|
|
4958
|
+
const customFetcher = useCustomClient();
|
|
4959
|
+
return (id, replaceMembersBody, options) => {
|
|
4960
|
+
return customFetcher(getReplaceMembersUrl(id), {
|
|
4961
|
+
...options,
|
|
4962
|
+
method: "PUT",
|
|
4963
|
+
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
4964
|
+
body: JSON.stringify(replaceMembersBody)
|
|
4965
|
+
});
|
|
4966
|
+
};
|
|
4967
|
+
};
|
|
4968
|
+
const useReplaceMembersMutationOptions = (options) => {
|
|
4969
|
+
const mutationKey = ["replaceMembers"];
|
|
4970
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
4971
|
+
const replaceMembers = useReplaceMembersHook();
|
|
4972
|
+
const mutationFn = (props) => {
|
|
4973
|
+
const { id, data } = props ?? {};
|
|
4974
|
+
return replaceMembers(id, data, requestOptions);
|
|
4975
|
+
};
|
|
4976
|
+
return { mutationFn, ...mutationOptions };
|
|
4977
|
+
};
|
|
4978
|
+
const useReplaceMembers = (options, queryClient) => {
|
|
4979
|
+
return useMutation(useReplaceMembersMutationOptions(options), queryClient);
|
|
4980
|
+
};
|
|
4981
|
+
const getGetAll1Url = () => {
|
|
4982
|
+
return `/api/alarm-groups`;
|
|
4983
|
+
};
|
|
4984
|
+
const useGetAll1Hook = () => {
|
|
4985
|
+
const customFetcher = useCustomClient();
|
|
4986
|
+
return (options) => {
|
|
4987
|
+
return customFetcher(getGetAll1Url(), {
|
|
4988
|
+
...options,
|
|
4989
|
+
method: "GET"
|
|
4990
|
+
});
|
|
4991
|
+
};
|
|
4992
|
+
};
|
|
4993
|
+
const getGetAll1QueryKey = () => {
|
|
4994
|
+
return [`/api/alarm-groups`];
|
|
4995
|
+
};
|
|
4996
|
+
const useGetAll1QueryOptions = (options) => {
|
|
4997
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
4998
|
+
const queryKey = queryOptions?.queryKey ?? getGetAll1QueryKey();
|
|
4999
|
+
const getAll1 = useGetAll1Hook();
|
|
5000
|
+
const queryFn = ({ signal }) => getAll1({ signal, ...requestOptions });
|
|
5001
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
5002
|
+
};
|
|
5003
|
+
function useGetAll1(options, queryClient) {
|
|
5004
|
+
const queryOptions = useGetAll1QueryOptions(options);
|
|
5005
|
+
const query = useQuery(queryOptions, queryClient);
|
|
5006
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
5007
|
+
}
|
|
5008
|
+
const getCreateUrl = () => {
|
|
5009
|
+
return `/api/alarm-groups`;
|
|
5010
|
+
};
|
|
5011
|
+
const useCreateHook = () => {
|
|
5012
|
+
const customFetcher = useCustomClient();
|
|
5013
|
+
return (alarmGroupDto, options) => {
|
|
5014
|
+
return customFetcher(getCreateUrl(), {
|
|
5015
|
+
...options,
|
|
5016
|
+
method: "POST",
|
|
5017
|
+
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
5018
|
+
body: JSON.stringify(alarmGroupDto)
|
|
5019
|
+
});
|
|
5020
|
+
};
|
|
5021
|
+
};
|
|
5022
|
+
const useCreateMutationOptions = (options) => {
|
|
5023
|
+
const mutationKey = ["create"];
|
|
5024
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
5025
|
+
const create = useCreateHook();
|
|
5026
|
+
const mutationFn = (props) => {
|
|
5027
|
+
const { data } = props ?? {};
|
|
5028
|
+
return create(data, requestOptions);
|
|
5029
|
+
};
|
|
5030
|
+
return { mutationFn, ...mutationOptions };
|
|
5031
|
+
};
|
|
5032
|
+
const useCreate = (options, queryClient) => {
|
|
5033
|
+
return useMutation(useCreateMutationOptions(options), queryClient);
|
|
5034
|
+
};
|
|
5035
|
+
const getGetAllUrl = (params) => {
|
|
5036
|
+
const normalizedParams = new URLSearchParams();
|
|
5037
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
5038
|
+
if (value !== void 0) {
|
|
5039
|
+
normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
5040
|
+
}
|
|
5041
|
+
});
|
|
5042
|
+
const stringifiedParams = normalizedParams.toString();
|
|
5043
|
+
return stringifiedParams.length > 0 ? `/api/alarms?${stringifiedParams}` : `/api/alarms`;
|
|
5044
|
+
};
|
|
5045
|
+
const useGetAllHook = () => {
|
|
5046
|
+
const customFetcher = useCustomClient();
|
|
5047
|
+
return (params, options) => {
|
|
5048
|
+
return customFetcher(getGetAllUrl(params), {
|
|
5049
|
+
...options,
|
|
5050
|
+
method: "GET"
|
|
5051
|
+
});
|
|
5052
|
+
};
|
|
5053
|
+
};
|
|
5054
|
+
const getGetAllQueryKey = (params) => {
|
|
5055
|
+
return [`/api/alarms`, ...params ? [params] : []];
|
|
5056
|
+
};
|
|
5057
|
+
const useGetAllQueryOptions = (params, options) => {
|
|
5058
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
5059
|
+
const queryKey = queryOptions?.queryKey ?? getGetAllQueryKey(params);
|
|
5060
|
+
const getAll = useGetAllHook();
|
|
5061
|
+
const queryFn = ({ signal }) => getAll(params, { signal, ...requestOptions });
|
|
5062
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
5063
|
+
};
|
|
5064
|
+
function useGetAll(params, options, queryClient) {
|
|
5065
|
+
const queryOptions = useGetAllQueryOptions(params, options);
|
|
5066
|
+
const query = useQuery(queryOptions, queryClient);
|
|
5067
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
5068
|
+
}
|
|
5069
|
+
const getRaiseUrl = () => {
|
|
5070
|
+
return `/api/alarms`;
|
|
5071
|
+
};
|
|
5072
|
+
const useRaiseHook = () => {
|
|
5073
|
+
const customFetcher = useCustomClient();
|
|
5074
|
+
return (raiseAlarmRequest, options) => {
|
|
5075
|
+
return customFetcher(getRaiseUrl(), {
|
|
5076
|
+
...options,
|
|
5077
|
+
method: "POST",
|
|
5078
|
+
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
5079
|
+
body: JSON.stringify(raiseAlarmRequest)
|
|
5080
|
+
});
|
|
5081
|
+
};
|
|
5082
|
+
};
|
|
5083
|
+
const useRaiseMutationOptions = (options) => {
|
|
5084
|
+
const mutationKey = ["raise"];
|
|
5085
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
5086
|
+
const raise = useRaiseHook();
|
|
5087
|
+
const mutationFn = (props) => {
|
|
5088
|
+
const { data } = props ?? {};
|
|
5089
|
+
return raise(data, requestOptions);
|
|
5090
|
+
};
|
|
5091
|
+
return { mutationFn, ...mutationOptions };
|
|
5092
|
+
};
|
|
5093
|
+
const useRaise = (options, queryClient) => {
|
|
5094
|
+
return useMutation(useRaiseMutationOptions(options), queryClient);
|
|
5095
|
+
};
|
|
5096
|
+
const getClearUrl = (id) => {
|
|
5097
|
+
return `/api/alarms/${id}/clear`;
|
|
5098
|
+
};
|
|
5099
|
+
const useClearHook = () => {
|
|
5100
|
+
const customFetcher = useCustomClient();
|
|
5101
|
+
return (id, clearAlarmRequest, options) => {
|
|
5102
|
+
return customFetcher(getClearUrl(id), {
|
|
5103
|
+
...options,
|
|
5104
|
+
method: "POST",
|
|
5105
|
+
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
5106
|
+
body: JSON.stringify(clearAlarmRequest)
|
|
5107
|
+
});
|
|
5108
|
+
};
|
|
5109
|
+
};
|
|
5110
|
+
const useClearMutationOptions = (options) => {
|
|
5111
|
+
const mutationKey = ["clear"];
|
|
5112
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
5113
|
+
const clear = useClearHook();
|
|
5114
|
+
const mutationFn = (props) => {
|
|
5115
|
+
const { id, data } = props ?? {};
|
|
5116
|
+
return clear(id, data, requestOptions);
|
|
5117
|
+
};
|
|
5118
|
+
return { mutationFn, ...mutationOptions };
|
|
5119
|
+
};
|
|
5120
|
+
const useClear = (options, queryClient) => {
|
|
5121
|
+
return useMutation(useClearMutationOptions(options), queryClient);
|
|
5122
|
+
};
|
|
5123
|
+
const getStreamAlarmsUrl = () => {
|
|
5124
|
+
return `/eventstream/alarm`;
|
|
5419
5125
|
};
|
|
5126
|
+
const useStreamAlarmsHook = () => {
|
|
5127
|
+
const customFetcher = useCustomClient();
|
|
5128
|
+
return (options) => {
|
|
5129
|
+
return customFetcher(getStreamAlarmsUrl(), {
|
|
5130
|
+
...options,
|
|
5131
|
+
method: "GET"
|
|
5132
|
+
});
|
|
5133
|
+
};
|
|
5134
|
+
};
|
|
5135
|
+
const getStreamAlarmsQueryKey = () => {
|
|
5136
|
+
return [`/eventstream/alarm`];
|
|
5137
|
+
};
|
|
5138
|
+
const useStreamAlarmsQueryOptions = (options) => {
|
|
5139
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
5140
|
+
const queryKey = queryOptions?.queryKey ?? getStreamAlarmsQueryKey();
|
|
5141
|
+
const streamAlarms = useStreamAlarmsHook();
|
|
5142
|
+
const queryFn = ({ signal }) => streamAlarms({ signal, ...requestOptions });
|
|
5143
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
5144
|
+
};
|
|
5145
|
+
function useStreamAlarms(options, queryClient) {
|
|
5146
|
+
const queryOptions = useStreamAlarmsQueryOptions(options);
|
|
5147
|
+
const query = useQuery(queryOptions, queryClient);
|
|
5148
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
5149
|
+
}
|
|
5150
|
+
const getGetStatusUrl = () => {
|
|
5151
|
+
return `/api/health/status`;
|
|
5152
|
+
};
|
|
5153
|
+
const useGetStatusHook = () => {
|
|
5154
|
+
const customFetcher = useCustomClient();
|
|
5155
|
+
return (options) => {
|
|
5156
|
+
return customFetcher(getGetStatusUrl(), {
|
|
5157
|
+
...options,
|
|
5158
|
+
method: "GET"
|
|
5159
|
+
});
|
|
5160
|
+
};
|
|
5161
|
+
};
|
|
5162
|
+
const getGetStatusQueryKey = () => {
|
|
5163
|
+
return [`/api/health/status`];
|
|
5164
|
+
};
|
|
5165
|
+
const useGetStatusQueryOptions = (options) => {
|
|
5166
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
5167
|
+
const queryKey = queryOptions?.queryKey ?? getGetStatusQueryKey();
|
|
5168
|
+
const getStatus = useGetStatusHook();
|
|
5169
|
+
const queryFn = ({ signal }) => getStatus({ signal, ...requestOptions });
|
|
5170
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
5171
|
+
};
|
|
5172
|
+
function useGetStatus(options, queryClient) {
|
|
5173
|
+
const queryOptions = useGetStatusQueryOptions(options);
|
|
5174
|
+
const query = useQuery(queryOptions, queryClient);
|
|
5175
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
5176
|
+
}
|
|
5420
5177
|
const findGroupMembers = async (client, groupId, query) => {
|
|
5421
5178
|
const headers = {
|
|
5422
5179
|
ConsistencyLevel: "eventual"
|
|
@@ -5898,26 +5655,29 @@ const useWatchDefaults = {
|
|
|
5898
5655
|
}
|
|
5899
5656
|
};
|
|
5900
5657
|
const useManageWatchList = (system) => {
|
|
5901
|
-
const { data: setting } = useGetSettingsByAppShortName(
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5658
|
+
const { data: setting } = useGetSettingsByAppShortName(
|
|
5659
|
+
"notifications",
|
|
5660
|
+
{
|
|
5661
|
+
query: {
|
|
5662
|
+
meta: {
|
|
5663
|
+
persist: true
|
|
5664
|
+
},
|
|
5665
|
+
staleTime: 6e4 * 15,
|
|
5666
|
+
// Skip re-fetching if data is less than 15 minutes old
|
|
5667
|
+
select: (data) => {
|
|
5668
|
+
const setting2 = (data ?? []).filter(
|
|
5669
|
+
(f) => f.setting === "app-notifications"
|
|
5670
|
+
);
|
|
5671
|
+
return setting2 && setting2.length > 0 ? setting2[0] : {
|
|
5672
|
+
appShortName: "notifications",
|
|
5673
|
+
isPublic: false,
|
|
5674
|
+
setting: "app-notifications",
|
|
5675
|
+
value: rootSchema.cast(useWatchDefaults, { assert: false })
|
|
5676
|
+
};
|
|
5677
|
+
}
|
|
5918
5678
|
}
|
|
5919
5679
|
}
|
|
5920
|
-
|
|
5680
|
+
);
|
|
5921
5681
|
const framework = useFramework();
|
|
5922
5682
|
const user = framework.modules.auth.account;
|
|
5923
5683
|
const userId = user?.username.split("@")[0].toLowerCase() ?? "MISSINGUSER";
|
|
@@ -5998,6 +5758,9 @@ const useManageWatchList = (system) => {
|
|
|
5998
5758
|
};
|
|
5999
5759
|
};
|
|
6000
5760
|
export {
|
|
5761
|
+
AdminDtoAdminType,
|
|
5762
|
+
AlarmDtoSeverity,
|
|
5763
|
+
AlarmDtoState,
|
|
6001
5764
|
AppContext,
|
|
6002
5765
|
AppLoadError,
|
|
6003
5766
|
AppLoader,
|
|
@@ -6009,29 +5772,81 @@ export {
|
|
|
6009
5772
|
Header,
|
|
6010
5773
|
HttpError2 as HttpError,
|
|
6011
5774
|
HttpErrorViewer,
|
|
5775
|
+
RaiseAlarmRequestSeverity,
|
|
6012
5776
|
RomaErrorViewer,
|
|
6013
5777
|
StyleProvider,
|
|
6014
5778
|
configure,
|
|
6015
5779
|
createIDBPersister,
|
|
6016
5780
|
findUserById,
|
|
6017
5781
|
findUsersByMail,
|
|
5782
|
+
getAddRomaConfigurationUrl,
|
|
5783
|
+
getClearUrl,
|
|
5784
|
+
getCreateFeedbackUrl,
|
|
5785
|
+
getCreateOrUpdateAppUrl,
|
|
5786
|
+
getCreateOrUpdateCategoryUrl,
|
|
5787
|
+
getCreateOrUpdateServiceUrl,
|
|
5788
|
+
getCreatePublicSettingByUserIdUrl,
|
|
5789
|
+
getCreateSettingByUserIdUrl,
|
|
5790
|
+
getCreateUrl,
|
|
5791
|
+
getDeleteAppByKeyUrl,
|
|
5792
|
+
getDeleteCategoryByIdUrl,
|
|
5793
|
+
getDeletePrivateSettingByIdUrl,
|
|
5794
|
+
getDeletePublicSettingByIdUrl,
|
|
5795
|
+
getDeleteRomaConfigurationUrl,
|
|
5796
|
+
getDeleteServiceByKeyUrl,
|
|
5797
|
+
getDeleteUrl,
|
|
5798
|
+
getGetAll1QueryKey,
|
|
5799
|
+
getGetAll1Url,
|
|
6018
5800
|
getGetAllAppsQueryKey,
|
|
5801
|
+
getGetAllAppsUrl,
|
|
6019
5802
|
getGetAllCategoriesQueryKey,
|
|
5803
|
+
getGetAllCategoriesUrl,
|
|
5804
|
+
getGetAllQueryKey,
|
|
6020
5805
|
getGetAllRomaConfigurationByTypeQueryKey,
|
|
5806
|
+
getGetAllRomaConfigurationByTypeUrl,
|
|
6021
5807
|
getGetAllRomaConfigurationQueryKey,
|
|
6022
5808
|
getGetAllRomaConfigurationTypesQueryKey,
|
|
5809
|
+
getGetAllRomaConfigurationTypesUrl,
|
|
5810
|
+
getGetAllRomaConfigurationUrl,
|
|
6023
5811
|
getGetAllServicesQueryKey,
|
|
5812
|
+
getGetAllServicesUrl,
|
|
5813
|
+
getGetAllUrl,
|
|
6024
5814
|
getGetAppByKeyQueryKey,
|
|
5815
|
+
getGetAppByKeyUrl,
|
|
5816
|
+
getGetByIdQueryKey,
|
|
5817
|
+
getGetByIdUrl,
|
|
6025
5818
|
getGetCategoryByIdQueryKey,
|
|
5819
|
+
getGetCategoryByIdUrl,
|
|
6026
5820
|
getGetCurrentEnvironmentQueryKey,
|
|
5821
|
+
getGetCurrentEnvironmentUrl,
|
|
6027
5822
|
getGetPublicSettingByUserAndIdQueryKey,
|
|
5823
|
+
getGetPublicSettingByUserAndIdUrl,
|
|
6028
5824
|
getGetRomaConfigurationByIdQueryKey,
|
|
5825
|
+
getGetRomaConfigurationByIdUrl,
|
|
6029
5826
|
getGetServiceByKeyQueryKey,
|
|
5827
|
+
getGetServiceByKeyUrl,
|
|
6030
5828
|
getGetSettingByUserAndIdQueryKey,
|
|
5829
|
+
getGetSettingByUserAndIdUrl,
|
|
6031
5830
|
getGetSettingsByAppShortNameQueryKey,
|
|
5831
|
+
getGetSettingsByAppShortNameUrl,
|
|
6032
5832
|
getGetSettingsByUserIdQueryKey,
|
|
5833
|
+
getGetSettingsByUserIdUrl,
|
|
5834
|
+
getGetStatusQueryKey,
|
|
5835
|
+
getGetStatusUrl,
|
|
6033
5836
|
getListFeedbacksByCurrentUserQueryKey,
|
|
5837
|
+
getListFeedbacksByCurrentUserUrl,
|
|
5838
|
+
getRaiseUrl,
|
|
5839
|
+
getReplaceMembersUrl,
|
|
5840
|
+
getStreamAlarmsQueryKey,
|
|
5841
|
+
getStreamAlarmsUrl,
|
|
6034
5842
|
getStreamEventsQueryKey,
|
|
5843
|
+
getStreamEventsUrl,
|
|
5844
|
+
getUpdateByUserIdAndIdUrl,
|
|
5845
|
+
getUpdatePublicSettingByAppShortNameAndIdUrl,
|
|
5846
|
+
getUpdateRomaConfigurationUrl,
|
|
5847
|
+
getUpdateUrl,
|
|
5848
|
+
getUploadBundleUrl,
|
|
5849
|
+
handle,
|
|
6035
5850
|
handleError,
|
|
6036
5851
|
makeComponent,
|
|
6037
5852
|
parseJwt,
|
|
@@ -6040,9 +5855,15 @@ export {
|
|
|
6040
5855
|
useAddRomaConfigurationHook,
|
|
6041
5856
|
useAddRomaConfigurationMutationOptions,
|
|
6042
5857
|
useApps,
|
|
5858
|
+
useClear,
|
|
5859
|
+
useClearHook,
|
|
5860
|
+
useClearMutationOptions,
|
|
5861
|
+
useCreate,
|
|
6043
5862
|
useCreateFeedback,
|
|
6044
5863
|
useCreateFeedbackHook,
|
|
6045
5864
|
useCreateFeedbackMutationOptions,
|
|
5865
|
+
useCreateHook,
|
|
5866
|
+
useCreateMutationOptions,
|
|
6046
5867
|
useCreateOrUpdateApp,
|
|
6047
5868
|
useCreateOrUpdateAppHook,
|
|
6048
5869
|
useCreateOrUpdateAppMutationOptions,
|
|
@@ -6058,12 +5879,14 @@ export {
|
|
|
6058
5879
|
useCreateSettingByUserId,
|
|
6059
5880
|
useCreateSettingByUserIdHook,
|
|
6060
5881
|
useCreateSettingByUserIdMutationOptions,
|
|
5882
|
+
useDelete,
|
|
6061
5883
|
useDeleteAppByKey,
|
|
6062
5884
|
useDeleteAppByKeyHook,
|
|
6063
5885
|
useDeleteAppByKeyMutationOptions,
|
|
6064
5886
|
useDeleteCategoryById,
|
|
6065
5887
|
useDeleteCategoryByIdHook,
|
|
6066
5888
|
useDeleteCategoryByIdMutationOptions,
|
|
5889
|
+
useDeleteMutationOptions,
|
|
6067
5890
|
useDeletePrivateSettingById,
|
|
6068
5891
|
useDeletePrivateSettingByIdHook,
|
|
6069
5892
|
useDeletePrivateSettingByIdMutationOptions,
|
|
@@ -6083,12 +5906,18 @@ export {
|
|
|
6083
5906
|
useFindUserById,
|
|
6084
5907
|
useFindUsersByMail,
|
|
6085
5908
|
useFindUsersByShortname,
|
|
5909
|
+
useGetAll,
|
|
5910
|
+
useGetAll1,
|
|
5911
|
+
useGetAll1Hook,
|
|
5912
|
+
useGetAll1QueryOptions,
|
|
6086
5913
|
useGetAllApps,
|
|
6087
5914
|
useGetAllAppsHook,
|
|
6088
5915
|
useGetAllAppsQueryOptions,
|
|
6089
5916
|
useGetAllCategories,
|
|
6090
5917
|
useGetAllCategoriesHook,
|
|
6091
5918
|
useGetAllCategoriesQueryOptions,
|
|
5919
|
+
useGetAllHook,
|
|
5920
|
+
useGetAllQueryOptions,
|
|
6092
5921
|
useGetAllRomaConfiguration,
|
|
6093
5922
|
useGetAllRomaConfigurationByType,
|
|
6094
5923
|
useGetAllRomaConfigurationByTypeHook,
|
|
@@ -6105,6 +5934,9 @@ export {
|
|
|
6105
5934
|
useGetAppByKey,
|
|
6106
5935
|
useGetAppByKeyHook,
|
|
6107
5936
|
useGetAppByKeyQueryOptions,
|
|
5937
|
+
useGetById,
|
|
5938
|
+
useGetByIdHook,
|
|
5939
|
+
useGetByIdQueryOptions,
|
|
6108
5940
|
useGetCategoryById,
|
|
6109
5941
|
useGetCategoryByIdHook,
|
|
6110
5942
|
useGetCategoryByIdQueryOptions,
|
|
@@ -6129,17 +5961,32 @@ export {
|
|
|
6129
5961
|
useGetSettingsByUserId,
|
|
6130
5962
|
useGetSettingsByUserIdHook,
|
|
6131
5963
|
useGetSettingsByUserIdQueryOptions,
|
|
5964
|
+
useGetStatus,
|
|
5965
|
+
useGetStatusHook,
|
|
5966
|
+
useGetStatusQueryOptions,
|
|
6132
5967
|
useHasApiRole,
|
|
6133
5968
|
useListFeedbacksByCurrentUser,
|
|
6134
5969
|
useListFeedbacksByCurrentUserHook,
|
|
6135
5970
|
useListFeedbacksByCurrentUserQueryOptions,
|
|
6136
5971
|
useManageWatchList,
|
|
5972
|
+
useRaise,
|
|
5973
|
+
useRaiseHook,
|
|
5974
|
+
useRaiseMutationOptions,
|
|
5975
|
+
useReplaceMembers,
|
|
5976
|
+
useReplaceMembersHook,
|
|
5977
|
+
useReplaceMembersMutationOptions,
|
|
5978
|
+
useStreamAlarms,
|
|
5979
|
+
useStreamAlarmsHook,
|
|
5980
|
+
useStreamAlarmsQueryOptions,
|
|
6137
5981
|
useStreamEvents,
|
|
6138
5982
|
useStreamEventsHook,
|
|
6139
5983
|
useStreamEventsQueryOptions,
|
|
5984
|
+
useUpdate,
|
|
6140
5985
|
useUpdateByUserIdAndId,
|
|
6141
5986
|
useUpdateByUserIdAndIdHook,
|
|
6142
5987
|
useUpdateByUserIdAndIdMutationOptions,
|
|
5988
|
+
useUpdateHook,
|
|
5989
|
+
useUpdateMutationOptions,
|
|
6143
5990
|
useUpdatePublicSettingByAppShortNameAndId,
|
|
6144
5991
|
useUpdatePublicSettingByAppShortNameAndIdHook,
|
|
6145
5992
|
useUpdatePublicSettingByAppShortNameAndIdMutationOptions,
|
|
@@ -6149,5 +5996,6 @@ export {
|
|
|
6149
5996
|
useUploadBundle,
|
|
6150
5997
|
useUploadBundleHook,
|
|
6151
5998
|
useUploadBundleMutationOptions,
|
|
5999
|
+
use_DeleteHook,
|
|
6152
6000
|
withStyleIsolation
|
|
6153
6001
|
};
|