@elevasis/ui 1.3.0 → 1.3.1

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 (40) hide show
  1. package/dist/CoreAuthKitInner-3J4RVQO6.js +43 -0
  2. package/dist/api/index.d.ts +7 -31
  3. package/dist/api/index.js +2 -1
  4. package/dist/auth/context.d.ts +23 -5
  5. package/dist/auth/index.d.ts +37 -34
  6. package/dist/auth/index.js +4 -5
  7. package/dist/{chunk-FDCVFCOQ.js → chunk-2JBWPFHF.js} +23 -20
  8. package/dist/{chunk-OLD3NQLI.js → chunk-72HOBFMP.js} +13 -17
  9. package/dist/{chunk-BZTA7IIL.js → chunk-A3MCANC6.js} +295 -1
  10. package/dist/chunk-FWZJH3TL.js +13 -0
  11. package/dist/{chunk-EZMRFWZQ.js → chunk-JBFFCZI4.js} +1 -1
  12. package/dist/chunk-JGJSZ3UE.js +47 -0
  13. package/dist/{chunk-4KAG5U7A.js → chunk-L2CM2CUA.js} +0 -2
  14. package/dist/{chunk-QQOLC46E.js → chunk-NEK6JKPW.js} +1 -1
  15. package/dist/{chunk-SITSZUFW.js → chunk-PVVQTENF.js} +1 -1
  16. package/dist/{chunk-PCBXNHKY.js → chunk-TZPAA4RC.js} +3 -2
  17. package/dist/{chunk-FLJXZ7YC.js → chunk-UMXDDEAG.js} +1 -3
  18. package/dist/{chunk-BWCC6ZJC.js → chunk-XLV6LYN2.js} +15 -60
  19. package/dist/hooks/index.d.ts +2629 -2
  20. package/dist/hooks/index.js +5 -2
  21. package/dist/hooks/published.d.ts +2629 -2
  22. package/dist/hooks/published.js +4 -1
  23. package/dist/index.d.ts +427 -162
  24. package/dist/index.js +13 -13
  25. package/dist/initialization/index.js +3 -3
  26. package/dist/organization/index.js +3 -3
  27. package/dist/profile/index.js +1 -1
  28. package/dist/provider/index.d.ts +5 -17
  29. package/dist/provider/index.js +6 -7
  30. package/dist/provider/published.d.ts +4 -16
  31. package/dist/provider/published.js +5 -6
  32. package/dist/supabase/index.js +2 -47
  33. package/package.json +3 -3
  34. package/dist/CoreAuthKitInner-KM72EYJS.js +0 -19
  35. package/dist/api/hooks/useApiClient.d.ts +0 -54
  36. package/dist/api/hooks/useApiClient.d.ts.map +0 -1
  37. package/dist/api/hooks/useApiClient.js +0 -185
  38. package/dist/chunk-NIAVTSMB.js +0 -21
  39. package/dist/chunk-QSVZP2NU.js +0 -214
  40. /package/dist/{chunk-Q47SPRY7.js → chunk-TYV5NJV2.js} +0 -0
package/dist/index.d.ts CHANGED
@@ -182,10 +182,10 @@ interface ElevasisThemeConfig extends ElevasisCoreThemeConfig {
182
182
  }
183
183
  /**
184
184
  * Auth configuration union.
185
- * 'authkit' (WorkOS AuthKit) and 'oauth' (WorkOS Connect) are implemented.
185
+ * 'authkit' (WorkOS AuthKit) is the supported mode.
186
186
  * 'apiKey' is defined for forward type compatibility but will throw at runtime.
187
187
  */
