@elevasis/ui 1.2.1 → 1.3.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 (52) hide show
  1. package/dist/api/hooks/useApiClient.d.ts +54 -0
  2. package/dist/api/hooks/useApiClient.d.ts.map +1 -0
  3. package/dist/api/hooks/useApiClient.js +185 -0
  4. package/dist/api/index.d.ts +49 -11
  5. package/dist/api/index.js +3 -2
  6. package/dist/auth/index.d.ts +88 -2
  7. package/dist/auth/index.js +5 -1
  8. package/dist/{chunk-5UWFGBFM.js → chunk-4KAG5U7A.js} +18 -4
  9. package/dist/chunk-4VGWQ5AN.js +91 -0
  10. package/dist/{chunk-JKERRYVS.js → chunk-BLO4SISK.js} +7 -3
  11. package/dist/chunk-BWCC6ZJC.js +202 -0
  12. package/dist/{chunk-WNWKOCGJ.js → chunk-BZTA7IIL.js} +1 -1
  13. package/dist/chunk-DD3CCMCZ.js +15 -0
  14. package/dist/{chunk-GEFB5YIR.js → chunk-EZMRFWZQ.js} +1 -1
  15. package/dist/chunk-FDCVFCOQ.js +105 -0
  16. package/dist/chunk-FLJXZ7YC.js +150 -0
  17. package/dist/{chunk-7AI5ZYJ4.js → chunk-JVAZHVNV.js} +2 -94
  18. package/dist/{chunk-ZGHDPDTF.js → chunk-JYSYHVLU.js} +3 -3
  19. package/dist/{chunk-J3FALDQE.js → chunk-NXHL23JW.js} +7 -13
  20. package/dist/{chunk-OUHGHTE7.js → chunk-O3PY6B6E.js} +3 -2
  21. package/dist/{chunk-ZQVPUAGR.js → chunk-OLD3NQLI.js} +33 -31
  22. package/dist/{chunk-B64YDSAY.js → chunk-PCBXNHKY.js} +53 -97
  23. package/dist/chunk-QQOLC46E.js +75 -0
  24. package/dist/chunk-RNP5R5I3.js +1 -0
  25. package/dist/{chunk-YULUKCS6.js → chunk-SITSZUFW.js} +1 -1
  26. package/dist/chunk-TIRMFDM4.js +33 -0
  27. package/dist/{chunk-PYL4XW6H.js → chunk-TMFCNFLW.js} +1 -1
  28. package/dist/{chunk-S66I2PYB.js → chunk-TN3PU2WK.js} +1 -1
  29. package/dist/components/command-queue/index.js +6 -4
  30. package/dist/components/index.js +9 -7
  31. package/dist/components/notifications/index.js +4 -3
  32. package/dist/display/index.js +3 -2
  33. package/dist/hooks/index.d.ts +1 -1
  34. package/dist/hooks/index.js +5 -4
  35. package/dist/hooks/published.d.ts +1 -1
  36. package/dist/hooks/published.js +4 -3
  37. package/dist/index.d.ts +447 -117
  38. package/dist/index.js +22 -16
  39. package/dist/initialization/index.d.ts +49 -1
  40. package/dist/initialization/index.js +5 -2
  41. package/dist/organization/index.d.ts +61 -2
  42. package/dist/organization/index.js +5 -2
  43. package/dist/profile/index.d.ts +30 -2
  44. package/dist/profile/index.js +2 -1
  45. package/dist/provider/index.d.ts +112 -27
  46. package/dist/provider/index.js +11 -6
  47. package/dist/provider/published.d.ts +85 -13
  48. package/dist/provider/published.js +10 -4
  49. package/dist/utils/index.js +2 -1
  50. package/package.json +17 -4
  51. package/dist/chunk-GDV44UWF.js +0 -138
  52. package/dist/chunk-HBRMWW6V.js +0 -43
package/dist/index.d.ts CHANGED
@@ -44,8 +44,10 @@ declare function getPreset(name: PresetName | (string & {})): ThemePreset;
44
44
  */
45
45
  interface ApiClientContextValue {
46
46
  getAccessToken: () => Promise<string | undefined>;
47
+ /** @deprecated Read via getOrganizationId() instead. Kept for downstream context consumers during migration. */
47
48
  organizationId: string | null;
48
49
  isOrganizationReady: boolean;
50
+ getOrganizationId: () => string | null;
49
51
  onError?: (endpoint: string, error: Error, details?: ApiErrorDetails) => void;
50
52
  }
