@elevasis/ui 2.72.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.
Files changed (100) hide show
  1. package/dist/api/index.js +3 -3
  2. package/dist/app/index.d.ts +172 -20
  3. package/dist/app/index.js +9 -10
  4. package/dist/auth/index.js +5 -6
  5. package/dist/charts/index.js +5 -6
  6. package/dist/chunk-2GIJBHZT.js +60 -0
  7. package/dist/{chunk-2454MK7P.js → chunk-2MRRDF32.js} +115 -8
  8. package/dist/chunk-3LOKYZJC.js +231 -0
  9. package/dist/chunk-3QHX4ZKV.js +224 -0
  10. package/dist/chunk-43LC6XAX.js +69 -0
  11. package/dist/chunk-4M2BSHVT.js +116 -0
  12. package/dist/{chunk-SV4M2BUI.js → chunk-4MXNHJTA.js} +111 -46
  13. package/dist/{chunk-LEQGGX2U.js → chunk-5A6KCFS5.js} +36 -43
  14. package/dist/{chunk-KIDZXZM5.js → chunk-6JN2TLV2.js} +1480 -4200
  15. package/dist/{chunk-UZ5JO5TK.js → chunk-7ARBBELS.js} +1 -1
  16. package/dist/{chunk-DJWIIPKW.js → chunk-7RJ7P6S6.js} +6 -3
  17. package/dist/chunk-ARAFQBNI.js +515 -0
  18. package/dist/{chunk-DKVGO6RJ.js → chunk-BA3AZJUR.js} +1 -1
  19. package/dist/chunk-BRTGCFBH.js +305 -0
  20. package/dist/{chunk-7ESZKTQG.js → chunk-CQPULKKL.js} +5 -3
  21. package/dist/chunk-CRA7WQZH.js +49 -0
  22. package/dist/{chunk-XZIOCB5D.js → chunk-DCQKTDIG.js} +2 -52
  23. package/dist/{chunk-A3JHFZDP.js → chunk-E6YGA5WH.js} +1 -1
  24. package/dist/chunk-FA7LMNQO.js +439 -0
  25. package/dist/chunk-FZSG6M6W.js +45 -0
  26. package/dist/chunk-GDOR57D7.js +165 -0
  27. package/dist/{chunk-RRS2QR3W.js → chunk-GO4XJ5D4.js} +1 -1
  28. package/dist/chunk-GPQQGQGT.js +645 -0
  29. package/dist/chunk-HYQOGRWG.js +54 -0
  30. package/dist/{chunk-LCHL5SM2.js → chunk-LN4UW6S4.js} +1 -1
  31. package/dist/chunk-N6K2Q5BM.js +393 -0
  32. package/dist/{chunk-Z2W5VNN3.js → chunk-O32UQ26A.js} +3 -2
  33. package/dist/{chunk-M7WWRZ5Z.js → chunk-QFGNRKIE.js} +1 -78
  34. package/dist/{chunk-Q3O3WY7Q.js → chunk-R5UGIFYU.js} +74 -18
  35. package/dist/{chunk-753MKWFV.js → chunk-RFNJ2PTO.js} +1 -1
  36. package/dist/chunk-VM2OWOXL.js +24 -0
  37. package/dist/{chunk-ZBXCEWKF.js → chunk-W2QRBQQA.js} +5 -3
  38. package/dist/chunk-WDBNW44Z.js +49 -0
  39. package/dist/{chunk-IXBRUIYI.js → chunk-WZU3MCKI.js} +1 -1
  40. package/dist/chunk-YQQ5GRUR.js +21 -0
  41. package/dist/{chunk-IMZTRDY2.js → chunk-ZFA56VSR.js} +2 -2
  42. package/dist/{chunk-AFBFSXP3.js → chunk-ZWI62BQ6.js} +7 -4
  43. package/dist/chunk-ZYNVCWDZ.js +286 -0
  44. package/dist/components/index.d.ts +490 -22
  45. package/dist/components/index.js +335 -35
  46. package/dist/components/navigation/index.js +6 -7
  47. package/dist/features/auth/index.d.ts +154 -2
  48. package/dist/features/auth/index.js +18 -9
  49. package/dist/features/clients/index.js +7 -7
  50. package/dist/features/content/index.d.ts +718 -34
  51. package/dist/features/content/index.js +1345 -51
  52. package/dist/features/crm/index.d.ts +172 -20
  53. package/dist/features/crm/index.js +10 -8
  54. package/dist/features/dashboard/index.d.ts +19 -10
  55. package/dist/features/dashboard/index.js +9 -8
  56. package/dist/features/delivery/index.d.ts +134 -0
  57. package/dist/features/delivery/index.js +23 -7
  58. package/dist/features/knowledge/index.js +5 -6
  59. package/dist/features/lead-gen/index.d.ts +47 -35
  60. package/dist/features/lead-gen/index.js +12 -8
  61. package/dist/features/monitoring/index.js +11 -9
  62. package/dist/features/monitoring/requests/index.js +8 -7
  63. package/dist/features/operations/index.d.ts +38 -20
  64. package/dist/features/operations/index.js +15 -11
  65. package/dist/features/public-agent-chat/index.js +3 -1
  66. package/dist/features/settings/index.d.ts +134 -0
  67. package/dist/features/settings/index.js +9 -8
  68. package/dist/hooks/access/index.js +5 -6
  69. package/dist/hooks/delivery/index.d.ts +134 -0
  70. package/dist/hooks/delivery/index.js +3 -2
  71. package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +20 -11
  72. package/dist/hooks/published.d.ts +1421 -29
  73. package/dist/hooks/published.js +22 -6
  74. package/dist/initialization/index.d.ts +134 -0
  75. package/dist/knowledge/index.d.ts +38 -20
  76. package/dist/knowledge/index.js +167 -11
  77. package/dist/{knowledge-search-index-RZLIVWPJ.js → knowledge-search-index-6GQK55IQ.js} +1 -1
  78. package/dist/layout/index.js +8 -9
  79. package/dist/profile/index.d.ts +134 -0
  80. package/dist/provider/index.d.ts +191 -21
  81. package/dist/provider/index.js +5 -6
  82. package/dist/provider/published.d.ts +219 -21
  83. package/dist/provider/published.js +5 -6
  84. package/dist/test-utils/index.d.ts +16 -5
  85. package/dist/test-utils/index.js +17 -18
  86. package/dist/types/index.d.ts +184 -14
  87. package/dist/utils/index.d.ts +102 -13
  88. package/dist/utils/index.js +1 -1
  89. package/package.json +7 -6
  90. package/dist/chunk-6M6OLGQY.js +0 -36
  91. package/dist/chunk-MKH2KOAO.js +0 -39
  92. package/dist/hooks/index.css +0 -659
  93. package/dist/hooks/index.d.ts +0 -12853
  94. package/dist/hooks/index.js +0 -27
  95. package/dist/supabase/index.d.ts +0 -6969
  96. package/dist/supabase/index.js +0 -3
  97. package/dist/typeform/index.d.ts +0 -462
  98. package/dist/typeform/index.js +0 -2051
  99. package/dist/typeform/schemas.d.ts +0 -67
  100. package/dist/typeform/schemas.js +0 -2
