feat(tasks): add project task center
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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<ProjectTaskItem[]> => {
|
||||
const response = await apiClient.get(`/projects/${projectId}/tasks`);
|
||||
return response.data.items;
|
||||
};
|
||||
Reference in New Issue
Block a user