@elevasis/ui 2.73.0 → 2.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.js +3 -3
- package/dist/app/index.d.ts +58 -0
- package/dist/app/index.js +9 -10
- package/dist/auth/index.js +5 -6
- package/dist/charts/index.js +5 -6
- package/dist/chunk-2GIJBHZT.js +60 -0
- package/dist/{chunk-ETN3TTRT.js → chunk-2MRRDF32.js} +115 -8
- package/dist/chunk-3LOKYZJC.js +231 -0
- package/dist/chunk-3QHX4ZKV.js +224 -0
- package/dist/chunk-43LC6XAX.js +69 -0
- package/dist/chunk-4M2BSHVT.js +116 -0
- package/dist/{chunk-SWKAH2YM.js → chunk-4MXNHJTA.js} +63 -30
- package/dist/{chunk-LZT2H2MA.js → chunk-5A6KCFS5.js} +36 -43
- package/dist/{chunk-OCVSPAKM.js → chunk-6JN2TLV2.js} +1150 -4346
- package/dist/{chunk-JYBJMVNY.js → chunk-7ARBBELS.js} +1 -1
- package/dist/{chunk-AJOVWB47.js → chunk-7RJ7P6S6.js} +6 -3
- package/dist/chunk-ARAFQBNI.js +515 -0
- package/dist/{chunk-Z4ICFQXG.js → chunk-BA3AZJUR.js} +1 -1
- package/dist/chunk-BRTGCFBH.js +305 -0
- package/dist/{chunk-IGBPWD6S.js → chunk-CQPULKKL.js} +5 -3
- package/dist/chunk-CRA7WQZH.js +49 -0
- package/dist/{chunk-U2H3TIHD.js → chunk-DCQKTDIG.js} +2 -52
- package/dist/{chunk-3TS5U5BL.js → chunk-E6YGA5WH.js} +1 -1
- package/dist/chunk-FA7LMNQO.js +439 -0
- package/dist/chunk-FZSG6M6W.js +45 -0
- package/dist/chunk-GDOR57D7.js +165 -0
- package/dist/{chunk-CJ2232PQ.js → chunk-GO4XJ5D4.js} +1 -1
- package/dist/chunk-GPQQGQGT.js +645 -0
- package/dist/chunk-HYQOGRWG.js +54 -0
- package/dist/{chunk-LEPYXLJ2.js → chunk-LN4UW6S4.js} +1 -1
- package/dist/chunk-N6K2Q5BM.js +393 -0
- package/dist/{chunk-NHNTX6ZL.js → chunk-O32UQ26A.js} +3 -2
- package/dist/{chunk-M7WWRZ5Z.js → chunk-QFGNRKIE.js} +1 -78
- package/dist/{chunk-IBCEAVB2.js → chunk-R5UGIFYU.js} +41 -5
- package/dist/{chunk-5B2ZFO44.js → chunk-RFNJ2PTO.js} +1 -1
- package/dist/chunk-VM2OWOXL.js +24 -0
- package/dist/{chunk-ZDKPHFTH.js → chunk-W2QRBQQA.js} +5 -3
- package/dist/chunk-WDBNW44Z.js +49 -0
- package/dist/{chunk-4CW2C5BD.js → chunk-WZU3MCKI.js} +1 -1
- package/dist/chunk-YQQ5GRUR.js +21 -0
- package/dist/{chunk-PQ4B62HH.js → chunk-ZFA56VSR.js} +2 -2
- package/dist/{chunk-NI37YNRP.js → chunk-ZWI62BQ6.js} +7 -4
- package/dist/chunk-ZYNVCWDZ.js +286 -0
- package/dist/components/index.d.ts +187 -2
- package/dist/components/index.js +44 -34
- package/dist/components/navigation/index.js +6 -7
- package/dist/features/auth/index.d.ts +78 -2
- package/dist/features/auth/index.js +18 -9
- package/dist/features/clients/index.js +7 -7
- package/dist/features/content/index.d.ts +226 -5
- package/dist/features/content/index.js +263 -15
- package/dist/features/crm/index.d.ts +58 -0
- package/dist/features/crm/index.js +10 -8
- package/dist/features/dashboard/index.js +9 -8
- package/dist/features/delivery/index.d.ts +58 -0
- package/dist/features/delivery/index.js +23 -7
- package/dist/features/knowledge/index.js +5 -6
- package/dist/features/lead-gen/index.d.ts +9 -15
- package/dist/features/lead-gen/index.js +12 -8
- package/dist/features/monitoring/index.js +11 -9
- package/dist/features/monitoring/requests/index.js +8 -7
- package/dist/features/operations/index.js +15 -11
- package/dist/features/public-agent-chat/index.js +3 -1
- package/dist/features/settings/index.d.ts +58 -0
- package/dist/features/settings/index.js +9 -8
- package/dist/hooks/access/index.js +5 -6
- package/dist/hooks/delivery/index.d.ts +58 -0
- package/dist/hooks/delivery/index.js +3 -2
- package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +1 -1
- package/dist/hooks/published.d.ts +175 -3
- package/dist/hooks/published.js +22 -6
- package/dist/initialization/index.d.ts +58 -0
- package/dist/knowledge/index.js +167 -11
- package/dist/{knowledge-search-index-RZLIVWPJ.js → knowledge-search-index-6GQK55IQ.js} +1 -1
- package/dist/layout/index.js +8 -9
- package/dist/profile/index.d.ts +58 -0
- package/dist/provider/index.d.ts +77 -1
- package/dist/provider/index.js +5 -6
- package/dist/provider/published.d.ts +105 -1
- package/dist/provider/published.js +5 -6
- package/dist/test-utils/index.d.ts +16 -5
- package/dist/test-utils/index.js +17 -18
- package/dist/types/index.d.ts +59 -1
- package/dist/utils/index.d.ts +83 -3
- package/dist/utils/index.js +1 -1
- package/package.json +6 -5
- package/dist/chunk-6M6OLGQY.js +0 -36
- package/dist/chunk-MKH2KOAO.js +0 -39
- package/dist/hooks/index.css +0 -659
- package/dist/hooks/index.d.ts +0 -14073
- package/dist/hooks/index.js +0 -27
- package/dist/supabase/index.d.ts +0 -7118
- package/dist/supabase/index.js +0 -3
- package/dist/typeform/index.d.ts +0 -462
- package/dist/typeform/index.js +0 -2051
- package/dist/typeform/schemas.d.ts +0 -67
- package/dist/typeform/schemas.js +0 -2
package/dist/api/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { createElevasisQueryClient } from '../chunk-
|
|
2
|
-
export { ApiClientProvider, useApiClient, useApiClientContext } from '../chunk-
|
|
1
|
+
export { createElevasisQueryClient } from '../chunk-RFNJ2PTO.js';
|
|
2
|
+
export { ApiClientProvider, useApiClient, useApiClientContext } from '../chunk-O32UQ26A.js';
|
|
3
3
|
import '../chunk-DD3CCMCZ.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-R5UGIFYU.js';
|
|
5
5
|
import '../chunk-Y6I3IC45.js';
|
|
6
6
|
import '../chunk-6SSQGWK7.js';
|
|
7
7
|
import '../chunk-TVTSASST.js';
|
package/dist/app/index.d.ts
CHANGED
|
@@ -1462,6 +1462,64 @@ type Database = {
|
|
|
1462
1462
|
}
|
|
1463
1463
|
];
|
|
1464
1464
|
};
|
|
1465
|
+
content_distribution_metrics: {
|
|
1466
|
+
Row: {
|
|
1467
|
+
captured_at: string;
|
|
1468
|
+
created_at: string;
|
|
1469
|
+
distribution_id: string;
|
|
1470
|
+
id: string;
|
|
1471
|
+
metrics: Json;
|
|
1472
|
+
organization_id: string;
|
|
1473
|
+
raw: Json;
|
|
1474
|
+
source: string;
|
|
1475
|
+
source_execution_id: string | null;
|
|
1476
|
+
};
|
|
1477
|
+
Insert: {
|
|
1478
|
+
captured_at?: string;
|
|
1479
|
+
created_at?: string;
|
|
1480
|
+
distribution_id: string;
|
|
1481
|
+
id?: string;
|
|
1482
|
+
metrics?: Json;
|
|
1483
|
+
organization_id: string;
|
|
1484
|
+
raw?: Json;
|
|
1485
|
+
source: string;
|
|
1486
|
+
source_execution_id?: string | null;
|
|
1487
|
+
};
|
|
1488
|
+
Update: {
|
|
1489
|
+
captured_at?: string;
|
|
1490
|
+
created_at?: string;
|
|
1491
|
+
distribution_id?: string;
|
|
1492
|
+
id?: string;
|
|
1493
|
+
metrics?: Json;
|
|
1494
|
+
organization_id?: string;
|
|
1495
|
+
raw?: Json;
|
|
1496
|
+
source?: string;
|
|
1497
|
+
source_execution_id?: string | null;
|
|
1498
|
+
};
|
|
1499
|
+
Relationships: [
|
|
1500
|
+
{
|
|
1501
|
+
foreignKeyName: "content_distribution_metrics_distribution_fkey";
|
|
1502
|
+
columns: ["distribution_id", "organization_id"];
|
|
1503
|
+
isOneToOne: false;
|
|
1504
|
+
referencedRelation: "content_distributions";
|
|
1505
|
+
referencedColumns: ["id", "organization_id"];
|
|
1506
|
+
},
|
|
1507
|
+
{
|
|
1508
|
+
foreignKeyName: "content_distribution_metrics_organization_id_fkey";
|
|
1509
|
+
columns: ["organization_id"];
|
|
1510
|
+
isOneToOne: false;
|
|
1511
|
+
referencedRelation: "organizations";
|
|
1512
|
+
referencedColumns: ["id"];
|
|
1513
|
+
},
|
|
1514
|
+
{
|
|
1515
|
+
foreignKeyName: "content_distribution_metrics_source_execution_id_fkey";
|
|
1516
|
+
columns: ["source_execution_id"];
|
|
1517
|
+
isOneToOne: false;
|
|
1518
|
+
referencedRelation: "execution_logs";
|
|
1519
|
+
referencedColumns: ["execution_id"];
|
|
1520
|
+
}
|
|
1521
|
+
];
|
|
1522
|
+
};
|
|
1465
1523
|
content_distributions: {
|
|
1466
1524
|
Row: {
|
|
1467
1525
|
adapted_body: string | null;
|
package/dist/app/index.js
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { AppErrorBoundary } from '../chunk-
|
|
2
|
-
import { SidebarProvider, AppShellContainer, Sidebar, AppShellRightSideContainer, AppShellRightSideOuterContainer } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
1
|
+
import { AppErrorBoundary } from '../chunk-LN4UW6S4.js';
|
|
2
|
+
import { SidebarProvider, AppShellContainer, Sidebar, AppShellRightSideContainer, AppShellRightSideOuterContainer } from '../chunk-GO4XJ5D4.js';
|
|
3
|
+
import '../chunk-BA3AZJUR.js';
|
|
4
|
+
import '../chunk-E6YGA5WH.js';
|
|
5
5
|
import '../chunk-BZZCNLT6.js';
|
|
6
|
-
import { useSessionCheck, ElevasisSystemsProvider, useElevasisSystems, SystemShell, ElevasisUIProvider } from '../chunk-
|
|
6
|
+
import { useSessionCheck, ElevasisSystemsProvider, useElevasisSystems, SystemShell, ElevasisUIProvider } from '../chunk-6JN2TLV2.js';
|
|
7
7
|
import '../chunk-R6NMRXNO.js';
|
|
8
8
|
import '../chunk-RBGVNPA6.js';
|
|
9
|
-
import '../chunk-
|
|
10
|
-
import '../chunk-NHNTX6ZL.js';
|
|
9
|
+
import '../chunk-O32UQ26A.js';
|
|
11
10
|
import '../chunk-L7BZZ4SI.js';
|
|
12
|
-
import '../chunk-
|
|
11
|
+
import '../chunk-HYQOGRWG.js';
|
|
13
12
|
import '../chunk-MISHPEJX.js';
|
|
14
13
|
import '../chunk-62GVNH5U.js';
|
|
15
14
|
import { useInitialization } from '../chunk-P45GQ3ZW.js';
|
|
16
|
-
import '../chunk-
|
|
15
|
+
import '../chunk-2GIJBHZT.js';
|
|
17
16
|
import '../chunk-3KMDHCAR.js';
|
|
18
17
|
import { TanStackRouterBridge, ScrollToTop } from '../chunk-2IFYDILW.js';
|
|
19
18
|
import '../chunk-BLXJEIQS.js';
|
|
@@ -21,7 +20,7 @@ import '../chunk-UD657ICS.js';
|
|
|
21
20
|
import '../chunk-DD3CCMCZ.js';
|
|
22
21
|
import '../chunk-RNP5R5I3.js';
|
|
23
22
|
import '../chunk-RT4KRGZT.js';
|
|
24
|
-
import '../chunk-
|
|
23
|
+
import '../chunk-R5UGIFYU.js';
|
|
25
24
|
import '../chunk-Y6I3IC45.js';
|
|
26
25
|
import '../chunk-6SSQGWK7.js';
|
|
27
26
|
import '../chunk-BI5VDO2K.js';
|
package/dist/auth/index.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
export { AccessGuard, AccessKeys, ProtectedRoute, useSessionCheck as useRefocusSessionCheck, useSessionCheck, useStableAccessToken } from '../chunk-
|
|
1
|
+
export { AccessGuard, AccessKeys, ProtectedRoute, useSessionCheck as useRefocusSessionCheck, useSessionCheck, useStableAccessToken } from '../chunk-6JN2TLV2.js';
|
|
2
2
|
import '../chunk-R6NMRXNO.js';
|
|
3
3
|
import '../chunk-RBGVNPA6.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-NHNTX6ZL.js';
|
|
4
|
+
import '../chunk-O32UQ26A.js';
|
|
6
5
|
import '../chunk-L7BZZ4SI.js';
|
|
7
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-HYQOGRWG.js';
|
|
8
7
|
import '../chunk-MISHPEJX.js';
|
|
9
8
|
import '../chunk-62GVNH5U.js';
|
|
10
9
|
import '../chunk-P45GQ3ZW.js';
|
|
11
|
-
import '../chunk-
|
|
10
|
+
import '../chunk-2GIJBHZT.js';
|
|
12
11
|
import '../chunk-3KMDHCAR.js';
|
|
13
12
|
import '../chunk-2IFYDILW.js';
|
|
14
13
|
import '../chunk-BLXJEIQS.js';
|
|
@@ -16,7 +15,7 @@ import '../chunk-UD657ICS.js';
|
|
|
16
15
|
import '../chunk-DD3CCMCZ.js';
|
|
17
16
|
import '../chunk-RNP5R5I3.js';
|
|
18
17
|
import '../chunk-RT4KRGZT.js';
|
|
19
|
-
import '../chunk-
|
|
18
|
+
import '../chunk-R5UGIFYU.js';
|
|
20
19
|
import '../chunk-Y6I3IC45.js';
|
|
21
20
|
import '../chunk-6SSQGWK7.js';
|
|
22
21
|
import '../chunk-BI5VDO2K.js';
|
package/dist/charts/index.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
export { ActivityTrendChart, ChartFrame, CombinedTrendChart, CostTrendChart, CyberAreaChart, CyberDonut, CyberDonutTooltip, CyberLegendItem, HeroStatsRow, getSeriesColor, useCyberColors } from '../chunk-
|
|
1
|
+
export { ActivityTrendChart, ChartFrame, CombinedTrendChart, CostTrendChart, CyberAreaChart, CyberDonut, CyberDonutTooltip, CyberLegendItem, HeroStatsRow, getSeriesColor, useCyberColors } from '../chunk-6JN2TLV2.js';
|
|
2
2
|
import '../chunk-R6NMRXNO.js';
|
|
3
3
|
import '../chunk-RBGVNPA6.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-NHNTX6ZL.js';
|
|
4
|
+
import '../chunk-O32UQ26A.js';
|
|
6
5
|
import '../chunk-L7BZZ4SI.js';
|
|
7
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-HYQOGRWG.js';
|
|
8
7
|
import '../chunk-MISHPEJX.js';
|
|
9
8
|
import '../chunk-62GVNH5U.js';
|
|
10
9
|
import '../chunk-P45GQ3ZW.js';
|
|
11
|
-
import '../chunk-
|
|
10
|
+
import '../chunk-2GIJBHZT.js';
|
|
12
11
|
import '../chunk-3KMDHCAR.js';
|
|
13
12
|
import '../chunk-2IFYDILW.js';
|
|
14
13
|
import '../chunk-BLXJEIQS.js';
|
|
@@ -16,7 +15,7 @@ import '../chunk-UD657ICS.js';
|
|
|
16
15
|
import '../chunk-DD3CCMCZ.js';
|
|
17
16
|
import '../chunk-RNP5R5I3.js';
|
|
18
17
|
import '../chunk-RT4KRGZT.js';
|
|
19
|
-
import '../chunk-
|
|
18
|
+
import '../chunk-R5UGIFYU.js';
|
|
20
19
|
import '../chunk-Y6I3IC45.js';
|
|
21
20
|
import '../chunk-6SSQGWK7.js';
|
|
22
21
|
import '../chunk-BI5VDO2K.js';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { UuidSchema } from './chunk-TVTSASST.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
var SessionIdParamSchema = z.object({
|
|
5
|
+
sessionId: UuidSchema
|
|
6
|
+
}).strict();
|
|
7
|
+
var ExecutionIdParamsSchema = z.object({
|
|
8
|
+
sessionId: UuidSchema,
|
|
9
|
+
executionId: UuidSchema
|
|
10
|
+
}).strict();
|
|
11
|
+
var CreateSessionSchema = z.object({
|
|
12
|
+
resourceId: z.string().min(1).max(100),
|
|
13
|
+
userId: UuidSchema.optional(),
|
|
14
|
+
metadata: z.any().optional()
|
|
15
|
+
}).strict();
|
|
16
|
+
z.object({
|
|
17
|
+
input: z.unknown().refine(
|
|
18
|
+
(val) => {
|
|
19
|
+
let text;
|
|
20
|
+
if (typeof val === "string") {
|
|
21
|
+
text = val;
|
|
22
|
+
} else if (val && typeof val === "object" && "message" in val) {
|
|
23
|
+
text = String(val.message);
|
|
24
|
+
} else {
|
|
25
|
+
text = JSON.stringify(val);
|
|
26
|
+
}
|
|
27
|
+
return text.length > 0 && text.length <= 1e5;
|
|
28
|
+
},
|
|
29
|
+
{ message: "Input must be between 1 and 100,000 characters" }
|
|
30
|
+
),
|
|
31
|
+
metadata: z.any().optional()
|
|
32
|
+
}).strict();
|
|
33
|
+
z.object({
|
|
34
|
+
userId: UuidSchema.optional(),
|
|
35
|
+
resourceId: z.string().optional(),
|
|
36
|
+
limit: z.coerce.number().int().min(1).max(100).default(20)
|
|
37
|
+
}).strict();
|
|
38
|
+
z.object({
|
|
39
|
+
limit: z.coerce.number().int().min(1).max(100).default(100),
|
|
40
|
+
cursor: z.coerce.number().int().min(0).optional()
|
|
41
|
+
}).strict();
|
|
42
|
+
var WebSocketSessionTurnSchema = z.object({
|
|
43
|
+
type: z.literal("session:turn"),
|
|
44
|
+
input: z.unknown().refine(
|
|
45
|
+
(val) => {
|
|
46
|
+
let text;
|
|
47
|
+
if (typeof val === "string") {
|
|
48
|
+
text = val;
|
|
49
|
+
} else if (val && typeof val === "object" && "message" in val) {
|
|
50
|
+
text = String(val.message);
|
|
51
|
+
} else {
|
|
52
|
+
text = JSON.stringify(val) || "";
|
|
53
|
+
}
|
|
54
|
+
return text && text.length > 0 && text.length <= 1e5;
|
|
55
|
+
},
|
|
56
|
+
{ message: "Input must be between 1 and 100,000 characters" }
|
|
57
|
+
)
|
|
58
|
+
}).strict();
|
|
59
|
+
|
|
60
|
+
export { CreateSessionSchema, ExecutionIdParamsSchema, SessionIdParamSchema, WebSocketSessionTurnSchema };
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import { SubshellLoader } from './chunk-
|
|
2
|
-
import { CollapsibleJsonSection, ExecutionStats, UnifiedWorkflowGraph, WorkflowExecutionTimeline, AgentExecutionVisualizer, AgentExecutionTimeline, AgentIterationDetailPanel } from './chunk-
|
|
1
|
+
import { SubshellLoader } from './chunk-BA3AZJUR.js';
|
|
2
|
+
import { CollapsibleJsonSection, ExecutionStats, UnifiedWorkflowGraph, WorkflowExecutionTimeline, AgentExecutionVisualizer, AgentExecutionTimeline, AgentIterationDetailPanel } from './chunk-W2QRBQQA.js';
|
|
3
|
+
import { useCommandViewData, useCommandViewStats, useCommandViewStore, useResourceExecutions, useCheckpointTasks, useSessionMessages, useSessionWebSocket, useSessionExecutions } from './chunk-FA7LMNQO.js';
|
|
4
|
+
import { findNavigationSurfaceForSystem, getSystemApiInterfaceReadiness } from './chunk-CRA7WQZH.js';
|
|
3
5
|
import { FormFieldRenderer } from './chunk-3MEXPLWT.js';
|
|
4
6
|
import { ChatInterface, ChatHeader } from './chunk-SNZDFCOQ.js';
|
|
5
|
-
import {
|
|
7
|
+
import { mergeSessionMessages } from './chunk-QFGNRKIE.js';
|
|
8
|
+
import { ResourceHealthPanel } from './chunk-WZU3MCKI.js';
|
|
6
9
|
import { Graph_module_css_default } from './chunk-HENXLGVD.js';
|
|
7
|
-
import { AppShellLoader } from './chunk-
|
|
10
|
+
import { AppShellLoader } from './chunk-E6YGA5WH.js';
|
|
8
11
|
import { PageContainer } from './chunk-BZZCNLT6.js';
|
|
9
|
-
import { DEFAULT_ORGANIZATION_GRAPH_FILTERS, resolveSemanticIconComponent, CustomModal, useAppearance, useErrorDetail, JsonViewer, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, ConfirmationModal, PageTitleCaption, CollapsibleSection, useStatusFilter, useResourceSearch, useResourcesDomainFilters, usePaginationState, useResources, useRecentExecutionsByResource, filterByDomainFilters, TabCountBadge, ResourceCard, useResourceDefinition, isSessionCapable, useOptionalElevasisSystems, useDeleteTask, useCommandQueue, useSubmitAction, useCommandQueueTask, ContextViewer, useElevasisSystems,
|
|
10
|
-
import { showApiErrorNotification, showSuccessNotification } from './chunk-
|
|
12
|
+
import { DEFAULT_ORGANIZATION_GRAPH_FILTERS, resolveSemanticIconComponent, CustomModal, useAppearance, useErrorDetail, JsonViewer, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, ConfirmationModal, PageTitleCaption, CollapsibleSection, useStatusFilter, useResourceSearch, useResourcesDomainFilters, usePaginationState, useResources, useRecentExecutionsByResource, filterByDomainFilters, TabCountBadge, ResourceCard, useResourceDefinition, isSessionCapable, useOptionalElevasisSystems, useDeleteTask, useCommandQueue, useSubmitAction, useCommandQueueTask, ContextViewer, useElevasisSystems, buildOrganizationGraph, EmptyState, useExecutionPanelState, useSessions, SessionListItem, useDeleteSession, useEndSession, useCreateSession, useSession, getSessionView, SubshellContentContainer, collectResourceFilterFacets, SemanticIcon, useSystemsViewState, aggregateSystemMetrics, useSystemHealth, ORGANIZATION_GRAPH_NODE_KIND_ORDER, formatResourceAttribution, SYSTEM_RESOURCE_KINDS, ORGANIZATION_GRAPH_NODE_KIND_LABELS, ORGANIZATION_GRAPH_EDGE_KIND_LABELS, ORGANIZATION_GRAPH_NODE_KIND_DETAIL_LABELS, ORGANIZATION_GRAPH_NODE_KIND_MEANINGS, ORGANIZATION_GRAPH_EDGE_KIND_MEANINGS } from './chunk-6JN2TLV2.js';
|
|
13
|
+
import { showApiErrorNotification, showSuccessNotification } from './chunk-HYQOGRWG.js';
|
|
11
14
|
import { topbarHeight } from './chunk-MISHPEJX.js';
|
|
12
15
|
import { CardHeader } from './chunk-62GVNH5U.js';
|
|
13
16
|
import { useInitialization } from './chunk-P45GQ3ZW.js';
|
|
14
|
-
import { mergeSessionMessages } from './chunk-M7WWRZ5Z.js';
|
|
15
17
|
import { StyledMarkdown } from './chunk-3KMDHCAR.js';
|
|
16
18
|
import { getResourceStatusColor, useMergedExecution, useTimelineData, useAgentIterationData } from './chunk-BLXJEIQS.js';
|
|
17
19
|
import { useOrganization } from './chunk-DD3CCMCZ.js';
|
|
18
|
-
import { getErrorInfo, formatErrorMessage, getResourceIcon, formatRelativeTime, PAGE_SIZE_DEFAULT, listAllSystems, getSystem, compileOrganizationOntology, getSystemAncestors } from './chunk-
|
|
20
|
+
import { getErrorInfo, formatErrorMessage, getResourceIcon, formatRelativeTime, PAGE_SIZE_DEFAULT, listAllSystems, getSystem, compileOrganizationOntology, getSystemAncestors } from './chunk-R5UGIFYU.js';
|
|
19
21
|
import { ResourceStatusColors, toWorkflowLogMessages } from './chunk-6SSQGWK7.js';
|
|
20
22
|
import { useElevasisServices } from './chunk-BI5VDO2K.js';
|
|
21
23
|
import { useRouterContext } from './chunk-Q7DJKLEN.js';
|
|
@@ -10759,6 +10761,110 @@ function ResourcesSection({ resources }) {
|
|
|
10759
10761
|
] }, resource.id)) })
|
|
10760
10762
|
] }) });
|
|
10761
10763
|
}
|
|
10764
|
+
function buildAdoptionRows(model, systems) {
|
|
10765
|
+
const { resolvedSystems, shellModel, shellRuntime } = systems;
|
|
10766
|
+
return listAllSystems(model).map(({ path, system }) => {
|
|
10767
|
+
const navSurface = findNavigationSurfaceForSystem(model, path, system.id);
|
|
10768
|
+
const module = resolvedSystems.find(
|
|
10769
|
+
(candidate) => candidate.systemId === path || candidate.systemId === system.id
|
|
10770
|
+
);
|
|
10771
|
+
const shellPath = shellModel.findById(path)?.path;
|
|
10772
|
+
const routeMounted = shellPath !== void 0 && shellRuntime.resolveRoute(shellPath).status === "matched";
|
|
10773
|
+
const unlinkedManifest = module === void 0 && shellPath !== void 0 ? resolvedSystems.filter((candidate) => candidate.systemId === void 0).flatMap(
|
|
10774
|
+
(candidate) => (candidate.routePrefixes ?? []).filter((prefix) => shellPath === prefix || shellPath.startsWith(`${prefix}/`)).map((prefix) => ({ key: candidate.key, prefix }))
|
|
10775
|
+
).sort((a, b) => b.prefix.length - a.prefix.length)[0] : void 0;
|
|
10776
|
+
return {
|
|
10777
|
+
path,
|
|
10778
|
+
system,
|
|
10779
|
+
lifecycle: system.lifecycle ?? "active",
|
|
10780
|
+
navSurfaceLabel: navSurface?.label,
|
|
10781
|
+
routeMounted,
|
|
10782
|
+
manifestMounted: module !== void 0,
|
|
10783
|
+
unlinkedManifestKey: unlinkedManifest?.key,
|
|
10784
|
+
apiReadiness: getSystemApiInterfaceReadiness(model, path)
|
|
10785
|
+
};
|
|
10786
|
+
}).sort((a, b) => a.path.localeCompare(b.path));
|
|
10787
|
+
}
|
|
10788
|
+
function adoptionGaps(row) {
|
|
10789
|
+
const gaps = [];
|
|
10790
|
+
if (row.lifecycle !== "active") {
|
|
10791
|
+
gaps.push(`Lifecycle is "${row.lifecycle}" -- flip to "active" in systems.ts to make it reachable.`);
|
|
10792
|
+
}
|
|
10793
|
+
if (!row.navSurfaceLabel) {
|
|
10794
|
+
gaps.push("No navigation.sidebar surface targets this System -- reachable only by typing the URL.");
|
|
10795
|
+
}
|
|
10796
|
+
if (!row.routeMounted) {
|
|
10797
|
+
gaps.push("No mounted route currently resolves this System\u2019s path.");
|
|
10798
|
+
}
|
|
10799
|
+
if (!row.manifestMounted) {
|
|
10800
|
+
gaps.push(
|
|
10801
|
+
row.unlinkedManifestKey ? `The "${row.unlinkedManifestKey}" manifest owns this route but declares no systemId, so the shell never links it to this System.` : "Not present in the shell\u2019s SYSTEM_MANIFESTS."
|
|
10802
|
+
);
|
|
10803
|
+
}
|
|
10804
|
+
if (row.apiReadiness.declared && !row.apiReadiness.ready) {
|
|
10805
|
+
gaps.push(row.apiReadiness.reason ?? "Declared apiInterface is not ready.");
|
|
10806
|
+
}
|
|
10807
|
+
return gaps;
|
|
10808
|
+
}
|
|
10809
|
+
function AdoptionBooleanBadge({ ok, okLabel, missingLabel }) {
|
|
10810
|
+
if (ok) {
|
|
10811
|
+
return /* @__PURE__ */ jsx(Badge, { color: "green", variant: "light", leftSection: /* @__PURE__ */ jsx(IconCheck, { size: 12 }), children: okLabel });
|
|
10812
|
+
}
|
|
10813
|
+
return /* @__PURE__ */ jsx(Badge, { color: "red", variant: "light", leftSection: /* @__PURE__ */ jsx(IconX, { size: 12 }), children: missingLabel });
|
|
10814
|
+
}
|
|
10815
|
+
function SystemAdoptionReport({ model, onNavigate }) {
|
|
10816
|
+
const systems = useElevasisSystems();
|
|
10817
|
+
const rows = buildAdoptionRows(model, systems);
|
|
10818
|
+
if (rows.length === 0) {
|
|
10819
|
+
return /* @__PURE__ */ jsx(
|
|
10820
|
+
EmptyState,
|
|
10821
|
+
{
|
|
10822
|
+
icon: IconRoute,
|
|
10823
|
+
title: "No declared Systems",
|
|
10824
|
+
description: "Declare a System in systems.ts to see it here."
|
|
10825
|
+
}
|
|
10826
|
+
);
|
|
10827
|
+
}
|
|
10828
|
+
return /* @__PURE__ */ jsx(Paper, { withBorder: true, p: "md", radius: "md", children: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
10829
|
+
/* @__PURE__ */ jsxs(Stack, { gap: 4, children: [
|
|
10830
|
+
/* @__PURE__ */ jsx(Title, { order: 2, size: "h5", children: "Adoption Report" }),
|
|
10831
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: "Every System declared in the organization model, with its lifecycle, navigation surface, mounted route, manifest, and API Interface readiness. Missing wiring is called out in plain language." })
|
|
10832
|
+
] }),
|
|
10833
|
+
/* @__PURE__ */ jsx(Card, { withBorder: true, padding: 0, radius: "sm", children: /* @__PURE__ */ jsxs(Table, { verticalSpacing: "xs", horizontalSpacing: "md", children: [
|
|
10834
|
+
/* @__PURE__ */ jsx(Table.Thead, { children: /* @__PURE__ */ jsxs(Table.Tr, { children: [
|
|
10835
|
+
/* @__PURE__ */ jsx(Table.Th, { children: "System" }),
|
|
10836
|
+
/* @__PURE__ */ jsx(Table.Th, { children: "Lifecycle" }),
|
|
10837
|
+
/* @__PURE__ */ jsx(Table.Th, { children: "Nav surface" }),
|
|
10838
|
+
/* @__PURE__ */ jsx(Table.Th, { children: "Route" }),
|
|
10839
|
+
/* @__PURE__ */ jsx(Table.Th, { children: "Manifest" }),
|
|
10840
|
+
/* @__PURE__ */ jsx(Table.Th, { children: "API readiness" }),
|
|
10841
|
+
/* @__PURE__ */ jsx(Table.Th, { children: "What's missing" })
|
|
10842
|
+
] }) }),
|
|
10843
|
+
/* @__PURE__ */ jsx(Table.Tbody, { children: rows.map((row) => {
|
|
10844
|
+
const gaps = adoptionGaps(row);
|
|
10845
|
+
return /* @__PURE__ */ jsxs(Table.Tr, { children: [
|
|
10846
|
+
/* @__PURE__ */ jsxs(Table.Td, { children: [
|
|
10847
|
+
/* @__PURE__ */ jsx(Anchor, { size: "sm", component: "button", onClick: () => onNavigate(row.path), children: row.system.label ?? row.system.id }),
|
|
10848
|
+
/* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: row.path })
|
|
10849
|
+
] }),
|
|
10850
|
+
/* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsx(Badge, { variant: "light", color: row.lifecycle === "active" ? "green" : "gray", children: row.lifecycle }) }),
|
|
10851
|
+
/* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsx(
|
|
10852
|
+
AdoptionBooleanBadge,
|
|
10853
|
+
{
|
|
10854
|
+
ok: row.navSurfaceLabel !== void 0,
|
|
10855
|
+
okLabel: row.navSurfaceLabel ?? "present",
|
|
10856
|
+
missingLabel: "none"
|
|
10857
|
+
}
|
|
10858
|
+
) }),
|
|
10859
|
+
/* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsx(AdoptionBooleanBadge, { ok: row.routeMounted, okLabel: "mounted", missingLabel: "none" }) }),
|
|
10860
|
+
/* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsx(AdoptionBooleanBadge, { ok: row.manifestMounted, okLabel: "mounted", missingLabel: "none" }) }),
|
|
10861
|
+
/* @__PURE__ */ jsx(Table.Td, { children: row.apiReadiness.declared ? /* @__PURE__ */ jsx(AdoptionBooleanBadge, { ok: row.apiReadiness.ready, okLabel: "ready", missingLabel: "not ready" }) : /* @__PURE__ */ jsx(Badge, { variant: "light", color: "gray", children: "not declared" }) }),
|
|
10862
|
+
/* @__PURE__ */ jsx(Table.Td, { children: gaps.length === 0 ? /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: "Fully wired." }) : /* @__PURE__ */ jsx(Stack, { gap: 2, children: gaps.map((gap, index) => /* @__PURE__ */ jsx(Text, { size: "xs", children: gap }, index)) }) })
|
|
10863
|
+
] }, row.path);
|
|
10864
|
+
}) })
|
|
10865
|
+
] }) })
|
|
10866
|
+
] }) });
|
|
10867
|
+
}
|
|
10762
10868
|
function SystemsIndex({ model, onNavigate }) {
|
|
10763
10869
|
const searchQuery = useSystemsViewState((state) => state.searchQuery);
|
|
10764
10870
|
const statusFilter = useSystemsViewState((state) => state.statusFilter);
|
|
@@ -10799,6 +10905,7 @@ function SystemsIndex({ model, onNavigate }) {
|
|
|
10799
10905
|
/* @__PURE__ */ jsx(MetricCard2, { label: "Health", value: "--", detail: "System endpoint pending" })
|
|
10800
10906
|
] })
|
|
10801
10907
|
] }) }),
|
|
10908
|
+
/* @__PURE__ */ jsx(SystemAdoptionReport, { model, onNavigate }),
|
|
10802
10909
|
entries.length > 0 ? /* @__PURE__ */ jsx(SimpleGrid, { cols: 1, spacing: "md", children: entries.map((entry) => /* @__PURE__ */ jsx(SystemSummaryPaper, { entry, rollupMode, onNavigate }, entry.path)) }) : /* @__PURE__ */ jsx(
|
|
10803
10910
|
EmptyState,
|
|
10804
10911
|
{
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { useNotificationAdapter } from './chunk-6JN2TLV2.js';
|
|
2
|
+
import { useElevasisServices } from './chunk-BI5VDO2K.js';
|
|
3
|
+
import { CredentialNameSchema, UuidSchema } from './chunk-TVTSASST.js';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
|
|
6
|
+
import { notifications } from '@mantine/notifications';
|
|
7
|
+
|
|
8
|
+
var CredentialTypeSchema = z.enum([
|
|
9
|
+
"oauth",
|
|
10
|
+
"api-key",
|
|
11
|
+
"webhook-secret",
|
|
12
|
+
"api-key-secret",
|
|
13
|
+
"clickup",
|
|
14
|
+
"instagram"
|
|
15
|
+
]);
|
|
16
|
+
var CredentialValueSchema = z.record(z.string(), z.unknown()).refine((val) => Object.keys(val).length > 0, { message: "Credential value must not be empty" }).refine((val) => Object.keys(val).length <= 50, { message: "Credential value has too many keys (max 50)" }).refine(
|
|
17
|
+
(val) => {
|
|
18
|
+
for (const v of Object.values(val)) {
|
|
19
|
+
if (typeof v === "string" && v.length > 10240) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return true;
|
|
24
|
+
},
|
|
25
|
+
{ message: "Individual credential values too large (max 10KB per string)" }
|
|
26
|
+
);
|
|
27
|
+
var CreateCredentialRequestSchema = z.object({
|
|
28
|
+
name: CredentialNameSchema,
|
|
29
|
+
type: CredentialTypeSchema,
|
|
30
|
+
value: CredentialValueSchema,
|
|
31
|
+
provider: z.string().optional()
|
|
32
|
+
// OAuth provider ID ('dropbox', 'notion', 'google-sheets')
|
|
33
|
+
}).strict();
|
|
34
|
+
var CreateCredentialResponseSchema = z.object({
|
|
35
|
+
id: UuidSchema,
|
|
36
|
+
name: z.string()
|
|
37
|
+
});
|
|
38
|
+
var ListCredentialsResponseSchema = z.object({
|
|
39
|
+
credentials: z.array(
|
|
40
|
+
z.object({
|
|
41
|
+
id: UuidSchema,
|
|
42
|
+
name: z.string(),
|
|
43
|
+
type: z.string(),
|
|
44
|
+
provider: z.string().nullable(),
|
|
45
|
+
// OAuth provider or null for non-OAuth
|
|
46
|
+
createdAt: z.string().datetime()
|
|
47
|
+
})
|
|
48
|
+
)
|
|
49
|
+
});
|
|
50
|
+
var UpdateCredentialParamsSchema = z.object({
|
|
51
|
+
credentialId: UuidSchema
|
|
52
|
+
});
|
|
53
|
+
var UpdateCredentialRequestSchema = z.object({
|
|
54
|
+
value: CredentialValueSchema.optional(),
|
|
55
|
+
name: CredentialNameSchema.optional()
|
|
56
|
+
}).strict().refine((data) => data.value !== void 0 || data.name !== void 0, {
|
|
57
|
+
message: "At least one field (value or name) must be provided"
|
|
58
|
+
});
|
|
59
|
+
var DeleteCredentialParamsSchema = z.object({
|
|
60
|
+
credentialId: UuidSchema
|
|
61
|
+
});
|
|
62
|
+
var VerifyCredentialParamsSchema = z.object({
|
|
63
|
+
credentialId: UuidSchema
|
|
64
|
+
});
|
|
65
|
+
var VerifyCredentialResponseSchema = z.object({
|
|
66
|
+
ok: z.boolean(),
|
|
67
|
+
provider: z.string(),
|
|
68
|
+
checkedAt: z.string().datetime(),
|
|
69
|
+
message: z.string().optional(),
|
|
70
|
+
details: z.record(z.string(), z.unknown()).optional()
|
|
71
|
+
});
|
|
72
|
+
var CredentialSchemas = {
|
|
73
|
+
CreateRequest: CreateCredentialRequestSchema,
|
|
74
|
+
CreateResponse: CreateCredentialResponseSchema,
|
|
75
|
+
ListResponse: ListCredentialsResponseSchema,
|
|
76
|
+
UpdateParams: UpdateCredentialParamsSchema,
|
|
77
|
+
UpdateRequest: UpdateCredentialRequestSchema,
|
|
78
|
+
DeleteParams: DeleteCredentialParamsSchema,
|
|
79
|
+
VerifyParams: VerifyCredentialParamsSchema,
|
|
80
|
+
VerifyResponse: VerifyCredentialResponseSchema
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// src/hooks/settings/credentials/credentialService.ts
|
|
84
|
+
var CredentialService = class {
|
|
85
|
+
constructor(apiRequest) {
|
|
86
|
+
this.apiRequest = apiRequest;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* List credentials for the current organization
|
|
90
|
+
* Organization context is provided via workos-organization-id header
|
|
91
|
+
*/
|
|
92
|
+
async listCredentials() {
|
|
93
|
+
const response = await this.apiRequest("/credentials");
|
|
94
|
+
return response.credentials;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Create a new credential
|
|
98
|
+
* Organization context is provided via workos-organization-id header
|
|
99
|
+
*/
|
|
100
|
+
async createCredential(data) {
|
|
101
|
+
const validated = CredentialSchemas.CreateRequest.parse(data);
|
|
102
|
+
return await this.apiRequest(`/credentials`, {
|
|
103
|
+
method: "POST",
|
|
104
|
+
body: JSON.stringify(validated)
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Update a credential value or metadata
|
|
109
|
+
* Organization context is provided via workos-organization-id header
|
|
110
|
+
*/
|
|
111
|
+
async updateCredential(credentialId, updates) {
|
|
112
|
+
CredentialSchemas.UpdateParams.parse({ credentialId });
|
|
113
|
+
const validated = CredentialSchemas.UpdateRequest.parse(updates);
|
|
114
|
+
await this.apiRequest(`/credentials/${credentialId}`, {
|
|
115
|
+
method: "PATCH",
|
|
116
|
+
body: JSON.stringify(validated)
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Delete a credential
|
|
121
|
+
* Organization context is provided via workos-organization-id header
|
|
122
|
+
*/
|
|
123
|
+
async deleteCredential(credentialId) {
|
|
124
|
+
CredentialSchemas.DeleteParams.parse({ credentialId });
|
|
125
|
+
await this.apiRequest(`/credentials/${credentialId}`, {
|
|
126
|
+
method: "DELETE"
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Verify a credential server-side without exposing secret material
|
|
131
|
+
*/
|
|
132
|
+
async verifyCredential(credentialId) {
|
|
133
|
+
CredentialSchemas.VerifyParams.parse({ credentialId });
|
|
134
|
+
const response = await this.apiRequest(`/credentials/${credentialId}/verify`, {
|
|
135
|
+
method: "POST"
|
|
136
|
+
});
|
|
137
|
+
return CredentialSchemas.VerifyResponse.parse(response);
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
function useCredentials() {
|
|
141
|
+
const { apiRequest, workOSOrganizationId, isReady } = useElevasisServices();
|
|
142
|
+
return useQuery({
|
|
143
|
+
queryKey: ["credentials", workOSOrganizationId],
|
|
144
|
+
queryFn: async () => {
|
|
145
|
+
const service = new CredentialService(apiRequest);
|
|
146
|
+
return await service.listCredentials();
|
|
147
|
+
},
|
|
148
|
+
enabled: isReady && Boolean(workOSOrganizationId),
|
|
149
|
+
retry: false
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
function useVerifyCredential() {
|
|
153
|
+
const { apiRequest } = useElevasisServices();
|
|
154
|
+
return useMutation({
|
|
155
|
+
mutationFn: async (credentialId) => {
|
|
156
|
+
const service = new CredentialService(apiRequest);
|
|
157
|
+
return await service.verifyCredential(credentialId);
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
function useCreateCredential() {
|
|
162
|
+
const { apiRequest } = useElevasisServices();
|
|
163
|
+
const adapter = useNotificationAdapter();
|
|
164
|
+
const queryClient = useQueryClient();
|
|
165
|
+
return useMutation({
|
|
166
|
+
mutationFn: async (data) => {
|
|
167
|
+
const service = new CredentialService(apiRequest);
|
|
168
|
+
return await service.createCredential(data);
|
|
169
|
+
},
|
|
170
|
+
onSuccess: () => {
|
|
171
|
+
queryClient.invalidateQueries({ queryKey: ["credentials"] });
|
|
172
|
+
notifications.show({
|
|
173
|
+
title: "Success",
|
|
174
|
+
message: "Credential created successfully",
|
|
175
|
+
color: "green"
|
|
176
|
+
});
|
|
177
|
+
},
|
|
178
|
+
onError: (error) => {
|
|
179
|
+
console.error("Failed to create credential:", error);
|
|
180
|
+
adapter.apiError(error);
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
function useDeleteCredential() {
|
|
185
|
+
const { apiRequest } = useElevasisServices();
|
|
186
|
+
const adapter = useNotificationAdapter();
|
|
187
|
+
const queryClient = useQueryClient();
|
|
188
|
+
return useMutation({
|
|
189
|
+
mutationFn: async (credentialId) => {
|
|
190
|
+
const service = new CredentialService(apiRequest);
|
|
191
|
+
return await service.deleteCredential(credentialId);
|
|
192
|
+
},
|
|
193
|
+
onSuccess: () => {
|
|
194
|
+
queryClient.invalidateQueries({ queryKey: ["credentials"] });
|
|
195
|
+
notifications.show({
|
|
196
|
+
title: "Success",
|
|
197
|
+
message: "Credential deleted successfully",
|
|
198
|
+
color: "green"
|
|
199
|
+
});
|
|
200
|
+
},
|
|
201
|
+
onError: (error) => {
|
|
202
|
+
console.error("Failed to delete credential:", error);
|
|
203
|
+
adapter.apiError(error);
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
function useUpdateCredential() {
|
|
208
|
+
const { apiRequest } = useElevasisServices();
|
|
209
|
+
const adapter = useNotificationAdapter();
|
|
210
|
+
const queryClient = useQueryClient();
|
|
211
|
+
return useMutation({
|
|
212
|
+
mutationFn: async ({ credentialId, updates }) => {
|
|
213
|
+
const service = new CredentialService(apiRequest);
|
|
214
|
+
return await service.updateCredential(credentialId, updates);
|
|
215
|
+
},
|
|
216
|
+
onSuccess: () => {
|
|
217
|
+
queryClient.invalidateQueries({ queryKey: ["credentials"] });
|
|
218
|
+
notifications.show({
|
|
219
|
+
title: "Success",
|
|
220
|
+
message: "Credential updated successfully",
|
|
221
|
+
color: "green"
|
|
222
|
+
});
|
|
223
|
+
},
|
|
224
|
+
onError: (error) => {
|
|
225
|
+
console.error("Failed to update credential:", error);
|
|
226
|
+
adapter.apiError(error);
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export { CredentialSchemas, CredentialService, useCreateCredential, useCredentials, useDeleteCredential, useUpdateCredential, useVerifyCredential };
|