import { IncomingMessage, ServerResponse } from 'http'; import type { LogEntry, Logger, DashboardUser } from '../types/index.js'; export interface DashboardConfig { path?: string; logFolder?: string; realtime?: boolean; authenticate?: (req: IncomingMessage) => Promise | boolean; users?: DashboardUser[]; maxLogs?: number; title?: string; showMetrics?: boolean; sessionTimeout?: number; isDevelopment?: boolean; } export declare class LogDashboard { private config; private recentLogs; private logger; private sessions; private metricsCache; private metricsUpdateInterval; private loginAttempts; private templateManager; private readonly MAX_LOGIN_ATTEMPTS; private readonly LOGIN_LOCKOUT_TIME; constructor(config?: DashboardConfig); /** * Load static CSS and JavaScript assets */ private loadStaticAssets; private dashboardCSS; private dashboardJS; private loginJS; /** * Start metrics collection */ private startMetricsCollection; /** * Validate user credentials */ private validateUser; /** * Create session */ private createSession; /** * Get session from request */ private getSession; /** * Attach logger to capture logs */ attachLogger(logger: Logger): void; /** * Store log entry for dashboard */ captureLog(entry: LogEntry): void; /** * Express/Connect middleware */ middleware(): (req: IncomingMessage, res: ServerResponse, next?: () => void) => Promise; /** * Serve login page */ private serveLoginPage; /** * Handle login */ private handleLogin; /** * Handle logout */ private handleLogout; /** * Serve the main dashboard HTML */ private serveDashboard; /** * Serve log data as JSON */ private serveLogs; /** * Serve metrics */ private serveMetrics; /** * Stream logs using Server-Sent Events */ private streamLogs; /** * Serve static files (CSS/JS) */ private serveStatic; /** * Read logs from file system */ private readLogsFromFiles; /** * Cleanup resources */ close(): void; } /** * Custom transport that feeds logs to dashboard */ export declare class DashboardTransport { readonly name = "dashboard"; private dashboard; constructor(dashboard: LogDashboard); log(entry: LogEntry): void; } //# sourceMappingURL=dashboard-refactored.d.ts.map