@elevasis/ui 2.73.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 (97) hide show
  1. package/dist/api/index.js +3 -3
  2. package/dist/app/index.d.ts +58 -0
  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-ETN3TTRT.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-SWKAH2YM.js → chunk-4MXNHJTA.js} +63 -30
  13. package/dist/{chunk-LZT2H2MA.js → chunk-5A6KCFS5.js} +36 -43
  14. package/dist/{chunk-OCVSPAKM.js → chunk-6JN2TLV2.js} +1150 -4346
  15. package/dist/{chunk-JYBJMVNY.js → chunk-7ARBBELS.js} +1 -1
  16. package/dist/{chunk-AJOVWB47.js → chunk-7RJ7P6S6.js} +6 -3
  17. package/dist/chunk-ARAFQBNI.js +515 -0
  18. package/dist/{chunk-Z4ICFQXG.js → chunk-BA3AZJUR.js} +1 -1
  19. package/dist/chunk-BRTGCFBH.js +305 -0
  20. package/dist/{chunk-IGBPWD6S.js → chunk-CQPULKKL.js} +5 -3
  21. package/dist/chunk-CRA7WQZH.js +49 -0
  22. package/dist/{chunk-U2H3TIHD.js → chunk-DCQKTDIG.js} +2 -52
  23. package/dist/{chunk-3TS5U5BL.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-CJ2232PQ.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-LEPYXLJ2.js → chunk-LN4UW6S4.js} +1 -1
  31. package/dist/chunk-N6K2Q5BM.js +393 -0
  32. package/dist/{chunk-NHNTX6ZL.js → chunk-O32UQ26A.js} +3 -2
  33. package/dist/{chunk-M7WWRZ5Z.js → chunk-QFGNRKIE.js} +1 -78
  34. package/dist/{chunk-IBCEAVB2.js → chunk-R5UGIFYU.js} +41 -5
  35. package/dist/{chunk-5B2ZFO44.js → chunk-RFNJ2PTO.js} +1 -1
  36. package/dist/chunk-VM2OWOXL.js +24 -0
  37. package/dist/{chunk-ZDKPHFTH.js → chunk-W2QRBQQA.js} +5 -3
  38. package/dist/chunk-WDBNW44Z.js +49 -0
  39. package/dist/{chunk-4CW2C5BD.js → chunk-WZU3MCKI.js} +1 -1
  40. package/dist/chunk-YQQ5GRUR.js +21 -0
  41. package/dist/{chunk-PQ4B62HH.js → chunk-ZFA56VSR.js} +2 -2
  42. package/dist/{chunk-NI37YNRP.js → chunk-ZWI62BQ6.js} +7 -4
  43. package/dist/chunk-ZYNVCWDZ.js +286 -0
  44. package/dist/components/index.d.ts +187 -2
  45. package/dist/components/index.js +44 -34
  46. package/dist/components/navigation/index.js +6 -7
  47. package/dist/features/auth/index.d.ts +78 -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 +226 -5
  51. package/dist/features/content/index.js +263 -15
  52. package/dist/features/crm/index.d.ts +58 -0
  53. package/dist/features/crm/index.js +10 -8
  54. package/dist/features/dashboard/index.js +9 -8
  55. package/dist/features/delivery/index.d.ts +58 -0
  56. package/dist/features/delivery/index.js +23 -7
  57. package/dist/features/knowledge/index.js +5 -6
  58. package/dist/features/lead-gen/index.d.ts +9 -15
  59. package/dist/features/lead-gen/index.js +12 -8
  60. package/dist/features/monitoring/index.js +11 -9
  61. package/dist/features/monitoring/requests/index.js +8 -7
  62. package/dist/features/operations/index.js +15 -11
  63. package/dist/features/public-agent-chat/index.js +3 -1
  64. package/dist/features/settings/index.d.ts +58 -0
  65. package/dist/features/settings/index.js +9 -8
  66. package/dist/hooks/access/index.js +5 -6
  67. package/dist/hooks/delivery/index.d.ts +58 -0
  68. package/dist/hooks/delivery/index.js +3 -2
  69. package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +1 -1
  70. package/dist/hooks/published.d.ts +175 -3
  71. package/dist/hooks/published.js +22 -6
  72. package/dist/initialization/index.d.ts +58 -0
  73. package/dist/knowledge/index.js +167 -11
  74. package/dist/{knowledge-search-index-RZLIVWPJ.js → knowledge-search-index-6GQK55IQ.js} +1 -1
  75. package/dist/layout/index.js +8 -9
  76. package/dist/profile/index.d.ts +58 -0
  77. package/dist/provider/index.d.ts +77 -1
  78. package/dist/provider/index.js +5 -6
  79. package/dist/provider/published.d.ts +105 -1
  80. package/dist/provider/published.js +5 -6
  81. package/dist/test-utils/index.d.ts +16 -5
  82. package/dist/test-utils/index.js +17 -18
  83. package/dist/types/index.d.ts +59 -1
  84. package/dist/utils/index.d.ts +83 -3
  85. package/dist/utils/index.js +1 -1
  86. package/package.json +6 -5
  87. package/dist/chunk-6M6OLGQY.js +0 -36
  88. package/dist/chunk-MKH2KOAO.js +0 -39
  89. package/dist/hooks/index.css +0 -659
  90. package/dist/hooks/index.d.ts +0 -14073
  91. package/dist/hooks/index.js +0 -27
  92. package/dist/supabase/index.d.ts +0 -7118
  93. package/dist/supabase/index.js +0 -3
  94. package/dist/typeform/index.d.ts +0 -462
  95. package/dist/typeform/index.js +0 -2051
  96. package/dist/typeform/schemas.d.ts +0 -67
  97. package/dist/typeform/schemas.js +0 -2
