@elevasis/ui 2.36.0 → 2.37.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 (92) 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 +20 -0
  4. package/dist/app/index.js +21 -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-5CTJ7TW2.js +111 -0
  9. package/dist/chunk-5EYJ2GIN.js +122 -0
  10. package/dist/{chunk-K4UZU3TU.js → chunk-6NREL3KL.js} +1 -1
  11. package/dist/chunk-6ROXVZ3L.js +9 -0
  12. package/dist/{chunk-YYX7OPZQ.js → chunk-73EWE2EW.js} +1 -1
  13. package/dist/{chunk-SIQ3P4OR.js → chunk-7GQFIWP4.js} +8 -756
  14. package/dist/chunk-A7IG36LB.js +215 -0
  15. package/dist/chunk-CLDCYJQT.js +1 -0
  16. package/dist/{chunk-AKW7KISS.js → chunk-CWYQRM5T.js} +2 -38
  17. package/dist/{chunk-LUYVRATI.js → chunk-DA6I5VEY.js} +5 -213
  18. package/dist/chunk-I53EX4VU.js +734 -0
  19. package/dist/chunk-IIMU5YAJ.js +53 -0
  20. package/dist/{chunk-VKIZUUPM.js → chunk-JPVZRZ3X.js} +31 -14
  21. package/dist/chunk-JXVNHVK7.js +79 -0
  22. package/dist/chunk-JZ2WID2G.js +337 -0
  23. package/dist/chunk-LCJQ6OWC.js +348 -0
  24. package/dist/chunk-LNC6PZAE.js +85 -0
  25. package/dist/{chunk-O2Q4VMRN.js → chunk-NWMPBG4U.js} +1 -1
  26. package/dist/chunk-NYNOMAAS.js +422 -0
  27. package/dist/chunk-S3KBYQTI.js +39 -0
  28. package/dist/chunk-S3XR4II4.js +30 -0
  29. package/dist/chunk-SHZT7ULK.js +425 -0
  30. package/dist/{chunk-F6EFC2MJ.js → chunk-T3NI7DOA.js} +291 -2044
  31. package/dist/{chunk-GX6XBRRF.js → chunk-TYRUKGGD.js} +2 -1
  32. package/dist/{chunk-R3VCBZDC.js → chunk-X4WBGKJQ.js} +3 -50
  33. package/dist/{chunk-GEFWMU26.js → chunk-X66MVMZT.js} +1 -9
  34. package/dist/{chunk-57OZ3AEG.js → chunk-Y3JQBSKQ.js} +1 -1
  35. package/dist/components/index.d.ts +29 -42
  36. package/dist/components/index.js +33 -19
  37. package/dist/components/navigation/index.js +3 -31
  38. package/dist/features/auth/index.d.ts +52 -99
  39. package/dist/features/auth/index.js +36 -99
  40. package/dist/features/clients/index.js +33 -19
  41. package/dist/features/crm/index.d.ts +20 -0
  42. package/dist/features/crm/index.js +33 -19
  43. package/dist/features/dashboard/index.js +33 -19
  44. package/dist/features/delivery/index.d.ts +20 -0
  45. package/dist/features/delivery/index.js +33 -19
  46. package/dist/features/knowledge/index.js +6 -30
  47. package/dist/features/lead-gen/index.d.ts +1088 -1
  48. package/dist/features/lead-gen/index.js +33 -19
  49. package/dist/features/monitoring/index.js +33 -19
  50. package/dist/features/monitoring/requests/index.js +33 -19
  51. package/dist/features/notes/index.d.ts +72 -0
  52. package/dist/features/notes/index.js +621 -0
  53. package/dist/features/operations/index.js +33 -19
  54. package/dist/features/right-panel-host/index.d.ts +214 -0
  55. package/dist/features/right-panel-host/index.js +640 -0
  56. package/dist/features/seo/index.js +3 -2
  57. package/dist/features/settings/index.d.ts +23 -35
  58. package/dist/features/settings/index.js +33 -19
  59. package/dist/hooks/access/index.d.ts +90 -0
  60. package/dist/hooks/access/index.js +10 -0
  61. package/dist/hooks/delivery/index.d.ts +20 -0
  62. package/dist/hooks/delivery/index.js +33 -19
  63. package/dist/hooks/index.d.ts +1599 -1651
  64. package/dist/hooks/index.js +33 -19
  65. package/dist/hooks/published.d.ts +1599 -1651
  66. package/dist/hooks/published.js +33 -19
  67. package/dist/hooks/user-notes/index.d.ts +57 -0
  68. package/dist/hooks/user-notes/index.js +3 -0
  69. package/dist/index.d.ts +239 -275
  70. package/dist/index.js +34 -20
  71. package/dist/initialization/index.d.ts +20 -19
  72. package/dist/knowledge/index.js +10 -7
  73. package/dist/layout/index.js +5 -3
  74. package/dist/organization/index.d.ts +0 -19
  75. package/dist/organization/index.js +33 -19
  76. package/dist/profile/index.d.ts +20 -0
  77. package/dist/provider/index.css +0 -384
  78. package/dist/provider/index.d.ts +20 -0
  79. package/dist/provider/index.js +15 -21
  80. package/dist/provider/published.css +0 -523
  81. package/dist/provider/published.d.ts +20 -0
  82. package/dist/provider/published.js +11 -21
  83. package/dist/supabase/index.d.ts +40 -0
  84. package/dist/test-utils/index.d.ts +2 -21
  85. package/dist/test-utils/index.js +5 -18
  86. package/dist/theme/index.js +2 -1
  87. package/dist/types/index.d.ts +70 -59
  88. package/dist/utils/index.js +2 -1
  89. package/package.json +19 -3
  90. package/src/auth/README.md +6 -6
  91. package/dist/components/navigation/index.css +0 -649
  92. package/dist/features/knowledge/index.css +0 -649
