/**
 * Continuous Monitoring Service
 * Real-time vendor health monitoring including security posture, certificates, DNS, and dark web
 */
import { HealthEvent, HealthEventType, MonitoringConfig, VendorInfo, Observable } from './types';
import { DataSourceManager, DarkWebMention } from './data-sources';
export interface ContinuousMonitoringConfig {
    dataSourceManager: DataSourceManager;
    storage: MonitoringStorage;
    alertDispatcher: AlertDispatcher;
    defaultPollingIntervals: PollingIntervals;
    enabledChecks: string[];
}
export interface PollingIntervals {
    securityPosture: number;
    certificates: number;
    dns: number;
    breaches: number;
    darkWeb: number;
    news: number;
    sanctions: number;
}
export declare class ContinuousMonitoringService {
    private readonly config;
    private readonly activeMonitors;
    private readonly eventSubscribers;
    constructor(config: ContinuousMonitoringConfig);
    startMonitoring(vendorId: string, vendorConfig: MonitoringConfig): Promise<void>;
    stopMonitoring(vendorId: string): Promise<void>;
    updateMonitoringConfig(vendorId: string, config: Partial<MonitoringConfig>): Promise<void>;
    getMonitoringStatus(vendorId: string): MonitoringStatus | null;
    getAllMonitoringStatuses(): MonitoringStatus[];
    monitorVendorHealth(vendorId: string): Observable<HealthEvent>;
    emitHealthEvent(vendorId: string, event: HealthEvent): void;
    triggerSecurityPostureCheck(vendorId: string): Promise<HealthEvent[]>;
    triggerCertificateCheck(vendorId: string): Promise<HealthEvent[]>;
    triggerDNSCheck(vendorId: string): Promise<HealthEvent[]>;
    triggerBreachCheck(vendorId: string): Promise<HealthEvent[]>;
    triggerDarkWebScan(vendorId: string): Promise<HealthEvent[]>;
    triggerFullCheck(vendorId: string): Promise<HealthEvent[]>;
    getHealthEvents(vendorId: string, options: HealthEventQueryOptions): Promise<HealthEvent[]>;
    getHealthEventStats(vendorId: string, days: number): Promise<HealthEventStats>;
}
export interface MonitoringStatus {
    vendorId: string;
    running: boolean;
    config: MonitoringConfig;
    checkResults: Record<string, CheckResult>;
    lastActivity: Date | null;
}
export interface CheckResult {
    timestamp: Date;
    success: boolean;
    eventsGenerated: number;
    error?: string;
}
export interface HealthEventQueryOptions {
    startDate?: Date;
    endDate?: Date;
    types?: HealthEventType[];
    severities?: HealthEvent['severity'][];
    limit?: number;
    offset?: number;
}
export interface HealthEventStats {
    total: number;
    bySeverity: Record<HealthEvent['severity'], number>;
    byType: Record<HealthEventType, number>;
    resolved: number;
    unresolved: number;
    averageResolutionTime: number;
}
interface DNSRecord {
    type: string;
    value: string;
    ttl: number;
}
export interface MonitoringStorage {
    getVendorInfo(vendorId: string): Promise<VendorInfo | null>;
    saveHealthEvent(event: HealthEvent): Promise<void>;
    getHealthEvents(vendorId: string, options: HealthEventQueryOptions): Promise<HealthEvent[]>;
    getPreviousSecurityScore(vendorId: string, source: string): Promise<number | null>;
    saveSecurityScore(vendorId: string, source: string, score: number): Promise<void>;
    getPreviousDNSRecords(vendorId: string): Promise<DNSRecord[] | null>;
    saveDNSRecords(vendorId: string, records: DNSRecord[]): Promise<void>;
    getKnownBreaches(vendorId: string): Promise<{
        id: string;
    }[]>;
    saveKnownBreach(vendorId: string, breach: {
        id: string;
    }): Promise<void>;
    getKnownDarkWebMentions(vendorId: string): Promise<DarkWebMention[]>;
    saveKnownDarkWebMention(vendorId: string, mention: DarkWebMention): Promise<void>;
}
export interface AlertDispatcher {
    dispatchIfNeeded(event: HealthEvent): Promise<void>;
}
export declare class MonitoringError extends Error {
    readonly code: string;
    constructor(code: string, message: string);
}
export declare function createContinuousMonitoringService(config: ContinuousMonitoringConfig): ContinuousMonitoringService;
export declare function getDefaultPollingIntervals(): PollingIntervals;
export {};
//# sourceMappingURL=continuous-monitoring.d.ts.map