188
- type AuthConfig = AuthKitConfig | OAuthConfig | ApiKeyConfig;
188
+ type AuthConfig = AuthKitConfig | ApiKeyConfig;
189
189
  interface AuthKitConfig {
190
190
  mode: 'authkit';
191
191
  clientId: string;
@@ -196,25 +196,13 @@ interface AuthKitConfig {
196
196
  /** Keep refresh tokens in localStorage. Defaults to false. */
197
197
  devMode?: boolean;
198
198
  }
199
- /** OAuth config for "Sign in with Elevasis" via WorkOS Connect. */
200
- interface OAuthConfig {
201
- mode: 'oauth';
202
- clientId: string;
203
- redirectUri: string;
204
- /** Persist tokens in sessionStorage. Default is memory-only. */
205
- tokenStorage?: 'session';
206
- /** Pre-select organization in WorkOS flow. */
207
- organizationId?: string;
208
- /** Auth provider for the authorize request. Defaults to 'authkit' (hosted login UI). */
209
- provider?: 'authkit' | 'GoogleOAuth' | 'MicrosoftOAuth' | 'GitHubOAuth' | 'AppleOAuth';
210
- }
211
199
  /** Deferred -- will throw at runtime. */
212
200
  interface ApiKeyConfig {
213
201
  mode: 'apiKey';
214
202
  key: string;
215
203
  }
216
204
  interface ElevasisCoreProviderProps {
217
- /** Auth configuration. Supports 'authkit' and 'oauth' modes. */
205
+ /** Auth configuration. Supports 'authkit' mode. */
218
206
  auth: AuthConfig;
219
207
  /**
220
208
  * Elevasis core theme configuration (Mantine-free).
@@ -266,7 +254,7 @@ interface ElevasisCoreProviderProps {
266
254
  children: ReactNode;
267
255
  }
268
256
  interface ElevasisProviderProps {
269
- /** Auth configuration. Supports 'authkit' and 'oauth' modes. */
257
+ /** Auth configuration. Supports 'authkit' mode. */
270
258
  auth: AuthConfig;
271
259
  /**
272
260
  * Elevasis theme configuration.
@@ -3753,6 +3741,34 @@ interface OrgFeatureConfig {
3753
3741
  * Overrides org-level feature config for specific users
3754
3742
  */
3755
3743
  type MembershipFeatureConfig = OrgFeatureConfig;
3744
+ /**
3745
+ * User-global config (stored in users.config)
3746
+ * Training and theme are user-specific, NOT org-specific
3747
+ */
3748
+ interface UserConfig {
3749
+ training?: {
3750
+ enabled?: boolean;
3751
+ allowed_courses?: string[];
3752
+ allowed_course_groups?: CourseGroup[];
3753
+ };
3754
+ theme?: {
3755
+ preset?: 'default' | 'tactical' | 'regal' | 'cyber-volt' | 'aurora' | 'rose-gold' | 'midnight' | 'ember' | 'obsidian' | 'honey' | 'abyss' | 'canopy' | 'slate' | 'cyber-strike' | 'cyber-flux' | 'cyber-void';
3756
+ colorScheme?: 'light' | 'dark' | 'auto';
3757
+ };
3758
+ onboarding?: {
3759
+ completed?: boolean;
3760
+ completedAt?: string;
3761
+ role?: string;
3762
+ primaryUseCase?: string[];
3763
+ experienceLevel?: string;
3764
+ /** Onboarding guide system state (set by checklist/tour system) */
3765
+ guides?: {
3766
+ completedIds?: string[];
3767
+ dismissed?: boolean;
3768
+ completedAt?: string;
3769
+ };
3770
+ };
3771
+ }
3756
3772
 
3757
3773
  /**
3758
3774
  * Organization Membership types based on WorkOS API
@@ -6628,6 +6644,43 @@ declare function useMarkAllAsRead(): _tanstack_react_query.UseMutationResult<voi
6628
6644
  */
6629
6645
  declare function useNotificationCount(): _tanstack_react_query.UseQueryResult<number, Error>;
6630
6646
 
6647
+ /**
6648
+ * Hook that provides a standardized error notification handler
6649
+ * for use in React Query mutation hooks.
6650
+ *
6651
+ * Delegates to the active NotificationAdapter so it works in any
6652
+ * consumer (Mantine, Sonner, console fallback, etc.)
6653
+ *
6654
+ * @example
6655
+ * ```typescript
6656
+ * const mutation = useMutation({
6657
+ * mutationFn: deleteApiKey,
6658
+ * onError: useErrorNotification()
6659
+ * })
6660
+ * ```
6661
+ */
6662
+ declare function useErrorNotification(): (error: unknown) => void;
6663
+
6664
+ /**
6665
+ * Hook that provides a standardized success notification handler.
6666
+ * Delegates to the active NotificationAdapter.
6667
+ */
6668
+ declare function useSuccessNotification(): (title: string, message: string) => void;
6669
+
6670
+ /**
6671
+ * Hook that provides a standardized warning notification handler.
6672
+ * Delegates to the active NotificationAdapter.
6673
+ */
6674
+ declare function useWarningNotification(): (title: string, message: string) => void;
6675
+
6676
+ /**
6677
+ * Generic batch delete hook. Deletes multiple rows from a Supabase table by ID.
6678
+ *
6679
+ * @param tableName - Supabase table name (e.g. 'acq_social_posts')
6680
+ * @param invalidateQueryKeys - Array of query key prefixes to invalidate on success
6681
+ */
6682
+ declare function useBatchDelete(tableName: string, invalidateQueryKeys: readonly (readonly unknown[])[]): _tanstack_react_query.UseMutationResult<void, Error, string[], unknown>;
6683
+
6631
6684
  /**
6632
6685
  * Query key factories for observability hooks.
6633
6686
  * Scoped by organizationId for cache isolation between tenants.
@@ -7014,91 +7067,76 @@ declare class OperationsService {
7014
7067
  archiveSession(sessionId: string): Promise<void>;
7015
7068
  }
7016
7069
 
7017
- interface AuthAdapter {
7018
- user: {
7019
- id: string;
7020
- } | null;
7021
- isLoading: boolean;
7022
- getAccessToken: () => Promise<string>;
7023
- organizationId?: string | null;
7024
- }
7025
- declare function useAuthContext(): AuthAdapter;
7026
- declare function AuthProvider({ value, children }: {
7027
- value: AuthAdapter;
7028
- children: ReactNode;
7029
- }): react.FunctionComponentElement<react.ProviderProps<AuthAdapter | null>>;
7030
-
7031
7070
  /**
7032
- * Bridge component that reads WorkOS AuthKit state and provides it
7033
- * via the generic AuthContext. Place inside AuthKitProvider.
7071
+ * Shared hook for pagination state management.
7072
+ * Encapsulates page state, offset calculation, and reset-on-filter-change.
7034
7073
  *
7035
- * Narrows WorkOS User to { id: string } -- @repo/ui hooks only need the ID.
7036
- * Uses useMemo to stabilize the user object and prevent unnecessary
7037
- * useEffect re-runs in downstream hooks.
7074
+ * @param pageSize - Number of items per page
7075
+ * @param resetDeps - When any dependency changes, page resets to 1. Omit to disable auto-reset.
7076
+ * @param total - When provided, automatically retreats to the last valid page if the current page becomes empty (e.g., after bulk deletion).
7038
7077
  */
7039
- declare function WorkOSAuthBridge({ children }: {
7040
- children: ReactNode;
7041
- }): react_jsx_runtime.JSX.Element;
7042
-
7043
- interface OAuthContextValue {
7044
- user: {
7045
- id: string;
7046
- } | null;
7047
- isLoading: boolean;
7048
- organizationId: string | null;
7049
- getAccessToken: () => Promise<string>;
7050
- error: string | null;
7051
- initiateOAuthFlow: () => void;
7052
- }
7053
- declare function useOAuthContext(): OAuthContextValue;
7078
+ declare function usePaginationState(pageSize: number, resetDeps?: unknown[], total?: number): {
7079
+ page: number;
7080
+ setPage: react.Dispatch<react.SetStateAction<number>>;
7081
+ offset: number;
7082
+ totalPages: (total: number) => number;
7083
+ };
7054
7084
 
7055
7085
  /**
7056
- * Returns a stable reference to getAccessToken that won't change between renders
7086
+ * Generic table row selection hook.
7087
+ * Tracks selected IDs, provides toggle/toggleAll/clear, and computes selection state.
7057
7088
  *
7058
- * This prevents SSE connections from reconnecting unnecessarily when the
7059
- * WorkOS useAuth hook returns a new getAccessToken function reference
7060
- *
7061
- * @example
7062
- * ```tsx
7063
- * const getAccessToken = useStableAccessToken()
7064
- *
7065
- * useEffect(() => {
7066
- * fetchEventSourceWithTokenRefresh({
7067
- * getToken: getAccessToken,
7068
- * // ...
7069
- * })
7070
- * }, [getAccessToken]) // Won't re-run on every render
7071
- * ```
7089
+ * @param items - Current page items (must have `id: string`)
7090
+ * @param allItems - All items across all pages (for "select all" to work across pages). Defaults to `items`.
7072
7091
  */
7073
- declare function useStableAccessToken(): () => Promise<string>;
7092
+ declare function useTableSelection<T extends {
7093
+ id: string;
7094
+ }>(items: T[], allItems?: T[]): {
7095
+ selectedIds: Set<string>;
7096
+ toggle: (id: string) => void;
7097
+ togglePage: () => void;
7098
+ clear: () => void;
7099
+ isPageAllSelected: boolean;
7100
+ isPagePartiallySelected: boolean;
7101
+ selectedCount: number;
7102
+ isSelected: (id: string) => boolean;
7103
+ };
7074
7104
 
7105
+ type SortDirection = 'asc' | 'desc';
7106
+ interface SortState {
7107
+ column: string;
7108
+ direction: SortDirection;
7109
+ }
7075
7110
  /**
7076
- * Checks WorkOS session validity when window/tab regains focus
7077
- *
7078
- * When window or tab becomes visible after inactivity, validates session
7079
- * by attempting to get access token. If session expired (WorkOS inactivity
7080
- * timeout exceeded), signs out user and redirects to login.
7081
- *
7082
- * How it works:
7083
- * 1. Window/tab regains focus after inactivity
7084
- * 2. Cancel all pending queries to prevent 401 error cascade
7085
- * 3. Attempt to get access token from WorkOS
7086
- * 4. If successful: Resume queries with fresh token
7087
- * 5. If failed (session expired): Sign out and redirect to login
7111
+ * Generic table sorting hook.
7112
+ * Manages sort column + direction, and provides a sort utility for client-side data.
7113
+ */
7114
+ declare function useTableSort(defaultColumn: string, defaultDirection?: SortDirection): {
7115
+ sort: SortState;
7116
+ toggleSort: (column: string) => void;
7117
+ };
7118
+ /**
7119
+ * Sort an array of items by a column using accessor functions.
7088
7120
  *
7089
- * @example
7090
- * // In __root.tsx
7091
- * export function RootLayoutComponent() {
7092
- * useSessionCheck()
7093
- * return <YourApp />
7094
- * }
7121
+ * @param data - Array to sort (not mutated)
7122
+ * @param sort - Current sort state
7123
+ * @param accessors - Map of column name → accessor function
7095
7124
  */
7096
- declare function useSessionCheck(): void;
7125
+ declare function sortData<T>(data: T[], sort: SortState, accessors: Record<string, (item: T) => string | number | boolean | null | undefined>): T[];
7126
+ /**
7127
+ * Hook that combines useTableSort with memoized sortData.
7128
+ * Returns the sort state, toggle function, and a memoized sort function.
7129
+ */
7130
+ declare function useSortedData<T>(data: T[], defaultColumn: string, accessors: Record<string, (item: T) => string | number | boolean | null | undefined>, defaultDirection?: SortDirection): {
7131
+ sorted: T[];
7132
+ sort: SortState;
7133
+ toggleSort: (column: string) => void;
7134
+ };
7097
7135
 
7098
7136
  /**
7099
7137
  * Type for the useOrganizations hook return value
7100
7138
  */
7101
- interface UseOrganizationsReturn$1 {
7139
+ interface UseOrganizationsReturn {
7102
7140
  currentWorkOSOrganizationId: string | null;
7103
7141
  currentMembership: MembershipWithDetails | null;
7104
7142
  setCurrentWorkOSOrganizationId: (id: string | null) => void;
@@ -7148,7 +7186,7 @@ interface UseOrgInitializationReturn {
7148
7186
  * This pattern allows the shared package to provide the hook logic
7149
7187
  * while each app provides its own hook instances.
7150
7188
  */
7151
- declare function createUseOrgInitialization(useOrganizations: () => UseOrganizationsReturn$1, useApiClient: () => UseApiClientReturn): () => UseOrgInitializationReturn;
7189
+ declare function createUseOrgInitialization(useOrganizations: () => UseOrganizationsReturn, useApiClient: () => UseApiClientReturn): () => UseOrgInitializationReturn;
7152
7190
 
7153
7191
  interface InitializationError {
7154
7192
  layer: 'auth' | 'profile' | 'organization';
@@ -7180,10 +7218,292 @@ interface AppInitializationState {
7180
7218
  */
7181
7219
  declare function createUseAppInitialization(useOrgInitialization: () => UseOrgInitializationReturn): () => AppInitializationState;
7182
7220
 
7221
+ /**
7222
+ * The value exposed by OrganizationProvider to all consumers.
7223
+ */
7224
+ interface OrganizationContextValue {
7225
+ /** WorkOS organization ID of the currently selected organization. */
7226
+ currentWorkOSOrganizationId: string | null;
7227
+ /** Supabase (UUID) organization ID of the currently selected organization. */
7228
+ currentSupabaseOrganizationId: string | null;
7229
+ /** Full membership record for the currently selected organization. */
7230
+ currentMembership: MembershipWithDetails | null;
7231
+ /** All memberships for the authenticated user. */
7232
+ memberships: MembershipWithDetails[];
7233
+ /** True while the initial membership list is being fetched. */
7234
+ isInitializing: boolean;
7235
+ /** True while a subsequent org switch / refresh is in flight. */
7236
+ isOrgRefreshing: boolean;
7237
+ /** Error message if the membership fetch or org switch failed. */
7238
+ error: string | null;
7239
+ /**
7240
+ * Switch the active organization.
7241
+ *
7242
+ * Persists the selection to `last_visited_org` on the user profile and
7243
+ * invalidates all org-scoped TanStack Query cache entries.
7244
+ *
7245
+ * @param workosOrgId - WorkOS organization ID to switch to.
7246
+ */
7247
+ switchOrganization: (workosOrgId: string) => void;
7248
+ /**
7249
+ * Re-fetch memberships and retry org selection after an error.
7250
+ */
7251
+ retry: () => Promise<void>;
7252
+ }
7253
+ /**
7254
+ * Consumes the nearest OrganizationProvider.
7255
+ *
7256
+ * @throws {Error} If called outside of an OrganizationProvider tree.
7257
+ */
7258
+ declare function useOrganization(): OrganizationContextValue;
7259
+
7260
+ type RestrictionSource = 'org' | 'membership' | null;
7261
+ interface FeatureAccessResult {
7262
+ allowed: boolean;
7263
+ restrictedBy: RestrictionSource;
7264
+ }
7265
+ /**
7266
+ * Factory that creates a `useFeatureAccess` hook scoped to the consumer's
7267
+ * feature configuration.
7268
+ *
7269
+ * @param useInitialization - Initialization hook providing `profile` and `organizationReady`
7270
+ * @param useOrganization - Organization hook providing `currentMembership`
7271
+ * @param optInFeatures - Feature keys that are disabled by default (must be explicitly enabled)
7272
+ * @param getCoursesByGroup - Resolver that maps a course group name to its course slugs
7273
+ *
7274
+ * @example
7275
+ * ```typescript
7276
+ * // In your app's feature-access module
7277
+ * import { createUseFeatureAccess } from '@repo/ui/hooks'
7278
+ * import { useInitialization } from '@repo/ui/initialization'
7279
+ * import { useOrganization } from '@repo/ui/organization'
7280
+ * import { getCoursesByGroup } from './training/registry'
7281
+ *
7282
+ * export const useFeatureAccess = createUseFeatureAccess({
7283
+ * useInitialization,
7284
+ * useOrganization,
7285
+ * optInFeatures: ['acquisition', 'calibration'],
7286
+ * getCoursesByGroup,
7287
+ * })
7288
+ * ```
7289
+ */
7290
+ declare function createUseFeatureAccess({ useInitialization, useOrganization, optInFeatures, getCoursesByGroup }: {
7291
+ useInitialization: () => Pick<AppInitializationState, 'profile' | 'organizationReady'>;
7292
+ useOrganization: () => Pick<OrganizationContextValue, 'currentMembership'>;
7293
+ optInFeatures?: string[];
7294
+ getCoursesByGroup?: (group: CourseGroup) => string[];
7295
+ }): () => {
7296
+ orgConfig: OrgFeatureConfig | undefined;
7297
+ membershipConfig: OrgFeatureConfig | undefined;
7298
+ userConfig: UserConfig | undefined;
7299
+ hasFeature: (featureKey: string) => boolean;
7300
+ checkFeature: (featureKey: string) => FeatureAccessResult;
7301
+ hasTrainingAccess: () => boolean;
7302
+ getAllowedCourses: () => string[] | null;
7303
+ getResolvedCourseAccess: () => string[] | null;
7304
+ hasAccessToCourse: (courseSlug: string) => boolean;
7305
+ getEnabledGroups: () => CourseGroup[];
7306
+ isReady: boolean;
7307
+ };
7308
+
7309
+ interface EventSourceMessage {
7310
+ id: string;
7311
+ event: string;
7312
+ data: string;
7313
+ retry?: number;
7314
+ }
7315
+
7316
+ interface FetchEventSourceWithTokenRefreshOptions {
7317
+ url: string;
7318
+ getToken: () => Promise<string | undefined>;
7319
+ headers?: Record<string, string>;
7320
+ signal: AbortSignal;
7321
+ /** Delay in ms before reconnecting after token refresh. Defaults to 2000. */
7322
+ tokenRefreshDelayMs?: number;
7323
+ onopen?: (response: Response) => void | Promise<void>;
7324
+ onmessage?: (event: EventSourceMessage) => void;
7325
+ onerror?: (error: unknown) => void;
7326
+ onclose?: () => void;
7327
+ }
7328
+
7329
+ interface SSEConnectionManagerOptions {
7330
+ /** Grace period in ms before closing idle connections. Defaults to 5000. */
7331
+ closeGracePeriodMs?: number;
7332
+ }
7333
+ /**
7334
+ * SSE Connection Manager
7335
+ *
7336
+ * Ensures only ONE SSE connection exists per endpoint, preventing duplicate
7337
+ * connections when components re-render or remount.
7338
+ *
7339
+ * Benefits:
7340
+ * - Prevents resource waste from duplicate connections
7341
+ * - Eliminates race conditions from overlapping connections
7342
+ * - Automatically manages connection lifecycle
7343
+ * - Shares single connection across multiple subscribers
7344
+ */
7345
+ declare class SSEConnectionManager {
7346
+ private connections;
7347
+ private closeGracePeriodMs;
7348
+ constructor(options?: SSEConnectionManagerOptions);
7349
+ /**
7350
+ * Subscribe to an SSE endpoint
7351
+ *
7352
+ * If a connection already exists for this endpoint, reuses it.
7353
+ * Otherwise, creates a new connection.
7354
+ *
7355
+ * @param key - Unique identifier for the connection (e.g., 'notifications', 'resource-executive-agent')
7356
+ * @param subscriberId - Unique identifier for this subscriber (usually component instance)
7357
+ * @param options - SSE connection options
7358
+ * @returns Unsubscribe function to call when component unmounts
7359
+ */
7360
+ subscribe(key: string, subscriberId: string, options: Omit<FetchEventSourceWithTokenRefreshOptions, 'signal'>): () => void;
7361
+ /**
7362
+ * Unsubscribe from an SSE endpoint
7363
+ *
7364
+ * If this is the last subscriber, closes the connection after grace period.
7365
+ */
7366
+ private unsubscribe;
7367
+ /**
7368
+ * Force close a connection and all its subscribers
7369
+ */
7370
+ closeConnection(key: string): void;
7371
+ /**
7372
+ * Get current connection status
7373
+ */
7374
+ getConnectionInfo(): Map<string, {
7375
+ url: string;
7376
+ subscribers: number;
7377
+ }>;
7378
+ }
7379
+
7380
+ interface UseSSEConnectionOptions {
7381
+ manager: SSEConnectionManager;
7382
+ /** Shared connection key — all subscribers with the same key share ONE connection. */
7383
+ connectionKey: string;
7384
+ url: string;
7385
+ /** When false the subscription is skipped. Defaults to true. */
7386
+ enabled?: boolean;
7387
+ headers?: Record<string, string>;
7388
+ /** Called for each non-empty SSE message with the raw `event.data` string. */
7389
+ onmessage: (data: string) => void;
7390
+ /**
7391
+ * Called when the connection opens. Return a non-empty string to set it as
7392
+ * the error state (e.g. `response.status === 403 ? 'Access denied' : undefined`).
7393
+ */
7394
+ onopen?: (response: Response) => string | void;
7395
+ onerror?: (err: Error) => void;
7396
+ onclose?: () => void;
7397
+ }
7398
+ /**
7399
+ * Generic SSE subscription hook.
7400
+ *
7401
+ * Handles token refresh, connection state, subscriber ID generation, and
7402
+ * subscribe/cleanup lifecycle via the shared SSEConnectionManager.
7403
+ *
7404
+ * Domain-specific event parsing (e.g. `ExecutionSSEEvent`) stays in the
7405
+ * caller's `onmessage` handler.
7406
+ *
7407
+ * @example
7408
+ * ```typescript
7409
+ * const { connected, error } = useSSEConnection({
7410
+ * manager: sseConnectionManager,
7411
+ * connectionKey: `resource-${resourceId}`,
7412
+ * url: `${API_URL}/api/execution-engine/sse/${resourceId}`,
7413
+ * enabled: isOrganizationReady,
7414
+ * headers: { [HTTP_HEADERS.WORKOS_ORGANIZATION_ID]: orgId },
7415
+ * onmessage: (data) => {
7416
+ * const event = JSON.parse(data)
7417
+ * // handle domain-specific event
7418
+ * },
7419
+ * })
7420
+ * ```
7421
+ */
7422
+ declare function useSSEConnection({ manager, connectionKey, url, enabled, headers, onmessage, onopen, onerror, onclose }: UseSSEConnectionOptions): {
7423
+ connected: boolean;
7424
+ error: string | null;
7425
+ };
7426
+
7427
+ interface AuthContextValue {
7428
+ user: {
7429
+ id: string;
7430
+ } | null;
7431
+ isLoading: boolean;
7432
+ getAccessToken: () => Promise<string>;
7433
+ organizationId?: string | null;
7434
+ /**
7435
+ * Trigger WorkOS AuthKit's sign-in flow (redirect to WorkOS hosted auth page).
7436
+ * Used by ProtectedRoute for auto-recovery when `canRecover()` returns true.
7437
+ */
7438
+ signIn: (options?: {
7439
+ state?: {
7440
+ returnTo?: string;
7441
+ };
7442
+ }) => void;
7443
+ /**
7444
+ * Returns true when a previous session can be recovered (refresh token
7445
+ * exists in storage). ProtectedRoute calls `signIn()` only when this returns
7446
+ * true; otherwise it navigates to the login page.
7447
+ *
7448
+ * Explicit logout clears the stored token, so canRecover() returns false
7449
+ * and the user sees the login page as expected.
7450
+ */
7451
+ canRecover: () => boolean;
7452
+ }
7453
+ declare function useAuthContext(): AuthContextValue;
7454
+ declare function AuthProvider({ value, children }: {
7455
+ value: AuthContextValue;
7456
+ children: ReactNode;
7457
+ }): react.FunctionComponentElement<react.ProviderProps<AuthContextValue | null>>;
7458
+
7459
+ /**
7460
+ * Returns a stable reference to getAccessToken that won't change between renders
7461
+ *
7462
+ * This prevents SSE connections from reconnecting unnecessarily when the
7463
+ * WorkOS useAuth hook returns a new getAccessToken function reference
7464
+ *
7465
+ * @example
7466
+ * ```tsx
7467
+ * const getAccessToken = useStableAccessToken()
7468
+ *
7469
+ * useEffect(() => {
7470
+ * fetchEventSourceWithTokenRefresh({
7471
+ * getToken: getAccessToken,
7472
+ * // ...
7473
+ * })
7474
+ * }, [getAccessToken]) // Won't re-run on every render
7475
+ * ```
7476
+ */
7477
+ declare function useStableAccessToken(): () => Promise<string>;
7478
+
7479
+ /**
7480
+ * Checks WorkOS session validity when window/tab regains focus
7481
+ *
7482
+ * When window or tab becomes visible after inactivity, validates session
7483
+ * by attempting to get access token. If session expired (WorkOS inactivity
7484
+ * timeout exceeded), signs out user and redirects to login.
7485
+ *
7486
+ * How it works:
7487
+ * 1. Window/tab regains focus after inactivity
7488
+ * 2. Cancel all pending queries to prevent 401 error cascade
7489
+ * 3. Attempt to get access token from WorkOS
7490
+ * 4. If successful: Resume queries with fresh token
7491
+ * 5. If failed (session expired): Sign out and redirect to login
7492
+ *
7493
+ * @example
7494
+ * // In __root.tsx
7495
+ * export function RootLayoutComponent() {
7496
+ * useSessionCheck()
7497
+ * return <YourApp />
7498
+ * }
7499
+ */
7500
+ declare function useSessionCheck(): void;
7501
+
7183
7502
  interface ProtectedRouteProps {
7184
7503
  children: ReactNode;
7185
7504
  /**
7186
- * Path to redirect to when user is unauthenticated.
7505
+ * Path to redirect to when user is unauthenticated and the auth adapter
7506
+ * does not provide a `signIn` function.
7187
7507
  * @default '/login'
7188
7508
  */
7189
7509
  redirectTo?: string;
@@ -7209,10 +7529,18 @@ interface ProtectedRouteProps {
7209
7529
  * Headless route guard for authenticated pages.
7210
7530
  *
7211
7531
  * 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
7532
  *
7215
- * Organization-layer errors are allowed through routes like /invitations
7533
+ * When `canRecover()` returns true (refresh token exists), unauthenticated users
7534
+ * are sent directly to WorkOS AuthKit via `signIn()`. WorkOS checks its
7535
+ * server-side session and either signs the user in immediately (page-reload case)
7536
+ * or shows a login form (logged-out case). Explicit logout destroys the
7537
+ * server-side session, so the next auto-signIn correctly presents a login form
7538
+ * rather than looping.
7539
+ *
7540
+ * When `canRecover()` returns false, falls back to navigating to `redirectTo`
7541
+ * (default: '/login') with a `returnTo` search param.
7542
+ *
7543
+ * Organization-layer errors are allowed through -- routes like /invitations
7216
7544
  * must be accessible even when the user has no org membership.
7217
7545
  *
7218
7546
  * @example
@@ -7342,45 +7670,6 @@ declare class UserProfileService {
7342
7670
  }>): Promise<SupabaseUserProfile | null>;
7343
7671
  }
7344
7672
 
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
7673
  /**
7385
7674
  * Provides organization state to its subtree via React Context.
7386
7675
  *
@@ -7522,18 +7811,17 @@ declare function useApiClientContext(): ApiClientContextValue;
7522
7811
  */
7523
7812
  declare function ApiClientProvider({ children, getAccessToken, organizationId, getOrganizationId: getOrganizationIdProp, isOrganizationReady, onError }: ApiClientProviderProps): react_jsx_runtime.JSX.Element;
7524
7813
 
7525
- /**
7526
- * Return type of useOrganizations hook (subset needed by the factory)
7527
- */
7528
- interface UseOrganizationsReturn {
7529
- isInitializing: boolean;
7530
- isOrgRefreshing: boolean;
7531
- }
7532
7814
  /**
7533
7815
  * Hook that returns apiRequest and deferredApiRequest bound to the current
7534
7816
  * ApiClientContext. apiUrl is the only parameter because org ID is resolved
7535
7817
  * at call time via getOrganizationId() from context.
7536
7818
  *
7819
+ * When OrganizationProvider is present in the tree, isOrganizationReady and
7820
+ * isInitializing reflect the live org state (currentWorkOSOrganizationId,
7821
+ * isInitializing, isOrgRefreshing). When OrganizationProvider is absent
7822
+ * (e.g. theme-only mode, testing), the hook falls back to the values from
7823
+ * ApiClientContext.
7824
+ *
7537
7825
  * Usage:
7538
7826
  * ```typescript
7539
7827
  * import { useApiClient } from '@repo/ui/api'
@@ -7551,29 +7839,6 @@ declare function useApiClient(apiUrl: string): {
7551
7839
  isOrganizationReady: boolean;
7552
7840
  isInitializing: boolean;
7553
7841
  };
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
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
7569
- * ```
7570
- */
7571
- declare function createUseApiClient(useOrganizations: () => UseOrganizationsReturn, apiUrl: string): () => {
7572
- apiRequest: <T>(endpoint: string, options?: RequestInit) => Promise<T>;
7573
- deferredApiRequest: <T>(endpoint: string, options?: RequestInit) => Promise<T>;
7574
- isOrganizationReady: boolean;
7575
- isInitializing: boolean;
7576
- };
7577
7842
 
7578
7843
  declare const InitializationContext: react.Context<AppInitializationState | null>;
7579
7844
  /**
@@ -7620,5 +7885,5 @@ declare function InitializationProvider({ children }: {
7620
7885
  children: ReactNode;
7621
7886
  }): react.FunctionComponentElement<react.ProviderProps<AppInitializationState | null>>;
7622
7887
 
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 };
7888
+ 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, WorkflowDefinitionDisplay, WorkflowExecutionTimeline, calculateBarPosition, calculateGraphHeight, catalogItemToResourceDefinition, createCssVariablesResolver, createOrganizationsSlice, createUseAppInitialization, createUseFeatureAccess, 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, sortData, useActivities, useActivityTrend, useAgentIterationData, useApiClient, useApiClientContext, useAuthContext, useBatchDelete, useBulkDeleteExecutions, useBusinessImpact, useCancelExecution, useCancelSchedule, useCommandQueue, useCommandQueueTotals, useConnectionHighlight, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateSchedule, useDashboardMetrics, useDeleteExecution, useDeleteSchedule, useDeleteTask, useDirectedChainHighlighting, useElevasisServices, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorNotification, useErrorTrends, useExecuteAsync, useExecution, useExecutionHealth, useExecutionLogs, useExecutionPath, useExecutions, useFitViewTrigger, useGetExecutionHistory, useGetSchedule, useGraphBackgroundStyles, useGraphHighlighting, useGraphTheme, useInitialization, useListSchedules, useMarkAllAsRead, useMarkAsRead, useMergedExecution, useNewKnowledgeMapLayout, useNodeSelection, useNotificationAdapter, useNotificationCount, useNotifications, useOrganization, usePaginationState, usePatchTask, usePauseSchedule, useProfile, useReactFlowAgent, useSessionCheck as useRefocusSessionCheck, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResources, useResumeSchedule, useRetryExecution, useRouterContext, useSSEConnection, useSessionCheck, useSortedData, useStableAccessToken, useSubmitAction, useSuccessNotification, useTableSelection, useTableSort, useTimelineData, useTopFailingResources, useUnifiedWorkflowLayout, useUnresolveError, useUpdateAnchor, useUpdateSchedule, useUserProfile, useWarningNotification, useWorkflowStepsLayout, validateEmail };
7889
+ export type { ActivityTrendResponse, AdminGuardProps, AgentIterationEdgeData, AgentIterationNodeData, AgentStatus, ApiClientContextValue, ApiClientProviderProps, ApiErrorDetails, ApiKeyConfig, AppInitializationState, AuthConfig, AuthContextValue, 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, OrganizationContextValue, OrganizationsActions, OrganizationsSlice, OrganizationsState, PresetName, ProfileContextValue, ProtectedRouteProps, ResourcesResponse, RetryExecutionParams, RouterAdapter, SerializedKnowledgeMap, SerializedKnowledgeNode, SessionListItem, SortDirection, SortState, 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, UseSSEConnectionOptions, UseUserProfileReturn, WithSchemes, WorkflowEdgeType, WorkflowStepEdgeData, WorkflowStepNodeData, WorkflowStepsLayoutInput };