@elevasis/ui 2.78.0 → 2.80.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.
Files changed (95) hide show
  1. package/dist/{CoreAuthKitInner-PSTKG4B3.js → CoreAuthKitInner-5J7P7ZDL.js} +1 -1
  2. package/dist/api/index.js +6 -6
  3. package/dist/app/index.js +18 -18
  4. package/dist/auth/index.js +10 -10
  5. package/dist/charts/index.d.ts +4 -4
  6. package/dist/charts/index.js +10 -10
  7. package/dist/{chunk-BLXJEIQS.js → chunk-2HXDI4RY.js} +1 -1
  8. package/dist/{chunk-FI66TKYS.js → chunk-2KXSFLU2.js} +8 -2
  9. package/dist/{chunk-TVTSASST.js → chunk-34B3ACOZ.js} +9 -1
  10. package/dist/{chunk-KXNRTJAE.js → chunk-3HMRK3RC.js} +1 -1
  11. package/dist/{chunk-S3ETKY5C.js → chunk-3UO2CJTR.js} +1 -1
  12. package/dist/{chunk-YUWR4UX7.js → chunk-52G4B33T.js} +13 -7
  13. package/dist/{chunk-4A6S4WAT.js → chunk-6IWH757Q.js} +4 -3
  14. package/dist/{chunk-4TABB2PA.js → chunk-6MWTTBBT.js} +6 -6
  15. package/dist/{chunk-M3DWVFRT.js → chunk-7A25EJ4A.js} +148 -85
  16. package/dist/{chunk-SVZR4GYA.js → chunk-A32PJ2DO.js} +1 -1
  17. package/dist/{chunk-LMAYDNQL.js → chunk-BG7VCCFB.js} +1 -1
  18. package/dist/{chunk-WGSEITGL.js → chunk-BXFZ676L.js} +222 -191
  19. package/dist/{chunk-5ZK7K7YP.js → chunk-CIGWHY7C.js} +23 -21
  20. package/dist/{chunk-FFVZB25A.js → chunk-CSEADI37.js} +3 -3
  21. package/dist/{chunk-3RK2NNJX.js → chunk-DFGQG32T.js} +1 -1
  22. package/dist/{chunk-VM2OWOXL.js → chunk-GY7FXTC4.js} +2 -3
  23. package/dist/{chunk-P6HHXMLJ.js → chunk-HVNDBY42.js} +10 -9
  24. package/dist/{chunk-VBGXFKZ2.js → chunk-I5SYS6DT.js} +5 -5
  25. package/dist/{chunk-2GIJBHZT.js → chunk-IIMC4TRH.js} +3 -3
  26. package/dist/{chunk-JKNIXSJT.js → chunk-JDPPV2XI.js} +21 -14
  27. package/dist/{chunk-NBG3V52P.js → chunk-JZBMZLD3.js} +1 -1
  28. package/dist/{chunk-JZQNUQE4.js → chunk-KGUBFIMQ.js} +1 -1
  29. package/dist/{chunk-GFSOQH3N.js → chunk-MJIDC25O.js} +8 -11
  30. package/dist/{chunk-IWNVPPWF.js → chunk-MMOR2HQZ.js} +38 -78
  31. package/dist/{chunk-L42Z3VZM.js → chunk-NGRRAYMO.js} +22 -39
  32. package/dist/{chunk-TRACEZWZ.js → chunk-NKMBW7WE.js} +26 -21
  33. package/dist/{chunk-57QSONG5.js → chunk-Q6HRTWA6.js} +1 -1
  34. package/dist/{chunk-FD3XRRKM.js → chunk-QQKYBGBX.js} +22 -11
  35. package/dist/{chunk-B74K5EC2.js → chunk-QSN7BWI3.js} +1 -1
  36. package/dist/{chunk-MWWBHRFO.js → chunk-SPH5WW44.js} +5 -5
  37. package/dist/{chunk-WJWYTXGQ.js → chunk-T6AOVZAI.js} +14 -10
  38. package/dist/{chunk-AVGXLMSH.js → chunk-U3GB5PDF.js} +4 -4
  39. package/dist/{chunk-SU4T5DCZ.js → chunk-VHK5J55Q.js} +8 -8
  40. package/dist/{chunk-F3YFAATR.js → chunk-VKA4LQ7N.js} +1 -1
  41. package/dist/{chunk-IYLJ4CBC.js → chunk-W6QOWA3L.js} +11 -10
  42. package/dist/{chunk-N6K2Q5BM.js → chunk-WDABHUIL.js} +9 -21
  43. package/dist/{chunk-2LLCOS4V.js → chunk-WOYW24U7.js} +1 -1
  44. package/dist/{chunk-Y2IHJRHM.js → chunk-XEO2UG4J.js} +15 -9
  45. package/dist/{chunk-UD657ICS.js → chunk-YJ437RDY.js} +29 -16
  46. package/dist/{chunk-INCEZAM3.js → chunk-YSFLFD4U.js} +1 -1
  47. package/dist/{chunk-5OBIZIWW.js → chunk-ZU676PFP.js} +38 -14
  48. package/dist/components/index.d.ts +18 -6
  49. package/dist/components/index.js +48 -48
  50. package/dist/components/navigation/index.js +11 -11
  51. package/dist/execution/index.js +2 -2
  52. package/dist/features/auth/index.js +12 -12
  53. package/dist/features/clients/index.js +14 -15
  54. package/dist/features/content/index.js +13 -13
  55. package/dist/features/crm/index.js +16 -16
  56. package/dist/features/dashboard/index.d.ts +8 -8
  57. package/dist/features/dashboard/index.js +13 -13
  58. package/dist/features/delivery/index.js +25 -25
  59. package/dist/features/knowledge/index.js +10 -10
  60. package/dist/features/lead-gen/index.d.ts +49 -32
  61. package/dist/features/lead-gen/index.js +17 -17
  62. package/dist/features/monitoring/index.d.ts +10 -10
  63. package/dist/features/monitoring/index.js +15 -15
  64. package/dist/features/monitoring/requests/index.js +12 -12
  65. package/dist/features/notes/index.js +1 -1
  66. package/dist/features/operations/index.d.ts +12 -12
  67. package/dist/features/operations/index.js +18 -18
  68. package/dist/features/public-agent-chat/index.js +4 -4
  69. package/dist/features/seo/index.js +13 -13
  70. package/dist/features/settings/index.js +13 -13
  71. package/dist/hooks/access/index.d.ts +60 -1
  72. package/dist/hooks/access/index.js +10 -10
  73. package/dist/hooks/delivery/index.js +6 -6
  74. package/dist/hooks/published.d.ts +332 -99
  75. package/dist/hooks/published.js +23 -23
  76. package/dist/hooks/user-notes/index.js +1 -1
  77. package/dist/initialization/index.d.ts +12 -0
  78. package/dist/initialization/index.js +1 -1
  79. package/dist/knowledge/index.js +22 -20
  80. package/dist/{knowledge-search-index-6GQK55IQ.js → knowledge-search-index-YU6V3FTK.js} +4 -4
  81. package/dist/layout/index.js +14 -14
  82. package/dist/organization/index.d.ts +17 -1
  83. package/dist/organization/index.js +2 -2
  84. package/dist/profile/index.js +1 -1
  85. package/dist/provider/ElevasisServiceContext.js +1 -1
  86. package/dist/provider/index.js +10 -10
  87. package/dist/provider/published.js +10 -10
  88. package/dist/sse/index.js +14 -0
  89. package/dist/test-utils/index.js +6 -6
  90. package/dist/types/index.d.ts +12 -0
  91. package/dist/utils/index.d.ts +20 -2
  92. package/dist/utils/index.js +4 -4
  93. package/package.json +24 -14
  94. /package/dist/{chunk-Y6I3IC45.js → chunk-6XBZPKMI.js} +0 -0
  95. /package/dist/{chunk-6SSQGWK7.js → chunk-7ZUXA2NW.js} +0 -0