51
53
  interface ApiErrorDetails {
@@ -56,11 +58,70 @@ interface ApiErrorDetails {
56
58
  interface ApiClientProviderProps {
57
59
  children: React.ReactNode;
58
60
  getAccessToken: () => Promise<string | undefined>;
59
- organizationId: string | null;
61
+ /**
62
+ * Static org ID. Used when org ID is stable at render time.
63
+ * Cannot reflect org switches without re-rendering the provider.
64
+ * Prefer getOrganizationId for dynamic org context.
65
+ * @deprecated Pass getOrganizationId instead for dynamic org resolution.
66
+ */
67
+ organizationId?: string | null;
68
+ /**
69
+ * Callback invoked on every request to read the current org ID.
70
+ * Takes precedence over organizationId when provided.
71
+ * Allows org switching without re-rendering the provider tree.
72
+ */
73
+ getOrganizationId?: () => string | null;
60
74
  isOrganizationReady: boolean;
61
75
  onError?: (endpoint: string, error: Error, details?: ApiErrorDetails) => void;
62
76
  }
63
77
 
78
+ /**
79
+ * Pluggable notification adapter interface.
80
+ *
81
+ * Implement this to connect any notification library (Mantine, react-toastify, etc.)
82
+ * to the Elevasis UI hooks.
83
+ */
84
+ interface NotificationAdapter {
85
+ success(title: string, message: string): void;
86
+ error(title: string, message: string): void;
87
+ info(title: string, message: string): void;
88
+ warning(title: string, message: string): void;
89
+ /** Formats and displays an API error using structured error-utils helpers. */
90
+ apiError(error: unknown): void;
91
+ }
92
+ /**
93
+ * Provides a notification adapter to all descendant components.
94
+ *
95
+ * Pass a `MantineNotificationAdapter` for Command Center, or any custom
96
+ * adapter for other consumers (template, tests, etc.).
97
+ *
98
+ * When omitted, hooks fall back to the console adapter automatically.
99
+ *
100
+ * @example
101
+ * ```tsx
102
+ * import { NotificationProvider } from '@repo/ui/provider'
103
+ * import { mantineNotificationAdapter } from '@repo/ui/provider'
104
+ *
105
+ * <NotificationProvider adapter={mantineNotificationAdapter}>
106
+ * <App />
107
+ * </NotificationProvider>
108
+ * ```
109
+ */
110
+ declare function NotificationProvider({ adapter, children }: {
111
+ adapter: NotificationAdapter;
112
+ children: ReactNode;
113
+ }): react_jsx_runtime.JSX.Element;
114
+ /**
115
+ * Returns the active notification adapter.
116
+ *
117
+ * Falls back to the console adapter when used outside a NotificationProvider,
118
+ * so hooks remain functional in template environments without Mantine.
119
+ *
120
+ * Named `useNotificationAdapter` to avoid collision with the data-fetching
121
+ * `useNotifications` hook exported from `hooks/monitoring`.
122
+ */
123
+ declare function useNotificationAdapter(): NotificationAdapter;
124
+
64
125
  /** Flat + per-scheme override pattern. Flat values apply to both; `light`/`dark` win over flat. */
65
126
  type WithSchemes<T> = T & {
66
127
  light?: T;
@@ -162,16 +223,18 @@ interface ElevasisCoreProviderProps {
162
223
  */
163
224
  theme?: ElevasisCoreThemeConfig;
164
225
  /**
165
- * Override organization ID resolution.
166
- * Command-center passes Zustand-managed org ID here.
167
- * SDK consumers typically omit this (auto-resolved from JWT/API key).
226
+ * @deprecated Organization ID is now resolved automatically via OrganizationProvider.
227
+ * This prop is accepted for backwards compatibility during migration but is no longer
228
+ * used when the full provider stack is active (apiUrl provided).
168
229
  */
169
230
  organizationId?: string | null;
170
231
  /** Custom QueryClient. If omitted, a default is created internally. */
171
232
  queryClient?: QueryClient;
172
233
  /**
173
234
  * API base URL (e.g., 'https://api.elevasis.com' or 'http://localhost:5170').
174
- * When provided, ElevasisCoreProvider composes ApiClientProvider + ElevasisServiceProvider internally.
235
+ * When provided, ElevasisCoreProvider composes the full provider stack:
236
+ * ApiClientProvider + ElevasisServiceProvider + ProfileProvider +
237
+ * OrganizationProvider + NotificationProvider + InitializationProvider.
175
238
  * When omitted, no service context is provided (theme-only mode).
176
239
  */
177
240
  apiUrl?: string;
@@ -181,11 +244,19 @@ interface ElevasisCoreProviderProps {
181
244
  */
182
245
  onError?: (endpoint: string, error: Error, details?: ApiErrorDetails) => void;
183
246
  /**
184
- * Override organization readiness check.
185
- * Defaults to `!!organizationId` if not provided.
186
- * Command-center passes `!!currentMembership` for its stricter readiness requirement.
247
+ * @deprecated Organization readiness is now managed internally by OrganizationProvider.
248
+ * Accepted for backwards compatibility but ignored when apiUrl is provided.
187
249
  */
188
250
  isOrganizationReady?: boolean;
251
+ /**
252
+ * Notification adapter for displaying success/error/info messages.
253
+ * When provided, wraps the subtree in a NotificationProvider with this adapter.
254
+ * When omitted, the console fallback adapter is used automatically.
255
+ *
256
+ * ElevasisUIProvider (Mantine variant) passes mantineNotificationAdapter here automatically.
257
+ * Headless/SDK consumers can pass a custom adapter or omit for console output.
258
+ */
259
+ notifications?: NotificationAdapter;
189
260
  /**
190
261
  * Whether to inject CSS variables, `data-elevasis-scheme` attribute, and font links.
191
262
  * Set to `false` when the consumer has its own complete design system and only
@@ -204,16 +275,15 @@ interface ElevasisProviderProps {
204
275
  */
205
276
  theme?: ElevasisThemeConfig;
206
277
  /**
207
- * Override organization ID resolution.
208
- * Command-center passes Zustand-managed org ID here.
209
- * SDK consumers typically omit this (auto-resolved from JWT/API key).
278
+ * @deprecated Organization ID is now resolved automatically via OrganizationProvider.
279
+ * Accepted for backwards compatibility during migration but no longer used internally.
210
280
  */
211
281
  organizationId?: string | null;
212
282
  /** Custom QueryClient. If omitted, a default is created internally. */
213
283
  queryClient?: QueryClient;
214
284
  /**
215
285
  * API base URL (e.g., 'https://api.elevasis.com' or 'http://localhost:5170').
216
- * When provided, ElevasisProvider composes ApiClientProvider + ElevasisServiceProvider internally.
286
+ * When provided, ElevasisUIProvider composes the full provider stack via ElevasisCoreProvider.
217
287
  * When omitted, no service context is provided (theme-only mode).
218
288
  */
219
289
  apiUrl?: string;
@@ -223,9 +293,8 @@ interface ElevasisProviderProps {
223
293
  */
224
294
  onError?: (endpoint: string, error: Error, details?: ApiErrorDetails) => void;
225
295
  /**
226
- * Override organization readiness check.
227
- * Defaults to `!!organizationId` if not provided.
228
- * Command-center passes `!!currentMembership` for its stricter readiness requirement.
296
+ * @deprecated Organization readiness is now managed internally by OrganizationProvider.
297
+ * Accepted for backwards compatibility but ignored when apiUrl is provided.
229
298
  */
230
299
  isOrganizationReady?: boolean;
231
300
  children: ReactNode;
@@ -5766,18 +5835,19 @@ declare function TanStackRouterBridge({ children }: {
5766
5835
  /**
5767
5836
  * UI provider for Elevasis-powered applications. Includes Mantine theme integration.
5768
5837
  *
5769
- * Composes: MantineThemeProvider + QueryClientProvider + auth provider +
5770
- * auth bridge. When apiUrl is provided, also composes
5771
- * ApiClientProvider + ElevasisServiceProvider.
5838
+ * A thin Mantine shell around ElevasisCoreProvider. Handles:
5839
+ * - MantineProvider with theme resolution (presets, token overrides, color scheme)
5840
+ * - Google Font injection for preset fonts
5841
+ * - CSS variables resolver
5842
+ * - Mantine notification adapter (wired into NotificationProvider automatically)
5772
5843
  *
5773
- * Supports authkit and oauth modes. apiKey mode will throw until implemented.
5844
+ * All auth, API, profile, organization, and initialization composition is
5845
+ * delegated to ElevasisCoreProvider.
5774
5846
  *
5775
5847
  * @example Command-center (dogfooding)
5776
5848
  * ```tsx
5777
5849
  * <ElevasisUIProvider
5778
5850
  * auth={{ mode: 'authkit', clientId: '...', redirectUri: '/auth-redirect' }}
5779
- * organizationId={currentWorkOSOrganizationId}
5780
- * isOrganizationReady={!!currentMembership}
5781
5851
  * apiUrl={import.meta.env.VITE_API_SERVER}
5782
5852
  * onError={handleApiError}
5783
5853
  * queryClient={queryClient}
@@ -5803,7 +5873,7 @@ declare function TanStackRouterBridge({ children }: {
5803
5873
  * </ElevasisUIProvider>
5804
5874
  * ```
5805
5875
  */
5806
- declare function ElevasisUIProvider({ auth, theme, organizationId, queryClient, apiUrl, onError, isOrganizationReady, children }: ElevasisProviderProps): react_jsx_runtime.JSX.Element;
5876
+ declare function ElevasisUIProvider({ theme, children, ...coreProps }: ElevasisProviderProps): react_jsx_runtime.JSX.Element;
5807
5877
  /** @deprecated Use ElevasisUIProvider instead. Alias kept for backwards compatibility. */
5808
5878
  declare const ElevasisProvider: typeof ElevasisUIProvider;
5809
5879
 
@@ -5814,21 +5884,36 @@ declare const ElevasisProvider: typeof ElevasisUIProvider;
5814
5884
  * variables, set `data-elevasis-scheme`, or load fonts. Consumers that need
5815
5885
  * Elevasis theming should use `ElevasisProvider` (Mantine) instead.
5816
5886
  *
5817
- * Composes: QueryClientProvider + auth provider + auth bridge.
5818
- * When apiUrl is provided, also composes ApiClientProvider + ElevasisServiceProvider.
5887
+ * When `apiUrl` is provided, composes the full provider stack:
5888
+ * QueryClientProvider -> AuthProvider -> ApiClientProvider ->
5889
+ * ElevasisServiceProvider -> ProfileProvider -> OrganizationProvider ->
5890
+ * NotificationProvider -> InitializationProvider
5891
+ *
5892
+ * The `notifications` prop wires a custom adapter (e.g. mantineNotificationAdapter)
5893
+ * into the NotificationProvider. When omitted, the console fallback is used.
5819
5894
  *
5820
5895
  * @example Headless SDK consumer
5821
5896
  * ```tsx
5822
5897
  * <ElevasisCoreProvider
5823
5898
  * auth={{ mode: 'authkit', clientId: '...', redirectUri: '/' }}
5824
- * theme={{ colorScheme: 'dark', preset: 'default' }}
5825
5899
  * apiUrl="https://api.elevasis.com"
5826
5900
  * >
5827
5901
  * <Dashboard />
5828
5902
  * </ElevasisCoreProvider>
5829
5903
  * ```
5904
+ *
5905
+ * @example With custom notification adapter
5906
+ * ```tsx
5907
+ * <ElevasisCoreProvider
5908
+ * auth={{ mode: 'authkit', clientId: '...', redirectUri: '/' }}
5909
+ * apiUrl="https://api.elevasis.com"
5910
+ * notifications={myNotificationAdapter}
5911
+ * >
5912
+ * <Dashboard />
5913
+ * </ElevasisCoreProvider>
5914
+ * ```
5830
5915
  */
5831
- declare function ElevasisCoreProvider({ auth, organizationId, queryClient, apiUrl, onError, isOrganizationReady, children }: ElevasisCoreProviderProps): react_jsx_runtime.JSX.Element;
5916
+ declare function ElevasisCoreProvider({ auth, queryClient, apiUrl, onError, notifications, children }: ElevasisCoreProviderProps): react_jsx_runtime.JSX.Element;
5832
5917
 
5833
5918
  /**
5834
5919
  * Hook to access the ElevasisServiceProvider context.
@@ -5859,6 +5944,20 @@ declare function useElevasisServices(): ElevasisServiceContextValue;
5859
5944
  */
5860
5945
  declare function ElevasisServiceProvider({ apiRequest, organizationId, isReady, children }: ElevasisServiceProviderProps): react_jsx_runtime.JSX.Element;
5861
5946
 
5947
+ /**
5948
+ * Mantine-backed notification adapter.
5949
+ *
5950
+ * Wraps `@mantine/notifications` with the same defaults as `notify.tsx`
5951
+ * (`autoClose: 5000`, `position: 'top-right'`). The `apiError()` method
5952
+ * replicates `showApiErrorNotification` behavior including retryAfter-based
5953
+ * autoClose.
5954
+ *
5955
+ * Use this adapter in Command Center (Mantine-powered) consumers.
5956
+ * Template consumers should omit the NotificationProvider and rely on the
5957
+ * console fallback, or supply their own adapter.
5958
+ */
5959
+ declare const mantineNotificationAdapter: NotificationAdapter;
5960
+
5862
5961
  declare function useCommandQueue({ status, limit, offset, humanCheckpoint, timeRange, priorityMin, priorityMax, }?: {
5863
5962
  status?: TaskStatus;
5864
5963
  limit?: number;
@@ -6732,7 +6831,7 @@ declare function useGetExecutionHistory(scheduleId: string | undefined, options?
6732
6831
  executions: {
6733
6832
  id: string;
6734
6833
  createdAt: string;
6735
- status: "running" | "completed" | "failed" | "cancelled";
6834
+ status: "completed" | "failed" | "running" | "cancelled";
6736
6835
  step: number | null;
6737
6836
  itemLabel: string | null;
6738
6837
  duration: number | null;
@@ -6996,6 +7095,196 @@ declare function useStableAccessToken(): () => Promise<string>;
6996
7095
  */
6997
7096
  declare function useSessionCheck(): void;
6998
7097
 
7098
+ /**
7099
+ * Type for the useOrganizations hook return value
7100
+ */
7101
+ interface UseOrganizationsReturn$1 {
7102
+ currentWorkOSOrganizationId: string | null;
7103
+ currentMembership: MembershipWithDetails | null;
7104
+ setCurrentWorkOSOrganizationId: (id: string | null) => void;
7105
+ setCurrentMembership: (membership: MembershipWithDetails | null) => void;
7106
+ setOrganizationsInitializing: (initializing: boolean) => void;
7107
+ setOrganizationsLoading: (loading: boolean) => void;
7108
+ setOrganizationsError: (error: string | null) => void;
7109
+ organizations: {
7110
+ isInitializing: boolean;
7111
+ isOrgRefreshing: boolean;
7112
+ error: string | null;
7113
+ };
7114
+ }
7115
+ /**
7116
+ * Type for the useApiClient hook return value
7117
+ */
7118
+ interface UseApiClientReturn {
7119
+ apiRequest: <T = unknown>(path: string, options?: RequestInit) => Promise<T>;
7120
+ }
7121
+ /**
7122
+ * Return type for useOrgInitialization hook
7123
+ */
7124
+ interface UseOrgInitializationReturn {
7125
+ memberships: MembershipWithDetails[];
7126
+ isInitializing: boolean;
7127
+ isLoading: boolean;
7128
+ isInitialized: boolean;
7129
+ error: string | null;
7130
+ currentOrganization: MembershipWithDetails['organization'] | null;
7131
+ retry: () => Promise<void>;
7132
+ }
7133
+ /**
7134
+ * Factory function to create a useOrgInitialization hook for your app.
7135
+ *
7136
+ * Usage in app:
7137
+ * ```typescript
7138
+ * import { createUseOrgInitialization } from '@repo/ui/organization'
7139
+ * import { useOrganizations } from './hooks/useOrganizations'
7140
+ * import { useApiClient } from './api/hooks/useApiClient'
7141
+ *
7142
+ * export const useOrgInitialization = createUseOrgInitialization(
7143
+ * useOrganizations,
7144
+ * useApiClient
7145
+ * )
7146
+ * ```
7147
+ *
7148
+ * This pattern allows the shared package to provide the hook logic
7149
+ * while each app provides its own hook instances.
7150
+ */
7151
+ declare function createUseOrgInitialization(useOrganizations: () => UseOrganizationsReturn$1, useApiClient: () => UseApiClientReturn): () => UseOrgInitializationReturn;
7152
+
7153
+ interface InitializationError {
7154
+ layer: 'auth' | 'profile' | 'organization';
7155
+ message: string;
7156
+ originalError?: Error;
7157
+ }
7158
+ interface AppInitializationState {
7159
+ userReady: boolean;
7160
+ organizationReady: boolean;
7161
+ allReady: boolean;
7162
+ isInitializing: boolean;
7163
+ error: InitializationError | null;
7164
+ retry: () => void;
7165
+ profile: SupabaseUserProfile | null;
7166
+ }
7167
+ /**
7168
+ * Factory function to create a useAppInitialization hook for your app.
7169
+ *
7170
+ * Usage in app:
7171
+ * ```typescript
7172
+ * import { createUseAppInitialization } from '@repo/ui/initialization'
7173
+ * import { useOrgInitialization } from './organization/hooks/useOrgInitialization'
7174
+ *
7175
+ * export const useAppInitialization = createUseAppInitialization(useOrgInitialization)
7176
+ * ```
7177
+ *
7178
+ * This pattern allows the shared package to provide the hook logic
7179
+ * while each app provides its own hook instances.
7180
+ */
7181
+ declare function createUseAppInitialization(useOrgInitialization: () => UseOrgInitializationReturn): () => AppInitializationState;
7182
+
7183
+ interface ProtectedRouteProps {
7184
+ children: ReactNode;
7185
+ /**
7186
+ * Path to redirect to when user is unauthenticated.
7187
+ * @default '/login'
7188
+ */
7189
+ redirectTo?: string;
7190
+ /**
7191
+ * Rendered while initialization is in progress.
7192
+ * When not provided, nothing is rendered during initialization.
7193
+ */
7194
+ fallback?: ReactNode;
7195
+ /**
7196
+ * Rendered when initialization fails with a non-organization error.
7197
+ * Receives the error and a retry callback.
7198
+ * When not provided, the error is silently swallowed (children not rendered).
7199
+ */
7200
+ errorFallback?: (error: InitializationError, retry: () => void) => ReactNode;
7201
+ /**
7202
+ * When true (default), waits for both user AND organization to be ready
7203
+ * before rendering children. When false, only waits for user readiness.
7204
+ * @default true
7205
+ */
7206
+ waitForOrganization?: boolean;
7207
+ }
7208
+ /**
7209
+ * Headless route guard for authenticated pages.
7210
+ *
7211
+ * Reads initialization state from the nearest InitializationProvider.
7212
+ * Redirects unauthenticated users to `redirectTo` (default: '/login')
7213
+ * with a `returnTo` search param preserving the current location.
7214
+ *
7215
+ * Organization-layer errors are allowed through — routes like /invitations
7216
+ * must be accessible even when the user has no org membership.
7217
+ *
7218
+ * @example
7219
+ * // With custom fallback (your Mantine loader):
7220
+ * <ProtectedRoute fallback={<AppShellLoader />}>
7221
+ * <DashboardPage />
7222
+ * </ProtectedRoute>
7223
+ *
7224
+ * @example
7225
+ * // Wait only for user, not org (e.g. /invitations route):
7226
+ * <ProtectedRoute waitForOrganization={false}>
7227
+ * <InvitationsPage />
7228
+ * </ProtectedRoute>
7229
+ */
7230
+ declare function ProtectedRoute({ children, redirectTo, fallback, errorFallback, waitForOrganization }: ProtectedRouteProps): react_jsx_runtime.JSX.Element | null;
7231
+
7232
+ interface AdminGuardProps {
7233
+ children: ReactNode;
7234
+ /**
7235
+ * Path to redirect non-admin users to.
7236
+ * @default '/'
7237
+ */
7238
+ redirectTo?: string;
7239
+ /**
7240
+ * Rendered while user readiness is being determined.
7241
+ * When not provided, nothing is rendered during initialization.
7242
+ */
7243
+ fallback?: ReactNode;
7244
+ }
7245
+ /**
7246
+ * Headless route guard for platform admin pages.
7247
+ *
7248
+ * Reads `profile.is_platform_admin` from the nearest InitializationProvider.
7249
+ * Non-admin users are redirected to `redirectTo` (default: '/').
7250
+ *
7251
+ * Must be nested inside a ProtectedRoute (or equivalent) so that
7252
+ * `userReady` is guaranteed to be true when this guard runs.
7253
+ *
7254
+ * @example
7255
+ * <ProtectedRoute>
7256
+ * <AdminGuard fallback={<AppShellLoader />}>
7257
+ * <AdminDashboard />
7258
+ * </AdminGuard>
7259
+ * </ProtectedRoute>
7260
+ */
7261
+ declare function AdminGuard({ children, redirectTo, fallback }: AdminGuardProps): react_jsx_runtime.JSX.Element | null;
7262
+
7263
+ interface ProfileContextValue {
7264
+ profile: SupabaseUserProfile | null;
7265
+ loading: boolean;
7266
+ error: Error | null;
7267
+ refetch: () => Promise<void>;
7268
+ }
7269
+ /**
7270
+ * Consumes the nearest ProfileProvider.
7271
+ *
7272
+ * @throws {Error} If called outside of a ProfileProvider tree.
7273
+ */
7274
+ declare function useProfile(): ProfileContextValue;
7275
+ /**
7276
+ * Provides shared profile state to its subtree via React Context.
7277
+ *
7278
+ * Wraps useUserProfile so that all consumers share one profile fetch
7279
+ * instead of each triggering an independent sync call.
7280
+ *
7281
+ * Must be rendered inside the auth and service provider layers so that
7282
+ * the underlying hook can access useAuthContext and useElevasisServices.
7283
+ */
7284
+ declare function ProfileProvider({ children }: {
7285
+ children: ReactNode;
7286
+ }): react.FunctionComponentElement<react.ProviderProps<ProfileContextValue | null>>;
7287
+
6999
7288
  interface UseUserProfileOptions {
7000
7289
  /**
7001
7290
  * Optional error handler for profile sync failures
@@ -7053,6 +7342,63 @@ declare class UserProfileService {
7053
7342
  }>): Promise<SupabaseUserProfile | null>;
7054
7343
  }
7055
7344
 
7345
+ /**
7346
+ * The value exposed by OrganizationProvider to all consumers.
7347
+ */
7348
+ interface OrganizationContextValue {
7349
+ /** WorkOS organization ID of the currently selected organization. */
7350
+ currentWorkOSOrganizationId: string | null;
7351
+ /** Supabase (UUID) organization ID of the currently selected organization. */
7352
+ currentSupabaseOrganizationId: string | null;
7353
+ /** Full membership record for the currently selected organization. */
7354
+ currentMembership: MembershipWithDetails | null;
7355
+ /** All memberships for the authenticated user. */
7356
+ memberships: MembershipWithDetails[];
7357
+ /** True while the initial membership list is being fetched. */
7358
+ isInitializing: boolean;
7359
+ /** True while a subsequent org switch / refresh is in flight. */
7360
+ isOrgRefreshing: boolean;
7361
+ /** Error message if the membership fetch or org switch failed. */
7362
+ error: string | null;
7363
+ /**
7364
+ * Switch the active organization.
7365
+ *
7366
+ * Persists the selection to `last_visited_org` on the user profile and
7367
+ * invalidates all org-scoped TanStack Query cache entries.
7368
+ *
7369
+ * @param workosOrgId - WorkOS organization ID to switch to.
7370
+ */
7371
+ switchOrganization: (workosOrgId: string) => void;
7372
+ /**
7373
+ * Re-fetch memberships and retry org selection after an error.
7374
+ */
7375
+ retry: () => Promise<void>;
7376
+ }
7377
+ /**
7378
+ * Consumes the nearest OrganizationProvider.
7379
+ *
7380
+ * @throws {Error} If called outside of an OrganizationProvider tree.
7381
+ */
7382
+ declare function useOrganization(): OrganizationContextValue;
7383
+
7384
+ /**
7385
+ * Provides organization state to its subtree via React Context.
7386
+ *
7387
+ * Must be rendered inside:
7388
+ * - ElevasisServiceProvider (needs apiRequest)
7389
+ * - ProfileProvider (needs useProfile for last_visited_org preference)
7390
+ * - A TanStack QueryClientProvider (needs useQueryClient for cache invalidation)
7391
+ *
7392
+ * Behaviors:
7393
+ * - Fetches all memberships for the authenticated user via GET /memberships/my-memberships
7394
+ * - Selects the active org by priority: saved preference > WorkOS org ID > first membership
7395
+ * - Persists org switches to PATCH /users/me { last_visited_org }
7396
+ * - Clears all state when the user signs out (user becomes null)
7397
+ */
7398
+ declare function OrganizationProvider({ children }: {
7399
+ children: ReactNode;
7400
+ }): react.FunctionComponentElement<react.ProviderProps<OrganizationContextValue | null>>;
7401
+
7056
7402
  interface OrganizationsState {
7057
7403
  currentWorkOSOrganizationId: string | null;
7058
7404
  currentSupabaseOrganizationId: string | null;
@@ -7135,61 +7481,6 @@ declare function createUseOrganizations<TStore extends OrganizationsSlice>(useSt
7135
7481
  error: string | null;
7136
7482
  };
7137
7483
 
7138
- /**
7139
- * Type for the useOrganizations hook return value
7140
- */
7141
- interface UseOrganizationsReturn$1 {
7142
- currentWorkOSOrganizationId: string | null;
7143
- currentMembership: MembershipWithDetails | null;
7144
- setCurrentWorkOSOrganizationId: (id: string | null) => void;
7145
- setCurrentMembership: (membership: MembershipWithDetails | null) => void;
7146
- setOrganizationsInitializing: (initializing: boolean) => void;
7147
- setOrganizationsLoading: (loading: boolean) => void;
7148
- setOrganizationsError: (error: string | null) => void;
7149
- organizations: {
7150
- isInitializing: boolean;
7151
- isOrgRefreshing: boolean;
7152
- error: string | null;
7153
- };
7154
- }
7155
- /**
7156
- * Type for the useApiClient hook return value
7157
- */
7158
- interface UseApiClientReturn {
7159
- apiRequest: <T = unknown>(path: string, options?: RequestInit) => Promise<T>;
7160
- }
7161
- /**
7162
- * Return type for useOrgInitialization hook
7163
- */
7164
- interface UseOrgInitializationReturn {
7165
- memberships: MembershipWithDetails[];
7166
- isInitializing: boolean;
7167
- isLoading: boolean;
7168
- isInitialized: boolean;
7169
- error: string | null;
7170
- currentOrganization: MembershipWithDetails['organization'] | null;
7171
- retry: () => Promise<void>;
7172
- }
7173
- /**
7174
- * Factory function to create a useOrgInitialization hook for your app.
7175
- *
7176
- * Usage in app:
7177
- * ```typescript
7178
- * import { createUseOrgInitialization } from '@repo/ui/organization'
7179
- * import { useOrganizations } from './hooks/useOrganizations'
7180
- * import { useApiClient } from './api/hooks/useApiClient'
7181
- *
7182
- * export const useOrgInitialization = createUseOrgInitialization(
7183
- * useOrganizations,
7184
- * useApiClient
7185
- * )
7186
- * ```
7187
- *
7188
- * This pattern allows the shared package to provide the hook logic
7189
- * while each app provides its own hook instances.
7190
- */
7191
- declare function createUseOrgInitialization(useOrganizations: () => UseOrganizationsReturn$1, useApiClient: () => UseApiClientReturn): () => UseOrgInitializationReturn;
7192
-
7193
7484
  type Organization = NonNullable<MembershipWithDetails['organization']>;
7194
7485
  interface OrganizationSwitcherProps {
7195
7486
  currentOrganization: Organization | undefined;
@@ -7229,28 +7520,52 @@ declare function useApiClientContext(): ApiClientContextValue;
7229
7520
  * }
7230
7521
  * ```
7231
7522
  */
7232
- declare function ApiClientProvider({ children, getAccessToken, organizationId, isOrganizationReady, onError }: ApiClientProviderProps): react_jsx_runtime.JSX.Element;
7523
+ declare function ApiClientProvider({ children, getAccessToken, organizationId, getOrganizationId: getOrganizationIdProp, isOrganizationReady, onError }: ApiClientProviderProps): react_jsx_runtime.JSX.Element;
7233
7524
 
7234
7525
  /**
7235
- * Return type of useOrganizations hook (subset needed by useApiClient)
7526
+ * Return type of useOrganizations hook (subset needed by the factory)
7236
7527
  */
7237
7528
  interface UseOrganizationsReturn {
7238
7529
  isInitializing: boolean;
7239
7530
  isOrgRefreshing: boolean;
7240
7531
  }
7241
7532
  /**
7242
- * Factory function to create a useApiClient hook for your app.
7243
- *
7244
- * This pattern allows the shared package to provide the hook logic
7245
- * while each app provides its own useOrganizations hook and API URL.
7533
+ * Hook that returns apiRequest and deferredApiRequest bound to the current
7534
+ * ApiClientContext. apiUrl is the only parameter because org ID is resolved
7535
+ * at call time via getOrganizationId() from context.
7246
7536
  *
7247
- * Usage in app:
7537
+ * Usage:
7248
7538
  * ```typescript
7249
- * import { createUseApiClient } from '@repo/ui/api'
7250
- * import { useOrganizations } from './organization/hooks/useOrganizations'
7539
+ * import { useApiClient } from '@repo/ui/api'
7251
7540
  *
7252
7541
  * const API_URL = import.meta.env.VITE_API_SERVER || 'http://localhost:5170'
7542
+ *
7543
+ * function useMyClient() {
7544
+ * return useApiClient(API_URL)
7545
+ * }
7546
+ * ```
7547
+ */
7548
+ declare function useApiClient(apiUrl: string): {
7549
+ apiRequest: <T>(endpoint: string, options?: RequestInit) => Promise<T>;
7550
+ deferredApiRequest: <T>(endpoint: string, options?: RequestInit) => Promise<T>;
7551
+ isOrganizationReady: boolean;
7552
+ isInitializing: boolean;
7553
+ };
7554
+ /**
7555
+ * Factory function to create a useApiClient hook for your app.
7556
+ *
7557
+ * @deprecated Use the plain `useApiClient(apiUrl)` hook instead.
7558
+ * The factory pattern is no longer needed because org ID is resolved at
7559
+ * call time via getOrganizationId() from ApiClientContext.
7560
+ *
7561
+ * Migration:
7562
+ * ```typescript
7563
+ * // Before
7253
7564
  * export const useApiClient = createUseApiClient(useOrganizations, API_URL)
7565
+ *
7566
+ * // After
7567
+ * import { useApiClient } from '@repo/ui/api'
7568
+ * // call useApiClient(API_URL) directly in your hook/component
7254
7569
  * ```
7255
7570
  */
7256
7571
  declare function createUseApiClient(useOrganizations: () => UseOrganizationsReturn, apiUrl: string): () => {
@@ -7260,35 +7575,50 @@ declare function createUseApiClient(useOrganizations: () => UseOrganizationsRetu
7260
7575
  isInitializing: boolean;
7261
7576
  };
7262
7577
 
7263
- interface InitializationError {
7264
- layer: 'auth' | 'profile' | 'organization';
7265
- message: string;
7266
- originalError?: Error;
7267
- }
7268
- interface AppInitializationState {
7269
- userReady: boolean;
7270
- organizationReady: boolean;
7271
- allReady: boolean;
7272
- isInitializing: boolean;
7273
- error: InitializationError | null;
7274
- retry: () => void;
7275
- profile: SupabaseUserProfile | null;
7276
- }
7578
+ declare const InitializationContext: react.Context<AppInitializationState | null>;
7277
7579
  /**
7278
- * Factory function to create a useAppInitialization hook for your app.
7580
+ * Consumes the nearest InitializationProvider.
7279
7581
  *
7280
- * Usage in app:
7281
- * ```typescript
7282
- * import { createUseAppInitialization } from '@repo/ui/initialization'
7283
- * import { useOrgInitialization } from './organization/hooks/useOrgInitialization'
7582
+ * @throws {Error} If called outside of an InitializationProvider tree.
7583
+ */
7584
+ declare function useInitialization(): AppInitializationState;
7585
+ /**
7586
+ * Aggregates auth, profile, and organization state into a single initialization context.
7284
7587
  *
7285
- * export const useAppInitialization = createUseAppInitialization(useOrgInitialization)
7286
- * ```
7588
+ * Must be rendered inside:
7589
+ * - An AuthProvider (needs useAuthContext)
7590
+ * - A ProfileProvider (needs useProfile)
7591
+ * - An OrganizationProvider (needs useOrganization)
7287
7592
  *
7288
- * This pattern allows the shared package to provide the hook logic
7289
- * while each app provides its own hook instances.
7593
+ * Initialization Layers (Sequential):
7594
+ * 1. WorkOS Auth (useAuthContext)
7595
+ * 2. User Profile Sync (useProfile)
7596
+ * 3. Organization Context (useOrganization)
7597
+ *
7598
+ * @example
7599
+ * // Org-scoped pages with data queries (most common)
7600
+ * const { organizationReady } = useInitialization()
7601
+ * const { data, isLoading } = useResources()
7602
+ * if (!organizationReady || isLoading) return <SubshellLoader />
7603
+ *
7604
+ * @example
7605
+ * // Pages accessible without org (invitations, pending)
7606
+ * const { userReady, error } = useInitialization()
7607
+ * if (!userReady) return <SubshellLoader />
7608
+ * if (error?.layer === 'organization') {
7609
+ * return <PendingInvitationPage message={error.message} />
7610
+ * }
7611
+ *
7612
+ * @example
7613
+ * // Pages with error handling
7614
+ * const { organizationReady, error, retry } = useInitialization()
7615
+ * if (error?.layer === 'organization') return <NoOrgError error={error} />
7616
+ * if (error) return <ErrorCard error={error} onRetry={retry} />
7617
+ * if (!organizationReady) return <SubshellLoader />
7290
7618
  */
7291
- declare function createUseAppInitialization(useOrgInitialization: () => UseOrgInitializationReturn): () => AppInitializationState;
7619
+ declare function InitializationProvider({ children }: {
7620
+ children: ReactNode;
7621
+ }): react.FunctionComponentElement<react.ProviderProps<AppInitializationState | null>>;
7292
7622
 
7293
- export { AGENT_CONSTANTS, APIClientError, APIErrorAlert, ActionModal, AgentDefinitionDisplay, AgentExecutionTimeline, AgentExecutionVisualizer, AgentIterationEdge, AgentIterationNode, ApiClientProvider, AuthProvider, BaseEdge, BaseNode, CONTAINER_CONSTANTS, ChatHeader, ChatInputArea, ChatInterface, ChatSidebar, CollapsibleJsonSection, CollapsibleSection, ConfigCard, ConfirmationInputModal, ConfirmationModal, ContextViewer, ContractDisplay, CustomModal, CustomSelector, DetailCardSkeleton, ElevasisCoreProvider, ElevasisProvider, ElevasisServiceProvider, ElevasisUIProvider, EmptyState, EmptyVisualizer, ExecutionLogsTable, ExecutionStats, ExecutionStatusBadge, FormFieldRenderer, GRAPH_CONSTANTS, GlowingHandle, GraphBackground, GraphContainer, GraphFitViewButton, GraphFitViewHandler, GraphLegend, JsonViewer, ListSkeleton, MessageBubble, NavigationButton, NewKnowledgeMapEdge, NewKnowledgeMapGraph, NewKnowledgeMapNode, NotificationBell, NotificationItem, NotificationList, NotificationPanel, OperationsService, OrganizationSwitcher, PageNotFound, PageTitleCaption, ResourceCard, ResourceDefinitionSection, ResourceHealthChart, RouterProvider, SHARED_VIZ_CONSTANTS, STATUS_COLORS, StatCard, StatCardSkeleton, StatsCardSkeleton, StyledMarkdown, TIMELINE_CONSTANTS, TabCountBadge, TanStackRouterBridge, TaskCard, TimeRangeSelector, TimelineAxis, TimelineBar, TimelineContainer, TimelineRow, ToolsListDisplay, TrendIndicator, UnifiedWorkflowEdge, UnifiedWorkflowGraph, UnifiedWorkflowNode, UserProfileService, VisualizerContainer, WORKFLOW_CONSTANTS, WorkOSAuthBridge, WorkflowDefinitionDisplay, WorkflowExecutionTimeline, calculateBarPosition, calculateGraphHeight, catalogItemToResourceDefinition, createCssVariablesResolver, createOrganizationsSlice, createUseApiClient, createUseAppInitialization, createUseOrgInitialization, createUseOrganizations, executionsKeys, formatDate, formatDuration, formatErrorMessage, generateShades, getEdgeColor, getEdgeOpacity, getErrorInfo, getErrorTitle, getGraphBackgroundStyles, getHealthColor, getIcon, getPreset, getResourceColor, getResourceIcon, getResourceStatusColor, getStatusColors, getStatusIcon, iconMap, isAPIClientError, mantineThemeOverride, observabilityKeys, scheduleKeys, shouldAnimateEdge, showApiErrorNotification, showErrorNotification, showInfoNotification, showSuccessNotification, showWarningNotification, useActivities, useActivityTrend, useAgentIterationData, useApiClientContext, useAuthContext, useBulkDeleteExecutions, useBusinessImpact, useCancelExecution, useCancelSchedule, useCommandQueue, useCommandQueueTotals, useConnectionHighlight, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateSchedule, useDashboardMetrics, useDeleteExecution, useDeleteSchedule, useDeleteTask, useDirectedChainHighlighting, useElevasisServices, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorTrends, useExecuteAsync, useExecution, useExecutionHealth, useExecutionLogs, useExecutionPath, useExecutions, useFitViewTrigger, useGetExecutionHistory, useGetSchedule, useGraphBackgroundStyles, useGraphHighlighting, useGraphTheme, useListSchedules, useMarkAllAsRead, useMarkAsRead, useMergedExecution, useNewKnowledgeMapLayout, useNodeSelection, useNotificationCount, useNotifications, useOAuthContext, usePatchTask, usePauseSchedule, useReactFlowAgent, useSessionCheck as useRefocusSessionCheck, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResources, useResumeSchedule, useRetryExecution, useRouterContext, useSessionCheck, useStableAccessToken, useSubmitAction, useTimelineData, useTopFailingResources, useUnifiedWorkflowLayout, useUnresolveError, useUpdateAnchor, useUpdateSchedule, useUserProfile, useWorkflowStepsLayout, validateEmail };
7294
- export type { ActivityTrendResponse, AgentIterationEdgeData, AgentIterationNodeData, AgentStatus, ApiClientContextValue, ApiClientProviderProps, ApiErrorDetails, ApiKeyConfig, AppInitializationState, AuthAdapter, AuthConfig, AuthKitConfig, BulkDeleteExecutionsParams, BulkDeleteExecutionsResult, BusinessImpactMetrics, CancelExecutionParams, CancelExecutionResult, ContextViewerProps, CostBreakdownItem, CreateScheduleInput, CreateSessionResponse, DeleteExecutionParams, DirectedChainHighlightingOptions, DirectedChainHighlightingResult, EdgeColorOptions, EdgeOpacityOptions, ElevasisCoreProviderProps, ElevasisCoreThemeConfig, ElevasisProviderProps, ElevasisServiceContextValue, ElevasisServiceProviderProps, ElevasisThemeConfig, ElevasisTokenOverrides, ErrorDistributionItem, ErrorDistributionParams, ErrorFilters, ErrorTrendsParams, ExecuteAsyncParams, ExecuteAsyncResult, ExecutionErrorDetails, ExecutionHistoryItem, ExecutionHistoryResponse, ExecutionLogEntry, ExecutionLogsPageResponse, ExecutionLogsTableProps, ExecutionPathState, ExecutionStatus$1 as ExecutionStatus, FailingResource, FitViewButtonVariant, GlowIntensity, GraphFitViewHandlerProps, GraphHeightOptions, GraphHighlightingResult, GraphMode, GraphThemeColors, InitializationError, JsonViewerProps, KnowledgeMapEdgeData, KnowledgeMapNodeData, LinkProps, ListActivitiesResponse, ListSchedulesFilters, ListSchedulesResponse, NavigationButtonProps, NodeColorType, OAuthConfig, OAuthContextValue, OrganizationsActions, OrganizationsSlice, OrganizationsState, PresetName, ResourcesResponse, RetryExecutionParams, RouterAdapter, SerializedKnowledgeMap, SerializedKnowledgeNode, SessionListItem, StatCardProps, StatusColorScheme, StatusIconColors, StepExecutionData, StyledMarkdownProps, SubmitActionRequest, SubmitActionResponse, TablerIcon, TaskSchedule, ThemePreset, TimelineBarProps, TimelineContainerProps, TimelineRowProps, TopFailingResourcesParams, TrendIndicatorProps, UnifiedWorkflowEdgeData, UnifiedWorkflowNodeData, UpdateScheduleInput, UseActivitiesParams, UseActivityTrendParams, UseApiClientReturn, UseExecutionHealthParams, UseExecutionLogsParams, UseOrgInitializationReturn, UseOrganizationsReturn$1 as UseOrganizationsReturn, UseUserProfileReturn, WithSchemes, WorkflowEdgeType, WorkflowStepEdgeData, WorkflowStepNodeData, WorkflowStepsLayoutInput };
7623
+ export { AGENT_CONSTANTS, APIClientError, APIErrorAlert, ActionModal, AdminGuard, AgentDefinitionDisplay, AgentExecutionTimeline, AgentExecutionVisualizer, AgentIterationEdge, AgentIterationNode, ApiClientProvider, AuthProvider, BaseEdge, BaseNode, CONTAINER_CONSTANTS, ChatHeader, ChatInputArea, ChatInterface, ChatSidebar, CollapsibleJsonSection, CollapsibleSection, ConfigCard, ConfirmationInputModal, ConfirmationModal, ContextViewer, ContractDisplay, CustomModal, CustomSelector, DetailCardSkeleton, ElevasisCoreProvider, ElevasisProvider, ElevasisServiceProvider, ElevasisUIProvider, EmptyState, EmptyVisualizer, ExecutionLogsTable, ExecutionStats, ExecutionStatusBadge, FormFieldRenderer, GRAPH_CONSTANTS, GlowingHandle, GraphBackground, GraphContainer, GraphFitViewButton, GraphFitViewHandler, GraphLegend, InitializationContext, InitializationProvider, JsonViewer, ListSkeleton, MessageBubble, NavigationButton, NewKnowledgeMapEdge, NewKnowledgeMapGraph, NewKnowledgeMapNode, NotificationBell, NotificationItem, NotificationList, NotificationPanel, NotificationProvider, OperationsService, OrganizationProvider, OrganizationSwitcher, PageNotFound, PageTitleCaption, ProfileProvider, ProtectedRoute, ResourceCard, ResourceDefinitionSection, ResourceHealthChart, RouterProvider, SHARED_VIZ_CONSTANTS, STATUS_COLORS, StatCard, StatCardSkeleton, StatsCardSkeleton, StyledMarkdown, TIMELINE_CONSTANTS, TabCountBadge, TanStackRouterBridge, TaskCard, TimeRangeSelector, TimelineAxis, TimelineBar, TimelineContainer, TimelineRow, ToolsListDisplay, TrendIndicator, UnifiedWorkflowEdge, UnifiedWorkflowGraph, UnifiedWorkflowNode, UserProfileService, VisualizerContainer, WORKFLOW_CONSTANTS, WorkOSAuthBridge, WorkflowDefinitionDisplay, WorkflowExecutionTimeline, calculateBarPosition, calculateGraphHeight, catalogItemToResourceDefinition, createCssVariablesResolver, createOrganizationsSlice, createUseApiClient, createUseAppInitialization, createUseOrgInitialization, createUseOrganizations, executionsKeys, formatDate, formatDuration, formatErrorMessage, generateShades, getEdgeColor, getEdgeOpacity, getErrorInfo, getErrorTitle, getGraphBackgroundStyles, getHealthColor, getIcon, getPreset, getResourceColor, getResourceIcon, getResourceStatusColor, getStatusColors, getStatusIcon, iconMap, isAPIClientError, mantineNotificationAdapter, mantineThemeOverride, observabilityKeys, scheduleKeys, shouldAnimateEdge, showApiErrorNotification, showErrorNotification, showInfoNotification, showSuccessNotification, showWarningNotification, useActivities, useActivityTrend, useAgentIterationData, useApiClient, useApiClientContext, useAuthContext, useBulkDeleteExecutions, useBusinessImpact, useCancelExecution, useCancelSchedule, useCommandQueue, useCommandQueueTotals, useConnectionHighlight, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateSchedule, useDashboardMetrics, useDeleteExecution, useDeleteSchedule, useDeleteTask, useDirectedChainHighlighting, useElevasisServices, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorTrends, useExecuteAsync, useExecution, useExecutionHealth, useExecutionLogs, useExecutionPath, useExecutions, useFitViewTrigger, useGetExecutionHistory, useGetSchedule, useGraphBackgroundStyles, useGraphHighlighting, useGraphTheme, useInitialization, useListSchedules, useMarkAllAsRead, useMarkAsRead, useMergedExecution, useNewKnowledgeMapLayout, useNodeSelection, useNotificationAdapter, useNotificationCount, useNotifications, useOAuthContext, useOrganization, usePatchTask, usePauseSchedule, useProfile, useReactFlowAgent, useSessionCheck as useRefocusSessionCheck, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResources, useResumeSchedule, useRetryExecution, useRouterContext, useSessionCheck, useStableAccessToken, useSubmitAction, useTimelineData, useTopFailingResources, useUnifiedWorkflowLayout, useUnresolveError, useUpdateAnchor, useUpdateSchedule, useUserProfile, useWorkflowStepsLayout, validateEmail };
7624
+ export type { ActivityTrendResponse, AdminGuardProps, AgentIterationEdgeData, AgentIterationNodeData, AgentStatus, ApiClientContextValue, ApiClientProviderProps, ApiErrorDetails, ApiKeyConfig, AppInitializationState, AuthAdapter, AuthConfig, AuthKitConfig, BulkDeleteExecutionsParams, BulkDeleteExecutionsResult, BusinessImpactMetrics, CancelExecutionParams, CancelExecutionResult, ContextViewerProps, CostBreakdownItem, CreateScheduleInput, CreateSessionResponse, DeleteExecutionParams, DirectedChainHighlightingOptions, DirectedChainHighlightingResult, EdgeColorOptions, EdgeOpacityOptions, ElevasisCoreProviderProps, ElevasisCoreThemeConfig, ElevasisProviderProps, ElevasisServiceContextValue, ElevasisServiceProviderProps, ElevasisThemeConfig, ElevasisTokenOverrides, ErrorDistributionItem, ErrorDistributionParams, ErrorFilters, ErrorTrendsParams, ExecuteAsyncParams, ExecuteAsyncResult, ExecutionErrorDetails, ExecutionHistoryItem, ExecutionHistoryResponse, ExecutionLogEntry, ExecutionLogsPageResponse, ExecutionLogsTableProps, ExecutionPathState, ExecutionStatus$1 as ExecutionStatus, FailingResource, FitViewButtonVariant, GlowIntensity, GraphFitViewHandlerProps, GraphHeightOptions, GraphHighlightingResult, GraphMode, GraphThemeColors, InitializationError, JsonViewerProps, KnowledgeMapEdgeData, KnowledgeMapNodeData, LinkProps, ListActivitiesResponse, ListSchedulesFilters, ListSchedulesResponse, NavigationButtonProps, NodeColorType, NotificationAdapter, OAuthConfig, OAuthContextValue, OrganizationContextValue, OrganizationsActions, OrganizationsSlice, OrganizationsState, PresetName, ProfileContextValue, ProtectedRouteProps, ResourcesResponse, RetryExecutionParams, RouterAdapter, SerializedKnowledgeMap, SerializedKnowledgeNode, SessionListItem, StatCardProps, StatusColorScheme, StatusIconColors, StepExecutionData, StyledMarkdownProps, SubmitActionRequest, SubmitActionResponse, TablerIcon, TaskSchedule, ThemePreset, TimelineBarProps, TimelineContainerProps, TimelineRowProps, TopFailingResourcesParams, TrendIndicatorProps, UnifiedWorkflowEdgeData, UnifiedWorkflowNodeData, UpdateScheduleInput, UseActivitiesParams, UseActivityTrendParams, UseApiClientReturn, UseExecutionHealthParams, UseExecutionLogsParams, UseOrgInitializationReturn, UseOrganizationsReturn$1 as UseOrganizationsReturn, UseUserProfileReturn, WithSchemes, WorkflowEdgeType, WorkflowStepEdgeData, WorkflowStepNodeData, WorkflowStepsLayoutInput };