export type RuntimeMode = "development" | "production" | "test"; export interface HealthResponse { ok: true; service: "gateway-checker"; timestamp: string; } export interface ApiErrorResponse { error: string; status: number; } export interface SummaryResponse { total: number; up: number; down: number; lastCheckTime: string | null; } export interface RecentSample { timestamp: string; durationMs: number | null; up: boolean; } export interface TargetStatus { id: number; name: string; type: string; target: string; group: string; interval: string; latestCheck: CheckResult | null; stats: TargetStats; recentSamples: RecentSample[]; } export interface TargetStats { totalChecks: number; availability: number; } export interface HistoryResponse { items: CheckResult[]; total: number; page: number; pageSize: number; } export interface CheckResult { timestamp: string; success: boolean; matched: boolean; durationMs: number | null; statusDetail: string | null; failure: CheckFailure | null; } export interface CheckFailure { kind: "error" | "mismatch"; phase: string; path: string; expected?: unknown; actual?: unknown; message: string; } export interface TrendPoint { hour: string; avgDurationMs: number | null; availability: number; totalChecks: number; }