import type { Application } from 'express'; import type { HandlerContext } from '../../handlers/types.js'; import type { ServerConfigV2 } from './types.js'; import type { HistoricalPeriodsSnapshot, HistoricalStatsSnapshot, StatsSnapshot } from './stats-manager.js'; interface RouteOptions { app: Application; config: ServerConfigV2; buildHandlerContext: () => HandlerContext; getPipelineReady: () => boolean; waitForPipelineReady?: () => Promise; handleError: (error: Error, context: string) => Promise; getHealthSnapshot?: () => unknown | null; getRoutingState?: (sessionId: string) => unknown | null; getManagerDaemon?: () => unknown | null; getVirtualRouterArtifacts?: () => unknown | null; getServerId?: () => string; getStatsSnapshot?: () => { session: StatsSnapshot; historical: HistoricalStatsSnapshot; periods?: HistoricalPeriodsSnapshot; }; restartRuntimeFromDisk?: () => Promise<{ reloadedAt: number; configPath: string; warnings?: string[]; }>; } /** * Register OAuth Portal route early to support token authentication flow * This route must be available before provider initialization */ export declare function registerOAuthPortalRoute(app: Application): void; export declare function registerHttpRoutes(options: RouteOptions): void; export {};