/**
 * Security Dashboard API
 *
 * REST API for security metrics and real-time monitoring.
 * Provides endpoints for:
 * - Full dashboard data aggregation
 * - Security score calculation
 * - Active threats and anomalies
 * - Recent incidents
 * - Compliance status by framework
 * - Time series data for charts
 *
 * @packageDocumentation
 */
import type { FastifyInstance } from 'fastify';
import { z } from 'zod';
import { type Anomaly, type AnomalySeverity } from '../../security/anomaly/index.js';
/**
 * Time range query parameter schema
 */
declare const timeRangeQuerySchema: z.ZodObject<{
    from: z.ZodOptional<z.ZodString>;
    to: z.ZodOptional<z.ZodString>;
    range: z.ZodDefault<z.ZodOptional<z.ZodEnum<["1h", "6h", "24h", "7d", "30d"]>>>;
}, "strip", z.ZodTypeAny, {
    from?: string;
    range?: "1h" | "7d" | "6h" | "24h" | "30d";
    to?: string;
}, {
    from?: string;
    range?: "1h" | "7d" | "6h" | "24h" | "30d";
    to?: string;
}>;
/**
 * Pagination query schema
 */
declare const paginationQuerySchema: z.ZodObject<{
    page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
    pageSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
}, "strip", z.ZodTypeAny, {
    page?: number;
    pageSize?: number;
}, {
    page?: number;
    pageSize?: number;
}>;
/**
 * Incidents query schema
 */
declare const incidentsQuerySchema: z.ZodObject<{
    from: z.ZodOptional<z.ZodString>;
    to: z.ZodOptional<z.ZodString>;
    range: z.ZodDefault<z.ZodOptional<z.ZodEnum<["1h", "6h", "24h", "7d", "30d"]>>>;
} & {
    page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
    pageSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
} & {
    severity: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
    status: z.ZodOptional<z.ZodEnum<["open", "acknowledged", "resolved", "dismissed"]>>;
}, "strip", z.ZodTypeAny, {
    status?: "acknowledged" | "resolved" | "open" | "dismissed";
    from?: string;
    range?: "1h" | "7d" | "6h" | "24h" | "30d";
    severity?: "low" | "medium" | "high" | "critical";
    to?: string;
    page?: number;
    pageSize?: number;
}, {
    status?: "acknowledged" | "resolved" | "open" | "dismissed";
    from?: string;
    range?: "1h" | "7d" | "6h" | "24h" | "30d";
    severity?: "low" | "medium" | "high" | "critical";
    to?: string;
    page?: number;
    pageSize?: number;
}>;
/**
 * Compliance query schema
 */
declare const complianceQuerySchema: z.ZodObject<{
    framework: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    framework?: string;
}, {
    framework?: string;
}>;
/**
 * Trends query schema
 */
declare const trendsQuerySchema: z.ZodObject<{
    from: z.ZodOptional<z.ZodString>;
    to: z.ZodOptional<z.ZodString>;
    range: z.ZodDefault<z.ZodOptional<z.ZodEnum<["1h", "6h", "24h", "7d", "30d"]>>>;
} & {
    metric: z.ZodOptional<z.ZodEnum<["auth_success_rate", "request_volume", "anomaly_count", "blocked_actors", "failed_auth", "injection_attempts"]>>;
    interval: z.ZodDefault<z.ZodOptional<z.ZodEnum<["5m", "15m", "1h", "6h", "1d"]>>>;
}, "strip", z.ZodTypeAny, {
    from?: string;
    range?: "1h" | "7d" | "6h" | "24h" | "30d";
    to?: string;
    metric?: "auth_success_rate" | "request_volume" | "anomaly_count" | "blocked_actors" | "failed_auth" | "injection_attempts";
    interval?: "1h" | "6h" | "5m" | "15m" | "1d";
}, {
    from?: string;
    range?: "1h" | "7d" | "6h" | "24h" | "30d";
    to?: string;
    metric?: "auth_success_rate" | "request_volume" | "anomaly_count" | "blocked_actors" | "failed_auth" | "injection_attempts";
    interval?: "1h" | "6h" | "5m" | "15m" | "1d";
}>;
/**
 * Time series data point
 */
