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