@@ -1,46 +1,63 @@
1
- export { AppErrorBoundary, CrashErrorFallback, ErrorReportCard, buildErrorReport } from '../chunk-LCHL5SM2.js';
2
- import { useBreadcrumbs } from '../chunk-UZ5JO5TK.js';
1
+ export { AppErrorBoundary, CrashErrorFallback, ErrorReportCard, buildErrorReport } from '../chunk-LN4UW6S4.js';
2
+ import { useBreadcrumbs } from '../chunk-7ARBBELS.js';
3
3
  import '../chunk-AH52XQB7.js';
4
- import { showAuthError } from '../chunk-SV4M2BUI.js';
5
- export { CreateCredentialModal, CredentialList, CredentialSettings, MembershipStatusBadge, OAuthConnectModal, OrganizationMembershipsList, ProvisioningStateBadge, WebhookUrlDisplayModal, showAuthError } from '../chunk-SV4M2BUI.js';
4
+ import { showAuthError } from '../chunk-4MXNHJTA.js';
5
+ export { CreateCredentialModal, CredentialList, CredentialSettings, MembershipStatusBadge, OAuthConnectModal, OrganizationMembershipsList, ProvisioningStateBadge, WebhookUrlDisplayModal, showAuthError } from '../chunk-4MXNHJTA.js';
6
6
  import '../chunk-ZFISGKYW.js';
7
- import '../chunk-RRS2QR3W.js';
8
- import { setDealReferrer, compareDealsByPriority } from '../chunk-AFBFSXP3.js';
9
- export { ActivityFeedWidget, CompanyDetailPage, ContactDetailPage, CrmOverview, CrmSidebar, CrmSidebarTop, DealDetailPage, DealsListPage, MetricsStrip, PIPELINE_FUNNEL_ORDER, PipelineFunnelWidget, useCrmPipelineSummary, useCrmQuickMetrics, useRecentCrmActivity } from '../chunk-AFBFSXP3.js';
10
- export { AllTasksPage, HealthStatusCard, MilestoneTimeline, ProjectDetailPage, ProjectsListPage, ProjectsSidebar, ProjectsSidebarMiddle, ProjectsSidebarTop, TaskCard, UpcomingMilestonesPage } from '../chunk-DJWIIPKW.js';
11
- export { LEAD_GEN_ROUTE_LINKS, LeadGenCompaniesPage, LeadGenContactsPage, LeadGenListDetailPage, LeadGenListsPage, LeadGenOverviewPage, LeadGenRouteShell, LeadGenSidebar, LeadGenSidebarTop, StepConfigForm, TabSection, getEnrichmentColor, getStatusColor, useDeleteLists } from '../chunk-LEQGGX2U.js';
12
- import '../chunk-IMZTRDY2.js';
13
- export { ActionModal, AgentDefinitionDisplay, AgentExecutionLogs, BaseExecutionLogs, BaseExecutionLogsHeader, BaseExecutionLogsStates, CommandQueueTaskRow, ConfigCard, ContentSections, ContextUsageBadge, ContractDisplay, ExecutionErrorSection, LogEntry, LogGroup, ResourceDefinitionSection, ResourceErrorState, ResourceFilter, ResourceHeader, ResourceNotFoundState, SessionMemory, ToolsListDisplay, WorkflowDefinitionDisplay, WorkflowExecutionLogs, getExecutionStatusConfig, getIcon, getLogLevelConfig, iconMap } from '../chunk-2454MK7P.js';
7
+ import '../chunk-GO4XJ5D4.js';
8
+ import { setDealReferrer, compareDealsByPriority } from '../chunk-ZWI62BQ6.js';
9
+ export { ActivityFeedWidget, CompanyDetailPage, ContactDetailPage, CrmOverview, CrmSidebar, CrmSidebarTop, DealDetailPage, DealsListPage, MetricsStrip, PIPELINE_FUNNEL_ORDER, PipelineFunnelWidget, useCrmPipelineSummary, useCrmQuickMetrics, useRecentCrmActivity } from '../chunk-ZWI62BQ6.js';
10
+ export { AllTasksPage, HealthStatusCard, MilestoneTimeline, ProjectDetailPage, ProjectsListPage, ProjectsSidebar, ProjectsSidebarMiddle, ProjectsSidebarTop, TaskCard, UpcomingMilestonesPage } from '../chunk-7RJ7P6S6.js';
11
+ import { useCreateOrgRole, useUpdateApiKey, useDeleteApiKey, useCreateApiKey, useListApiKeys, useActivateDeployment, useDeactivateDeployment, useDeleteDeployment, useListDeployments, useTransitionItem } from '../chunk-GPQQGQGT.js';
12
+ import '../chunk-DCQKTDIG.js';
13
+ import { usePermissionCatalog } from '../chunk-ARAFQBNI.js';
14
+ import '../chunk-FZSG6M6W.js';
15
+ export { LEAD_GEN_ROUTE_LINKS, LeadGenCompaniesPage, LeadGenContactsPage, LeadGenListDetailPage, LeadGenListsPage, LeadGenOverviewPage, LeadGenRouteShell, LeadGenSidebar, LeadGenSidebarTop, StepConfigForm, TabSection, getEnrichmentColor, getStatusColor, useDeleteLists } from '../chunk-5A6KCFS5.js';
16
+ import '../chunk-ZFA56VSR.js';
17
+ import '../chunk-GDOR57D7.js';
18
+ import '../chunk-3LOKYZJC.js';
19
+ import '../chunk-ZYNVCWDZ.js';
20
+ export { ActionModal, AgentDefinitionDisplay, AgentExecutionLogs, BaseExecutionLogs, BaseExecutionLogsHeader, BaseExecutionLogsStates, CommandQueueTaskRow, ConfigCard, ContentSections, ContextUsageBadge, ContractDisplay, ExecutionErrorSection, LogEntry, LogGroup, ResourceDefinitionSection, ResourceErrorState, ResourceFilter, ResourceHeader, ResourceNotFoundState, SessionMemory, ToolsListDisplay, WorkflowDefinitionDisplay, WorkflowExecutionLogs, getExecutionStatusConfig, getIcon, getLogLevelConfig, iconMap } from '../chunk-2MRRDF32.js';
14
21
  import '../chunk-6ZAP3FOA.js';