export interface TimeSeriesPoint {
    timestamp: Date;
    value: number;
}
/**
 * Blocked actor information
 */
export interface BlockedActor {
    identifier: string;
    type: 'ip' | 'user';
    blockedAt: Date;
    reason: string;
    lockoutEndsAt?: Date;
    failedAttempts: number;
}
/**
 * Framework compliance status
 */
export interface FrameworkStatus {
    framework: string;
    displayName: string;
    status: 'compliant' | 'partial' | 'non-compliant' | 'not-assessed';
    score: number;
    lastAssessment?: Date;
    controlsPassed: number;
    controlsTotal: number;
    criticalFindings: number;
}
/**
 * Upcoming audit information
 */
export interface Audit {
    id: string;
    framework: string;
    scheduledDate: Date;
    auditor?: string;
    status: 'scheduled' | 'in-progress' | 'completed';
}
/**
 * Security incident
 */
export interface SecurityIncident {
    id: string;
    timestamp: Date;
    type: string;
    severity: AnomalySeverity;
    status: 'open' | 'acknowledged' | 'resolved' | 'dismissed';
    title: string;
    description: string;
    affectedUserId?: string;
    affectedIp?: string;
    indicators: Array<{
        type: string;
        value: string | number | boolean;
    }>;
    suggestedActions: string[];
    metadata?: Record<string, unknown>;
}
/**
 * Overview metrics
 */
export interface SecurityOverview {
    securityScore: number;
    threatLevel: 'low' | 'medium' | 'high' | 'critical';
    activeIncidents: number;
    openVulnerabilities: number;
    lastUpdated: Date;
}
/**
 * Threat metrics
 */
export interface ThreatMetrics {
    recentAnomalies: Anomaly[];
    blockedActors: BlockedActor[];
    failedAuthAttempts: number;
    injectionAttempts: number;
    suspiciousIpCount: number;
    activeLockouts: number;
}
/**
 * Trend metrics
 */
export interface TrendMetrics {
    authSuccessRate: TimeSeriesPoint[];
    requestVolume: TimeSeriesPoint[];
    anomalyCount: TimeSeriesPoint[];
    blockedActorsCount: TimeSeriesPoint[];
    failedAuthCount: TimeSeriesPoint[];
}
/**
 * Compliance metrics
 */
export interface ComplianceMetrics {
    frameworks: FrameworkStatus[];
    upcomingAudits: Audit[];
    overallScore: number;
}
/**
 * Full security dashboard data
 */
