// DO NOT export Tag from api-aux, just reference via import type where needed
export interface ApiResponse<T> {
  success: boolean;
  data: T | null;
  error?: string | null;
  meta?: any;
}

export interface RecipeDraft {
  title: string;
  description?: string;
  servings?: number;
  prep_time_minutes?: number;
  cook_time_minutes?: number;
  source_url?: string;
  ingredients: { item: string; quantity?: string | null; unit?: string | null; notes?: string | null }[];
  instructions: string[];
  tagIds?: number[];
  notes?: string;
}

export interface UrlImportResult {
  title: string;
  source_url?: string;
  json_ld_blocks?: any[];
  draft_recipe?: RecipeDraft;
  ingredients: string[];
  instructions: string[];
}

export interface HarnessStatus {
  running: boolean;
  version: string;
  uptime: number;
  // Following are frontend UI specific, do not break DB
  keepalive?: {
    status?: string;
    activeSessionLabel?: string;
    heartbeatAgeSeconds?: number;
  };
  commit?: {
    hash: string;
    relative: string;
  };
  todo?: {
    checked: number;
    unchecked: number;
    nextTask?: string;
  };
  workerHeartbeatHistory?: Array<{
    timestamp: string;
    step?: string;
    status?: string;
  }>;
}