15
- import '../chunk-DKVGO6RJ.js';
16
- export { AgentExecutionTimeline, AgentExecutionVisualizer, AgentIterationDetailPanel, AgentIterationEdge, AgentIterationNode, BaseEdge, BaseNode, CollapsibleJsonSection, EmptyVisualizer, ExecutionStats, ExecutionStatusBadge, GraphBackground, GraphContainer, GraphFitViewButton, GraphFitViewHandler, GraphLegend, RunResourceButton, TimelineAxis, TimelineBar, TimelineContainer, TimelineRow, UnifiedWorkflowEdge, UnifiedWorkflowGraph, UnifiedWorkflowNode, VisualizerContainer, WorkflowExecutionTimeline, getGraphBackgroundStyles, useGraphBackgroundStyles, useGraphTheme } from '../chunk-ZBXCEWKF.js';
22
+ import '../chunk-BA3AZJUR.js';
23
+ export { AgentExecutionTimeline, AgentExecutionVisualizer, AgentIterationDetailPanel, AgentIterationEdge, AgentIterationNode, BaseEdge, BaseNode, CollapsibleJsonSection, EmptyVisualizer, ExecutionStats, ExecutionStatusBadge, GraphBackground, GraphContainer, GraphFitViewButton, GraphFitViewHandler, GraphLegend, RunResourceButton, TimelineAxis, TimelineBar, TimelineContainer, TimelineRow, UnifiedWorkflowEdge, UnifiedWorkflowGraph, UnifiedWorkflowNode, VisualizerContainer, WorkflowExecutionTimeline, getGraphBackgroundStyles, useGraphBackgroundStyles, useGraphTheme } from '../chunk-W2QRBQQA.js';
24
+ import '../chunk-FA7LMNQO.js';
25
+ import { useCreateSchedule, useListSchedules, usePauseSchedule, useResumeSchedule, useCancelSchedule, useDeleteSchedule } from '../chunk-N6K2Q5BM.js';
26
+ import '../chunk-CRA7WQZH.js';
17
27
  export { ZodFormRenderer } from '../chunk-3MEXPLWT.js';
18
28
  import '../chunk-SNZDFCOQ.js';
19
- import { NotificationList } from '../chunk-7ESZKTQG.js';
20
- export { ActivityCard, ActivityFilters as ActivityFiltersBar, ActivityTable, BusinessImpactCard, CostBreakdownCard, CostByModelTable, CostMetricsCard, ErrorAnalysisCard, ErrorBreakdownTable, ExecutionBreakdownTable, ExecutionHealthCard, ExecutionLogsFilters as ExecutionLogsFilterBar, ExecutionLogsTable, NotificationItem, NotificationList } from '../chunk-7ESZKTQG.js';
21
- export { ResourceHealthPanel } from '../chunk-IXBRUIYI.js';
29
+ import '../chunk-QFGNRKIE.js';
30
+ import { NotificationList } from '../chunk-CQPULKKL.js';
31
+ export { ActivityCard, ActivityFilters as ActivityFiltersBar, ActivityTable, BusinessImpactCard, CostBreakdownCard, CostByModelTable, CostMetricsCard, ErrorAnalysisCard, ErrorBreakdownTable, ExecutionBreakdownTable, ExecutionHealthCard, ExecutionLogsFilters as ExecutionLogsFilterBar, ExecutionLogsTable, NotificationItem, NotificationList } from '../chunk-CQPULKKL.js';
32
+ import { useMarkAllAsRead, useNotifications } from '../chunk-BRTGCFBH.js';
33
+ export { ResourceHealthPanel } from '../chunk-WZU3MCKI.js';
22
34
  export { ResourceHealthChart, getHealthColor } from '../chunk-LGKLC5MG.js';
35
+ import '../chunk-YQQ5GRUR.js';
36
+ import '../chunk-VM2OWOXL.js';
37
+ import '../chunk-43LC6XAX.js';
38
+ import '../chunk-WDBNW44Z.js';
23
39
  export { Graph_module_css_default as graphStyles } from '../chunk-HENXLGVD.js';
24
- import { AppShellLoader } from '../chunk-A3JHFZDP.js';
40
+ import { AppShellLoader } from '../chunk-E6YGA5WH.js';
25
41
  export { calculateProgress, formatStatusLabel, milestoneStatusColors, noteTypeColors, projectStatusColors, taskStatusColors, taskTypeColors } from '../chunk-DLR4SDZW.js';
42
+ import '../chunk-4M2BSHVT.js';
43
+ import { useCloudStorageFolder, useCloudStorageThumbnails } from '../chunk-3QHX4ZKV.js';
26
44
  import '../chunk-BZZCNLT6.js';
27
45
  export { SortableHeader, TableSelectionToolbar } from '../chunk-TUMSNGTX.js';
28
46
  import { FilterBar } from '../chunk-PDHTXPSF.js';
29
47
  export { FilterBar } from '../chunk-PDHTXPSF.js';
30
- import { useCreateOrgRole, usePermissionCatalog, CustomModal, useMarkAllAsRead, useNotifications, useUpdateApiKey, useDeleteApiKey, ListSkeleton, EmptyState, useCreateApiKey, useListApiKeys, PageTitleCaption, StatCard, usePaginationState, useActivateDeployment, useDeactivateDeployment, useDeleteDeployment, useListDeployments, useResources, useCreateSchedule, useListSchedules, usePauseSchedule, useResumeSchedule, useCancelSchedule, useDeleteSchedule, CenteredErrorState, useDeals, useTransitionItem, dealKeys, SubshellContentContainer } from '../chunk-KIDZXZM5.js';
31
- export { APIErrorAlert, ActivityTimeline, CenteredErrorState, CheckpointGroup, CollapsibleSection, CommandQueueSidebar, CommandQueueSidebarMiddle, CommandQueueSidebarTop, ConfirmationInputModal, ConfirmationModal, ContextViewer, CrmSidebarMiddle, CustomModal, CustomSelector, DetailCardSkeleton, ElevasisLoader, EmptyState, FeatureUnavailableState, GlowDot, JsonViewer, LeadGenSidebarMiddle, ListSkeleton, MyTasksPanel, NavigationButton, OperationsSidebar, OperationsSidebarMiddle, OperationsSidebarTop, OrganizationModelDriftActionIcon, PageNotFound, PageTitleCaption, QuickCreateActions, ResourceCard, SAVED_VIEW_PRESETS, SavedViewsPanel, StatCard, StatCardSkeleton, StatsCardSkeleton, StatusBadge, TabCountBadge, TimeRangeSelector, TrendIndicator, crmManifest, deliveryManifest, leadGenManifest, monitoringManifest, operationsManifest, settingsManifest } from '../chunk-KIDZXZM5.js';
48
+ import { CustomModal, ListSkeleton, EmptyState, PageTitleCaption, StatCard, usePaginationState, useResources, CenteredErrorState, useDeals, dealKeys, SubshellContentContainer } from '../chunk-6JN2TLV2.js';
49
+ export { APIErrorAlert, ActivityTimeline, CenteredErrorState, CheckpointGroup, CollapsibleSection, CommandQueueSidebar, CommandQueueSidebarMiddle, CommandQueueSidebarTop, ConfirmationInputModal, ConfirmationModal, ContextViewer, CrmSidebarMiddle, CustomModal, CustomSelector, DetailCardSkeleton, ElevasisLoader, EmptyState, FeatureUnavailableState, GlowDot, JsonViewer, LeadGenSidebarMiddle, ListSkeleton, MyTasksPanel, NavigationButton, NoAccessState, OperationsSidebar, OperationsSidebarMiddle, OperationsSidebarTop, OrganizationModelDriftActionIcon, PageNotFound, PageTitleCaption, QuickCreateActions, ResourceCard, SAVED_VIEW_PRESETS, SavedViewsPanel, StatCard, StatCardSkeleton, StatsCardSkeleton, StatusBadge, SystemReadinessAlert, SystemUnavailableState, TabCountBadge, TimeRangeSelector, TrendIndicator, crmManifest, deliveryManifest, leadGenManifest, monitoringManifest, operationsManifest, settingsManifest } from '../chunk-6JN2TLV2.js';
32
50
  import '../chunk-R6NMRXNO.js';
