export type TaskStatus = "enabled" | "disabled";

export type RunStatus = "queued" | "running" | "success" | "failed" | "partial";

export interface InspectionTask {
  id: string;
  name: string;
  siteUrl: string;
  cronExpr: string;
  serviceKey: string;
  status: TaskStatus;
  createdAt: string;
  updatedAt: string;
}

export interface InspectionRun {
  id: string;
  taskId: string;
  traceId: string;
  status: RunStatus;
  errorTag: string | null;
  failureReason: string | null;
  screenshotUrls?: string | null;
  stepLogsJson?: string | null;
  pageUrl?: string | null;
  domSummary?: string | null;
  startedAt: string;
  endedAt: string | null;
}

export interface DashboardSummary {
  todayTaskCount: number;
  todayRunCount: number;
  todayExceptionCount: number;
  recentRuns: InspectionRun[];
}
