import { api } from '@common/services/api';

export interface NumericalDataStatus {
  modelName: string;
  jobName: string;
  lastStatus: 'COMPLETED' | 'FAILED' | 'STARTED' | 'UNKNOWN';
  lastDataDate: string | null;
  lastDownloadedAt: string | null;
  nextScheduledAt: string | null;
  durationSec: number | null;
  consecutiveFailures: number;
}

export async function getNumericalDataStatus(): Promise<NumericalDataStatus[]> {
  const res = await api.get<NumericalDataStatus[]>('/monitor/numerical');
  return res.data;
}