33
51
  import '../chunk-RBGVNPA6.js';
34
- import '../chunk-MKH2KOAO.js';
35
- import '../chunk-Z2W5VNN3.js';
52
+ import '../chunk-O32UQ26A.js';
36
53
  import '../chunk-L7BZZ4SI.js';
37
- import { showSuccessNotification, showErrorNotification, showApiErrorNotification } from '../chunk-XZIOCB5D.js';
38
- export { showApiErrorNotification, showErrorNotification, showInfoNotification, showSuccessNotification, showWarningNotification } from '../chunk-XZIOCB5D.js';
54
+ import { showSuccessNotification, showErrorNotification, showApiErrorNotification } from '../chunk-HYQOGRWG.js';
55
+ export { showApiErrorNotification, showErrorNotification, showInfoNotification, showSuccessNotification, showWarningNotification } from '../chunk-HYQOGRWG.js';
39
56
  export { SEOSidebar, SEOSidebarMiddle, SEOSidebarTop, seoManifest } from '../chunk-MISHPEJX.js';
40
57
  import { CardHeader } from '../chunk-62GVNH5U.js';
41
58
  export { CardHeader } from '../chunk-62GVNH5U.js';
42
59
  import { useInitialization } from '../chunk-P45GQ3ZW.js';
43
- import '../chunk-M7WWRZ5Z.js';
60
+ import '../chunk-2GIJBHZT.js';
44
61
  export { StyledMarkdown } from '../chunk-3KMDHCAR.js';
45
62
  import '../chunk-2IFYDILW.js';
46
63
  export { CONTAINER_CONSTANTS, SHARED_VIZ_CONSTANTS } from '../chunk-BLXJEIQS.js';
@@ -48,7 +65,7 @@ export { RoleBadge } from '../chunk-UD657ICS.js';
48
65
  import '../chunk-DD3CCMCZ.js';
49
66
  import '../chunk-RNP5R5I3.js';
50
67
  import '../chunk-RT4KRGZT.js';
51
- import { formatDateTime, PAGE_SIZE_DEFAULT, formatTimeAgo } from '../chunk-Q3O3WY7Q.js';
68
+ import { formatDateTime, PAGE_SIZE_DEFAULT, formatTimeAgo } from '../chunk-R5UGIFYU.js';
52
69
  import '../chunk-Y6I3IC45.js';
53
70
  import '../chunk-6SSQGWK7.js';
54
71
  import { useElevasisServices } from '../chunk-BI5VDO2K.js';
@@ -57,8 +74,8 @@ import '../chunk-TVTSASST.js';
57
74
  import '../chunk-BRJ3QZ4E.js';
58
75
  import { useRouterContext } from '../chunk-Q7DJKLEN.js';
59
76
  import '../chunk-I2KLQ2HA.js';
60
- import { Stack, Card, Title, Checkbox, Group, Text, Tooltip, Center, TextInput, Textarea, Loader, Alert, Button, Box, Divider, ScrollArea, Popover, Indicator, ActionIcon, Table, Paper, Code, CopyButton, SimpleGrid, Badge, Pagination, SegmentedControl, Switch, Select, Menu, Timeline, ThemeIcon, Tabs, Breadcrumbs as Breadcrumbs$1 } from '@mantine/core';
61
- import { IconLock, IconBell, IconPencil, IconAlertCircle, IconKey, IconCalendar, IconClock, IconTrash, IconAlertTriangle, IconExclamationMark, IconShieldLock, IconCheck, IconCopy, IconPlus, IconRocket, IconRefresh, IconPower, IconPlayerPlay, IconCircleCheck, IconTag, IconCalendarRepeat, IconCalendarEvent, IconCalendarTime, IconRobot, IconGitBranch, IconSettings, IconExternalLink, IconDotsVertical, IconPlayerPause, IconPlayerStop, IconCalendarDue, IconCalendarStats, IconCalendarOff, IconListCheck } from '@tabler/icons-react';
77
+ import { Stack, Card, Title, Checkbox, Group, Text, Tooltip, TextInput, Textarea, Loader, Alert, Button, Box, Divider, ScrollArea, Popover, Indicator, ActionIcon, Table, Paper, Code, CopyButton, SimpleGrid, Badge, Pagination, SegmentedControl, Switch, Select, Menu, Timeline, ThemeIcon, Tabs, Breadcrumbs as Breadcrumbs$1, Center, UnstyledButton, Image, Flex } from '@mantine/core';
78
+ import { IconLock, IconBell, IconPencil, IconAlertCircle, IconKey, IconCalendar, IconClock, IconTrash, IconAlertTriangle, IconExclamationMark, IconShieldLock, IconCheck, IconCopy, IconPlus, IconRocket, IconRefresh, IconPower, IconPlayerPlay, IconCircleCheck, IconTag, IconCalendarRepeat, IconCalendarEvent, IconCalendarTime, IconRobot, IconGitBranch, IconSettings, IconExternalLink, IconDotsVertical, IconPlayerPause, IconPlayerStop, IconCalendarDue, IconCalendarStats, IconCalendarOff, IconListCheck, IconFolder, IconPhoto, IconCloudOff } from '@tabler/icons-react';
62
79
  import * as runtime from 'react/jsx-runtime';
63
80
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
64
81
  import { useForm } from '@mantine/form';
@@ -136,13 +153,6 @@ function PermissionMatrix({ catalog, selectedKeys, onChange, systemLocked }) {
136
153
  }) })
137
154
  ] }, domain)) });
138
155
  }
