@equinor/roma-framework 5.0.0 → 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 +26 -1361
- 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 +76901 -70141
- 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 +26 -1361
- package/lib/dev-portal/config/AppClient.d.ts +16 -15
- package/package.json +39 -3
- package/roma-framework.mjs +1325 -1243
- package/router-lZjM0_Ti.mjs +0 -6053
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,
|
|
10
|
-
import { QueryClient, QueryClientProvider, useQueryClient,
|
|
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";
|
|
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
|
};
|
|
@@ -1598,10 +890,20 @@ function promisifyRequest(request) {
|
|
|
1598
890
|
});
|
|
1599
891
|
}
|
|
1600
892
|
function createStore(dbName, storeName) {
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
893
|
+
let dbp;
|
|
894
|
+
const getDB = () => {
|
|
895
|
+
if (dbp)
|
|
896
|
+
return dbp;
|
|
897
|
+
const request = indexedDB.open(dbName);
|
|
898
|
+
request.onupgradeneeded = () => request.result.createObjectStore(storeName);
|
|
899
|
+
dbp = promisifyRequest(request);
|
|
900
|
+
dbp.then((db) => {
|
|
901
|
+
db.onclose = () => dbp = void 0;
|
|
902
|
+
}, () => {
|
|
903
|
+
});
|
|
904
|
+
return dbp;
|
|
905
|
+
};
|
|
906
|
+
return (txMode, callback) => getDB().then((db) => callback(db.transaction(storeName, txMode).objectStore(storeName)));
|
|
1605
907
|
}
|
|
1606
908
|
let defaultGetStoreFunc;
|
|
1607
909
|
function defaultGetStore() {
|
|
@@ -1739,6 +1041,7 @@ class Connection {
|
|
|
1739
1041
|
}
|
|
1740
1042
|
class SseModuleProvider {
|
|
1741
1043
|
#config;
|
|
1044
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1742
1045
|
#connections = {};
|
|
1743
1046
|
constructor(config) {
|
|
1744
1047
|
this.#config = config;
|
|
@@ -1795,9 +1098,11 @@ class SseConfigurator {
|
|
|
1795
1098
|
return { endpoints: this.#endpoints };
|
|
1796
1099
|
}
|
|
1797
1100
|
}
|
|
1101
|
+
const version = "0.0.2";
|
|
1798
1102
|
const moduleKey = "sse";
|
|
1799
1103
|
const module$1 = {
|
|
1800
1104
|
name: moduleKey,
|
|
1105
|
+
version: new SemanticVersion(version),
|
|
1801
1106
|
configure: () => new SseConfigurator(),
|
|
1802
1107
|
initialize: async (init) => {
|
|
1803
1108
|
const config = await init.config.createConfig(init);
|
|
@@ -2090,29 +1395,18 @@ function printValue(value, quoteStrings) {
|
|
|
2090
1395
|
function toArray(value) {
|
|
2091
1396
|
return value == null ? [] : [].concat(value);
|
|
2092
1397
|
}
|
|
2093
|
-
let _Symbol$toStringTag;
|
|
1398
|
+
let _Symbol$toStringTag, _Symbol$hasInstance, _Symbol$toStringTag2;
|
|
2094
1399
|
let strReg = /\$\{\s*(\w+)\s*\}/g;
|
|
2095
1400
|
_Symbol$toStringTag = Symbol.toStringTag;
|
|
2096
|
-
class
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
path
|
|
2101
|
-
});
|
|
2102
|
-
if (typeof message === "string") return message.replace(strReg, (_, key) => printValue(params[key]));
|
|
2103
|
-
if (typeof message === "function") return message(params);
|
|
2104
|
-
return message;
|
|
2105
|
-
}
|
|
2106
|
-
static isError(err) {
|
|
2107
|
-
return err && err.name === "ValidationError";
|
|
2108
|
-
}
|
|
2109
|
-
constructor(errorOrErrors, value, field, type, disableStack) {
|
|
2110
|
-
super();
|
|
1401
|
+
class ValidationErrorNoStack {
|
|
1402
|
+
constructor(errorOrErrors, value, field, type) {
|
|
1403
|
+
this.name = void 0;
|
|
1404
|
+
this.message = void 0;
|
|
2111
1405
|
this.value = void 0;
|
|
2112
1406
|
this.path = void 0;
|
|
2113
1407
|
this.type = void 0;
|
|
2114
|
-
this.errors = void 0;
|
|
2115
1408
|
this.params = void 0;
|
|
1409
|
+
this.errors = void 0;
|
|
2116
1410
|
this.inner = void 0;
|
|
2117
1411
|
this[_Symbol$toStringTag] = "Error";
|
|
2118
1412
|
this.name = "ValidationError";
|
|
@@ -2131,7 +1425,50 @@ class ValidationError extends Error {
|
|
|
2131
1425
|
}
|
|
2132
1426
|
});
|
|
2133
1427
|
this.message = this.errors.length > 1 ? `${this.errors.length} errors occurred` : this.errors[0];
|
|
2134
|
-
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
_Symbol$hasInstance = Symbol.hasInstance;
|
|
1431
|
+
_Symbol$toStringTag2 = Symbol.toStringTag;
|
|
1432
|
+
class ValidationError extends Error {
|
|
1433
|
+
static formatError(message, params) {
|
|
1434
|
+
const path = params.label || params.path || "this";
|
|
1435
|
+
params = Object.assign({}, params, {
|
|
1436
|
+
path,
|
|
1437
|
+
originalPath: params.path
|
|
1438
|
+
});
|
|
1439
|
+
if (typeof message === "string") return message.replace(strReg, (_, key) => printValue(params[key]));
|
|
1440
|
+
if (typeof message === "function") return message(params);
|
|
1441
|
+
return message;
|
|
1442
|
+
}
|
|
1443
|
+
static isError(err) {
|
|
1444
|
+
return err && err.name === "ValidationError";
|
|
1445
|
+
}
|
|
1446
|
+
constructor(errorOrErrors, value, field, type, disableStack) {
|
|
1447
|
+
const errorNoStack = new ValidationErrorNoStack(errorOrErrors, value, field, type);
|
|
1448
|
+
if (disableStack) {
|
|
1449
|
+
return errorNoStack;
|
|
1450
|
+
}
|
|
1451
|
+
super();
|
|
1452
|
+
this.value = void 0;
|
|
1453
|
+
this.path = void 0;
|
|
1454
|
+
this.type = void 0;
|
|
1455
|
+
this.params = void 0;
|
|
1456
|
+
this.errors = [];
|
|
1457
|
+
this.inner = [];
|
|
1458
|
+
this[_Symbol$toStringTag2] = "Error";
|
|
1459
|
+
this.name = errorNoStack.name;
|
|
1460
|
+
this.message = errorNoStack.message;
|
|
1461
|
+
this.type = errorNoStack.type;
|
|
1462
|
+
this.value = errorNoStack.value;
|
|
1463
|
+
this.path = errorNoStack.path;
|
|
1464
|
+
this.errors = errorNoStack.errors;
|
|
1465
|
+
this.inner = errorNoStack.inner;
|
|
1466
|
+
if (Error.captureStackTrace) {
|
|
1467
|
+
Error.captureStackTrace(this, ValidationError);
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
static [_Symbol$hasInstance](inst) {
|
|
1471
|
+
return ValidationErrorNoStack[Symbol.hasInstance](inst) || super[Symbol.hasInstance](inst);
|
|
2135
1472
|
}
|
|
2136
1473
|
}
|
|
2137
1474
|
let mixed = {
|
|
@@ -2159,6 +1496,9 @@ let string = {
|
|
|
2159
1496
|
email: "${path} must be a valid email",
|
|
2160
1497
|
url: "${path} must be a valid URL",
|
|
2161
1498
|
uuid: "${path} must be a valid UUID",
|
|
1499
|
+
datetime: "${path} must be a valid ISO date-time",
|
|
1500
|
+
datetime_precision: "${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",
|
|
1501
|
+
datetime_offset: '${path} must be a valid ISO date-time with UTC "Z" timezone',
|
|
2162
1502
|
trim: "${path} must be a trimmed string",
|
|
2163
1503
|
lowercase: "${path} must be a lowercase string",
|
|
2164
1504
|
uppercase: "${path} must be a upper case string"
|
|
@@ -2180,7 +1520,8 @@ let boolean = {
|
|
|
2180
1520
|
isValue: "${path} field must be ${value}"
|
|
2181
1521
|
};
|
|
2182
1522
|
let object = {
|
|
2183
|
-
noUnknown: "${path} field has unspecified keys: ${unknown}"
|
|
1523
|
+
noUnknown: "${path} field has unspecified keys: ${unknown}",
|
|
1524
|
+
exact: "${path} object contains unknown properties: ${properties}"
|
|
2184
1525
|
};
|
|
2185
1526
|
let array = {
|
|
2186
1527
|
min: "${path} field must have at least ${min} items",
|
|
@@ -2327,20 +1668,21 @@ function createValidation(config) {
|
|
|
2327
1668
|
abortEarly = schema.spec.abortEarly,
|
|
2328
1669
|
disableStackTrace = schema.spec.disableStackTrace
|
|
2329
1670
|
} = options;
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
1671
|
+
const resolveOptions = {
|
|
1672
|
+
value,
|
|
1673
|
+
parent,
|
|
1674
|
+
context
|
|
1675
|
+
};
|
|
2333
1676
|
function createError(overrides = {}) {
|
|
2334
|
-
|
|
2335
|
-
const nextParams = Object.assign({
|
|
1677
|
+
const nextParams = resolveParams(Object.assign({
|
|
2336
1678
|
value,
|
|
2337
1679
|
originalValue,
|
|
2338
1680
|
label: schema.spec.label,
|
|
2339
1681
|
path: overrides.path || path,
|
|
2340
|
-
spec: schema.spec
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
const error = new ValidationError(ValidationError.formatError(overrides.message || message, nextParams), value, nextParams.path, overrides.type || name,
|
|
1682
|
+
spec: schema.spec,
|
|
1683
|
+
disableStackTrace: overrides.disableStackTrace || disableStackTrace
|
|
1684
|
+
}, params, overrides.params), resolveOptions);
|
|
1685
|
+
const error = new ValidationError(ValidationError.formatError(overrides.message || message, nextParams), value, nextParams.path, overrides.type || name, nextParams.disableStackTrace);
|
|
2344
1686
|
error.params = nextParams;
|
|
2345
1687
|
return error;
|
|
2346
1688
|
}
|
|
@@ -2351,7 +1693,9 @@ function createValidation(config) {
|
|
|
2351
1693
|
type: name,
|
|
2352
1694
|
from: options.from,
|
|
2353
1695
|
createError,
|
|
2354
|
-
resolve
|
|
1696
|
+
resolve(item) {
|
|
1697
|
+
return resolveMaybeRef(item, resolveOptions);
|
|
1698
|
+
},
|
|
2355
1699
|
options,
|
|
2356
1700
|
originalValue,
|
|
2357
1701
|
schema
|
|
@@ -2388,6 +1732,16 @@ function createValidation(config) {
|
|
|
2388
1732
|
validate.OPTIONS = config;
|
|
2389
1733
|
return validate;
|
|
2390
1734
|
}
|
|
1735
|
+
function resolveParams(params, options) {
|
|
1736
|
+
if (!params) return params;
|
|
1737
|
+
for (const key of Object.keys(params)) {
|
|
1738
|
+
params[key] = resolveMaybeRef(params[key], options);
|
|
1739
|
+
}
|
|
1740
|
+
return params;
|
|
1741
|
+
}
|
|
1742
|
+
function resolveMaybeRef(item, options) {
|
|
1743
|
+
return Reference.isRef(item) ? item.getValue(options.value, options.parent, options.context) : item;
|
|
1744
|
+
}
|
|
2391
1745
|
function getIn(schema, path, value, context = value) {
|
|
2392
1746
|
let parent, lastPart, lastPartDebug;
|
|
2393
1747
|
if (!path) return {
|
|
@@ -2484,6 +1838,69 @@ function clone(src, seen = /* @__PURE__ */ new Map()) {
|
|
|
2484
1838
|
}
|
|
2485
1839
|
return copy;
|
|
2486
1840
|
}
|
|
1841
|
+
function createStandardPath(path) {
|
|
1842
|
+
if (!(path != null && path.length)) {
|
|
1843
|
+
return void 0;
|
|
1844
|
+
}
|
|
1845
|
+
const segments = [];
|
|
1846
|
+
let currentSegment = "";
|
|
1847
|
+
let inBrackets = false;
|
|
1848
|
+
let inQuotes = false;
|
|
1849
|
+
for (let i = 0; i < path.length; i++) {
|
|
1850
|
+
const char = path[i];
|
|
1851
|
+
if (char === "[" && !inQuotes) {
|
|
1852
|
+
if (currentSegment) {
|
|
1853
|
+
segments.push(...currentSegment.split(".").filter(Boolean));
|
|
1854
|
+
currentSegment = "";
|
|
1855
|
+
}
|
|
1856
|
+
inBrackets = true;
|
|
1857
|
+
continue;
|
|
1858
|
+
}
|
|
1859
|
+
if (char === "]" && !inQuotes) {
|
|
1860
|
+
if (currentSegment) {
|
|
1861
|
+
if (/^\d+$/.test(currentSegment)) {
|
|
1862
|
+
segments.push(currentSegment);
|
|
1863
|
+
} else {
|
|
1864
|
+
segments.push(currentSegment.replace(/^"|"$/g, ""));
|
|
1865
|
+
}
|
|
1866
|
+
currentSegment = "";
|
|
1867
|
+
}
|
|
1868
|
+
inBrackets = false;
|
|
1869
|
+
continue;
|
|
1870
|
+
}
|
|
1871
|
+
if (char === '"') {
|
|
1872
|
+
inQuotes = !inQuotes;
|
|
1873
|
+
continue;
|
|
1874
|
+
}
|
|
1875
|
+
if (char === "." && !inBrackets && !inQuotes) {
|
|
1876
|
+
if (currentSegment) {
|
|
1877
|
+
segments.push(currentSegment);
|
|
1878
|
+
currentSegment = "";
|
|
1879
|
+
}
|
|
1880
|
+
continue;
|
|
1881
|
+
}
|
|
1882
|
+
currentSegment += char;
|
|
1883
|
+
}
|
|
1884
|
+
if (currentSegment) {
|
|
1885
|
+
segments.push(...currentSegment.split(".").filter(Boolean));
|
|
1886
|
+
}
|
|
1887
|
+
return segments;
|
|
1888
|
+
}
|
|
1889
|
+
function createStandardIssues(error, parentPath) {
|
|
1890
|
+
const path = parentPath ? `${parentPath}.${error.path}` : error.path;
|
|
1891
|
+
return error.errors.map((err) => ({
|
|
1892
|
+
message: err,
|
|
1893
|
+
path: createStandardPath(path)
|
|
1894
|
+
}));
|
|
1895
|
+
}
|
|
1896
|
+
function issuesFromValidationError(error, parentPath) {
|
|
1897
|
+
var _error$inner;
|
|
1898
|
+
if (!((_error$inner = error.inner) != null && _error$inner.length) && error.errors.length) {
|
|
1899
|
+
return createStandardIssues(error, parentPath);
|
|
1900
|
+
}
|
|
1901
|
+
const path = parentPath ? `${parentPath}.${error.path}` : error.path;
|
|
1902
|
+
return error.inner.flatMap((err) => issuesFromValidationError(err, path));
|
|
1903
|
+
}
|
|
2487
1904
|
class Schema {
|
|
2488
1905
|
constructor(options) {
|
|
2489
1906
|
this.type = void 0;
|
|
@@ -2613,9 +2030,11 @@ class Schema {
|
|
|
2613
2030
|
* Run the configured transform pipeline over an input value.
|
|
2614
2031
|
*/
|
|
2615
2032
|
cast(value, options = {}) {
|
|
2616
|
-
let resolvedSchema = this.resolve(Object.assign({
|
|
2033
|
+
let resolvedSchema = this.resolve(Object.assign({}, options, {
|
|
2617
2034
|
value
|
|
2618
|
-
|
|
2035
|
+
// parent: options.parent,
|
|
2036
|
+
// context: options.context,
|
|
2037
|
+
}));
|
|
2619
2038
|
let allowOptionality = options.assert === "ignore-optionality";
|
|
2620
2039
|
let result = resolvedSchema._cast(value, options);
|
|
2621
2040
|
if (options.assert !== false && !resolvedSchema.isType(result)) {
|
|
@@ -2632,7 +2051,7 @@ attempted value: ${formattedValue}
|
|
|
2632
2051
|
return result;
|
|
2633
2052
|
}
|
|
2634
2053
|
_cast(rawValue, options) {
|
|
2635
|
-
let value = rawValue === void 0 ? rawValue : this.transforms.reduce((prevValue, fn) => fn.call(this, prevValue, rawValue, this), rawValue);
|
|
2054
|
+
let value = rawValue === void 0 ? rawValue : this.transforms.reduce((prevValue, fn) => fn.call(this, prevValue, rawValue, this, options), rawValue);
|
|
2636
2055
|
if (value === void 0) {
|
|
2637
2056
|
value = this.getDefault(options);
|
|
2638
2057
|
}
|
|
@@ -2745,7 +2164,7 @@ attempted value: ${formattedValue}
|
|
|
2745
2164
|
key: void 0,
|
|
2746
2165
|
// index: undefined,
|
|
2747
2166
|
[isIndex ? "index" : "key"]: k,
|
|
2748
|
-
path: isIndex || k.includes(".") ? `${parentPath || ""}[${
|
|
2167
|
+
path: isIndex || k.includes(".") ? `${parentPath || ""}[${isIndex ? k : `"${k}"`}]` : (parentPath ? `${parentPath}.` : "") + key
|
|
2749
2168
|
});
|
|
2750
2169
|
return (_, panic, next) => this.resolve(testOptions)._validate(value, testOptions, panic, next);
|
|
2751
2170
|
}
|
|
@@ -3027,13 +2446,41 @@ attempted value: ${formattedValue}
|
|
|
3027
2446
|
type: next.type,
|
|
3028
2447
|
oneOf: next._whitelist.describe(),
|
|
3029
2448
|
notOneOf: next._blacklist.describe(),
|
|
3030
|
-
tests: next.tests.map((fn) =>
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
2449
|
+
tests: next.tests.filter((n, idx, list) => list.findIndex((c) => c.OPTIONS.name === n.OPTIONS.name) === idx).map((fn) => {
|
|
2450
|
+
const params = fn.OPTIONS.params && options ? resolveParams(Object.assign({}, fn.OPTIONS.params), options) : fn.OPTIONS.params;
|
|
2451
|
+
return {
|
|
2452
|
+
name: fn.OPTIONS.name,
|
|
2453
|
+
params
|
|
2454
|
+
};
|
|
2455
|
+
})
|
|
3034
2456
|
};
|
|
3035
2457
|
return description;
|
|
3036
2458
|
}
|
|
2459
|
+
get ["~standard"]() {
|
|
2460
|
+
const schema = this;
|
|
2461
|
+
const standard = {
|
|
2462
|
+
version: 1,
|
|
2463
|
+
vendor: "yup",
|
|
2464
|
+
async validate(value) {
|
|
2465
|
+
try {
|
|
2466
|
+
const result = await schema.validate(value, {
|
|
2467
|
+
abortEarly: false
|
|
2468
|
+
});
|
|
2469
|
+
return {
|
|
2470
|
+
value: result
|
|
2471
|
+
};
|
|
2472
|
+
} catch (err) {
|
|
2473
|
+
if (err instanceof ValidationError) {
|
|
2474
|
+
return {
|
|
2475
|
+
issues: issuesFromValidationError(err)
|
|
2476
|
+
};
|
|
2477
|
+
}
|
|
2478
|
+
throw err;
|
|
2479
|
+
}
|
|
2480
|
+
}
|
|
2481
|
+
};
|
|
2482
|
+
return standard;
|
|
2483
|
+
}
|
|
3037
2484
|
}
|
|
3038
2485
|
Schema.prototype.__isYupSchema__ = true;
|
|
3039
2486
|
for (const method of ["validate", "validateSync"]) Schema.prototype[`${method}At`] = function(path, value, options = {}) {
|
|
@@ -3062,8 +2509,8 @@ class BooleanSchema extends Schema {
|
|
|
3062
2509
|
}
|
|
3063
2510
|
});
|
|
3064
2511
|
this.withMutation(() => {
|
|
3065
|
-
this.transform((value, _raw
|
|
3066
|
-
if (
|
|
2512
|
+
this.transform((value, _raw) => {
|
|
2513
|
+
if (this.spec.coerce && !this.isType(value)) {
|
|
3067
2514
|
if (/^(true|1)$/i.test(String(value))) return true;
|
|
3068
2515
|
if (/^(false|0)$/i.test(String(value))) return false;
|
|
3069
2516
|
}
|
|
@@ -3123,6 +2570,45 @@ class BooleanSchema extends Schema {
|
|
|
3123
2570
|
}
|
|
3124
2571
|
}
|
|
3125
2572
|
create$7.prototype = BooleanSchema.prototype;
|
|
2573
|
+
const isoReg = /^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;
|
|
2574
|
+
function parseIsoDate(date2) {
|
|
2575
|
+
const struct = parseDateStruct(date2);
|
|
2576
|
+
if (!struct) return Date.parse ? Date.parse(date2) : Number.NaN;
|
|
2577
|
+
if (struct.z === void 0 && struct.plusMinus === void 0) {
|
|
2578
|
+
return new Date(struct.year, struct.month, struct.day, struct.hour, struct.minute, struct.second, struct.millisecond).valueOf();
|
|
2579
|
+
}
|
|
2580
|
+
let totalMinutesOffset = 0;
|
|
2581
|
+
if (struct.z !== "Z" && struct.plusMinus !== void 0) {
|
|
2582
|
+
totalMinutesOffset = struct.hourOffset * 60 + struct.minuteOffset;
|
|
2583
|
+
if (struct.plusMinus === "+") totalMinutesOffset = 0 - totalMinutesOffset;
|
|
2584
|
+
}
|
|
2585
|
+
return Date.UTC(struct.year, struct.month, struct.day, struct.hour, struct.minute + totalMinutesOffset, struct.second, struct.millisecond);
|
|
2586
|
+
}
|
|
2587
|
+
function parseDateStruct(date2) {
|
|
2588
|
+
var _regexResult$7$length, _regexResult$;
|
|
2589
|
+
const regexResult = isoReg.exec(date2);
|
|
2590
|
+
if (!regexResult) return null;
|
|
2591
|
+
return {
|
|
2592
|
+
year: toNumber(regexResult[1]),
|
|
2593
|
+
month: toNumber(regexResult[2], 1) - 1,
|
|
2594
|
+
day: toNumber(regexResult[3], 1),
|
|
2595
|
+
hour: toNumber(regexResult[4]),
|
|
2596
|
+
minute: toNumber(regexResult[5]),
|
|
2597
|
+
second: toNumber(regexResult[6]),
|
|
2598
|
+
millisecond: regexResult[7] ? (
|
|
2599
|
+
// allow arbitrary sub-second precision beyond milliseconds
|
|
2600
|
+
toNumber(regexResult[7].substring(0, 3))
|
|
2601
|
+
) : 0,
|
|
2602
|
+
precision: (_regexResult$7$length = (_regexResult$ = regexResult[7]) == null ? void 0 : _regexResult$.length) != null ? _regexResult$7$length : void 0,
|
|
2603
|
+
z: regexResult[8] || void 0,
|
|
2604
|
+
plusMinus: regexResult[9] || void 0,
|
|
2605
|
+
hourOffset: toNumber(regexResult[10]),
|
|
2606
|
+
minuteOffset: toNumber(regexResult[11])
|
|
2607
|
+
};
|
|
2608
|
+
}
|
|
2609
|
+
function toNumber(str, defaultValue = 0) {
|
|
2610
|
+
return Number(str) || defaultValue;
|
|
2611
|
+
}
|
|
3126
2612
|
let rEmail = (
|
|
3127
2613
|
// eslint-disable-next-line
|
|
3128
2614
|
/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/
|
|
@@ -3132,6 +2618,10 @@ let rUrl = (
|
|
|
3132
2618
|
/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i
|
|
3133
2619
|
);
|
|
3134
2620
|
let rUUID = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
2621
|
+
let yearMonthDay = "^\\d{4}-\\d{2}-\\d{2}";
|
|
2622
|
+
let hourMinuteSecond = "\\d{2}:\\d{2}:\\d{2}";
|
|
2623
|
+
let zOrOffset = "(([+-]\\d{2}(:?\\d{2})?)|Z)";
|
|
2624
|
+
let rIsoDateTime = new RegExp(`${yearMonthDay}T${hourMinuteSecond}(\\.\\d+)?${zOrOffset}$`);
|
|
3135
2625
|
let isTrimmed = (value) => isAbsent(value) || value === value.trim();
|
|
3136
2626
|
let objStringTag = {}.toString();
|
|
3137
2627
|
function create$6() {
|
|
@@ -3147,8 +2637,8 @@ class StringSchema extends Schema {
|
|
|
3147
2637
|
}
|
|
3148
2638
|
});
|
|
3149
2639
|
this.withMutation(() => {
|
|
3150
|
-
this.transform((value, _raw
|
|
3151
|
-
if (!
|
|
2640
|
+
this.transform((value, _raw) => {
|
|
2641
|
+
if (!this.spec.coerce || this.isType(value)) return value;
|
|
3152
2642
|
if (Array.isArray(value)) return value;
|
|
3153
2643
|
const strValue = value != null && value.toString ? value.toString() : value;
|
|
3154
2644
|
if (strValue === objStringTag) return value;
|
|
@@ -3258,6 +2748,53 @@ class StringSchema extends Schema {
|
|
|
3258
2748
|
excludeEmptyString: false
|
|
3259
2749
|
});
|
|
3260
2750
|
}
|
|
2751
|
+
datetime(options) {
|
|
2752
|
+
let message = "";
|
|
2753
|
+
let allowOffset;
|
|
2754
|
+
let precision;
|
|
2755
|
+
if (options) {
|
|
2756
|
+
if (typeof options === "object") {
|
|
2757
|
+
({
|
|
2758
|
+
message = "",
|
|
2759
|
+
allowOffset = false,
|
|
2760
|
+
precision = void 0
|
|
2761
|
+
} = options);
|
|
2762
|
+
} else {
|
|
2763
|
+
message = options;
|
|
2764
|
+
}
|
|
2765
|
+
}
|
|
2766
|
+
return this.matches(rIsoDateTime, {
|
|
2767
|
+
name: "datetime",
|
|
2768
|
+
message: message || string.datetime,
|
|
2769
|
+
excludeEmptyString: true
|
|
2770
|
+
}).test({
|
|
2771
|
+
name: "datetime_offset",
|
|
2772
|
+
message: message || string.datetime_offset,
|
|
2773
|
+
params: {
|
|
2774
|
+
allowOffset
|
|
2775
|
+
},
|
|
2776
|
+
skipAbsent: true,
|
|
2777
|
+
test: (value) => {
|
|
2778
|
+
if (!value || allowOffset) return true;
|
|
2779
|
+
const struct = parseDateStruct(value);
|
|
2780
|
+
if (!struct) return false;
|
|
2781
|
+
return !!struct.z;
|
|
2782
|
+
}
|
|
2783
|
+
}).test({
|
|
2784
|
+
name: "datetime_precision",
|
|
2785
|
+
message: message || string.datetime_precision,
|
|
2786
|
+
params: {
|
|
2787
|
+
precision
|
|
2788
|
+
},
|
|
2789
|
+
skipAbsent: true,
|
|
2790
|
+
test: (value) => {
|
|
2791
|
+
if (!value || precision == void 0) return true;
|
|
2792
|
+
const struct = parseDateStruct(value);
|
|
2793
|
+
if (!struct) return false;
|
|
2794
|
+
return struct.precision === precision;
|
|
2795
|
+
}
|
|
2796
|
+
});
|
|
2797
|
+
}
|
|
3261
2798
|
//-- transforms --
|
|
3262
2799
|
ensure() {
|
|
3263
2800
|
return this.default("").transform((val) => val === null ? "" : val);
|
|
@@ -3289,39 +2826,6 @@ class StringSchema extends Schema {
|
|
|
3289
2826
|
}
|
|
3290
2827
|
}
|
|
3291
2828
|
create$6.prototype = StringSchema.prototype;
|
|
3292
|
-
const isoReg = /^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;
|
|
3293
|
-
function toNumber(str, defaultValue = 0) {
|
|
3294
|
-
return Number(str) || defaultValue;
|
|
3295
|
-
}
|
|
3296
|
-
function parseIsoDate(date2) {
|
|
3297
|
-
const regexResult = isoReg.exec(date2);
|
|
3298
|
-
if (!regexResult) return Date.parse ? Date.parse(date2) : Number.NaN;
|
|
3299
|
-
const struct = {
|
|
3300
|
-
year: toNumber(regexResult[1]),
|
|
3301
|
-
month: toNumber(regexResult[2], 1) - 1,
|
|
3302
|
-
day: toNumber(regexResult[3], 1),
|
|
3303
|
-
hour: toNumber(regexResult[4]),
|
|
3304
|
-
minute: toNumber(regexResult[5]),
|
|
3305
|
-
second: toNumber(regexResult[6]),
|
|
3306
|
-
millisecond: regexResult[7] ? (
|
|
3307
|
-
// allow arbitrary sub-second precision beyond milliseconds
|
|
3308
|
-
toNumber(regexResult[7].substring(0, 3))
|
|
3309
|
-
) : 0,
|
|
3310
|
-
z: regexResult[8] || void 0,
|
|
3311
|
-
plusMinus: regexResult[9] || void 0,
|
|
3312
|
-
hourOffset: toNumber(regexResult[10]),
|
|
3313
|
-
minuteOffset: toNumber(regexResult[11])
|
|
3314
|
-
};
|
|
3315
|
-
if (struct.z === void 0 && struct.plusMinus === void 0) {
|
|
3316
|
-
return new Date(struct.year, struct.month, struct.day, struct.hour, struct.minute, struct.second, struct.millisecond).valueOf();
|
|
3317
|
-
}
|
|
3318
|
-
let totalMinutesOffset = 0;
|
|
3319
|
-
if (struct.z !== "Z" && struct.plusMinus !== void 0) {
|
|
3320
|
-
totalMinutesOffset = struct.hourOffset * 60 + struct.minuteOffset;
|
|
3321
|
-
if (struct.plusMinus === "+") totalMinutesOffset = 0 - totalMinutesOffset;
|
|
3322
|
-
}
|
|
3323
|
-
return Date.UTC(struct.year, struct.month, struct.day, struct.hour, struct.minute + totalMinutesOffset, struct.second, struct.millisecond);
|
|
3324
|
-
}
|
|
3325
2829
|
let invalidDate = /* @__PURE__ */ new Date("");
|
|
3326
2830
|
let isDate = (obj) => Object.prototype.toString.call(obj) === "[object Date]";
|
|
3327
2831
|
class DateSchema extends Schema {
|
|
@@ -3333,8 +2837,8 @@ class DateSchema extends Schema {
|
|
|
3333
2837
|
}
|
|
3334
2838
|
});
|
|
3335
2839
|
this.withMutation(() => {
|
|
3336
|
-
this.transform((value, _raw
|
|
3337
|
-
if (!
|
|
2840
|
+
this.transform((value, _raw) => {
|
|
2841
|
+
if (!this.spec.coerce || this.isType(value) || value === null) return value;
|
|
3338
2842
|
value = parseIsoDate(value);
|
|
3339
2843
|
return !isNaN(value) ? new Date(value) : DateSchema.INVALID_DATE;
|
|
3340
2844
|
});
|
|
@@ -3416,7 +2920,7 @@ function sortByKeyOrder(keys) {
|
|
|
3416
2920
|
return findIndex(keys, a) - findIndex(keys, b);
|
|
3417
2921
|
};
|
|
3418
2922
|
}
|
|
3419
|
-
const parseJson = (value, _,
|
|
2923
|
+
const parseJson = (value, _, schema) => {
|
|
3420
2924
|
if (typeof value !== "string") {
|
|
3421
2925
|
return value;
|
|
3422
2926
|
}
|
|
@@ -3425,7 +2929,7 @@ const parseJson = (value, _, ctx) => {
|
|
|
3425
2929
|
parsed = JSON.parse(value);
|
|
3426
2930
|
} catch (err) {
|
|
3427
2931
|
}
|
|
3428
|
-
return
|
|
2932
|
+
return schema.isType(parsed) ? parsed : value;
|
|
3429
2933
|
};
|
|
3430
2934
|
function deepPartial(schema) {
|
|
3431
2935
|
if ("fields" in schema) {
|
|
@@ -3501,9 +3005,9 @@ class ObjectSchema extends Schema {
|
|
|
3501
3005
|
for (const prop of props) {
|
|
3502
3006
|
let field = fields[prop];
|
|
3503
3007
|
let exists = prop in value;
|
|
3008
|
+
let inputValue = value[prop];
|
|
3504
3009
|
if (field) {
|
|
3505
3010
|
let fieldValue;
|
|
3506
|
-
let inputValue = value[prop];
|
|
3507
3011
|
innerOptions.path = (options.path ? `${options.path}.` : "") + prop;
|
|
3508
3012
|
field = field.resolve({
|
|
3509
3013
|
value: inputValue,
|
|
@@ -3516,17 +3020,14 @@ class ObjectSchema extends Schema {
|
|
|
3516
3020
|
isChanged = isChanged || prop in value;
|
|
3517
3021
|
continue;
|
|
3518
3022
|
}
|
|
3519
|
-
fieldValue = !options.__validating || !strict ? (
|
|
3520
|
-
// TODO: use _cast, this is double resolving
|
|
3521
|
-
field.cast(value[prop], innerOptions)
|
|
3522
|
-
) : value[prop];
|
|
3023
|
+
fieldValue = !options.__validating || !strict ? field.cast(inputValue, innerOptions) : inputValue;
|
|
3523
3024
|
if (fieldValue !== void 0) {
|
|
3524
3025
|
intermediateValue[prop] = fieldValue;
|
|
3525
3026
|
}
|
|
3526
3027
|
} else if (exists && !strip) {
|
|
3527
|
-
intermediateValue[prop] =
|
|
3028
|
+
intermediateValue[prop] = inputValue;
|
|
3528
3029
|
}
|
|
3529
|
-
if (exists !== prop in intermediateValue || intermediateValue[prop] !==
|
|
3030
|
+
if (exists !== prop in intermediateValue || intermediateValue[prop] !== inputValue) {
|
|
3530
3031
|
isChanged = true;
|
|
3531
3032
|
}
|
|
3532
3033
|
}
|
|
@@ -3677,6 +3178,30 @@ class ObjectSchema extends Schema {
|
|
|
3677
3178
|
json() {
|
|
3678
3179
|
return this.transform(parseJson);
|
|
3679
3180
|
}
|
|
3181
|
+
/**
|
|
3182
|
+
* Similar to `noUnknown` but only validates that an object is the right shape without stripping the unknown keys
|
|
3183
|
+
*/
|
|
3184
|
+
exact(message) {
|
|
3185
|
+
return this.test({
|
|
3186
|
+
name: "exact",
|
|
3187
|
+
exclusive: true,
|
|
3188
|
+
message: message || object.exact,
|
|
3189
|
+
test(value) {
|
|
3190
|
+
if (value == null) return true;
|
|
3191
|
+
const unknownKeys = unknown(this.schema, value);
|
|
3192
|
+
return unknownKeys.length === 0 || this.createError({
|
|
3193
|
+
params: {
|
|
3194
|
+
properties: unknownKeys.join(", ")
|
|
3195
|
+
}
|
|
3196
|
+
});
|
|
3197
|
+
}
|
|
3198
|
+
});
|
|
3199
|
+
}
|
|
3200
|
+
stripUnknown() {
|
|
3201
|
+
return this.clone({
|
|
3202
|
+
noUnknown: true
|
|
3203
|
+
});
|
|
3204
|
+
}
|
|
3680
3205
|
noUnknown(noAllow = true, message = object.noUnknown) {
|
|
3681
3206
|
if (typeof noAllow !== "boolean") {
|
|
3682
3207
|
message = noAllow;
|
|
@@ -3763,7 +3288,11 @@ class ArraySchema extends Schema {
|
|
|
3763
3288
|
let isChanged = false;
|
|
3764
3289
|
const castArray = value.map((v, idx) => {
|
|
3765
3290
|
const castElement = this.innerType.cast(v, Object.assign({}, _opts, {
|
|
3766
|
-
path: `${_opts.path || ""}[${idx}]
|
|
3291
|
+
path: `${_opts.path || ""}[${idx}]`,
|
|
3292
|
+
parent: value,
|
|
3293
|
+
originalValue: v,
|
|
3294
|
+
value: v,
|
|
3295
|
+
index: idx
|
|
3767
3296
|
}));
|
|
3768
3297
|
if (castElement !== v) {
|
|
3769
3298
|
isChanged = true;
|
|
@@ -4182,6 +3711,7 @@ ${error.join("\n")}`);
|
|
|
4182
3711
|
});
|
|
4183
3712
|
enableNavigation(config);
|
|
4184
3713
|
enableSse(config, "activity");
|
|
3714
|
+
enableSse(config, "roma-alarm");
|
|
4185
3715
|
config.onConfigured(() => {
|
|
4186
3716
|
console.info("Fusion config done");
|
|
4187
3717
|
});
|
|
@@ -4241,16 +3771,13 @@ const HttpErrorViewer = ({ error }) => {
|
|
|
4241
3771
|
};
|
|
4242
3772
|
const useCustomClient = () => {
|
|
4243
3773
|
const client = useHttpClient("portal");
|
|
4244
|
-
return async ({
|
|
4245
|
-
url,
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
data,
|
|
4250
|
-
signal
|
|
4251
|
-
}) => {
|
|
3774
|
+
return async (uriOrOptions, options) => {
|
|
3775
|
+
const { url, method, params, headers, signal, body } = {
|
|
3776
|
+
url: uriOrOptions,
|
|
3777
|
+
...options
|
|
3778
|
+
};
|
|
4252
3779
|
const response = await client.fetch(
|
|
4253
|
-
`${url}` + new URLSearchParams(params),
|
|
3780
|
+
`${url ?? uriOrOptions}` + new URLSearchParams(params),
|
|
4254
3781
|
{
|
|
4255
3782
|
method,
|
|
4256
3783
|
// Request method
|
|
@@ -4258,8 +3785,7 @@ const useCustomClient = () => {
|
|
|
4258
3785
|
// Abort signal
|
|
4259
3786
|
headers,
|
|
4260
3787
|
// Additional headers
|
|
4261
|
-
|
|
4262
|
-
// Add body if data is provided
|
|
3788
|
+
body
|
|
4263
3789
|
}
|
|
4264
3790
|
);
|
|
4265
3791
|
let value;
|
|
@@ -4292,13 +3818,15 @@ let HttpError$1 = class HttpError extends Error {
|
|
|
4292
3818
|
this.response = response;
|
|
4293
3819
|
}
|
|
4294
3820
|
};
|
|
3821
|
+
const getGetSettingByUserAndIdUrl = (userId, id) => {
|
|
3822
|
+
return `/api/settings/user/${userId}/id/${id}`;
|
|
3823
|
+
};
|
|
4295
3824
|
const useGetSettingByUserAndIdHook = () => {
|
|
4296
|
-
const
|
|
4297
|
-
return (userId, id,
|
|
4298
|
-
return
|
|
4299
|
-
|
|
4300
|
-
method: "
|
|
4301
|
-
signal
|
|
3825
|
+
const customFetcher = useCustomClient();
|
|
3826
|
+
return (userId, id, options) => {
|
|
3827
|
+
return customFetcher(getGetSettingByUserAndIdUrl(userId, id), {
|
|
3828
|
+
...options,
|
|
3829
|
+
method: "GET"
|
|
4302
3830
|
});
|
|
4303
3831
|
};
|
|
4304
3832
|
};
|
|
@@ -4306,10 +3834,10 @@ const getGetSettingByUserAndIdQueryKey = (userId, id) => {
|
|
|
4306
3834
|
return [`/api/settings/user/${userId}/id/${id}`];
|
|
4307
3835
|
};
|
|
4308
3836
|
const useGetSettingByUserAndIdQueryOptions = (userId, id, options) => {
|
|
4309
|
-
const { query: queryOptions } = options ?? {};
|
|
3837
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
4310
3838
|
const queryKey = queryOptions?.queryKey ?? getGetSettingByUserAndIdQueryKey(userId, id);
|
|
4311
3839
|
const getSettingByUserAndId = useGetSettingByUserAndIdHook();
|
|
4312
|
-
const queryFn = ({ signal }) => getSettingByUserAndId(userId, id, signal);
|
|
3840
|
+
const queryFn = ({ signal }) => getSettingByUserAndId(userId, id, { signal, ...requestOptions });
|
|
4313
3841
|
return {
|
|
4314
3842
|
queryKey,
|
|
4315
3843
|
queryFn,
|
|
@@ -4317,69 +3845,82 @@ const useGetSettingByUserAndIdQueryOptions = (userId, id, options) => {
|
|
|
4317
3845
|
...queryOptions
|
|
4318
3846
|
};
|
|
4319
3847
|
};
|
|
4320
|
-
|
|
3848
|
+
function useGetSettingByUserAndId(userId, id, options, queryClient) {
|
|
4321
3849
|
const queryOptions = useGetSettingByUserAndIdQueryOptions(
|
|
4322
3850
|
userId,
|
|
4323
3851
|
id,
|
|
4324
3852
|
options
|
|
4325
3853
|
);
|
|
4326
|
-
const query = useQuery(queryOptions);
|
|
4327
|
-
query
|
|
4328
|
-
|
|
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}`;
|
|
4329
3859
|
};
|
|
4330
3860
|
const useUpdateByUserIdAndIdHook = () => {
|
|
4331
|
-
const
|
|
4332
|
-
return (userId, id, settingDto) => {
|
|
4333
|
-
return
|
|
4334
|
-
|
|
4335
|
-
method: "
|
|
4336
|
-
headers: { "Content-Type": "application/json" },
|
|
4337
|
-
|
|
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)
|
|
4338
3868
|
});
|
|
4339
3869
|
};
|
|
4340
3870
|
};
|
|
4341
3871
|
const useUpdateByUserIdAndIdMutationOptions = (options) => {
|
|
4342
|
-
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 };
|
|
4343
3874
|
const updateByUserIdAndId = useUpdateByUserIdAndIdHook();
|
|
4344
3875
|
const mutationFn = (props) => {
|
|
4345
3876
|
const { userId, id, data } = props ?? {};
|
|
4346
|
-
return updateByUserIdAndId(userId, id, data);
|
|
3877
|
+
return updateByUserIdAndId(userId, id, data, requestOptions);
|
|
4347
3878
|
};
|
|
4348
3879
|
return { mutationFn, ...mutationOptions };
|
|
4349
3880
|
};
|
|
4350
|
-
const useUpdateByUserIdAndId = (options) => {
|
|
4351
|
-
|
|
4352
|
-
|
|
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}`;
|
|
4353
3889
|
};
|
|
4354
3890
|
const useDeletePrivateSettingByIdHook = () => {
|
|
4355
|
-
const
|
|
4356
|
-
return (userId, id) => {
|
|
4357
|
-
return
|
|
4358
|
-
|
|
4359
|
-
method: "
|
|
3891
|
+
const customFetcher = useCustomClient();
|
|
3892
|
+
return (userId, id, options) => {
|
|
3893
|
+
return customFetcher(getDeletePrivateSettingByIdUrl(userId, id), {
|
|
3894
|
+
...options,
|
|
3895
|
+
method: "DELETE"
|
|
4360
3896
|
});
|
|
4361
3897
|
};
|
|
4362
3898
|
};
|
|
4363
3899
|
const useDeletePrivateSettingByIdMutationOptions = (options) => {
|
|
4364
|
-
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 };
|
|
4365
3902
|
const deletePrivateSettingById = useDeletePrivateSettingByIdHook();
|
|
4366
3903
|
const mutationFn = (props) => {
|
|
4367
3904
|
const { userId, id } = props ?? {};
|
|
4368
|
-
return deletePrivateSettingById(userId, id);
|
|
3905
|
+
return deletePrivateSettingById(userId, id, requestOptions);
|
|
4369
3906
|
};
|
|
4370
3907
|
return { mutationFn, ...mutationOptions };
|
|
4371
3908
|
};
|
|
4372
|
-
const useDeletePrivateSettingById = (options) => {
|
|
4373
|
-
|
|
4374
|
-
|
|
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}`;
|
|
4375
3917
|
};
|
|
4376
3918
|
const useGetPublicSettingByUserAndIdHook = () => {
|
|
4377
|
-
const
|
|
4378
|
-
return (appShortName, id,
|
|
4379
|
-
return
|
|
4380
|
-
|
|
4381
|
-
method: "
|
|
4382
|
-
signal
|
|
3919
|
+
const customFetcher = useCustomClient();
|
|
3920
|
+
return (appShortName, id, options) => {
|
|
3921
|
+
return customFetcher(getGetPublicSettingByUserAndIdUrl(appShortName, id), {
|
|
3922
|
+
...options,
|
|
3923
|
+
method: "GET"
|
|
4383
3924
|
});
|
|
4384
3925
|
};
|
|
4385
3926
|
};
|
|
@@ -4387,10 +3928,13 @@ const getGetPublicSettingByUserAndIdQueryKey = (appShortName, id) => {
|
|
|
4387
3928
|
return [`/api/settings/application/${appShortName}/id/${id}`];
|
|
4388
3929
|
};
|
|
4389
3930
|
const useGetPublicSettingByUserAndIdQueryOptions = (appShortName, id, options) => {
|
|
4390
|
-
const { query: queryOptions } = options ?? {};
|
|
3931
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
4391
3932
|
const queryKey = queryOptions?.queryKey ?? getGetPublicSettingByUserAndIdQueryKey(appShortName, id);
|
|
4392
3933
|
const getPublicSettingByUserAndId = useGetPublicSettingByUserAndIdHook();
|
|
4393
|
-
const queryFn = ({ signal }) => getPublicSettingByUserAndId(appShortName, id,
|
|
3934
|
+
const queryFn = ({ signal }) => getPublicSettingByUserAndId(appShortName, id, {
|
|
3935
|
+
signal,
|
|
3936
|
+
...requestOptions
|
|
3937
|
+
});
|
|
4394
3938
|
return {
|
|
4395
3939
|
queryKey,
|
|
4396
3940
|
queryFn,
|
|
@@ -4398,69 +3942,90 @@ const useGetPublicSettingByUserAndIdQueryOptions = (appShortName, id, options) =
|
|
|
4398
3942
|
...queryOptions
|
|
4399
3943
|
};
|
|
4400
3944
|
};
|
|
4401
|
-
|
|
3945
|
+
function useGetPublicSettingByUserAndId(appShortName, id, options, queryClient) {
|
|
4402
3946
|
const queryOptions = useGetPublicSettingByUserAndIdQueryOptions(
|
|
4403
3947
|
appShortName,
|
|
4404
3948
|
id,
|
|
4405
3949
|
options
|
|
4406
3950
|
);
|
|
4407
|
-
const query = useQuery(queryOptions);
|
|
4408
|
-
query
|
|
4409
|
-
|
|
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}`;
|
|
4410
3956
|
};
|
|
4411
3957
|
const useUpdatePublicSettingByAppShortNameAndIdHook = () => {
|
|
4412
|
-
const
|
|
4413
|
-
return (appShortName, id, settingDto) => {
|
|
4414
|
-
return
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
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
|
+
);
|
|
4420
3969
|
};
|
|
4421
3970
|
};
|
|
4422
3971
|
const useUpdatePublicSettingByAppShortNameAndIdMutationOptions = (options) => {
|
|
4423
|
-
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 };
|
|
4424
3974
|
const updatePublicSettingByAppShortNameAndId = useUpdatePublicSettingByAppShortNameAndIdHook();
|
|
4425
3975
|
const mutationFn = (props) => {
|
|
4426
3976
|
const { appShortName, id, data } = props ?? {};
|
|
4427
|
-
return updatePublicSettingByAppShortNameAndId(
|
|
3977
|
+
return updatePublicSettingByAppShortNameAndId(
|
|
3978
|
+
appShortName,
|
|
3979
|
+
id,
|
|
3980
|
+
data,
|
|
3981
|
+
requestOptions
|
|
3982
|
+
);
|
|
4428
3983
|
};
|
|
4429
3984
|
return { mutationFn, ...mutationOptions };
|
|
4430
3985
|
};
|
|
4431
|
-
const useUpdatePublicSettingByAppShortNameAndId = (options) => {
|
|
4432
|
-
|
|
4433
|
-
|
|
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}`;
|
|
4434
3994
|
};
|
|
4435
3995
|
const useDeletePublicSettingByIdHook = () => {
|
|
4436
|
-
const
|
|
4437
|
-
return (appShortName, id) => {
|
|
4438
|
-
return
|
|
4439
|
-
|
|
4440
|
-
method: "
|
|
3996
|
+
const customFetcher = useCustomClient();
|
|
3997
|
+
return (appShortName, id, options) => {
|
|
3998
|
+
return customFetcher(getDeletePublicSettingByIdUrl(appShortName, id), {
|
|
3999
|
+
...options,
|
|
4000
|
+
method: "DELETE"
|
|
4441
4001
|
});
|
|
4442
4002
|
};
|
|
4443
4003
|
};
|
|
4444
4004
|
const useDeletePublicSettingByIdMutationOptions = (options) => {
|
|
4445
|
-
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 };
|
|
4446
4007
|
const deletePublicSettingById = useDeletePublicSettingByIdHook();
|
|
4447
4008
|
const mutationFn = (props) => {
|
|
4448
4009
|
const { appShortName, id } = props ?? {};
|
|
4449
|
-
return deletePublicSettingById(appShortName, id);
|
|
4010
|
+
return deletePublicSettingById(appShortName, id, requestOptions);
|
|
4450
4011
|
};
|
|
4451
4012
|
return { mutationFn, ...mutationOptions };
|
|
4452
4013
|
};
|
|
4453
|
-
const useDeletePublicSettingById = (options) => {
|
|
4454
|
-
|
|
4455
|
-
|
|
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}`;
|
|
4456
4022
|
};
|
|
4457
4023
|
const useGetSettingsByUserIdHook = () => {
|
|
4458
|
-
const
|
|
4459
|
-
return (userId,
|
|
4460
|
-
return
|
|
4461
|
-
|
|
4462
|
-
method: "
|
|
4463
|
-
signal
|
|
4024
|
+
const customFetcher = useCustomClient();
|
|
4025
|
+
return (userId, options) => {
|
|
4026
|
+
return customFetcher(getGetSettingsByUserIdUrl(userId), {
|
|
4027
|
+
...options,
|
|
4028
|
+
method: "GET"
|
|
4464
4029
|
});
|
|
4465
4030
|
};
|
|
4466
4031
|
};
|
|
@@ -4468,10 +4033,10 @@ const getGetSettingsByUserIdQueryKey = (userId) => {
|
|
|
4468
4033
|
return [`/api/settings/user/${userId}`];
|
|
4469
4034
|
};
|
|
4470
4035
|
const useGetSettingsByUserIdQueryOptions = (userId, options) => {
|
|
4471
|
-
const { query: queryOptions } = options ?? {};
|
|
4036
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
4472
4037
|
const queryKey = queryOptions?.queryKey ?? getGetSettingsByUserIdQueryKey(userId);
|
|
4473
4038
|
const getSettingsByUserId = useGetSettingsByUserIdHook();
|
|
4474
|
-
const queryFn = ({ signal }) => getSettingsByUserId(userId, signal);
|
|
4039
|
+
const queryFn = ({ signal }) => getSettingsByUserId(userId, { signal, ...requestOptions });
|
|
4475
4040
|
return {
|
|
4476
4041
|
queryKey,
|
|
4477
4042
|
queryFn,
|
|
@@ -4479,43 +4044,50 @@ const useGetSettingsByUserIdQueryOptions = (userId, options) => {
|
|
|
4479
4044
|
...queryOptions
|
|
4480
4045
|
};
|
|
4481
4046
|
};
|
|
4482
|
-
|
|
4047
|
+
function useGetSettingsByUserId(userId, options, queryClient) {
|
|
4483
4048
|
const queryOptions = useGetSettingsByUserIdQueryOptions(userId, options);
|
|
4484
|
-
const query = useQuery(queryOptions);
|
|
4485
|
-
query
|
|
4486
|
-
|
|
4049
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4050
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4051
|
+
}
|
|
4052
|
+
const getCreateSettingByUserIdUrl = (userId) => {
|
|
4053
|
+
return `/api/settings/user/${userId}`;
|
|
4487
4054
|
};
|
|
4488
4055
|
const useCreateSettingByUserIdHook = () => {
|
|
4489
|
-
const
|
|
4490
|
-
return (userId, settingDto) => {
|
|
4491
|
-
return
|
|
4492
|
-
|
|
4493
|
-
method: "
|
|
4494
|
-
headers: { "Content-Type": "application/json" },
|
|
4495
|
-
|
|
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)
|
|
4496
4063
|
});
|
|
4497
4064
|
};
|
|
4498
4065
|
};
|
|
4499
4066
|
const useCreateSettingByUserIdMutationOptions = (options) => {
|
|
4500
|
-
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 };
|
|
4501
4069
|
const createSettingByUserId = useCreateSettingByUserIdHook();
|
|
4502
4070
|
const mutationFn = (props) => {
|
|
4503
4071
|
const { userId, data } = props ?? {};
|
|
4504
|
-
return createSettingByUserId(userId, data);
|
|
4072
|
+
return createSettingByUserId(userId, data, requestOptions);
|
|
4505
4073
|
};
|
|
4506
4074
|
return { mutationFn, ...mutationOptions };
|
|
4507
4075
|
};
|
|
4508
|
-
const useCreateSettingByUserId = (options) => {
|
|
4509
|
-
|
|
4510
|
-
|
|
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}`;
|
|
4511
4084
|
};
|
|
4512
4085
|
const useGetSettingsByAppShortNameHook = () => {
|
|
4513
|
-
const
|
|
4514
|
-
return (appShortName,
|
|
4515
|
-
return
|
|
4516
|
-
|
|
4517
|
-
method: "
|
|
4518
|
-
signal
|
|
4086
|
+
const customFetcher = useCustomClient();
|
|
4087
|
+
return (appShortName, options) => {
|
|
4088
|
+
return customFetcher(getGetSettingsByAppShortNameUrl(appShortName), {
|
|
4089
|
+
...options,
|
|
4090
|
+
method: "GET"
|
|
4519
4091
|
});
|
|
4520
4092
|
};
|
|
4521
4093
|
};
|
|
@@ -4523,10 +4095,10 @@ const getGetSettingsByAppShortNameQueryKey = (appShortName) => {
|
|
|
4523
4095
|
return [`/api/settings/application/${appShortName}`];
|
|
4524
4096
|
};
|
|
4525
4097
|
const useGetSettingsByAppShortNameQueryOptions = (appShortName, options) => {
|
|
4526
|
-
const { query: queryOptions } = options ?? {};
|
|
4098
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
4527
4099
|
const queryKey = queryOptions?.queryKey ?? getGetSettingsByAppShortNameQueryKey(appShortName);
|
|
4528
4100
|
const getSettingsByAppShortName = useGetSettingsByAppShortNameHook();
|
|
4529
|
-
const queryFn = ({ signal }) => getSettingsByAppShortName(appShortName, signal);
|
|
4101
|
+
const queryFn = ({ signal }) => getSettingsByAppShortName(appShortName, { signal, ...requestOptions });
|
|
4530
4102
|
return {
|
|
4531
4103
|
queryKey,
|
|
4532
4104
|
queryFn,
|
|
@@ -4534,125 +4106,146 @@ const useGetSettingsByAppShortNameQueryOptions = (appShortName, options) => {
|
|
|
4534
4106
|
...queryOptions
|
|
4535
4107
|
};
|
|
4536
4108
|
};
|
|
4537
|
-
|
|
4109
|
+
function useGetSettingsByAppShortName(appShortName, options, queryClient) {
|
|
4538
4110
|
const queryOptions = useGetSettingsByAppShortNameQueryOptions(
|
|
4539
4111
|
appShortName,
|
|
4540
4112
|
options
|
|
4541
4113
|
);
|
|
4542
|
-
const query = useQuery(queryOptions);
|
|
4543
|
-
query
|
|
4544
|
-
|
|
4114
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4115
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4116
|
+
}
|
|
4117
|
+
const getCreatePublicSettingByUserIdUrl = (appShortName) => {
|
|
4118
|
+
return `/api/settings/application/${appShortName}`;
|
|
4545
4119
|
};
|
|
4546
4120
|
const useCreatePublicSettingByUserIdHook = () => {
|
|
4547
|
-
const
|
|
4548
|
-
return (appShortName, settingDto) => {
|
|
4549
|
-
return
|
|
4550
|
-
|
|
4551
|
-
method: "
|
|
4552
|
-
headers: { "Content-Type": "application/json" },
|
|
4553
|
-
|
|
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)
|
|
4554
4128
|
});
|
|
4555
4129
|
};
|
|
4556
4130
|
};
|
|
4557
4131
|
const useCreatePublicSettingByUserIdMutationOptions = (options) => {
|
|
4558
|
-
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 };
|
|
4559
4134
|
const createPublicSettingByUserId = useCreatePublicSettingByUserIdHook();
|
|
4560
4135
|
const mutationFn = (props) => {
|
|
4561
4136
|
const { appShortName, data } = props ?? {};
|
|
4562
|
-
return createPublicSettingByUserId(appShortName, data);
|
|
4137
|
+
return createPublicSettingByUserId(appShortName, data, requestOptions);
|
|
4563
4138
|
};
|
|
4564
4139
|
return { mutationFn, ...mutationOptions };
|
|
4565
4140
|
};
|
|
4566
|
-
const useCreatePublicSettingByUserId = (options) => {
|
|
4567
|
-
|
|
4568
|
-
|
|
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`;
|
|
4569
4149
|
};
|
|
4570
4150
|
const useUploadBundleHook = () => {
|
|
4571
|
-
const
|
|
4572
|
-
return (key, uploadBundleBody) => {
|
|
4151
|
+
const customFetcher = useCustomClient();
|
|
4152
|
+
return (key, uploadBundleBody, options) => {
|
|
4573
4153
|
const formData = new FormData();
|
|
4574
|
-
formData.append(
|
|
4575
|
-
return
|
|
4576
|
-
|
|
4577
|
-
method: "
|
|
4578
|
-
|
|
4579
|
-
data: formData
|
|
4154
|
+
formData.append(`bundleFile`, uploadBundleBody.bundleFile);
|
|
4155
|
+
return customFetcher(getUploadBundleUrl(key), {
|
|
4156
|
+
...options,
|
|
4157
|
+
method: "PUT",
|
|
4158
|
+
body: formData
|
|
4580
4159
|
});
|
|
4581
4160
|
};
|
|
4582
4161
|
};
|
|
4583
4162
|
const useUploadBundleMutationOptions = (options) => {
|
|
4584
|
-
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 };
|
|
4585
4165
|
const uploadBundle = useUploadBundleHook();
|
|
4586
4166
|
const mutationFn = (props) => {
|
|
4587
4167
|
const { key, data } = props ?? {};
|
|
4588
|
-
return uploadBundle(key, data);
|
|
4168
|
+
return uploadBundle(key, data, requestOptions);
|
|
4589
4169
|
};
|
|
4590
4170
|
return { mutationFn, ...mutationOptions };
|
|
4591
4171
|
};
|
|
4592
|
-
const useUploadBundle = (options) => {
|
|
4593
|
-
|
|
4594
|
-
|
|
4172
|
+
const useUploadBundle = (options, queryClient) => {
|
|
4173
|
+
return useMutation(useUploadBundleMutationOptions(options), queryClient);
|
|
4174
|
+
};
|
|
4175
|
+
const getGetAllAppsUrl = () => {
|
|
4176
|
+
return `/api/apps`;
|
|
4595
4177
|
};
|
|
4596
4178
|
const useGetAllAppsHook = () => {
|
|
4597
|
-
const
|
|
4598
|
-
return (
|
|
4599
|
-
return
|
|
4179
|
+
const customFetcher = useCustomClient();
|
|
4180
|
+
return (options) => {
|
|
4181
|
+
return customFetcher(getGetAllAppsUrl(), {
|
|
4182
|
+
...options,
|
|
4183
|
+
method: "GET"
|
|
4184
|
+
});
|
|
4600
4185
|
};
|
|
4601
4186
|
};
|
|
4602
4187
|
const getGetAllAppsQueryKey = () => {
|
|
4603
4188
|
return [`/api/apps`];
|
|
4604
4189
|
};
|
|
4605
4190
|
const useGetAllAppsQueryOptions = (options) => {
|
|
4606
|
-
const { query: queryOptions } = options ?? {};
|
|
4191
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
4607
4192
|
const queryKey = queryOptions?.queryKey ?? getGetAllAppsQueryKey();
|
|
4608
4193
|
const getAllApps = useGetAllAppsHook();
|
|
4609
|
-
const queryFn = ({ signal }) => getAllApps(signal);
|
|
4194
|
+
const queryFn = ({ signal }) => getAllApps({ signal, ...requestOptions });
|
|
4610
4195
|
return { queryKey, queryFn, ...queryOptions };
|
|
4611
4196
|
};
|
|
4612
|
-
|
|
4197
|
+
function useGetAllApps(options, queryClient) {
|
|
4613
4198
|
const queryOptions = useGetAllAppsQueryOptions(options);
|
|
4614
|
-
const query = useQuery(queryOptions);
|
|
4615
|
-
query
|
|
4616
|
-
|
|
4199
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4200
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4201
|
+
}
|
|
4202
|
+
const getCreateOrUpdateAppUrl = () => {
|
|
4203
|
+
return `/api/apps`;
|
|
4617
4204
|
};
|
|
4618
4205
|
const useCreateOrUpdateAppHook = () => {
|
|
4619
|
-
const
|
|
4620
|
-
return (appDto) => {
|
|
4621
|
-
return
|
|
4622
|
-
|
|
4623
|
-
method: "
|
|
4624
|
-
headers: { "Content-Type": "application/json" },
|
|
4625
|
-
|
|
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)
|
|
4626
4213
|
});
|
|
4627
4214
|
};
|
|
4628
4215
|
};
|
|
4629
4216
|
const useCreateOrUpdateAppMutationOptions = (options) => {
|
|
4630
|
-
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 };
|
|
4631
4219
|
const createOrUpdateApp = useCreateOrUpdateAppHook();
|
|
4632
4220
|
const mutationFn = (props) => {
|
|
4633
4221
|
const { data } = props ?? {};
|
|
4634
|
-
return createOrUpdateApp(data);
|
|
4222
|
+
return createOrUpdateApp(data, requestOptions);
|
|
4635
4223
|
};
|
|
4636
4224
|
return { mutationFn, ...mutationOptions };
|
|
4637
4225
|
};
|
|
4638
|
-
const useCreateOrUpdateApp = (options) => {
|
|
4639
|
-
|
|
4640
|
-
|
|
4226
|
+
const useCreateOrUpdateApp = (options, queryClient) => {
|
|
4227
|
+
return useMutation(useCreateOrUpdateAppMutationOptions(options), queryClient);
|
|
4228
|
+
};
|
|
4229
|
+
const getGetAppByKeyUrl = (key) => {
|
|
4230
|
+
return `/api/apps/key/${key}`;
|
|
4641
4231
|
};
|
|
4642
4232
|
const useGetAppByKeyHook = () => {
|
|
4643
|
-
const
|
|
4644
|
-
return (key,
|
|
4645
|
-
return
|
|
4233
|
+
const customFetcher = useCustomClient();
|
|
4234
|
+
return (key, options) => {
|
|
4235
|
+
return customFetcher(getGetAppByKeyUrl(key), {
|
|
4236
|
+
...options,
|
|
4237
|
+
method: "GET"
|
|
4238
|
+
});
|
|
4646
4239
|
};
|
|
4647
4240
|
};
|
|
4648
4241
|
const getGetAppByKeyQueryKey = (key) => {
|
|
4649
4242
|
return [`/api/apps/key/${key}`];
|
|
4650
4243
|
};
|
|
4651
4244
|
const useGetAppByKeyQueryOptions = (key, options) => {
|
|
4652
|
-
const { query: queryOptions } = options ?? {};
|
|
4245
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
4653
4246
|
const queryKey = queryOptions?.queryKey ?? getGetAppByKeyQueryKey(key);
|
|
4654
4247
|
const getAppByKey = useGetAppByKeyHook();
|
|
4655
|
-
const queryFn = ({ signal }) => getAppByKey(key, signal);
|
|
4248
|
+
const queryFn = ({ signal }) => getAppByKey(key, { signal, ...requestOptions });
|
|
4656
4249
|
return {
|
|
4657
4250
|
queryKey,
|
|
4658
4251
|
queryFn,
|
|
@@ -4660,84 +4253,102 @@ const useGetAppByKeyQueryOptions = (key, options) => {
|
|
|
4660
4253
|
...queryOptions
|
|
4661
4254
|
};
|
|
4662
4255
|
};
|
|
4663
|
-
|
|
4256
|
+
function useGetAppByKey(key, options, queryClient) {
|
|
4664
4257
|
const queryOptions = useGetAppByKeyQueryOptions(key, options);
|
|
4665
|
-
const query = useQuery(queryOptions);
|
|
4666
|
-
query
|
|
4667
|
-
|
|
4258
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4259
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4260
|
+
}
|
|
4261
|
+
const getDeleteAppByKeyUrl = (key) => {
|
|
4262
|
+
return `/api/apps/key/${key}`;
|
|
4668
4263
|
};
|
|
4669
4264
|
const useDeleteAppByKeyHook = () => {
|
|
4670
|
-
const
|
|
4671
|
-
return (key) => {
|
|
4672
|
-
return
|
|
4265
|
+
const customFetcher = useCustomClient();
|
|
4266
|
+
return (key, options) => {
|
|
4267
|
+
return customFetcher(getDeleteAppByKeyUrl(key), {
|
|
4268
|
+
...options,
|
|
4269
|
+
method: "DELETE"
|
|
4270
|
+
});
|
|
4673
4271
|
};
|
|
4674
4272
|
};
|
|
4675
4273
|
const useDeleteAppByKeyMutationOptions = (options) => {
|
|
4676
|
-
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 };
|
|
4677
4276
|
const deleteAppByKey = useDeleteAppByKeyHook();
|
|
4678
4277
|
const mutationFn = (props) => {
|
|
4679
4278
|
const { key } = props ?? {};
|
|
4680
|
-
return deleteAppByKey(key);
|
|
4279
|
+
return deleteAppByKey(key, requestOptions);
|
|
4681
4280
|
};
|
|
4682
4281
|
return { mutationFn, ...mutationOptions };
|
|
4683
4282
|
};
|
|
4684
|
-
const useDeleteAppByKey = (options) => {
|
|
4685
|
-
|
|
4686
|
-
|
|
4283
|
+
const useDeleteAppByKey = (options, queryClient) => {
|
|
4284
|
+
return useMutation(useDeleteAppByKeyMutationOptions(options), queryClient);
|
|
4285
|
+
};
|
|
4286
|
+
const getGetAllServicesUrl = () => {
|
|
4287
|
+
return `/api/apps/services`;
|
|
4687
4288
|
};
|
|
4688
4289
|
const useGetAllServicesHook = () => {
|
|
4689
|
-
const
|
|
4690
|
-
return (
|
|
4691
|
-
return
|
|
4290
|
+
const customFetcher = useCustomClient();
|
|
4291
|
+
return (options) => {
|
|
4292
|
+
return customFetcher(getGetAllServicesUrl(), {
|
|
4293
|
+
...options,
|
|
4294
|
+
method: "GET"
|
|
4295
|
+
});
|
|
4692
4296
|
};
|
|
4693
4297
|
};
|
|
4694
4298
|
const getGetAllServicesQueryKey = () => {
|
|
4695
4299
|
return [`/api/apps/services`];
|
|
4696
4300
|
};
|
|
4697
4301
|
const useGetAllServicesQueryOptions = (options) => {
|
|
4698
|
-
const { query: queryOptions } = options ?? {};
|
|
4302
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
4699
4303
|
const queryKey = queryOptions?.queryKey ?? getGetAllServicesQueryKey();
|
|
4700
4304
|
const getAllServices = useGetAllServicesHook();
|
|
4701
|
-
const queryFn = ({ signal }) => getAllServices(signal);
|
|
4305
|
+
const queryFn = ({ signal }) => getAllServices({ signal, ...requestOptions });
|
|
4702
4306
|
return { queryKey, queryFn, ...queryOptions };
|
|
4703
4307
|
};
|
|
4704
|
-
|
|
4308
|
+
function useGetAllServices(options, queryClient) {
|
|
4705
4309
|
const queryOptions = useGetAllServicesQueryOptions(options);
|
|
4706
|
-
const query = useQuery(queryOptions);
|
|
4707
|
-
query
|
|
4708
|
-
|
|
4310
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4311
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4312
|
+
}
|
|
4313
|
+
const getCreateOrUpdateServiceUrl = () => {
|
|
4314
|
+
return `/api/apps/services`;
|
|
4709
4315
|
};
|
|
4710
4316
|
const useCreateOrUpdateServiceHook = () => {
|
|
4711
|
-
const
|
|
4712
|
-
return (serviceDto) => {
|
|
4713
|
-
return
|
|
4714
|
-
|
|
4715
|
-
method: "
|
|
4716
|
-
headers: { "Content-Type": "application/json" },
|
|
4717
|
-
|
|
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)
|
|
4718
4324
|
});
|
|
4719
4325
|
};
|
|
4720
4326
|
};
|
|
4721
4327
|
const useCreateOrUpdateServiceMutationOptions = (options) => {
|
|
4722
|
-
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 };
|
|
4723
4330
|
const createOrUpdateService = useCreateOrUpdateServiceHook();
|
|
4724
4331
|
const mutationFn = (props) => {
|
|
4725
4332
|
const { data } = props ?? {};
|
|
4726
|
-
return createOrUpdateService(data);
|
|
4333
|
+
return createOrUpdateService(data, requestOptions);
|
|
4727
4334
|
};
|
|
4728
4335
|
return { mutationFn, ...mutationOptions };
|
|
4729
4336
|
};
|
|
4730
|
-
const useCreateOrUpdateService = (options) => {
|
|
4731
|
-
|
|
4732
|
-
|
|
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}`;
|
|
4733
4345
|
};
|
|
4734
4346
|
const useGetServiceByKeyHook = () => {
|
|
4735
|
-
const
|
|
4736
|
-
return (key,
|
|
4737
|
-
return
|
|
4738
|
-
|
|
4739
|
-
method: "
|
|
4740
|
-
signal
|
|
4347
|
+
const customFetcher = useCustomClient();
|
|
4348
|
+
return (key, options) => {
|
|
4349
|
+
return customFetcher(getGetServiceByKeyUrl(key), {
|
|
4350
|
+
...options,
|
|
4351
|
+
method: "GET"
|
|
4741
4352
|
});
|
|
4742
4353
|
};
|
|
4743
4354
|
};
|
|
@@ -4745,10 +4356,10 @@ const getGetServiceByKeyQueryKey = (key) => {
|
|
|
4745
4356
|
return [`/api/apps/services/key/${key}`];
|
|
4746
4357
|
};
|
|
4747
4358
|
const useGetServiceByKeyQueryOptions = (key, options) => {
|
|
4748
|
-
const { query: queryOptions } = options ?? {};
|
|
4359
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
4749
4360
|
const queryKey = queryOptions?.queryKey ?? getGetServiceByKeyQueryKey(key);
|
|
4750
4361
|
const getServiceByKey = useGetServiceByKeyHook();
|
|
4751
|
-
const queryFn = ({ signal }) => getServiceByKey(key, signal);
|
|
4362
|
+
const queryFn = ({ signal }) => getServiceByKey(key, { signal, ...requestOptions });
|
|
4752
4363
|
return {
|
|
4753
4364
|
queryKey,
|
|
4754
4365
|
queryFn,
|
|
@@ -4756,41 +4367,48 @@ const useGetServiceByKeyQueryOptions = (key, options) => {
|
|
|
4756
4367
|
...queryOptions
|
|
4757
4368
|
};
|
|
4758
4369
|
};
|
|
4759
|
-
|
|
4370
|
+
function useGetServiceByKey(key, options, queryClient) {
|
|
4760
4371
|
const queryOptions = useGetServiceByKeyQueryOptions(key, options);
|
|
4761
|
-
const query = useQuery(queryOptions);
|
|
4762
|
-
query
|
|
4763
|
-
|
|
4372
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4373
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4374
|
+
}
|
|
4375
|
+
const getDeleteServiceByKeyUrl = (key) => {
|
|
4376
|
+
return `/api/apps/services/key/${key}`;
|
|
4764
4377
|
};
|
|
4765
4378
|
const useDeleteServiceByKeyHook = () => {
|
|
4766
|
-
const
|
|
4767
|
-
return (key) => {
|
|
4768
|
-
return
|
|
4769
|
-
|
|
4770
|
-
method: "
|
|
4379
|
+
const customFetcher = useCustomClient();
|
|
4380
|
+
return (key, options) => {
|
|
4381
|
+
return customFetcher(getDeleteServiceByKeyUrl(key), {
|
|
4382
|
+
...options,
|
|
4383
|
+
method: "DELETE"
|
|
4771
4384
|
});
|
|
4772
4385
|
};
|
|
4773
4386
|
};
|
|
4774
4387
|
const useDeleteServiceByKeyMutationOptions = (options) => {
|
|
4775
|
-
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 };
|
|
4776
4390
|
const deleteServiceByKey = useDeleteServiceByKeyHook();
|
|
4777
4391
|
const mutationFn = (props) => {
|
|
4778
4392
|
const { key } = props ?? {};
|
|
4779
|
-
return deleteServiceByKey(key);
|
|
4393
|
+
return deleteServiceByKey(key, requestOptions);
|
|
4780
4394
|
};
|
|
4781
4395
|
return { mutationFn, ...mutationOptions };
|
|
4782
4396
|
};
|
|
4783
|
-
const useDeleteServiceByKey = (options) => {
|
|
4784
|
-
|
|
4785
|
-
|
|
4397
|
+
const useDeleteServiceByKey = (options, queryClient) => {
|
|
4398
|
+
return useMutation(
|
|
4399
|
+
useDeleteServiceByKeyMutationOptions(options),
|
|
4400
|
+
queryClient
|
|
4401
|
+
);
|
|
4402
|
+
};
|
|
4403
|
+
const getGetAllCategoriesUrl = () => {
|
|
4404
|
+
return `/api/apps/categories`;
|
|
4786
4405
|
};
|
|
4787
4406
|
const useGetAllCategoriesHook = () => {
|
|
4788
|
-
const
|
|
4789
|
-
return (
|
|
4790
|
-
return
|
|
4791
|
-
|
|
4792
|
-
method: "
|
|
4793
|
-
signal
|
|
4407
|
+
const customFetcher = useCustomClient();
|
|
4408
|
+
return (options) => {
|
|
4409
|
+
return customFetcher(getGetAllCategoriesUrl(), {
|
|
4410
|
+
...options,
|
|
4411
|
+
method: "GET"
|
|
4794
4412
|
});
|
|
4795
4413
|
};
|
|
4796
4414
|
};
|
|
@@ -4798,49 +4416,56 @@ const getGetAllCategoriesQueryKey = () => {
|
|
|
4798
4416
|
return [`/api/apps/categories`];
|
|
4799
4417
|
};
|
|
4800
4418
|
const useGetAllCategoriesQueryOptions = (options) => {
|
|
4801
|
-
const { query: queryOptions } = options ?? {};
|
|
4419
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
4802
4420
|
const queryKey = queryOptions?.queryKey ?? getGetAllCategoriesQueryKey();
|
|
4803
4421
|
const getAllCategories = useGetAllCategoriesHook();
|
|
4804
|
-
const queryFn = ({ signal }) => getAllCategories(signal);
|
|
4422
|
+
const queryFn = ({ signal }) => getAllCategories({ signal, ...requestOptions });
|
|
4805
4423
|
return { queryKey, queryFn, ...queryOptions };
|
|
4806
4424
|
};
|
|
4807
|
-
|
|
4425
|
+
function useGetAllCategories(options, queryClient) {
|
|
4808
4426
|
const queryOptions = useGetAllCategoriesQueryOptions(options);
|
|
4809
|
-
const query = useQuery(queryOptions);
|
|
4810
|
-
query
|
|
4811
|
-
|
|
4427
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4428
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4429
|
+
}
|
|
4430
|
+
const getCreateOrUpdateCategoryUrl = () => {
|
|
4431
|
+
return `/api/apps/categories`;
|
|
4812
4432
|
};
|
|
4813
4433
|
const useCreateOrUpdateCategoryHook = () => {
|
|
4814
|
-
const
|
|
4815
|
-
return (categoryDto) => {
|
|
4816
|
-
return
|
|
4817
|
-
|
|
4818
|
-
method: "
|
|
4819
|
-
headers: { "Content-Type": "application/json" },
|
|
4820
|
-
|
|
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)
|
|
4821
4441
|
});
|
|
4822
4442
|
};
|
|
4823
4443
|
};
|
|
4824
4444
|
const useCreateOrUpdateCategoryMutationOptions = (options) => {
|
|
4825
|
-
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 };
|
|
4826
4447
|
const createOrUpdateCategory = useCreateOrUpdateCategoryHook();
|
|
4827
4448
|
const mutationFn = (props) => {
|
|
4828
4449
|
const { data } = props ?? {};
|
|
4829
|
-
return createOrUpdateCategory(data);
|
|
4450
|
+
return createOrUpdateCategory(data, requestOptions);
|
|
4830
4451
|
};
|
|
4831
4452
|
return { mutationFn, ...mutationOptions };
|
|
4832
4453
|
};
|
|
4833
|
-
const useCreateOrUpdateCategory = (options) => {
|
|
4834
|
-
|
|
4835
|
-
|
|
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}`;
|
|
4836
4462
|
};
|
|
4837
4463
|
const useGetCategoryByIdHook = () => {
|
|
4838
|
-
const
|
|
4839
|
-
return (id,
|
|
4840
|
-
return
|
|
4841
|
-
|
|
4842
|
-
method: "
|
|
4843
|
-
signal
|
|
4464
|
+
const customFetcher = useCustomClient();
|
|
4465
|
+
return (id, options) => {
|
|
4466
|
+
return customFetcher(getGetCategoryByIdUrl(id), {
|
|
4467
|
+
...options,
|
|
4468
|
+
method: "GET"
|
|
4844
4469
|
});
|
|
4845
4470
|
};
|
|
4846
4471
|
};
|
|
@@ -4848,10 +4473,10 @@ const getGetCategoryByIdQueryKey = (id) => {
|
|
|
4848
4473
|
return [`/api/apps/categories/id/${id}`];
|
|
4849
4474
|
};
|
|
4850
4475
|
const useGetCategoryByIdQueryOptions = (id, options) => {
|
|
4851
|
-
const { query: queryOptions } = options ?? {};
|
|
4476
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
4852
4477
|
const queryKey = queryOptions?.queryKey ?? getGetCategoryByIdQueryKey(id);
|
|
4853
4478
|
const getCategoryById = useGetCategoryByIdHook();
|
|
4854
|
-
const queryFn = ({ signal }) => getCategoryById(id, signal);
|
|
4479
|
+
const queryFn = ({ signal }) => getCategoryById(id, { signal, ...requestOptions });
|
|
4855
4480
|
return {
|
|
4856
4481
|
queryKey,
|
|
4857
4482
|
queryFn,
|
|
@@ -4859,41 +4484,48 @@ const useGetCategoryByIdQueryOptions = (id, options) => {
|
|
|
4859
4484
|
...queryOptions
|
|
4860
4485
|
};
|
|
4861
4486
|
};
|
|
4862
|
-
|
|
4487
|
+
function useGetCategoryById(id, options, queryClient) {
|
|
4863
4488
|
const queryOptions = useGetCategoryByIdQueryOptions(id, options);
|
|
4864
|
-
const query = useQuery(queryOptions);
|
|
4865
|
-
query
|
|
4866
|
-
|
|
4489
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4490
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4491
|
+
}
|
|
4492
|
+
const getDeleteCategoryByIdUrl = (id) => {
|
|
4493
|
+
return `/api/apps/categories/id/${id}`;
|
|
4867
4494
|
};
|
|
4868
4495
|
const useDeleteCategoryByIdHook = () => {
|
|
4869
|
-
const
|
|
4870
|
-
return (id) => {
|
|
4871
|
-
return
|
|
4872
|
-
|
|
4873
|
-
method: "
|
|
4496
|
+
const customFetcher = useCustomClient();
|
|
4497
|
+
return (id, options) => {
|
|
4498
|
+
return customFetcher(getDeleteCategoryByIdUrl(id), {
|
|
4499
|
+
...options,
|
|
4500
|
+
method: "DELETE"
|
|
4874
4501
|
});
|
|
4875
4502
|
};
|
|
4876
4503
|
};
|
|
4877
4504
|
const useDeleteCategoryByIdMutationOptions = (options) => {
|
|
4878
|
-
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 };
|
|
4879
4507
|
const deleteCategoryById = useDeleteCategoryByIdHook();
|
|
4880
4508
|
const mutationFn = (props) => {
|
|
4881
4509
|
const { id } = props ?? {};
|
|
4882
|
-
return deleteCategoryById(id);
|
|
4510
|
+
return deleteCategoryById(id, requestOptions);
|
|
4883
4511
|
};
|
|
4884
4512
|
return { mutationFn, ...mutationOptions };
|
|
4885
4513
|
};
|
|
4886
|
-
const useDeleteCategoryById = (options) => {
|
|
4887
|
-
|
|
4888
|
-
|
|
4514
|
+
const useDeleteCategoryById = (options, queryClient) => {
|
|
4515
|
+
return useMutation(
|
|
4516
|
+
useDeleteCategoryByIdMutationOptions(options),
|
|
4517
|
+
queryClient
|
|
4518
|
+
);
|
|
4519
|
+
};
|
|
4520
|
+
const getStreamEventsUrl = () => {
|
|
4521
|
+
return `/eventstream/activitylog`;
|
|
4889
4522
|
};
|
|
4890
4523
|
const useStreamEventsHook = () => {
|
|
4891
|
-
const
|
|
4892
|
-
return (
|
|
4893
|
-
return
|
|
4894
|
-
|
|
4895
|
-
method: "
|
|
4896
|
-
signal
|
|
4524
|
+
const customFetcher = useCustomClient();
|
|
4525
|
+
return (options) => {
|
|
4526
|
+
return customFetcher(getStreamEventsUrl(), {
|
|
4527
|
+
...options,
|
|
4528
|
+
method: "GET"
|
|
4897
4529
|
});
|
|
4898
4530
|
};
|
|
4899
4531
|
};
|
|
@@ -4901,25 +4533,26 @@ const getStreamEventsQueryKey = () => {
|
|
|
4901
4533
|
return [`/eventstream/activitylog`];
|
|
4902
4534
|
};
|
|
4903
4535
|
const useStreamEventsQueryOptions = (options) => {
|
|
4904
|
-
const { query: queryOptions } = options ?? {};
|
|
4536
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
4905
4537
|
const queryKey = queryOptions?.queryKey ?? getStreamEventsQueryKey();
|
|
4906
4538
|
const streamEvents = useStreamEventsHook();
|
|
4907
|
-
const queryFn = ({ signal }) => streamEvents(signal);
|
|
4539
|
+
const queryFn = ({ signal }) => streamEvents({ signal, ...requestOptions });
|
|
4908
4540
|
return { queryKey, queryFn, ...queryOptions };
|
|
4909
4541
|
};
|
|
4910
|
-
|
|
4542
|
+
function useStreamEvents(options, queryClient) {
|
|
4911
4543
|
const queryOptions = useStreamEventsQueryOptions(options);
|
|
4912
|
-
const query = useQuery(queryOptions);
|
|
4913
|
-
query
|
|
4914
|
-
|
|
4544
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4545
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4546
|
+
}
|
|
4547
|
+
const getGetCurrentEnvironmentUrl = () => {
|
|
4548
|
+
return `/_discovery/environments/current`;
|
|
4915
4549
|
};
|
|
4916
4550
|
const useGetCurrentEnvironmentHook = () => {
|
|
4917
|
-
const
|
|
4918
|
-
return (
|
|
4919
|
-
return
|
|
4920
|
-
|
|
4921
|
-
method: "
|
|
4922
|
-
signal
|
|
4551
|
+
const customFetcher = useCustomClient();
|
|
4552
|
+
return (options) => {
|
|
4553
|
+
return customFetcher(getGetCurrentEnvironmentUrl(), {
|
|
4554
|
+
...options,
|
|
4555
|
+
method: "GET"
|
|
4923
4556
|
});
|
|
4924
4557
|
};
|
|
4925
4558
|
};
|
|
@@ -4927,28 +4560,49 @@ const getGetCurrentEnvironmentQueryKey = () => {
|
|
|
4927
4560
|
return [`/_discovery/environments/current`];
|
|
4928
4561
|
};
|
|
4929
4562
|
const useGetCurrentEnvironmentQueryOptions = (options) => {
|
|
4930
|
-
const { query: queryOptions } = options ?? {};
|
|
4563
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
4931
4564
|
const queryKey = queryOptions?.queryKey ?? getGetCurrentEnvironmentQueryKey();
|
|
4932
4565
|
const getCurrentEnvironment = useGetCurrentEnvironmentHook();
|
|
4933
|
-
const queryFn = ({ signal }) => getCurrentEnvironment(signal);
|
|
4566
|
+
const queryFn = ({ signal }) => getCurrentEnvironment({ signal, ...requestOptions });
|
|
4934
4567
|
return { queryKey, queryFn, ...queryOptions };
|
|
4935
4568
|
};
|
|
4936
|
-
|
|
4569
|
+
function useGetCurrentEnvironment(options, queryClient) {
|
|
4937
4570
|
const queryOptions = useGetCurrentEnvironmentQueryOptions(options);
|
|
4938
|
-
const query = useQuery(queryOptions);
|
|
4939
|
-
query
|
|
4940
|
-
|
|
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"
|
|
4941
4587
|
};
|
|
4942
4588
|
const GetAllRomaConfigurationTypes200Item = {
|
|
4943
4589
|
servicebus: "servicebus"
|
|
4944
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
|
+
};
|
|
4945
4600
|
const useGetRomaConfigurationByIdHook = () => {
|
|
4946
|
-
const
|
|
4947
|
-
return (id,
|
|
4948
|
-
return
|
|
4949
|
-
|
|
4950
|
-
method: "
|
|
4951
|
-
signal
|
|
4601
|
+
const customFetcher = useCustomClient();
|
|
4602
|
+
return (id, options) => {
|
|
4603
|
+
return customFetcher(getGetRomaConfigurationByIdUrl(id), {
|
|
4604
|
+
...options,
|
|
4605
|
+
method: "GET"
|
|
4952
4606
|
});
|
|
4953
4607
|
};
|
|
4954
4608
|
};
|
|
@@ -4956,10 +4610,10 @@ const getGetRomaConfigurationByIdQueryKey = (id) => {
|
|
|
4956
4610
|
return [`/api/configurations/id/${id}`];
|
|
4957
4611
|
};
|
|
4958
4612
|
const useGetRomaConfigurationByIdQueryOptions = (id, options) => {
|
|
4959
|
-
const { query: queryOptions } = options ?? {};
|
|
4613
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
4960
4614
|
const queryKey = queryOptions?.queryKey ?? getGetRomaConfigurationByIdQueryKey(id);
|
|
4961
4615
|
const getRomaConfigurationById = useGetRomaConfigurationByIdHook();
|
|
4962
|
-
const queryFn = ({ signal }) => getRomaConfigurationById(id, signal);
|
|
4616
|
+
const queryFn = ({ signal }) => getRomaConfigurationById(id, { signal, ...requestOptions });
|
|
4963
4617
|
return {
|
|
4964
4618
|
queryKey,
|
|
4965
4619
|
queryFn,
|
|
@@ -4967,65 +4621,78 @@ const useGetRomaConfigurationByIdQueryOptions = (id, options) => {
|
|
|
4967
4621
|
...queryOptions
|
|
4968
4622
|
};
|
|
4969
4623
|
};
|
|
4970
|
-
|
|
4624
|
+
function useGetRomaConfigurationById(id, options, queryClient) {
|
|
4971
4625
|
const queryOptions = useGetRomaConfigurationByIdQueryOptions(id, options);
|
|
4972
|
-
const query = useQuery(queryOptions);
|
|
4973
|
-
query
|
|
4974
|
-
|
|
4626
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4627
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4628
|
+
}
|
|
4629
|
+
const getUpdateRomaConfigurationUrl = (id) => {
|
|
4630
|
+
return `/api/configurations/id/${id}`;
|
|
4975
4631
|
};
|
|
4976
4632
|
const useUpdateRomaConfigurationHook = () => {
|
|
4977
|
-
const
|
|
4978
|
-
return (id, romaConfigurationDto) => {
|
|
4979
|
-
return
|
|
4980
|
-
|
|
4981
|
-
method: "
|
|
4982
|
-
headers: { "Content-Type": "application/json" },
|
|
4983
|
-
|
|
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)
|
|
4984
4640
|
});
|
|
4985
4641
|
};
|
|
4986
4642
|
};
|
|
4987
4643
|
const useUpdateRomaConfigurationMutationOptions = (options) => {
|
|
4988
|
-
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 };
|
|
4989
4646
|
const updateRomaConfiguration = useUpdateRomaConfigurationHook();
|
|
4990
4647
|
const mutationFn = (props) => {
|
|
4991
4648
|
const { id, data } = props ?? {};
|
|
4992
|
-
return updateRomaConfiguration(id, data);
|
|
4649
|
+
return updateRomaConfiguration(id, data, requestOptions);
|
|
4993
4650
|
};
|
|
4994
4651
|
return { mutationFn, ...mutationOptions };
|
|
4995
4652
|
};
|
|
4996
|
-
const useUpdateRomaConfiguration = (options) => {
|
|
4997
|
-
|
|
4998
|
-
|
|
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}`;
|
|
4999
4661
|
};
|
|
5000
4662
|
const useDeleteRomaConfigurationHook = () => {
|
|
5001
|
-
const
|
|
5002
|
-
return (id) => {
|
|
5003
|
-
return
|
|
5004
|
-
|
|
5005
|
-
method: "
|
|
4663
|
+
const customFetcher = useCustomClient();
|
|
4664
|
+
return (id, options) => {
|
|
4665
|
+
return customFetcher(getDeleteRomaConfigurationUrl(id), {
|
|
4666
|
+
...options,
|
|
4667
|
+
method: "DELETE"
|
|
5006
4668
|
});
|
|
5007
4669
|
};
|
|
5008
4670
|
};
|
|
5009
4671
|
const useDeleteRomaConfigurationMutationOptions = (options) => {
|
|
5010
|
-
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 };
|
|
5011
4674
|
const deleteRomaConfiguration = useDeleteRomaConfigurationHook();
|
|
5012
4675
|
const mutationFn = (props) => {
|
|
5013
4676
|
const { id } = props ?? {};
|
|
5014
|
-
return deleteRomaConfiguration(id);
|
|
4677
|
+
return deleteRomaConfiguration(id, requestOptions);
|
|
5015
4678
|
};
|
|
5016
4679
|
return { mutationFn, ...mutationOptions };
|
|
5017
4680
|
};
|
|
5018
|
-
const useDeleteRomaConfiguration = (options) => {
|
|
5019
|
-
|
|
5020
|
-
|
|
4681
|
+
const useDeleteRomaConfiguration = (options, queryClient) => {
|
|
4682
|
+
return useMutation(
|
|
4683
|
+
useDeleteRomaConfigurationMutationOptions(options),
|
|
4684
|
+
queryClient
|
|
4685
|
+
);
|
|
4686
|
+
};
|
|
4687
|
+
const getGetAllRomaConfigurationUrl = () => {
|
|
4688
|
+
return `/api/configurations`;
|
|
5021
4689
|
};
|
|
5022
4690
|
const useGetAllRomaConfigurationHook = () => {
|
|
5023
|
-
const
|
|
5024
|
-
return (
|
|
5025
|
-
return
|
|
5026
|
-
|
|
5027
|
-
method: "
|
|
5028
|
-
signal
|
|
4691
|
+
const customFetcher = useCustomClient();
|
|
4692
|
+
return (options) => {
|
|
4693
|
+
return customFetcher(getGetAllRomaConfigurationUrl(), {
|
|
4694
|
+
...options,
|
|
4695
|
+
method: "GET"
|
|
5029
4696
|
});
|
|
5030
4697
|
};
|
|
5031
4698
|
};
|
|
@@ -5033,49 +4700,56 @@ const getGetAllRomaConfigurationQueryKey = () => {
|
|
|
5033
4700
|
return [`/api/configurations`];
|
|
5034
4701
|
};
|
|
5035
4702
|
const useGetAllRomaConfigurationQueryOptions = (options) => {
|
|
5036
|
-
const { query: queryOptions } = options ?? {};
|
|
4703
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
5037
4704
|
const queryKey = queryOptions?.queryKey ?? getGetAllRomaConfigurationQueryKey();
|
|
5038
4705
|
const getAllRomaConfiguration = useGetAllRomaConfigurationHook();
|
|
5039
|
-
const queryFn = ({ signal }) => getAllRomaConfiguration(signal);
|
|
4706
|
+
const queryFn = ({ signal }) => getAllRomaConfiguration({ signal, ...requestOptions });
|
|
5040
4707
|
return { queryKey, queryFn, ...queryOptions };
|
|
5041
4708
|
};
|
|
5042
|
-
|
|
4709
|
+
function useGetAllRomaConfiguration(options, queryClient) {
|
|
5043
4710
|
const queryOptions = useGetAllRomaConfigurationQueryOptions(options);
|
|
5044
|
-
const query = useQuery(queryOptions);
|
|
5045
|
-
query
|
|
5046
|
-
|
|
4711
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4712
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4713
|
+
}
|
|
4714
|
+
const getAddRomaConfigurationUrl = () => {
|
|
4715
|
+
return `/api/configurations`;
|
|
5047
4716
|
};
|
|
5048
4717
|
const useAddRomaConfigurationHook = () => {
|
|
5049
|
-
const
|
|
5050
|
-
return (romaConfigurationDto) => {
|
|
5051
|
-
return
|
|
5052
|
-
|
|
5053
|
-
method: "
|
|
5054
|
-
headers: { "Content-Type": "application/json" },
|
|
5055
|
-
|
|
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)
|
|
5056
4725
|
});
|
|
5057
4726
|
};
|
|
5058
4727
|
};
|
|
5059
4728
|
const useAddRomaConfigurationMutationOptions = (options) => {
|
|
5060
|
-
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 };
|
|
5061
4731
|
const addRomaConfiguration = useAddRomaConfigurationHook();
|
|
5062
4732
|
const mutationFn = (props) => {
|
|
5063
4733
|
const { data } = props ?? {};
|
|
5064
|
-
return addRomaConfiguration(data);
|
|
4734
|
+
return addRomaConfiguration(data, requestOptions);
|
|
5065
4735
|
};
|
|
5066
4736
|
return { mutationFn, ...mutationOptions };
|
|
5067
4737
|
};
|
|
5068
|
-
const useAddRomaConfiguration = (options) => {
|
|
5069
|
-
|
|
5070
|
-
|
|
4738
|
+
const useAddRomaConfiguration = (options, queryClient) => {
|
|
4739
|
+
return useMutation(
|
|
4740
|
+
useAddRomaConfigurationMutationOptions(options),
|
|
4741
|
+
queryClient
|
|
4742
|
+
);
|
|
4743
|
+
};
|
|
4744
|
+
const getGetAllRomaConfigurationTypesUrl = () => {
|
|
4745
|
+
return `/api/configurations/types`;
|
|
5071
4746
|
};
|
|
5072
4747
|
const useGetAllRomaConfigurationTypesHook = () => {
|
|
5073
|
-
const
|
|
5074
|
-
return (
|
|
5075
|
-
return
|
|
5076
|
-
|
|
5077
|
-
method: "
|
|
5078
|
-
signal
|
|
4748
|
+
const customFetcher = useCustomClient();
|
|
4749
|
+
return (options) => {
|
|
4750
|
+
return customFetcher(getGetAllRomaConfigurationTypesUrl(), {
|
|
4751
|
+
...options,
|
|
4752
|
+
method: "GET"
|
|
5079
4753
|
});
|
|
5080
4754
|
};
|
|
5081
4755
|
};
|
|
@@ -5083,25 +4757,26 @@ const getGetAllRomaConfigurationTypesQueryKey = () => {
|
|
|
5083
4757
|
return [`/api/configurations/types`];
|
|
5084
4758
|
};
|
|
5085
4759
|
const useGetAllRomaConfigurationTypesQueryOptions = (options) => {
|
|
5086
|
-
const { query: queryOptions } = options ?? {};
|
|
4760
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
5087
4761
|
const queryKey = queryOptions?.queryKey ?? getGetAllRomaConfigurationTypesQueryKey();
|
|
5088
4762
|
const getAllRomaConfigurationTypes = useGetAllRomaConfigurationTypesHook();
|
|
5089
|
-
const queryFn = ({ signal }) => getAllRomaConfigurationTypes(signal);
|
|
4763
|
+
const queryFn = ({ signal }) => getAllRomaConfigurationTypes({ signal, ...requestOptions });
|
|
5090
4764
|
return { queryKey, queryFn, ...queryOptions };
|
|
5091
4765
|
};
|
|
5092
|
-
|
|
4766
|
+
function useGetAllRomaConfigurationTypes(options, queryClient) {
|
|
5093
4767
|
const queryOptions = useGetAllRomaConfigurationTypesQueryOptions(options);
|
|
5094
|
-
const query = useQuery(queryOptions);
|
|
5095
|
-
query
|
|
5096
|
-
|
|
4768
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4769
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4770
|
+
}
|
|
4771
|
+
const getGetAllRomaConfigurationByTypeUrl = (type) => {
|
|
4772
|
+
return `/api/configurations/types/type/${type}`;
|
|
5097
4773
|
};
|
|
5098
4774
|
const useGetAllRomaConfigurationByTypeHook = () => {
|
|
5099
|
-
const
|
|
5100
|
-
return (type,
|
|
5101
|
-
return
|
|
5102
|
-
|
|
5103
|
-
method: "
|
|
5104
|
-
signal
|
|
4775
|
+
const customFetcher = useCustomClient();
|
|
4776
|
+
return (type, options) => {
|
|
4777
|
+
return customFetcher(getGetAllRomaConfigurationByTypeUrl(type), {
|
|
4778
|
+
...options,
|
|
4779
|
+
method: "GET"
|
|
5105
4780
|
});
|
|
5106
4781
|
};
|
|
5107
4782
|
};
|
|
@@ -5109,10 +4784,10 @@ const getGetAllRomaConfigurationByTypeQueryKey = (type) => {
|
|
|
5109
4784
|
return [`/api/configurations/types/type/${type}`];
|
|
5110
4785
|
};
|
|
5111
4786
|
const useGetAllRomaConfigurationByTypeQueryOptions = (type, options) => {
|
|
5112
|
-
const { query: queryOptions } = options ?? {};
|
|
4787
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
5113
4788
|
const queryKey = queryOptions?.queryKey ?? getGetAllRomaConfigurationByTypeQueryKey(type);
|
|
5114
4789
|
const getAllRomaConfigurationByType = useGetAllRomaConfigurationByTypeHook();
|
|
5115
|
-
const queryFn = ({ signal }) => getAllRomaConfigurationByType(type, signal);
|
|
4790
|
+
const queryFn = ({ signal }) => getAllRomaConfigurationByType(type, { signal, ...requestOptions });
|
|
5116
4791
|
return {
|
|
5117
4792
|
queryKey,
|
|
5118
4793
|
queryFn,
|
|
@@ -5120,47 +4795,57 @@ const useGetAllRomaConfigurationByTypeQueryOptions = (type, options) => {
|
|
|
5120
4795
|
...queryOptions
|
|
5121
4796
|
};
|
|
5122
4797
|
};
|
|
5123
|
-
|
|
4798
|
+
function useGetAllRomaConfigurationByType(type, options, queryClient) {
|
|
5124
4799
|
const queryOptions = useGetAllRomaConfigurationByTypeQueryOptions(
|
|
5125
4800
|
type,
|
|
5126
4801
|
options
|
|
5127
4802
|
);
|
|
5128
|
-
const query = useQuery(queryOptions);
|
|
5129
|
-
query
|
|
5130
|
-
|
|
4803
|
+
const query = useQuery(queryOptions, queryClient);
|
|
4804
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
4805
|
+
}
|
|
4806
|
+
const getCreateFeedbackUrl = () => {
|
|
4807
|
+
return `/api/feedbacks`;
|
|
5131
4808
|
};
|
|
5132
4809
|
const useCreateFeedbackHook = () => {
|
|
5133
|
-
const
|
|
5134
|
-
return (feedbackDto) => {
|
|
5135
|
-
return
|
|
5136
|
-
|
|
5137
|
-
method: "
|
|
5138
|
-
headers: { "Content-Type": "application/json" },
|
|
5139
|
-
|
|
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)
|
|
5140
4817
|
});
|
|
5141
4818
|
};
|
|
5142
4819
|
};
|
|
5143
4820
|
const useCreateFeedbackMutationOptions = (options) => {
|
|
5144
|
-
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 };
|
|
5145
4823
|
const createFeedback = useCreateFeedbackHook();
|
|
5146
4824
|
const mutationFn = (props) => {
|
|
5147
4825
|
const { data } = props ?? {};
|
|
5148
|
-
return createFeedback(data);
|
|
4826
|
+
return createFeedback(data, requestOptions);
|
|
5149
4827
|
};
|
|
5150
4828
|
return { mutationFn, ...mutationOptions };
|
|
5151
4829
|
};
|
|
5152
|
-
const useCreateFeedback = (options) => {
|
|
5153
|
-
|
|
5154
|
-
|
|
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`;
|
|
5155
4842
|
};
|
|
5156
4843
|
const useListFeedbacksByCurrentUserHook = () => {
|
|
5157
|
-
const
|
|
5158
|
-
return (params,
|
|
5159
|
-
return
|
|
5160
|
-
|
|
5161
|
-
method: "
|
|
5162
|
-
params,
|
|
5163
|
-
signal
|
|
4844
|
+
const customFetcher = useCustomClient();
|
|
4845
|
+
return (params, options) => {
|
|
4846
|
+
return customFetcher(getListFeedbacksByCurrentUserUrl(params), {
|
|
4847
|
+
...options,
|
|
4848
|
+
method: "GET"
|
|
5164
4849
|
});
|
|
5165
4850
|
};
|
|
5166
4851
|
};
|
|
@@ -5168,21 +4853,327 @@ const getListFeedbacksByCurrentUserQueryKey = (params) => {
|
|
|
5168
4853
|
return [`/api/feedbacks/mine`, ...params ? [params] : []];
|
|
5169
4854
|
};
|
|
5170
4855
|
const useListFeedbacksByCurrentUserQueryOptions = (params, options) => {
|
|
5171
|
-
const { query: queryOptions } = options ?? {};
|
|
4856
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
5172
4857
|
const queryKey = queryOptions?.queryKey ?? getListFeedbacksByCurrentUserQueryKey(params);
|
|
5173
4858
|
const listFeedbacksByCurrentUser = useListFeedbacksByCurrentUserHook();
|
|
5174
|
-
const queryFn = ({ signal }) => listFeedbacksByCurrentUser(params, signal);
|
|
4859
|
+
const queryFn = ({ signal }) => listFeedbacksByCurrentUser(params, { signal, ...requestOptions });
|
|
5175
4860
|
return { queryKey, queryFn, ...queryOptions };
|
|
5176
4861
|
};
|
|
5177
|
-
|
|
4862
|
+
function useListFeedbacksByCurrentUser(params, options, queryClient) {
|
|
5178
4863
|
const queryOptions = useListFeedbacksByCurrentUserQueryOptions(
|
|
5179
4864
|
params,
|
|
5180
4865
|
options
|
|
5181
4866
|
);
|
|
5182
|
-
const query = useQuery(queryOptions);
|
|
5183
|
-
query
|
|
5184
|
-
|
|
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 };
|
|
5185
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`;
|
|
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
|
+
}
|
|
5186
5177
|
const findGroupMembers = async (client, groupId, query) => {
|
|
5187
5178
|
const headers = {
|
|
5188
5179
|
ConsistencyLevel: "eventual"
|
|
@@ -5664,26 +5655,29 @@ const useWatchDefaults = {
|
|
|
5664
5655
|
}
|
|
5665
5656
|
};
|
|
5666
5657
|
const useManageWatchList = (system) => {
|
|
5667
|
-
const { data: setting } = useGetSettingsByAppShortName(
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
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
|
+
}
|
|
5684
5678
|
}
|
|
5685
5679
|
}
|
|
5686
|
-
|
|
5680
|
+
);
|
|
5687
5681
|
const framework = useFramework();
|
|
5688
5682
|
const user = framework.modules.auth.account;
|
|
5689
5683
|
const userId = user?.username.split("@")[0].toLowerCase() ?? "MISSINGUSER";
|
|
@@ -5764,6 +5758,9 @@ const useManageWatchList = (system) => {
|
|
|
5764
5758
|
};
|
|
5765
5759
|
};
|
|
5766
5760
|
export {
|
|
5761
|
+
AdminDtoAdminType,
|
|
5762
|
+
AlarmDtoSeverity,
|
|
5763
|
+
AlarmDtoState,
|
|
5767
5764
|
AppContext,
|
|
5768
5765
|
AppLoadError,
|
|
5769
5766
|
AppLoader,
|
|
@@ -5775,29 +5772,81 @@ export {
|
|
|
5775
5772
|
Header,
|
|
5776
5773
|
HttpError2 as HttpError,
|
|
5777
5774
|
HttpErrorViewer,
|
|
5775
|
+
RaiseAlarmRequestSeverity,
|
|
5778
5776
|
RomaErrorViewer,
|
|
5779
5777
|
StyleProvider,
|
|
5780
5778
|
configure,
|
|
5781
5779
|
createIDBPersister,
|
|
5782
5780
|
findUserById,
|
|
5783
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,
|
|
5784
5800
|
getGetAllAppsQueryKey,
|
|
5801
|
+
getGetAllAppsUrl,
|
|
5785
5802
|
getGetAllCategoriesQueryKey,
|
|
5803
|
+
getGetAllCategoriesUrl,
|
|
5804
|
+
getGetAllQueryKey,
|
|
5786
5805
|
getGetAllRomaConfigurationByTypeQueryKey,
|
|
5806
|
+
getGetAllRomaConfigurationByTypeUrl,
|
|
5787
5807
|
getGetAllRomaConfigurationQueryKey,
|
|
5788
5808
|
getGetAllRomaConfigurationTypesQueryKey,
|
|
5809
|
+
getGetAllRomaConfigurationTypesUrl,
|
|
5810
|
+
getGetAllRomaConfigurationUrl,
|
|
5789
5811
|
getGetAllServicesQueryKey,
|
|
5812
|
+
getGetAllServicesUrl,
|
|
5813
|
+
getGetAllUrl,
|
|
5790
5814
|
getGetAppByKeyQueryKey,
|
|
5815
|
+
getGetAppByKeyUrl,
|
|
5816
|
+
getGetByIdQueryKey,
|
|
5817
|
+
getGetByIdUrl,
|
|
5791
5818
|
getGetCategoryByIdQueryKey,
|
|
5819
|
+
getGetCategoryByIdUrl,
|
|
5792
5820
|
getGetCurrentEnvironmentQueryKey,
|
|
5821
|
+
getGetCurrentEnvironmentUrl,
|
|
5793
5822
|
getGetPublicSettingByUserAndIdQueryKey,
|
|
5823
|
+
getGetPublicSettingByUserAndIdUrl,
|
|
5794
5824
|
getGetRomaConfigurationByIdQueryKey,
|
|
5825
|
+
getGetRomaConfigurationByIdUrl,
|
|
5795
5826
|
getGetServiceByKeyQueryKey,
|
|
5827
|
+
getGetServiceByKeyUrl,
|
|
5796
5828
|
getGetSettingByUserAndIdQueryKey,
|
|
5829
|
+
getGetSettingByUserAndIdUrl,
|
|
5797
5830
|
getGetSettingsByAppShortNameQueryKey,
|
|
5831
|
+
getGetSettingsByAppShortNameUrl,
|
|
5798
5832
|
getGetSettingsByUserIdQueryKey,
|
|
5833
|
+
getGetSettingsByUserIdUrl,
|
|
5834
|
+
getGetStatusQueryKey,
|
|
5835
|
+
getGetStatusUrl,
|
|
5799
5836
|
getListFeedbacksByCurrentUserQueryKey,
|
|
5837
|
+
getListFeedbacksByCurrentUserUrl,
|
|
5838
|
+
getRaiseUrl,
|
|
5839
|
+
getReplaceMembersUrl,
|
|
5840
|
+
getStreamAlarmsQueryKey,
|
|
5841
|
+
getStreamAlarmsUrl,
|
|
5800
5842
|
getStreamEventsQueryKey,
|
|
5843
|
+
getStreamEventsUrl,
|
|
5844
|
+
getUpdateByUserIdAndIdUrl,
|
|
5845
|
+
getUpdatePublicSettingByAppShortNameAndIdUrl,
|
|
5846
|
+
getUpdateRomaConfigurationUrl,
|
|
5847
|
+
getUpdateUrl,
|
|
5848
|
+
getUploadBundleUrl,
|
|
5849
|
+
handle,
|
|
5801
5850
|
handleError,
|
|
5802
5851
|
makeComponent,
|
|
5803
5852
|
parseJwt,
|
|
@@ -5806,9 +5855,15 @@ export {
|
|
|
5806
5855
|
useAddRomaConfigurationHook,
|
|
5807
5856
|
useAddRomaConfigurationMutationOptions,
|
|
5808
5857
|
useApps,
|
|
5858
|
+
useClear,
|
|
5859
|
+
useClearHook,
|
|
5860
|
+
useClearMutationOptions,
|
|
5861
|
+
useCreate,
|
|
5809
5862
|
useCreateFeedback,
|
|
5810
5863
|
useCreateFeedbackHook,
|
|
5811
5864
|
useCreateFeedbackMutationOptions,
|
|
5865
|
+
useCreateHook,
|
|
5866
|
+
useCreateMutationOptions,
|
|
5812
5867
|
useCreateOrUpdateApp,
|
|
5813
5868
|
useCreateOrUpdateAppHook,
|
|
5814
5869
|
useCreateOrUpdateAppMutationOptions,
|
|
@@ -5824,12 +5879,14 @@ export {
|
|
|
5824
5879
|
useCreateSettingByUserId,
|
|
5825
5880
|
useCreateSettingByUserIdHook,
|
|
5826
5881
|
useCreateSettingByUserIdMutationOptions,
|
|
5882
|
+
useDelete,
|
|
5827
5883
|
useDeleteAppByKey,
|
|
5828
5884
|
useDeleteAppByKeyHook,
|
|
5829
5885
|
useDeleteAppByKeyMutationOptions,
|
|
5830
5886
|
useDeleteCategoryById,
|
|
5831
5887
|
useDeleteCategoryByIdHook,
|
|
5832
5888
|
useDeleteCategoryByIdMutationOptions,
|
|
5889
|
+
useDeleteMutationOptions,
|
|
5833
5890
|
useDeletePrivateSettingById,
|
|
5834
5891
|
useDeletePrivateSettingByIdHook,
|
|
5835
5892
|
useDeletePrivateSettingByIdMutationOptions,
|
|
@@ -5849,12 +5906,18 @@ export {
|
|
|
5849
5906
|
useFindUserById,
|
|
5850
5907
|
useFindUsersByMail,
|
|
5851
5908
|
useFindUsersByShortname,
|
|
5909
|
+
useGetAll,
|
|
5910
|
+
useGetAll1,
|
|
5911
|
+
useGetAll1Hook,
|
|
5912
|
+
useGetAll1QueryOptions,
|
|
5852
5913
|
useGetAllApps,
|
|
5853
5914
|
useGetAllAppsHook,
|
|
5854
5915
|
useGetAllAppsQueryOptions,
|
|
5855
5916
|
useGetAllCategories,
|
|
5856
5917
|
useGetAllCategoriesHook,
|
|
5857
5918
|
useGetAllCategoriesQueryOptions,
|
|
5919
|
+
useGetAllHook,
|
|
5920
|
+
useGetAllQueryOptions,
|
|
5858
5921
|
useGetAllRomaConfiguration,
|
|
5859
5922
|
useGetAllRomaConfigurationByType,
|
|
5860
5923
|
useGetAllRomaConfigurationByTypeHook,
|
|
@@ -5871,6 +5934,9 @@ export {
|
|
|
5871
5934
|
useGetAppByKey,
|
|
5872
5935
|
useGetAppByKeyHook,
|
|
5873
5936
|
useGetAppByKeyQueryOptions,
|
|
5937
|
+
useGetById,
|
|
5938
|
+
useGetByIdHook,
|
|
5939
|
+
useGetByIdQueryOptions,
|
|
5874
5940
|
useGetCategoryById,
|
|
5875
5941
|
useGetCategoryByIdHook,
|
|
5876
5942
|
useGetCategoryByIdQueryOptions,
|
|
@@ -5895,17 +5961,32 @@ export {
|
|
|
5895
5961
|
useGetSettingsByUserId,
|
|
5896
5962
|
useGetSettingsByUserIdHook,
|
|
5897
5963
|
useGetSettingsByUserIdQueryOptions,
|
|
5964
|
+
useGetStatus,
|
|
5965
|
+
useGetStatusHook,
|
|
5966
|
+
useGetStatusQueryOptions,
|
|
5898
5967
|
useHasApiRole,
|
|
5899
5968
|
useListFeedbacksByCurrentUser,
|
|
5900
5969
|
useListFeedbacksByCurrentUserHook,
|
|
5901
5970
|
useListFeedbacksByCurrentUserQueryOptions,
|
|
5902
5971
|
useManageWatchList,
|
|
5972
|
+
useRaise,
|
|
5973
|
+
useRaiseHook,
|
|
5974
|
+
useRaiseMutationOptions,
|
|
5975
|
+
useReplaceMembers,
|
|
5976
|
+
useReplaceMembersHook,
|
|
5977
|
+
useReplaceMembersMutationOptions,
|
|
5978
|
+
useStreamAlarms,
|
|
5979
|
+
useStreamAlarmsHook,
|
|
5980
|
+
useStreamAlarmsQueryOptions,
|
|
5903
5981
|
useStreamEvents,
|
|
5904
5982
|
useStreamEventsHook,
|
|
5905
5983
|
useStreamEventsQueryOptions,
|
|
5984
|
+
useUpdate,
|
|
5906
5985
|
useUpdateByUserIdAndId,
|
|
5907
5986
|
useUpdateByUserIdAndIdHook,
|
|
5908
5987
|
useUpdateByUserIdAndIdMutationOptions,
|
|
5988
|
+
useUpdateHook,
|
|
5989
|
+
useUpdateMutationOptions,
|
|
5909
5990
|
useUpdatePublicSettingByAppShortNameAndId,
|
|
5910
5991
|
useUpdatePublicSettingByAppShortNameAndIdHook,
|
|
5911
5992
|
useUpdatePublicSettingByAppShortNameAndIdMutationOptions,
|
|
@@ -5915,5 +5996,6 @@ export {
|
|
|
5915
5996
|
useUploadBundle,
|
|
5916
5997
|
useUploadBundleHook,
|
|
5917
5998
|
useUploadBundleMutationOptions,
|
|
5999
|
+
use_DeleteHook,
|
|
5918
6000
|
withStyleIsolation
|
|
5919
6001
|
};
|