@@ -1,18 +1,17 @@
1
- export { AppShellContainer, AppShellContentContainer, AppShellRightSideContainer, AppShellRightSideOuterContainer, AppTopbarAdjusterWrapper, CollapsibleSidebarGroup, CyberParticles, LinksGroup, Sidebar, SidebarContext, SidebarProvider, SubshellNavList, Topbar, TopbarActions, TopbarContainer, Vignette, subsidebarWidth, useSidebar, useSidebarCollapse } from '../chunk-CJ2232PQ.js';
2
- export { SubshellLoader } from '../chunk-Z4ICFQXG.js';
3
- export { AppShellCenteredContainer, AppShellError, AppShellLoader } from '../chunk-3TS5U5BL.js';
1
+ export { AppShellContainer, AppShellContentContainer, AppShellRightSideContainer, AppShellRightSideOuterContainer, AppTopbarAdjusterWrapper, CollapsibleSidebarGroup, CyberParticles, LinksGroup, Sidebar, SidebarContext, SidebarProvider, SubshellNavList, Topbar, TopbarActions, TopbarContainer, Vignette, subsidebarWidth, useSidebar, useSidebarCollapse } from '../chunk-GO4XJ5D4.js';
2
+ export { SubshellLoader } from '../chunk-BA3AZJUR.js';
3
+ export { AppShellCenteredContainer, AppShellError, AppShellLoader } from '../chunk-E6YGA5WH.js';
4
4
  export { PageContainer } from '../chunk-BZZCNLT6.js';
5
- export { SubshellContainer, SubshellContentContainer, SubshellRightSideContainer, SubshellSidebar, SubshellSidebarLoader } from '../chunk-OCVSPAKM.js';
5
+ export { SubshellContainer, SubshellContentContainer, SubshellRightSideContainer, SubshellSidebar, SubshellSidebarLoader } from '../chunk-6JN2TLV2.js';
6
6
  import '../chunk-R6NMRXNO.js';
7
7
  export { AmbientBloomGrid, AppBackground, CyberBackground, FilmGrain, FloatingMotes, FloatingOrbs, PerspectiveGrid, RadiantGlow, WaveBackground } from '../chunk-RBGVNPA6.js';
8
- import '../chunk-MKH2KOAO.js';
9
- import '../chunk-NHNTX6ZL.js';
8
+ import '../chunk-O32UQ26A.js';
10
9
  import '../chunk-L7BZZ4SI.js';
11
- import '../chunk-U2H3TIHD.js';
10
+ import '../chunk-HYQOGRWG.js';
12
11
  export { SubshellNavItem, SubshellSidebarSection, sidebarBottomSectionCollapsedHeight, sidebarBottomSectionHeight, sidebarCollapsedWidth, sidebarGroupChevronSize, sidebarHoverDelay, sidebarIconInnerSize, sidebarIconSize, sidebarIconStroke, sidebarItemGap, sidebarItemHeight, sidebarItemPadding, sidebarSectionPadding, sidebarSubLinkIndent, sidebarSubLinkPaddingX, sidebarSubLinkPaddingY, sidebarToggleIconSize, sidebarTransitionDuration, sidebarWidth, subshellNavItemIconSize, topbarHeight } from '../chunk-MISHPEJX.js';
13
12
  import '../chunk-62GVNH5U.js';
14
13
  import '../chunk-P45GQ3ZW.js';
15
- import '../chunk-M7WWRZ5Z.js';
14
+ import '../chunk-2GIJBHZT.js';
16
15
  import '../chunk-3KMDHCAR.js';
17
16
  import '../chunk-2IFYDILW.js';
18
17
  import '../chunk-BLXJEIQS.js';
@@ -20,7 +19,7 @@ import '../chunk-UD657ICS.js';
20
19
  import '../chunk-DD3CCMCZ.js';
21
20
  import '../chunk-RNP5R5I3.js';
22
21
  import '../chunk-RT4KRGZT.js';
23
- import '../chunk-IBCEAVB2.js';
22
+ import '../chunk-R5UGIFYU.js';
24
23
  import '../chunk-Y6I3IC45.js';
25
24
  import '../chunk-6SSQGWK7.js';
26
25
  import '../chunk-BI5VDO2K.js';
@@ -1455,6 +1455,64 @@ type Database = {
1455
1455
  }
1456
1456
  ];
1457
1457
  };
