Initial commit
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
*/
|
||||
|
||||
import type { NullableString } from '@/types';
|
||||
import type { NodeSetting } from '@/views/decision/types';
|
||||
|
||||
export interface DraggableElement {
|
||||
id: number | null,
|
||||
@@ -24,6 +23,16 @@ export interface DraggableElement {
|
||||
|
||||
export type ElementStatus = 'default' | 'success' | 'failed' | 'running' | string | null
|
||||
|
||||
export interface ElementParameter {
|
||||
id: number,
|
||||
templateId: number,
|
||||
paramKey: NullableString,
|
||||
dataType: NullableString,
|
||||
defaultValue: NullableString,
|
||||
description: NullableString,
|
||||
templateType: NullableString,
|
||||
}
|
||||
|
||||
export interface ElementPosition {
|
||||
x: number;
|
||||
y: number;
|
||||
@@ -38,6 +47,7 @@ export interface ElementVariable {
|
||||
}
|
||||
|
||||
export interface BaseElement {
|
||||
id: number;
|
||||
key: string;
|
||||
name: string;
|
||||
type: string;
|
||||
@@ -56,38 +66,35 @@ export interface TaskNodeRect {
|
||||
y?: number;
|
||||
}
|
||||
|
||||
export interface TaskNodeElement extends BaseElement {
|
||||
export interface GraphTaskElement extends BaseElement {
|
||||
template: number;
|
||||
inputs: any;
|
||||
outputs: any;
|
||||
variables: ElementVariable[];
|
||||
parameters: Record<any, any>;
|
||||
parameters: ElementParameter[];
|
||||
|
||||
children?: TaskNodeElement[],
|
||||
children?: GraphTaskElement[],
|
||||
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export interface SettingTaskNodeElement extends TaskNodeElement {
|
||||
settings: NodeSetting[];
|
||||
}
|
||||
|
||||
export interface ModelElement extends BaseElement {
|
||||
edges: EdgeNodeElement[];
|
||||
edges: GraphEdgeElement[];
|
||||
}
|
||||
|
||||
export interface EdgeNodeElement {
|
||||
export interface GraphEdgeElement {
|
||||
id: number;
|
||||
key: NullableString;
|
||||
source: NullableString;
|
||||
sourceName: NullableString;
|
||||
target: NullableString;
|
||||
targetName: NullableString;
|
||||
attrs: Record<any, any>;
|
||||
router: Record<any, any>;
|
||||
connector: any;
|
||||
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export interface NodeGraph {
|
||||
edges: EdgeNodeElement[];
|
||||
nodes: TaskNodeElement[];
|
||||
edges: GraphEdgeElement[];
|
||||
nodes: GraphTaskElement[];
|
||||
}
|
||||
Reference in New Issue
Block a user