33 lines
532 B
TypeScript
33 lines
532 B
TypeScript
export interface NodeDefinition {
|
|
type: string
|
|
label: string
|
|
category: string
|
|
inputs: PortDefinition[]
|
|
outputs: PortDefinition[]
|
|
defaultConfig: Record<string, any>
|
|
}
|
|
|
|
export interface PortDefinition {
|
|
id: string
|
|
label: string
|
|
type: "flow" | "data"
|
|
}
|
|
|
|
export interface FlowNode {
|
|
id: string
|
|
type: string
|
|
position: { x: number, y: number }
|
|
data: {
|
|
config: Record<string, any>
|
|
color?: string
|
|
}
|
|
}
|
|
|
|
export interface FlowEdge {
|
|
id: string
|
|
source: string
|
|
target: string
|
|
sourceHandle?: string
|
|
targetHandle?: string
|
|
}
|