/**
 * Health Check and Status Monitoring
 *
 * Provides health checking capabilities for external services
 * and internal system components
 */
import type { ICacheStats } from './cache.js';
import { type ICircuitBreakerStats } from './circuitBreaker.js';
/**
 * Health status levels
 */
export declare enum HealthStatus {
    HEALTHY = "healthy",
    DEGRADED = "degraded",
    UNHEALTHY = "unhealthy"
}
/**
 * Individual component health check result
 */
export interface IComponentHealth {
    name: string;
    status: HealthStatus;
    message?: string;
    details?: Record<string, unknown>;
    lastChecked: Date;
    responseTime?: number;
}
/**
 * Overall system health
 */
export interface ISystemHealth {
    status: HealthStatus;
    timestamp: Date;
    components: IComponentHealth[];
    version?: string;
    uptime?: number;
}
/**
 * Health check configuration
 */
export interface IHealthCheckConfig {
    interval?: number;
    timeout?: number;
    includeDetails?: boolean;
}
/**
 * Health check manager
 */
export declare class HealthCheckManager {
    private checks;
    private lastResults;
    private checkInterval?;
    private startTime;
    private config;
    constructor(config?: IHealthCheckConfig);
    /**
     * Register a health check
     */
    register(name: string, check: () => Promise<IComponentHealth>): void;
    /**
     * Unregister a health check
     */
    unregister(name: string): boolean;
    /**
     * Run all health checks
     */
    runChecks(): Promise<ISystemHealth>;
    /**
     * Get last health check results
     */
    getLastResults(): ISystemHealth;
    /**
     * Start periodic health checks
     */
    startPeriodicChecks(): void;
    /**
     * Stop periodic health checks
     */
    stopPeriodicChecks(): void;
    /**
     * Timeout helper for health checks
     */
    private timeout;
}
/**
 * Built-in health checks
 */
/**
 * Create Serper API health check
 */
export declare function createSerperHealthCheck(apiKey: string, baseUrl?: string): () => Promise<IComponentHealth>;
/**
 * Create cache health check
 */
export declare function createCacheHealthCheck(getStats: () => ICacheStats): () => Promise<IComponentHealth>;
/**
 * Create circuit breaker health check
 */
export declare function createCircuitBreakerHealthCheck(name: string, getStats: () => ICircuitBreakerStats): () => Promise<IComponentHealth>;
export declare const healthCheckManager: HealthCheckManager;
//# sourceMappingURL=healthCheck.d.ts.map