@@ -1,4 +1,5 @@
1
- import { SubshellSidebarSection, SubshellNavItem } from './chunk-R3VCBZDC.js';
1
+ import { SubshellNavItem } from './chunk-X4WBGKJQ.js';
2
+ import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
2
3
  import { useRouterContext } from './chunk-Q7DJKLEN.js';
3
4
  import { Stack } from '@mantine/core';
4
5
  import { IconSearch, IconChartBar, IconTrendingUp } from '@tabler/icons-react';
@@ -1,5 +1,5 @@
1
- import { sidebarIconSize, sidebarIconStroke, sidebarIconInnerSize, subshellNavItemIconSize } from './chunk-DT3QYZVU.js';
2
- import { UnstyledButton, Box, Group, ThemeIcon, Stack, Text } from '@mantine/core';
1
+ import { subshellNavItemIconSize } from './chunk-DT3QYZVU.js';
2
+ import { UnstyledButton, Stack, Group, Text } from '@mantine/core';
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
4
 
5
5
  var activeColor = "var(--color-primary)";
@@ -134,52 +134,5 @@ var SubshellNavItem = ({
134
134
  }
135
135
  );
136
136
  };
137
- var SubshellSidebarSection = ({
138
- icon: Icon,
139
- label,
140
- rightSection,
141
- withTopBorder = false
142
- }) => {
143
- return /* @__PURE__ */ jsx(
144
- Box,
145
- {
146
- p: "sm",
147
- style: {
148
- borderTop: withTopBorder ? "1px solid var(--color-border)" : void 0,
149
- borderBottom: "1px solid var(--color-border)"
150
- },
151
- children: /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
152
- /* @__PURE__ */ jsx(
153
- ThemeIcon,
154
- {
155
- variant: "light",
156
- size: sidebarIconSize,
157
- style: {
158
- backgroundColor: "var(--color-surface)",
159
- color: "var(--color-primary)",
160
- flexShrink: 0
161
- },
162
- children: /* @__PURE__ */ jsx(Icon, { size: sidebarIconInnerSize, stroke: sidebarIconStroke })
163
- }
164
- ),
165
- /* @__PURE__ */ jsx(
166
- Box,
167
- {
168
- c: "var(--color-text)",
169
- style: {
170
- fontFamily: "var(--elevasis-font-family-subtitle)",
171
- flex: 1,
172
- fontSize: "var(--mantine-font-size-md)",
173
- fontWeight: 500,
174
- lineHeight: 1.2
175
- },
176
- children: label
177
- }
178
- ),
179
- rightSection
180
- ] })
181
- }
182
- );
183
- };
184
137
 
