@elevasis/ui 2.14.1 → 2.16.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/{chunk-A7346I7H.js → chunk-5UQKR27N.js} +1 -1
- package/dist/{chunk-F2GI5TQT.js → chunk-6SHOLCSV.js} +4 -3
- package/dist/{chunk-TAUPDLQ7.js → chunk-7MBONWZZ.js} +1 -1
- package/dist/{chunk-DKQQK3WX.js → chunk-BKSSVQM6.js} +1 -1
- package/dist/{chunk-ETQRV5A6.js → chunk-C3INGWGK.js} +1 -1
- package/dist/{chunk-C7BX547M.js → chunk-DT7ETYBT.js} +6 -0
- package/dist/{chunk-JAUU6TZU.js → chunk-F4VHHW4O.js} +109 -143
- package/dist/{chunk-JL7RHMV2.js → chunk-LKU4JCPR.js} +2 -2
- package/dist/{chunk-NPWJYY4B.js → chunk-M2RM3CC4.js} +1 -1
- package/dist/{chunk-IO75JNQE.js → chunk-RWFT46RK.js} +1 -1
- package/dist/{chunk-C56A2MAS.js → chunk-XNEYUG4B.js} +13 -6
- package/dist/components/index.d.ts +141 -49
- package/dist/components/index.js +22 -396
- package/dist/features/auth/index.d.ts +70 -6
- package/dist/features/crm/index.d.ts +70 -6
- package/dist/features/crm/index.js +4 -4
- package/dist/features/dashboard/index.js +4 -4
- package/dist/features/delivery/index.d.ts +70 -6
- package/dist/features/delivery/index.js +4 -4
- package/dist/features/lead-gen/index.js +7 -7
- package/dist/features/monitoring/index.js +5 -5
- package/dist/features/monitoring/requests/index.js +4 -4
- package/dist/features/operations/index.js +6 -6
- package/dist/features/settings/index.d.ts +70 -6
- package/dist/features/settings/index.js +4 -4
- package/dist/hooks/index.d.ts +150 -65
- package/dist/hooks/index.js +3 -3
- package/dist/hooks/published.d.ts +150 -65
- package/dist/hooks/published.js +3 -3
- package/dist/index.d.ts +155 -66
- package/dist/index.js +3 -3
- package/dist/initialization/index.d.ts +70 -6
- package/dist/profile/index.d.ts +70 -6
- package/dist/provider/index.d.ts +5 -1
- package/dist/provider/index.js +2 -2
- package/dist/provider/published.d.ts +5 -1
- package/dist/provider/published.js +1 -1
- package/dist/supabase/index.d.ts +130 -12
- package/dist/types/index.d.ts +70 -6
- package/package.json +2 -2
- package/src/hooks/README.md +1 -2
|
@@ -2,7 +2,7 @@ import { FilterBar } from './chunk-PDHTXPSF.js';
|
|
|
2
2
|
import { CustomModal } from './chunk-GBMNCNHX.js';
|
|
3
3
|
import { AppShellLoader } from './chunk-M25JL54Z.js';
|
|
4
4
|
import { useAvailablePresets } from './chunk-6RWMRQN5.js';
|
|
5
|
-
import { useDeleteCredential, useCreateCredential, useCredentials, MEMBERSHIP_STATUS_COLORS, transformMembershipToTableRow, useUserMemberships, useUpdateWebhookEndpoint, useResources, useDeleteWebhookEndpoint, useCreateWebhookEndpoint, useListWebhookEndpoints, useUpdateMemberConfig, useOrganizationMembers, useUpdateCredential, CredentialSchemas, showErrorNotification } from './chunk-
|
|
5
|
+
import { useDeleteCredential, useCreateCredential, useCredentials, MEMBERSHIP_STATUS_COLORS, transformMembershipToTableRow, useUserMemberships, useUpdateWebhookEndpoint, useResources, useDeleteWebhookEndpoint, useCreateWebhookEndpoint, useListWebhookEndpoints, useUpdateMemberConfig, useOrganizationMembers, useUpdateCredential, CredentialSchemas, showErrorNotification } from './chunk-F4VHHW4O.js';
|
|
6
6
|
import { ListSkeleton, EmptyState, PageTitleCaption, CardHeader, APIErrorAlert, StatCard } from './chunk-SQQGLGHW.js';
|
|
7
7
|
import { formatDateTime, OAUTH_POPUP_CHECK_INTERVAL, OAUTH_FLOW_TIMEOUT } from './chunk-IOKL7BKE.js';
|
|
8
8
|
import { useInitialization } from './chunk-TUXTSEAF.js';
|
|
@@ -5,7 +5,7 @@ import { SubshellNavItem } from './chunk-CEWTOKE7.js';
|
|
|
5
5
|
import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
|
|
6
6
|
import { FilterBar } from './chunk-PDHTXPSF.js';
|
|
7
7
|
import { CustomModal } from './chunk-GBMNCNHX.js';
|
|
8
|
-
import { useCreateTask, useCreateMilestone, useProjectMilestones, useUpdateTask, useProjects, useDeleteProject, useTableSort, sortData, usePaginationState, useTableSelection,
|
|
8
|
+
import { useCreateTask, useCreateMilestone, useProjectMilestones, useUpdateTask, useProjectRealtime, useProjects, useDeleteProject, useTableSort, sortData, usePaginationState, useTableSelection, useProject, useProjectNotes, useUpdateMilestone, useProjectActivities, useCreateNote, showApiErrorNotification, projectKeys } from './chunk-F4VHHW4O.js';
|
|
9
9
|
import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
|
|
10
10
|
import { StatusBadge, EmptyState, PageTitleCaption, CenteredErrorState, StatCard } from './chunk-SQQGLGHW.js';
|
|
11
11
|
import { PAGE_SIZE_DEFAULT, formatTimeAgo, formatDate, formatRelativeTime } from './chunk-IOKL7BKE.js';
|
|
@@ -594,6 +594,7 @@ var STATUS_OPTIONS = [
|
|
|
594
594
|
{ value: "paused", label: "Paused" }
|
|
595
595
|
];
|
|
596
596
|
function ProjectsListPage({ onProjectClick } = {}) {
|
|
597
|
+
useProjectRealtime();
|
|
597
598
|
const [statusFilter, setStatusFilter] = useState(null);
|
|
598
599
|
const [searchQuery, setSearchQuery] = useState("");
|
|
599
600
|
const [showBatchDelete, setShowBatchDelete] = useState(false);
|
|
@@ -1176,8 +1177,6 @@ function LogBlockerModal({ opened, onClose, projectId }) {
|
|
|
1176
1177
|
function ProjectDetailPage({ projectId, onBack, backLabel = "Projects" }) {
|
|
1177
1178
|
useProjectRealtime(projectId);
|
|
1178
1179
|
const { data: project, isLoading, error } = useProject(projectId);
|
|
1179
|
-
const { data: milestones = [] } = useProjectMilestones(projectId);
|
|
1180
|
-
const { data: tasks = [] } = useProjectTasks(projectId);
|
|
1181
1180
|
const { data: notes } = useProjectNotes({ projectId });
|
|
1182
1181
|
const { mutate: deleteProject, isPending: isDeleting } = useDeleteProject();
|
|
1183
1182
|
const [addNoteOpen, setAddNoteOpen] = useState(false);
|
|
@@ -1195,6 +1194,8 @@ function ProjectDetailPage({ projectId, onBack, backLabel = "Projects" }) {
|
|
|
1195
1194
|
if (!project) {
|
|
1196
1195
|
return /* @__PURE__ */ jsx(SubshellContentContainer, { children: /* @__PURE__ */ jsx(Center, { style: { flex: 1 }, children: /* @__PURE__ */ jsx(Alert, { color: "yellow", children: "Project not found" }) }) });
|
|
1197
1196
|
}
|
|
1197
|
+
const milestones = project.milestones ?? [];
|
|
1198
|
+
const tasks = project.tasks ?? [];
|
|
1198
1199
|
const totalMilestones = milestones.length;
|
|
1199
1200
|
const completedMilestones = milestones.filter((milestone) => milestone.status === "completed").length;
|
|
1200
1201
|
const totalTasks = tasks.length;
|
|
@@ -2,7 +2,7 @@ import { ResourceHealthChart } from './chunk-LGKLC5MG.js';
|
|
|
2
2
|
import { useCyberColors, HeroStatsRow } from './chunk-STZJ7SY5.js';
|
|
3
3
|
import { AppShellCenteredContainer, AppShellLoader } from './chunk-M25JL54Z.js';
|
|
4
4
|
import { STATUS_COLORS, getStatusIcon, formatDuration, getStatusColors, AGENT_CONSTANTS, shouldAnimateEdge, TIMELINE_CONSTANTS, calculateBarPosition, CONTAINER_CONSTANTS, useExecutionPath, useUnifiedWorkflowLayout, WORKFLOW_CONSTANTS, useReactFlowAgent } from './chunk-GHIPBT5V.js';
|
|
5
|
-
import { useExecuteResource, useDashboardMetrics, useResources, useTimeRangeDates, useUnresolvedErrors, useRecentExecutionsByResource, useCommandQueue, useScheduledTasks, useResourcesHealth } from './chunk-
|
|
5
|
+
import { useExecuteResource, useDashboardMetrics, useResources, useTimeRangeDates, useUnresolvedErrors, useRecentExecutionsByResource, useCommandQueue, useScheduledTasks, useResourcesHealth } from './chunk-F4VHHW4O.js';
|
|
6
6
|
import { getTimeRangeDates } from './chunk-LXHZYSMQ.js';
|
|
7
7
|
import { Graph_module_css_default, useDirectedChainHighlighting, useNodeSelection, useFitViewTrigger } from './chunk-22UVE3RA.js';
|
|
8
8
|
import { glassBase } from './chunk-R73EHHPN.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCyberColors, CyberLegendItem, CyberAreaChart } from './chunk-STZJ7SY5.js';
|
|
2
|
-
import { useResourcesHealth } from './chunk-
|
|
2
|
+
import { useResourcesHealth } from './chunk-F4VHHW4O.js';
|
|
3
3
|
import { getTimeRangeDates, formatBucketTime } from './chunk-LXHZYSMQ.js';
|
|
4
4
|
import { CardHeader, EmptyState } from './chunk-SQQGLGHW.js';
|
|
5
5
|
import { Paper, Center, Loader, Group } from '@mantine/core';
|
|
@@ -370,6 +370,8 @@ function ElevasisFeaturesProvider({
|
|
|
370
370
|
timeRange,
|
|
371
371
|
operationsApiUrl,
|
|
372
372
|
operationsSSEManager,
|
|
373
|
+
deliveryApiUrl,
|
|
374
|
+
deliverySSEManager,
|
|
373
375
|
disabledSubsectionPaths = [],
|
|
374
376
|
children
|
|
375
377
|
}) {
|
|
@@ -467,6 +469,8 @@ function ElevasisFeaturesProvider({
|
|
|
467
469
|
timeRange,
|
|
468
470
|
operationsApiUrl,
|
|
469
471
|
operationsSSEManager,
|
|
472
|
+
deliveryApiUrl,
|
|
473
|
+
deliverySSEManager,
|
|
470
474
|
disabledSubsectionPaths: normalizedDisabledSubsectionPaths,
|
|
471
475
|
isFeatureEnabled,
|
|
472
476
|
getResolvedFeature
|
|
@@ -481,6 +485,8 @@ function ElevasisFeaturesProvider({
|
|
|
481
485
|
timeRange,
|
|
482
486
|
operationsApiUrl,
|
|
483
487
|
operationsSSEManager,
|
|
488
|
+
deliveryApiUrl,
|
|
489
|
+
deliverySSEManager,
|
|
484
490
|
normalizedDisabledSubsectionPaths,
|
|
485
491
|
isFeatureEnabled,
|
|
486
492
|
getResolvedFeature
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getTimeRangeDates, observabilityKeys } from './chunk-LXHZYSMQ.js';
|
|
2
2
|
import { useSupabase } from './chunk-BRXELOHC.js';
|
|
3
3
|
import { GRAPH_CONSTANTS } from './chunk-22UVE3RA.js';
|
|
4
|
+
import { useOptionalElevasisFeatures } from './chunk-DT7ETYBT.js';
|
|
4
5
|
import { useNotificationAdapter } from './chunk-ZB5GAV7J.js';
|
|
5
6
|
import { HTTP_HEADERS } from './chunk-NVOCKXUQ.js';
|
|
6
7
|
import { REFETCH_INTERVAL_DASHBOARD, STALE_TIME_MONITORING, REFETCH_INTERVAL_RUNNING, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, STALE_TIME_DEFAULT, STALE_TIME_ADMIN, getErrorInfo, formatErrorMessage, getErrorTitle, APIClientError, GC_TIME_MEDIUM, GC_TIME_SHORT } from './chunk-IOKL7BKE.js';
|
|
@@ -2355,10 +2356,10 @@ var requestsKeys = {
|
|
|
2355
2356
|
};
|
|
2356
2357
|
function useRequestsList(filters = {}) {
|
|
2357
2358
|
const { apiRequest, isReady, organizationId } = useElevasisServices();
|
|
2358
|
-
const { type, severity, status, source, limit, offset } = filters;
|
|
2359
2359
|
return useQuery({
|
|
2360
2360
|
queryKey: requestsKeys.list(organizationId ?? void 0, filters),
|
|
2361
2361
|
queryFn: async () => {
|
|
2362
|
+
const { type, severity, status, source, limit, offset } = filters;
|
|
2362
2363
|
const params = new URLSearchParams();
|
|
2363
2364
|
if (type) params.set("type", type);
|
|
2364
2365
|
if (severity) params.set("severity", severity);
|
|
@@ -2509,45 +2510,6 @@ function isSessionCapable(type, resourceDefinition) {
|
|
|
2509
2510
|
const config = resourceDefinition.config;
|
|
2510
2511
|
return config.sessionCapable === true;
|
|
2511
2512
|
}
|
|
2512
|
-
function useDeploymentDocs(selectedDeploymentId) {
|
|
2513
|
-
const { apiRequest, isReady: isOrganizationReady, organizationId } = useElevasisServices();
|
|
2514
|
-
const deploymentsQuery = useQuery({
|
|
2515
|
-
queryKey: ["deployments", organizationId],
|
|
2516
|
-
queryFn: async () => {
|
|
2517
|
-
const response = await apiRequest("/deployments");
|
|
2518
|
-
return response.deployments;
|
|
2519
|
-
},
|
|
2520
|
-
enabled: isOrganizationReady,
|
|
2521
|
-
staleTime: STALE_TIME_DEFAULT
|
|
2522
|
-
});
|
|
2523
|
-
const activeDeployments = useMemo(() => {
|
|
2524
|
-
if (!deploymentsQuery.data) return [];
|
|
2525
|
-
return deploymentsQuery.data.filter((d) => d.status === "active").sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());
|
|
2526
|
-
}, [deploymentsQuery.data]);
|
|
2527
|
-
const activeDeployment = useMemo(() => {
|
|
2528
|
-
if (selectedDeploymentId) {
|
|
2529
|
-
return activeDeployments.find((d) => d.id === selectedDeploymentId) ?? activeDeployments[0] ?? null;
|
|
2530
|
-
}
|
|
2531
|
-
return activeDeployments[0] ?? null;
|
|
2532
|
-
}, [activeDeployments, selectedDeploymentId]);
|
|
2533
|
-
const deploymentId = activeDeployment?.id;
|
|
2534
|
-
const docsQuery = useQuery({
|
|
2535
|
-
queryKey: ["deployment-docs", deploymentId],
|
|
2536
|
-
queryFn: async () => {
|
|
2537
|
-
const response = await apiRequest(`/deployments/${deploymentId}/docs`);
|
|
2538
|
-
return response.files;
|
|
2539
|
-
},
|
|
2540
|
-
enabled: isOrganizationReady && !!deploymentId,
|
|
2541
|
-
staleTime: STALE_TIME_DEFAULT
|
|
2542
|
-
});
|
|
2543
|
-
return {
|
|
2544
|
-
files: docsQuery.data ?? [],
|
|
2545
|
-
isLoading: deploymentsQuery.isLoading || !!deploymentId && docsQuery.isLoading,
|
|
2546
|
-
error: deploymentsQuery.error || docsQuery.error,
|
|
2547
|
-
activeDeployment,
|
|
2548
|
-
activeDeployments
|
|
2549
|
-
};
|
|
2550
|
-
}
|
|
2551
2513
|
function useCommandViewData() {
|
|
2552
2514
|
const { apiRequest, organizationId, isReady } = useElevasisServices();
|
|
2553
2515
|
return useQuery({
|
|
@@ -4465,108 +4427,6 @@ function useOrganizationMembers(organizationId, params) {
|
|
|
4465
4427
|
refetchOnWindowFocus: false
|
|
4466
4428
|
});
|
|
4467
4429
|
}
|
|
4468
|
-
var noteKeys = {
|
|
4469
|
-
all: ["project-notes"],
|
|
4470
|
-
lists: () => [...noteKeys.all, "list"],
|
|
4471
|
-
list: (orgId, filters) => [...noteKeys.all, "list", orgId, filters],
|
|
4472
|
-
details: () => [...noteKeys.all, "detail"],
|
|
4473
|
-
detail: (id) => [...noteKeys.all, "detail", id]
|
|
4474
|
-
};
|
|
4475
|
-
function useProjectNotes(filters = {}) {
|
|
4476
|
-
const { apiRequest, isReady, organizationId } = useElevasisServices();
|
|
4477
|
-
return useQuery({
|
|
4478
|
-
queryKey: noteKeys.list(organizationId, filters),
|
|
4479
|
-
queryFn: async () => {
|
|
4480
|
-
const res = await apiRequest(`/projects/${filters.projectId}/notes`);
|
|
4481
|
-
return res.notes;
|
|
4482
|
-
},
|
|
4483
|
-
enabled: isReady && !!filters.projectId
|
|
4484
|
-
});
|
|
4485
|
-
}
|
|
4486
|
-
function useCreateNote() {
|
|
4487
|
-
const { apiRequest } = useElevasisServices();
|
|
4488
|
-
const queryClient = useQueryClient();
|
|
4489
|
-
return useMutation({
|
|
4490
|
-
mutationFn: async (params) => {
|
|
4491
|
-
const res = await apiRequest("/project-notes", {
|
|
4492
|
-
method: "POST",
|
|
4493
|
-
body: JSON.stringify(params)
|
|
4494
|
-
});
|
|
4495
|
-
return res.note;
|
|
4496
|
-
},
|
|
4497
|
-
onSuccess: (data) => {
|
|
4498
|
-
queryClient.invalidateQueries({ queryKey: noteKeys.all });
|
|
4499
|
-
queryClient.invalidateQueries({ queryKey: projectKeys.all });
|
|
4500
|
-
queryClient.invalidateQueries({ queryKey: projectKeys.detail(data.project_id) });
|
|
4501
|
-
},
|
|
4502
|
-
onError: (error) => {
|
|
4503
|
-
showApiErrorNotification(error);
|
|
4504
|
-
}
|
|
4505
|
-
});
|
|
4506
|
-
}
|
|
4507
|
-
|
|
4508
|
-
// src/hooks/projects/useProjectRealtime.ts
|
|
4509
|
-
function useProjectRealtime(projectId) {
|
|
4510
|
-
const queryClient = useQueryClient();
|
|
4511
|
-
const supabase = useSupabase();
|
|
4512
|
-
useEffect(() => {
|
|
4513
|
-
if (!projectId) {
|
|
4514
|
-
return;
|
|
4515
|
-
}
|
|
4516
|
-
const channel = supabase.channel(`project-realtime-${projectId}`).on(
|
|
4517
|
-
"postgres_changes",
|
|
4518
|
-
{
|
|
4519
|
-
event: "*",
|
|
4520
|
-
schema: "public",
|
|
4521
|
-
table: "prj_projects",
|
|
4522
|
-
filter: `id=eq.${projectId}`
|
|
4523
|
-
},
|
|
4524
|
-
() => {
|
|
4525
|
-
queryClient.invalidateQueries({ queryKey: projectKeys.detail(projectId) });
|
|
4526
|
-
queryClient.invalidateQueries({ queryKey: projectActivityKeys.list(projectId) });
|
|
4527
|
-
}
|
|
4528
|
-
).on(
|
|
4529
|
-
"postgres_changes",
|
|
4530
|
-
{
|
|
4531
|
-
event: "*",
|
|
4532
|
-
schema: "public",
|
|
4533
|
-
table: "prj_milestones",
|
|
4534
|
-
filter: `project_id=eq.${projectId}`
|
|
4535
|
-
},
|
|
4536
|
-
() => {
|
|
4537
|
-
queryClient.invalidateQueries({ queryKey: projectKeys.milestones(projectId) });
|
|
4538
|
-
queryClient.invalidateQueries({ queryKey: projectActivityKeys.list(projectId) });
|
|
4539
|
-
}
|
|
4540
|
-
).on(
|
|
4541
|
-
"postgres_changes",
|
|
4542
|
-
{
|
|
4543
|
-
event: "*",
|
|
4544
|
-
schema: "public",
|
|
4545
|
-
table: "prj_tasks",
|
|
4546
|
-
filter: `project_id=eq.${projectId}`
|
|
4547
|
-
},
|
|
4548
|
-
() => {
|
|
4549
|
-
queryClient.invalidateQueries({ queryKey: projectKeys.tasks(projectId) });
|
|
4550
|
-
queryClient.invalidateQueries({ queryKey: projectActivityKeys.list(projectId) });
|
|
4551
|
-
}
|
|
4552
|
-
).on(
|
|
4553
|
-
"postgres_changes",
|
|
4554
|
-
{
|
|
4555
|
-
event: "*",
|
|
4556
|
-
schema: "public",
|
|
4557
|
-
table: "prj_notes",
|
|
4558
|
-
filter: `project_id=eq.${projectId}`
|
|
4559
|
-
},
|
|
4560
|
-
() => {
|
|
4561
|
-
queryClient.invalidateQueries({ queryKey: noteKeys.all });
|
|
4562
|
-
queryClient.invalidateQueries({ queryKey: projectActivityKeys.list(projectId) });
|
|
4563
|
-
}
|
|
4564
|
-
).subscribe();
|
|
4565
|
-
return () => {
|
|
4566
|
-
void supabase.removeChannel(channel);
|
|
4567
|
-
};
|
|
4568
|
-
}, [projectId, queryClient, supabase]);
|
|
4569
|
-
}
|
|
4570
4430
|
var milestoneKeys = {
|
|
4571
4431
|
all: ["project-milestones"],
|
|
4572
4432
|
lists: () => [...milestoneKeys.all, "list"],
|
|
@@ -4733,5 +4593,111 @@ function useDeleteTask2() {
|
|
|
4733
4593
|
}
|
|
4734
4594
|
});
|
|
4735
4595
|
}
|
|
4596
|
+
var noteKeys = {
|
|
4597
|
+
all: ["project-notes"],
|
|
4598
|
+
lists: () => [...noteKeys.all, "list"],
|
|
4599
|
+
list: (orgId, filters) => [...noteKeys.all, "list", orgId, filters],
|
|
4600
|
+
details: () => [...noteKeys.all, "detail"],
|
|
4601
|
+
detail: (id) => [...noteKeys.all, "detail", id]
|
|
4602
|
+
};
|
|
4603
|
+
function useProjectNotes(filters = {}) {
|
|
4604
|
+
const { apiRequest, isReady, organizationId } = useElevasisServices();
|
|
4605
|
+
return useQuery({
|
|
4606
|
+
queryKey: noteKeys.list(organizationId, filters),
|
|
4607
|
+
queryFn: async () => {
|
|
4608
|
+
const res = await apiRequest(`/projects/${filters.projectId}/notes`);
|
|
4609
|
+
return res.notes;
|
|
4610
|
+
},
|
|
4611
|
+
enabled: isReady && !!filters.projectId
|
|
4612
|
+
});
|
|
4613
|
+
}
|
|
4614
|
+
function useCreateNote() {
|
|
4615
|
+
const { apiRequest } = useElevasisServices();
|
|
4616
|
+
const queryClient = useQueryClient();
|
|
4617
|
+
return useMutation({
|
|
4618
|
+
mutationFn: async (params) => {
|
|
4619
|
+
const res = await apiRequest("/project-notes", {
|
|
4620
|
+
method: "POST",
|
|
4621
|
+
body: JSON.stringify(params)
|
|
4622
|
+
});
|
|
4623
|
+
return res.note;
|
|
4624
|
+
},
|
|
4625
|
+
onSuccess: (data) => {
|
|
4626
|
+
queryClient.invalidateQueries({ queryKey: noteKeys.all });
|
|
4627
|
+
queryClient.invalidateQueries({ queryKey: projectKeys.all });
|
|
4628
|
+
queryClient.invalidateQueries({ queryKey: projectKeys.detail(data.project_id) });
|
|
4629
|
+
},
|
|
4630
|
+
onError: (error) => {
|
|
4631
|
+
showApiErrorNotification(error);
|
|
4632
|
+
}
|
|
4633
|
+
});
|
|
4634
|
+
}
|
|
4635
|
+
|
|
4636
|
+
// src/hooks/projects/useProjectRealtime.ts
|
|
4637
|
+
var noopSSEManager = {
|
|
4638
|
+
subscribe: () => () => {
|
|
4639
|
+
},
|
|
4640
|
+
closeConnection: () => {
|
|
4641
|
+
},
|
|
4642
|
+
getConnectionInfo: () => /* @__PURE__ */ new Map()
|
|
4643
|
+
};
|
|
4644
|
+
function useProjectRealtime(projectId) {
|
|
4645
|
+
const queryClient = useQueryClient();
|
|
4646
|
+
const features = useOptionalElevasisFeatures();
|
|
4647
|
+
const { isReady, organizationId } = useElevasisServices();
|
|
4648
|
+
const { currentMembership } = useOrganization();
|
|
4649
|
+
const deliveryApiUrl = features?.deliveryApiUrl;
|
|
4650
|
+
const deliverySSEManager = features?.deliverySSEManager ?? noopSSEManager;
|
|
4651
|
+
const currentWorkOSOrganizationId = currentMembership?.organization?.workos_org_id;
|
|
4652
|
+
const headers = useMemo(() => {
|
|
4653
|
+
if (!currentWorkOSOrganizationId) {
|
|
4654
|
+
return {};
|
|
4655
|
+
}
|
|
4656
|
+
const nextHeaders = {};
|
|
4657
|
+
nextHeaders[HTTP_HEADERS.WORKOS_ORGANIZATION_ID] = currentWorkOSOrganizationId;
|
|
4658
|
+
return nextHeaders;
|
|
4659
|
+
}, [currentWorkOSOrganizationId]);
|
|
4660
|
+
const handleMessage = useCallback(
|
|
4661
|
+
(rawData) => {
|
|
4662
|
+
try {
|
|
4663
|
+
const event = JSON.parse(rawData);
|
|
4664
|
+
if (event.type !== "entity_changed") {
|
|
4665
|
+
return;
|
|
4666
|
+
}
|
|
4667
|
+
const { entityType, projectId: changedProjectId } = event.data;
|
|
4668
|
+
queryClient.invalidateQueries({ queryKey: projectKeys.all });
|
|
4669
|
+
queryClient.invalidateQueries({ queryKey: projectKeys.detail(changedProjectId) });
|
|
4670
|
+
queryClient.invalidateQueries({ queryKey: projectActivityKeys.list(changedProjectId) });
|
|
4671
|
+
switch (entityType) {
|
|
4672
|
+
case "milestone":
|
|
4673
|
+
queryClient.invalidateQueries({ queryKey: milestoneKeys.all });
|
|
4674
|
+
queryClient.invalidateQueries({ queryKey: projectKeys.milestones(changedProjectId) });
|
|
4675
|
+
break;
|
|
4676
|
+
case "task":
|
|
4677
|
+
queryClient.invalidateQueries({ queryKey: taskKeys.all });
|
|
4678
|
+
queryClient.invalidateQueries({ queryKey: projectKeys.tasks(changedProjectId) });
|
|
4679
|
+
break;
|
|
4680
|
+
case "note":
|
|
4681
|
+
queryClient.invalidateQueries({ queryKey: noteKeys.all });
|
|
4682
|
+
break;
|
|
4683
|
+
case "activity":
|
|
4684
|
+
case "project":
|
|
4685
|
+
break;
|
|
4686
|
+
}
|
|
4687
|
+
} catch {
|
|
4688
|
+
}
|
|
4689
|
+
},
|
|
4690
|
+
[queryClient]
|
|
4691
|
+
);
|
|
4692
|
+
useSSEConnection({
|
|
4693
|
+
manager: deliverySSEManager,
|
|
4694
|
+
connectionKey: `delivery-${currentWorkOSOrganizationId ?? organizationId ?? projectId ?? "unknown"}`,
|
|
4695
|
+
url: deliveryApiUrl ? `${deliveryApiUrl}/api/projects/sse` : "",
|
|
4696
|
+
enabled: Boolean(deliveryApiUrl && features?.deliverySSEManager && currentWorkOSOrganizationId && isReady),
|
|
4697
|
+
headers,
|
|
4698
|
+
onmessage: handleMessage,
|
|
4699
|
+
onopen: (response) => response.status === 403 ? "Organization access denied" : void 0
|
|
4700
|
+
});
|
|
4701
|
+
}
|
|
4736
4702
|
|
|
4737
|
-
export { ApiKeyService, CredentialSchemas, CredentialService, DeploymentService, MEMBERSHIP_STATUS_COLORS, OperationsService, OrganizationMembershipService, WebhookEndpointService, acquisitionListKeys, companyKeys, contactKeys, dealKeys, dealNoteKeys, dealTaskKeys, executionsKeys, filterByDomainFilters, isSessionCapable, milestoneKeys, noteKeys, operationsKeys, projectActivityKeys, projectKeys, requestsKeys, scheduleKeys, sessionsKeys, showApiErrorNotification, showErrorNotification, showInfoNotification, showSuccessNotification, showWarningNotification, sortData, taskKeys, transformMembershipToTableRow, useActivateDeployment, useActivities, useActivitiesRealtime, useActivityFilters, useActivityTrend, useArchiveSession, useArchivedLogs, useBatchDelete, useBatchTelemetry, useBatchedResourcesHealth, useBulkDeleteExecutions, useBusinessImpact, useCancelExecution, useCancelSchedule, useCheckpointTasks, useCommandQueue, useCommandQueueTotals, useCommandViewData, useCommandViewDomainFilters, useCommandViewLayout, useCommandViewStats, useCommandViewStore, useCompanies, useCompany, useCompleteDealTask, useContact, useContacts, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateApiKey, useCreateCompany, useCreateContact, useCreateCredential, useCreateDealNote, useCreateDealTask, useCreateList, useCreateMilestone, useCreateNote, useCreateProject, useCreateSchedule, useCreateSession, useCreateTask, useCreateWebhookEndpoint, useCredentials, useDashboardMetrics, useDeactivateDeployment, useDeactivateMembership, useDealDetail, useDealNotes, useDealTasks, useDealTasksDue, useDeals, useDeleteApiKey, useDeleteCompanies, useDeleteContacts, useDeleteCredential, useDeleteDeal, useDeleteDeployment, useDeleteExecution, useDeleteList, useDeleteMilestone, useDeleteProject, useDeleteSchedule, useDeleteSession, useDeleteTask, useDeleteTask2, useDeleteWebhookEndpoint,
|
|
4703
|
+
export { ApiKeyService, CredentialSchemas, CredentialService, DeploymentService, MEMBERSHIP_STATUS_COLORS, OperationsService, OrganizationMembershipService, WebhookEndpointService, acquisitionListKeys, companyKeys, contactKeys, dealKeys, dealNoteKeys, dealTaskKeys, executionsKeys, filterByDomainFilters, isSessionCapable, milestoneKeys, noteKeys, operationsKeys, projectActivityKeys, projectKeys, requestsKeys, scheduleKeys, sessionsKeys, showApiErrorNotification, showErrorNotification, showInfoNotification, showSuccessNotification, showWarningNotification, sortData, taskKeys, transformMembershipToTableRow, useActivateDeployment, useActivities, useActivitiesRealtime, useActivityFilters, useActivityTrend, useArchiveSession, useArchivedLogs, useBatchDelete, useBatchTelemetry, useBatchedResourcesHealth, useBulkDeleteExecutions, useBusinessImpact, useCancelExecution, useCancelSchedule, useCheckpointTasks, useCommandQueue, useCommandQueueTotals, useCommandViewData, useCommandViewDomainFilters, useCommandViewLayout, useCommandViewStats, useCommandViewStore, useCompanies, useCompany, useCompleteDealTask, useContact, useContacts, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateApiKey, useCreateCompany, useCreateContact, useCreateCredential, useCreateDealNote, useCreateDealTask, useCreateList, useCreateMilestone, useCreateNote, useCreateProject, useCreateSchedule, useCreateSession, useCreateTask, useCreateWebhookEndpoint, useCredentials, useDashboardMetrics, useDeactivateDeployment, useDeactivateMembership, useDealDetail, useDealNotes, useDealTasks, useDealTasksDue, useDeals, useDeleteApiKey, useDeleteCompanies, useDeleteContacts, useDeleteCredential, useDeleteDeal, useDeleteDeployment, useDeleteExecution, useDeleteList, useDeleteMilestone, useDeleteProject, useDeleteSchedule, useDeleteSession, useDeleteTask, useDeleteTask2, useDeleteWebhookEndpoint, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorNotification, useExecuteAsync, useExecuteResource, useExecution, useExecutionHealth, useExecutionLogSSE, useExecutionLogs, useExecutionLogsFilters, useExecutionPanelState, useExecutions, useGetExecutionHistory, useGetSchedule, useGraphStats, useList, useListApiKeys, useListDeployments, useListExecutions, useListProgress, useListSchedules, useListWebhookEndpoints, useLists, useListsTelemetry, useMarkAllAsRead, useMarkAsRead, useMilestones, useNotificationCount, useNotifications, useOrganizationMembers, usePaginationState, usePatchTask, usePauseSchedule, useProject, useProjectActivities, useProjectMilestones, useProjectNotes, useProjectRealtime, useProjectTasks, useProjects, useReactivateMembership, useRecentExecutionsByResource, useRequest, useRequestsList, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResourceErrors, useResourceExecutions, useResourceSearch, useResources, useResourcesDomainFilters, useResourcesHealth, useResumeSchedule, useRetryExecution, useSSEConnection, useScheduledTasks, useSession, useSessionExecution, useSessionExecutions, useSessionMessages, useSessionWebSocket, useSessions, useSortedData, useStatusFilter, useSubmitAction, useSuccessNotification, useSyncDealStage, useTableSelection, useTableSort, useTasks, useTestNotification, useTimeRangeDates, useTopFailingResources, useUnresolveError, useUnresolvedErrors, useUpdateAnchor, useUpdateApiKey, useUpdateCompany, useUpdateContact, useUpdateCredential, useUpdateList, useUpdateListConfig, useUpdateMemberConfig, useUpdateMilestone, useUpdateProject, useUpdateRequestStatus, useUpdateSchedule, useUpdateTask, useUpdateWebhookEndpoint, useUserMemberships, useVisibleResources, useWarningNotification };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ResourceExecuteDialog } from './chunk-
|
|
1
|
+
import { ResourceExecuteDialog } from './chunk-XNEYUG4B.js';
|
|
2
2
|
import { PageContainer } from './chunk-BZZCNLT6.js';
|
|
3
3
|
import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
|
|
4
4
|
import { SubshellNavItem } from './chunk-CEWTOKE7.js';
|
|
5
5
|
import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
|
|
6
6
|
import { FilterBar } from './chunk-PDHTXPSF.js';
|
|
7
7
|
import { CustomModal } from './chunk-GBMNCNHX.js';
|
|
8
|
-
import { showApiErrorNotification, acquisitionListKeys, showSuccessNotification, useListsTelemetry, useLists, useCreateList, useTableSort, sortData, usePaginationState, useTableSelection, useList, useListProgress, useListExecutions, useResourceDefinition, useCompanies, useDeleteCompanies, useContacts, useDeleteContacts } from './chunk-
|
|
8
|
+
import { showApiErrorNotification, acquisitionListKeys, showSuccessNotification, useListsTelemetry, useLists, useCreateList, useTableSort, sortData, usePaginationState, useTableSelection, useList, useListProgress, useListExecutions, useResourceDefinition, useCompanies, useDeleteCompanies, useContacts, useDeleteContacts } from './chunk-F4VHHW4O.js';
|
|
9
9
|
import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
|
|
10
10
|
import { PageTitleCaption, CenteredErrorState, StatCard, EmptyState } from './chunk-SQQGLGHW.js';
|
|
11
11
|
import { useElevasisServices } from './chunk-QEPXAWE2.js';
|
|
@@ -4,7 +4,7 @@ import { SubshellNavItem } from './chunk-CEWTOKE7.js';
|
|
|
4
4
|
import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
|
|
5
5
|
import { FilterBar } from './chunk-PDHTXPSF.js';
|
|
6
6
|
import { CustomModal } from './chunk-GBMNCNHX.js';
|
|
7
|
-
import { useDealTasksDue, useDeals, useCreateDealTask, useDeleteDeal, useTableSort, sortData, usePaginationState, useTableSelection, useDealDetail, useCompany } from './chunk-
|
|
7
|
+
import { useDealTasksDue, useDeals, useCreateDealTask, useDeleteDeal, useTableSort, sortData, usePaginationState, useTableSelection, useDealDetail, useCompany } from './chunk-F4VHHW4O.js';
|
|
8
8
|
import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
|
|
9
9
|
import { CenteredErrorState, CardHeader, PageTitleCaption, EmptyState, ActivityTimeline } from './chunk-SQQGLGHW.js';
|
|
10
10
|
import { PAGE_SIZE_DEFAULT, formatTimeAgo } from './chunk-IOKL7BKE.js';
|
|
@@ -3,7 +3,7 @@ import { CustomModal } from './chunk-GBMNCNHX.js';
|
|
|
3
3
|
import { CyberAreaChart, CostTrendChart, ActivityTrendChart } from './chunk-STZJ7SY5.js';
|
|
4
4
|
import { AppShellLoader } from './chunk-M25JL54Z.js';
|
|
5
5
|
import { formatDuration } from './chunk-GHIPBT5V.js';
|
|
6
|
-
import { useResolveError, useResolveAllErrors, usePaginationState, useErrorDetails, useMarkAsRead, useExecutionLogsFilters, useExecutionLogs, useExecutionHealth, useErrorAnalysis, useTimeRangeDates, useErrorDetail, useResolveErrorsByExecution, useResources, useCostTrends, useCostSummary, useCostByModel, useCostBreakdown, useActivityFilters, useActivityTrend, useActivities, useNotifications, useMarkAllAsRead, useTestNotification } from './chunk-
|
|
6
|
+
import { useResolveError, useResolveAllErrors, usePaginationState, useErrorDetails, useMarkAsRead, useExecutionLogsFilters, useExecutionLogs, useExecutionHealth, useErrorAnalysis, useTimeRangeDates, useErrorDetail, useResolveErrorsByExecution, useResources, useCostTrends, useCostSummary, useCostByModel, useCostBreakdown, useActivityFilters, useActivityTrend, useActivities, useNotifications, useMarkAllAsRead, useTestNotification } from './chunk-F4VHHW4O.js';
|
|
7
7
|
import { formatBucketTime, getTimeRangeDates } from './chunk-LXHZYSMQ.js';
|
|
8
8
|
import { CenteredErrorState, CardHeader, StatsCardSkeleton, TrendIndicator, DetailCardSkeleton, EmptyState, PageTitleCaption, JsonViewer } from './chunk-SQQGLGHW.js';
|
|
9
9
|
import { PAGE_SIZE_DEFAULT } from './chunk-IOKL7BKE.js';
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { ChatHeader, ChatSidebar } from './chunk-ROSMICXG.js';
|
|
2
2
|
import { SubshellLoader } from './chunk-ADSSLKKP.js';
|
|
3
|
-
import { ResourceHealthPanel } from './chunk-
|
|
3
|
+
import { ResourceHealthPanel } from './chunk-C3INGWGK.js';
|
|
4
4
|
import { PageContainer } from './chunk-BZZCNLT6.js';
|
|
5
5
|
import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
|
|
6
6
|
import { CustomModal, ConfirmationModal } from './chunk-GBMNCNHX.js';
|
|
7
|
-
import { BaseNode, useGraphTheme, BaseEdge, FormFieldRenderer, ExecutionStats, UnifiedWorkflowGraph, WorkflowExecutionTimeline, AgentExecutionVisualizer, AgentExecutionTimeline, GraphBackground, GraphFitViewButton, GraphFitViewHandler } from './chunk-
|
|
7
|
+
import { BaseNode, useGraphTheme, BaseEdge, FormFieldRenderer, ExecutionStats, UnifiedWorkflowGraph, WorkflowExecutionTimeline, AgentExecutionVisualizer, AgentExecutionTimeline, GraphBackground, GraphFitViewButton, GraphFitViewHandler } from './chunk-7MBONWZZ.js';
|
|
8
8
|
import { useCyberColors, CyberDonut } from './chunk-STZJ7SY5.js';
|
|
9
9
|
import { AppShellLoader } from './chunk-M25JL54Z.js';
|
|
10
10
|
import { getResourceStatusColor, useTimelineData, useAgentIterationData, getStatusIcon } from './chunk-GHIPBT5V.js';
|
|
11
|
-
import { useErrorDetail, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, useCommandQueueTotals, useStatusFilter, useResourceSearch, useResourcesDomainFilters, usePaginationState, useResources, useRecentExecutionsByResource, filterByDomainFilters, useExecuteAsync, useResourceDefinition, isSessionCapable, useDeleteTask, useCommandQueue, useSubmitAction, useCommandViewData, useCommandViewStats, useCommandViewStore, useResourceExecutions, useCheckpointTasks, useExecutionPanelState, useDeleteSession, useCreateSession, useSessions, useSessionExecutions, useSession, showApiErrorNotification, showSuccessNotification, useBulkDeleteExecutions } from './chunk-
|
|
11
|
+
import { useErrorDetail, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, useCommandQueueTotals, useStatusFilter, useResourceSearch, useResourcesDomainFilters, usePaginationState, useResources, useRecentExecutionsByResource, filterByDomainFilters, useExecuteAsync, useResourceDefinition, isSessionCapable, useDeleteTask, useCommandQueue, useSubmitAction, useCommandViewData, useCommandViewStats, useCommandViewStore, useResourceExecutions, useCheckpointTasks, useExecutionPanelState, useDeleteSession, useCreateSession, useSessions, useSessionExecutions, useSession, showApiErrorNotification, showSuccessNotification, useBulkDeleteExecutions } from './chunk-F4VHHW4O.js';
|
|
12
12
|
import { useGraphHighlighting, calculateGraphHeight, Graph_module_css_default, GRAPH_CONSTANTS } from './chunk-22UVE3RA.js';
|
|
13
13
|
import { useMergedExecution } from './chunk-3ZMAGTWF.js';
|
|
14
|
-
import { useOptionalElevasisFeatures, useElevasisFeatures } from './chunk-
|
|
14
|
+
import { useOptionalElevasisFeatures, useElevasisFeatures } from './chunk-DT7ETYBT.js';
|
|
15
15
|
import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
|
|
16
16
|
import { JsonViewer, CardHeader, PageTitleCaption, CollapsibleSection, TabCountBadge, ResourceCard, ContextViewer, EmptyState, APIErrorAlert } from './chunk-SQQGLGHW.js';
|
|
17
17
|
import { StyledMarkdown } from './chunk-3KMDHCAR.js';
|
|
@@ -243,7 +243,13 @@ var IdentityDomainSchema = z.object({
|
|
|
243
243
|
*/
|
|
244
244
|
timeZone: z.string().trim().max(100).default("UTC"),
|
|
245
245
|
/** Typical operating hours per day of week. Empty object means not configured. */
|
|
246
|
-
businessHours: BusinessHoursSchema
|
|
246
|
+
businessHours: BusinessHoursSchema,
|
|
247
|
+
/**
|
|
248
|
+
* Long-form markdown capturing client context, problem narrative, and domain
|
|
249
|
+
* background. Populated by /setup; surfaced to agents as organizational context.
|
|
250
|
+
* Optional — many projects have no external client.
|
|
251
|
+
*/
|
|
252
|
+
clientBrief: z.string().trim().default("")
|
|
247
253
|
});
|
|
248
254
|
var DEFAULT_ORGANIZATION_MODEL_IDENTITY = {
|
|
249
255
|
mission: "",
|
|
@@ -254,7 +260,8 @@ var DEFAULT_ORGANIZATION_MODEL_IDENTITY = {
|
|
|
254
260
|
industryCategory: "",
|
|
255
261
|
geographicFocus: "",
|
|
256
262
|
timeZone: "UTC",
|
|
257
|
-
businessHours: {}
|
|
263
|
+
businessHours: {},
|
|
264
|
+
clientBrief: ""
|
|
258
265
|
};
|
|
259
266
|
var FirmographicsSchema = z.object({
|
|
260
267
|
/** Industry vertical (e.g. "Marketing Agency", "Legal", "Real Estate"). */
|