1458
+ content_distribution_metrics: {
1459
+ Row: {
1460
+ captured_at: string;
1461
+ created_at: string;
1462
+ distribution_id: string;
1463
+ id: string;
1464
+ metrics: Json;
1465
+ organization_id: string;
1466
+ raw: Json;
1467
+ source: string;
1468
+ source_execution_id: string | null;
1469
+ };
1470
+ Insert: {
1471
+ captured_at?: string;
1472
+ created_at?: string;
1473
+ distribution_id: string;
1474
+ id?: string;
1475
+ metrics?: Json;
1476
+ organization_id: string;
1477
+ raw?: Json;
1478
+ source: string;
1479
+ source_execution_id?: string | null;
1480
+ };
1481
+ Update: {
1482
+ captured_at?: string;
1483
+ created_at?: string;
1484
+ distribution_id?: string;
1485
+ id?: string;
1486
+ metrics?: Json;
1487
+ organization_id?: string;
1488
+ raw?: Json;
1489
+ source?: string;
1490
+ source_execution_id?: string | null;
1491
+ };
1492
+ Relationships: [
1493
+ {
1494
+ foreignKeyName: "content_distribution_metrics_distribution_fkey";
1495
+ columns: ["distribution_id", "organization_id"];
1496
+ isOneToOne: false;
1497
+ referencedRelation: "content_distributions";
1498
+ referencedColumns: ["id", "organization_id"];
1499
+ },
1500
+ {
1501
+ foreignKeyName: "content_distribution_metrics_organization_id_fkey";
1502
+ columns: ["organization_id"];
1503
+ isOneToOne: false;
1504
+ referencedRelation: "organizations";
1505
+ referencedColumns: ["id"];
1506
+ },
1507
+ {
1508
+ foreignKeyName: "content_distribution_metrics_source_execution_id_fkey";
1509
+ columns: ["source_execution_id"];
1510
+ isOneToOne: false;
1511
+ referencedRelation: "execution_logs";
1512
+ referencedColumns: ["execution_id"];
1513
+ }
1514
+ ];
1515
+ };
1458
1516
  content_distributions: {
1459
1517
  Row: {
1460
1518
  adapted_body: string | null;
@@ -1557,6 +1557,64 @@ type Database = {
1557
1557
  }
1558
1558
  ];
1559
1559
  };