@@ -1,17 +1,17 @@
1
- import { useScheduledTasks } from './chunk-N6K2Q5BM.js';
1
+ import { useScheduledTasks } from './chunk-WDABHUIL.js';
2
2
  import { ZodFormRenderer } from './chunk-3MEXPLWT.js';
3
3
  import { ResourceHealthChart } from './chunk-LGKLC5MG.js';
4
- import { AppShellCenteredContainer, AppShellLoader } from './chunk-S3ETKY5C.js';
4
+ import { AppShellCenteredContainer, AppShellLoader } from './chunk-3UO2CJTR.js';
5
5
  import { useTimeRangeDates } from './chunk-YQQ5GRUR.js';
6
6
  import { Graph_module_css_default, useDirectedChainHighlighting, useNodeSelection, useFitViewTrigger } from './chunk-HENXLGVD.js';
7
- import { useCyberColors, GlowDot, JsonViewer, useExecuteResource, EmptyState, useDashboardMetrics, useResources, useUnresolvedErrors, useRecentExecutionsByResource, PageTitleCaption, HeroStatsRow, useCommandQueue, TabCountBadge, useResourcesHealth, TERMINAL_EXECUTION_STATUSES } from './chunk-M3DWVFRT.js';
7
+ import { useCyberColors, GlowDot, JsonViewer, useExecuteResource, EmptyState, useResolvedTimeRange, useDashboardMetrics, useResources, useUnresolvedErrors, useRecentExecutionsByResource, PageTitleCaption, HeroStatsRow, useCommandQueue, TabCountBadge, useResourcesHealth, TERMINAL_EXECUTION_STATUSES } from './chunk-7A25EJ4A.js';
8
8
  import { glassBase } from './chunk-4WLAVUPS.js';
9
9
  import { CardHeader } from './chunk-62GVNH5U.js';
10
10
  import { useInitialization } from './chunk-P45GQ3ZW.js';
11
- import { STATUS_COLORS, getStatusIcon, formatDuration, getStatusColors, AGENT_CONSTANTS, shouldAnimateEdge, TIMELINE_CONSTANTS, calculateBarPosition, CONTAINER_CONSTANTS, useExecutionPath, useUnifiedWorkflowLayout, WORKFLOW_CONSTANTS, useReactFlowAgent } from './chunk-BLXJEIQS.js';
12
- import { formatTimeAgo, formatRelativeTime } from './chunk-5ZK7K7YP.js';
13
- import { getTimeRangeDates } from './chunk-Y6I3IC45.js';
14
- import { ResourceStatusColors } from './chunk-6SSQGWK7.js';
11
+ import { STATUS_COLORS, getStatusIcon, formatDuration, getStatusColors, AGENT_CONSTANTS, shouldAnimateEdge, TIMELINE_CONSTANTS, calculateBarPosition, CONTAINER_CONSTANTS, useExecutionPath, useUnifiedWorkflowLayout, WORKFLOW_CONSTANTS, useReactFlowAgent } from './chunk-2HXDI4RY.js';
12
+ import { formatTimeAgo, formatRelativeTime } from './chunk-CIGWHY7C.js';
13
+ import { getTimeRangeDates } from './chunk-6XBZPKMI.js';
14
+ import { ResourceStatusColors } from './chunk-7ZUXA2NW.js';
15
15
  import { memo, useMemo, useEffect, useState, useCallback, Fragment } from 'react';
16
16
  import { Paper, Stack, Text, Group, Badge, Box, useComputedColorScheme, Loader, Card, ActionIcon, SegmentedControl, Collapse, Button, Modal, Center, SimpleGrid, Title, Tabs, Grid, ThemeIcon } from '@mantine/core';
17
17
  import { jsxs, jsx, Fragment as Fragment$1 } from 'react/jsx-runtime';
@@ -1634,7 +1634,7 @@ var severityColor = {
1634
1634
  info: "blue"
1635
1635
  };
