import { HttpPlugin, HttpApp, RequestMethod } from '../types'; import { Logger } from '../../../common'; export interface HealthCheckOptions { path?: string; method?: RequestMethod; checks?: HealthCheck[]; timeout?: number; responseFormat?: 'json' | 'text'; } export interface HealthCheck { name: string; check: () => Promise | HealthCheckResult; timeout?: number; critical?: boolean; } export interface HealthCheckResult { status: 'healthy' | 'unhealthy' | 'degraded'; message?: string; data?: any; timestamp?: string; } export interface HealthCheckResponse { status: 'ok' | 'error' | 'degraded'; timestamp: string; uptime: number; checks: Record; version?: string; environment?: string; } export declare class HealthCheckPlugin implements HttpPlugin { readonly name = "health-check"; private options; private startTime; private logger; constructor(options?: HealthCheckOptions, logger?: Logger); install(app: HttpApp, options?: Record): Promise; uninstall(app: HttpApp): void; beforeStart(app: HttpApp): void; afterStart(app: HttpApp): void; beforeStop(app: HttpApp): void; afterStop(app: HttpApp): void; gracefulShutdown(app: HttpApp, signals?: string[]): Promise; addHealthCheck(check: HealthCheck): void; removeHealthCheck(name: string): void; getHealthChecks(): HealthCheck[]; private addDefaultHealthChecks; private registerHealthCheckRoute; private performHealthChecks; private runHealthCheck; private formatTextResponse; }