File size: 1,057 Bytes
13080d4
8441328
13080d4
be99f83
78dc980
 
 
8207a08
38d5a53
13080d4
 
8441328
 
78dc980
 
be99f83
 
78dc980
 
 
 
be99f83
78dc980
 
 
13080d4
 
 
 
 
 
 
 
 
 
 
 
8441328
13080d4
 
 
 
 
 
9ee6e3a
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import { Edge, Node } from 'reactflow';
import { IReference, Message } from './chat';

export type DSLComponents = Record<string, IOperator>;

export interface DSL {
  components: DSLComponents;
  history: any[];
  path?: string[][];
  answer?: any[];
  graph?: IGraph;
  messages: Message[];
  reference: IReference[];
}

export interface IOperator {
  obj: IOperatorNode;
  downstream: string[];
  upstream: string[];
}

export interface IOperatorNode {
  component_name: string;
  params: Record<string, unknown>;
}

export interface IGraph {
  nodes: Node[];
  edges: Edge[];
}

export interface IFlow {
  avatar: null;
  canvas_type: null;
  create_date: string;
  create_time: number;
  description: null;
  dsl: DSL;
  id: string;
  title: string;
  update_date: string;
  update_time: number;
  user_id: string;
}

export interface IFlowTemplate {
  avatar: string;
  canvas_type: string;
  create_date: string;
  create_time: number;
  description: string;
  dsl: DSL;
  id: string;
  title: string;
  update_date: string;
  update_time: number;
}