1636
1636
  function OperationsOverview({
1637
- timeRange,
1637
+ timeRange: timeRangeProp,
1638
1638
  onResourceClick,
1639
1639
  onErrorsNavigate,
1640
1640
  onCommandQueueNavigate,
@@ -1642,6 +1642,7 @@ function OperationsOverview({
1642
1642
  renderTrendChart,
1643
1643
  renderOperationalOverview
1644
1644
  }) {
1645
+ const timeRange = useResolvedTimeRange(timeRangeProp);
1645
1646
  const { organizationReady, error: initError } = useInitialization();
1646
1647
  const { data: dashboardDataRaw, isLoading, error } = useDashboardMetrics(timeRange);
1647
1648
  const dashboardData = dashboardDataRaw;
@@ -1706,11 +1707,12 @@ function OperationsOverview({
1706
1707
  }
1707
1708
  var Dashboard = OperationsOverview;
1708
1709
  function DashboardOperationsOverview({
1709
- timeRange,
1710
+ timeRange: timeRangeProp,
1710
1711
  onErrorsNavigate,
1711
1712
  onCommandQueueNavigate,
1712
1713
  onScheduledTasksNavigate
1713
1714
  }) {
1715
+ const timeRange = useResolvedTimeRange(timeRangeProp);
1714
1716
  const { startDate, endDate } = useTimeRangeDates(timeRange);
1715
1717
  const { data: errorData, isLoading: errorsLoading } = useUnresolvedErrors({ startDate, endDate });
1716
1718
  const errors = errorData?.errors ?? [];
@@ -1905,7 +1907,12 @@ var entityTypeConfig = {
1905
1907
  function getEntityConfig(entityType) {
1906
1908
  return entityTypeConfig[entityType] || { icon: IconActivity, hasPath: false };
1907
1909
  }
1908
- function RecentExecutionsByResource({ timeRange, limit = 5, onResourceClick }) {
1910
+ function RecentExecutionsByResource({
1911
+ timeRange: timeRangeProp,
1912
+ limit = 5,
1913
+ onResourceClick
1914
+ }) {
1915
+ const timeRange = useResolvedTimeRange(timeRangeProp);
1909
1916
  const { data, isLoading, isFetching, error } = useRecentExecutionsByResource({
1910
1917
  timeRange,
1911
1918
  limit
@@ -2031,7 +2038,11 @@ var severityColor2 = {
2031
2038
  warning: "yellow",
2032
2039
  info: "blue"
2033
2040
  };
2034
- function UnresolvedErrorsTeaser({ timeRange, onNavigateToAllErrors }) {
2041
+ function UnresolvedErrorsTeaser({
2042
+ timeRange: timeRangeProp,
2043
+ onNavigateToAllErrors
2044
+ }) {
2045
+ const timeRange = useResolvedTimeRange(timeRangeProp);
2035
2046
  const { startDate, endDate } = useTimeRangeDates(timeRange);
2036
2047
  const { data, isLoading } = useUnresolvedErrors({ startDate, endDate });
2037
2048
  const errors = data?.errors ?? [];
@@ -1,4 +1,4 @@
1
- import { useAppearance } from './chunk-M3DWVFRT.js';
1
+ import { useAppearance } from './chunk-7A25EJ4A.js';
2
2
  import { useState, Component } from 'react';
3
3
  import { CopyButton, Tooltip } from '@mantine/core';
4
4
  import { IconCheck, IconCopy } from '@tabler/icons-react';
@@ -1,15 +1,15 @@
1
- import { useProjectRealtime, useProjectActivities } from './chunk-IWNVPPWF.js';
2
- import { useCreateTask, useCreateMilestone, useProjectMilestones, useUpdateTask, useProjects, useDeleteProject, useProject, useProjectNotes, useUpdateMilestone, useCreateNote } from './chunk-GFSOQH3N.js';
1
+ import { useProjectRealtime, useProjectActivities } from './chunk-MMOR2HQZ.js';
2
+ import { useCreateTask, useCreateMilestone, useProjectMilestones, useUpdateTask, useProjects, useDeleteProject, useProject, useProjectNotes, useUpdateMilestone, useCreateNote } from './chunk-MJIDC25O.js';
3
3
  import { useTableSort, sortData } from './chunk-2Y6AKWGU.js';
4
4
  import { useTableSelection } from './chunk-WDBNW44Z.js';
5
5
  import { milestoneStatusColors, formatStatusLabel, taskTypeColors, taskStatusColors, projectStatusColors, calculateProgress, noteTypeColors } from './chunk-DLR4SDZW.js';
6
- import { SubshellPageLayout } from './chunk-57QSONG5.js';
6
+ import { SubshellPageLayout } from './chunk-Q6HRTWA6.js';
7
7
  import { PageContainer } from './chunk-BZZCNLT6.js';
8
8
  import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
9
9
  import { FilterBar } from './chunk-PDHTXPSF.js';
10
- import { StatusBadge, EmptyState, SubshellSidebarSection, PageTitleCaption, usePaginationState, SubshellContentContainer, CenteredErrorState, CustomModal, StatCard, SubshellNavItem } from './chunk-M3DWVFRT.js';
10
+ import { StatusBadge, EmptyState, SubshellSidebarSection, PageTitleCaption, usePaginationState, SubshellContentContainer, CenteredErrorState, CustomModal, StatCard, SubshellNavItem } from './chunk-7A25EJ4A.js';
11
11
  import { CardHeader } from './chunk-62GVNH5U.js';
12
- import { PAGE_SIZE_DEFAULT, formatTimeAgo, formatDate, formatRelativeTime } from './chunk-5ZK7K7YP.js';
12
+ import { PAGE_SIZE_DEFAULT, formatTimeAgo, formatDate, formatRelativeTime } from './chunk-CIGWHY7C.js';
13
13
  import { useRouterContext } from './chunk-Q7DJKLEN.js';
14
14
  import { useState, useMemo } from 'react';
15
15
  import { Stack, Text, Group, Checkbox, ActionIcon, TextInput, Button, Modal, Title, Textarea, Select, SimpleGrid, Card, ThemeIcon, RingProgress, Paper, Timeline, Badge, Collapse, Center, Loader, Table, Pagination, Alert, CopyButton, Tooltip, Space, Tabs, Divider, Anchor, Chip, List } from '@mantine/core';
@@ -1,12 +1,12 @@
1
- import { useMarkAsRead, useExecutionLogsFilters, useExecutionLogs, useExecutionHealth, useCostSummary, useActivityFilters, useActivityTrend, useActivities, useNotifications, useMarkAllAsRead } from './chunk-5OBIZIWW.js';
2
- import { AppShellLoader } from './chunk-S3ETKY5C.js';
1
+ import { useMarkAsRead, useExecutionLogsFilters, useExecutionLogs, useExecutionHealth, useCostSummary, useActivityFilters, useActivityTrend, useActivities, useNotifications, useMarkAllAsRead } from './chunk-ZU676PFP.js';
2
+ import { AppShellLoader } from './chunk-3UO2CJTR.js';
3
3
  import { useTimeRangeDates } from './chunk-YQQ5GRUR.js';
4
4
  import { FilterBar } from './chunk-PDHTXPSF.js';
5
- import { CenteredErrorState, StatsCardSkeleton, CyberAreaChart, TrendIndicator, DetailCardSkeleton, useResolveError, useResolveAllErrors, usePaginationState, useErrorDetails, EmptyState, PageTitleCaption, useErrorAnalysis, useErrorDetail, useResolveErrorsByExecution, useResources, CustomModal, JsonViewer, useCostTrends, useCostByModel, useCostBreakdown, CostTrendChart, ActivityTrendChart } from './chunk-M3DWVFRT.js';
5
+ import { CenteredErrorState, StatsCardSkeleton, CyberAreaChart, TrendIndicator, DetailCardSkeleton, useResolveError, useResolveAllErrors, usePaginationState, useErrorDetails, EmptyState, useResolvedTimeRange, PageTitleCaption, useErrorAnalysis, useErrorDetail, useResolveErrorsByExecution, useResources, CustomModal, JsonViewer, useCostTrends, useCostByModel, useCostBreakdown, CostTrendChart, ActivityTrendChart } from './chunk-7A25EJ4A.js';
6
6
  import { CardHeader } from './chunk-62GVNH5U.js';
7
- import { formatDuration } from './chunk-BLXJEIQS.js';
8
- import { PAGE_SIZE_DEFAULT } from './chunk-5ZK7K7YP.js';
9
- import { formatBucketTime, getTimeRangeDates } from './chunk-Y6I3IC45.js';
7
+ import { formatDuration } from './chunk-2HXDI4RY.js';
8
+ import { PAGE_SIZE_DEFAULT } from './chunk-CIGWHY7C.js';
9
+ import { formatBucketTime, getTimeRangeDates } from './chunk-6XBZPKMI.js';
10
10
  import { useRouterContext } from './chunk-Q7DJKLEN.js';
11
11
  import { useState, useMemo, useCallback } from 'react';
12
12
  import { Table, Text, Badge, Tooltip, Card, Group, Select, SegmentedControl, Button, TextInput, Stack, Paper, Center, Loader, ActionIcon, NumberFormatter, Box, Alert, Switch, Pagination, UnstyledButton, Title, Divider, Code, CopyButton, Accordion } from '@mantine/core';
@@ -1274,11 +1274,12 @@ function NotificationList({ notifications, isLoading, onClose, onNavigate }) {
1274
1274
  return /* @__PURE__ */ jsx(Stack, { gap: 0, children: notifications.map((notification) => /* @__PURE__ */ jsx(NotificationItem, { notification, onClose, onNavigate }, notification.id)) });
1275
1275
  }
1276
1276
  function ExecutionLogsPage({
1277
- timeRange,
1277
+ timeRange: timeRangeProp,
1278
1278
  pageSize = 20,
1279
1279
  onNavigateToExecution,
1280
1280
  renderTrendChart
1281
1281
  }) {
1282
+ const timeRange = useResolvedTimeRange(timeRangeProp);
1282
1283
  const { filters, updateFilter, resetFilters } = useExecutionLogsFilters(timeRange);
1283
1284
  const startDate = useMemo(() => {
1284
1285
  const { startDate: sd } = getTimeRangeDates(timeRange);
@@ -1316,7 +1317,8 @@ function ExecutionLogsPage({
1316
1317
  ] }) })
1317
1318
  ] });
1318
1319
  }
1319
- function ExecutionHealth({ timeRange, onErrorClick }) {
1320
+ function ExecutionHealth({ timeRange: timeRangeProp, onErrorClick }) {
1321
+ const timeRange = useResolvedTimeRange(timeRangeProp);
1320
1322
  const { data, isLoading, error } = useExecutionHealth({ timeRange });
1321
1323
  const { data: errorData, isLoading: errorLoading, error: errorError } = useErrorAnalysis(timeRange);
1322
1324
  const { startDate, endDate } = useTimeRangeDates(timeRange);
@@ -1568,7 +1570,8 @@ ${primaryError.errorContext ? JSON.stringify(primaryError.errorContext, null, 2)
1568
1570
  ] })
1569
1571
  ] }) });
1570
1572
  }
1571
- function CostAnalytics({ timeRange }) {
1573
+ function CostAnalytics({ timeRange: timeRangeProp }) {
1574
+ const timeRange = useResolvedTimeRange(timeRangeProp);
1572
1575
  const { data: trendsData, isLoading: trendsLoading, error: trendsError } = useCostTrends(timeRange);
1573
1576
  const { data: summaryData } = useCostSummary(timeRange);
1574
1577
  const { data: modelData, isLoading: modelLoading, error: modelError } = useCostByModel(timeRange);
@@ -1616,7 +1619,8 @@ function getNavigationPath2(activity) {
1616
1619
  return null;
1617
1620
  }
1618
1621
  }
1619
- function ActivityLog({ timeRange, pageSize = PAGE_SIZE_DEFAULT, onNavigate }) {
1622
+ function ActivityLog({ timeRange: timeRangeProp, pageSize = PAGE_SIZE_DEFAULT, onNavigate }) {
1623
+ const timeRange = useResolvedTimeRange(timeRangeProp);
1620
1624
  const { filters, updateFilter, resetFilters } = useActivityFilters(timeRange);
1621
1625
  const startDate = useMemo(() => {
1622
1626
  const { startDate: startDate2 } = getTimeRangeDates(timeRange);
@@ -1,9 +1,9 @@
1
1
  import { createLiveTempMessageIdentity } from './chunk-QFGNRKIE.js';
2
- import { sessionsKeys, isExecutionInFlight } from './chunk-M3DWVFRT.js';
3
- import { SessionIdParamSchema, ExecutionIdParamsSchema, WebSocketSessionTurnSchema } from './chunk-2GIJBHZT.js';
2
+ import { sessionsKeys, isExecutionInFlight } from './chunk-7A25EJ4A.js';
3
+ import { SessionIdParamSchema, ExecutionIdParamsSchema, WebSocketSessionTurnSchema } from './chunk-IIMC4TRH.js';
4
4
  import { useOrganization } from './chunk-DD3CCMCZ.js';
5
- import { STALE_TIME_MONITORING, STALE_TIME_DEFAULT } from './chunk-5ZK7K7YP.js';
6
- import { REFETCH_INTERVAL_RUNNING, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY } from './chunk-Y6I3IC45.js';
5
+ import { STALE_TIME_MONITORING, STALE_TIME_DEFAULT } from './chunk-CIGWHY7C.js';
6
+ import { REFETCH_INTERVAL_RUNNING, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY } from './chunk-6XBZPKMI.js';
7
7
  import { useElevasisServices } from './chunk-BI5VDO2K.js';
8
8
  import { useAuthContext } from './chunk-BRJ3QZ4E.js';
9
9
  import { useQuery, useQueryClient } from '@tanstack/react-query';
@@ -1,17 +1,17 @@
1
- import { useDealDetail, useExecuteAction } from './chunk-FFVZB25A.js';
2
- import { CRM_API_INTERFACE } from './chunk-YUWR4UX7.js';
3
- import { useCompany, useContact, deriveActions } from './chunk-L42Z3VZM.js';
1
+ import { useDealDetail, useExecuteAction } from './chunk-CSEADI37.js';
2
+ import { CRM_API_INTERFACE } from './chunk-52G4B33T.js';
3
+ import { useCompany, useContact, deriveActions } from './chunk-NGRRAYMO.js';
4
4
  import { useTableSort, sortData } from './chunk-2Y6AKWGU.js';
5
- import { getSystemApiInterfaceReadiness } from './chunk-3RK2NNJX.js';
5
+ import { getSystemApiInterfaceReadiness } from './chunk-DFGQG32T.js';
6
6
  import { useTableSelection } from './chunk-WDBNW44Z.js';
7
- import { SubshellPageLayout } from './chunk-57QSONG5.js';
7
+ import { SubshellPageLayout } from './chunk-Q6HRTWA6.js';
8
8
  import { PageContainer } from './chunk-BZZCNLT6.js';
9
9
  import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
10
10
  import { FilterBar } from './chunk-PDHTXPSF.js';
11
- import { SubshellSidebarSection, CrmSidebarMiddle, useDealsSummary, useOptionalElevasisSystems, getCrmPipelineCatalog, CenteredErrorState, StatCard, PageTitleCaption, useDeleteDeal, usePaginationState, useDeals, SubshellContentContainer, EmptyState, CustomModal, useCrmActions, ActivityTimeline, ContextViewer, JsonViewer, dealKeys } from './chunk-M3DWVFRT.js';
12
- import { showApiErrorNotification, showSuccessNotification } from './chunk-KXNRTJAE.js';
11
+ import { SubshellSidebarSection, CrmSidebarMiddle, useDealsSummary, useOptionalElevasisSystems, getCrmPipelineCatalog, CenteredErrorState, StatCard, PageTitleCaption, useDeleteDeal, usePaginationState, useDeals, SubshellContentContainer, EmptyState, CustomModal, useCrmActions, ActivityTimeline, ContextViewer, JsonViewer, dealKeys } from './chunk-7A25EJ4A.js';
12
+ import { showApiErrorNotification, showSuccessNotification } from './chunk-3HMRK3RC.js';
13
13
  import { CardHeader } from './chunk-62GVNH5U.js';
14
- import { PAGE_SIZE_DEFAULT, formatTimeAgo } from './chunk-5ZK7K7YP.js';
14
+ import { PAGE_SIZE_DEFAULT, formatTimeAgo } from './chunk-CIGWHY7C.js';
15
15
  import { useElevasisServices } from './chunk-BI5VDO2K.js';
16
16
  import { Stack, Paper, Center, Loader, Group, Box, Text, Alert, Table, SimpleGrid, Button, Select, TextInput, Tabs, Checkbox, Badge, Tooltip, Pagination, Title, Code, Card, SegmentedControl, Switch, NumberInput, ColorSwatch, Popover, ActionIcon, Anchor, CopyButton, Divider, Textarea } from '@mantine/core';
17
17
  import { IconAddressBook, IconColumns, IconHistory, IconAlertCircle, IconCurrencyDollar, IconChartBar, IconBriefcase, IconTrophy, IconSearch, IconTargetArrow, IconAlertTriangle, IconMessages, IconArrowLeft, IconFileText, IconInbox, IconUser, IconBolt, IconBuilding, IconSettings, IconRestore, IconInfoCircle, IconMailForward, IconPlus, IconArrowRight, IconNote, IconCheck, IconCopy } from '@tabler/icons-react';
@@ -1,4 +1,4 @@
1
- import { useOptionalElevasisSystems } from './chunk-M3DWVFRT.js';
1
+ import { useOptionalElevasisSystems } from './chunk-7A25EJ4A.js';
2
2
  import { useRouterContext } from './chunk-Q7DJKLEN.js';
3
3
  import { useMemo } from 'react';
4
4
 
@@ -1,4 +1,5 @@
1
- import { requestsKeys } from './chunk-M3DWVFRT.js';
1
+ import { requestsKeys } from './chunk-7A25EJ4A.js';
2
+ import { buildQueryString } from './chunk-CIGWHY7C.js';
2
3
  import { useElevasisServices } from './chunk-BI5VDO2K.js';
3
4
  import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
4
5
 
@@ -8,15 +9,15 @@ function useRequestsList(filters = {}) {
8
9
  queryKey: requestsKeys.list(workOSOrganizationId ?? void 0, filters),
9
10
  queryFn: async () => {
10
11
  const { type, severity, status, source, limit, offset } = filters;
11
- const params = new URLSearchParams();
12
- if (type) params.set("type", type);
13
- if (severity) params.set("severity", severity);
14
- if (status) params.set("status", status);
15
- if (source) params.set("source", source);
16
- if (limit !== void 0) params.set("limit", String(limit));
17
- if (offset !== void 0) params.set("offset", String(offset));
18
- const query = params.toString();
19
- const { requests } = await apiRequest(`/requests${query ? "?" + query : ""}`);
12
+ const query = buildQueryString({
13
+ type: type || void 0,
14
+ severity: severity || void 0,
15
+ status: status || void 0,
16
+ source: source || void 0,
17
+ limit,
18
+ offset
19
+ });
20
+ const { requests } = await apiRequest(`/requests${query}`);
20
21
  return requests;
21
22
  },
22
23
  enabled: isReady
@@ -1,6 +1,6 @@
1
- import { REFETCH_INTERVAL_DASHBOARD } from './chunk-Y6I3IC45.js';
1
+ import { REFETCH_INTERVAL_DASHBOARD } from './chunk-6XBZPKMI.js';
2
2
  import { useElevasisServices } from './chunk-BI5VDO2K.js';
3
- import { ResourceTypeSchema, NonEmptyStringSchema, OriginResourceTypeSchema, UuidSchema } from './chunk-TVTSASST.js';
3
+ import { ResourceTypeSchema, NonEmptyStringSchema, OriginResourceTypeSchema, UuidSchema, PaginationQuerySchema, PageOffsetSchema, PageLimitSchema } from './chunk-34B3ACOZ.js';
4
4
  import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
5
5
  import { z } from 'zod';
6
6
 
@@ -50,7 +50,7 @@ var OptionalOriginTrackingSchema = z.object({
50
50
  originResourceType: OriginResourceTypeSchema.optional(),
51
51
  originResourceId: z.string().max(100).optional()
52
52
  });
53
- z.object({
53
+ var CreateScheduleInputSchema = z.object({
54
54
  organizationId: UuidSchema,
55
55
  name: NonEmptyStringSchema.max(255),
56
56
  description: z.string().max(1e3).optional(),
@@ -60,27 +60,15 @@ z.object({
60
60
  idempotencyKey: z.string().max(255).optional(),
61
61
  metadata: z.record(z.string(), z.unknown()).optional()
62
62
  }).merge(OptionalOriginTrackingSchema);
63
- var CreateScheduleRequestSchema = z.object({
64
- name: z.string().min(1, "Name is required").max(255),
65
- description: z.string().max(1e3).optional(),
66
- target: z.object({
67
- resourceType: ResourceTypeSchema,
68
- resourceId: z.string().min(1, "Resource ID is required").max(255)
69
- }),
70
- scheduleConfig: TaskScheduleConfigSchema,
71
- maxRetries: z.number().int().min(0).max(10).optional(),
72
- idempotencyKey: z.string().max(255).optional(),
73
- // Origin tracking (optional)
74
- originExecutionId: z.string().uuid().optional(),
75
- originResourceType: OriginResourceTypeSchema.optional(),
76
- originResourceId: z.string().max(255).optional()
63
+ var CreateScheduleRequestSchema = CreateScheduleInputSchema.omit({
64
+ organizationId: true,
65
+ metadata: true
77
66
  });
78
67
  z.object({
79
68
  status: z.enum(["active", "paused", "completed", "cancelled"]).optional(),
80
69
  targetResourceType: ResourceTypeSchema.optional(),
81
70
  targetResourceId: z.string().optional(),
82
- limit: z.coerce.number().int().min(1).max(100).optional().default(50),
83
- offset: z.coerce.number().int().min(0).optional().default(0)
71
+ ...PaginationQuerySchema.shape
84
72
  });
85
73
  var GetScheduleParamsSchema = z.object({
86
74
  id: z.string().uuid("Invalid schedule ID")
@@ -135,8 +123,8 @@ z.object({
135
123
  id: z.string().uuid("Invalid schedule ID")
136
124
  });
137
125
  z.object({
138
- limit: z.coerce.number().int().min(1).max(100).optional().default(20),
139
- offset: z.coerce.number().int().min(0).optional().default(0)
126
+ limit: PageLimitSchema.default(20),
127
+ offset: PageOffsetSchema
140
128
  });
141
129
  var ScheduleResponseSchema = z.object({
142
130
  id: z.string().uuid(),
@@ -1,4 +1,4 @@
1
- import { useAppearance } from './chunk-M3DWVFRT.js';
1
+ import { useAppearance } from './chunk-7A25EJ4A.js';
2
2
  import { Center } from '@mantine/core';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
@@ -1,8 +1,8 @@
1
- import { deriveActions } from './chunk-L42Z3VZM.js';
2
- import { acquisitionListKeys, useNotificationAdapter } from './chunk-M3DWVFRT.js';
3
- import { showApiErrorNotification, showSuccessNotification } from './chunk-KXNRTJAE.js';
1
+ import { deriveActions } from './chunk-NGRRAYMO.js';
2
+ import { acquisitionListKeys, useNotificationAdapter } from './chunk-7A25EJ4A.js';
3
+ import { showApiErrorNotification, showSuccessNotification } from './chunk-3HMRK3RC.js';
4
4
  import { useElevasisServices } from './chunk-BI5VDO2K.js';
5
- import { CredentialNameSchema, UuidSchema } from './chunk-TVTSASST.js';
5
+ import { CredentialNameSchema, UuidSchema } from './chunk-34B3ACOZ.js';
6
6
  import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
7
7
  import { z } from 'zod';
8
8
  import { useMemo } from 'react';
@@ -260,10 +260,16 @@ var CredentialService = class {
260
260
  return CredentialSchemas.VerifyResponse.parse(response);
261
261
  }
262
262
  };
263
+
264
+ // src/hooks/settings/credentials/queryKeys.ts
265
+ var credentialsKeys = {
266
+ all: ["credentials"],
267
+ list: (organizationId) => [...credentialsKeys.all, organizationId]
268
+ };
263
269
  function useCredentials() {
264
270
  const { apiRequest, workOSOrganizationId, isReady } = useElevasisServices();
265
271
  return useQuery({
266
- queryKey: ["credentials", workOSOrganizationId],
272
+ queryKey: credentialsKeys.list(workOSOrganizationId),
267
273
  queryFn: async () => {
268
274
  const service = new CredentialService(apiRequest);
269
275
  return await service.listCredentials();
@@ -291,7 +297,7 @@ function useCreateCredential() {
291
297
  return await service.createCredential(data);
292
298
  },
293
299
  onSuccess: () => {
294
- queryClient.invalidateQueries({ queryKey: ["credentials"] });
300
+ queryClient.invalidateQueries({ queryKey: credentialsKeys.all });
295
301
  notifications.show({
296
302
  title: "Success",
297
303
  message: "Credential created successfully",
@@ -314,7 +320,7 @@ function useDeleteCredential() {
314
320
  return await service.deleteCredential(credentialId);
315
321
  },
316
322
  onSuccess: () => {
317
- queryClient.invalidateQueries({ queryKey: ["credentials"] });
323
+ queryClient.invalidateQueries({ queryKey: credentialsKeys.all });
318
324
  notifications.show({
319
325
  title: "Success",
320
326
  message: "Credential deleted successfully",
@@ -337,7 +343,7 @@ function useUpdateCredential() {
337
343
  return await service.updateCredential(credentialId, updates);
338
344
  },
339
345
  onSuccess: () => {
340
- queryClient.invalidateQueries({ queryKey: ["credentials"] });
346
+ queryClient.invalidateQueries({ queryKey: credentialsKeys.all });
341
347
  notifications.show({
342
348
  title: "Success",
343
349
  message: "Credential updated successfully",
@@ -389,4 +395,4 @@ function useTransitionListCompany() {
389
395
  });
390
396
  }
391
397
 
392
- export { CredentialSchemas, CredentialService, leadGenArtifactKeys, leadGenListCompanyKeys, leadGenListMemberKeys, useArtifacts, useCreateArtifact, useCreateCredential, useCredentials, useDeleteCredential, useDeriveActions, useListMember, useListMembers, useTransitionListCompany, useTransitionListMember, useUpdateCredential, useUpdateListStatus, useVerifyCredential };
398
+ export { CredentialSchemas, CredentialService, credentialsKeys, leadGenArtifactKeys, leadGenListCompanyKeys, leadGenListMemberKeys, useArtifacts, useCreateArtifact, useCreateCredential, useCredentials, useDeleteCredential, useDeriveActions, useListMember, useListMembers, useTransitionListCompany, useTransitionListMember, useUpdateCredential, useUpdateListStatus, useVerifyCredential };
@@ -29,6 +29,11 @@ function segmentReferencesOrg(segment, orgIds) {
29
29
  return false;
30
30
  }
31
31
 
32
+ // src/organization/utils/isOrganizationServiceable.ts
33
+ function isOrganizationServiceable(status) {
34
+ return status == null || status === "active";
35
+ }
36
+
32
37
  // src/organization/context/OrganizationProvider.tsx
33
38
  function OrganizationProvider({ apiRequest, children }) {
34
39
  const { user, organizationId: workosOrgId } = useAuthContext();
@@ -75,13 +80,15 @@ function OrganizationProvider({ apiRequest, children }) {
75
80
  (data) => {
76
81
  let selected = null;
77
82
  if (workosOrgId) {
78
- selected = data.find((m) => m.organization?.workos_org_id === workosOrgId) ?? null;
83
+ const candidate = data.find((m) => m.organization?.workos_org_id === workosOrgId) ?? null;
84
+ selected = candidate && isOrganizationServiceable(candidate.organization?.status) ? candidate : null;
79
85
  }
80
86
  if (!selected && profile?.last_visited_org) {
81
- selected = data.find((m) => m.organizationId === profile.last_visited_org) ?? null;
87
+ const candidate = data.find((m) => m.organizationId === profile.last_visited_org) ?? null;
88
+ selected = candidate && isOrganizationServiceable(candidate.organization?.status) ? candidate : null;
82
89
  }
83
- if (!selected && data.length > 0) {
84
- selected = data[0];
90
+ if (!selected) {
91
+ selected = data.find((m) => isOrganizationServiceable(m.organization?.status)) ?? null;
85
92
  }
86
93
  if (selected) {
87
94
  applyMembership(selected);
@@ -104,6 +111,8 @@ function OrganizationProvider({ apiRequest, children }) {
104
111
  }
105
112
  setMemberships(data);
106
113
  if (data.length === 0) {
114
+ applyMembership(null);
115
+ setError("No organization membership found. Please contact your administrator for an invitation.");
107
116
  hasInitializedRef.current = true;
108
117
  return;
109
118
  }
@@ -111,10 +120,11 @@ function OrganizationProvider({ apiRequest, children }) {
111
120
  selectOrganization(data);
112
121
  } else {
113
122
  const stillPresent = data.find((m) => m.organization?.workos_org_id === currentWorkOSOrganizationId);
114
- if (!stillPresent) {
115
- applyMembership(data[0] ?? null);
123
+ const stillServiceable = stillPresent && isOrganizationServiceable(stillPresent.organization?.status) ? stillPresent : null;
124
+ if (!stillServiceable) {
125
+ applyMembership(data.find((m) => isOrganizationServiceable(m.organization?.status)) ?? null);
116
126
  } else {
117
- applyMembership(stillPresent);
127
+ applyMembership(stillServiceable);
118
128
  }
119
129
  }
120
130
  hasInitializedRef.current = true;
@@ -449,14 +459,16 @@ function createUseOrgInitialization(useOrganizations, useApiClient) {
449
459
  async (data) => {
450
460
  let selectedMembership = null;
451
461
  if (workosOrgId) {
452
- selectedMembership = data.find((m) => m.organization?.workos_org_id === workosOrgId) || null;
462
+ const candidate = data.find((m) => m.organization?.workos_org_id === workosOrgId) || null;
463
+ selectedMembership = candidate && isOrganizationServiceable(candidate.organization?.status) ? candidate : null;
453
464
  }
454
465
  if (!selectedMembership && profile?.last_visited_org) {
455
466
  const supabaseLastVisitedOrgId = profile.last_visited_org;
456
- selectedMembership = data.find((m) => m.organizationId === supabaseLastVisitedOrgId) || null;
467
+ const candidate = data.find((m) => m.organizationId === supabaseLastVisitedOrgId) || null;
468
+ selectedMembership = candidate && isOrganizationServiceable(candidate.organization?.status) ? candidate : null;
457
469
  }
458
- if (!selectedMembership && data.length > 0) {
459
- selectedMembership = data[0];
470
+ if (!selectedMembership) {
471
+ selectedMembership = data.find((m) => isOrganizationServiceable(m.organization?.status)) || null;
460
472
  }
461
473
  if (selectedMembership) {
462
474
  const workosSelectedOrgId = selectedMembership.organization?.workos_org_id;
@@ -472,11 +484,12 @@ function createUseOrgInitialization(useOrganizations, useApiClient) {
472
484
  (data) => {
473
485
  const workosCurrentOrgId = currentWorkOSOrganizationId;
474
486
  const currentOrg = data.find((m) => m.organization?.workos_org_id === workosCurrentOrgId);
475
- if (!currentOrg) {
487
+ const currentOrgServiceable = currentOrg && isOrganizationServiceable(currentOrg.organization?.status) ? currentOrg : null;
488
+ if (!currentOrgServiceable) {
476
489
  setCurrentWorkOSOrganizationId(null);
477
490
  setCurrentMembership(null);
478
- if (data.length > 0) {
479
- const fallbackOrg = data[0];
491
+ const fallbackOrg = data.find((m) => isOrganizationServiceable(m.organization?.status));
492
+ if (fallbackOrg) {
480
493
  const workosFallbackOrgId = fallbackOrg.organization?.workos_org_id;
481
494
  if (workosFallbackOrgId) {
482
495
  setCurrentWorkOSOrganizationId(brandWorkOsOrgId(workosFallbackOrgId));
@@ -484,8 +497,8 @@ function createUseOrgInitialization(useOrganizations, useApiClient) {
484
497
  }
485
498
  }
486
499
  } else {
487
- if (currentOrg.id !== currentMembershipIdRef.current) {
488
- setCurrentMembership(currentOrg);
500
+ if (currentOrgServiceable.id !== currentMembershipIdRef.current) {
501
+ setCurrentMembership(currentOrgServiceable);
489
502
  }
490
503
  }
491
504
  },
@@ -1,4 +1,4 @@
1
- import { showApiErrorNotification } from './chunk-KXNRTJAE.js';
1
+ import { showApiErrorNotification } from './chunk-3HMRK3RC.js';
2
2
  import { useElevasisServices } from './chunk-BI5VDO2K.js';
3
3
  import { useQuery, useQueries, useMutation } from '@tanstack/react-query';
4
4
 
@@ -1,14 +1,31 @@
1
- import { GetNotificationsQuerySchema, MarkAsReadParamsSchema } from './chunk-VM2OWOXL.js';
2
- import { useNotificationAdapter } from './chunk-M3DWVFRT.js';
3
- import { getTimeRangeDates } from './chunk-Y6I3IC45.js';
1
+ import { GetNotificationsQuerySchema, MarkAsReadParamsSchema } from './chunk-GY7FXTC4.js';
2
+ import { useNotificationAdapter } from './chunk-7A25EJ4A.js';
3
+ import { getTimeRangeDates } from './chunk-6XBZPKMI.js';
4
4
  import { useElevasisServices } from './chunk-BI5VDO2K.js';
5
5
  import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
6
6
  import { useCallback, useState } from 'react';
7
7
 
8
+ // src/hooks/activities/queryKeys.ts
9
+ var activityKeys = {
10
+ all: ["activities"],
11
+ list: (organizationId, params) => [...activityKeys.all, "list", organizationId, params],
12
+ trend: (organizationId, params) => [...activityKeys.all, "trend", organizationId, params]
13
+ };
14
+
15
+ // src/hooks/monitoring/queryKeys.ts
16
+ var monitoringKeys = {
17
+ all: ["monitoring"],
18
+ executionHealth: (organizationId, timeRange) => [...monitoringKeys.all, "execution-health", organizationId, timeRange],
19
+ executionLogs: (organizationId, params) => [...monitoringKeys.all, "execution-logs", organizationId, params]
20
+ };
21
+ var costAnalyticsKeys = {
22
+ all: ["cost-analytics"],
23
+ summary: (organizationId, timeRange) => [...costAnalyticsKeys.all, "cost-summary", organizationId, timeRange]
24
+ };
8
25
  function useActivityTrend(params = {}) {
9
26
  const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
10
27
  return useQuery({
11
- queryKey: ["activities", "trend", workOSOrganizationId, params],
28
+ queryKey: activityKeys.trend(workOSOrganizationId, params),
12
29
  queryFn: async () => {
13
30
  const queryParams = new URLSearchParams();
14
31
  if (params.activityType) queryParams.set("activityType", params.activityType);
@@ -32,7 +49,7 @@ function useActivityTrend(params = {}) {
32
49
  function useActivities(params = {}) {
33
50
  const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
34
51
  return useQuery({
35
- queryKey: ["activities", "list", workOSOrganizationId, params],
52
+ queryKey: activityKeys.list(workOSOrganizationId, params),
36
53
  queryFn: async () => {
37
54
  const queryParams = new URLSearchParams();
38
55
  if (params.limit) queryParams.set("limit", params.limit.toString());
@@ -66,7 +83,7 @@ function useActivities(params = {}) {
66
83
  function useExecutionLogs(params = {}) {
67
84
  const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
68
85
  return useQuery({
69
- queryKey: ["monitoring", "execution-logs", workOSOrganizationId, params],
86
+ queryKey: monitoringKeys.executionLogs(workOSOrganizationId, params),
70
87
  queryFn: async () => {
71
88
  const queryParams = new URLSearchParams();
72
89
  if (params.resourceId) queryParams.set("resourceId", params.resourceId);
@@ -88,10 +105,17 @@ function useExecutionLogs(params = {}) {
88
105
  // Real-time data - always refetch on mount/org switch
89
106
  });
90
107
  }
108
+
109
+ // src/hooks/notifications/queryKeys.ts
110
+ var notificationKeys = {
111
+ all: ["notifications"],
112
+ list: (organizationId, page) => [...notificationKeys.all, organizationId, page],
113
+ unreadCount: (organizationId) => [...notificationKeys.all, "unread-count", organizationId]
114
+ };
91
115
  function useNotifications({ limit = 20, offset = 0 } = {}) {
92
116
  const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
93
117
  return useQuery({
94
- queryKey: ["notifications", workOSOrganizationId, { limit, offset }],
118
+ queryKey: notificationKeys.list(workOSOrganizationId, { limit, offset }),
95
119
  queryFn: async () => {
96
120
  const params = GetNotificationsQuerySchema.parse({ limit, offset });
97
121
  const response = await apiRequest(
@@ -105,7 +129,7 @@ function useNotifications({ limit = 20, offset = 0 } = {}) {
105
129
  function useCostSummary(timeRange) {
106
130
  const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
107
131
  return useQuery({
108
- queryKey: ["cost-analytics", "cost-summary", workOSOrganizationId, timeRange],
132
+ queryKey: costAnalyticsKeys.summary(workOSOrganizationId, timeRange),
109
133
  queryFn: async () => {
110
134
  const { startDate, endDate } = getTimeRangeDates(timeRange);
111
135
  return apiRequest(`/observability/cost-summary?startDate=${startDate}&endDate=${endDate}`);
@@ -118,7 +142,7 @@ function useCostSummary(timeRange) {
118
142
  function useExecutionHealth({ timeRange }) {
119
143
  const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
120
144
  return useQuery({
121
- queryKey: ["monitoring", "execution-health", workOSOrganizationId, timeRange],
145
+ queryKey: monitoringKeys.executionHealth(workOSOrganizationId, timeRange),
122
146
  queryFn: async () => {
123
147
  const { startDate, endDate } = getTimeRangeDates(timeRange);
124
148
  return apiRequest(`/observability/dashboard?startDate=${startDate}&endDate=${endDate}`);
@@ -134,7 +158,7 @@ function useNotificationCount(args) {
134
158
  const { notificationCount, notificationConnected, notificationError } = args;
135
159
  const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
136
160
  const query = useQuery({
137
- queryKey: ["notifications", "unread-count", workOSOrganizationId],
161
+ queryKey: notificationKeys.unreadCount(workOSOrganizationId),
138
162
  queryFn: async () => {
139
163
  const response = await apiRequest("/notifications/unread-count");
140
164
  return response.count;
@@ -167,7 +191,7 @@ function useMarkAsRead() {
167
191
  });
168
192
  },
169
193
  onSuccess: () => {
170
- queryClient.invalidateQueries({ queryKey: ["notifications"] });
194
+ queryClient.invalidateQueries({ queryKey: notificationKeys.all });
171
195
  },
172
196
  onError: (error) => {
173
197
  notify.apiError(error);
@@ -185,7 +209,7 @@ function useMarkAllAsRead() {
185
209
  });
186
210
  },
187
211
  onSuccess: () => {
188
- queryClient.invalidateQueries({ queryKey: ["notifications"] });
212
+ queryClient.invalidateQueries({ queryKey: notificationKeys.all });
189
213
  },
190
214
  onError: (error) => {
191
215
  notify.apiError(error);
@@ -243,7 +267,7 @@ function useTestNotification() {
243
267
  });
244
268
  },
245
269
  onSuccess: () => {
246
- queryClient.invalidateQueries({ queryKey: ["notifications"] });
270
+ queryClient.invalidateQueries({ queryKey: notificationKeys.all });
247
271
  },
248
272
  onError: (error) => {
249
273
  adapter.apiError(error);
@@ -302,4 +326,4 @@ function useExecutionLogsFilters(_timeRange) {
302
326
  return { filters, updateFilter, resetFilters };
303
327
  }
304
328
 
305
- export { useActivities, useActivityFilters, useActivityTrend, useBatchDelete, useCostSummary, useErrorNotification, useExecutionHealth, useExecutionLogs, useExecutionLogsFilters, useMarkAllAsRead, useMarkAsRead, useNotificationCount, useNotifications, useSuccessNotification, useTestNotification, useWarningNotification };
329
+ export { activityKeys, costAnalyticsKeys, monitoringKeys, notificationKeys, useActivities, useActivityFilters, useActivityTrend, useBatchDelete, useCostSummary, useErrorNotification, useExecutionHealth, useExecutionLogs, useExecutionLogsFilters, useMarkAllAsRead, useMarkAsRead, useNotificationCount, useNotifications, useSuccessNotification, useTestNotification, useWarningNotification };