import { QueryMetrics } from './query'; import { OptimizationResult } from './ai'; import { Severity } from './config'; /** Full payload passed to every alert channel */ export interface AlertPayload { /** Query metrics that triggered the alert */ metrics: QueryMetrics; /** AI suggestion (if fix:'ai' is enabled) */ optimization?: OptimizationResult; /** Application / server name for context */ appName: string; /** Severity bucket */ severity: Severity; /** Threshold that was breached (ms) */ thresholdMs: number; } /** Result from a single channel send attempt */ export interface AlertSendResult { channel: string; success: boolean; error?: string; /** ms taken for the network call */ latencyMs?: number; } /** Daily report payload */ export interface DailyReportPayload { date: string; appName: string; totalQueries: number; slowQueryCount: number; criticalQueryCount: number; averageDurationMs: number; p99Ms: number; topSlowestQueries: Array<{ query: string; durationMs: number; table: string; }>; } //# sourceMappingURL=alert.d.ts.map