export interface SecurityDashboardData {
    overview: SecurityOverview;
    threats: ThreatMetrics;
    trends: TrendMetrics;
    compliance: ComplianceMetrics;
}
declare const timeSeriesPointSchema: z.ZodObject<{
    timestamp: z.ZodDate;
    value: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
    value?: number;
    timestamp?: Date;
}, {
    value?: number;
    timestamp?: Date;
}>;
declare const blockedActorSchema: z.ZodObject<{
    identifier: z.ZodString;
    type: z.ZodEnum<["ip", "user"]>;
    blockedAt: z.ZodDate;
    reason: z.ZodString;
    lockoutEndsAt: z.ZodOptional<z.ZodDate>;
    failedAttempts: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
    type?: "user" | "ip";
    reason?: string;
    identifier?: string;
    failedAttempts?: number;
    lockoutEndsAt?: Date;
    blockedAt?: Date;
}, {
    type?: "user" | "ip";
    reason?: string;
    identifier?: string;
    failedAttempts?: number;
    lockoutEndsAt?: Date;
    blockedAt?: Date;
}>;
declare const frameworkStatusSchema: z.ZodObject<{
    framework: z.ZodString;
    displayName: z.ZodString;
    status: z.ZodEnum<["compliant", "partial", "non-compliant", "not-assessed"]>;
    score: z.ZodNumber;
    lastAssessment: z.ZodOptional<z.ZodDate>;
    controlsPassed: z.ZodNumber;
    controlsTotal: z.ZodNumber;
    criticalFindings: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
    status?: "partial" | "compliant" | "non-compliant" | "not-assessed";
    displayName?: string;
    score?: number;
    criticalFindings?: number;
    framework?: string;
    lastAssessment?: Date;
    controlsPassed?: number;
    controlsTotal?: number;
}, {
    status?: "partial" | "compliant" | "non-compliant" | "not-assessed";
    displayName?: string;
    score?: number;
    criticalFindings?: number;
    framework?: string;
    lastAssessment?: Date;
    controlsPassed?: number;
    controlsTotal?: number;
}>;
declare const auditSchema: z.ZodObject<{
    id: z.ZodString;
    framework: z.ZodString;
    scheduledDate: z.ZodDate;
    auditor: z.ZodOptional<z.ZodString>;
    status: z.ZodEnum<["scheduled", "in-progress", "completed"]>;
}, "strip", z.ZodTypeAny, {
    id?: string;
    status?: "completed" | "scheduled" | "in-progress";
    framework?: string;
    scheduledDate?: Date;
    auditor?: string;
}, {
    id?: string;
    status?: "completed" | "scheduled" | "in-progress";
    framework?: string;
    scheduledDate?: Date;
    auditor?: string;
}>;
declare const securityIncidentSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodDate;
    type: z.ZodString;
    severity: z.ZodEnum<["low", "medium", "high", "critical"]>;
    status: z.ZodEnum<["open", "acknowledged", "resolved", "dismissed"]>;
    title: z.ZodString;
    description: z.ZodString;
    affectedUserId: z.ZodOptional<z.ZodString>;
    affectedIp: z.ZodOptional<z.ZodString>;
    indicators: z.ZodArray<z.ZodObject<{
        type: z.ZodString;
        value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>;
    }, "strip", z.ZodTypeAny, {
        value?: string | number | boolean;
        type?: string;
    }, {
        value?: string | number | boolean;
        type?: string;
    }>, "many">;
    suggestedActions: z.ZodArray<z.ZodString, "many">;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, "strip", z.ZodTypeAny, {
    id?: string;
    type?: string;
    status?: "acknowledged" | "resolved" | "open" | "dismissed";
    timestamp?: Date;
    title?: string;
    description?: string;
    metadata?: Record<string, unknown>;
    severity?: "low" | "medium" | "high" | "critical";
    suggestedActions?: string[];
    indicators?: {
        value?: string | number | boolean;
        type?: string;
    }[];
    affectedUserId?: string;
    affectedIp?: string;
}, {
    id?: string;
    type?: string;
    status?: "acknowledged" | "resolved" | "open" | "dismissed";
    timestamp?: Date;
    title?: string;
    description?: string;
    metadata?: Record<string, unknown>;
    severity?: "low" | "medium" | "high" | "critical";
    suggestedActions?: string[];
    indicators?: {
        value?: string | number | boolean;
        type?: string;
    }[];
    affectedUserId?: string;
    affectedIp?: string;
}>;
declare const securityOverviewSchema: z.ZodObject<{
    securityScore: z.ZodNumber;
    threatLevel: z.ZodEnum<["low", "medium", "high", "critical"]>;
    activeIncidents: z.ZodNumber;
    openVulnerabilities: z.ZodNumber;
    lastUpdated: z.ZodDate;
}, "strip", z.ZodTypeAny, {
    lastUpdated?: Date;
    threatLevel?: "low" | "medium" | "high" | "critical";
    securityScore?: number;
    activeIncidents?: number;
    openVulnerabilities?: number;
}, {
    lastUpdated?: Date;
    threatLevel?: "low" | "medium" | "high" | "critical";
    securityScore?: number;
    activeIncidents?: number;
    openVulnerabilities?: number;
}>;
declare const threatMetricsSchema: z.ZodObject<{
    recentAnomalies: z.ZodArray<z.ZodAny, "many">;
    blockedActors: z.ZodArray<z.ZodObject<{
        identifier: z.ZodString;
        type: z.ZodEnum<["ip", "user"]>;
        blockedAt: z.ZodDate;
        reason: z.ZodString;
        lockoutEndsAt: z.ZodOptional<z.ZodDate>;
        failedAttempts: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        type?: "user" | "ip";
        reason?: string;
        identifier?: string;
        failedAttempts?: number;
        lockoutEndsAt?: Date;
        blockedAt?: Date;
    }, {
        type?: "user" | "ip";
        reason?: string;
        identifier?: string;
        failedAttempts?: number;
        lockoutEndsAt?: Date;
        blockedAt?: Date;
    }>, "many">;
    failedAuthAttempts: z.ZodNumber;
    injectionAttempts: z.ZodNumber;
    suspiciousIpCount: z.ZodNumber;
    activeLockouts: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
    recentAnomalies?: any[];
    blockedActors?: {
        type?: "user" | "ip";
        reason?: string;
        identifier?: string;
        failedAttempts?: number;
        lockoutEndsAt?: Date;
        blockedAt?: Date;
    }[];
    failedAuthAttempts?: number;
    injectionAttempts?: number;
    suspiciousIpCount?: number;
    activeLockouts?: number;
}, {
    recentAnomalies?: any[];
    blockedActors?: {
        type?: "user" | "ip";
        reason?: string;
        identifier?: string;
        failedAttempts?: number;
        lockoutEndsAt?: Date;
        blockedAt?: Date;
    }[];
    failedAuthAttempts?: number;
    injectionAttempts?: number;
    suspiciousIpCount?: number;
    activeLockouts?: number;
}>;
declare const trendMetricsSchema: z.ZodObject<{
    authSuccessRate: z.ZodArray<z.ZodObject<{
        timestamp: z.ZodDate;
        value: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        value?: number;
        timestamp?: Date;
    }, {
        value?: number;
        timestamp?: Date;
    }>, "many">;
    requestVolume: z.ZodArray<z.ZodObject<{
        timestamp: z.ZodDate;
        value: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        value?: number;
        timestamp?: Date;
    }, {
        value?: number;
        timestamp?: Date;
    }>, "many">;
    anomalyCount: z.ZodArray<z.ZodObject<{
        timestamp: z.ZodDate;
        value: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        value?: number;
        timestamp?: Date;
    }, {
        value?: number;
        timestamp?: Date;
    }>, "many">;
    blockedActorsCount: z.ZodArray<z.ZodObject<{
        timestamp: z.ZodDate;
        value: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        value?: number;
        timestamp?: Date;
    }, {
        value?: number;
        timestamp?: Date;
    }>, "many">;
    failedAuthCount: z.ZodArray<z.ZodObject<{
        timestamp: z.ZodDate;
        value: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        value?: number;
        timestamp?: Date;
    }, {
        value?: number;
        timestamp?: Date;
    }>, "many">;
}, "strip", z.ZodTypeAny, {
    authSuccessRate?: {
        value?: number;
        timestamp?: Date;
    }[];
    requestVolume?: {
        value?: number;
        timestamp?: Date;
    }[];
    anomalyCount?: {
        value?: number;
        timestamp?: Date;
    }[];
    blockedActorsCount?: {
        value?: number;
        timestamp?: Date;
    }[];
    failedAuthCount?: {
        value?: number;
        timestamp?: Date;
    }[];
}, {
    authSuccessRate?: {
        value?: number;
        timestamp?: Date;
    }[];
    requestVolume?: {
        value?: number;
        timestamp?: Date;
    }[];
    anomalyCount?: {
        value?: number;
        timestamp?: Date;
    }[];
    blockedActorsCount?: {
        value?: number;
        timestamp?: Date;
    }[];
    failedAuthCount?: {
        value?: number;
        timestamp?: Date;
    }[];
}>;
declare const complianceMetricsSchema: z.ZodObject<{
    frameworks: z.ZodArray<z.ZodObject<{
        framework: z.ZodString;
        displayName: z.ZodString;
        status: z.ZodEnum<["compliant", "partial", "non-compliant", "not-assessed"]>;
        score: z.ZodNumber;
        lastAssessment: z.ZodOptional<z.ZodDate>;
        controlsPassed: z.ZodNumber;
        controlsTotal: z.ZodNumber;
        criticalFindings: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        status?: "partial" | "compliant" | "non-compliant" | "not-assessed";
        displayName?: string;
        score?: number;
        criticalFindings?: number;
        framework?: string;
        lastAssessment?: Date;
        controlsPassed?: number;
        controlsTotal?: number;
    }, {
        status?: "partial" | "compliant" | "non-compliant" | "not-assessed";
        displayName?: string;
        score?: number;
        criticalFindings?: number;
        framework?: string;
        lastAssessment?: Date;
        controlsPassed?: number;
        controlsTotal?: number;
    }>, "many">;
    upcomingAudits: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        framework: z.ZodString;
        scheduledDate: z.ZodDate;
        auditor: z.ZodOptional<z.ZodString>;
        status: z.ZodEnum<["scheduled", "in-progress", "completed"]>;
    }, "strip", z.ZodTypeAny, {
        id?: string;
        status?: "completed" | "scheduled" | "in-progress";
        framework?: string;
        scheduledDate?: Date;
        auditor?: string;
    }, {
        id?: string;
        status?: "completed" | "scheduled" | "in-progress";
        framework?: string;
        scheduledDate?: Date;
        auditor?: string;
    }>, "many">;
    overallScore: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
    frameworks?: {
        status?: "partial" | "compliant" | "non-compliant" | "not-assessed";
        displayName?: string;
        score?: number;
        criticalFindings?: number;
        framework?: string;
        lastAssessment?: Date;
        controlsPassed?: number;
        controlsTotal?: number;
    }[];
    upcomingAudits?: {
        id?: string;
        status?: "completed" | "scheduled" | "in-progress";
        framework?: string;
        scheduledDate?: Date;
        auditor?: string;
    }[];
    overallScore?: number;
}, {
    frameworks?: {
        status?: "partial" | "compliant" | "non-compliant" | "not-assessed";
        displayName?: string;
        score?: number;
        criticalFindings?: number;
        framework?: string;
        lastAssessment?: Date;
        controlsPassed?: number;
        controlsTotal?: number;
    }[];
    upcomingAudits?: {
        id?: string;
        status?: "completed" | "scheduled" | "in-progress";
        framework?: string;
        scheduledDate?: Date;
        auditor?: string;
    }[];
    overallScore?: number;
}>;
declare const securityDashboardDataSchema: z.ZodObject<{
    overview: z.ZodObject<{
        securityScore: z.ZodNumber;
        threatLevel: z.ZodEnum<["low", "medium", "high", "critical"]>;
        activeIncidents: z.ZodNumber;
        openVulnerabilities: z.ZodNumber;
        lastUpdated: z.ZodDate;
    }, "strip", z.ZodTypeAny, {
        lastUpdated?: Date;
        threatLevel?: "low" | "medium" | "high" | "critical";
        securityScore?: number;
        activeIncidents?: number;
        openVulnerabilities?: number;
    }, {
        lastUpdated?: Date;
        threatLevel?: "low" | "medium" | "high" | "critical";
        securityScore?: number;
        activeIncidents?: number;
        openVulnerabilities?: number;
    }>;
    threats: z.ZodObject<{
        recentAnomalies: z.ZodArray<z.ZodAny, "many">;
        blockedActors: z.ZodArray<z.ZodObject<{
            identifier: z.ZodString;
            type: z.ZodEnum<["ip", "user"]>;
            blockedAt: z.ZodDate;
            reason: z.ZodString;
            lockoutEndsAt: z.ZodOptional<z.ZodDate>;
            failedAttempts: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            type?: "user" | "ip";
            reason?: string;
            identifier?: string;
            failedAttempts?: number;
            lockoutEndsAt?: Date;
            blockedAt?: Date;
        }, {
            type?: "user" | "ip";
            reason?: string;
            identifier?: string;
            failedAttempts?: number;
            lockoutEndsAt?: Date;
            blockedAt?: Date;
        }>, "many">;
        failedAuthAttempts: z.ZodNumber;
        injectionAttempts: z.ZodNumber;
        suspiciousIpCount: z.ZodNumber;
        activeLockouts: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        recentAnomalies?: any[];
        blockedActors?: {
            type?: "user" | "ip";
            reason?: string;
            identifier?: string;
            failedAttempts?: number;
            lockoutEndsAt?: Date;
            blockedAt?: Date;
        }[];
        failedAuthAttempts?: number;
        injectionAttempts?: number;
        suspiciousIpCount?: number;
        activeLockouts?: number;
    }, {
        recentAnomalies?: any[];
        blockedActors?: {
            type?: "user" | "ip";
            reason?: string;
            identifier?: string;
            failedAttempts?: number;
            lockoutEndsAt?: Date;
            blockedAt?: Date;
        }[];
        failedAuthAttempts?: number;
        injectionAttempts?: number;
        suspiciousIpCount?: number;
        activeLockouts?: number;
    }>;
    trends: z.ZodObject<{
        authSuccessRate: z.ZodArray<z.ZodObject<{
            timestamp: z.ZodDate;
            value: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            value?: number;
            timestamp?: Date;
        }, {
            value?: number;
            timestamp?: Date;
        }>, "many">;
        requestVolume: z.ZodArray<z.ZodObject<{
            timestamp: z.ZodDate;
            value: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            value?: number;
            timestamp?: Date;
        }, {
            value?: number;
            timestamp?: Date;
        }>, "many">;
        anomalyCount: z.ZodArray<z.ZodObject<{
            timestamp: z.ZodDate;
            value: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            value?: number;
            timestamp?: Date;
        }, {
            value?: number;
            timestamp?: Date;
        }>, "many">;
        blockedActorsCount: z.ZodArray<z.ZodObject<{
            timestamp: z.ZodDate;
            value: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            value?: number;
            timestamp?: Date;
        }, {
            value?: number;
            timestamp?: Date;
        }>, "many">;
        failedAuthCount: z.ZodArray<z.ZodObject<{
            timestamp: z.ZodDate;
            value: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            value?: number;
            timestamp?: Date;
        }, {
            value?: number;
            timestamp?: Date;
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        authSuccessRate?: {
            value?: number;
            timestamp?: Date;
        }[];
        requestVolume?: {
            value?: number;
            timestamp?: Date;
        }[];
        anomalyCount?: {
            value?: number;
            timestamp?: Date;
        }[];
        blockedActorsCount?: {
            value?: number;
            timestamp?: Date;
        }[];
        failedAuthCount?: {
            value?: number;
            timestamp?: Date;
        }[];
    }, {
        authSuccessRate?: {
            value?: number;
            timestamp?: Date;
        }[];
        requestVolume?: {
            value?: number;
            timestamp?: Date;
        }[];
        anomalyCount?: {
            value?: number;
            timestamp?: Date;
        }[];
        blockedActorsCount?: {
            value?: number;
            timestamp?: Date;
        }[];
        failedAuthCount?: {
            value?: number;
            timestamp?: Date;
        }[];
    }>;
    compliance: z.ZodObject<{
        frameworks: z.ZodArray<z.ZodObject<{
            framework: z.ZodString;
            displayName: z.ZodString;
            status: z.ZodEnum<["compliant", "partial", "non-compliant", "not-assessed"]>;
            score: z.ZodNumber;
            lastAssessment: z.ZodOptional<z.ZodDate>;
            controlsPassed: z.ZodNumber;
            controlsTotal: z.ZodNumber;
            criticalFindings: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            status?: "partial" | "compliant" | "non-compliant" | "not-assessed";
            displayName?: string;
            score?: number;
            criticalFindings?: number;
            framework?: string;
            lastAssessment?: Date;
            controlsPassed?: number;
            controlsTotal?: number;
        }, {
            status?: "partial" | "compliant" | "non-compliant" | "not-assessed";
            displayName?: string;
            score?: number;
            criticalFindings?: number;
            framework?: string;
            lastAssessment?: Date;
            controlsPassed?: number;
            controlsTotal?: number;
        }>, "many">;
        upcomingAudits: z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            framework: z.ZodString;
            scheduledDate: z.ZodDate;
            auditor: z.ZodOptional<z.ZodString>;
            status: z.ZodEnum<["scheduled", "in-progress", "completed"]>;
        }, "strip", z.ZodTypeAny, {
            id?: string;
            status?: "completed" | "scheduled" | "in-progress";
            framework?: string;
            scheduledDate?: Date;
            auditor?: string;
        }, {
            id?: string;
            status?: "completed" | "scheduled" | "in-progress";
            framework?: string;
            scheduledDate?: Date;
            auditor?: string;
        }>, "many">;
        overallScore: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        frameworks?: {
            status?: "partial" | "compliant" | "non-compliant" | "not-assessed";
            displayName?: string;
            score?: number;
            criticalFindings?: number;
            framework?: string;
            lastAssessment?: Date;
            controlsPassed?: number;
            controlsTotal?: number;
        }[];
        upcomingAudits?: {
            id?: string;
            status?: "completed" | "scheduled" | "in-progress";
            framework?: string;
            scheduledDate?: Date;
            auditor?: string;
        }[];
        overallScore?: number;
    }, {
        frameworks?: {
            status?: "partial" | "compliant" | "non-compliant" | "not-assessed";
            displayName?: string;
            score?: number;
            criticalFindings?: number;
            framework?: string;
            lastAssessment?: Date;
            controlsPassed?: number;
            controlsTotal?: number;
        }[];
        upcomingAudits?: {
            id?: string;
            status?: "completed" | "scheduled" | "in-progress";
            framework?: string;
            scheduledDate?: Date;
            auditor?: string;
        }[];
        overallScore?: number;
    }>;
}, "strip", z.ZodTypeAny, {
    compliance?: {
        frameworks?: {
            status?: "partial" | "compliant" | "non-compliant" | "not-assessed";
            displayName?: string;
            score?: number;
            criticalFindings?: number;
            framework?: string;
            lastAssessment?: Date;
            controlsPassed?: number;
            controlsTotal?: number;
        }[];
        upcomingAudits?: {
            id?: string;
            status?: "completed" | "scheduled" | "in-progress";
            framework?: string;
            scheduledDate?: Date;
            auditor?: string;
        }[];
        overallScore?: number;
    };
    overview?: {
        lastUpdated?: Date;
        threatLevel?: "low" | "medium" | "high" | "critical";
        securityScore?: number;
        activeIncidents?: number;
        openVulnerabilities?: number;
    };
    threats?: {
        recentAnomalies?: any[];
        blockedActors?: {
            type?: "user" | "ip";
            reason?: string;
            identifier?: string;
            failedAttempts?: number;
            lockoutEndsAt?: Date;
            blockedAt?: Date;
        }[];
        failedAuthAttempts?: number;
        injectionAttempts?: number;
        suspiciousIpCount?: number;
        activeLockouts?: number;
    };
    trends?: {
        authSuccessRate?: {
            value?: number;
            timestamp?: Date;
        }[];
        requestVolume?: {
            value?: number;
            timestamp?: Date;
        }[];
        anomalyCount?: {
            value?: number;
            timestamp?: Date;
        }[];
        blockedActorsCount?: {
            value?: number;
            timestamp?: Date;
        }[];
        failedAuthCount?: {
            value?: number;
            timestamp?: Date;
        }[];
    };
}, {
    compliance?: {
        frameworks?: {
            status?: "partial" | "compliant" | "non-compliant" | "not-assessed";
            displayName?: string;
            score?: number;
            criticalFindings?: number;
            framework?: string;
            lastAssessment?: Date;
            controlsPassed?: number;
            controlsTotal?: number;
        }[];
        upcomingAudits?: {
            id?: string;
            status?: "completed" | "scheduled" | "in-progress";
            framework?: string;
            scheduledDate?: Date;
            auditor?: string;
        }[];
        overallScore?: number;
    };
    overview?: {
        lastUpdated?: Date;
        threatLevel?: "low" | "medium" | "high" | "critical";
        securityScore?: number;
        activeIncidents?: number;
        openVulnerabilities?: number;
    };
    threats?: {
        recentAnomalies?: any[];
        blockedActors?: {
            type?: "user" | "ip";
            reason?: string;
            identifier?: string;
            failedAttempts?: number;
            lockoutEndsAt?: Date;
            blockedAt?: Date;
        }[];
        failedAuthAttempts?: number;
        injectionAttempts?: number;
        suspiciousIpCount?: number;
        activeLockouts?: number;
    };
    trends?: {
        authSuccessRate?: {
            value?: number;
            timestamp?: Date;
        }[];
        requestVolume?: {
            value?: number;
            timestamp?: Date;
        }[];
        anomalyCount?: {
            value?: number;
            timestamp?: Date;
        }[];
        blockedActorsCount?: {
            value?: number;
            timestamp?: Date;
        }[];
        failedAuthCount?: {
            value?: number;
            timestamp?: Date;
        }[];
    };
}>;
declare module 'fastify' {
    interface FastifyRequest {
        jwtVerify<T = Record<string, unknown>>(): Promise<T>;
    }
}
/**
 * Service class for aggregating security dashboard data
 */
