@elevasis/ui 2.36.0 → 2.38.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/api/index.js +4 -3
  2. package/dist/app/index.css +0 -384
  3. package/dist/app/index.d.ts +75 -2
  4. package/dist/app/index.js +22 -21
  5. package/dist/auth/index.d.ts +91 -28
  6. package/dist/auth/index.js +5 -1
  7. package/dist/charts/index.js +9 -3
  8. package/dist/chunk-4O3VAALW.js +349 -0
  9. package/dist/{chunk-O2Q4VMRN.js → chunk-566XWGPP.js} +76 -109
  10. package/dist/chunk-5EYJ2GIN.js +122 -0
  11. package/dist/chunk-6D4LCJ52.js +10 -0
  12. package/dist/chunk-6ROXVZ3L.js +9 -0
  13. package/dist/{chunk-YYX7OPZQ.js → chunk-73EWE2EW.js} +1 -1
  14. package/dist/{chunk-SIQ3P4OR.js → chunk-7GQFIWP4.js} +8 -756
  15. package/dist/{chunk-VKIZUUPM.js → chunk-7YXZFS56.js} +31 -14
  16. package/dist/{chunk-AKW7KISS.js → chunk-7ZWXTH5J.js} +2 -44
  17. package/dist/chunk-A7IG36LB.js +215 -0
  18. package/dist/chunk-B2DZLPDL.js +39 -0
  19. package/dist/chunk-C6BDBZRO.js +422 -0
  20. package/dist/chunk-CLDCYJQT.js +1 -0
  21. package/dist/{chunk-LUYVRATI.js → chunk-DA6I5VEY.js} +5 -213
  22. package/dist/chunk-H2MEFUQD.js +337 -0
  23. package/dist/chunk-I53EX4VU.js +734 -0
  24. package/dist/chunk-IIMU5YAJ.js +53 -0
  25. package/dist/chunk-JXVNHVK7.js +79 -0
  26. package/dist/chunk-M7Q4UBRY.js +85 -0
  27. package/dist/{chunk-K4UZU3TU.js → chunk-P34FFSOX.js} +1 -1
  28. package/dist/chunk-PGWANFNE.js +112 -0
  29. package/dist/{chunk-F6EFC2MJ.js → chunk-Q64E2TZY.js} +440 -2075
  30. package/dist/chunk-S3XR4II4.js +30 -0
  31. package/dist/chunk-SHZT7ULK.js +425 -0
  32. package/dist/{chunk-GX6XBRRF.js → chunk-TYRUKGGD.js} +2 -1
  33. package/dist/{chunk-R3VCBZDC.js → chunk-X4WBGKJQ.js} +3 -50
  34. package/dist/{chunk-GEFWMU26.js → chunk-X66MVMZT.js} +1 -9
  35. package/dist/{chunk-57OZ3AEG.js → chunk-Y3JQBSKQ.js} +1 -1
  36. package/dist/components/index.d.ts +74 -42
  37. package/dist/components/index.js +34 -19
  38. package/dist/components/navigation/index.js +3 -31
  39. package/dist/features/auth/index.d.ts +97 -99
  40. package/dist/features/auth/index.js +37 -99
  41. package/dist/features/clients/index.js +34 -19
  42. package/dist/features/crm/index.d.ts +65 -0
  43. package/dist/features/crm/index.js +34 -19
  44. package/dist/features/dashboard/index.js +34 -19
  45. package/dist/features/delivery/index.d.ts +65 -0
  46. package/dist/features/delivery/index.js +34 -19
  47. package/dist/features/knowledge/index.js +6 -30
  48. package/dist/features/lead-gen/index.d.ts +1096 -1
  49. package/dist/features/lead-gen/index.js +34 -19
  50. package/dist/features/monitoring/index.js +34 -19
  51. package/dist/features/monitoring/requests/index.js +34 -19
  52. package/dist/features/notes/index.d.ts +72 -0
  53. package/dist/features/notes/index.js +621 -0
  54. package/dist/features/operations/index.d.ts +10 -2
  55. package/dist/features/operations/index.js +34 -19
  56. package/dist/features/right-panel-host/index.d.ts +214 -0
  57. package/dist/features/right-panel-host/index.js +639 -0
  58. package/dist/features/seo/index.js +3 -2
  59. package/dist/features/settings/index.d.ts +68 -35
  60. package/dist/features/settings/index.js +34 -19
  61. package/dist/hooks/access/index.d.ts +90 -0
  62. package/dist/hooks/access/index.js +10 -0
  63. package/dist/hooks/delivery/index.d.ts +65 -0
  64. package/dist/hooks/delivery/index.js +34 -19
  65. package/dist/hooks/index.d.ts +1644 -1651
  66. package/dist/hooks/index.js +34 -19
  67. package/dist/hooks/published.d.ts +1644 -1651
  68. package/dist/hooks/published.js +34 -19
  69. package/dist/hooks/user-notes/index.d.ts +57 -0
  70. package/dist/hooks/user-notes/index.js +3 -0
  71. package/dist/index.d.ts +294 -277
  72. package/dist/index.js +35 -20
  73. package/dist/initialization/index.d.ts +65 -19
  74. package/dist/knowledge/index.d.ts +10 -2
  75. package/dist/knowledge/index.js +173 -28
  76. package/dist/layout/index.js +5 -3
  77. package/dist/organization/index.d.ts +0 -19
  78. package/dist/organization/index.js +34 -19
  79. package/dist/profile/index.d.ts +65 -0
  80. package/dist/provider/index.css +0 -384
  81. package/dist/provider/index.d.ts +75 -2
  82. package/dist/provider/index.js +16 -21
  83. package/dist/provider/published.css +0 -523
  84. package/dist/provider/published.d.ts +75 -2
  85. package/dist/provider/published.js +11 -21
  86. package/dist/supabase/index.d.ts +127 -0
  87. package/dist/test-utils/index.d.ts +2 -21
  88. package/dist/test-utils/index.js +5 -18
  89. package/dist/theme/index.js +3 -1
  90. package/dist/types/index.d.ts +115 -59
  91. package/dist/utils/index.js +2 -1
  92. package/package.json +21 -5
  93. package/src/auth/README.md +6 -6
  94. package/dist/components/navigation/index.css +0 -649
  95. package/dist/features/knowledge/index.css +0 -649
@@ -9,6 +9,13 @@ import { NodeProps, Node, EdgeProps, Edge } from '@xyflow/react';
9
9
  export { default as graphStyles } from '../graph/Graph.module.css';
10
10
  import * as _tanstack_react_query from '@tanstack/react-query';
11
11
 
12
+ type Props$1 = {
13
+ slug: string;
14
+ name: string;
15
+ isSystem: boolean;
16
+ };
17
+ declare function RoleBadge({ name, isSystem }: Props$1): react_jsx_runtime.JSX.Element;
18
+
12
19
  /**
13
20
  * Workflow-specific logging types and utilities
14
21
  */
