export type JobStatus = "queued" | "running" | "succeeded" | "failed"; export type Job = { id: string; type: string; payload: Record; status: JobStatus; priority: number; available_at: string; attempts: number; max_attempts: number; idempotency_key: string | null; locked_by: string | null; locked_until: string | null; last_error: string; result: unknown; created_at: string; updated_at: string; finished_at: string | null; }; export type JobEvent = { id: number; job: string; type: string; attempt: number; worker_id: string | null; message: string; data: Record; created_at: string; }; export type CursorPage = { next: string | null; previous: string | null; results: T[]; }; export type LimitOffsetPage = { count: number; next: string | null; previous: string | null; results: T[]; }; export type JobStats = { total: number; by_status: Record; overdue_running: number; retries_pending: number; oldest_queued_at: string | null; }; export type Health = { ok: boolean; database: string; detail?: string; };