1560
+ content_distribution_metrics: {
1561
+ Row: {
1562
+ captured_at: string;
1563
+ created_at: string;
1564
+ distribution_id: string;
1565
+ id: string;
1566
+ metrics: Json;
1567
+ organization_id: string;
1568
+ raw: Json;
1569
+ source: string;
1570
+ source_execution_id: string | null;
1571
+ };
1572
+ Insert: {
1573
+ captured_at?: string;
1574
+ created_at?: string;
1575
+ distribution_id: string;
1576
+ id?: string;
1577
+ metrics?: Json;
1578
+ organization_id: string;
1579
+ raw?: Json;
1580
+ source: string;
1581
+ source_execution_id?: string | null;
1582
+ };
1583
+ Update: {
1584
+ captured_at?: string;
1585
+ created_at?: string;
1586
+ distribution_id?: string;
1587
+ id?: string;
1588
+ metrics?: Json;
1589
+ organization_id?: string;
1590
+ raw?: Json;
1591
+ source?: string;
1592
+ source_execution_id?: string | null;
1593
+ };
1594
+ Relationships: [
1595
+ {
1596
+ foreignKeyName: "content_distribution_metrics_distribution_fkey";
1597
+ columns: ["distribution_id", "organization_id"];
1598
+ isOneToOne: false;
1599
+ referencedRelation: "content_distributions";
1600
+ referencedColumns: ["id", "organization_id"];
1601
+ },
1602
+ {
1603
+ foreignKeyName: "content_distribution_metrics_organization_id_fkey";
1604
+ columns: ["organization_id"];
1605
+ isOneToOne: false;
1606
+ referencedRelation: "organizations";
1607
+ referencedColumns: ["id"];
1608
+ },
1609
+ {
1610
+ foreignKeyName: "content_distribution_metrics_source_execution_id_fkey";
1611
+ columns: ["source_execution_id"];
1612
+ isOneToOne: false;
1613
+ referencedRelation: "execution_logs";
1614
+ referencedColumns: ["execution_id"];
1615
+ }
1616
+ ];
1617
+ };
1560
1618
  content_distributions: {
1561
1619
  Row: {
1562
1620
  adapted_body: string | null;
@@ -5681,6 +5739,24 @@ declare function useElevasisSystems(): ElevasisSystemsContextValue;
5681
5739
  declare function useOptionalElevasisSystems(): ElevasisSystemsContextValue | null;
5682
5740
  declare function ElevasisSystemsProvider({ systems, topbarActions, organizationModel, timeRange, operationsApiUrl, operationsSSEManager, deliveryApiUrl, deliverySSEManager, disabledSubsectionPaths, children }: ElevasisSystemsProviderProps): react_jsx_runtime.JSX.Element;
5683
5741
 
5742
+ /**
5743
+ * Filters a static candidate manifest list down to the ones whose System is
5744
+ * both **declared** in the organization model and **visible** by lifecycle
5745
+ * (`isSystemLifecycleVisible` -- the Wave 1 shared predicate; `lifecycle:
5746
+ * 'draft'` is not visible, and an omitted lifecycle parses as `'active'`).
5747
+ *
5748
+ * This is a FILTER, not a generator. Tenants keep their hand-written
5749
+ * `SYSTEM_MANIFESTS` array (real imports, so bundling and tree-shaking stay
5750
+ * honest) and route the result through this function before handing it to
5751
+ * `ElevasisSystemsProvider` / `ElevasisAuthenticatedShell`.
5752
+ *
5753
+ * A manifest with no `systemId` is a navigation-only surface (see
5754
+ * `SystemModule.systemId`'s own doc: "Omit for navigation-only app
5755
+ * surfaces") -- there is nothing to check it against, so it always passes
5756
+ * through unfiltered.
5757
+ */
5758
+ declare function selectDeclaredSystems<T extends SystemModule>(candidates: readonly T[], organizationModel: ElevasisOrganizationModel | undefined): T[];
5759
+
5684
5760
  declare function SystemShell({ children }: {
5685
5761
  children: ReactNode;
5686
5762
  }): react_jsx_runtime.JSX.Element;
@@ -5759,5 +5835,5 @@ declare function createTestSystemsProvider({ organizationModel, systems }?: Crea
5759
5835
  children: ReactNode;
5760
5836
  }) => react_jsx_runtime.JSX.Element;
5761
5837
 
5762
- export { AppearanceProvider, CrmActionsProvider, ElevasisCoreProvider, ElevasisServiceProvider, ElevasisSystemsProvider, ElevasisUIProvider, ListActionsProvider, NotificationProvider, SystemShell, createTestSystemsProvider, useAppearance, useCrmActions, useElevasisServices, useElevasisSystems, useListActions, useNotificationAdapter, useOptionalElevasisSystems, useResolvedOrganizationModel };
5838
+ export { AppearanceProvider, CrmActionsProvider, ElevasisCoreProvider, ElevasisServiceProvider, ElevasisSystemsProvider, ElevasisUIProvider, ListActionsProvider, NotificationProvider, SystemShell, createTestSystemsProvider, selectDeclaredSystems, useAppearance, useCrmActions, useElevasisServices, useElevasisSystems, useListActions, useNotificationAdapter, useOptionalElevasisSystems, useResolvedOrganizationModel };
5763
5839
  export type { ApiKeyConfig, AppearanceConfig, AuthConfig, AuthKitConfig, CreateTestSystemsProviderOptions, ElevasisCoreProviderProps, ElevasisCoreThemeConfig, ElevasisServiceContextValue, ElevasisServiceProviderProps, ElevasisSystemsContextValue, ElevasisSystemsProviderProps, ElevasisThemeConfig, ElevasisTokenOverrides, LeadGenStageKey, ListBuilderRegistry, ListBuilderWorkflow, ListBuilderWorkflowCategory, NotificationAdapter, OrganizationGraphContextValue, OrganizationGraphSystemBridge, PresetName, ResolvedShellModel, ResolvedShellRouteMatch, ResolvedShellSystem, ResolvedSystemAccess, ResolvedSystemModule, ResolvedSystemSemantics, ShellRouteMatchStatus, ShellRuntime, ShellSidebarLinkGroup, ShellSidebarLinkItem, ShellSidebarProjectionOptions, SystemIconComponent, SystemModule, SystemSidebarComponent, WithSchemes };
@@ -1,14 +1,13 @@
1
- export { AppearanceProvider, CrmActionsProvider, ElevasisCoreProvider, ElevasisSystemsProvider, ElevasisUIProvider, ListActionsProvider, NotificationProvider, SystemShell, createTestSystemsProvider, useAppearance, useCrmActions, useElevasisSystems, useListActions, useNotificationAdapter, useOptionalElevasisSystems, useResolvedOrganizationModel } from '../chunk-OCVSPAKM.js';
1
+ export { AppearanceProvider, CrmActionsProvider, ElevasisCoreProvider, ElevasisSystemsProvider, ElevasisUIProvider, ListActionsProvider, NotificationProvider, SystemShell, createTestSystemsProvider, selectDeclaredSystems, useAppearance, useCrmActions, useElevasisSystems, useListActions, useNotificationAdapter, useOptionalElevasisSystems, useResolvedOrganizationModel } from '../chunk-6JN2TLV2.js';
2
2
  import '../chunk-R6NMRXNO.js';
3
3
  import '../chunk-RBGVNPA6.js';
4
- import '../chunk-MKH2KOAO.js';
5
- import '../chunk-NHNTX6ZL.js';
4
+ import '../chunk-O32UQ26A.js';
6
5
  import '../chunk-L7BZZ4SI.js';
7
- import '../chunk-U2H3TIHD.js';
6
+ import '../chunk-HYQOGRWG.js';
8
7
  import '../chunk-MISHPEJX.js';
9
8
  import '../chunk-62GVNH5U.js';
10
9
  import '../chunk-P45GQ3ZW.js';
11
- import '../chunk-M7WWRZ5Z.js';
10
+ import '../chunk-2GIJBHZT.js';
12
11
  import '../chunk-3KMDHCAR.js';
13
12
  import '../chunk-2IFYDILW.js';
14
13
  import '../chunk-BLXJEIQS.js';
@@ -16,7 +15,7 @@ import '../chunk-UD657ICS.js';
16
15
  import '../chunk-DD3CCMCZ.js';
17
16
  import '../chunk-RNP5R5I3.js';
18
17
  import '../chunk-RT4KRGZT.js';
19
- import '../chunk-IBCEAVB2.js';
18
+ import '../chunk-R5UGIFYU.js';
20
19
  import '../chunk-Y6I3IC45.js';
21
20
  import '../chunk-6SSQGWK7.js';
22
21
  export { ElevasisServiceProvider, useElevasisServices } from '../chunk-BI5VDO2K.js';
@@ -1556,6 +1556,64 @@ type Database = {
1556
1556
  }
1557
1557
  ];
1558
1558
  };
