/**
 * TypeScript types for API responses and calendar data.
 * Mirrors duty_teller/db/schemas.py (DutyWithUser, CalendarEvent).
 */

/** Duty event type returned by the API; unknown DB values are mapped to "duty". */
export type DutyEventType = "duty" | "unavailable" | "vacation";

/** Duty with user and contact fields for calendar display (UTC ISO 8601). */
export interface DutyWithUser {
  id: number;
  user_id: number;
  start_at: string;
  end_at: string;
  full_name: string;
  event_type: DutyEventType;
  phone: string | null;
  username: string | null;
}

/** External calendar event (e.g. holiday) for a single day (YYYY-MM-DD). */
export interface CalendarEvent {
  date: string;
  summary: string;
}