139
- function NoAccessState() {
140
- return /* @__PURE__ */ jsx(Center, { style: { flex: 1, minHeight: "100%", width: "100%", padding: 24 }, children: /* @__PURE__ */ jsxs(Stack, { align: "center", gap: "xs", style: { maxWidth: 480, textAlign: "center" }, children: [
141
- /* @__PURE__ */ jsx(IconLock, { size: 44, stroke: 1.8, color: "var(--color-text-subtle)" }),
142
- /* @__PURE__ */ jsx(Title, { order: 3, children: "Access restricted" }),
143
- /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: "You don't have permission to view this page. Contact an org admin if you need access." })
144
- ] }) });
145
- }
146
156
  var CreateRoleFormSchema = z.object({
147
157
  name: z.string().trim().min(2).max(50),
148
158
  slug: z.string().regex(/^[a-z0-9-]+$/, "lowercase, numbers, dashes only").min(2).max(50),
@@ -2784,5 +2794,295 @@ var DEFAULT_KANBAN_CONFIG = {
2784
2794
  closed_lost: { color: "red" },
2785
2795
  nurturing: { color: "grape" }
2786
2796
  };
2797
+ function CloudStorageFolderTree({ nodes, selectedPath, onNavigate }) {
2798
+ const childrenByParent = /* @__PURE__ */ new Map();
2799
+ const roots = [];
2800
+ for (const node of nodes) {
2801
+ const parentIds = node.parentIds ?? [];
2802
+ if (parentIds.length === 0) {
2803
+ roots.push(node);
2804
+ continue;
2805
+ }
2806
+ for (const parentId of parentIds) {
2807
+ const siblings = childrenByParent.get(parentId) ?? [];
2808
+ siblings.push(node);
2809
+ childrenByParent.set(parentId, siblings);
2810
+ }
2811
+ }
2812
+ return /* @__PURE__ */ jsx(Stack, { gap: 0, "data-testid": "cloud-storage-folder-tree", children: roots.map((root) => /* @__PURE__ */ jsx(
2813
+ FolderBranch,
2814
+ {
2815
+ branchKey: root.id,
2816
+ node: root,
2817
+ depth: 0,
2818
+ childrenByParent,
2819
+ selectedPath,
2820
+ onNavigate,
2821
+ ancestry: /* @__PURE__ */ new Set()
2822
+ },
2823
+ root.id
2824
+ )) });
2825
+ }
2826
+ function FolderBranch({
2827
+ branchKey,
2828
+ node,
2829
+ depth,
2830
+ childrenByParent,
2831
+ selectedPath,
2832
+ onNavigate,
2833
+ ancestry
2834
+ }) {
2835
+ if (ancestry.has(node.id)) return null;
2836
+ const children = childrenByParent.get(node.id) ?? [];
2837
+ const isSelected = selectedPath !== void 0 && node.path === selectedPath;
2838
+ const nextAncestry = new Set(ancestry);
2839
+ nextAncestry.add(node.id);
2840
+ return /* @__PURE__ */ jsxs(Stack, { gap: 0, children: [
2841
+ /* @__PURE__ */ jsx(
2842
+ UnstyledButton,
2843
+ {
2844
+ onClick: () => onNavigate(node),
2845
+ "data-testid": `folder-node-${branchKey}`,
2846
+ "data-selected": isSelected ? "true" : void 0,
2847
+ pl: depth * 16 + 8,
2848
+ py: 4,
2849
+ style: {
2850
+ background: isSelected ? "var(--color-surface-hover)" : void 0,
2851
+ transition: "background var(--duration-fast) var(--easing)"
2852
+ },
2853
+ children: /* @__PURE__ */ jsxs(Group, { gap: 6, wrap: "nowrap", children: [
2854
+ /* @__PURE__ */ jsx(IconFolder, { size: 16, color: "var(--color-primary)", style: { flexShrink: 0 } }),
2855
+ /* @__PURE__ */ jsx(Text, { size: "sm", truncate: true, children: node.name })
2856
+ ] })
2857
+ }
2858
+ ),
2859
+ children.map((child) => /* @__PURE__ */ jsx(
2860
+ FolderBranch,
2861
+ {
2862
+ branchKey: `${branchKey}>${child.id}`,
2863
+ node: child,
2864
+ depth: depth + 1,
2865
+ childrenByParent,
2866
+ selectedPath,
2867
+ onNavigate,
2868
+ ancestry: nextAncestry
2869
+ },
2870
+ `${branchKey}>${child.id}`
2871
+ ))
2872
+ ] });
2873
+ }
2874
+ function CloudStorageFileCard({ file, selected, used, dimensionWarning, onSelect }) {
2875
+ const selectable = onSelect !== void 0;
2876
+ const handleActivate = () => {
2877
+ onSelect?.(file);
2878
+ };
2879
+ return /* @__PURE__ */ jsxs(
2880
+ Card,
2881
+ {
2882
+ withBorder: true,
2883
+ padding: "xs",
2884
+ "data-file-id": file.id,
2885
+ "data-selected": selected ? "true" : void 0,
2886
+ onClick: selectable ? handleActivate : void 0,
2887
+ style: {
2888
+ cursor: selectable ? "pointer" : void 0,
2889
+ borderColor: selected ? "var(--color-primary)" : void 0,
2890
+ transition: "border-color var(--duration-fast) var(--easing)"
2891
+ },
2892
+ children: [
2893
+ /* @__PURE__ */ jsx(Card.Section, { children: /* @__PURE__ */ jsxs(Box, { pos: "relative", style: { aspectRatio: "1 / 1", overflow: "hidden", background: "var(--color-surface)" }, children: [
2894
+ file.thumbnailUrl ? /* @__PURE__ */ jsx(Image, { src: file.thumbnailUrl, alt: file.name, fit: "cover", h: "100%", w: "100%" }) : /* @__PURE__ */ jsxs(Stack, { align: "center", justify: "center", gap: 4, h: "100%", "data-testid": "thumbnail-fallback", children: [
2895
+ /* @__PURE__ */ jsx(IconPhoto, { size: 28, color: "var(--color-text-subtle)" }),
2896
+ /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "No preview" })
2897
+ ] }),
2898
+ selectable && /* @__PURE__ */ jsx(
2899
+ Checkbox,
2900
+ {
2901
+ checked: Boolean(selected),
2902
+ onChange: handleActivate,
2903
+ onClick: (event) => event.stopPropagation(),
2904
+ pos: "absolute",
2905
+ top: 6,
2906
+ left: 6,
2907
+ "aria-label": selected ? `Deselect ${file.name}` : `Select ${file.name}`
2908
+ }
2909
+ ),
2910
+ /* @__PURE__ */ jsxs(Group, { pos: "absolute", top: 6, right: 6, gap: 4, children: [
2911
+ dimensionWarning && /* @__PURE__ */ jsx(Tooltip, { label: dimensionWarning, withArrow: true, children: /* @__PURE__ */ jsx(
2912
+ Box,
2913
+ {
2914
+ role: "img",
2915
+ "aria-label": dimensionWarning,
2916
+ style: {
2917
+ display: "flex",
2918
+ alignItems: "center",
2919
+ justifyContent: "center",
2920
+ width: 20,
2921
+ height: 20,
2922
+ borderRadius: "50%",
2923
+ background: "var(--color-warning)"
2924
+ },
2925
+ children: /* @__PURE__ */ jsx(IconAlertTriangle, { size: 12, color: "var(--color-background)" })
2926
+ }
2927
+ ) }),
2928
+ /* @__PURE__ */ jsx(Badge, { color: used ? "var(--color-success)" : "var(--color-text-dimmed)", variant: "filled", size: "sm", children: used ? "Used" : "Unused" })
2929
+ ] })
2930
+ ] }) }),
2931
+ /* @__PURE__ */ jsx(Text, { size: "sm", mt: "xs", truncate: true, title: file.name, children: file.name })
2932
+ ]
2933
+ }
2934
+ );
2935
+ }
2936
+ function CloudStorageFileGrid({
2937
+ items,
2938
+ selectedIds,
2939
+ multiple = false,
2940
+ onSelectionChange,
2941
+ emptyState
2942
+ }) {
2943
+ if (items.length === 0) {
2944
+ return emptyState ?? /* @__PURE__ */ jsx(Stack, { align: "center", py: "xl", children: /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: "No files to display" }) });
2945
+ }
2946
+ const handleSelect = (file) => {
2947
+ const isSelected = selectedIds.includes(file.id);
2948
+ if (!multiple) {
2949
+ onSelectionChange(isSelected ? [] : [file.id]);
2950
+ return;
2951
+ }
2952
+ onSelectionChange(isSelected ? selectedIds.filter((id) => id !== file.id) : [...selectedIds, file.id]);
2953
+ };
2954
+ return /* @__PURE__ */ jsx(SimpleGrid, { cols: { base: 2, sm: 3, md: 4, lg: 5 }, spacing: "sm", children: items.map((item) => /* @__PURE__ */ jsx(
2955
+ CloudStorageFileCard,
2956
+ {
2957
+ file: item,
2958
+ selected: selectedIds.includes(item.id),
2959
+ used: item.used,
2960
+ dimensionWarning: item.dimensionWarning,
2961
+ onSelect: handleSelect
2962
+ },
2963
+ item.id
2964
+ )) });
2965
+ }
2966
+ var FOLDER_PANE_WIDTH = 220;
2967
+ function CloudStorageBrowser({
2968
+ credentialName,
2969
+ selected,
2970
+ onSelectionChange,
2971
+ multiple = false,
2972
+ decorateItem,
2973
+ notConnected
2974
+ }) {
2975
+ const [currentPath, setCurrentPath] = useState("");
2976
+ const [cursor, setCursor] = useState(void 0);
2977
+ const [pagedFiles, setPagedFiles] = useState([]);
2978
+ const [folderNodes, setFolderNodes] = useState({});
2979
+ const folderQuery = useCloudStorageFolder({ credentialName, folderPath: currentPath, cursor });
2980
+ useEffect(() => {
2981
+ setPagedFiles([]);
2982
+ setCursor(void 0);
2983
+ }, [currentPath]);
2984
+ useEffect(() => {
2985
+ const data = folderQuery.data;
2986
+ if (!data) return;
2987
+ setPagedFiles((previous) => {
2988
+ const seen = new Set(previous.map((file) => file.id));
2989
+ const fresh = data.files.filter((file) => file.kind === "file" && !seen.has(file.id));
2990
+ return fresh.length === 0 ? previous : [...previous, ...fresh];
2991
+ });
2992
+ setFolderNodes((previous) => {
2993
+ const discovered = data.files.filter((file) => file.kind === "folder" && !previous[file.id]);
2994
+ if (discovered.length === 0) return previous;
2995
+ const parent = Object.values(previous).find((node) => node.path === currentPath);
2996
+ const next = { ...previous };
2997
+ for (const file of discovered) {
2998
+ next[file.id] = {
2999
+ id: file.id,
3000
+ name: file.name,
3001
+ path: file.path,
3002
+ // No parent marks a root, which is correct for the first level browsed.
3003
+ parentIds: parent ? [parent.id] : void 0
3004
+ };
3005
+ }
3006
+ return next;
3007
+ });
3008
+ }, [folderQuery.data, currentPath]);
3009
+ const fileIds = useMemo(() => pagedFiles.map((file) => file.id), [pagedFiles]);
3010
+ const { thumbnails } = useCloudStorageThumbnails(credentialName, fileIds);
3011
+ const gridItems = useMemo(
3012
+ () => pagedFiles.map((file) => ({
3013
+ ...file,
3014
+ // `null` here means the provider produced no thumbnail -- HEIC, or an
3015
+ // original over 20MB. A normal state the card renders a fallback for,
3016
+ // never an error, so it collapses to `undefined` rather than throwing.
3017
+ thumbnailUrl: thumbnails[file.id] ?? void 0,
3018
+ ...decorateItem?.(file)
3019
+ })),
3020
+ [pagedFiles, thumbnails, decorateItem]
3021
+ );
3022
+ const selectedIds = useMemo(() => selected.map((file) => file.id), [selected]);
3023
+ const handleSelectionChange = (nextIds) => {
3024
+ const known = /* @__PURE__ */ new Map();
3025
+ for (const file of selected) known.set(file.id, file);
3026
+ for (const file of pagedFiles) known.set(file.id, file);
3027
+ onSelectionChange(nextIds.map((id) => known.get(id)).filter((file) => file !== void 0));
3028
+ };
3029
+ const treeNodes = useMemo(() => Object.values(folderNodes), [folderNodes]);
3030
+ if (folderQuery.data && !folderQuery.data.connected) {
3031
+ return notConnected ?? /* @__PURE__ */ jsx(Paper, { withBorder: true, p: "xl", "data-testid": "cloud-storage-browser-not-connected", children: /* @__PURE__ */ jsxs(Stack, { align: "center", gap: "sm", children: [
3032
+ /* @__PURE__ */ jsx(IconCloudOff, { size: 32, color: "var(--color-textDimmed)" }),
3033
+ /* @__PURE__ */ jsx(Text, { fw: 600, children: "No storage account connected" }),
3034
+ /* @__PURE__ */ jsxs(Text, { size: "sm", c: "dimmed", ta: "center", children: [
3035
+ "No credential named ",
3036
+ /* @__PURE__ */ jsx("strong", { children: credentialName }),
3037
+ " exists for this organization."
3038
+ ] })
3039
+ ] }) });
3040
+ }
3041
+ return /* @__PURE__ */ jsx(Paper, { withBorder: true, "data-testid": "cloud-storage-browser", children: /* @__PURE__ */ jsxs(Flex, { direction: { base: "column", sm: "row" }, align: "stretch", children: [
3042
+ /* @__PURE__ */ jsx(Box, { p: "sm", w: { base: "100%", sm: FOLDER_PANE_WIDTH }, style: { flexShrink: 0 }, children: /* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
3043
+ /* @__PURE__ */ jsx(Text, { size: "xs", fw: 600, c: "dimmed", children: "FOLDERS" }),
3044
+ treeNodes.length === 0 ? /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: "No folders here." }) : /* @__PURE__ */ jsx(
3045
+ CloudStorageFolderTree,
3046
+ {
3047
+ nodes: treeNodes,
3048
+ selectedPath: currentPath,
3049
+ onNavigate: (node) => setCurrentPath(node.path ?? "")
3050
+ }
3051
+ )
3052
+ ] }) }),
3053
+ /* @__PURE__ */ jsx(Divider, { orientation: "vertical", visibleFrom: "sm" }),
3054
+ /* @__PURE__ */ jsx(Divider, { orientation: "horizontal", hiddenFrom: "sm" }),
3055
+ /* @__PURE__ */ jsx(Box, { p: "sm", style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
3056
+ /* @__PURE__ */ jsxs(Group, { justify: "space-between", children: [
3057
+ /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", "data-testid": "cloud-storage-browser-path", children: currentPath === "" ? "Root" : currentPath }),
3058
+ /* @__PURE__ */ jsxs(Badge, { variant: "light", size: "sm", children: [
3059
+ pagedFiles.length,
3060
+ " files"
3061
+ ] })
3062
+ ] }),
3063
+ folderQuery.isLoading && pagedFiles.length === 0 ? /* @__PURE__ */ jsx(Group, { justify: "center", py: "xl", children: /* @__PURE__ */ jsx(Loader, { size: "sm" }) }) : /* @__PURE__ */ jsx(
3064
+ CloudStorageFileGrid,
3065
+ {
3066
+ items: gridItems,
3067
+ selectedIds,
3068
+ multiple,
3069
+ onSelectionChange: handleSelectionChange,
3070
+ emptyState: /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", ta: "center", py: "xl", children: "No files in this folder." })
3071
+ }
3072
+ ),
3073
+ folderQuery.data?.nextCursor && /* @__PURE__ */ jsx(Group, { justify: "center", children: /* @__PURE__ */ jsx(
3074
+ Button,
3075
+ {
3076
+ size: "compact-sm",
3077
+ variant: "light",
3078
+ loading: folderQuery.isFetching,
3079
+ onClick: () => setCursor(folderQuery.data?.nextCursor),
3080
+ "data-testid": "cloud-storage-browser-load-more",
3081
+ children: "Load more"
3082
+ }
3083
+ ) })
3084
+ ] }) })
3085
+ ] }) });
3086
+ }
2787
3087
 
