diff --git a/frontend/src/types/index.ts b/frontend/src/types/index.ts index 36ac8eb..79d38ff 100644 --- a/frontend/src/types/index.ts +++ b/frontend/src/types/index.ts @@ -386,7 +386,8 @@ export interface DagExecuteResult { execution_id?: number; status: string; message?: string; - results?: Array<{ + success?: boolean; + results?: Record | Array<{ task_id: number; status: string; output?: string; @@ -394,6 +395,36 @@ export interface DagExecuteResult { }>; } +// ============ DAG Canvas ============ + +export interface DagGraphNode { + id: number; + title: string; + status: TaskStatus; + priority: TaskPriority; + task_type: string; + worker_id?: number; + assignee_id?: number; + requires_review: boolean; +} + +export interface DagGraphEdge { + id: string; + source: number; + target: number; +} + +export interface DagGraph { + project_id: number; + nodes: DagGraphNode[]; + edges: DagGraphEdge[]; +} + +export interface DependencyPayload { + task_id: number; + depends_on_id: number; +} + // ============ Generic ============ export interface ApiError {