@optifye/dashboard-core 6.6.14 → 6.9.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.
package/dist/index.d.ts CHANGED
@@ -166,6 +166,8 @@ interface DashboardConfig {
166
166
  skuConfig?: SKUConfig;
167
167
  supervisorConfig?: SupervisorConfig;
168
168
  clipsConfig?: ClipsConfig;
169
+ ticketsConfig?: TicketsConfig;
170
+ mapViewConfig?: MapViewConfig;
169
171
  /** Feature flags or other arbitrary app-specific config values */
170
172
  featureFlags?: Record<string, boolean>;
171
173
  /** Generic object to allow any other custom config values needed by the app or overrides */
@@ -183,6 +185,7 @@ interface DatabaseConfig {
183
185
  shiftConfigurations?: string;
184
186
  qualityMetrics?: string;
185
187
  skus?: string;
188
+ workspace_health?: string;
186
189
  };
187
190
  }
188
191
  interface EntityConfig {
@@ -340,6 +343,30 @@ interface ClipsConfig {
340
343
  /** Enable/disable clips tab in workspace detail view */
341
344
  enabled: boolean;
342
345
  }
346
+ interface TicketsConfig {
347
+ /** Enable/disable tickets page and notifications */
348
+ enabled: boolean;
349
+ }
350
+ interface WorkspacePosition {
351
+ /** Workspace ID/name (e.g., 'WS01', 'WS11') */
352
+ id: string;
353
+ /** X coordinate as percentage (0-100) from left */
354
+ x: number;
355
+ /** Y coordinate as percentage (0-100) from top */
356
+ y: number;
357
+ /** Optional section identifier for grouping */
358
+ section?: string;
359
+ /** Optional size variant for rendering */
360
+ size?: 'default' | 'conveyor' | 'large';
361
+ }
362
+ interface MapViewConfig {
363
+ /** Enable/disable 2D map view toggle */
364
+ enabled: boolean;
365
+ /** Custom workspace positions for the factory floor */
366
+ workspacePositions?: WorkspacePosition[];
367
+ /** Grid container aspect ratio (width:height, default: 16:9) */
368
+ aspectRatio?: number;
369
+ }
343
370
 
344
371
  interface BasePerformanceMetric {
345
372
  id: string;
@@ -401,6 +428,13 @@ interface AuthUser {
401
428
  role_level?: 'owner' | 'plant_head' | 'supervisor' | 'optifye';
402
429
  company_id?: string;
403
430
  first_login_completed?: boolean;
431
+ properties?: {
432
+ company_id?: string;
433
+ access_level?: 'company' | 'factory' | 'line';
434
+ factory_ids?: string[];
435
+ line_ids?: string[];
436
+ [key: string]: any;
437
+ } | null;
404
438
  }
405
439
 
406
440
  /**
@@ -1829,6 +1863,19 @@ declare function useFeatureFlags(): Record<string, boolean>;
1829
1863
  declare function useCustomConfig(): Record<string, unknown>;
1830
1864
  declare function useVideoConfig(): VideoConfig;
1831
1865
 
1866
+ /**
1867
+ * Simplified Auth Context using backend session endpoint
1868
+ *
1869
+ * Key improvements:
1870
+ * - Single API call to backend instead of multiple Supabase queries
1871
+ * - No race conditions
1872
+ * - No timeout promises
1873
+ * - Simpler event handling
1874
+ * - Better error recovery
1875
+ * - Proactive token monitoring and refresh
1876
+ * - Session keep-alive mechanism
1877
+ */
1878
+
1832
1879
  interface AuthContextType {
1833
1880
  session: Session | null;
1834
1881
  user: AuthUser | null;
@@ -2209,32 +2256,70 @@ declare const useLineWorkspaceMetrics: (lineId: string, options?: UseLineWorkspa
2209
2256
  refreshWorkspaces: () => Promise<void>;
2210
2257
  };
2211
2258
 
2259
+ /**
2260
+ * Historical metrics data for a workspace
2261
+ * Matches WorkspaceDetailedMetrics structure for compatibility
2262
+ */
2263
+ interface HistoricWorkspaceMetrics {
2264
+ workspace_id: string;
2265
+ workspace_name: string;
2266
+ line_id: string;
2267
+ line_name: string;
2268
+ company_id: string;
2269
+ company_name: string;
2270
+ date: string;
2271
+ shift_id: number;
2272
+ shift_type: string;
2273
+ total_output: number;
2274
+ target_output: number;
2275
+ total_actions: number;
2276
+ avg_pph: number;
2277
+ pph_threshold: number;
2278
+ efficiency: number;
2279
+ avg_efficiency: number;
2280
+ avg_cycle_time: number;
2281
+ ideal_cycle_time: number;
2282
+ idle_time?: number;
2283
+ output_hourly?: number[];
2284
+ idle_time_hourly?: Record<string, string[]>;
2285
+ hourly_action_counts: number[];
2286
+ shift_start: string;
2287
+ shift_end: string;
2288
+ action_name: string;
2289
+ workspace_rank: number;
2290
+ total_workspaces: number;
2291
+ ideal_output_until_now: number;
2292
+ output_difference: number;
2293
+ performance_score?: number;
2294
+ compliance_efficiency?: number;
2295
+ sop_check?: Record<string, number>;
2296
+ }
2212
2297
  /**
2213
2298
  * @hook useHistoricWorkspaceMetrics
2214
- * @summary Fetches historic detailed metrics for a specific workspace, date, and shift.
2299
+ * @summary Fetches historical performance metrics for a specific workspace, date, and shift
2215
2300
  *
2216
- * @description This hook retrieves detailed performance data for a given workspace from a
2217
- * specific past date and shift. It's designed for looking up historical records rather than
2218
- * real-time data. The `hourly_action_counts` are animated on the initial successful fetch.
2219
- * This hook relies on the `DashboardService` for data retrieval.
2301
+ * @description This hook retrieves metrics for a single date/shift combination,
2302
+ * typically used for viewing historical performance data.
2220
2303
  *
2221
- * @param {string} workspaceId - The unique identifier of the workspace.
2222
- * @param {string} date - The specific date (YYYY-MM-DD) for which to fetch metrics. This is required.
2223
- * @param {number} inputShiftId - The specific shift ID for which to fetch metrics. This is required.
2304
+ * @param {string} workspaceId - The workspace UUID
2305
+ * @param {string} date - Date (YYYY-MM-DD)
2306
+ * @param {number} [shiftId] - Optional shift ID (0=all, 1=day, 2=night)
2224
2307
  *
2225
- * @returns {object} An object containing:
2226
- * @returns {WorkspaceDetailedMetrics | null} metrics - The historic detailed metrics for the workspace, or null if not loaded/found or if parameters are missing.
2227
- * @returns {boolean} isLoading - True if metrics are currently being fetched, false otherwise.
2228
- * @returns {MetricsError | null} error - An error object if fetching failed, null otherwise.
2229
- * @returns {() => Promise<void>} refetch - A function to manually trigger a refetch of the historic metrics (note: animation currently does not re-run on manual refetch).
2308
+ * @returns {object} Object containing:
2309
+ * - metrics: Historical workspace metrics
2310
+ * - isLoading: Loading state
2311
+ * - error: Error state
2312
+ * - refetch: Function to manually refetch data
2230
2313
  *
2231
2314
  * @example
2232
- * const { metrics, isLoading, error } = useHistoricWorkspaceMetrics('ws-001', '2023-10-15', 1);
2233
- * if (isLoading) return <p>Loading historic data...</p>;
2234
- * if (error) return <p>Error: {error.message}</p>;
2315
+ * const { metrics, isLoading, error } = useHistoricWorkspaceMetrics(
2316
+ * 'workspace-123',
2317
+ * '2025-10-16',
2318
+ * 0
2319
+ * );
2235
2320
  */
2236
- declare const useHistoricWorkspaceMetrics: (workspaceId: string, date?: string, inputShiftId?: number) => {
2237
- metrics: WorkspaceDetailedMetrics | null;
2321
+ declare const useHistoricWorkspaceMetrics: (workspaceId: string, date: string, shiftId?: number) => {
2322
+ metrics: HistoricWorkspaceMetrics | null;
2238
2323
  isLoading: boolean;
2239
2324
  error: MetricsError | null;
2240
2325
  refetch: () => Promise<void>;
@@ -2280,53 +2365,44 @@ declare const useLineDetailedMetrics: (lineIdFromProp: string) => {
2280
2365
  };
2281
2366
 
2282
2367
  /**
2283
- * Represents a single entry in the workspace performance leaderboard
2368
+ * Leaderboard entry representing a workspace's performance ranking
2284
2369
  */
2285
2370
  interface LeaderboardEntry {
2371
+ workspace_id: string;
2286
2372
  workspace_name: string;
2287
- total_output: number;
2288
- avg_pph: number;
2373
+ line_id: string;
2289
2374
  efficiency: number;
2290
- workspace_id: string;
2375
+ total_output: number;
2376
+ target_output: number;
2377
+ performance_score: number;
2291
2378
  rank: number;
2292
- [key: string]: any;
2293
2379
  }
2294
2380
  /**
2295
2381
  * @hook useLeaderboardMetrics
2296
- * @summary Fetches and subscribes to top-performing workspaces for a specific production line.
2382
+ * @summary Fetches leaderboard metrics showing top/bottom performing workspaces
2297
2383
  *
2298
- * @description This hook retrieves a ranked list of workspaces based on efficiency for a given
2299
- * production line. It establishes real-time subscriptions to update the leaderboard when changes
2300
- * occur in the database. The data is automatically refreshed at regular intervals (1 minute).
2384
+ * @description This hook retrieves workspace rankings based on performance metrics
2385
+ * for a specific date and shift. The backend API already exists at `/api/dashboard/leaderboard`.
2301
2386
  *
2302
- * @param {string} lineId - The unique identifier of the production line to fetch metrics for.
2303
- * @param {number} [topCount=10] - The number of top performers to retrieve.
2387
+ * @param {string} [date] - Optional date (YYYY-MM-DD), defaults to current operational date
2388
+ * @param {number} [shiftId] - Optional shift ID, defaults to current shift
2389
+ * @param {number} [limit] - Optional limit for results, defaults to 10
2390
+ * @param {'top' | 'bottom' | 'all'} [filter] - Filter type, defaults to 'all'
2304
2391
  *
2305
- * @returns {object} An object containing:
2306
- * @returns {LeaderboardEntry[]} topPerformers - Array of ranked workspace entries, sorted by efficiency.
2307
- * @returns {boolean} isLoading - True if metrics are currently being fetched, false otherwise.
2308
- * @returns {MetricsError | null} error - An error object if fetching failed, null otherwise.
2309
- * @returns {() => Promise<void>} refetch - A function to manually trigger a refetch of the leaderboard.
2392
+ * @returns {object} Object containing:
2393
+ * - leaderboard: Array of leaderboard entries
2394
+ * - isLoading: Loading state
2395
+ * - error: Error state
2396
+ * - refetch: Function to manually refetch data
2310
2397
  *
2311
2398
  * @example
2312
- * const { topPerformers, isLoading, error } = useLeaderboardMetrics('line-123', 5);
2313
- * if (isLoading) return <p>Loading leaderboard...</p>;
2314
- * if (error) return <p>Error: {error.message}</p>;
2315
- * return (
2316
- * <div>
2317
- * <h2>Top Performers</h2>
2318
- * <ul>
2319
- * {topPerformers.map(entry => (
2320
- * <li key={entry.workspace_id}>
2321
- * {entry.rank}. {entry.workspace_name} - Efficiency: {entry.efficiency}%
2322
- * </li>
2323
- * ))}
2324
- * </ul>
2325
- * </div>
2326
- * );
2399
+ * const { leaderboard, isLoading, error } = useLeaderboardMetrics();
2400
+ * if (isLoading) return <div>Loading...</div>;
2401
+ * if (error) return <div>Error: {error.message}</div>;
2402
+ * return <LeaderboardTable data={leaderboard} />;
2327
2403
  */
2328
- declare const useLeaderboardMetrics: (lineId: string, topCount?: number) => {
2329
- topPerformers: LeaderboardEntry[];
2404
+ declare const useLeaderboardMetrics: (date?: string, shiftId?: number, limit?: number, filter?: "top" | "bottom" | "all") => {
2405
+ leaderboard: LeaderboardEntry[];
2330
2406
  isLoading: boolean;
2331
2407
  error: MetricsError | null;
2332
2408
  refetch: () => Promise<void>;
@@ -2766,69 +2842,50 @@ interface UseMessagesResult {
2766
2842
  declare function useMessages(threadId: string | undefined): UseMessagesResult;
2767
2843
 
2768
2844
  /**
2769
- * @interface FactoryOverviewData
2770
- * @description Represents aggregated overview metrics for the entire factory.
2771
- * This is a placeholder and should align with the actual data available or calculated.
2772
- * @property {string} [company_id] - Identifier of the company.
2773
- * @property {string} [factoryId] - Identifier of the factory.
2774
- * @property {string} date - The operational date for which these metrics apply (YYYY-MM-DD).
2775
- * @property {string | number} shiftId - The shift identifier for which these metrics apply.
2776
- * @property {number} totalOutput - Total output from all lines/workspaces in the factory.
2777
- * @property {number} overallEfficiency - Average efficiency across the factory.
2778
- * @property {number} totalWorkspacesActive - Number of workspaces that were active or reporting data.
2779
- * @property {number} totalLinesActive - Number of production lines that were active.
2780
- * @property {number} [alertsCritical] - Number of critical alerts in the factory.
2781
- * @property {string} [lastUpdated] - Timestamp of when this overview was last generated/updated.
2782
- */
2783
- interface FactoryOverviewData {
2784
- company_id?: string;
2785
- factoryId?: string;
2786
- date: string;
2787
- shiftId: string | number;
2788
- totalOutput: number;
2789
- overallEfficiency: number;
2790
- totalWorkspacesActive: number;
2791
- totalLinesActive: number;
2792
- alertsCritical?: number;
2793
- lastUpdated?: string;
2794
- }
2795
- /**
2796
- * @typedef UseFactoryOverviewOptions
2797
- * @description Options for fetching factory overview metrics.
2798
- * @property {string} [date] - Specific date (YYYY-MM-DD) to fetch overview for. Defaults to current operational date.
2799
- * @property {string | number} [shiftId] - Specific shift ID. Defaults to current operational shift.
2800
- * @property {string} [factoryId] - Specific factory ID, if the system supports multiple factories under one company config and this data is available per factory.
2845
+ * Factory overview metrics aggregated across all lines
2801
2846
  */
2802
- interface UseFactoryOverviewOptions {
2803
- date?: string;
2804
- shiftId?: string | number;
2805
- factoryId?: string;
2847
+ interface FactoryOverviewMetrics {
2848
+ total_lines: number;
2849
+ total_workspaces: number;
2850
+ total_output: number;
2851
+ target_output: number;
2852
+ average_efficiency: number;
2853
+ underperforming_workspaces: number;
2854
+ avg_pph: number;
2855
+ avg_cycle_time: number;
2856
+ lines: Array<{
2857
+ line_id: string;
2858
+ line_name: string;
2859
+ efficiency: number;
2860
+ output: number;
2861
+ target: number;
2862
+ status: 'good' | 'warning' | 'critical';
2863
+ }>;
2806
2864
  }
2807
2865
  /**
2808
2866
  * @hook useFactoryOverviewMetrics
2809
- * @summary Fetches aggregated overview metrics for the factory.
2810
- * @description This hook retrieves factory-level summary data (e.g., total output, overall efficiency)
2811
- * for a given date and shift (defaulting to current operational date/shift).
2812
- * It fetches from a table, which defaults to "factory_daily_summary".
2813
- * To make the table name configurable, `databaseConfig.tables.factoryOverviewMetrics` would need to be defined in `DashboardConfig`.
2814
- * Filters are applied for `companyId` (from `entityConfig`) and optionally `factoryId` if provided and supported.
2815
- * This initial version does not implement real-time subscriptions and assumes a pre-aggregated data source (one row per company/factory/date/shift).
2816
- * For more complex calculations from raw data, a dedicated DashboardService method would be more appropriate.
2867
+ * @summary Fetches aggregated factory-wide metrics across all configured lines
2868
+ *
2869
+ * @description This hook retrieves factory-level overview showing performance
2870
+ * across all production lines. The backend API already exists at `/api/dashboard/factory-overview`.
2817
2871
  *
2818
- * @param {UseFactoryOverviewOptions} [options] - Optional parameters to specify date, shift, or factoryId.
2872
+ * @param {string} [date] - Optional date (YYYY-MM-DD), defaults to current operational date
2873
+ * @param {number} [shiftId] - Optional shift ID, defaults to current shift
2819
2874
  *
2820
- * @returns {{ factoryOverview: FactoryOverviewData | null; isLoading: boolean; error: MetricsError | null; refetch: () => Promise<void> }}
2821
- * An object containing the factory overview data, loading state, error state, and a refetch function.
2875
+ * @returns {object} Object containing:
2876
+ * - metrics: Factory overview metrics
2877
+ * - isLoading: Loading state
2878
+ * - error: Error state
2879
+ * - refetch: Function to manually refetch data
2822
2880
  *
2823
2881
  * @example
2824
- * const { factoryOverview, isLoading } = useFactoryOverviewMetrics();
2825
- * if (isLoading) return <p>Loading factory overview...</p>;
2826
- * if (factoryOverview) {
2827
- * // Render overview
2828
- * }
2882
+ * const { metrics, isLoading, error } = useFactoryOverviewMetrics();
2883
+ * if (isLoading) return <div>Loading...</div>;
2884
+ * if (error) return <div>Error: {error.message}</div>;
2885
+ * return <FactoryOverview data={metrics} />;
2829
2886
  */
2830
- declare const useFactoryOverviewMetrics: (options?: UseFactoryOverviewOptions) => {
2831
- factoryOverview: FactoryOverviewData | null;
2887
+ declare const useFactoryOverviewMetrics: (date?: string, shiftId?: number) => {
2888
+ metrics: FactoryOverviewMetrics | null;
2832
2889
  isLoading: boolean;
2833
2890
  error: MetricsError | null;
2834
2891
  refetch: () => Promise<void>;
@@ -3020,7 +3077,18 @@ interface CreateTicketData {
3020
3077
  user_email: string;
3021
3078
  company_id: string;
3022
3079
  }
3080
+ /**
3081
+ * Service for managing support ticket history (now using backend APIs)
3082
+ */
3023
3083
  declare class TicketHistoryService {
3084
+ /**
3085
+ * Helper: Get JWT token for backend API calls
3086
+ */
3087
+ private static getAuthToken;
3088
+ /**
3089
+ * Helper: Get backend URL
3090
+ */
3091
+ private static getBackendUrl;
3024
3092
  /**
3025
3093
  * Create a new support ticket in history
3026
3094
  */
@@ -3262,6 +3330,49 @@ declare function useClipTypesWithCounts(workspaceId: string, date: string, shift
3262
3330
  counts: Record<string, number>;
3263
3331
  };
3264
3332
 
3333
+ interface UseLineShiftConfigResult {
3334
+ /** The shift configuration for the line, or null if not loaded */
3335
+ shiftConfig: ShiftConfig | null;
3336
+ /** Whether the hook is loading data */
3337
+ isLoading: boolean;
3338
+ /** Error message if any */
3339
+ error: string | null;
3340
+ }
3341
+ /**
3342
+ * Custom hook to fetch shift configuration from line_operating_hours table
3343
+ * Supports real-time updates via Supabase subscriptions
3344
+ *
3345
+ * @param lineId - The line UUID to fetch shift config for
3346
+ * @param fallbackConfig - Optional fallback config to use if DB query fails
3347
+ * @returns Shift configuration with loading and error states
3348
+ */
3349
+ declare const useLineShiftConfig: (lineId?: string, fallbackConfig?: ShiftConfig) => UseLineShiftConfigResult;
3350
+
3351
+ interface UseDynamicShiftConfigResult {
3352
+ /** The final shift configuration (DB data with static fallback) */
3353
+ shiftConfig: ShiftConfig;
3354
+ /** Whether the shift config is being loaded from database */
3355
+ isLoading: boolean;
3356
+ /** Error message if any */
3357
+ error: string | null;
3358
+ /** Whether the config came from database (true) or fallback (false) */
3359
+ isFromDatabase: boolean;
3360
+ }
3361
+ /**
3362
+ * Hook that provides shift configuration with intelligent fallback
3363
+ *
3364
+ * Priority order:
3365
+ * 1. Database (line_operating_hours) - if available for the line
3366
+ * 2. Static config from DashboardConfig - as fallback
3367
+ *
3368
+ * This hook automatically switches between database and fallback based on
3369
+ * data availability and provides real-time updates when shift config changes.
3370
+ *
3371
+ * @param lineId - The line UUID to fetch shift config for (optional)
3372
+ * @returns Shift configuration with loading state and source indicator
3373
+ */
3374
+ declare const useDynamicShiftConfig: (lineId?: string) => UseDynamicShiftConfigResult;
3375
+
3265
3376
  /**
3266
3377
  * Interface for navigation method used across packages
3267
3378
  * Abstracts navigation implementation details from components
@@ -3296,6 +3407,20 @@ interface LineNavigationParams {
3296
3407
  shift?: string | number;
3297
3408
  tab?: string;
3298
3409
  }
3410
+ /**
3411
+ * @interface BottleneckClipsNavigationParams
3412
+ * @description Defines the parameters for navigating to the bottleneck clips view.
3413
+ * @property {string} workspaceId - The unique identifier of the workspace.
3414
+ * @property {string} [workspaceName] - Optional display name for the workspace.
3415
+ * @property {string} [date] - Optional ISO date string (YYYY-MM-DD) to specify the context date.
3416
+ * @property {string | number} [shift] - Optional shift ID or identifier for the context.
3417
+ */
3418
+ interface BottleneckClipsNavigationParams {
3419
+ workspaceId: string;
3420
+ workspaceName?: string;
3421
+ date?: string;
3422
+ shift?: string | number;
3423
+ }
3299
3424
  /**
3300
3425
  * @typedef EntityConfigShape
3301
3426
  * @description Shape of the entityConfig object expected from useDashboardConfig.
@@ -3361,6 +3486,7 @@ declare function useNavigation(customNavigate?: NavigationMethod): {
3361
3486
  goToLeaderboard: () => void;
3362
3487
  goToFactoryView: () => void;
3363
3488
  goToProfile: () => void;
3489
+ goToBottleneckClips: ({ workspaceId, workspaceName, date, shift }: BottleneckClipsNavigationParams) => void;
3364
3490
  navigate: NavigationMethod;
3365
3491
  };
3366
3492
 
@@ -3405,30 +3531,100 @@ declare function useWorkspaceNavigation(): {
3405
3531
  }) => WorkspaceNavigationParams;
3406
3532
  };
3407
3533
 
3408
- interface UseWorkspaceHealthOptions extends HealthFilterOptions {
3409
- enableRealtime?: boolean;
3410
- refreshInterval?: number;
3411
- }
3412
- interface UseWorkspaceHealthReturn {
3413
- workspaces: WorkspaceHealthWithStatus[];
3414
- summary: HealthSummary | null;
3415
- loading: boolean;
3416
- error: Error | null;
3417
- refetch: () => Promise<void>;
3418
- }
3419
- declare function useWorkspaceHealth(options?: UseWorkspaceHealthOptions): UseWorkspaceHealthReturn;
3534
+ /**
3535
+ * Options for workspace health monitoring
3536
+ */
3420
3537
  interface UseWorkspaceHealthByIdOptions {
3421
3538
  enableRealtime?: boolean;
3422
3539
  refreshInterval?: number;
3423
3540
  }
3424
- interface UseWorkspaceHealthByIdReturn {
3541
+ /**
3542
+ * @hook useWorkspaceHealthById
3543
+ * @summary Monitors workspace heartbeat and health status in real-time
3544
+ *
3545
+ * @description This hook retrieves workspace health data from the workspace_health table
3546
+ * which tracks heartbeats and connectivity status. It supports real-time subscriptions
3547
+ * for live monitoring.
3548
+ *
3549
+ * @param {string} workspaceId - The workspace UUID to monitor
3550
+ * @param {UseWorkspaceHealthByIdOptions} [options] - Optional configuration
3551
+ * @param {boolean} [options.enableRealtime=false] - Enable real-time subscriptions
3552
+ * @param {number} [options.refreshInterval] - Auto-refresh interval in milliseconds
3553
+ *
3554
+ * @returns {object} Object containing:
3555
+ * - workspace: WorkspaceHealth data or null
3556
+ * - loading: Loading state
3557
+ * - error: Error state
3558
+ * - refetch: Function to manually refetch data
3559
+ *
3560
+ * @example
3561
+ * const { workspace, loading, error } = useWorkspaceHealthById('workspace-123', {
3562
+ * enableRealtime: true,
3563
+ * refreshInterval: 30000
3564
+ * });
3565
+ */
3566
+ declare const useWorkspaceHealthById: (workspaceId: string, options?: UseWorkspaceHealthByIdOptions) => {
3425
3567
  workspace: WorkspaceHealthWithStatus | null;
3426
- metrics: HealthMetrics | null;
3427
3568
  loading: boolean;
3428
- error: Error | null;
3569
+ error: MetricsError | null;
3429
3570
  refetch: () => Promise<void>;
3571
+ };
3572
+
3573
+ /**
3574
+ * Workspace health status data from workspace_health_status table
3575
+ */
3576
+ interface WorkspaceHealthStatusData {
3577
+ id: string;
3578
+ workspace_id: string;
3579
+ line_id: string;
3580
+ company_id: string;
3581
+ last_heartbeat: string;
3582
+ is_healthy: boolean;
3583
+ consecutive_misses: number;
3584
+ instance_memory: any;
3585
+ instance_info: any;
3586
+ workspace_display_name?: string;
3587
+ line_name?: string;
3588
+ company_name?: string;
3589
+ created_at: string;
3590
+ updated_at: string;
3591
+ }
3592
+ /**
3593
+ * Return type for useWorkspaceHealthStatus hook
3594
+ */
3595
+ interface UseWorkspaceHealthStatusReturn {
3596
+ lastHeartbeat: string | null;
3597
+ timeSinceUpdate: string;
3598
+ isHealthy: boolean;
3599
+ healthData: WorkspaceHealthStatusData | null;
3600
+ loading: boolean;
3601
+ error: MetricsError | null;
3602
+ refetch: () => void;
3430
3603
  }
3431
- declare function useWorkspaceHealthById(workspaceId: string, options?: UseWorkspaceHealthByIdOptions): UseWorkspaceHealthByIdReturn;
3604
+ /**
3605
+ * @hook useWorkspaceHealthStatus
3606
+ * @summary Real-time subscription to workspace health status from workspace_health_status table
3607
+ *
3608
+ * @description This hook subscribes to the workspace_health_status table and monitors
3609
+ * the last_heartbeat column for real-time updates. It automatically formats the time
3610
+ * as "Xs ago", "Xm Ys ago", etc. and updates the display every second for accuracy.
3611
+ *
3612
+ * @param {string} workspaceId - The workspace UUID to monitor
3613
+ *
3614
+ * @returns {UseWorkspaceHealthStatusReturn} Object containing:
3615
+ * - lastHeartbeat: ISO timestamp string or null
3616
+ * - timeSinceUpdate: Formatted relative time string (e.g., "30s ago")
3617
+ * - isHealthy: Boolean health status flag
3618
+ * - healthData: Full health status record from database
3619
+ * - loading: Loading state
3620
+ * - error: Error state
3621
+ * - refetch: Function to manually refetch data
3622
+ *
3623
+ * @example
3624
+ * const { lastHeartbeat, timeSinceUpdate, isHealthy } = useWorkspaceHealthStatus('workspace-123');
3625
+ * // timeSinceUpdate: "45s ago" or "5m 30s ago"
3626
+ */
3627
+ declare const useWorkspaceHealthStatus: (workspaceId: string) => UseWorkspaceHealthStatusReturn;
3432
3628
 
3433
3629
  /**
3434
3630
  * @typedef {object} DateTimeConfigShape
@@ -3489,6 +3685,29 @@ interface UseFormatNumberResult {
3489
3685
  */
3490
3686
  declare const useFormatNumber: () => UseFormatNumberResult;
3491
3687
 
3688
+ /**
3689
+ * Session Keep-Alive Hook
3690
+ *
3691
+ * Pings backend periodically to keep session alive and prevent timeout.
3692
+ * Operates silently in the background with no user disruption.
3693
+ *
3694
+ * Features:
3695
+ * - Validates session with backend every 5 minutes
3696
+ * - Prevents session timeout during user activity
3697
+ * - Silent operation - only console logs
3698
+ * - Can be disabled if needed
3699
+ */
3700
+ interface UseSessionKeepAliveOptions {
3701
+ enabled?: boolean;
3702
+ intervalMs?: number;
3703
+ }
3704
+ /**
3705
+ * Hook to keep session alive by periodically validating with backend
3706
+ *
3707
+ * @param options - Configuration options
3708
+ */
3709
+ declare const useSessionKeepAlive: (options?: UseSessionKeepAliveOptions) => void;
3710
+
3492
3711
  type UserRole = 'owner' | 'plant_head' | 'supervisor';
3493
3712
  interface AccessControlReturn {
3494
3713
  userRole: UserRole | null;
@@ -3498,12 +3717,216 @@ interface AccessControlReturn {
3498
3717
  canAccessPage: (path: string) => boolean;
3499
3718
  }
3500
3719
  /**
3501
- * Hook to manage role-based access control
3502
- * TEMPORARILY DISABLED: All users have access to all pages
3720
+ * Hook to manage role-based access control
3721
+ * TEMPORARILY DISABLED: All users have access to all pages
3722
+ *
3723
+ * @returns {AccessControlReturn} Access control utilities and state
3724
+ */
3725
+ declare function useAccessControl(): AccessControlReturn;
3726
+
3727
+ /**
3728
+ * Company user with role and assignment details
3729
+ */
3730
+ interface CompanyUserWithDetails {
3731
+ user_id: string;
3732
+ email: string;
3733
+ role_level: 'owner' | 'plant_head' | 'supervisor' | 'optifye';
3734
+ first_login_completed: boolean;
3735
+ created_at: string;
3736
+ properties: {
3737
+ company_id?: string;
3738
+ access_level?: 'company' | 'factory' | 'line';
3739
+ factory_ids?: string[];
3740
+ line_ids?: string[];
3741
+ invited_by?: string;
3742
+ assigned_via?: string;
3743
+ [key: string]: any;
3744
+ } | null;
3745
+ assigned_lines?: string[];
3746
+ assigned_factories?: string[];
3747
+ }
3748
+ /**
3749
+ * Input for updating user role
3750
+ */
3751
+ interface UpdateUserRoleInput {
3752
+ user_id: string;
3753
+ new_role: 'owner' | 'plant_head' | 'supervisor' | 'optifye';
3754
+ updated_by: string;
3755
+ }
3756
+ /**
3757
+ * Input for assigning user to lines
3758
+ */
3759
+ interface AssignUserToLinesInput {
3760
+ user_id: string;
3761
+ line_ids: string[];
3762
+ assigned_by: string;
3763
+ }
3764
+ /**
3765
+ * Input for assigning user to factories
3766
+ */
3767
+ interface AssignUserToFactoriesInput {
3768
+ user_id: string;
3769
+ factory_ids: string[];
3770
+ assigned_by: string;
3771
+ }
3772
+ /**
3773
+ * Service for managing users in the system (now using backend APIs)
3774
+ */
3775
+ declare class UserManagementService {
3776
+ private supabase;
3777
+ constructor(supabase: SupabaseClient$1);
3778
+ /**
3779
+ * Helper: Get JWT token for backend API calls
3780
+ */
3781
+ private getAuthToken;
3782
+ /**
3783
+ * Helper: Get backend URL
3784
+ */
3785
+ private getBackendUrl;
3786
+ /**
3787
+ * Get all users for a company
3788
+ * @param companyId - Company ID
3789
+ * @param roleFilter - Optional filter by role
3790
+ * @returns Promise<CompanyUserWithDetails[]>
3791
+ */
3792
+ getCompanyUsers(companyId: string, roleFilter?: 'owner' | 'plant_head' | 'supervisor'): Promise<CompanyUserWithDetails[]>;
3793
+ /**
3794
+ * Get ALL users across all companies (optifye role only)
3795
+ * This method bypasses company filtering and returns all users in the system
3796
+ * @param roleFilter - Optional filter by role
3797
+ * @returns Promise<CompanyUserWithDetails[]>
3798
+ */
3799
+ getAllUsers(roleFilter?: 'owner' | 'plant_head' | 'supervisor' | 'optifye'): Promise<CompanyUserWithDetails[]>;
3800
+ /**
3801
+ * Get users for a specific factory (plant head view)
3802
+ * Returns only supervisors assigned to lines in this factory
3803
+ * @param factoryId - Factory ID
3804
+ * @returns Promise<CompanyUserWithDetails[]>
3805
+ */
3806
+ getFactoryUsers(factoryId: string): Promise<CompanyUserWithDetails[]>;
3807
+ /**
3808
+ * Update a user's role
3809
+ * @param input - Update role input
3810
+ */
3811
+ updateUserRole(input: UpdateUserRoleInput): Promise<void>;
3812
+ /**
3813
+ * Assign a user to lines
3814
+ * @param input - Assign to lines input
3815
+ */
3816
+ assignUserToLines(input: AssignUserToLinesInput): Promise<void>;
3817
+ /**
3818
+ * Assign a user to factories
3819
+ * @param input - Assign to factories input
3820
+ */
3821
+ assignUserToFactories(input: AssignUserToFactoriesInput): Promise<void>;
3822
+ /**
3823
+ * Get user statistics for a company
3824
+ * @param companyId - Company ID
3825
+ * @returns Promise with user counts by role
3826
+ */
3827
+ getUserStats(companyId: string): Promise<{
3828
+ total: number;
3829
+ owners: number;
3830
+ plant_heads: number;
3831
+ supervisors: number;
3832
+ }>;
3833
+ /**
3834
+ * Get user statistics across all companies (optifye role only)
3835
+ * @returns Promise with global user counts by role
3836
+ */
3837
+ getAllUserStats(): Promise<{
3838
+ total: number;
3839
+ owners: number;
3840
+ plant_heads: number;
3841
+ supervisors: number;
3842
+ optifye: number;
3843
+ }>;
3844
+ /**
3845
+ * Deactivate a user
3846
+ * @param input - Deactivation input
3847
+ */
3848
+ deactivateUser(input: {
3849
+ user_id: string;
3850
+ deactivated_by: string;
3851
+ }): Promise<void>;
3852
+ /**
3853
+ * Reactivate a user
3854
+ * @param input - Reactivation input
3855
+ */
3856
+ reactivateUser(input: {
3857
+ user_id: string;
3858
+ reactivated_by: string;
3859
+ }): Promise<void>;
3860
+ }
3861
+ /**
3862
+ * Factory function to create UserManagementService
3863
+ */
3864
+ declare const createUserManagementService: (supabase: SupabaseClient$1) => UserManagementService;
3865
+
3866
+ interface TeamManagementPermissions {
3867
+ canAssignLines: (targetUser: CompanyUserWithDetails) => boolean;
3868
+ canAssignFactories: (targetUser: CompanyUserWithDetails) => boolean;
3869
+ canChangeRole: (targetUser: CompanyUserWithDetails) => boolean;
3870
+ canRemoveUser: (targetUser: CompanyUserWithDetails) => boolean;
3871
+ availableRolesToAssign: () => Array<'owner' | 'plant_head' | 'supervisor' | 'optifye'>;
3872
+ canInviteRole: (role: string) => boolean;
3873
+ getAssignmentColumnName: (targetUser: CompanyUserWithDetails) => string;
3874
+ showAssignmentColumn: () => boolean;
3875
+ }
3876
+ /**
3877
+ * Hook for team management permissions
3878
+ * Centralizes all permission logic for managing users
3879
+ */
3880
+ declare function useTeamManagementPermissions(): TeamManagementPermissions;
3881
+
3882
+ /**
3883
+ * Hook to get the user's accessible lines based on their role
3884
+ *
3885
+ * For supervisors: Returns their assigned lines from properties.line_id
3886
+ * For plant heads: Returns lines from their assigned factories
3887
+ * For owners/optifye: Returns all provided lines
3888
+ *
3889
+ * This ensures supervisors can only access their assigned lines
3890
+ */
3891
+ declare function useUserLineAccess(configLineIds?: string[]): {
3892
+ accessibleLineIds: string[];
3893
+ defaultLineId: string | undefined;
3894
+ user: AuthUser | null;
3895
+ };
3896
+ /**
3897
+ * Hook to get the current active lineId
3898
+ * Considers:
3899
+ * 1. URL query parameter (lineId)
3900
+ * 2. User's default line (for supervisors)
3901
+ * 3. Config default
3902
+ */
3903
+ declare function useActiveLineId(queryLineId?: string | null, configLineIds?: string[]): string | undefined;
3904
+ /**
3905
+ * Hook to check if user has access to a specific line
3906
+ */
3907
+ declare function useHasLineAccess(lineId: string | undefined, configLineIds?: string[]): boolean;
3908
+
3909
+ interface LineSupervisor {
3910
+ userId: string;
3911
+ email: string;
3912
+ displayName: string;
3913
+ }
3914
+ interface UseLineSupervisorReturn {
3915
+ supervisorName: string | null;
3916
+ supervisor: LineSupervisor | null;
3917
+ isLoading: boolean;
3918
+ error: Error | null;
3919
+ }
3920
+ /**
3921
+ * Hook to fetch and subscribe to supervisor assignments for a given line
3503
3922
  *
3504
- * @returns {AccessControlReturn} Access control utilities and state
3923
+ * Queries the user_roles table to find supervisors assigned to the specified line.
3924
+ * The assignment is stored in properties.line_id as a JSONB array.
3925
+ *
3926
+ * @param lineId - The UUID of the line to fetch supervisor for
3927
+ * @returns Supervisor information including name, loading state, and error
3505
3928
  */
3506
- declare function useAccessControl(): AccessControlReturn;
3929
+ declare function useLineSupervisor(lineId: string | undefined): UseLineSupervisorReturn;
3507
3930
 
3508
3931
  declare const actionService: {
3509
3932
  getActionsByName(actionNames: string[], companyIdInput?: string): Promise<Action[]>;
@@ -3665,9 +4088,113 @@ declare const authCoreService: {
3665
4088
  fetchCoreUserProfile(supabase: SupabaseClient$1, user: User, profileTable: string, roleColumn?: string): Promise<Partial<AuthUser>>;
3666
4089
  };
3667
4090
 
4091
+ /**
4092
+ * Centralized Auth Service
4093
+ *
4094
+ * Handles all backend auth API calls for enriched user data
4095
+ * Single source of truth for user session state
4096
+ */
4097
+
4098
+ interface EnrichedUserProfile {
4099
+ full_name?: string;
4100
+ phone_number?: string;
4101
+ first_login_completed: boolean;
4102
+ is_active: boolean;
4103
+ created_at?: string;
4104
+ }
4105
+ interface CompanyInfo {
4106
+ id: string;
4107
+ name: string;
4108
+ created_at?: string;
4109
+ }
4110
+ interface LineAssignment {
4111
+ line_id: string;
4112
+ line_name: string;
4113
+ }
4114
+ interface FactoryAssignment {
4115
+ factory_id: string;
4116
+ factory_name: string;
4117
+ }
4118
+ interface UserPermissions {
4119
+ can_manage_users: boolean;
4120
+ can_view_all_lines: boolean;
4121
+ can_manage_targets: boolean;
4122
+ can_access_help_desk: boolean;
4123
+ can_manage_company: boolean;
4124
+ is_supervisor: boolean;
4125
+ is_plant_head: boolean;
4126
+ is_owner: boolean;
4127
+ is_optifye_admin: boolean;
4128
+ }
4129
+ interface EnrichedUser {
4130
+ user_id: string;
4131
+ email: string;
4132
+ authenticated: boolean;
4133
+ profile: EnrichedUserProfile;
4134
+ role: string;
4135
+ company_id?: string;
4136
+ company?: CompanyInfo;
4137
+ line_assignments?: LineAssignment[];
4138
+ factory_assignments?: FactoryAssignment[];
4139
+ permissions: UserPermissions;
4140
+ profile_incomplete?: boolean;
4141
+ message?: string;
4142
+ }
4143
+ interface PermissionsResponse {
4144
+ user_id: string;
4145
+ role: string;
4146
+ company_id?: string;
4147
+ permissions: UserPermissions;
4148
+ }
4149
+ declare class AuthService {
4150
+ private static backendUrl;
4151
+ /**
4152
+ * Fetch enriched user session from backend with 5-minute timeout
4153
+ * This is your SINGLE call to get ALL auth data
4154
+ *
4155
+ * @param accessToken - JWT token from Supabase
4156
+ * @returns Complete user session with profile, permissions, and assignments
4157
+ */
4158
+ static getSession(accessToken: string): Promise<EnrichedUser>;
4159
+ /**
4160
+ * Quick validation check without full profile fetch with timeout
4161
+ * Use this for lightweight auth checks
4162
+ *
4163
+ * @param accessToken - JWT token from Supabase
4164
+ * @returns Boolean indicating if session is valid
4165
+ */
4166
+ static validateSession(accessToken: string): Promise<boolean>;
4167
+ /**
4168
+ * Get just permissions (lightweight call) with timeout
4169
+ * Faster than full session fetch
4170
+ *
4171
+ * @param accessToken - JWT token from Supabase
4172
+ * @returns User permissions and role
4173
+ */
4174
+ static getPermissions(accessToken: string): Promise<PermissionsResponse>;
4175
+ /**
4176
+ * Convert EnrichedUser (backend format) to AuthUser (frontend format)
4177
+ * Ensures backward compatibility with existing code
4178
+ */
4179
+ static toAuthUser(enrichedUser: EnrichedUser): AuthUser;
4180
+ }
4181
+
4182
+ /**
4183
+ * Authentication OTP Service
4184
+ *
4185
+ * SECURITY: This service implements invitation-only authentication
4186
+ * - shouldCreateUser: false prevents auto-account creation
4187
+ * - Requires Supabase "Disable Signup" setting to be enabled
4188
+ * - Only existing users can receive OTP codes
4189
+ */
3668
4190
  declare const authOTPService: {
3669
4191
  /**
3670
4192
  * Send OTP to user's email
4193
+ *
4194
+ * SECURITY NOTES:
4195
+ * - Only sends OTP to EXISTING users (shouldCreateUser: false)
4196
+ * - New users MUST use invitation signup flow
4197
+ * - Prevents unauthorized account creation
3671
4198
  */
3672
4199
  sendOTP(supabase: SupabaseClient$1, email: string): Promise<{
3673
4200
  error: AuthError | null;
@@ -3982,9 +4509,10 @@ declare class SupervisorService {
3982
4509
  getActiveSupervisors(companyId: string): Promise<Supervisor[]>;
3983
4510
  /**
3984
4511
  * Assign a supervisor to a line
3985
- * This is a mock implementation - in production, this would update the database
4512
+ * Updates the supervisor's user_roles.properties to include the line in their line_id array
4513
+ * Note: The database uses 'line_id' (singular) not 'line_ids' (plural)
3986
4514
  * @param lineId - The line ID
3987
- * @param supervisorId - The supervisor ID to assign
4515
+ * @param supervisorId - The supervisor ID to assign (undefined to remove assignment)
3988
4516
  * @returns Promise<boolean> - Success status
3989
4517
  */
3990
4518
  assignSupervisorToLine(lineId: string, supervisorId?: string): Promise<boolean>;
@@ -4020,24 +4548,25 @@ interface CompanyUser {
4020
4548
  updatedAt?: string;
4021
4549
  }
4022
4550
  /**
4023
- * Service for managing user data from the database
4551
+ * Service for managing user data (now using backend APIs)
4024
4552
  */
4025
4553
  declare class UserService {
4026
4554
  private supabase;
4027
4555
  constructor(supabase: SupabaseClient$1);
4028
4556
  /**
4029
- * Fetch all users mapped to a specific company
4030
- * @param companyId - The company ID to fetch users for
4031
- * @returns Promise<CompanyUser[]> - Array of users in the company
4557
+ * Helper: Get JWT token for backend API calls
4032
4558
  */
4033
- getUsersByCompanyId(companyId: string): Promise<CompanyUser[]>;
4559
+ private getAuthToken;
4560
+ /**
4561
+ * Helper: Get backend URL
4562
+ */
4563
+ private getBackendUrl;
4034
4564
  /**
4035
- * Fallback method to fetch users by company ID using basic queries
4036
- * Gets real user emails from the database
4565
+ * Fetch all users mapped to a specific company
4037
4566
  * @param companyId - The company ID to fetch users for
4038
4567
  * @returns Promise<CompanyUser[]> - Array of users in the company
4039
4568
  */
4040
- private getUsersByCompanyIdFallback;
4569
+ getUsersByCompanyId(companyId: string): Promise<CompanyUser[]>;
4041
4570
  /**
4042
4571
  * Check if a user is mapped to a specific company
4043
4572
  * @param userId - The user ID to check
@@ -4098,6 +4627,112 @@ declare class TimezoneService {
4098
4627
  clearCacheEntry(key: string): void;
4099
4628
  }
4100
4629
 
4630
+ /**
4631
+ * User invitation data structure
4632
+ */
4633
+ interface UserInvitation {
4634
+ id: string;
4635
+ email: string;
4636
+ company_id: string;
4637
+ role_level: 'owner' | 'plant_head' | 'supervisor';
4638
+ invited_by: string;
4639
+ invitation_token: string;
4640
+ expires_at: string;
4641
+ accepted_at: string | null;
4642
+ created_at: string;
4643
+ updated_at: string;
4644
+ invitation_message: string | null;
4645
+ line_ids?: string[];
4646
+ factory_ids?: string[];
4647
+ }
4648
+ /**
4649
+ * Invitation with additional details for display
4650
+ */
4651
+ interface InvitationWithDetails extends UserInvitation {
4652
+ company_name: string;
4653
+ invited_by_email: string;
4654
+ seconds_until_expiry: number;
4655
+ is_expired: boolean;
4656
+ }
4657
+ /**
4658
+ * Input for creating a new invitation
4659
+ */
4660
+ interface CreateInvitationInput {
4661
+ email: string;
4662
+ company_id: string;
4663
+ role_level: 'plant_head' | 'supervisor';
4664
+ invited_by: string;
4665
+ invitation_message?: string;
4666
+ line_ids?: string[];
4667
+ factory_ids?: string[];
4668
+ }
4669
+ /**
4670
+ * Service for managing user invitations
4671
+ */
4672
+ declare class InvitationService {
4673
+ private supabase;
4674
+ constructor(supabase: SupabaseClient$1);
4675
+ /**
4676
+ * Create a new user invitation
4677
+ * @param input - Invitation details
4678
+ * @returns Promise<UserInvitation>
4679
+ */
4680
+ createInvitation(input: CreateInvitationInput): Promise<UserInvitation>;
4681
+ /**
4682
+ * Get all invitations for a company
4683
+ * @param companyId - Company ID
4684
+ * @param includeAccepted - Whether to include accepted invitations
4685
+ * @returns Promise<InvitationWithDetails[]>
4686
+ */
4687
+ getCompanyInvitations(companyId: string, includeAccepted?: boolean): Promise<InvitationWithDetails[]>;
4688
+ /**
4689
+ * Get pending invitations for current user (invitations they sent)
4690
+ * @param userId - User ID of the inviter
4691
+ * @returns Promise<InvitationWithDetails[]>
4692
+ */
4693
+ getMyInvitations(userId: string): Promise<InvitationWithDetails[]>;
4694
+ /**
4695
+ * Resend an invitation email
4696
+ * Calls the send-invitation-email Edge Function
4697
+ * @param invitationId - Invitation ID to resend
4698
+ */
4699
+ resendInvitation(invitationId: string): Promise<void>;
4700
+ /**
4701
+ * Cancel a pending invitation
4702
+ * @param invitationId - Invitation ID to cancel
4703
+ */
4704
+ cancelInvitation(invitationId: string): Promise<void>;
4705
+ /**
4706
+ * Validate an invitation token (for signup page)
4707
+ * @param token - Invitation token
4708
+ * @returns Promise<UserInvitation | null>
4709
+ */
4710
+ validateInvitationToken(token: string): Promise<InvitationWithDetails | null>;
4711
+ /**
4712
+ * Get invitation statistics for a company
4713
+ * @param companyId - Company ID
4714
+ * @returns Promise with counts
4715
+ */
4716
+ getInvitationStats(companyId: string): Promise<{
4717
+ pending: number;
4718
+ expired: number;
4719
+ accepted: number;
4720
+ }>;
4721
+ /**
4722
+ * Accept an invitation (mark as accepted)
4723
+ * This is called after user successfully creates their account
4724
+ * @param invitationId - Invitation ID
4725
+ * @param userId - User ID who accepted the invitation
4726
+ */
4727
+ acceptInvitation(invitationId: string, userId: string): Promise<void>;
4728
+ }
4729
+ /**
4730
+ * Create an invitation service instance
4731
+ * @param supabase - Supabase client instance
4732
+ * @returns InvitationService instance
4733
+ */
4734
+ declare const createInvitationService: (supabase: SupabaseClient$1) => InvitationService;
4735
+
4101
4736
  /**
4102
4737
  * Helper object for making authenticated API requests using Supabase auth token.
4103
4738
  * Assumes endpoints are relative to the apiBaseUrl configured in DashboardConfig.
@@ -4283,6 +4918,27 @@ declare const getCompanyMetricsTableName: (companyId: string | undefined, prefix
4283
4918
  */
4284
4919
  declare const getMetricsTablePrefix: (companyId?: string) => string;
4285
4920
 
4921
+ /**
4922
+ * Format a timestamp as relative time with detailed precision
4923
+ * Shows seconds, minutes, hours, or days ago
4924
+ *
4925
+ * @param timestamp - Date object or ISO string timestamp
4926
+ * @returns Formatted relative time string (e.g., "30s ago", "5m 30s ago", "2h ago", "3d ago")
4927
+ *
4928
+ * @example
4929
+ * formatRelativeTime(new Date()) // "0s ago"
4930
+ * formatRelativeTime("2024-01-01T12:00:00Z") // "5m 30s ago"
4931
+ */
4932
+ declare function formatRelativeTime(timestamp: string | Date | null | undefined): string;
4933
+ /**
4934
+ * Get milliseconds until next update for a given timestamp
4935
+ * Used to schedule the next UI update for optimal performance
4936
+ *
4937
+ * @param timestamp - Date object or ISO string timestamp
4938
+ * @returns Milliseconds until next meaningful time change
4939
+ */
4940
+ declare function getNextUpdateInterval(timestamp: string | Date | null | undefined): number;
4941
+
4286
4942
  declare function cn(...inputs: ClassValue[]): string;
4287
4943
 
4288
4944
  interface WorkspaceUrlMapping {
@@ -4598,6 +5254,20 @@ declare const AuthCallback: React.FC<AuthCallbackProps>;
4598
5254
 
4599
5255
  declare const DebugAuth: React__default.FC;
4600
5256
 
5257
+ interface SignupWithInvitationProps {
5258
+ token: string;
5259
+ onSignupComplete?: () => void;
5260
+ onNavigateToLogin?: () => void;
5261
+ }
5262
+ declare const SignupWithInvitation: React__default.FC<SignupWithInvitationProps>;
5263
+
5264
+ interface AcceptInviteProps {
5265
+ token: string;
5266
+ onSuccess?: (email: string) => void;
5267
+ onError?: (error: string) => void;
5268
+ }
5269
+ declare const AcceptInvite: React__default.FC<AcceptInviteProps>;
5270
+
4601
5271
  interface BarChartDataItem {
4602
5272
  name: string;
4603
5273
  [key: string]: string | number | undefined;
@@ -4821,8 +5491,6 @@ interface BreakNotificationPopupProps {
4821
5491
  className?: string;
4822
5492
  /** Line names mapping for display */
4823
5493
  lineNames?: Record<string, string>;
4824
- /** Path to Axel's profile image */
4825
- axelImagePath?: string;
4826
5494
  }
4827
5495
  /**
4828
5496
  * Break notification popup component
@@ -4837,11 +5505,32 @@ interface AxelSuggestion {
4837
5505
  title: string;
4838
5506
  /** Detailed message from Axel */
4839
5507
  message: string;
4840
- /** Type of suggestion (improvement, alert, insight) */
4841
- type: 'improvement' | 'alert' | 'insight';
5508
+ /** Type of suggestion (improvement, alert, insight, bottleneck_triage) */
5509
+ type: 'improvement' | 'alert' | 'insight' | 'bottleneck_triage';
4842
5510
  /** Priority level */
4843
5511
  priority: 'high' | 'medium' | 'low';
5512
+ /** Optional action button configuration */
5513
+ action?: {
5514
+ label: string;
5515
+ onClick: () => void;
5516
+ };
5517
+ /** Optional workstation ID for bottleneck_triage notifications */
5518
+ workstationId?: string;
4844
5519
  }
5520
+ /**
5521
+ * Hook to fetch and manage Axel notifications
5522
+ * @param autoFetch - Whether to automatically fetch notifications on mount (default: true)
5523
+ * @param refreshInterval - Interval in milliseconds to refresh notifications (default: 5 minutes)
5524
+ */
5525
+ declare function useAxelNotifications(autoFetch?: boolean, refreshInterval?: number): {
5526
+ notifications: AxelSuggestion[];
5527
+ currentNotification: AxelSuggestion | null;
5528
+ isLoading: boolean;
5529
+ error: Error | null;
5530
+ fetchNotifications: () => Promise<void>;
5531
+ nextNotification: () => void;
5532
+ dismissCurrentNotification: () => void;
5533
+ };
4845
5534
  interface AxelNotificationPopupProps {
4846
5535
  /** Current suggestion to display */
4847
5536
  suggestion: AxelSuggestion | null;
@@ -4851,8 +5540,6 @@ interface AxelNotificationPopupProps {
4851
5540
  onDismiss?: () => void;
4852
5541
  /** Optional class name for custom styling */
4853
5542
  className?: string;
4854
- /** Path to Axel's profile image */
4855
- axelImagePath?: string;
4856
5543
  }
4857
5544
  /**
4858
5545
  * Axel AI Agent notification popup component
@@ -4860,6 +5547,70 @@ interface AxelNotificationPopupProps {
4860
5547
  */
4861
5548
  declare const AxelNotificationPopup: React__default.FC<AxelNotificationPopupProps>;
4862
5549
 
5550
+ interface DiagnosisOption$1 {
5551
+ id: string;
5552
+ name: string;
5553
+ display_name: string;
5554
+ description?: string;
5555
+ }
5556
+ interface BottleneckClipsModalProps {
5557
+ /** Whether the modal is open */
5558
+ isOpen: boolean;
5559
+ /** Callback when modal is closed */
5560
+ onClose: () => void;
5561
+ /** Workspace ID to display clips for */
5562
+ workspaceId: string;
5563
+ /** Workspace name for display */
5564
+ workspaceName: string;
5565
+ /** Date for clips (YYYY-MM-DD format) */
5566
+ date: string;
5567
+ /** Shift ID */
5568
+ shift: number;
5569
+ /** Total output for the workspace */
5570
+ totalOutput?: number;
5571
+ /** Optional ticket ID to filter clips by specific ticket */
5572
+ ticketId?: string;
5573
+ /** Optional diagnosis options from backend */
5574
+ diagnosisOptions?: DiagnosisOption$1[];
5575
+ /** Optional callback when diagnosis is selected */
5576
+ onDiagnosisSelect?: (diagnosisId: string) => void;
5577
+ }
5578
+ /**
5579
+ * BottleneckClipsModal - Full-screen modal overlay showing bottleneck diagnosis clips
5580
+ * Displays on top of the home page with blurred backdrop
5581
+ */
5582
+ declare const BottleneckClipsModal: React__default.FC<BottleneckClipsModalProps>;
5583
+
5584
+ /**
5585
+ * DiagnosisVideoModal - Plays 15-minute bottleneck diagnosis clips
5586
+ *
5587
+ * This component fetches a clip from the clips table and plays it using
5588
+ * the existing video player infrastructure. The backend automatically
5589
+ * generates these clips when bottleneck tickets are created.
5590
+ *
5591
+ * Flow:
5592
+ * 1. Fetch clip from clips table using clip_id
5593
+ * 2. Extract M3U8 playlist from clip.playlist field
5594
+ * 3. Transform S3 URLs to CloudFront URLs
5595
+ * 4. Create blob URL for playlist
5596
+ * 5. Play using CroppedVideoPlayer (supports byte-range HLS)
5597
+ */
5598
+ interface DiagnosisOption {
5599
+ id: string;
5600
+ name: string;
5601
+ display_name: string;
5602
+ description?: string;
5603
+ }
5604
+ interface DiagnosisVideoModalProps {
5605
+ clipId: string | null;
5606
+ ticketNumber?: string;
5607
+ ticketId?: string;
5608
+ diagnosisOptions?: DiagnosisOption[];
5609
+ onDiagnosisSelect?: (diagnosisId: string) => void;
5610
+ onClose: () => void;
5611
+ }
5612
+ declare function DiagnosisVideoModal({ clipId, ticketNumber, ticketId, diagnosisOptions, onDiagnosisSelect, onClose }: DiagnosisVideoModalProps): react_jsx_runtime.JSX.Element;
5613
+
4863
5614
  interface BaseHistoryCalendarProps {
4864
5615
  dailyData: Record<string, DaySummaryData>;
4865
5616
  displayMonth: Date;
@@ -4924,6 +5675,7 @@ declare const EncouragementOverlay: React__default.FC<EncouragementOverlayProps>
4924
5675
  interface ShiftDisplayProps {
4925
5676
  className?: string;
4926
5677
  variant?: 'default' | 'enhanced';
5678
+ lineId?: string;
4927
5679
  }
4928
5680
  declare const ShiftDisplay: React__default.FC<ShiftDisplayProps>;
4929
5681
 
@@ -4963,6 +5715,24 @@ interface DetailedHealthStatusProps extends HealthStatusIndicatorProps {
4963
5715
  }
4964
5716
  declare const DetailedHealthStatus: React__default.FC<DetailedHealthStatusProps>;
4965
5717
 
5718
+ interface LogoProps {
5719
+ className?: string;
5720
+ alt?: string;
5721
+ }
5722
+ declare const Logo: React__default.FC<LogoProps>;
5723
+
5724
+ interface AxelOrbProps {
5725
+ className?: string;
5726
+ size?: 'sm' | 'md' | 'lg' | 'xl' | '2xl';
5727
+ animate?: boolean;
5728
+ }
5729
+ /**
5730
+ * AxelOrb - A gradient orb component that represents Axel AI
5731
+ * Features a linear gradient from dark blue at the bottom to light blue at the top
5732
+ * Optional floating animation for a more dynamic feel
5733
+ */
5734
+ declare const AxelOrb: React__default.FC<AxelOrbProps>;
5735
+
4966
5736
  interface LinePdfExportButtonProps {
4967
5737
  /** The DOM element or a selector string for the element to capture. */
4968
5738
  targetElement: HTMLElement | string;
@@ -5388,6 +6158,20 @@ interface BottlenecksContentProps {
5388
6158
  * Total output from workspace metrics for cycle completion adjustment
5389
6159
  */
5390
6160
  totalOutput?: number;
6161
+ /**
6162
+ * Optional custom content to replace the video counter (1/34)
6163
+ */
6164
+ customCounterContent?: React.ReactNode;
6165
+ /**
6166
+ * Triage mode - shows clips in direct tile view for last 15 minutes (cycle completions + idle time)
6167
+ * Used for the bottleneck diagnosis popup
6168
+ */
6169
+ triageMode?: boolean;
6170
+ /**
6171
+ * Optional ticket ID to filter clips for a specific ticket
6172
+ * When provided, only shows clips associated with this ticket
6173
+ */
6174
+ ticketId?: string;
5391
6175
  }
5392
6176
  /**
5393
6177
  * Filter type for bottleneck clips - expanded for new video types
@@ -5419,7 +6203,28 @@ interface ClipCounts {
5419
6203
  */
5420
6204
  declare const BottlenecksContent: React__default.FC<BottlenecksContentProps>;
5421
6205
 
5422
- interface WorkspacePosition {
6206
+ declare const DEFAULT_WORKSPACE_POSITIONS: WorkspacePosition[];
6207
+ declare const WORKSPACE_POSITIONS: WorkspacePosition[];
6208
+
6209
+ interface WorkspaceGridProps {
6210
+ workspaces: WorkspaceMetrics[];
6211
+ isPdfMode?: boolean;
6212
+ customWorkspacePositions?: typeof DEFAULT_WORKSPACE_POSITIONS;
6213
+ lineNames?: Record<string, string>;
6214
+ factoryView?: string;
6215
+ line2Uuid?: string;
6216
+ className?: string;
6217
+ videoSources?: {
6218
+ defaultHlsUrl?: string;
6219
+ workspaceHlsUrls?: Record<string, string>;
6220
+ mp4VideoMapping?: Record<string, string>;
6221
+ };
6222
+ onWorkspaceHover?: (workspaceId: string) => void;
6223
+ onWorkspaceHoverEnd?: (workspaceId: string) => void;
6224
+ }
6225
+ declare const WorkspaceGrid: React__default.FC<WorkspaceGridProps>;
6226
+
6227
+ interface WorkspaceGridPosition {
5423
6228
  id: string;
5424
6229
  x: number;
5425
6230
  y: number;
@@ -5443,7 +6248,7 @@ interface WorkspaceGridItemProps {
5443
6248
  shift_id: number;
5444
6249
  date: string;
5445
6250
  };
5446
- position: WorkspacePosition;
6251
+ position: WorkspaceGridPosition;
5447
6252
  isBottleneck?: boolean;
5448
6253
  isLowEfficiency?: boolean;
5449
6254
  isVeryLowEfficiency?: boolean;
@@ -5452,33 +6257,12 @@ interface WorkspaceGridItemProps {
5452
6257
  declare const Legend: () => react_jsx_runtime.JSX.Element;
5453
6258
  declare const WorkspaceGridItem: React__default.FC<WorkspaceGridItemProps>;
5454
6259
 
5455
- declare const DEFAULT_WORKSPACE_POSITIONS: WorkspacePosition[];
5456
- declare const WORKSPACE_POSITIONS: WorkspacePosition[];
5457
-
5458
- interface WorkspaceGridProps {
5459
- workspaces: WorkspaceMetrics[];
5460
- isPdfMode?: boolean;
5461
- customWorkspacePositions?: typeof DEFAULT_WORKSPACE_POSITIONS;
5462
- lineNames?: Record<string, string>;
5463
- factoryView?: string;
5464
- line2Uuid?: string;
5465
- className?: string;
5466
- videoSources?: {
5467
- defaultHlsUrl?: string;
5468
- workspaceHlsUrls?: Record<string, string>;
5469
- mp4VideoMapping?: Record<string, string>;
5470
- };
5471
- onWorkspaceHover?: (workspaceId: string) => void;
5472
- onWorkspaceHoverEnd?: (workspaceId: string) => void;
5473
- }
5474
- declare const WorkspaceGrid: React__default.FC<WorkspaceGridProps>;
5475
-
5476
6260
  interface TargetWorkspaceGridProps {
5477
6261
  lineId: string;
5478
6262
  selectedWorkspaces: string[];
5479
6263
  onWorkspaceSelect: (workspaceId: string) => void;
5480
6264
  previouslyAssignedWorkspaces?: string[];
5481
- positions: WorkspacePosition[];
6265
+ positions: WorkspaceGridPosition[];
5482
6266
  lineNames?: Record<string, string>;
5483
6267
  className?: string;
5484
6268
  }
@@ -5500,6 +6284,18 @@ interface VideoGridViewProps {
5500
6284
  */
5501
6285
  declare const VideoGridView: React__default.FC<VideoGridViewProps>;
5502
6286
 
6287
+ interface MapGridViewProps {
6288
+ workspaces: WorkspaceMetrics[];
6289
+ className?: string;
6290
+ onWorkspaceHover?: (workspaceId: string) => void;
6291
+ onWorkspaceHoverEnd?: (workspaceId: string) => void;
6292
+ }
6293
+ /**
6294
+ * MapGridView component - 2D factory floor map view with workspace positions
6295
+ * Shows workspaces in their physical factory layout with performance metrics overlaid
6296
+ */
6297
+ declare const MapGridView: React__default.FC<MapGridViewProps>;
6298
+
5503
6299
  interface VideoCardProps {
5504
6300
  workspace: WorkspaceMetrics;
5505
6301
  hlsUrl: string;
@@ -5674,11 +6470,12 @@ interface DashboardHeaderProps {
5674
6470
  lineTitle: string;
5675
6471
  className?: string;
5676
6472
  headerControls?: React__default.ReactNode;
6473
+ lineId?: string;
5677
6474
  }
5678
6475
  /**
5679
6476
  * Header component for dashboard pages with title and timer
5680
6477
  */
5681
- declare const DashboardHeader: React__default.MemoExoticComponent<({ lineTitle, className, headerControls }: DashboardHeaderProps) => react_jsx_runtime.JSX.Element>;
6478
+ declare const DashboardHeader: React__default.MemoExoticComponent<({ lineTitle, className, headerControls, lineId }: DashboardHeaderProps) => react_jsx_runtime.JSX.Element>;
5682
6479
 
5683
6480
  interface NoWorkspaceDataProps {
5684
6481
  message?: string;
@@ -5867,6 +6664,8 @@ interface LoadingPageProps {
5867
6664
  message?: string;
5868
6665
  subMessage?: string;
5869
6666
  className?: string;
6667
+ onTimeout?: () => void;
6668
+ timeoutMs?: number;
5870
6669
  }
5871
6670
  declare const LoadingPage: React__default.FC<LoadingPageProps>;
5872
6671
 
@@ -5916,13 +6715,42 @@ interface OptifyeLogoLoaderProps {
5916
6715
  * An enterprise-grade, minimal loader that shows a pulsing Optifye logo.
5917
6716
  *
5918
6717
  * This component relies solely on TailwindCSS utility classes (animate-pulse) and
5919
- * does not introduce any additional dependencies. The logo asset is expected to
5920
- * be available at the public path `/optifye-logo.png` of the consuming Next.js
5921
- * application. If you need to host the asset elsewhere, simply override the
5922
- * `logoSrc` via the `className` or by forking this component.
6718
+ * uses the Logo component which imports the logo from the assets directory
6719
+ * (`optifye-logo.png`).
5923
6720
  */
5924
6721
  declare const OptifyeLogoLoader: React__default.FC<OptifyeLogoLoaderProps>;
5925
6722
 
6723
+ /**
6724
+ * Silent Error Boundary
6725
+ *
6726
+ * Catches all React render errors silently and provides minimal fallback UI.
6727
+ * Errors are logged to console only - users never see technical error messages.
6728
+ *
6729
+ * Key features:
6730
+ * - Logs errors to console with full context
6731
+ * - Shows minimal "loading-like" fallback (not scary error messages)
6732
+ * - Provides subtle recovery option
6733
+ * - Tracks errors for analytics
6734
+ * - Only logout as last resort
6735
+ */
6736
+
6737
+ interface SilentErrorBoundaryProps {
6738
+ children: React__default.ReactNode;
6739
+ }
6740
+ interface SilentErrorBoundaryState {
6741
+ hasError: boolean;
6742
+ errorCount: number;
6743
+ lastError: Error | null;
6744
+ errorInfo: React__default.ErrorInfo | null;
6745
+ }
6746
+ declare class SilentErrorBoundary extends React__default.Component<SilentErrorBoundaryProps, SilentErrorBoundaryState> {
6747
+ constructor(props: SilentErrorBoundaryProps);
6748
+ static getDerivedStateFromError(error: Error): Partial<SilentErrorBoundaryState>;
6749
+ componentDidCatch(error: Error, errorInfo: React__default.ErrorInfo): void;
6750
+ handleClearAndReload: () => void;
6751
+ render(): React__default.ReactNode;
6752
+ }
6753
+
5926
6754
  interface VideoPlayerRef {
5927
6755
  /** The Video.js player instance */
5928
6756
  player: Player | null;
@@ -5989,6 +6817,8 @@ interface VideoPlayerProps {
5989
6817
  onLoadedData?: (player: Player) => void;
5990
6818
  onSeeking?: (player: Player) => void;
5991
6819
  onSeeked?: (player: Player) => void;
6820
+ /** Optional click handler for the video container (for YouTube-style click-to-play/pause) */
6821
+ onClick?: () => void;
5992
6822
  }
5993
6823
  /**
5994
6824
  * Production-ready Video.js React component with HLS support
@@ -6022,6 +6852,20 @@ interface CroppedVideoPlayerProps extends VideoPlayerProps {
6022
6852
  */
6023
6853
  declare const CroppedVideoPlayer: React__default.ForwardRefExoticComponent<CroppedVideoPlayerProps & React__default.RefAttributes<VideoPlayerRef>>;
6024
6854
 
6855
+ interface PlayPauseIndicatorProps {
6856
+ /** Whether to show the indicator */
6857
+ show: boolean;
6858
+ /** Whether the video is playing (true) or paused (false) */
6859
+ isPlaying: boolean;
6860
+ /** Duration in ms for the indicator to fade out (default: 600ms) */
6861
+ duration?: number;
6862
+ }
6863
+ /**
6864
+ * YouTube-style play/pause visual indicator that appears and fades out
6865
+ * when the user clicks to play or pause the video
6866
+ */
6867
+ declare const PlayPauseIndicator: React__default.FC<PlayPauseIndicatorProps>;
6868
+
6025
6869
  interface BackButtonProps {
6026
6870
  /**
6027
6871
  * Click handler for the back button
@@ -6275,6 +7119,13 @@ declare const InteractiveOnboardingTour: React__default.FC<InteractiveOnboarding
6275
7119
  */
6276
7120
  declare const OnboardingDemo: React__default.FC;
6277
7121
 
7122
+ type AcceptInviteViewProps = AcceptInviteProps;
7123
+ /**
7124
+ * Accept Invite View - wrapper for the AcceptInvite component
7125
+ * This handles the invitation acceptance flow when users click the invite link
7126
+ */
7127
+ declare const AcceptInviteView: React__default.FC<AcceptInviteViewProps>;
7128
+
6278
7129
  /**
6279
7130
  * AI Agent Chat View
6280
7131
  *
@@ -6441,6 +7292,7 @@ interface KPIsOverviewViewProps {
6441
7292
  className?: string;
6442
7293
  onBackClick?: () => void;
6443
7294
  backLinkUrl?: string;
7295
+ lineIds?: string[];
6444
7296
  }
6445
7297
  declare const KPIsOverviewView: React__default.FC<KPIsOverviewViewProps>;
6446
7298
 
@@ -6620,6 +7472,43 @@ interface SupervisorManagementViewProps {
6620
7472
  }
6621
7473
  declare const SupervisorManagementView: React__default.FC<SupervisorManagementViewProps>;
6622
7474
 
7475
+ interface TeamManagementViewProps {
7476
+ onNavigate?: (path: string) => void;
7477
+ onBack?: () => void;
7478
+ className?: string;
7479
+ }
7480
+ declare const TeamManagementView: React__default.FC<TeamManagementViewProps>;
7481
+
7482
+ interface BottleneckClipsViewProps {
7483
+ /** Workspace ID to display clips for */
7484
+ workspaceId?: string;
7485
+ /** Workspace name for display */
7486
+ workspaceName?: string;
7487
+ /** Date for clips (YYYY-MM-DD format) */
7488
+ date?: string;
7489
+ /** Shift ID */
7490
+ shift?: number;
7491
+ /** Total output for the workspace */
7492
+ totalOutput?: number;
7493
+ }
7494
+ /**
7495
+ * BottleneckClipsView - Shows clips from the last 15 minutes for bottleneck diagnosis
7496
+ * This is essentially the clips page with a 15-minute filter applied
7497
+ */
7498
+ declare function BottleneckClipsView({ workspaceId: propWorkspaceId, workspaceName: propWorkspaceName, date: propDate, shift: propShift, totalOutput: propTotalOutput, }: BottleneckClipsViewProps): React__default.ReactNode;
7499
+ declare const AuthenticatedBottleneckClipsView: React__default.NamedExoticComponent<BottleneckClipsViewProps>;
7500
+
7501
+ interface TicketsViewProps {
7502
+ companyId?: string;
7503
+ lineId?: string;
7504
+ }
7505
+ /**
7506
+ * TicketsView - Kanban-style ticket management for owners
7507
+ * Shows tickets in two stages: Pending and Diagnosed
7508
+ */
7509
+ declare function TicketsView({ companyId, lineId }: TicketsViewProps): React__default.ReactNode;
7510
+ declare const AuthenticatedTicketsView: React__default.NamedExoticComponent<TicketsViewProps>;
7511
+
6623
7512
  type CoreComponents = {
6624
7513
  Card: any;
6625
7514
  CardHeader: any;
@@ -6630,6 +7519,7 @@ type CoreComponents = {
6630
7519
  Button: any;
6631
7520
  HourlyOutputChart: any;
6632
7521
  VideoGridView: any;
7522
+ MapGridView: any;
6633
7523
  WorkspaceMetricCards: any;
6634
7524
  };
6635
7525
  declare const useRegistry: () => CoreComponents;
@@ -6653,6 +7543,7 @@ declare const DEFAULT_THEME_CONFIG: ThemeConfig;
6653
7543
  declare const DEFAULT_ANALYTICS_CONFIG: AnalyticsConfig;
6654
7544
  declare const DEFAULT_AUTH_CONFIG: AuthConfig;
6655
7545
  declare const DEFAULT_VIDEO_CONFIG: VideoConfig;
7546
+ declare const DEFAULT_MAP_VIEW_CONFIG: MapViewConfig;
6656
7547
  declare const LINE_1_UUID = "98a2287e-8d55-4020-b00d-b9940437e3e1";
6657
7548
  declare const LINE_2_UUID = "d93997bb-ecac-4478-a4a6-008d536b724c";
6658
7549
  declare const DEFAULT_CONFIG: Omit<DashboardConfig, 'supabaseUrl' | 'supabaseKey'>;
@@ -6837,4 +7728,4 @@ interface ThreadSidebarProps {
6837
7728
  }
6838
7729
  declare const ThreadSidebar: React__default.FC<ThreadSidebarProps>;
6839
7730
 
6840
- export { ACTION_NAMES, AIAgentView, type AccessControlReturn, type Action, type ActionName, type ActionService, type ActionThreshold, type ActiveBreak, AdvancedFilterDialog, AdvancedFilterPanel, type AnalyticsConfig, AudioService, AuthCallback, type AuthCallbackProps, AuthCallbackView, type AuthCallbackViewProps, type AuthConfig, AuthProvider, type AuthUser, AuthenticatedFactoryView, AuthenticatedHelpView, AuthenticatedHomeView, AuthenticatedShiftsView, AuthenticatedTargetsView, AuthenticatedWorkspaceHealthView, AxelNotificationPopup, type AxelNotificationPopupProps, type AxelSuggestion, BackButton, BackButtonMinimal, BarChart, type BarChartDataItem, type BarChartProps, type BarProps, BaseHistoryCalendar, type BaseHistoryCalendarProps, type BaseLineMetric, type BasePerformanceMetric, type BottleneckFilterType, type BottleneckVideo, type BottleneckVideoData, BottlenecksContent, type BottlenecksContentProps, type BreadcrumbItem, type Break, BreakNotificationPopup, type BreakNotificationPopupProps, type BreakRowProps, type CacheEntryWithPrefetch, CachePrefetchStatus, type CachePrefetchStatusCallback, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type ChatMessage, type ChatThread, type CleanupFunction, type ClipCounts, type ClipCountsWithIndex, ClipFilterProvider, type ClipFilterState, type ClipsConfig, CompactWorkspaceHealthCard, type CompanyUser, type ComponentOverride, CongratulationsOverlay, type CongratulationsOverlayProps, type CoreComponents, type CropConfig, CroppedVideoPlayer, type CroppedVideoPlayerProps, type CurrentShiftResult, CycleTimeChart, type CycleTimeChartProps, CycleTimeOverTimeChart, type CycleTimeOverTimeChartProps, DEFAULT_ANALYTICS_CONFIG, DEFAULT_AUTH_CONFIG, DEFAULT_CONFIG, DEFAULT_DATABASE_CONFIG, DEFAULT_DATE_TIME_CONFIG, DEFAULT_ENDPOINTS_CONFIG, DEFAULT_ENTITY_CONFIG, DEFAULT_SHIFT_CONFIG, DEFAULT_THEME_CONFIG, DEFAULT_VIDEO_CONFIG, DEFAULT_WORKSPACE_CONFIG, DEFAULT_WORKSPACE_POSITIONS, type DashboardConfig, DashboardHeader, type DashboardKPIs, DashboardLayout, type DashboardLayoutProps, DashboardOverridesProvider, DashboardProvider, type DashboardService, type DatabaseConfig, DateDisplay, type DateTimeConfig, DateTimeDisplay, type DateTimeDisplayProps, type DayHistoryData, type DaySummaryData, DebugAuth, DebugAuthView, DetailedHealthStatus, EmptyStateMessage, type EmptyStateMessageProps, EncouragementOverlay, type EndpointsConfig, type EntityConfig, type ErrorCallback$1 as ErrorCallback, type ExtendedCacheMetrics, type FactoryOverviewData, FactoryView, type FactoryViewProps, FileManagerFilters, FileManagerFilters as FileManagerFiltersProps, FilterDialogTrigger, FirstTimeLoginDebug, FirstTimeLoginHandler, type FormatNumberOptions, type FullyIndexedCallback$1 as FullyIndexedCallback, GaugeChart, type GaugeChartProps, GridComponentsPlaceholder, HamburgerButton, type HamburgerButtonProps, Header, type HeaderProps, type HealthAlertConfig, type HealthAlertHistory, type HealthFilterOptions, type HealthMetrics, type HealthStatus, HealthStatusGrid, HealthStatusIndicator, type HealthSummary, HelpView, type HelpViewProps, type HistoryCalendarProps, HomeView, type HookOverride, type HourlyAchievement, HourlyOutputChart, type HourlyOutputChartProps, type HourlyPerformance, type IPrefetchManager, type ISTDateProps, ISTTimer, type ISTTimerProps, InlineEditableText, InteractiveOnboardingTour, KPICard, type KPICardProps, KPIDetailViewWithDisplayNames as KPIDetailView, type KPIDetailViewProps, KPIGrid, type KPIGridProps, KPIHeader, type KPIHeaderProps, KPISection, type KPITrend, KPIsOverviewView, type KPIsOverviewViewProps, LINE_1_UUID, LINE_2_UUID, LargeOutputProgressChart, type LargeOutputProgressChartProps, LeaderboardDetailViewWithDisplayNames as LeaderboardDetailView, type LeaderboardDetailViewProps, type LeaderboardEntry, Legend, type Line$1 as Line, LineChart, type LineChartDataItem, type LineChartProps, type LineDetails, type LineDisplayData, LineHistoryCalendar, type LineHistoryCalendarProps, type LineInfo, type LineMetrics, LineMonthlyHistory, type LineMonthlyHistoryProps, type LineMonthlyMetric, LineMonthlyPdfGenerator, type LineMonthlyPdfGeneratorProps, type LineNavigationParams, LinePdfExportButton, type LinePdfExportButtonProps, LinePdfGenerator, type LinePdfGeneratorProps, type LineProps, type LineShiftConfig, type LineSnapshot, type LineThreshold, LineWhatsAppShareButton, type LineWhatsAppShareProps, LinesService, LiveTimer, LoadingInline, LoadingInline as LoadingInlineProps, LoadingOverlay, LoadingPage, LoadingSkeleton, LoadingSkeleton as LoadingSkeletonProps, LoadingState, LoadingState as LoadingStateProps, LoginPage, type LoginPageProps, LoginView, type LoginViewProps, MainLayout, type MainLayoutProps, type Metric, MetricCard, type MetricCardProps$1 as MetricCardProps, type MetricsError, MinimalOnboardingPopup, type NavItem, type NavItemTrackingEvent, type NavigationMethod, NewClipsNotification, type NewClipsNotificationProps, NoWorkspaceData, OnboardingDemo, OnboardingTour, type OperatorData, type OperatorInfo, OptifyeAgentClient, type OptifyeAgentContext, type OptifyeAgentRequest, type OptifyeAgentResponse, OptifyeLogoLoader, OutputProgressChart, type OutputProgressChartProps, type OverridesMap, type OverviewLineMetric, type OverviewWorkspaceMetric, PageHeader, type PageHeaderProps, type PageOverride, PieChart, type PieChartProps, type PoorPerformingWorkspace, PrefetchConfigurationError, PrefetchError, PrefetchEvents, type PrefetchKey, type PrefetchManagerConfig, type PrefetchManagerStats, type PrefetchOptions, type PrefetchParams$1 as PrefetchParams, type PrefetchRequest, type PrefetchResult, PrefetchStatus$1 as PrefetchStatus, type PrefetchStatusResult, type PrefetchSubscriptionCallbacks, PrefetchTimeoutError, type ProfileMenuItem, ProfileView, type QualityMetric, type QualityOverview, type QualityService, type RateLimitOptions, type RateLimitResult, type RealtimeService, RegistryProvider, type RenderReadyCallback$1 as RenderReadyCallback, type RoutePath, type S3ClipsAPIParams, S3ClipsSupabaseService as S3ClipsService, type S3Config, type S3ListObjectsParams, S3Service, type S3ServiceConfig, type SKU, type SKUConfig, type SKUCreateInput, type SKUListProps, SKUManagementView, type SKUModalProps, type SKUSelectorProps, type SKUUpdateInput, type SOPCategory$1 as SOPCategory, SOPComplianceChart, type SOPComplianceChartProps, SSEChatClient, type SSEEvent, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, type ShiftConfig, type ShiftConfiguration, type ShiftConfigurationRecord, type ShiftData$3 as ShiftData, ShiftDisplay, type ShiftHistoryData, type ShiftHoursMap, type ShiftPanelProps, type ShiftSummaryData, type ShiftTime, ShiftsView, type ShiftsViewProps, SideNavBar, type SideNavBarProps, type SimpleLine, SimpleOnboardingPopup, SingleVideoStream, type SingleVideoStreamProps, Skeleton, type StatusChangeCallback$1 as StatusChangeCallback, type StreamProxyConfig, type SubscriberId, SubscriptionManager, SubscriptionManagerProvider, type SupabaseClient, SupabaseProvider, type Supervisor, type SupervisorAssignment, type SupervisorConfig, SupervisorDropdown, type SupervisorDropdownProps, type SupervisorManagementData, SupervisorManagementView, type SupervisorManagementViewProps, SupervisorService, type Target, TargetWorkspaceGrid, type TargetWorkspaceGridProps, TargetsViewWithDisplayNames as TargetsView, type TargetsViewProps, type ThemeColorValue, type ThemeConfig, ThreadSidebar, TicketHistory, TicketHistoryService, TimeDisplay, TimePickerDropdown, Timer, TimezoneProvider, TimezoneService, type TrackingEventProperties, type TrendDirection, type UnderperformingWorkspace, type UnderperformingWorkspaces, type UptimeDetails, type UseActiveBreaksResult, type UseClipTypesResult, type UseDashboardMetricsProps, type UseFactoryOverviewOptions, type UseFormatNumberResult, type UseMessagesResult, type UsePrefetchClipCountsOptions$1 as UsePrefetchClipCountsOptions, type UsePrefetchClipCountsResult$1 as UsePrefetchClipCountsResult, type UseRealtimeLineMetricsProps, type UseTargetsOptions, type UseThreadsResult, type UseTicketHistoryReturn, type UseWorkspaceOperatorsOptions, type UserProfileConfig, type UserRole, UserService, VideoCard, type VideoConfig, type VideoCroppingConfig, type VideoCroppingRect, VideoGridView, type VideoIndex, type VideoIndexEntry, type VideoMetadata, VideoPlayer, type VideoPlayerEventData, type VideoPlayerProps, type VideoPlayerRef, VideoPreloader, type VideoSeverity, type VideoSummary, type VideoType, WORKSPACE_POSITIONS, type WhatsAppSendResult, WhatsAppShareButton, type WhatsAppShareButtonProps, type WhatsappService, type Workspace, type WorkspaceActionUpdate, WorkspaceCard, type WorkspaceCardProps, type WorkspaceConfig, WrappedComponent as WorkspaceDetailView, type WorkspaceDetailedMetrics, WorkspaceDisplayNameExample, WorkspaceGrid, WorkspaceGridItem, type WorkspaceGridItemProps, type WorkspaceHealth, WorkspaceHealthCard, type WorkspaceHealthInfo, _default as WorkspaceHealthView, type WorkspaceHealthWithStatus, WorkspaceHistoryCalendar, WorkspaceMetricCards, WorkspaceMetricCardsImpl, type WorkspaceMetricCardsProps, type WorkspaceMetrics, WorkspaceMonthlyDataFetcher, type WorkspaceMonthlyDataFetcherProps, WorkspaceMonthlyHistory, type WorkspaceMonthlyMetric, WorkspaceMonthlyPdfGenerator, type WorkspaceMonthlyPdfGeneratorProps, type WorkspaceNavigationParams, WorkspacePdfExportButton, type WorkspacePdfExportButtonProps, WorkspacePdfGenerator, type WorkspacePdfGeneratorProps, type WorkspacePosition, type WorkspaceQualityData, type WorkspaceUrlMapping, WorkspaceWhatsAppShareButton, type WorkspaceWhatsAppShareProps, actionService, apiUtils, authCoreService, authOTPService, authRateLimitService, checkRateLimit, clearAllRateLimits, clearRateLimit, clearS3VideoCache, clearS3VideoFromCache, clearWorkspaceDisplayNamesCache, cn, createLinesService, createStreamProxyHandler, createSupabaseClient, createSupervisorService, createThrottledReload, createUserService, dashboardService, deleteThread, forceRefreshWorkspaceDisplayNames, formatDateInZone, formatDateTimeInZone, formatISTDate, formatIdleTime, formatTimeInZone, fromUrlFriendlyName, getAllLineDisplayNames, getAllThreadMessages, getAllWorkspaceDisplayNamesAsync, getAnonClient, getBrowserName, getCameraNumber, getCompanyMetricsTableName, getConfigurableShortWorkspaceDisplayName, getConfigurableWorkspaceDisplayName, getConfiguredLineIds, getCoreSessionRecordingProperties, getCoreSessionReplayUrl, getCurrentShift, getCurrentTimeInZone, getDashboardHeaderTimeInZone, getDaysDifferenceInZone, getDefaultCameraStreamUrl, getDefaultLineId, getDefaultTabForWorkspace, getLineDisplayName, getManufacturingInsights, getMetricsTablePrefix, getOperationalDate, getS3SignedUrl, getS3VideoSrc, getShortWorkspaceDisplayName, getShortWorkspaceDisplayNameAsync, getStoredWorkspaceMappings, getSubscriptionManager, getThreadMessages, getUserThreads, getUserThreadsPaginated, getWorkspaceDisplayName, getWorkspaceDisplayNameAsync, getWorkspaceDisplayNamesMap, getWorkspaceFromUrl, getWorkspaceNavigationParams, identifyCoreUser, initializeCoreMixpanel, isLegacyConfiguration, isPrefetchError, isSafari, isTransitionPeriod, isUrlPermanentlyFailed, isValidFactoryViewConfiguration, isValidLineInfoPayload, isValidPrefetchParams, isValidPrefetchStatus, isValidWorkspaceDetailedMetricsPayload, isValidWorkspaceMetricsPayload, isWorkspaceDisplayNamesLoaded, isWorkspaceDisplayNamesLoading, linesService, mergeWithDefaultConfig, migrateLegacyConfiguration, optifyeAgentClient, parseS3Uri, preInitializeWorkspaceDisplayNames, preloadS3Video, preloadS3VideoUrl, preloadS3VideosUrl, preloadVideoUrl, preloadVideosUrl, qualityService, realtimeService, refreshWorkspaceDisplayNames, resetCoreMixpanel, resetFailedUrl, resetSubscriptionManager, s3VideoPreloader, shuffleArray, simulateApiDelay, skuService, startCoreSessionRecording, stopCoreSessionRecording, storeWorkspaceMapping, streamProxyConfig, throttledReloadDashboard, toUrlFriendlyName, trackCoreEvent, trackCorePageView, updateThreadTitle, useAccessControl, useActiveBreaks, useAllWorkspaceMetrics, useAnalyticsConfig, useAppTimezone, useAudioService, useAuth, useAuthConfig, useCanSaveTargets, useClipFilter, useClipTypes, useClipTypesWithCounts, useComponentOverride, useCustomConfig, useDashboardConfig, useDashboardMetrics, useDatabaseConfig, useDateFormatter, useDateTimeConfig, useEndpointsConfig, useEntityConfig, useFactoryOverviewMetrics, useFeatureFlags, useFormatNumber, useHistoricWorkspaceMetrics, useHlsStream, useHlsStreamWithCropping, useHookOverride, useHourEndTimer, useHourlyTargetAchievements, useHourlyTargetMisses, useLeaderboardMetrics, useLineDetailedMetrics, useLineKPIs, useLineMetrics, useLineWorkspaceMetrics, useMessages, useMetrics, useNavigation, useOverrides, usePageOverride, usePrefetchClipCounts, useRealtimeLineMetrics, useRegistry, useSKUs, useShiftConfig, useShifts, useSubscriptionManager, useSubscriptionManagerSafe, useSupabase, useSupabaseClient, useTargets, useTheme, useThemeConfig, useThreads, useTicketHistory, useTimezoneContext, useVideoConfig, useWorkspaceConfig, useWorkspaceDetailedMetrics, useWorkspaceDisplayName, useWorkspaceDisplayNames, useWorkspaceDisplayNamesMap, useWorkspaceHealth, useWorkspaceHealthById, useWorkspaceMetrics, useWorkspaceNavigation, useWorkspaceOperators, userService, videoPrefetchManager, videoPreloader, whatsappService, withAccessControl, withAuth, withRegistry, withTimezone, workspaceHealthService, workspaceService };
7731
+ export { ACTION_NAMES, AIAgentView, AcceptInvite, type AcceptInviteProps, AcceptInviteView, type AcceptInviteViewProps, type AccessControlReturn, type Action, type ActionName, type ActionService, type ActionThreshold, type ActiveBreak, AdvancedFilterDialog, AdvancedFilterPanel, type AnalyticsConfig, type AssignUserToFactoriesInput, type AssignUserToLinesInput, AudioService, AuthCallback, type AuthCallbackProps, AuthCallbackView, type AuthCallbackViewProps, type AuthConfig, AuthProvider, AuthService, type AuthUser, AuthenticatedBottleneckClipsView, AuthenticatedFactoryView, AuthenticatedHelpView, AuthenticatedHomeView, AuthenticatedShiftsView, AuthenticatedTargetsView, AuthenticatedTicketsView, AuthenticatedWorkspaceHealthView, AxelNotificationPopup, type AxelNotificationPopupProps, AxelOrb, type AxelOrbProps, type AxelSuggestion, BackButton, BackButtonMinimal, BarChart, type BarChartDataItem, type BarChartProps, type BarProps, BaseHistoryCalendar, type BaseHistoryCalendarProps, type BaseLineMetric, type BasePerformanceMetric, BottleneckClipsModal, type BottleneckClipsModalProps, type BottleneckClipsNavigationParams, BottleneckClipsView, type BottleneckClipsViewProps, type BottleneckFilterType, type BottleneckVideo, type BottleneckVideoData, BottlenecksContent, type BottlenecksContentProps, type BreadcrumbItem, type Break, BreakNotificationPopup, type BreakNotificationPopupProps, type BreakRowProps, type CacheEntryWithPrefetch, CachePrefetchStatus, type CachePrefetchStatusCallback, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type ChatMessage, type ChatThread, type CleanupFunction, type ClipCounts, type ClipCountsWithIndex, ClipFilterProvider, type ClipFilterState, type ClipsConfig, CompactWorkspaceHealthCard, type CompanyUser, type CompanyUserWithDetails, type ComponentOverride, CongratulationsOverlay, type CongratulationsOverlayProps, type CoreComponents, type CreateInvitationInput, type CropConfig, CroppedVideoPlayer, type CroppedVideoPlayerProps, type CurrentShiftResult, CycleTimeChart, type CycleTimeChartProps, CycleTimeOverTimeChart, type CycleTimeOverTimeChartProps, DEFAULT_ANALYTICS_CONFIG, DEFAULT_AUTH_CONFIG, DEFAULT_CONFIG, DEFAULT_DATABASE_CONFIG, DEFAULT_DATE_TIME_CONFIG, DEFAULT_ENDPOINTS_CONFIG, DEFAULT_ENTITY_CONFIG, DEFAULT_MAP_VIEW_CONFIG, DEFAULT_SHIFT_CONFIG, DEFAULT_THEME_CONFIG, DEFAULT_VIDEO_CONFIG, DEFAULT_WORKSPACE_CONFIG, DEFAULT_WORKSPACE_POSITIONS, type DashboardConfig, DashboardHeader, type DashboardKPIs, DashboardLayout, type DashboardLayoutProps, DashboardOverridesProvider, DashboardProvider, type DashboardService, type DatabaseConfig, DateDisplay, type DateTimeConfig, DateTimeDisplay, type DateTimeDisplayProps, type DayHistoryData, type DaySummaryData, DebugAuth, DebugAuthView, DetailedHealthStatus, type DiagnosisOption$1 as DiagnosisOption, DiagnosisVideoModal, EmptyStateMessage, type EmptyStateMessageProps, EncouragementOverlay, type EndpointsConfig, type EntityConfig, type ErrorCallback$1 as ErrorCallback, type ExtendedCacheMetrics, type FactoryOverviewMetrics, FactoryView, type FactoryViewProps, FileManagerFilters, FileManagerFilters as FileManagerFiltersProps, FilterDialogTrigger, FirstTimeLoginDebug, FirstTimeLoginHandler, type FormatNumberOptions, type FullyIndexedCallback$1 as FullyIndexedCallback, GaugeChart, type GaugeChartProps, GridComponentsPlaceholder, HamburgerButton, type HamburgerButtonProps, Header, type HeaderProps, type HealthAlertConfig, type HealthAlertHistory, type HealthFilterOptions, type HealthMetrics, type HealthStatus, HealthStatusGrid, HealthStatusIndicator, type HealthSummary, HelpView, type HelpViewProps, type HistoricWorkspaceMetrics, type HistoryCalendarProps, HomeView, type HookOverride, type HourlyAchievement, HourlyOutputChart, type HourlyOutputChartProps, type HourlyPerformance, type IPrefetchManager, type ISTDateProps, ISTTimer, type ISTTimerProps, InlineEditableText, InteractiveOnboardingTour, InvitationService, type InvitationWithDetails, KPICard, type KPICardProps, KPIDetailViewWithDisplayNames as KPIDetailView, type KPIDetailViewProps, KPIGrid, type KPIGridProps, KPIHeader, type KPIHeaderProps, KPISection, type KPITrend, KPIsOverviewView, type KPIsOverviewViewProps, LINE_1_UUID, LINE_2_UUID, LargeOutputProgressChart, type LargeOutputProgressChartProps, LeaderboardDetailViewWithDisplayNames as LeaderboardDetailView, type LeaderboardDetailViewProps, type LeaderboardEntry, Legend, type Line$1 as Line, LineChart, type LineChartDataItem, type LineChartProps, type LineDetails, type LineDisplayData, LineHistoryCalendar, type LineHistoryCalendarProps, type LineInfo, type LineMetrics, LineMonthlyHistory, type LineMonthlyHistoryProps, type LineMonthlyMetric, LineMonthlyPdfGenerator, type LineMonthlyPdfGeneratorProps, type LineNavigationParams, LinePdfExportButton, type LinePdfExportButtonProps, LinePdfGenerator, type LinePdfGeneratorProps, type LineProps, type LineShiftConfig, type LineSnapshot, type LineThreshold, LineWhatsAppShareButton, type LineWhatsAppShareProps, LinesService, LiveTimer, LoadingInline, LoadingInline as LoadingInlineProps, LoadingOverlay, LoadingPage, LoadingSkeleton, LoadingSkeleton as LoadingSkeletonProps, LoadingState, LoadingState as LoadingStateProps, LoginPage, type LoginPageProps, LoginView, type LoginViewProps, Logo, type LogoProps, MainLayout, type MainLayoutProps, MapGridView, type MapViewConfig, type Metric, MetricCard, type MetricCardProps$1 as MetricCardProps, type MetricsError, MinimalOnboardingPopup, type NavItem, type NavItemTrackingEvent, type NavigationMethod, NewClipsNotification, type NewClipsNotificationProps, NoWorkspaceData, OnboardingDemo, OnboardingTour, type OperatorData, type OperatorInfo, OptifyeAgentClient, type OptifyeAgentContext, type OptifyeAgentRequest, type OptifyeAgentResponse, OptifyeLogoLoader, OutputProgressChart, type OutputProgressChartProps, type OverridesMap, type OverviewLineMetric, type OverviewWorkspaceMetric, PageHeader, type PageHeaderProps, type PageOverride, PieChart, type PieChartProps, PlayPauseIndicator, type PlayPauseIndicatorProps, type PoorPerformingWorkspace, PrefetchConfigurationError, PrefetchError, PrefetchEvents, type PrefetchKey, type PrefetchManagerConfig, type PrefetchManagerStats, type PrefetchOptions, type PrefetchParams$1 as PrefetchParams, type PrefetchRequest, type PrefetchResult, PrefetchStatus$1 as PrefetchStatus, type PrefetchStatusResult, type PrefetchSubscriptionCallbacks, PrefetchTimeoutError, type ProfileMenuItem, ProfileView, type QualityMetric, type QualityOverview, type QualityService, type RateLimitOptions, type RateLimitResult, type RealtimeService, RegistryProvider, type RenderReadyCallback$1 as RenderReadyCallback, type RoutePath, type S3ClipsAPIParams, S3ClipsSupabaseService as S3ClipsService, type S3Config, type S3ListObjectsParams, S3Service, type S3ServiceConfig, type SKU, type SKUConfig, type SKUCreateInput, type SKUListProps, SKUManagementView, type SKUModalProps, type SKUSelectorProps, type SKUUpdateInput, type SOPCategory$1 as SOPCategory, SOPComplianceChart, type SOPComplianceChartProps, SSEChatClient, type SSEEvent, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, type ShiftConfig, type ShiftConfiguration, type ShiftConfigurationRecord, type ShiftData$3 as ShiftData, ShiftDisplay, type ShiftHistoryData, type ShiftHoursMap, type ShiftPanelProps, type ShiftSummaryData, type ShiftTime, ShiftsView, type ShiftsViewProps, SideNavBar, type SideNavBarProps, SignupWithInvitation, type SignupWithInvitationProps, SilentErrorBoundary, type SimpleLine, SimpleOnboardingPopup, SingleVideoStream, type SingleVideoStreamProps, Skeleton, type StatusChangeCallback$1 as StatusChangeCallback, type StreamProxyConfig, type SubscriberId, SubscriptionManager, SubscriptionManagerProvider, type SupabaseClient, SupabaseProvider, type Supervisor, type SupervisorAssignment, type SupervisorConfig, SupervisorDropdown, type SupervisorDropdownProps, type SupervisorManagementData, SupervisorManagementView, type SupervisorManagementViewProps, SupervisorService, type Target, TargetWorkspaceGrid, type TargetWorkspaceGridProps, TargetsViewWithDisplayNames as TargetsView, type TargetsViewProps, type TeamManagementPermissions, TeamManagementView, type TeamManagementViewProps, type ThemeColorValue, type ThemeConfig, ThreadSidebar, TicketHistory, TicketHistoryService, type TicketsConfig, TicketsView, type TicketsViewProps, TimeDisplay, TimePickerDropdown, Timer, TimezoneProvider, TimezoneService, type TrackingEventProperties, type TrendDirection, type UnderperformingWorkspace, type UnderperformingWorkspaces, type UpdateUserRoleInput, type UptimeDetails, type UseActiveBreaksResult, type UseClipTypesResult, type UseDashboardMetricsProps, type UseDynamicShiftConfigResult, type UseFormatNumberResult, type UseLineShiftConfigResult, type UseMessagesResult, type UsePrefetchClipCountsOptions$1 as UsePrefetchClipCountsOptions, type UsePrefetchClipCountsResult$1 as UsePrefetchClipCountsResult, type UseRealtimeLineMetricsProps, type UseTargetsOptions, type UseThreadsResult, type UseTicketHistoryReturn, type UseWorkspaceHealthByIdOptions, type UseWorkspaceHealthStatusReturn, type UseWorkspaceOperatorsOptions, type UserInvitation, UserManagementService, type UserProfileConfig, type UserRole, UserService, VideoCard, type VideoConfig, type VideoCroppingConfig, type VideoCroppingRect, VideoGridView, type VideoIndex, type VideoIndexEntry, type VideoMetadata, VideoPlayer, type VideoPlayerEventData, type VideoPlayerProps, type VideoPlayerRef, VideoPreloader, type VideoSeverity, type VideoSummary, type VideoType, WORKSPACE_POSITIONS, type WhatsAppSendResult, WhatsAppShareButton, type WhatsAppShareButtonProps, type WhatsappService, type Workspace, type WorkspaceActionUpdate, WorkspaceCard, type WorkspaceCardProps, type WorkspaceConfig, WrappedComponent as WorkspaceDetailView, type WorkspaceDetailedMetrics, WorkspaceDisplayNameExample, WorkspaceGrid, WorkspaceGridItem, type WorkspaceGridItemProps, type WorkspaceGridPosition, type WorkspaceHealth, WorkspaceHealthCard, type WorkspaceHealthInfo, type WorkspaceHealthStatusData, _default as WorkspaceHealthView, type WorkspaceHealthWithStatus, WorkspaceHistoryCalendar, WorkspaceMetricCards, WorkspaceMetricCardsImpl, type WorkspaceMetricCardsProps, type WorkspaceMetrics, WorkspaceMonthlyDataFetcher, type WorkspaceMonthlyDataFetcherProps, WorkspaceMonthlyHistory, type WorkspaceMonthlyMetric, WorkspaceMonthlyPdfGenerator, type WorkspaceMonthlyPdfGeneratorProps, type WorkspaceNavigationParams, WorkspacePdfExportButton, type WorkspacePdfExportButtonProps, WorkspacePdfGenerator, type WorkspacePdfGeneratorProps, type WorkspacePosition, type WorkspaceQualityData, type WorkspaceUrlMapping, WorkspaceWhatsAppShareButton, type WorkspaceWhatsAppShareProps, actionService, apiUtils, authCoreService, authOTPService, authRateLimitService, checkRateLimit, clearAllRateLimits, clearRateLimit, clearS3VideoCache, clearS3VideoFromCache, clearWorkspaceDisplayNamesCache, cn, createInvitationService, createLinesService, createStreamProxyHandler, createSupabaseClient, createSupervisorService, createThrottledReload, createUserManagementService, createUserService, dashboardService, deleteThread, forceRefreshWorkspaceDisplayNames, formatDateInZone, formatDateTimeInZone, formatISTDate, formatIdleTime, formatRelativeTime, formatTimeInZone, fromUrlFriendlyName, getAllLineDisplayNames, getAllThreadMessages, getAllWorkspaceDisplayNamesAsync, getAnonClient, getBrowserName, getCameraNumber, getCompanyMetricsTableName, getConfigurableShortWorkspaceDisplayName, getConfigurableWorkspaceDisplayName, getConfiguredLineIds, getCoreSessionRecordingProperties, getCoreSessionReplayUrl, getCurrentShift, getCurrentTimeInZone, getDashboardHeaderTimeInZone, getDaysDifferenceInZone, getDefaultCameraStreamUrl, getDefaultLineId, getDefaultTabForWorkspace, getLineDisplayName, getManufacturingInsights, getMetricsTablePrefix, getNextUpdateInterval, getOperationalDate, getS3SignedUrl, getS3VideoSrc, getShortWorkspaceDisplayName, getShortWorkspaceDisplayNameAsync, getStoredWorkspaceMappings, getSubscriptionManager, getThreadMessages, getUserThreads, getUserThreadsPaginated, getWorkspaceDisplayName, getWorkspaceDisplayNameAsync, getWorkspaceDisplayNamesMap, getWorkspaceFromUrl, getWorkspaceNavigationParams, identifyCoreUser, initializeCoreMixpanel, isLegacyConfiguration, isPrefetchError, isSafari, isTransitionPeriod, isUrlPermanentlyFailed, isValidFactoryViewConfiguration, isValidLineInfoPayload, isValidPrefetchParams, isValidPrefetchStatus, isValidWorkspaceDetailedMetricsPayload, isValidWorkspaceMetricsPayload, isWorkspaceDisplayNamesLoaded, isWorkspaceDisplayNamesLoading, linesService, mergeWithDefaultConfig, migrateLegacyConfiguration, optifyeAgentClient, parseS3Uri, preInitializeWorkspaceDisplayNames, preloadS3Video, preloadS3VideoUrl, preloadS3VideosUrl, preloadVideoUrl, preloadVideosUrl, qualityService, realtimeService, refreshWorkspaceDisplayNames, resetCoreMixpanel, resetFailedUrl, resetSubscriptionManager, s3VideoPreloader, shuffleArray, simulateApiDelay, skuService, startCoreSessionRecording, stopCoreSessionRecording, storeWorkspaceMapping, streamProxyConfig, throttledReloadDashboard, toUrlFriendlyName, trackCoreEvent, trackCorePageView, updateThreadTitle, useAccessControl, useActiveBreaks, useActiveLineId, useAllWorkspaceMetrics, useAnalyticsConfig, useAppTimezone, useAudioService, useAuth, useAuthConfig, useAxelNotifications, useCanSaveTargets, useClipFilter, useClipTypes, useClipTypesWithCounts, useComponentOverride, useCustomConfig, useDashboardConfig, useDashboardMetrics, useDatabaseConfig, useDateFormatter, useDateTimeConfig, useDynamicShiftConfig, useEndpointsConfig, useEntityConfig, useFactoryOverviewMetrics, useFeatureFlags, useFormatNumber, useHasLineAccess, useHistoricWorkspaceMetrics, useHlsStream, useHlsStreamWithCropping, useHookOverride, useHourEndTimer, useHourlyTargetAchievements, useHourlyTargetMisses, useLeaderboardMetrics, useLineDetailedMetrics, useLineKPIs, useLineMetrics, useLineShiftConfig, useLineSupervisor, useLineWorkspaceMetrics, useMessages, useMetrics, useNavigation, useOverrides, usePageOverride, usePrefetchClipCounts, useRealtimeLineMetrics, useRegistry, useSKUs, useSessionKeepAlive, useShiftConfig, useShifts, useSubscriptionManager, useSubscriptionManagerSafe, useSupabase, useSupabaseClient, useTargets, useTeamManagementPermissions, useTheme, useThemeConfig, useThreads, useTicketHistory, useTimezoneContext, useUserLineAccess, useVideoConfig, useWorkspaceConfig, useWorkspaceDetailedMetrics, useWorkspaceDisplayName, useWorkspaceDisplayNames, useWorkspaceDisplayNamesMap, useWorkspaceHealthById, useWorkspaceHealthStatus, useWorkspaceMetrics, useWorkspaceNavigation, useWorkspaceOperators, userService, videoPrefetchManager, videoPreloader, whatsappService, withAccessControl, withAuth, withRegistry, withTimezone, workspaceHealthService, workspaceService };