2788
- export { AbsoluteScheduleForm, ApiKeyDisplayModal, ApiKeyList, ApiKeySettings, Breadcrumbs, CreateApiKeyModal, CreateRoleModal, CreateScheduleModal, DEAL_STAGES, DEFAULT_KANBAN_CONFIG, DealKanbanCard, DeleteScheduleModal, DeploymentDetailModal, DeploymentList, DeploymentSettings, DeploymentStatusBadge, EditApiKeyModal, KanbanBoard, MdxRenderer, NoAccessState, NotificationBell, NotificationPanel, PermissionMatrix, RecurringScheduleForm, RelativeScheduleForm, RichTextEditor, ScheduleCard, ScheduleDetailModal, ScheduleTypeSelector, TaskScheduler, mdxComponents };
3088
+ export { AbsoluteScheduleForm, ApiKeyDisplayModal, ApiKeyList, ApiKeySettings, Breadcrumbs, CloudStorageBrowser, CloudStorageFileCard, CloudStorageFileGrid, CloudStorageFolderTree, CreateApiKeyModal, CreateRoleModal, CreateScheduleModal, DEAL_STAGES, DEFAULT_KANBAN_CONFIG, DealKanbanCard, DeleteScheduleModal, DeploymentDetailModal, DeploymentList, DeploymentSettings, DeploymentStatusBadge, EditApiKeyModal, KanbanBoard, MdxRenderer, NotificationBell, NotificationPanel, PermissionMatrix, RecurringScheduleForm, RelativeScheduleForm, RichTextEditor, ScheduleCard, ScheduleDetailModal, ScheduleTypeSelector, TaskScheduler, mdxComponents };
@@ -1,15 +1,14 @@
1
- export { useBreadcrumbs } from '../../chunk-UZ5JO5TK.js';
2
- import '../../chunk-KIDZXZM5.js';
1
+ export { useBreadcrumbs } from '../../chunk-7ARBBELS.js';
2
+ import '../../chunk-6JN2TLV2.js';
3
3
  import '../../chunk-R6NMRXNO.js';
