import apiClient from './client'; export interface ProjectTaskItem { id: string; task_type: 'ingest' | 'generation' | string; workspace_id: string; project_id: string; status: string; progress: number; current_step: string; error_message: string; user_message: string; retryable: boolean; source_id: string; created_at?: string | null; updated_at?: string | null; } export const getProjectTasks = async (projectId: string): Promise => { const response = await apiClient.get(`/projects/${projectId}/tasks`); return response.data.items; }; export const retryProjectTask = async (taskType: string, sourceId: string): Promise => { const response = await apiClient.post(`/tasks/${taskType}/${sourceId}/retry`); return response.data; };