@@ -1900,6 +1907,51 @@ type Database = {
1900
1907
  }
1901
1908
  ];
1902
1909
  };
1910
+ deployment_organization_models: {
1911
+ Row: {
1912
+ created_at: string;
1913
+ deployment_id: string;
1914
+ model_hash: string | null;
1915
+ organization_id: string;
1916
+ organization_model: Json;
1917
+ schema_version: string;
1918
+ updated_at: string;
1919
+ };
1920
+ Insert: {
1921
+ created_at?: string;
1922
+ deployment_id: string;
1923
+ model_hash?: string | null;
1924
+ organization_id: string;
1925
+ organization_model: Json;
1926
+ schema_version?: string;
1927
+ updated_at?: string;
1928
+ };
1929
+ Update: {
1930
+ created_at?: string;
1931
+ deployment_id?: string;
1932
+ model_hash?: string | null;
1933
+ organization_id?: string;
1934
+ organization_model?: Json;
1935
+ schema_version?: string;
1936
+ updated_at?: string;
1937
+ };
1938
+ Relationships: [
1939
+ {
1940
+ foreignKeyName: "deployment_organization_models_deployment_id_fkey";
1941
+ columns: ["deployment_id"];
1942
+ isOneToOne: true;
1943
+ referencedRelation: "deployments";
1944
+ referencedColumns: ["id"];
1945
+ },
1946
+ {
1947
+ foreignKeyName: "deployment_organization_models_organization_id_fkey";
1948
+ columns: ["organization_id"];
1949
+ isOneToOne: false;
1950
+ referencedRelation: "organizations";
1951
+ referencedColumns: ["id"];
1952
+ }
1953
+ ];
1954
+ };
1903
1955
  deployments: {
1904
1956
  Row: {
1905
1957
  created_at: string;
@@ -3421,6 +3473,12 @@ type Database = {
3421
3473
  Args: never;
3422
3474
  Returns: boolean;
3423
3475
  };
3476
+ current_user_shares_org_with: {
3477
+ Args: {
3478
+ other_user_id: string;
3479
+ };
3480
+ Returns: boolean;
3481
+ };
3424
3482
  current_user_supabase_id: {
3425
3483
  Args: never;
3426
3484
  Returns: string;
@@ -3460,6 +3518,20 @@ type Database = {
3460
3518
  Args: never;
3461
3519
  Returns: string;
3462
3520
  };
3521
+ has_org_access: {
3522
+ Args: {
3523
+ action?: string;
3524
+ org_id: string;
3525
+ system_path: string;
3526
+ };
3527
+ Returns: boolean;
3528
+ } | {
3529
+ Args: {
3530
+ action?: string;
3531
+ system_path: string;
3532
+ };
3533
+ Returns: boolean;
3534
+ };
3463
3535
  has_org_permission: {
3464
3536
  Args: {
3465
3537
  org_id: string;
@@ -4141,24 +4213,6 @@ declare const GetRecentActivityResponseSchema: z.ZodObject<{
4141
4213
  }, z.core.$strip>;
4142
4214
  type GetRecentActivityResponse = z.infer<typeof GetRecentActivityResponseSchema>;
4143
4215
 
4144
- /**
4145
- * Multi-tenancy configuration types
4146
- *
4147
- * Config is stored in dedicated `config` columns (NOT nested in metadata):
4148
- * - organizations.config: Org-level config (no feature toggles -- all features available by default)
4149
- * - org_memberships.config: Per-user-per-org feature overrides
4150
- * - users.config: User-global config
4151
- */
4152
-
4153
- /**
4154
- * Per-user-per-org config (stored in org_memberships.config)
4155
- * Controls which features a specific member can access within their org.
4156
- * Keys are feature IDs from the organization model (e.g. crm, lead-gen, projects, seo).
4157
- */
4158
- interface MembershipFeatureConfig {
4159
- features?: Record<string, boolean>;
4160
- }
4161
-
4162
4216
  /**
4163
4217
  * Memberships Domain - Zod Validation Schemas
4164
4218
  *
@@ -4218,7 +4272,6 @@ interface MembershipWithDetails extends OrganizationMembership {
4218
4272
  metadata?: Record<string, unknown>;
4219
4273
  config?: Record<string, unknown>;
4220
4274
  };
4221
- config?: MembershipFeatureConfig;
4222
4275
  }
4223
4276
 
4224
4277
  interface OAuthToken extends Record<string, unknown> {
@@ -4534,7 +4587,7 @@ interface Activity {
4534
4587
  * Source of truth for the permission keys used by:
4535
4588
  * - RLS policies in Supabase (via has_org_permission(org_id, key))
4536
4589
  * - API middleware (via requireOrganizationPermission(key))
4537
- * - UI hooks (via useOrganizationPermissions().hasPermission(key))
4590
+ * - UI access checks (via useAccess() permission-backed AccessKeys)
4538
4591
  *
4539
4592
  * The DB table `org_rol_permissions` mirrors this constant. There is no
4540
4593
  * runtime reconciler; parity is enforced two ways:
@@ -4616,20 +4669,6 @@ declare const ListCredentialsResponseSchema: z.ZodObject<{
4616
4669
  /** API response type for a single credential list item */
4617
4670
  type CredentialListItem = z.infer<typeof ListCredentialsResponseSchema>['credentials'][number];
4618
4671
 
4619
- type Props$2 = {
4620
- permission: PermissionKey | string;
4621
- fallback?: ReactNode;
4622
- children: ReactNode;
4623
- };
4624
- declare function Can({ permission, fallback, children }: Props$2): react_jsx_runtime.JSX.Element | null;
4625
-
4626
- type Props$1 = {
4627
- slug: string;
4628
- name: string;
4629
- isSystem: boolean;
4630
- };
4631
- declare function RoleBadge({ name, isSystem }: Props$1): react_jsx_runtime.JSX.Element;
4632
-
4633
4672
  type PermissionRow = PermissionDescriptor;
4634
4673
  type Props = {
4635
4674
  catalog: PermissionRow[];
@@ -6689,13 +6728,6 @@ interface DeploymentStatusBadgeProps {
6689
6728
  }
6690
6729
  declare function DeploymentStatusBadge({ status }: DeploymentStatusBadgeProps): react_jsx_runtime.JSX.Element;
6691
6730
 
6692
- interface MembershipFeaturePanelProps {
6693
- currentConfig?: MembershipFeatureConfig;
6694
- onConfigChange: (config: MembershipFeatureConfig) => void;
6695
- disabled?: boolean;
6696
- }
6697
- declare function MembershipFeaturePanel({ currentConfig, onConfigChange, disabled }: MembershipFeaturePanelProps): react_jsx_runtime.JSX.Element;
6698
-
6699
6731
  interface MembershipStatusBadgeProps {
6700
6732
  status: MembershipStatus;
6701
6733
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
@@ -7087,5 +7119,5 @@ declare const OperationsSidebarMiddle: () => react_jsx_runtime.JSX.Element;
7087
7119
 
7088
7120
  declare const operationsManifest: SystemModule;
7089
7121
 
7090
- export { APIErrorAlert, AbsoluteScheduleForm, ActionModal, ActivityCard, ActivityFeedWidget, ActivityFilters as ActivityFiltersBar, ActivityTable, ActivityTimeline, AgentDefinitionDisplay, AgentExecutionLogs, AgentExecutionTimeline, AgentExecutionVisualizer, AgentIterationEdge, AgentIterationNode, AllTasksPage, ApiKeyDisplayModal, ApiKeyList, ApiKeySettings, AppErrorBoundary, BaseEdge, BaseExecutionLogs, BaseExecutionLogsHeader, BaseExecutionLogsStates, BaseNode, Breadcrumbs, BusinessImpactCard, CONTAINER_CONSTANTS, Can, CardHeader, CenteredErrorState, CheckpointGroup, CollapsibleJsonSection, CollapsibleSection, CommandQueueSidebar, CommandQueueSidebarMiddle, CommandQueueSidebarTop, CommandQueueTaskRow, CompanyDetailPage, ConfigCard, ConfirmationInputModal, ConfirmationModal, ContactDetailPage, ContentSections, ContextUsageBadge, ContextViewer, ContractDisplay, CostBreakdownCard, CostByModelTable, CostMetricsCard, CrashErrorFallback, CreateApiKeyModal, CreateCredentialModal, CreateRoleModal, CreateScheduleModal, CredentialList, CredentialSettings, CrmOverview, CrmSidebar, CrmSidebarMiddle, CrmSidebarTop, CustomModal, CustomSelector, DEAL_STAGES, DEFAULT_KANBAN_CONFIG, DealDetailPage, DealKanbanCard, DealsListPage, DeleteScheduleModal, DeploymentDetailModal, DeploymentList, DeploymentSettings, DeploymentStatusBadge, DetailCardSkeleton, EditApiKeyModal, ElevasisLoader, EmptyState, EmptyVisualizer, ErrorAnalysisCard, ErrorBreakdownTable, ErrorReportCard, ExecutionBreakdownTable, ExecutionErrorSection, ExecutionHealthCard, ExecutionLogsFilters as ExecutionLogsFilterBar, ExecutionLogsTable, ExecutionStats, ExecutionStatusBadge, FeatureUnavailableState, FilterBar, GlowDot, GraphBackground, GraphContainer, GraphFitViewButton, GraphFitViewHandler, GraphLegend, HealthStatusCard, JsonViewer, KanbanBoard, LEAD_GEN_ROUTE_LINKS, LeadGenCompaniesPage, LeadGenContactsPage, LeadGenListDetailPage, LeadGenListsPage, LeadGenOverviewPage, LeadGenRouteShell, LeadGenSidebar, LeadGenSidebarMiddle, LeadGenSidebarTop, ListSkeleton, LogEntry, LogGroup, MdxRenderer, MembershipFeaturePanel, MembershipStatusBadge, MetricsStrip, MilestoneTimeline, MyTasksPanel, NavigationButton, NewKnowledgeMapEdge, NewKnowledgeMapGraph, NewKnowledgeMapNode, NoAccessState, NotificationBell, NotificationItem, NotificationList, NotificationPanel, OAuthConnectModal, OperationsSidebar, OperationsSidebarMiddle, OperationsSidebarTop, OrganizationMembershipsList, PIPELINE_FUNNEL_ORDER, PageNotFound, PageTitleCaption, PermissionMatrix, PipelineFunnelWidget, ProjectDetailPage, ProjectsListPage, ProjectsSidebar, ProjectsSidebarMiddle, ProjectsSidebarTop, QuickCreateActions, RecurringScheduleForm, RelativeScheduleForm, ResourceCard, ResourceDefinitionSection, ResourceErrorState, ResourceFilter, ResourceHeader, ResourceHealthChart, ResourceHealthPanel, ResourceNotFoundState, RichTextEditor, RoleBadge, RunResourceButton, SAVED_VIEW_PRESETS, SEOSidebar, SEOSidebarMiddle, SEOSidebarTop, SHARED_VIZ_CONSTANTS, SavedViewsPanel, ScheduleCard, ScheduleDetailModal, ScheduleTypeSelector, SessionMemory, SortableHeader, StatCard, StatCardSkeleton, StatsCardSkeleton, StatusBadge, StepConfigForm, StyledMarkdown, TabCountBadge, TabSection, TableSelectionToolbar, TaskCard, TaskScheduler, TimeRangeSelector, TimelineAxis, TimelineBar, TimelineContainer, TimelineRow, ToolsListDisplay, TrendIndicator, UnifiedWorkflowEdge, UnifiedWorkflowGraph, UnifiedWorkflowNode, UpcomingMilestonesPage, VisualizerContainer, WebhookUrlDisplayModal, WorkflowDefinitionDisplay, WorkflowExecutionLogs, WorkflowExecutionTimeline, ZodFormRenderer, buildErrorReport, calculateProgress, crmManifest, deliveryManifest, formatStatusLabel, getEnrichmentColor, getExecutionStatusConfig, getGraphBackgroundStyles, getHealthColor, getIcon, getLogLevelConfig, getStatusColor, iconMap, leadGenManifest, mdxComponents, milestoneStatusColors, monitoringManifest, noteTypeColors, operationsManifest, projectStatusColors, seoManifest, settingsManifest, showApiErrorNotification, showAuthError, showErrorNotification, showInfoNotification, showSuccessNotification, showWarningNotification, taskStatusColors, taskTypeColors, useCrmPipelineSummary, useCrmQuickMetrics, useDeleteLists, useGraphBackgroundStyles, useGraphTheme, useNewKnowledgeMapLayout, useRecentCrmActivity };
7122
+ export { APIErrorAlert, AbsoluteScheduleForm, ActionModal, ActivityCard, ActivityFeedWidget, ActivityFilters as ActivityFiltersBar, ActivityTable, ActivityTimeline, AgentDefinitionDisplay, AgentExecutionLogs, AgentExecutionTimeline, AgentExecutionVisualizer, AgentIterationEdge, AgentIterationNode, AllTasksPage, ApiKeyDisplayModal, ApiKeyList, ApiKeySettings, AppErrorBoundary, BaseEdge, BaseExecutionLogs, BaseExecutionLogsHeader, BaseExecutionLogsStates, BaseNode, Breadcrumbs, BusinessImpactCard, CONTAINER_CONSTANTS, CardHeader, CenteredErrorState, CheckpointGroup, CollapsibleJsonSection, CollapsibleSection, CommandQueueSidebar, CommandQueueSidebarMiddle, CommandQueueSidebarTop, CommandQueueTaskRow, CompanyDetailPage, ConfigCard, ConfirmationInputModal, ConfirmationModal, ContactDetailPage, ContentSections, ContextUsageBadge, ContextViewer, ContractDisplay, CostBreakdownCard, CostByModelTable, CostMetricsCard, CrashErrorFallback, CreateApiKeyModal, CreateCredentialModal, CreateRoleModal, CreateScheduleModal, CredentialList, CredentialSettings, CrmOverview, CrmSidebar, CrmSidebarMiddle, CrmSidebarTop, CustomModal, CustomSelector, DEAL_STAGES, DEFAULT_KANBAN_CONFIG, DealDetailPage, DealKanbanCard, DealsListPage, DeleteScheduleModal, DeploymentDetailModal, DeploymentList, DeploymentSettings, DeploymentStatusBadge, DetailCardSkeleton, EditApiKeyModal, ElevasisLoader, EmptyState, EmptyVisualizer, ErrorAnalysisCard, ErrorBreakdownTable, ErrorReportCard, ExecutionBreakdownTable, ExecutionErrorSection, ExecutionHealthCard, ExecutionLogsFilters as ExecutionLogsFilterBar, ExecutionLogsTable, ExecutionStats, ExecutionStatusBadge, FeatureUnavailableState, FilterBar, GlowDot, GraphBackground, GraphContainer, GraphFitViewButton, GraphFitViewHandler, GraphLegend, HealthStatusCard, JsonViewer, KanbanBoard, LEAD_GEN_ROUTE_LINKS, LeadGenCompaniesPage, LeadGenContactsPage, LeadGenListDetailPage, LeadGenListsPage, LeadGenOverviewPage, LeadGenRouteShell, LeadGenSidebar, LeadGenSidebarMiddle, LeadGenSidebarTop, ListSkeleton, LogEntry, LogGroup, MdxRenderer, MembershipStatusBadge, MetricsStrip, MilestoneTimeline, MyTasksPanel, NavigationButton, NewKnowledgeMapEdge, NewKnowledgeMapGraph, NewKnowledgeMapNode, NoAccessState, NotificationBell, NotificationItem, NotificationList, NotificationPanel, OAuthConnectModal, OperationsSidebar, OperationsSidebarMiddle, OperationsSidebarTop, OrganizationMembershipsList, PIPELINE_FUNNEL_ORDER, PageNotFound, PageTitleCaption, PermissionMatrix, PipelineFunnelWidget, ProjectDetailPage, ProjectsListPage, ProjectsSidebar, ProjectsSidebarMiddle, ProjectsSidebarTop, QuickCreateActions, RecurringScheduleForm, RelativeScheduleForm, ResourceCard, ResourceDefinitionSection, ResourceErrorState, ResourceFilter, ResourceHeader, ResourceHealthChart, ResourceHealthPanel, ResourceNotFoundState, RichTextEditor, RoleBadge, RunResourceButton, SAVED_VIEW_PRESETS, SEOSidebar, SEOSidebarMiddle, SEOSidebarTop, SHARED_VIZ_CONSTANTS, SavedViewsPanel, ScheduleCard, ScheduleDetailModal, ScheduleTypeSelector, SessionMemory, SortableHeader, StatCard, StatCardSkeleton, StatsCardSkeleton, StatusBadge, StepConfigForm, StyledMarkdown, TabCountBadge, TabSection, TableSelectionToolbar, TaskCard, TaskScheduler, TimeRangeSelector, TimelineAxis, TimelineBar, TimelineContainer, TimelineRow, ToolsListDisplay, TrendIndicator, UnifiedWorkflowEdge, UnifiedWorkflowGraph, UnifiedWorkflowNode, UpcomingMilestonesPage, VisualizerContainer, WebhookUrlDisplayModal, WorkflowDefinitionDisplay, WorkflowExecutionLogs, WorkflowExecutionTimeline, ZodFormRenderer, buildErrorReport, calculateProgress, crmManifest, deliveryManifest, formatStatusLabel, getEnrichmentColor, getExecutionStatusConfig, getGraphBackgroundStyles, getHealthColor, getIcon, getLogLevelConfig, getStatusColor, iconMap, leadGenManifest, mdxComponents, milestoneStatusColors, monitoringManifest, noteTypeColors, operationsManifest, projectStatusColors, seoManifest, settingsManifest, showApiErrorNotification, showAuthError, showErrorNotification, showInfoNotification, showSuccessNotification, showWarningNotification, taskStatusColors, taskTypeColors, useCrmPipelineSummary, useCrmQuickMetrics, useDeleteLists, useGraphBackgroundStyles, useGraphTheme, useNewKnowledgeMapLayout, useRecentCrmActivity };
7091
7123
  export type { ActivityEntry, ActivityFiltersProps, ActivityTableProps, AppErrorBoundaryProps, BaseEdgeProps, BaseExecutionLogsProps, BreadcrumbsProps, CompanyDetailPageProps, ContactDetailPageProps, ContextViewerProps, CostByModelTableProps, CrashErrorFallbackProps, CreateRoleModalProps, CrmOverviewProps, DealKanbanCardProps, ErrorAnalysisCardProps, ErrorReportCardProps, ExecutionBreakdownTableProps, ExecutionHealthCardProps, ExecutionLogEntry, ExecutionLogsFiltersProps, ExecutionLogsTableProps, FeatureUnavailableStateProps, FieldPath, FitViewButtonVariant, GraphFitViewHandlerProps, JsonViewerProps, KanbanBoardProps, KnowledgeMapEdgeData, KnowledgeMapNodeData, LogLevel, MdxRendererProps, NavigationButtonProps, PermissionRow, ProjectsSidebarMiddleProps, ResourceHealthPanelProps, RichTextEditorProps, RunResourceButtonProps, RunResourceInputResolver, SavedViewPreset, ScheduleType, SerializedKnowledgeMap, SerializedKnowledgeNode, StatCardProps, StepConfigComponent, StepConfigFieldHint, StepConfigFormProps, StepConfigLayout, StepConfigSection, StyledMarkdownProps, TabSectionProps, TaskFilterStatus, TrendIndicatorProps, ZodFormRendererProps };
@@ -1,33 +1,48 @@
1
- export { AbsoluteScheduleForm, ActionModal, ActivityCard, ActivityFeedWidget, ActivityFilters as ActivityFiltersBar, ActivityTable, AgentDefinitionDisplay, AgentExecutionLogs, AgentExecutionTimeline, AgentExecutionVisualizer, AgentIterationEdge, AgentIterationNode, AllTasksPage, ApiKeyDisplayModal, ApiKeyList, ApiKeySettings, AppErrorBoundary, BaseEdge, BaseExecutionLogs, BaseExecutionLogsHeader, BaseExecutionLogsStates, BaseNode, Breadcrumbs, BusinessImpactCard, Can, CheckpointGroup, CollapsibleJsonSection, CommandQueueSidebar, CommandQueueSidebarMiddle, CommandQueueSidebarTop, CommandQueueTaskRow, CompanyDetailPage, ConfigCard, ConfirmationInputModal, ConfirmationModal, ContactDetailPage, ContentSections, ContextUsageBadge, ContractDisplay, CostBreakdownCard, CostByModelTable, CostMetricsCard, CrashErrorFallback, CreateApiKeyModal, CreateCredentialModal, CreateRoleModal, CreateScheduleModal, CredentialList, CredentialSettings, CrmOverview, CrmSidebar, CrmSidebarMiddle, CrmSidebarTop, CustomModal, DEAL_STAGES, DEFAULT_KANBAN_CONFIG, DealDetailPage, DealKanbanCard, DealsListPage, DeleteScheduleModal, DeploymentDetailModal, DeploymentList, DeploymentSettings, DeploymentStatusBadge, EditApiKeyModal, EmptyVisualizer, ErrorAnalysisCard, ErrorBreakdownTable, ErrorReportCard, ExecutionBreakdownTable, ExecutionErrorSection, ExecutionHealthCard, ExecutionLogsFilters as ExecutionLogsFilterBar, ExecutionLogsTable, ExecutionStats, ExecutionStatusBadge, FilterBar, GraphBackground, GraphContainer, GraphFitViewButton, GraphFitViewHandler, GraphLegend, HealthStatusCard, KanbanBoard, LEAD_GEN_ROUTE_LINKS, LeadGenCompaniesPage, LeadGenContactsPage, LeadGenListDetailPage, LeadGenListsPage, LeadGenOverviewPage, LeadGenRouteShell, LeadGenSidebar, LeadGenSidebarMiddle, LeadGenSidebarTop, LogEntry, LogGroup, MdxRenderer, MembershipFeaturePanel, MembershipStatusBadge, MetricsStrip, MilestoneTimeline, MyTasksPanel, NewKnowledgeMapEdge, NewKnowledgeMapGraph, NewKnowledgeMapNode, NoAccessState, NotificationBell, NotificationItem, NotificationList, NotificationPanel, OAuthConnectModal, OperationsSidebar, OperationsSidebarMiddle, OperationsSidebarTop, OrganizationMembershipsList, PIPELINE_FUNNEL_ORDER, PermissionMatrix, PipelineFunnelWidget, ProjectDetailPage, ProjectsListPage, ProjectsSidebar, ProjectsSidebarMiddle, ProjectsSidebarTop, QuickCreateActions, RecurringScheduleForm, RelativeScheduleForm, ResourceDefinitionSection, ResourceErrorState, ResourceFilter, ResourceHeader, ResourceHealthChart, ResourceHealthPanel, ResourceNotFoundState, RichTextEditor, RoleBadge, RunResourceButton, SAVED_VIEW_PRESETS, SavedViewsPanel, ScheduleCard, ScheduleDetailModal, ScheduleTypeSelector, SessionMemory, SortableHeader, StepConfigForm, TabSection, TableSelectionToolbar, TaskCard, TaskScheduler, TimelineAxis, TimelineBar, TimelineContainer, TimelineRow, ToolsListDisplay, UnifiedWorkflowEdge, UnifiedWorkflowGraph, UnifiedWorkflowNode, UpcomingMilestonesPage, VisualizerContainer, WebhookUrlDisplayModal, WorkflowDefinitionDisplay, WorkflowExecutionLogs, WorkflowExecutionTimeline, ZodFormRenderer, buildErrorReport, calculateProgress, crmManifest, deliveryManifest, formatStatusLabel, getEnrichmentColor, getExecutionStatusConfig, getGraphBackgroundStyles, getHealthColor, getIcon, getLogLevelConfig, getStatusColor, iconMap, leadGenManifest, mdxComponents, milestoneStatusColors, monitoringManifest, noteTypeColors, operationsManifest, projectStatusColors, settingsManifest, showApiErrorNotification, showAuthError, showErrorNotification, showInfoNotification, showSuccessNotification, showWarningNotification, taskStatusColors, taskTypeColors, useCrmPipelineSummary, useCrmQuickMetrics, useDeleteLists, useGraphBackgroundStyles, useGraphTheme, useNewKnowledgeMapLayout, useRecentCrmActivity } from '../chunk-F6EFC2MJ.js';
2
- import '../chunk-CXY7FMUM.js';
3
- export { APIErrorAlert, ActivityTimeline, CardHeader, CenteredErrorState, CollapsibleSection, ContextViewer, CustomSelector, DetailCardSkeleton, ElevasisLoader, EmptyState, FeatureUnavailableState, GlowDot, JsonViewer, ListSkeleton, PageNotFound, PageTitleCaption, ResourceCard, StatCard, StatCardSkeleton, StatsCardSkeleton, StatusBadge, TabCountBadge, TimeRangeSelector, TrendIndicator } from '../chunk-SIQ3P4OR.js';
4
- export { StyledMarkdown } from '../chunk-3KMDHCAR.js';
5
- import '../chunk-AKW7KISS.js';
6
- import '../chunk-WF7CONXF.js';
7
- import '../chunk-ZTWA5H77.js';
1
+ export { AbsoluteScheduleForm, ActionModal, ActivityCard, ActivityFeedWidget, ActivityFilters as ActivityFiltersBar, ActivityTable, AgentDefinitionDisplay, AgentExecutionLogs, AgentExecutionTimeline, AgentExecutionVisualizer, AgentIterationEdge, AgentIterationNode, AllTasksPage, ApiKeyDisplayModal, ApiKeyList, ApiKeySettings, BaseEdge, BaseExecutionLogs, BaseExecutionLogsHeader, BaseExecutionLogsStates, BaseNode, Breadcrumbs, BusinessImpactCard, CheckpointGroup, CollapsibleJsonSection, CommandQueueSidebar, CommandQueueSidebarMiddle, CommandQueueSidebarTop, CommandQueueTaskRow, CompanyDetailPage, ConfigCard, ConfirmationInputModal, ConfirmationModal, ContactDetailPage, ContentSections, ContextUsageBadge, ContractDisplay, CostBreakdownCard, CostByModelTable, CostMetricsCard, CreateApiKeyModal, CreateCredentialModal, CreateRoleModal, CreateScheduleModal, CredentialList, CredentialSettings, CrmOverview, CrmSidebar, CrmSidebarMiddle, CrmSidebarTop, CustomModal, DEAL_STAGES, DEFAULT_KANBAN_CONFIG, DealDetailPage, DealKanbanCard, DealsListPage, DeleteScheduleModal, DeploymentDetailModal, DeploymentList, DeploymentSettings, DeploymentStatusBadge, EditApiKeyModal, EmptyVisualizer, ErrorAnalysisCard, ErrorBreakdownTable, ExecutionBreakdownTable, ExecutionErrorSection, ExecutionHealthCard, ExecutionLogsFilters as ExecutionLogsFilterBar, ExecutionLogsTable, ExecutionStats, ExecutionStatusBadge, FilterBar, GraphBackground, GraphContainer, GraphFitViewButton, GraphFitViewHandler, GraphLegend, HealthStatusCard, KanbanBoard, LEAD_GEN_ROUTE_LINKS, LeadGenCompaniesPage, LeadGenContactsPage, LeadGenListDetailPage, LeadGenListsPage, LeadGenOverviewPage, LeadGenRouteShell, LeadGenSidebar, LeadGenSidebarMiddle, LeadGenSidebarTop, LogEntry, LogGroup, MdxRenderer, MembershipStatusBadge, MetricsStrip, MilestoneTimeline, MyTasksPanel, NewKnowledgeMapEdge, NewKnowledgeMapGraph, NewKnowledgeMapNode, NoAccessState, NotificationBell, NotificationItem, NotificationList, NotificationPanel, OAuthConnectModal, OperationsSidebar, OperationsSidebarMiddle, OperationsSidebarTop, OrganizationMembershipsList, PIPELINE_FUNNEL_ORDER, PermissionMatrix, PipelineFunnelWidget, ProjectDetailPage, ProjectsListPage, ProjectsSidebar, ProjectsSidebarMiddle, ProjectsSidebarTop, QuickCreateActions, RecurringScheduleForm, RelativeScheduleForm, ResourceDefinitionSection, ResourceErrorState, ResourceFilter, ResourceHeader, ResourceHealthChart, ResourceHealthPanel, ResourceNotFoundState, RichTextEditor, RoleBadge, RunResourceButton, SAVED_VIEW_PRESETS, SavedViewsPanel, ScheduleCard, ScheduleDetailModal, ScheduleTypeSelector, SessionMemory, SortableHeader, StepConfigForm, TabSection, TableSelectionToolbar, TaskCard, TaskScheduler, TimelineAxis, TimelineBar, TimelineContainer, TimelineRow, ToolsListDisplay, UnifiedWorkflowEdge, UnifiedWorkflowGraph, UnifiedWorkflowNode, UpcomingMilestonesPage, VisualizerContainer, WebhookUrlDisplayModal, WorkflowDefinitionDisplay, WorkflowExecutionLogs, WorkflowExecutionTimeline, ZodFormRenderer, calculateProgress, crmManifest, deliveryManifest, formatStatusLabel, getEnrichmentColor, getExecutionStatusConfig, getGraphBackgroundStyles, getHealthColor, getIcon, getLogLevelConfig, getStatusColor, iconMap, leadGenManifest, mdxComponents, milestoneStatusColors, monitoringManifest, noteTypeColors, operationsManifest, projectStatusColors, settingsManifest, showApiErrorNotification, showAuthError, showErrorNotification, showInfoNotification, showSuccessNotification, showWarningNotification, taskStatusColors, taskTypeColors, useCrmPipelineSummary, useCrmQuickMetrics, useDeleteLists, useGraphBackgroundStyles, useGraphTheme, useNewKnowledgeMapLayout, useRecentCrmActivity } from '../chunk-Q64E2TZY.js';
2
+ import '../chunk-B2DZLPDL.js';
3
+ export { AppErrorBoundary, CrashErrorFallback, ErrorReportCard, buildErrorReport } from '../chunk-SHZT7ULK.js';
8
4
  import '../chunk-AUDNF2Q7.js';
9
5
  import '../chunk-6M6OLGQY.js';
10
6
  import '../chunk-BRXELOHC.js';
11
- import '../chunk-O2Q4VMRN.js';
12
- import '../chunk-LUYVRATI.js';
13
- export { NavigationButton } from '../chunk-NYBEU5TE.js';
14
- import '../chunk-WLOQ4IBG.js';
15
- import '../chunk-57OZ3AEG.js';
7
+ import '../chunk-M7Q4UBRY.js';
8
+ import '../chunk-CXY7FMUM.js';
9
+ import '../chunk-7GQFIWP4.js';
16
10
  import '../chunk-JBWJ6WHZ.js';
17
- export { SEOSidebar, SEOSidebarMiddle, SEOSidebarTop, seoManifest } from '../chunk-GX6XBRRF.js';
18
- import '../chunk-R3VCBZDC.js';
19
- import '../chunk-DT3QYZVU.js';
20
- import '../chunk-2IFYDILW.js';
21
- import '../chunk-Q7DJKLEN.js';
11
+ import '../chunk-ZTWA5H77.js';
12
+ import '../chunk-5EYJ2GIN.js';
13
+ import '../chunk-DA6I5VEY.js';
14
+ import '../chunk-CLDCYJQT.js';
15
+ export { SEOSidebar, SEOSidebarMiddle, SEOSidebarTop, seoManifest } from '../chunk-TYRUKGGD.js';
16
+ import '../chunk-X4WBGKJQ.js';
17
+ import '../chunk-IIMU5YAJ.js';
22
18
  export { Graph_module_css_default as graphStyles } from '../chunk-HENXLGVD.js';
23
19
  export { CONTAINER_CONSTANTS, SHARED_VIZ_CONSTANTS } from '../chunk-7FPLLSHN.js';
24
20
  import '../chunk-RNP5R5I3.js';
25
- import '../chunk-GEFWMU26.js';
21
+ import '../chunk-PGWANFNE.js';
22
+ import '../chunk-7ZWXTH5J.js';
23
+ import '../chunk-6D4LCJ52.js';
24
+ import '../chunk-WF7CONXF.js';
25
+ import '../chunk-WLOQ4IBG.js';
26
+ import '../chunk-H2MEFUQD.js';
27
+ export { APIErrorAlert, ActivityTimeline, CenteredErrorState, CollapsibleSection, ContextViewer, CustomSelector, DetailCardSkeleton, ElevasisLoader, EmptyState, FeatureUnavailableState, GlowDot, JsonViewer, ListSkeleton, PageNotFound, PageTitleCaption, ResourceCard, StatCard, StatCardSkeleton, StatsCardSkeleton, StatusBadge, TabCountBadge, TimeRangeSelector, TrendIndicator } from '../chunk-I53EX4VU.js';
28
+ export { StyledMarkdown } from '../chunk-3KMDHCAR.js';
29
+ export { CardHeader } from '../chunk-S3XR4II4.js';
30
+ import '../chunk-A7IG36LB.js';
31
+ export { NavigationButton } from '../chunk-NYBEU5TE.js';
32
+ import '../chunk-Y3JQBSKQ.js';
33
+ import '../chunk-DT3QYZVU.js';
34
+ import '../chunk-2IFYDILW.js';
35
+ import '../chunk-Q7DJKLEN.js';
36
+ import '../chunk-X66MVMZT.js';
26
37
  import '../chunk-KRWALB24.js';
27
- import '../chunk-VKIZUUPM.js';
38
+ import '../chunk-7YXZFS56.js';
39
+ import '../chunk-4O3VAALW.js';
40
+ import '../chunk-C6BDBZRO.js';
28
41
  import '../chunk-533DUEQY.js';
42
+ import '../chunk-566XWGPP.js';
29
43
  import '../chunk-DD3CCMCZ.js';
30
44
  import '../chunk-2Q2JQSQO.js';
45
+ import '../chunk-6ROXVZ3L.js';
31
46
  import '../chunk-KJ3QUBNU.js';
32
47
  import '../chunk-BRJ3QZ4E.js';
33
48
  import '../chunk-I2KLQ2HA.js';
@@ -1,33 +1,5 @@
1
- export { useBreadcrumbs } from '../../chunk-F6EFC2MJ.js';
2
- import '../../chunk-CXY7FMUM.js';
3
- import '../../chunk-SIQ3P4OR.js';
4
- import '../../chunk-3KMDHCAR.js';
5
- import '../../chunk-AKW7KISS.js';
6
- import '../../chunk-WF7CONXF.js';
7
- import '../../chunk-ZTWA5H77.js';
8
- import '../../chunk-AUDNF2Q7.js';
9
- import '../../chunk-6M6OLGQY.js';
10
- import '../../chunk-BRXELOHC.js';
11
- import '../../chunk-O2Q4VMRN.js';
12
- import '../../chunk-LUYVRATI.js';
13
- import '../../chunk-NYBEU5TE.js';
14
- import '../../chunk-WLOQ4IBG.js';
15
- import '../../chunk-57OZ3AEG.js';
16
- import '../../chunk-JBWJ6WHZ.js';
17
- import '../../chunk-GX6XBRRF.js';
18
- import '../../chunk-R3VCBZDC.js';
19
- import '../../chunk-DT3QYZVU.js';
20
- import '../../chunk-2IFYDILW.js';
1
+ export { useBreadcrumbs } from '../../chunk-M7Q4UBRY.js';
21
2
  import '../../chunk-Q7DJKLEN.js';
22
- import '../../chunk-HENXLGVD.js';
23
- import '../../chunk-7FPLLSHN.js';
24
- import '../../chunk-RNP5R5I3.js';
25
- import '../../chunk-GEFWMU26.js';
26
- import '../../chunk-KRWALB24.js';
27
- import '../../chunk-VKIZUUPM.js';
28
- import '../../chunk-533DUEQY.js';
29
- import '../../chunk-DD3CCMCZ.js';
30
- import '../../chunk-2Q2JQSQO.js';
31
- import '../../chunk-KJ3QUBNU.js';
32
- import '../../chunk-BRJ3QZ4E.js';
3
+ import '../../chunk-C6BDBZRO.js';
4
+ import '../../chunk-566XWGPP.js';
33
5
  import '../../chunk-I2KLQ2HA.js';
@@ -1,5 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
+ import { z } from 'zod';
3
4
 
4
5
  type Json = string | number | boolean | null | {
5
6
  [key: string]: Json | undefined;
@@ -1461,6 +1462,51 @@ type Database = {
1461
1462
  }
1462
1463
  ];
1463
1464
  };
1465
+ deployment_organization_models: {
1466
+ Row: {
1467
+ created_at: string;
1468
+ deployment_id: string;
1469
+ model_hash: string | null;
1470
+ organization_id: string;
1471
+ organization_model: Json;
1472
+ schema_version: string;
1473
+ updated_at: string;
1474
+ };
1475
+ Insert: {
1476
+ created_at?: string;
1477
+ deployment_id: string;
1478
+ model_hash?: string | null;
1479
+ organization_id: string;
1480
+ organization_model: Json;
1481
+ schema_version?: string;
1482
+ updated_at?: string;
1483
+ };
1484
+ Update: {
1485
+ created_at?: string;
1486
+ deployment_id?: string;
1487
+ model_hash?: string | null;
1488
+ organization_id?: string;
1489
+ organization_model?: Json;
1490
+ schema_version?: string;
1491
+ updated_at?: string;
1492
+ };
1493
+ Relationships: [
1494
+ {
1495
+ foreignKeyName: "deployment_organization_models_deployment_id_fkey";
1496
+ columns: ["deployment_id"];
1497
+ isOneToOne: true;
1498
+ referencedRelation: "deployments";
1499
+ referencedColumns: ["id"];
1500
+ },
1501
+ {
1502
+ foreignKeyName: "deployment_organization_models_organization_id_fkey";
1503
+ columns: ["organization_id"];
1504
+ isOneToOne: false;
1505
+ referencedRelation: "organizations";
1506
+ referencedColumns: ["id"];
1507
+ }
1508
+ ];
1509
+ };
1464
1510
  deployments: {
1465
1511
  Row: {
1466
1512
  created_at: string;
@@ -2982,6 +3028,12 @@ type Database = {
2982
3028
  Args: never;
2983
3029
  Returns: boolean;
2984
3030
  };
3031
+ current_user_shares_org_with: {
3032
+ Args: {
3033
+ other_user_id: string;
3034
+ };
3035
+ Returns: boolean;
3036
+ };
2985
3037
  current_user_supabase_id: {
2986
3038
  Args: never;
2987
3039
  Returns: string;
@@ -3021,6 +3073,20 @@ type Database = {
3021
3073
  Args: never;
3022
3074
  Returns: string;
3023
3075
  };
3076
+ has_org_access: {
3077
+ Args: {
3078
+ action?: string;
3079
+ org_id: string;
3080
+ system_path: string;
3081
+ };
3082
+ Returns: boolean;
3083
+ } | {
3084
+ Args: {
3085
+ action?: string;
3086
+ system_path: string;
3087
+ };
3088
+ Returns: boolean;
3089
+ };
3024
3090
  has_org_permission: {
3025
3091
  Args: {
3026
3092
  org_id: string;
@@ -3104,6 +3170,23 @@ type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables
3104
3170
 
3105
3171
  type SupabaseUserProfile = Tables<'users'>;
3106
3172
 
3173
+ declare const AccessKeyInputSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
3174
+ systemPath: z.ZodString;
3175
+ action: z.ZodDefault<z.ZodEnum<{
3176
+ view: "view";
3177
+ manage: "manage";
3178
+ }>>;
3179
+ }, z.core.$strict>]>;
3180
+ type AccessKeyInput = z.input<typeof AccessKeyInputSchema>;
3181
+
3182
+ type AccessRestrictedBy = 'catalog' | 'membership' | 'system-lifecycle' | 'role-permission' | 'diagnostic-allowlist' | null;
3183
+ type AccessReason = 'allowed' | 'platform-admin-bypass' | 'invalid-access-key' | 'unknown-access-key' | 'organization-mismatch' | 'missing-membership' | 'system-not-active' | 'role-permission-denied' | 'diagnostic-key-not-allowed';
3184
+ interface AccessAnswer {
3185
+ allowed: boolean;
3186
+ restrictedBy: AccessRestrictedBy;
3187
+ reason: AccessReason;
3188
+ }
3189
+
3107
3190
  interface InitializationError {
3108
3191
  layer: 'auth' | 'profile' | 'organization';
3109
3192
  message: string;
@@ -3151,108 +3234,23 @@ interface ProtectedRouteProps {
3151
3234
  */
3152
3235
  declare function ProtectedRoute({ children, redirectTo, fallback, errorFallback, waitForOrganization }: ProtectedRouteProps): react_jsx_runtime.JSX.Element;
3153
3236
 
3154
- interface AdminGuardProps {
3155
- children: ReactNode;
3156
- /**
3157
- * Path to redirect non-admin users to.
3158
- * @default '/'
3159
- */
3160
- redirectTo?: string;
3161
- /**
3162
- * Rendered while user readiness is being determined.
3163
- * Defaults to the platform AppShellLoader.
3164
- */
3165
- fallback?: ReactNode;
3166
- }
3167
- /**
3168
- * Route guard component for admin-only pages.
3169
- *
3170
- * Thin wrapper around the shared AdminGuard from the auth module.
3171
- * Passes AppShellLoader as the default loading fallback.
3172
- * Non-admin users are redirected to `redirectTo` (default: '/').
3173
- *
3174
- * Must be nested inside a ProtectedRoute so that userReady is guaranteed
3175
- * to be true when this guard runs.
3176
- *
3177
- * @example
3178
- * ```tsx
3179
- * // In your admin route component
3180
- * export function AdminUsersRoute() {
3181
- * return (
3182
- * <AdminGuard>
3183
- * <AdminUsers />
3184
- * </AdminGuard>
3185
- * )
3186
- * }
3187
- * ```
3188
- */
3189
- declare function AdminGuard({ children, redirectTo, fallback }: AdminGuardProps): react_jsx_runtime.JSX.Element;
3190
-
3191
- type RestrictionSource = 'membership' | null;
3192
- interface FeatureAccessResult {
3193
- allowed: boolean;
3194
- restrictedBy: RestrictionSource;
3195
- }
3196
-
3197
- type UseSystemAccessHook = () => {
3198
- checkFeature: (systemKey: string) => FeatureAccessResult;
3237
+ interface UseAccessResult extends AccessAnswer {
3199
3238
  isReady: boolean;
3200
- };
3201
- interface SystemGuardProps {
3202
- systemKey: string;
3203
- children: React.ReactNode;
3204
- deniedMessage?: string;
3205
- /**
3206
- * The `useFeatureAccess` hook instance to use for access resolution.
3207
- * Must be created via `createFeatureAccessHook` from `@repo/ui/hooks`.
3208
- */
3209
- useFeatureAccess: UseSystemAccessHook;
3239
+ isPlatformAdmin: boolean;
3240
+ permissions: readonly string[];
3210
3241
  }
3211
- interface SurfaceGuardProps {
3212
- surfaceKey: string;
3213
- children: React.ReactNode;
3214
- deniedMessage?: string;
3215
- /**
3216
- * The `useFeatureAccess` hook instance to use for access resolution.
3217
- * Must be created via `createFeatureAccessHook` from `@repo/ui/hooks`.
3218
- */
3219
- useFeatureAccess: UseSystemAccessHook;
3242
+
3243
+ interface AccessGuardProps {
3244
+ accessKey: AccessKeyInput;
3245
+ children: ReactNode;
3246
+ fallback?: ReactNode | ((answer: UseAccessResult) => ReactNode);
3247
+ loadingFallback?: ReactNode;
3248
+ redirectTo?: string | null;
3220
3249
  }
3221
3250
  /**
3222
- * Route guard that restricts access to a named system.
3223
- *
3224
- * Reads system access from the provided `useFeatureAccess` hook instance
3225
- * (created via `createFeatureAccessHook` from `@repo/ui/hooks`). When the
3226
- * system is not allowed, shows a Mantine notification and redirects to '/'.
3227
- *
3228
- * The `restrictedBy === 'membership'` branch surfaces a personal access
3229
- * denial message, while other restriction sources surface an org-level message.
3230
- *
3231
- * @example
3232
- * ```tsx
3233
- * // In your app, create the hook once:
3234
- * export const useFeatureAccess = createFeatureAccessHook({ useInitialization, useOrganization })
3235
- *
3236
- * // Then use the guard:
3237
- * function MonitoringLayout() {
3238
- * return (
3239
- * <ProtectedRoute>
3240
- * <SystemGuard systemKey="monitoring" useFeatureAccess={useFeatureAccess}>
3241
- * <Outlet />
3242
- * </SystemGuard>
3243
- * </ProtectedRoute>
3244
- * )
3245
- * }
3246
- * ```
3247
- */
3248
- declare function SystemGuard({ systemKey, children, deniedMessage, useFeatureAccess }: SystemGuardProps): react_jsx_runtime.JSX.Element | null;
3249
- /**
3250
- * Route guard for navigation-only app surfaces.
3251
- *
3252
- * Use this for shell areas such as Operations, Monitoring, Knowledge, Settings, and Admin
3253
- * when they are not semantic Organization Model systems.
3251
+ * Unified route/UI guard for the shared Access Model.
3254
3252
  */
3255
- declare function SurfaceGuard({ surfaceKey, children, deniedMessage, useFeatureAccess }: SurfaceGuardProps): react_jsx_runtime.JSX.Element | null;
3253
+ declare function AccessGuard({ accessKey, children, fallback, loadingFallback, redirectTo }: AccessGuardProps): react_jsx_runtime.JSX.Element;
3256
3254
 
3257
3255
  type ApiRequestFn = <T>(endpoint: string, options?: RequestInit) => Promise<T>;
3258
3256
  interface UseUserProfileOptions {
@@ -3290,5 +3288,5 @@ interface UseUserProfileReturn {
3290
3288
  */
3291
3289
  declare const useUserProfile: (options?: UseUserProfileOptions) => UseUserProfileReturn;
3292
3290
 
3293
- export { AdminGuard, ProtectedRoute, SurfaceGuard, SystemGuard, useUserProfile };
3294
- export type { AdminGuardProps, ProtectedRouteProps, SurfaceGuardProps, SystemGuardProps, UseUserProfileReturn };
3291
+ export { AccessGuard, ProtectedRoute, useUserProfile };
3292
+ export type { AccessGuardProps, ProtectedRouteProps, UseUserProfileReturn };