feat(web): Add DAG variables to web flow (#1981)

Co-authored-by: Fangyin Cheng <staneyffer@gmail.com>
Co-authored-by: 谨欣 <echo.cmy@antgroup.com>
Co-authored-by: yanzhiyong <932374019@qq.com>
Co-authored-by: 严志勇 <yanzhiyong@tiansuixiansheng.com>
This commit is contained in:
Dreammy23
2024-09-10 09:39:40 +08:00
committed by GitHub
parent fe29f977f3
commit 746e4fda37
23 changed files with 767 additions and 156 deletions

View File

@@ -12,6 +12,7 @@ export type IFlowUpdateParam = {
uid?: string;
flow_data?: IFlowData;
state?: FlowState;
variables?: IVariableItem[];
};
export type IFlowRefreshParams = {
@@ -169,8 +170,9 @@ export type IFlowDataViewport = {
};
export type IFlowData = {
nodes: Array<IFlowDataNode>;
edges: Array<IFlowDataEdge>;
nodes: IFlowDataNode[];
edges: IFlowDataEdge[];
variables?: IVariableItem[];
viewport: IFlowDataViewport;
};
@@ -200,3 +202,54 @@ export type IUploadFileResponse = {
bucket: string;
uri?: string;
};
export type IGetKeysRequestParams = {
user_name?: string;
sys_code?: string;
category?: string;
};
export type IGetKeysResponseData = {
key: string;
label: string;
description: string;
value_type: string;
category: string;
scope: string;
scope_key: string | null;
};
export type IGetVariablesByKeyRequestParams = {
key: string;
scope: string;
scope_key?: string;
user_name?: string;
sys_code?: string;
page?: number;
page_size?: number;
};
export type IGetVariablesByKeyResponseData = {
items: IVariableItem[];
total_count: number;
total_pages: number;
page: number;
page_size: number;
};
export type IVariableItem = {
key: string;
label: string;
description: string | null;
value_type: string;
category: string;
scope: string;
scope_key: string | null;
name: string;
value: string;
enabled: boolean;
user_name: string | null;
sys_code: string | null;
id: number;
[key: string]: any;
};