diff --git a/frontend/src/pages/Workflow/Instance/types.ts b/frontend/src/pages/Workflow/Instance/types.ts index 6e06c1e1..e4ff71ad 100644 --- a/frontend/src/pages/Workflow/Instance/types.ts +++ b/frontend/src/pages/Workflow/Instance/types.ts @@ -1,4 +1,4 @@ -import { Page, BaseQuery } from '@/types/base'; +import { BaseQuery } from '@/types/base'; export interface WorkflowTemplateWithInstances { id: number; @@ -22,6 +22,40 @@ export interface WorkflowInstanceStage { endTime: string | null; } +export interface WorkflowGraphNode { + id: string; + nodeCode: string; + nodeType: string; + nodeName: string; + position: { + x: number; + y: number; + }; + configs: Record; + inputMapping: Record; + outputs: any[]; +} + +export interface WorkflowGraphEdge { + id: string; + from: string; + to: string; + name: string; + config: { + type: string; + condition: { + type: string; + priority: number; + }; + }; + vertices: any[]; +} + +export interface WorkflowGraph { + nodes: WorkflowGraphNode[]; + edges: WorkflowGraphEdge[]; +} + export interface WorkflowHistoricalInstance { id: number; processInstanceId: string; @@ -31,6 +65,7 @@ export interface WorkflowHistoricalInstance { startTime: string; endTime: string | null; stages: WorkflowInstanceStage[]; + graph?: WorkflowGraph; } export interface WorkflowHistoricalInstanceQuery extends BaseQuery {