4
4
  import '../../chunk-RBGVNPA6.js';
5
- import '../../chunk-MKH2KOAO.js';
6
- import '../../chunk-Z2W5VNN3.js';
5
+ import '../../chunk-O32UQ26A.js';
7
6
  import '../../chunk-L7BZZ4SI.js';
8
- import '../../chunk-XZIOCB5D.js';
7
+ import '../../chunk-HYQOGRWG.js';
9
8
  import '../../chunk-MISHPEJX.js';
10
9
  import '../../chunk-62GVNH5U.js';
11
10
  import '../../chunk-P45GQ3ZW.js';
12
- import '../../chunk-M7WWRZ5Z.js';
11
+ import '../../chunk-2GIJBHZT.js';
13
12
  import '../../chunk-3KMDHCAR.js';
14
13
  import '../../chunk-2IFYDILW.js';
15
14
  import '../../chunk-BLXJEIQS.js';
@@ -17,7 +16,7 @@ import '../../chunk-UD657ICS.js';
17
16
  import '../../chunk-DD3CCMCZ.js';
18
17
  import '../../chunk-RNP5R5I3.js';
19
18
  import '../../chunk-RT4KRGZT.js';
20
- import '../../chunk-Q3O3WY7Q.js';
19
+ import '../../chunk-R5UGIFYU.js';
21
20
  import '../../chunk-Y6I3IC45.js';
22
21
  import '../../chunk-6SSQGWK7.js';
23
22
  import '../../chunk-BI5VDO2K.js';
@@ -1456,6 +1456,64 @@ type Database = {
1456
1456
  }
1457
1457
  ];
1458
1458
  };
1459
+ content_distribution_metrics: {
1460
+ Row: {
1461
+ captured_at: string;
1462
+ created_at: string;
1463
+ distribution_id: string;
1464
+ id: string;
1465
+ metrics: Json;
1466
+ organization_id: string;
1467
+ raw: Json;
1468
+ source: string;
1469
+ source_execution_id: string | null;
1470
+ };
1471
+ Insert: {
1472
+ captured_at?: string;
1473
+ created_at?: string;
1474
+ distribution_id: string;
1475
+ id?: string;
1476
+ metrics?: Json;
1477
+ organization_id: string;
1478
+ raw?: Json;
1479
+ source: string;
1480
+ source_execution_id?: string | null;
1481
+ };
1482
+ Update: {
1483
+ captured_at?: string;
1484
+ created_at?: string;
1485
+ distribution_id?: string;
1486
+ id?: string;
1487
+ metrics?: Json;
1488
+ organization_id?: string;
1489
+ raw?: Json;
1490
+ source?: string;
1491
+ source_execution_id?: string | null;
1492
+ };
1493
+ Relationships: [
1494
+ {
1495
+ foreignKeyName: "content_distribution_metrics_distribution_fkey";
1496
+ columns: ["distribution_id", "organization_id"];
1497
+ isOneToOne: false;
1498
+ referencedRelation: "content_distributions";
1499
+ referencedColumns: ["id", "organization_id"];
1500
+ },
1501
+ {
1502
+ foreignKeyName: "content_distribution_metrics_organization_id_fkey";
1503
+ columns: ["organization_id"];
1504
+ isOneToOne: false;
1505
+ referencedRelation: "organizations";
1506
+ referencedColumns: ["id"];
1507
+ },
1508
+ {
1509
+ foreignKeyName: "content_distribution_metrics_source_execution_id_fkey";
1510
+ columns: ["source_execution_id"];
1511
+ isOneToOne: false;
1512
+ referencedRelation: "execution_logs";
1513
+ referencedColumns: ["execution_id"];
1514
+ }
1515
+ ];
1516
+ };
1459
1517
  content_distributions: {
1460
1518
  Row: {
1461
1519
  adapted_body: string | null;
@@ -1605,6 +1663,63 @@ type Database = {
1605
1663
  }
1606
1664
  ];
1607
1665
  };
