Initial commit

This commit is contained in:
libertyspy
2026-02-08 18:41:38 +08:00
parent 3bb9178399
commit 70de3c68a8
4 changed files with 26 additions and 18 deletions

View File

@@ -22,7 +22,6 @@ export interface DraggableElement {
[key: string]: unknown;
}
export type ElementStatus = 'default' | 'success' | 'failed' | 'running' | string | null
export interface ElementPosition {
@@ -39,10 +38,15 @@ export interface ElementVariable {
}
export interface BaseElement {
id: number;
key: NullableString;
type: NullableString;
status: ElementStatus;
key: string;
name: string;
type: string;
width: number;
height: number;
position: ElementPosition;
category: NullableString;
element?: DraggableElement;
[key: string]: unknown;
}
export interface TaskNodeRect {
@@ -54,11 +58,6 @@ export interface TaskNodeRect {
export interface TaskNodeElement extends BaseElement {
template: number;
name: NullableString;
description: NullableString;
width: number;
height: number;
position: ElementPosition;
inputs: any;
outputs: any;
variables: ElementVariable[];
@@ -73,10 +72,16 @@ export interface SettingTaskNodeElement extends TaskNodeElement {
settings: NodeSetting[];
}
export interface ModelElement extends BaseElement {
edges: EdgeNodeElement[];
}
export interface EdgeNodeElement extends BaseElement {
export interface EdgeNodeElement {
key: NullableString;
source: NullableString;
sourceName: NullableString;
target: NullableString;
targetName: NullableString;
attrs: Record<any, any>;
router: Record<any, any>;
connector: any;