mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-04 18:40:10 +00:00
feat(web): AWEL flow 2.0 frontend codes (#1898)
Co-authored-by: Fangyin Cheng <staneyffer@gmail.com> Co-authored-by: 谨欣 <echo.cmy@antgroup.com> Co-authored-by: 严志勇 <yanzhiyong@tiansuixiansheng.com> Co-authored-by: yanzhiyong <932374019@qq.com>
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
import { File } from 'buffer';
|
||||
import { Node } from 'reactflow';
|
||||
|
||||
export type FlowState = 'deployed' | 'developing' | 'initializing' | 'testing' | 'disabled' | 'running' | 'load_failed';
|
||||
export type FlowState =
|
||||
| 'deployed'
|
||||
| 'developing'
|
||||
| 'initializing'
|
||||
| 'testing'
|
||||
| 'disabled'
|
||||
| 'running'
|
||||
| 'load_failed';
|
||||
|
||||
export type IFlowUpdateParam = {
|
||||
name: string;
|
||||
@@ -13,6 +21,21 @@ export type IFlowUpdateParam = {
|
||||
state?: FlowState;
|
||||
};
|
||||
|
||||
export type IFlowRefreshParams = {
|
||||
id: string;
|
||||
type_name: string;
|
||||
type_cls: string;
|
||||
flow_type: 'resource' | 'operator';
|
||||
refresh: {
|
||||
name: string;
|
||||
depends?: Array<{
|
||||
name: string;
|
||||
value: any;
|
||||
has_value: boolean;
|
||||
}>;
|
||||
}[];
|
||||
};
|
||||
|
||||
export type IFlow = {
|
||||
dag_id: string;
|
||||
gmt_created: string;
|
||||
@@ -52,6 +75,25 @@ export type IFlowNodeParameter = {
|
||||
options?: any;
|
||||
value: any;
|
||||
is_list?: boolean;
|
||||
ui: IFlowNodeParameterUI;
|
||||
};
|
||||
|
||||
export type IFlowNodeParameterUI = {
|
||||
ui_type: string;
|
||||
language: string;
|
||||
file_types: string;
|
||||
action: string;
|
||||
attr: {
|
||||
disabled: boolean;
|
||||
[key: string]: any;
|
||||
};
|
||||
editor?: {
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
show_input?: boolean;
|
||||
refresh?: boolean;
|
||||
refresh_depends?: string[];
|
||||
};
|
||||
|
||||
export type IFlowNodeInput = {
|
||||
@@ -139,7 +181,29 @@ export type IFlowData = {
|
||||
viewport: IFlowDataViewport;
|
||||
};
|
||||
|
||||
export interface UpdateFLowAdminsParams {
|
||||
export type IFlowExportParams = {
|
||||
uid: string;
|
||||
admins: string[];
|
||||
}
|
||||
export_type?: 'json' | 'dbgpts';
|
||||
format?: 'json' | 'file';
|
||||
file_name?: string;
|
||||
user_name?: string;
|
||||
sys_code?: string;
|
||||
};
|
||||
|
||||
export type IFlowImportParams = {
|
||||
file: File;
|
||||
save_flow?: boolean;
|
||||
};
|
||||
|
||||
export type IUploadFileRequestParams = {
|
||||
files: Array<File>;
|
||||
user_name?: string;
|
||||
sys_code?: string;
|
||||
};
|
||||
|
||||
export type IUploadFileResponse = {
|
||||
file_name: string;
|
||||
file_id: string;
|
||||
bucket: string;
|
||||
uri?: string;
|
||||
};
|
||||
|
Reference in New Issue
Block a user