1559
+ content_distribution_metrics: {
1560
+ Row: {
1561
+ captured_at: string;
1562
+ created_at: string;
1563
+ distribution_id: string;
1564
+ id: string;
1565
+ metrics: Json;
1566
+ organization_id: string;
1567
+ raw: Json;
1568
+ source: string;
1569
+ source_execution_id: string | null;
1570
+ };
1571
+ Insert: {
1572
+ captured_at?: string;
1573
+ created_at?: string;
1574
+ distribution_id: string;
1575
+ id?: string;
1576
+ metrics?: Json;
1577
+ organization_id: string;
1578
+ raw?: Json;
1579
+ source: string;
1580
+ source_execution_id?: string | null;
1581
+ };
1582
+ Update: {
1583
+ captured_at?: string;
1584
+ created_at?: string;
1585
+ distribution_id?: string;
1586
+ id?: string;
1587
+ metrics?: Json;
1588
+ organization_id?: string;
1589
+ raw?: Json;
1590
+ source?: string;
1591
+ source_execution_id?: string | null;
1592
+ };
1593
+ Relationships: [
1594
+ {
1595
+ foreignKeyName: "content_distribution_metrics_distribution_fkey";
1596
+ columns: ["distribution_id", "organization_id"];
1597
+ isOneToOne: false;
1598
+ referencedRelation: "content_distributions";
1599
+ referencedColumns: ["id", "organization_id"];
1600
+ },
1601
+ {
1602
+ foreignKeyName: "content_distribution_metrics_organization_id_fkey";
1603
+ columns: ["organization_id"];
1604
+ isOneToOne: false;
1605
+ referencedRelation: "organizations";
1606
+ referencedColumns: ["id"];
1607
+ },
1608
+ {
1609
+ foreignKeyName: "content_distribution_metrics_source_execution_id_fkey";
1610
+ columns: ["source_execution_id"];
1611
+ isOneToOne: false;
1612
+ referencedRelation: "execution_logs";
1613
+ referencedColumns: ["execution_id"];
1614
+ }
1615
+ ];
1616
+ };
1559
1617
  content_distributions: {
1560
1618
  Row: {
1561
1619
  adapted_body: string | null;
@@ -5565,6 +5623,52 @@ declare function useElevasisSystems(): ElevasisSystemsContextValue;
5565
5623
  declare function useOptionalElevasisSystems(): ElevasisSystemsContextValue | null;
5566
5624
  declare function ElevasisSystemsProvider({ systems, topbarActions, organizationModel, timeRange, operationsApiUrl, operationsSSEManager, deliveryApiUrl, deliverySSEManager, disabledSubsectionPaths, children }: ElevasisSystemsProviderProps): react_jsx_runtime.JSX.Element;
5567
5625
 
5626
+ /**
5627
+ * Filters a static candidate manifest list down to the ones whose System is
5628
+ * both **declared** in the organization model and **visible** by lifecycle
5629
+ * (`isSystemLifecycleVisible` -- the Wave 1 shared predicate; `lifecycle:
5630
+ * 'draft'` is not visible, and an omitted lifecycle parses as `'active'`).
5631
+ *
5632
+ * This is a FILTER, not a generator. Tenants keep their hand-written
5633
+ * `SYSTEM_MANIFESTS` array (real imports, so bundling and tree-shaking stay
5634
+ * honest) and route the result through this function before handing it to
5635
+ * `ElevasisSystemsProvider` / `ElevasisAuthenticatedShell`.
5636
+ *
5637
+ * A manifest with no `systemId` is a navigation-only surface (see
5638
+ * `SystemModule.systemId`'s own doc: "Omit for navigation-only app
5639
+ * surfaces") -- there is nothing to check it against, so it always passes
5640
+ * through unfiltered.
5641
+ */
5642
+ declare function selectDeclaredSystems<T extends SystemModule>(candidates: readonly T[], organizationModel: ElevasisOrganizationModel | undefined): T[];
5643
+
5644
+ /**
5645
+ * useResolvedOrganizationModel
5646
+ *
5647
+ * Returns the live organization model from ElevasisSystemsProvider, falling
5648
+ * back to a canonical empty model when the provider has not yet supplied one.
5649
+ *
5650
+ * Fallback uses `mergeDefaults: false` intentionally: the generic
5651
+ * DEFAULT_ORGANIZATION_MODEL has an empty `systems: {}` record (all
5652
+ * Elevasis-specific systems live in `@repo/elevasis-core`). With
5653
+ * `mergeDefaults: true` Zod would inject the generic fixture defaults,
5654
+ * producing a model that looks valid but contains none of the tenant's
5655
+ * semantic data. `mergeDefaults: false` yields a minimal schema-valid shell
5656
+ * that makes the missing-provider state explicit rather than silently hiding it.
5657
+ */
5658
+
5659
+ /**
5660
+ * Returns the live `OrganizationModel` from the nearest
5661
+ * `ElevasisSystemsProvider`. When the provider has not yet supplied a model
5662
+ * (e.g. during initial load), returns `EMPTY_CANONICAL_MODEL` -- a minimal
5663
+ * schema-valid shell resolved with `{ mergeDefaults: false }` so it never
5664
+ * silently injects the generic fixture Systems/knowledge.
5665
+ *
5666
+ * Use this hook instead of `organizationModel ?? resolveOrganizationModel()`
5667
+ * at call sites; it centralises the fallback decision and enforces the
5668
+ * `mergeDefaults: false` contract in one place.
5669
+ */
5670
+ declare function useResolvedOrganizationModel(): OrganizationModel;
5671
+
5568
5672
  declare function SystemShell({ children }: {
5569
5673
  children: ReactNode;
5570
5674
  }): react_jsx_runtime.JSX.Element;
@@ -5611,5 +5715,5 @@ declare function useElevasisServices(): ElevasisServiceContextValue;
5611
5715
  */
5612
5716
  declare function ElevasisServiceProvider({ apiRequest, organizationId, workOSOrganizationId, isReady, apiUrl, children }: ElevasisServiceProviderProps): react_jsx_runtime.JSX.Element;
5613
5717
 
5614
- export { AppearanceProvider, ElevasisCoreProvider, ElevasisServiceProvider, ElevasisSystemsProvider, NotificationProvider, SystemShell, useAppearance, useElevasisServices, useElevasisSystems, useNotificationAdapter, useOptionalElevasisSystems };
5718
+ export { AppearanceProvider, ElevasisCoreProvider, ElevasisServiceProvider, ElevasisSystemsProvider, NotificationProvider, SystemShell, selectDeclaredSystems, useAppearance, useElevasisServices, useElevasisSystems, useNotificationAdapter, useOptionalElevasisSystems, useResolvedOrganizationModel };
5615
5719
  export type { ApiKeyConfig, AppearanceConfig, AuthConfig, AuthKitConfig, ElevasisCoreProviderProps, ElevasisCoreThemeConfig, ElevasisServiceContextValue, ElevasisServiceProviderProps, ElevasisSystemsContextValue, ElevasisSystemsProviderProps, ElevasisTokenOverrides, NotificationAdapter, OrganizationGraphContextValue, OrganizationGraphSystemBridge, ResolvedShellModel, ResolvedShellRouteMatch, ResolvedShellSystem, ResolvedSystemAccess, ResolvedSystemModule, ResolvedSystemSemantics, ResolvedTopbarAction, ResolvedTopbarActionEntry, ShellRouteMatchStatus, ShellRuntime, ShellSidebarLinkGroup, ShellSidebarLinkItem, ShellSidebarProjectionOptions, SystemIconComponent, SystemModule, SystemSidebarComponent, TopbarActionModule, TopbarActionsProjectionOptions, WithSchemes };
@@ -1,14 +1,13 @@
1
- export { AppearanceProvider, ElevasisCoreProvider, ElevasisSystemsProvider, NotificationProvider, SystemShell, useAppearance, useElevasisSystems, useNotificationAdapter, useOptionalElevasisSystems } from '../chunk-OCVSPAKM.js';
1
+ export { AppearanceProvider, ElevasisCoreProvider, ElevasisSystemsProvider, NotificationProvider, SystemShell, selectDeclaredSystems, useAppearance, useElevasisSystems, useNotificationAdapter, useOptionalElevasisSystems, useResolvedOrganizationModel } from '../chunk-6JN2TLV2.js';
2
2
  import '../chunk-R6NMRXNO.js';
3
3
  import '../chunk-RBGVNPA6.js';
4
- import '../chunk-MKH2KOAO.js';
5
- import '../chunk-NHNTX6ZL.js';
4
+ import '../chunk-O32UQ26A.js';
6
5
  import '../chunk-L7BZZ4SI.js';
7
- import '../chunk-U2H3TIHD.js';
6
+ import '../chunk-HYQOGRWG.js';
8
7
  import '../chunk-MISHPEJX.js';
9
8
  import '../chunk-62GVNH5U.js';
10
9
  import '../chunk-P45GQ3ZW.js';
11
- import '../chunk-M7WWRZ5Z.js';
10
+ import '../chunk-2GIJBHZT.js';
12
11
  import '../chunk-3KMDHCAR.js';
13
12
  import '../chunk-2IFYDILW.js';
14
13
  import '../chunk-BLXJEIQS.js';
@@ -16,7 +15,7 @@ import '../chunk-UD657ICS.js';
16
15
  import '../chunk-DD3CCMCZ.js';
17
16
  import '../chunk-RNP5R5I3.js';
18
17
  import '../chunk-RT4KRGZT.js';
19
- import '../chunk-IBCEAVB2.js';
18
+ import '../chunk-R5UGIFYU.js';
20
19
  import '../chunk-Y6I3IC45.js';
21
20
  import '../chunk-6SSQGWK7.js';
22
21
  export { ElevasisServiceProvider, useElevasisServices } from '../chunk-BI5VDO2K.js';
@@ -176,15 +176,26 @@ interface OrgOsUiRouteContractOptions {
176
176
  mode?: OrgOsUiRouteContractMode;
177
177
  /**
178
178
  * Route paths whose route file — or an ancestor layout route — wraps the page
179
- * in an `AccessGuard`. Supply this to enable the `unguarded-beta-route` check.
179
+ * in an `AccessGuard`. Supply this to enable the `unguarded-route` check.
180
180
  *
181
- * Omitted means the beta-guard check does not run. Hiding a System from
182
- * navigation (`lifecycle: 'beta'`) does not make its route unreachable, so a
183
- * caller that can resolve route files should always pass this.
181
+ * Omitted means the guard check does not run. A System's route is reachable
182
+ * by direct URL regardless of its lifecycle or whether it is currently
183
+ * surfaced in navigation, so a caller that can resolve route files should
184
+ * always pass this.
184
185
  */
185
186
  guardedRoutePaths?: Iterable<string>;
187
+ /**
188
+ * Explicit, named opt-out from the `unguarded-route` check for System paths
189
+ * that are intentionally reachable without an `AccessGuard` (a public or
190
+ * unauthenticated surface, for example). Each entry must be a normalized
191
+ * route path already present in `routePaths`/`routeTreeSource` — this is
192
+ * not a way to silence a path that simply has not been checked. Keep this
193
+ * empty unless a route genuinely should not be guarded; do not use it to
194
+ * paper over a route a guard was forgotten on.
195
+ */
196
+ publiclyReachableRoutePaths?: Iterable<string>;
186
197
  }
187
- type OrgOsUiRouteContractIssueKind = 'missing-system' | 'missing-route' | 'unguarded-beta-route';
198
+ type OrgOsUiRouteContractIssueKind = 'missing-system' | 'missing-route' | 'unguarded-route';
188
199
  interface OrgOsUiRouteContractIssue {
189
200
  target: OrgOsUiRouteContractTarget;
190
201
  kind: OrgOsUiRouteContractIssueKind;
@@ -2,10 +2,10 @@ import { server, handlers } from '../chunk-7XKCG5CT.js';
2
2
  export { handlers, server } from '../chunk-7XKCG5CT.js';
3
3
  import { mockWorkOSUser, mockUseAuth, mockUnauthenticatedUser, mockAuthenticatedUser, mockAuthLoading, createMockUseAuth } from '../chunk-N7U24M2J.js';
4
4
  export { createMockUseAuth, mockAuthLoading, mockAuthenticatedUser, mockUnauthenticatedUser, mockUseAuth, mockWorkOSUser } from '../chunk-N7U24M2J.js';
5
- import '../chunk-5B2ZFO44.js';
6
- import { ApiClientProvider } from '../chunk-NHNTX6ZL.js';
5
+ import '../chunk-RFNJ2PTO.js';
6
+ import { ApiClientProvider } from '../chunk-O32UQ26A.js';
7
7
  import '../chunk-DD3CCMCZ.js';
8
- import '../chunk-IBCEAVB2.js';
8
+ import '../chunk-R5UGIFYU.js';
9
9
  import '../chunk-Y6I3IC45.js';
10
10
  import '../chunk-6SSQGWK7.js';
11
11
  import { ElevasisServiceProvider } from '../chunk-BI5VDO2K.js';
@@ -179,19 +179,15 @@ function getOrgOsRouteContractSystems(organizationModel) {
179
179
  const { systems } = organizationModel;
180
180
  const arraySystems = systems.systems;
181
181
  if (Array.isArray(arraySystems)) {
182
- return arraySystems.map((system) => ({
183
- ...system,
184
- betaByAncestry: system.lifecycle === "beta"
185
- }));
182
+ return arraySystems;
186
183
  }
187
184
  const result = [];
188
- const visit = (entries, prefix = "", ancestorBeta = false) => {
185
+ const visit = (entries, prefix = "") => {
189
186
  for (const [key, system] of Object.entries(entries)) {
190
187
  const id = prefix ? `${prefix}.${key}` : system.id || key;
191
- const betaByAncestry = ancestorBeta || system.lifecycle === "beta";
192
- result.push({ ...system, id, betaByAncestry });
193
- if (system.systems) visit(system.systems, id, betaByAncestry);
194
- if (system.subsystems) visit(system.subsystems, id, betaByAncestry);
188
+ result.push({ ...system, id });
189
+ if (system.systems) visit(system.systems, id);
190
+ if (system.subsystems) visit(system.subsystems, id);
195
191
  }
196
192
  };
197
193
  visit(systems);
@@ -205,6 +201,9 @@ function collectOrgOsUiRouteContractIssues(options) {
205
201
  }
206
202
  const normalizedRoutePaths = new Set([...routePaths].map(normalizeOrgOsRoutePath));
207
203
  const normalizedGuardedPaths = options.guardedRoutePaths ? new Set([...options.guardedRoutePaths].map(normalizeOrgOsRoutePath)) : void 0;
204
+ const normalizedPubliclyReachablePaths = new Set(
205
+ [...options.publiclyReachableRoutePaths ?? []].map(normalizeOrgOsRoutePath)
206
+ );
208
207
  const systems = getOrgOsRouteContractSystems(organizationModel);
209
208
  const modelSystemIds = new Set(systems.map((system) => system.id));
210
209
  const issues = [];
@@ -236,10 +235,10 @@ function collectOrgOsUiRouteContractIssues(options) {
236
235
  });
237
236
  continue;
238
237
  }
239
- if (normalizedGuardedPaths && system.betaByAncestry && !normalizedGuardedPaths.has(normalizedPath)) {
238
+ if (normalizedGuardedPaths && !normalizedGuardedPaths.has(normalizedPath) && !normalizedPubliclyReachablePaths.has(normalizedPath)) {
240
239
  issues.push({
241
240
  target,
242
- kind: "unguarded-beta-route",
241
+ kind: "unguarded-route",
243
242
  systemId: system.id,
244
243
  ownerSystemId,
245
244
  path: normalizedPath
@@ -257,17 +256,17 @@ function formatOrgOsUiRouteContractIssue(issue) {
257
256
  `- If it should not ship, remove that SystemModule from ${issue.target.shellSource}.`
258
257
  ].join("\n");
259
258
  }
260
- if (issue.kind === "unguarded-beta-route") {
259
+ if (issue.kind === "unguarded-route") {
261
260
  return [
262
- `[unguarded-beta-route] System "${issue.systemId}" is lifecycle "beta" (directly or via an ancestor) and routes to "${issue.path}", but neither that route file nor an ancestor layout route wraps it in an AccessGuard.`,
261
+ `[unguarded-route] System "${issue.systemId}" routes to "${issue.path}", but neither that route file nor an ancestor layout route wraps it in an AccessGuard.`,
263
262
  `Owner SystemModule: ${issue.ownerSystemId}`,
264
- "A beta System is hidden from navigation, which is not the same as unreachable \u2014 the route still answers a direct URL.",
263
+ "Any System route answers a direct URL regardless of its lifecycle or navigation visibility, so every routable System needs its own guard.",
265
264
  "Fix one of:",
266
265
  // Phrased in prose rather than as a guard JSX tag on purpose. The
267
266
  // access-key drift scanner in @repo/core matches that tag shape anywhere
268
267
  // in a file and would read this message as a real runtime access key.
269
268
  `- Wrap the route (or its layout route) in an AccessGuard whose access key is "${issue.systemId}".`,
270
- `- Or change the System's lifecycle in ${issue.target.orgModelSource} if it is actually meant to be publicly reachable.`
269
+ `- Or, if this route is genuinely meant to be reachable without an AccessGuard, add its path to the contract call's publiclyReachableRoutePaths with a comment naming why.`
271
270
  ].join("\n");
272
271
  }
273
272
  return [
@@ -2225,6 +2225,64 @@ type Database = {
2225
2225
  }
2226
2226
  ];
2227
2227
  };
2228
+ content_distribution_metrics: {
2229
+ Row: {
2230
+ captured_at: string;
2231
+ created_at: string;
2232
+ distribution_id: string;
2233
+ id: string;
2234
+ metrics: Json;
2235
+ organization_id: string;
2236
+ raw: Json;
2237
+ source: string;
2238
+ source_execution_id: string | null;
2239
+ };
2240
+ Insert: {
2241
+ captured_at?: string;
2242
+ created_at?: string;
2243
+ distribution_id: string;
2244
+ id?: string;
2245
+ metrics?: Json;
2246
+ organization_id: string;
2247
+ raw?: Json;
2248
+ source: string;
2249
+ source_execution_id?: string | null;
2250
+ };
2251
+ Update: {
2252
+ captured_at?: string;
2253
+ created_at?: string;
2254
+ distribution_id?: string;
2255
+ id?: string;
2256
+ metrics?: Json;
2257
+ organization_id?: string;
2258
+ raw?: Json;
2259
+ source?: string;
2260
+ source_execution_id?: string | null;
2261
+ };
2262
+ Relationships: [
2263
+ {
2264
+ foreignKeyName: "content_distribution_metrics_distribution_fkey";
2265
+ columns: ["distribution_id", "organization_id"];
2266
+ isOneToOne: false;
2267
+ referencedRelation: "content_distributions";
2268
+ referencedColumns: ["id", "organization_id"];
2269
+ },
2270
+ {
2271
+ foreignKeyName: "content_distribution_metrics_organization_id_fkey";
2272
+ columns: ["organization_id"];
2273
+ isOneToOne: false;
2274
+ referencedRelation: "organizations";
2275
+ referencedColumns: ["id"];
2276
+ },
2277
+ {
2278
+ foreignKeyName: "content_distribution_metrics_source_execution_id_fkey";
2279
+ columns: ["source_execution_id"];
2280
+ isOneToOne: false;
2281
+ referencedRelation: "execution_logs";
2282
+ referencedColumns: ["execution_id"];
2283
+ }
2284
+ ];
2285
+ };
2228
2286
  content_distributions: {
2229
2287
  Row: {
2230
2288
  adapted_body: string | null;
@@ -5742,7 +5800,7 @@ type AIResourceDefinition = SerializedWorkflowDefinition | SerializedAgentDefini
5742
5800
  * Note: Concrete adapter implementations are deferred until needed.
5743
5801
  * This type provides compile-time safety and auto-completion for tool definitions.
5744
5802
  */
5745
- type IntegrationType = 'gmail' | 'google-sheets' | 'slack' | 'github' | 'linear' | 'attio' | 'airtable' | 'salesforce' | 'hubspot' | 'stripe' | 'twilio' | 'sendgrid' | 'mailgun' | 'zapier' | 'webhook' | 'apify' | 'instantly' | 'resend' | 'signature-api' | 'dropbox' | 'anymailfinder' | 'tomba' | 'millionverifier';
5803
+ type IntegrationType = 'gmail' | 'google-sheets' | 'slack' | 'github' | 'linear' | 'attio' | 'airtable' | 'salesforce' | 'hubspot' | 'stripe' | 'twilio' | 'sendgrid' | 'mailgun' | 'zapier' | 'webhook' | 'apify' | 'instantly' | 'resend' | 'signature-api' | 'dropbox' | 'anymailfinder' | 'tomba' | 'millionverifier' | 'instagram';
5746
5804
 
5747
5805
  /**
5748
5806
  * Resource Registry type definitions