1666
+ content_item_source_assets: {
1667
+ Row: {
1668
+ alt_text: string | null;
1669
+ content_item_id: string;
1670
+ created_at: string;
1671
+ crop: Json | null;
1672
+ derivative_crop: Json | null;
1673
+ derivative_path: string | null;
1674
+ derivative_rendered_at: string | null;
1675
+ id: string;
1676
+ organization_id: string;
1677
+ position: number;
1678
+ source_asset_id: string;
1679
+ };
1680
+ Insert: {
1681
+ alt_text?: string | null;
1682
+ content_item_id: string;
1683
+ created_at?: string;
1684
+ crop?: Json | null;
1685
+ derivative_crop?: Json | null;
1686
+ derivative_path?: string | null;
1687
+ derivative_rendered_at?: string | null;
1688
+ id?: string;
1689
+ organization_id: string;
1690
+ position: number;
1691
+ source_asset_id: string;
1692
+ };
1693
+ Update: {
1694
+ alt_text?: string | null;
1695
+ content_item_id?: string;
1696
+ created_at?: string;
1697
+ crop?: Json | null;
1698
+ derivative_crop?: Json | null;
1699
+ derivative_path?: string | null;
1700
+ derivative_rendered_at?: string | null;
1701
+ id?: string;
1702
+ organization_id?: string;
1703
+ position?: number;
1704
+ source_asset_id?: string;
1705
+ };
1706
+ Relationships: [
1707
+ {
1708
+ foreignKeyName: "content_item_source_assets_asset_fkey";
1709
+ columns: ["source_asset_id", "organization_id"];
1710
+ isOneToOne: false;
1711
+ referencedRelation: "content_source_assets";
1712
+ referencedColumns: ["id", "organization_id"];
1713
+ },
1714
+ {
1715
+ foreignKeyName: "content_item_source_assets_item_fkey";
1716
+ columns: ["content_item_id", "organization_id"];
1717
+ isOneToOne: false;
1718
+ referencedRelation: "content_items";
1719
+ referencedColumns: ["id", "organization_id"];
1720
+ }
1721
+ ];
1722
+ };
1608
1723
  content_items: {
1609
1724
  Row: {
1610
1725
  body: string | null;
@@ -3360,6 +3475,25 @@ type Database = {
3360
3475
  };
3361
3476
  Returns: Json;
3362
3477
  };
3478
+ activate_deployment_atomic: {
3479
+ Args: {
3480
+ p_deployment_id: string;
3481
+ p_organization_id: string;
3482
+ };
3483
+ Returns: {
3484
+ created_at: string;
3485
+ deployment_version: string | null;
3486
+ error_message: string | null;
3487
+ id: string;
3488
+ organization_id: string;
3489
+ pid: number | null;
3490
+ port: number | null;
3491
+ sdk_version: string;
3492
+ status: string;
3493
+ tarball_path: string | null;
3494
+ updated_at: string;
3495
+ };
3496
+ };
3363
3497
  append_deal_activity: {
3364
3498
  Args: {
3365
3499
  p_activity: Json;
@@ -3693,6 +3827,24 @@ interface AccessGuardProps {
3693
3827
  */
3694
3828
  declare function AccessGuard({ accessKey, children, fallback, loadingFallback, redirectTo }: AccessGuardProps): react_jsx_runtime.JSX.Element;
3695
3829
 
3830
+ interface ProtectedSystemRouteProps {
3831
+ /** The System path (or `{ systemPath, action }`) this route requires access to. */
3832
+ accessKey: AccessKeyInput;
3833
+ children: ReactNode;
3834
+ }
3835
+ /**
3836
+ * Route-guard helper for a System's top-level route file. Collapses the
3837
+ * `ProtectedRoute` + `AccessGuard` boilerplate every System route repeats
3838
+ * (see `external/_template/ui/src/routes/crm.tsx` and its siblings) into a
3839
+ * single call, and supplies {@link SystemUnavailableState} as the guard's
3840
+ * `fallback` so a denial renders the specific reason `checkAccess` already
3841
+ * computed instead of the guard's own blank `fallback = null` default.
3842
+ *
3843
+ * `createFileRoute` stays in the route file -- TanStack's file-based routing
3844
+ * requires it there; this component only replaces the route's layout body.
3845
+ */
3846
+ declare function ProtectedSystemRoute({ accessKey, children }: ProtectedSystemRouteProps): react_jsx_runtime.JSX.Element;
3847
+
3696
3848
  type ApiRequestFn = <T>(endpoint: string, options?: RequestInit) => Promise<T>;
3697
3849
  interface UseUserProfileOptions {
3698
3850
  /**
@@ -3814,5 +3966,5 @@ interface LoginScreenProps {
3814
3966
  */
3815
3967
  declare function LoginScreen({ lightModeLogo, darkModeLogo, appName, appConfig }: LoginScreenProps): react_jsx_runtime.JSX.Element;
3816
3968
 
3817
- export { AccessGuard, AuthRedirectLoadingScreen, LoginScreen, ProtectedRoute, USER_PROFILE_QUERY_KEY, useUserProfile, validateLoginSearch };
3818
- export type { AccessGuardProps, AuthMode, AuthRedirectLoadingScreenProps, LoginScreenAppConfig, LoginScreenProps, LoginSearchParams, ProtectedRouteProps, UseUserProfileReturn };
3969
+ export { AccessGuard, AuthRedirectLoadingScreen, LoginScreen, ProtectedRoute, ProtectedSystemRoute, USER_PROFILE_QUERY_KEY, useUserProfile, validateLoginSearch };
3970
+ export type { AccessGuardProps, AuthMode, AuthRedirectLoadingScreenProps, LoginScreenAppConfig, LoginScreenProps, LoginSearchParams, ProtectedRouteProps, ProtectedSystemRouteProps, UseUserProfileReturn };