185
- export { SubshellNavItem, SubshellSidebarSection };
138
+ export { SubshellNavItem };
@@ -282,14 +282,6 @@ function getResourceIcon(type) {
282
282
  // src/utils/constants/api.ts
283
283
  var API_URL = import.meta.env.PROD ? "https://api.elevasis.io" : "http://localhost:5170";
284
284
 
285
- // src/utils/constants/cache.ts
286
- var STALE_TIME_MONITORING = 3e4;
287
- var STALE_TIME_ADMIN = 6e4;
288
- var STALE_TIME_DEFAULT = 3e5;
289
- var GC_TIME_SHORT = 3e5;
290
- var GC_TIME_MEDIUM = 6e5;
291
- var GC_TIME_LONG = 18e5;
292
-
293
285
  // src/utils/constants/polling.ts
294
286
  var REFETCH_INTERVAL_DASHBOARD = 6e4;
295
287
  var REFETCH_INTERVAL_REALTIME = 3e4;
@@ -378,4 +370,4 @@ function setupBrowserMocks() {
378
370
  setupResizeObserver();
379
371
  }
380
372
 
381
- export { APIClientError, API_URL, CredentialNameSchema, DEBOUNCE_FILTER, DEBOUNCE_SLIDER, GC_TIME_LONG, GC_TIME_MEDIUM, GC_TIME_SHORT, LIMIT_ACTIVITY_FEED, NonEmptyStringSchema, OAUTH_FLOW_TIMEOUT, OriginResourceTypeSchema, PAGE_SIZE_DEFAULT, REFETCH_INTERVAL_DASHBOARD, REFETCH_INTERVAL_REALTIME, REFETCH_INTERVAL_RUNNING, REFETCH_INTERVAL_RUNNING_FAST, ResourceTypeSchema, SSE_CLOSE_GRACE_PERIOD, SSE_TOKEN_REFRESH_DELAY, STALE_TIME_ADMIN, STALE_TIME_DEFAULT, STALE_TIME_MONITORING, UuidSchema, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, debounce, formatBucketTime, formatChartAxisDate, formatDate, formatDateTime, formatErrorMessage, formatRelativeTime, formatTimeAgo, getErrorInfo, getErrorTitle, getResourceColor, getResourceIcon, getTimeRangeDates, getTimeRangeLabel, isAPIClientError, restoreConsole, setupBrowserMocks, suppressKnownWarnings, validateEmail };
373
+ export { APIClientError, API_URL, CredentialNameSchema, DEBOUNCE_FILTER, DEBOUNCE_SLIDER, LIMIT_ACTIVITY_FEED, NonEmptyStringSchema, OAUTH_FLOW_TIMEOUT, OriginResourceTypeSchema, PAGE_SIZE_DEFAULT, REFETCH_INTERVAL_DASHBOARD, REFETCH_INTERVAL_REALTIME, REFETCH_INTERVAL_RUNNING, REFETCH_INTERVAL_RUNNING_FAST, ResourceTypeSchema, SSE_CLOSE_GRACE_PERIOD, SSE_TOKEN_REFRESH_DELAY, UuidSchema, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, debounce, formatBucketTime, formatChartAxisDate, formatDate, formatDateTime, formatErrorMessage, formatRelativeTime, formatTimeAgo, getErrorInfo, getErrorTitle, getResourceColor, getResourceIcon, getTimeRangeDates, getTimeRangeLabel, isAPIClientError, restoreConsole, setupBrowserMocks, suppressKnownWarnings, validateEmail };
@@ -1,4 +1,4 @@
1
- import { APIClientError } from './chunk-GEFWMU26.js';
1
+ import { APIClientError } from './chunk-X66MVMZT.js';
2
2
  import { OrganizationContext } from './chunk-DD3CCMCZ.js';
3
3
  import { createContext, useContext, useMemo, useCallback } from 'react';
4
4
  import { jsx } from 'react/jsx-runtime';
@@ -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
  */
@@ -3421,6 +3428,12 @@ type Database = {
3421
3428
  Args: never;
3422
3429
  Returns: boolean;
3423
3430
  };
3431
+ current_user_shares_org_with: {
3432
+ Args: {
3433
+ other_user_id: string;
3434
+ };
3435
+ Returns: boolean;
3436
+ };
3424
3437
  current_user_supabase_id: {
3425
3438
  Args: never;
3426
3439
  Returns: string;
@@ -3460,6 +3473,20 @@ type Database = {
3460
3473
  Args: never;
3461
3474
  Returns: string;
3462
3475
  };
3476
+ has_org_access: {
3477
+ Args: {
3478
+ action?: string;
3479
+ org_id: string;
3480
+ system_path: string;
3481
+ };
3482
+ Returns: boolean;
3483
+ } | {
3484
+ Args: {
3485
+ action?: string;
3486
+ system_path: string;
3487
+ };
3488
+ Returns: boolean;
3489
+ };
3463
3490
  has_org_permission: {
3464
3491
  Args: {
3465
3492
  org_id: string;
@@ -4141,24 +4168,6 @@ declare const GetRecentActivityResponseSchema: z.ZodObject<{
4141
4168
  }, z.core.$strip>;
4142
4169
  type GetRecentActivityResponse = z.infer<typeof GetRecentActivityResponseSchema>;
4143
4170
 
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
4171
  /**
4163
4172
  * Memberships Domain - Zod Validation Schemas
4164
4173
  *
@@ -4218,7 +4227,6 @@ interface MembershipWithDetails extends OrganizationMembership {
4218
4227
  metadata?: Record<string, unknown>;
4219
4228
  config?: Record<string, unknown>;
4220
4229
  };
4221
- config?: MembershipFeatureConfig;
4222
4230
  }
4223
4231
 
4224
4232
  interface OAuthToken extends Record<string, unknown> {
@@ -4534,7 +4542,7 @@ interface Activity {
4534
4542
  * Source of truth for the permission keys used by:
4535
4543
  * - RLS policies in Supabase (via has_org_permission(org_id, key))
4536
4544
  * - API middleware (via requireOrganizationPermission(key))
4537
- * - UI hooks (via useOrganizationPermissions().hasPermission(key))
4545
+ * - UI access checks (via useAccess() permission-backed AccessKeys)
4538
4546
  *
4539
4547
  * The DB table `org_rol_permissions` mirrors this constant. There is no
4540
4548
  * runtime reconciler; parity is enforced two ways:
@@ -4616,20 +4624,6 @@ declare const ListCredentialsResponseSchema: z.ZodObject<{
4616
4624
  /** API response type for a single credential list item */
4617
4625
  type CredentialListItem = z.infer<typeof ListCredentialsResponseSchema>['credentials'][number];
4618
4626
 
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
4627
  type PermissionRow = PermissionDescriptor;
4634
4628
  type Props = {
4635
4629
  catalog: PermissionRow[];
@@ -6689,13 +6683,6 @@ interface DeploymentStatusBadgeProps {
6689
6683
  }
6690
6684
  declare function DeploymentStatusBadge({ status }: DeploymentStatusBadgeProps): react_jsx_runtime.JSX.Element;
6691
6685
 
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
6686
  interface MembershipStatusBadgeProps {
6700
6687
  status: MembershipStatus;
6701
6688
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
@@ -7087,5 +7074,5 @@ declare const OperationsSidebarMiddle: () => react_jsx_runtime.JSX.Element;
7087
7074
 
7088
7075
  declare const operationsManifest: SystemModule;
7089
7076
 
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 };
7077
+ 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
7078
  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,47 @@
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-T3NI7DOA.js';
2
+ import '../chunk-S3KBYQTI.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-LNC6PZAE.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-5CTJ7TW2.js';
22
+ import '../chunk-CWYQRM5T.js';
23
+ import '../chunk-WF7CONXF.js';
24
+ import '../chunk-WLOQ4IBG.js';
25
+ import '../chunk-JZ2WID2G.js';
26
+ 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';
27
+ export { StyledMarkdown } from '../chunk-3KMDHCAR.js';
28
+ export { CardHeader } from '../chunk-S3XR4II4.js';
29
+ import '../chunk-A7IG36LB.js';
30
+ export { NavigationButton } from '../chunk-NYBEU5TE.js';
31
+ import '../chunk-Y3JQBSKQ.js';
32
+ import '../chunk-DT3QYZVU.js';
33
+ import '../chunk-2IFYDILW.js';
34
+ import '../chunk-Q7DJKLEN.js';
35
+ import '../chunk-X66MVMZT.js';
26
36
  import '../chunk-KRWALB24.js';
27
- import '../chunk-VKIZUUPM.js';
37
+ import '../chunk-JPVZRZ3X.js';
38
+ import '../chunk-LCJQ6OWC.js';
39
+ import '../chunk-NYNOMAAS.js';
28
40
  import '../chunk-533DUEQY.js';
41
+ import '../chunk-NWMPBG4U.js';
29
42
  import '../chunk-DD3CCMCZ.js';
30
43
  import '../chunk-2Q2JQSQO.js';
44
+ import '../chunk-6ROXVZ3L.js';
31
45
  import '../chunk-KJ3QUBNU.js';
32
46
  import '../chunk-BRJ3QZ4E.js';
33
47
  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-LNC6PZAE.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-NYNOMAAS.js';
4
+ import '../../chunk-NWMPBG4U.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;
@@ -2982,6 +2983,12 @@ type Database = {
2982
2983
  Args: never;
2983
2984
  Returns: boolean;
2984
2985
  };
2986
+ current_user_shares_org_with: {
2987
+ Args: {
2988
+ other_user_id: string;
2989
+ };
2990
+ Returns: boolean;
2991
+ };
2985
2992
  current_user_supabase_id: {
2986
2993
  Args: never;
2987
2994
  Returns: string;
@@ -3021,6 +3028,20 @@ type Database = {
3021
3028
  Args: never;
3022
3029
  Returns: string;
3023
3030
  };
3031
+ has_org_access: {
3032
+ Args: {
3033
+ action?: string;
3034
+ org_id: string;
3035
+ system_path: string;
3036
+ };
3037
+ Returns: boolean;
3038
+ } | {
3039
+ Args: {
3040
+ action?: string;
3041
+ system_path: string;
3042
+ };
3043
+ Returns: boolean;
3044
+ };
3024
3045
  has_org_permission: {
3025
3046
  Args: {
3026
3047
  org_id: string;
@@ -3104,6 +3125,23 @@ type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables
3104
3125
 
3105
3126
  type SupabaseUserProfile = Tables<'users'>;
3106
3127
 
3128
+ declare const AccessKeyInputSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
3129
+ systemPath: z.ZodString;
3130
+ action: z.ZodDefault<z.ZodEnum<{
3131
+ view: "view";
3132
+ manage: "manage";
3133
+ }>>;
3134
+ }, z.core.$strict>]>;
3135
+ type AccessKeyInput = z.input<typeof AccessKeyInputSchema>;
3136
+
3137
+ type AccessRestrictedBy = 'catalog' | 'membership' | 'system-lifecycle' | 'role-permission' | 'diagnostic-allowlist' | null;
3138
+ 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';
3139
+ interface AccessAnswer {
3140
+ allowed: boolean;
3141
+ restrictedBy: AccessRestrictedBy;
3142
+ reason: AccessReason;
3143
+ }
3144
+
3107
3145
  interface InitializationError {
3108
3146
  layer: 'auth' | 'profile' | 'organization';
3109
3147
  message: string;
@@ -3151,108 +3189,23 @@ interface ProtectedRouteProps {
3151
3189
  */
3152
3190
  declare function ProtectedRoute({ children, redirectTo, fallback, errorFallback, waitForOrganization }: ProtectedRouteProps): react_jsx_runtime.JSX.Element;
3153
3191
 
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;
3192
+ interface UseAccessResult extends AccessAnswer {
3199
3193
  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;
3194
+ isPlatformAdmin: boolean;
3195
+ permissions: readonly string[];
3210
3196
  }
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;
3197
+
3198
+ interface AccessGuardProps {
3199
+ accessKey: AccessKeyInput;
3200
+ children: ReactNode;
3201
+ fallback?: ReactNode | ((answer: UseAccessResult) => ReactNode);
3202
+ loadingFallback?: ReactNode;
3203
+ redirectTo?: string | null;
3220
3204
  }
3221
3205
  /**
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.
3206
+ * Unified route/UI guard for the shared Access Model.
3254
3207
  */
3255
- declare function SurfaceGuard({ surfaceKey, children, deniedMessage, useFeatureAccess }: SurfaceGuardProps): react_jsx_runtime.JSX.Element | null;
3208
+ declare function AccessGuard({ accessKey, children, fallback, loadingFallback, redirectTo }: AccessGuardProps): react_jsx_runtime.JSX.Element;
3256
3209
 
3257
3210
  type ApiRequestFn = <T>(endpoint: string, options?: RequestInit) => Promise<T>;
3258
3211
  interface UseUserProfileOptions {
@@ -3290,5 +3243,5 @@ interface UseUserProfileReturn {
3290
3243
  */
3291
3244
  declare const useUserProfile: (options?: UseUserProfileOptions) => UseUserProfileReturn;
3292
3245
 
3293
- export { AdminGuard, ProtectedRoute, SurfaceGuard, SystemGuard, useUserProfile };
3294
- export type { AdminGuardProps, ProtectedRouteProps, SurfaceGuardProps, SystemGuardProps, UseUserProfileReturn };
3246
+ export { AccessGuard, ProtectedRoute, useUserProfile };
3247
+ export type { AccessGuardProps, ProtectedRouteProps, UseUserProfileReturn };