declare class SecurityDashboardService {
    private anomalyDetector;
    private bruteForceProtection;
    private sessionManager;
    private recentAnomalies;
    private blockedActors;
    private incidents;
    private metricsHistory;
    constructor();
    private initializeMetricsHistory;
    private createIncidentFromAnomaly;
    /**
     * Calculate security score based on various factors
     */
    calculateSecurityScore(): number;
    /**
     * Determine threat level based on metrics
     */
    determineThreatLevel(): 'low' | 'medium' | 'high' | 'critical';
    /**
     * Get security overview metrics
     */
    getOverview(): Promise<SecurityOverview>;
    /**
     * Get threat metrics
     */
    getThreats(tenantId: string): Promise<ThreatMetrics>;
    /**
     * Get incidents with filtering
     */
    getIncidents(tenantId: string, options: {
        from?: Date;
        to?: Date;
        severity?: AnomalySeverity;
        status?: string;
        page: number;
        pageSize: number;
    }): Promise<{
        incidents: SecurityIncident[];
        total: number;
    }>;
    /**
     * Get compliance status
     */
    getCompliance(tenantId: string, framework?: string): Promise<ComplianceMetrics>;
    /**
     * Get trend data for charts
     */
    getTrends(tenantId: string, options: {
        from?: Date;
        to?: Date;
        range: string;
        metric?: string;
        interval: string;
    }): Promise<TrendMetrics>;
    /**
     * Get full dashboard data
     */
    getDashboard(tenantId: string): Promise<SecurityDashboardData>;
    /**
     * Record a blocked actor
     */
    recordBlockedActor(actor: BlockedActor): void;
}
declare function getDashboardService(): SecurityDashboardService;
/**
 * Register security dashboard routes
 *
 * Routes:
 * - GET /security/dashboard - Full dashboard data
 * - GET /security/score     - Security score (0-100)
 * - GET /security/threats   - Active threats and anomalies
 * - GET /security/incidents - Recent incidents
 * - GET /security/compliance - Compliance status by framework
 * - GET /security/trends    - Time series data for charts
 *
 * @param fastify - Fastify instance
 */
export declare function registerSecurityDashboardRoutes(fastify: FastifyInstance): Promise<void>;
export default registerSecurityDashboardRoutes;
export { SecurityDashboardService, getDashboardService, timeRangeQuerySchema, paginationQuerySchema, incidentsQuerySchema, complianceQuerySchema, trendsQuerySchema, securityDashboardDataSchema, securityOverviewSchema, threatMetricsSchema, trendMetricsSchema, complianceMetricsSchema, securityIncidentSchema, frameworkStatusSchema, auditSchema, blockedActorSchema, timeSeriesPointSchema, };
//# sourceMappingURL=security-dashboard.d.ts.map