@digitalsee-ai/rcs 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/digitalsee/workflow/Canvas/classicNodeCreate.d.ts +19 -0
- package/dist/components/digitalsee/workflow/Canvas/constants.d.ts +15 -1
- package/dist/components/digitalsee/workflow/Canvas/hooks/createNodeAddHandlerNext.d.ts +16 -1
- package/dist/components/digitalsee/workflow/Canvas/hooks/useNodeAddCallback.d.ts +17 -4
- package/dist/components/digitalsee/workflow/Canvas/hooks/useWorkflowCanvasState.d.ts +1 -3
- package/dist/components/digitalsee/workflow/Handles/CustomHandle.d.ts +0 -3
- package/dist/components/digitalsee/workflow/Nodes/ConditionNode.d.ts +1 -1
- package/dist/components/digitalsee/workflow/Nodes/SuperBaseNode.d.ts +1 -6
- package/dist/components/digitalsee/workflow/Nodes/SwitchNode.d.ts +1 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useCategories.d.ts +2 -5
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useNavigation.d.ts +2 -3
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/types.d.ts +1 -19
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/dataTransformers.d.ts +2 -13
- package/dist/components/digitalsee/workflow/api/dip.types.d.ts +0 -30
- package/dist/components/digitalsee/workflow/api/index.d.ts +1 -6
- package/dist/components/digitalsee/workflow/events/eventBus.d.ts +12 -2
- package/dist/components/digitalsee/workflow/hooks/usePanel.d.ts +17 -3
- package/dist/components/digitalsee/workflow/store/panelSlice.d.ts +41 -118
- package/dist/components/digitalsee/workflow/types/Node.d.ts +1 -1
- package/dist/components/digitalsee/workflow/types/engine.d.ts +0 -15
- package/dist/components/digitalsee/workflow/utils/nextNodeSchemaCache.d.ts +0 -8
- package/dist/locales/en-US/link/flow.d.ts +0 -22
- package/dist/locales/en-US.d.ts +0 -22
- package/dist/locales/zh-CN/link/flow.d.ts +0 -22
- package/dist/locales/zh-CN.d.ts +0 -22
- package/dist/locales/zh-TW/link/flow.d.ts +0 -22
- package/dist/locales/zh-TW.d.ts +0 -22
- package/dist/rcs.css +1 -1
- package/dist/rcs.es.js +16150 -18077
- package/dist/rcs.es.js.map +1 -1
- package/dist/rcs.umd.js +58 -58
- package/dist/rcs.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/digitalsee/workflow/Canvas/actionItemToNodeData.d.ts +0 -14
- package/dist/components/digitalsee/workflow/Canvas/hooks/classicNodeAddConnection.d.ts +0 -31
- package/dist/components/digitalsee/workflow/Canvas/hooks/classicNodeAddConnection.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/Handles/customHandleConnectable.d.ts +0 -35
- package/dist/components/digitalsee/workflow/Handles/customHandleConnectable.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/Nodes/classicNodePackageNodes.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/Nodes/classicNodePackagePortLayout.d.ts +0 -23
- package/dist/components/digitalsee/workflow/Nodes/classicNodePackagePortLayout.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/Nodes/useClassicNodePackagePorts.d.ts +0 -26
- package/dist/components/digitalsee/workflow/Nodes/useClassicNodePackagePorts.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/components/EntryTypeSelector.d.ts +0 -8
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/components/NodeCardList.d.ts +0 -19
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useConnectableNodeSelector.d.ts +0 -40
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useNavigation.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useNodeActionState.d.ts +0 -30
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useNodeSelectorPresentation.d.ts +0 -24
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableActionLoader.d.ts +0 -16
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableActionLoader.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableFallback.d.ts +0 -2
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableFallback.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableQuery.d.ts +0 -40
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableQuery.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableResponse.d.ts +0 -35
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableResponse.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/filterEdgeInsertActions.d.ts +0 -62
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/filterEdgeInsertActions.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/nodeAddContext.d.ts +0 -26
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/nodeAddContext.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/api/connectable.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/api/connectable.types.d.ts +0 -75
- package/dist/components/digitalsee/workflow/config/defaultCanvasEngineConfig.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/config/defaultNodeSelectorConfig.d.ts +0 -9
- package/dist/components/digitalsee/workflow/types/NodeAddContext.d.ts +0 -31
- package/dist/components/digitalsee/workflow/utils/classicNodeActionIdentity.d.ts +0 -7
- package/dist/components/digitalsee/workflow/utils/classicNodeActionIdentity.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/utils/classicNodePackageConnection.d.ts +0 -28
- package/dist/components/digitalsee/workflow/utils/classicNodePackageConnection.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/utils/classicNodePackageGraphValidation.d.ts +0 -29
- package/dist/components/digitalsee/workflow/utils/classicNodePackageGraphValidation.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/utils/compatiblePortSelection.d.ts +0 -79
- package/dist/components/digitalsee/workflow/utils/compatiblePortSelection.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/utils/nodeDataFormatter.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/utils/portConnectionValidationMessages.d.ts +0 -48
- package/dist/components/digitalsee/workflow/utils/portConnectionValidationMessages.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/utils/portConnectionValidator.d.ts +0 -66
- package/dist/components/digitalsee/workflow/utils/portConnectionValidator.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/utils/workflowConnectionValidator.d.ts +0 -20
- package/dist/components/digitalsee/workflow/utils/workflowConnectionValidator.test.d.ts +0 -1
- /package/dist/components/digitalsee/workflow/Canvas/{constants.test.d.ts → classicNodeCreate.test.d.ts} +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
interface CreatedNodeConnectorResponse {
|
|
2
|
+
connector_id?: string | number | null;
|
|
3
|
+
connectorId?: string | number | null;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* 生成创建节点响应中的连接器字段补丁。
|
|
7
|
+
*
|
|
8
|
+
* 旧版节点的创建接口可能没有回传 connector_id。此时不返回该字段,
|
|
9
|
+
* 让后续节点数据合并继续保留动作选择器中已有的 connector_id。
|
|
10
|
+
* NodePackage 节点仍显式使用 null,避免带入选择器的临时连接器标识。
|
|
11
|
+
*
|
|
12
|
+
* @param actionId 创建节点时提交的动作 ID。
|
|
13
|
+
* @param response 创建节点接口响应。
|
|
14
|
+
* @returns 合并到本地节点数据的连接器字段。
|
|
15
|
+
*/
|
|
16
|
+
export declare function getClassicCreatedConnectorPatch(actionId: unknown, response: CreatedNodeConnectorResponse): {
|
|
17
|
+
connector_id?: string | number | null;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { EdgeType } from '../enums/edge';
|
|
2
|
+
import { NodeData as NodeFactoryData } from '../Nodes/NodeFactory';
|
|
3
|
+
import { ActionItem } from '../Panels/ModernNodeSelectorPanel/types';
|
|
2
4
|
import { CanvasAPI } from '../types/engine';
|
|
3
5
|
import { NodeType } from '../types/Node';
|
|
4
6
|
import { Edge, MarkerType, Node, Viewport } from '@xyflow/react';
|
|
5
|
-
export { convertActionItemToNodeData, convertActionItemToNodeDataNext, } from './actionItemToNodeData';
|
|
6
7
|
export declare const startNode: {
|
|
7
8
|
type: NodeType;
|
|
8
9
|
id: string;
|
|
@@ -18,6 +19,19 @@ export declare const startNode: {
|
|
|
18
19
|
description: string;
|
|
19
20
|
};
|
|
20
21
|
};
|
|
22
|
+
export declare const convertActionItemToNodeData: (actionItem: Partial<ActionItem> & {
|
|
23
|
+
status?: string;
|
|
24
|
+
protocol?: string;
|
|
25
|
+
} & Record<string, any>) => NodeFactoryData;
|
|
26
|
+
/**
|
|
27
|
+
* NEXT 模式专用转换函数(暂废保留分支):在 convertActionItemToNodeData 基础上额外保留 name 字段
|
|
28
|
+
* name 在 NEXT 模式下作为节点实例的唯一显示名称
|
|
29
|
+
* 当前 nodepackage 节点仍走 CLASSIC 的 convertActionItemToNodeData。
|
|
30
|
+
*/
|
|
31
|
+
export declare const convertActionItemToNodeDataNext: (actionItem: Partial<ActionItem> & {
|
|
32
|
+
status?: string;
|
|
33
|
+
protocol?: string;
|
|
34
|
+
} & Record<string, any>) => NodeFactoryData;
|
|
21
35
|
export declare const nodeTypes: Record<NodeType, import('react').ComponentType<any>>;
|
|
22
36
|
export declare const edgeTypes: {
|
|
23
37
|
main: import('react').FC<import('../Edges/BaseEdge').CustomEdgeProps>;
|
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
import { WorkflowCanvasStrategy } from '../types';
|
|
2
2
|
import { NodeData as NodeFactoryData } from '../../Nodes/NodeFactory';
|
|
3
3
|
import { ActionItem } from '../../Panels/ModernNodeSelectorPanel/types';
|
|
4
|
-
import { NodeAddInfo } from '../../types/NodeAddContext';
|
|
5
4
|
import { Edge, Node } from '@xyflow/react';
|
|
5
|
+
interface NodeAddInfo {
|
|
6
|
+
sourceNodeId?: string;
|
|
7
|
+
sourceHandle?: string;
|
|
8
|
+
targetNodeId?: string;
|
|
9
|
+
targetHandle?: string;
|
|
10
|
+
position?: {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
};
|
|
14
|
+
trigger?: boolean;
|
|
15
|
+
edge?: any;
|
|
16
|
+
sourceNode?: any;
|
|
17
|
+
targetNode?: any;
|
|
18
|
+
protocol?: string;
|
|
19
|
+
refresh?: boolean;
|
|
20
|
+
}
|
|
6
21
|
interface CreateNodeAddHandlerNextParams {
|
|
7
22
|
workflowId?: string;
|
|
8
23
|
strategy: WorkflowCanvasStrategy;
|
|
@@ -2,9 +2,23 @@ import { WorkflowCanvasStrategy } from '../types';
|
|
|
2
2
|
import { EngineMode } from '../../enums/workflow';
|
|
3
3
|
import { NodeData as NodeFactoryData } from '../../Nodes/NodeFactory';
|
|
4
4
|
import { ActionItem } from '../../Panels/ModernNodeSelectorPanel/types';
|
|
5
|
-
import { EdgeConfig } from '../../types/engine';
|
|
6
|
-
import { NodeAddInfo } from '../../types/NodeAddContext';
|
|
7
5
|
import { Edge, Node } from '@xyflow/react';
|
|
6
|
+
interface NodeAddInfo {
|
|
7
|
+
sourceNodeId?: string;
|
|
8
|
+
sourceHandle?: string;
|
|
9
|
+
targetNodeId?: string;
|
|
10
|
+
targetHandle?: string;
|
|
11
|
+
position?: {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
};
|
|
15
|
+
trigger?: boolean;
|
|
16
|
+
edge?: any;
|
|
17
|
+
sourceNode?: any;
|
|
18
|
+
targetNode?: any;
|
|
19
|
+
protocol?: string;
|
|
20
|
+
refresh?: boolean;
|
|
21
|
+
}
|
|
8
22
|
interface UseNodeAddCallbackParams {
|
|
9
23
|
workflowId?: string;
|
|
10
24
|
strategy: WorkflowCanvasStrategy;
|
|
@@ -24,9 +38,8 @@ interface UseNodeAddCallbackParams {
|
|
|
24
38
|
}, edge?: Edge) => void;
|
|
25
39
|
setNodeConfigVisible: (nodeId: string | null) => void;
|
|
26
40
|
setNodeFitHumanView: (nodeId: string) => void;
|
|
27
|
-
validateConnectionAgainstSnapshot: (edge: EdgeConfig, nodes: Node[], edges: Edge[]) => boolean;
|
|
28
41
|
saveFlow: () => Promise<void>;
|
|
29
42
|
engineMode: EngineMode;
|
|
30
43
|
}
|
|
31
|
-
export declare function useNodeAddCallback({ workflowId, strategy, store, addNodes, addEdges, removeEdges, setNodeAddCallback, handleEdgeAddNode, setNodeConfigVisible, setNodeFitHumanView,
|
|
44
|
+
export declare function useNodeAddCallback({ workflowId, strategy, store, addNodes, addEdges, removeEdges, setNodeAddCallback, handleEdgeAddNode, setNodeConfigVisible, setNodeFitHumanView, saveFlow, engineMode, }: UseNodeAddCallbackParams): void;
|
|
32
45
|
export {};
|
|
@@ -6,7 +6,7 @@ import { useNodesInteraction } from '../../hooks/use-nodes-interaction';
|
|
|
6
6
|
import { usePanel } from '../../hooks/usePanel';
|
|
7
7
|
import { useWorkflow } from '../../hooks/useWorkflow';
|
|
8
8
|
import { useAppDispatch } from '../../store';
|
|
9
|
-
import { CanvasAPI
|
|
9
|
+
import { CanvasAPI } from '../../types/engine';
|
|
10
10
|
import { Connection, Edge, EdgeChange, Node, NodeChange, useEdgesState, useNodesState, useReactFlow, useStoreApi } from '@xyflow/react';
|
|
11
11
|
import { default as React } from 'react';
|
|
12
12
|
export interface WorkflowCanvasStateResult {
|
|
@@ -35,8 +35,6 @@ export interface WorkflowCanvasStateResult {
|
|
|
35
35
|
onNodesChange: (changes: NodeChange[]) => void;
|
|
36
36
|
handleEdgesChange: (changes: EdgeChange[]) => void;
|
|
37
37
|
handleConnect: (params: Connection) => void;
|
|
38
|
-
isValidConnection: (params: Connection | Edge) => boolean;
|
|
39
|
-
validateConnectionAgainstSnapshot: (edge: EngineEdgeConfig, nodes: Node[], edges: Edge[]) => boolean;
|
|
40
38
|
handleEdgeAddNode: (position: {
|
|
41
39
|
x: number;
|
|
42
40
|
y: number;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { DipPortSchema } from '../api/dip';
|
|
2
1
|
import { Connection, HandleType as FlowHandleType, Position, IsValidConnection as ReactFlowIsValidConnection } from '@xyflow/react';
|
|
3
2
|
import { default as React } from 'react';
|
|
4
3
|
import { NodeStatus } from '../types/Node';
|
|
@@ -21,8 +20,6 @@ interface CustomHandleProps {
|
|
|
21
20
|
square?: boolean;
|
|
22
21
|
shape?: 'square' | 'circle' | 'rhombus';
|
|
23
22
|
protocol?: string;
|
|
24
|
-
/** NodePackage 真实端口 Schema;仅用于保留端口元数据,不改变 input 只接收连线的语义。 */
|
|
25
|
-
portSchema?: DipPortSchema;
|
|
26
23
|
}
|
|
27
24
|
/**
|
|
28
25
|
* @description 自定义连接桩组件,统一输出 11×11px 菱形桩点并同步节点状态色。
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { DipPortSchema } from '../api/dip';
|
|
2
1
|
import { HandleType } from '../types/Handle';
|
|
3
2
|
import { NodeData, NodeStatus, NodeType } from '../types/Node';
|
|
4
3
|
import { Position } from '@xyflow/react';
|
|
@@ -8,12 +7,8 @@ export interface HandleConfig {
|
|
|
8
7
|
position: Position;
|
|
9
8
|
type: HandleType;
|
|
10
9
|
isMain?: boolean;
|
|
11
|
-
label?:
|
|
10
|
+
label?: string;
|
|
12
11
|
maxConnections?: number;
|
|
13
|
-
/** NodePackage 端口的连接类型;与 legacy protocol 语义保持隔离。 */
|
|
14
|
-
connectionType?: string;
|
|
15
|
-
/** 原始端口 Schema,供统一连线校验器读取 type/required/黑白名单等约束。 */
|
|
16
|
-
portSchema?: DipPortSchema;
|
|
17
12
|
style?: React.CSSProperties;
|
|
18
13
|
category?: string;
|
|
19
14
|
protocol?: string;
|
package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useCategories.d.ts
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { CategoryItem, CategoryRequestType } from '../types';
|
|
2
|
-
import { NodeAddInfo } from '../../../types/NodeAddContext';
|
|
3
2
|
interface UseCategoriesProps {
|
|
4
3
|
onFetchCategories: (type?: CategoryRequestType) => Promise<CategoryItem[]>;
|
|
5
4
|
restrictToCategory?: string;
|
|
6
5
|
nodeSelectorVisible: boolean;
|
|
7
|
-
nodeAddInfo?:
|
|
6
|
+
nodeAddInfo?: any;
|
|
8
7
|
fallbackCategories?: CategoryItem[];
|
|
9
|
-
requestContextKey: string;
|
|
10
8
|
}
|
|
11
|
-
export declare const useCategories: ({ onFetchCategories, restrictToCategory, nodeSelectorVisible, nodeAddInfo, fallbackCategories,
|
|
9
|
+
export declare const useCategories: ({ onFetchCategories, restrictToCategory, nodeSelectorVisible, nodeAddInfo, fallbackCategories, }: UseCategoriesProps) => {
|
|
12
10
|
categories: CategoryItem[];
|
|
13
|
-
categoriesReady: boolean;
|
|
14
11
|
isLoadingCategories: boolean;
|
|
15
12
|
setCategories: import('react').Dispatch<import('react').SetStateAction<CategoryItem[]>>;
|
|
16
13
|
};
|
package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useNavigation.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { CategoryItem, LinkSearchParams, NodeFetchResult, NodeTypeItem } from '../types';
|
|
2
|
-
import { NodeAddInfo } from '../../../
|
|
2
|
+
import { NodeAddInfo } from '../../../store/panelSlice';
|
|
3
3
|
interface UseNavigationProps {
|
|
4
4
|
categories: CategoryItem[];
|
|
5
|
-
categoriesReady: boolean;
|
|
6
5
|
initialCategory?: string;
|
|
7
6
|
nodeSelectorVisible: boolean;
|
|
8
7
|
nodeAddInfo?: NodeAddInfo | null;
|
|
@@ -10,7 +9,7 @@ interface UseNavigationProps {
|
|
|
10
9
|
defaultPageSize?: number;
|
|
11
10
|
flowId?: string;
|
|
12
11
|
}
|
|
13
|
-
export declare const useNavigation: ({ categories,
|
|
12
|
+
export declare const useNavigation: ({ categories, initialCategory, nodeSelectorVisible, nodeAddInfo, onFetchNodesByCategory, defaultPageSize, flowId, }: UseNavigationProps) => {
|
|
14
13
|
categoryNodes: NodeTypeItem[];
|
|
15
14
|
currentCategory: CategoryItem;
|
|
16
15
|
isLoadingNodes: boolean;
|
|
@@ -5,9 +5,6 @@ import { NodeType } from '../../types/Node';
|
|
|
5
5
|
*/
|
|
6
6
|
export interface NodeTypeItem {
|
|
7
7
|
id: string;
|
|
8
|
-
/** 后端返回稳定标识时才允许展开/选择。 */
|
|
9
|
-
selectable?: boolean;
|
|
10
|
-
identifierSource?: string;
|
|
11
8
|
type: string;
|
|
12
9
|
name: string;
|
|
13
10
|
description: string;
|
|
@@ -44,12 +41,6 @@ export interface NodeFetchResult {
|
|
|
44
41
|
*/
|
|
45
42
|
export interface ActionItem {
|
|
46
43
|
id: string;
|
|
47
|
-
/** UI 列表使用稳定 id;创建 CLASSIC 节点时必须使用后端原始 Long action_id。 */
|
|
48
|
-
backendActionId?: string;
|
|
49
|
-
action_id?: string;
|
|
50
|
-
/** 后端返回稳定标识时才允许创建节点。 */
|
|
51
|
-
selectable?: boolean;
|
|
52
|
-
identifierSource?: string;
|
|
53
44
|
type: NodeType;
|
|
54
45
|
action_type: NodeType;
|
|
55
46
|
action_key?: string;
|
|
@@ -98,10 +89,6 @@ export interface ConnectorInfo {
|
|
|
98
89
|
*/
|
|
99
90
|
export interface CategoryItem {
|
|
100
91
|
id: string;
|
|
101
|
-
/** connectable 接口需要的数值分类 ID。 */
|
|
102
|
-
categoryId?: string | number;
|
|
103
|
-
/** 缺少数值分类 ID 时仍展示,但不能作为服务端筛选条件。 */
|
|
104
|
-
filterable?: boolean;
|
|
105
92
|
name: string;
|
|
106
93
|
description: string;
|
|
107
94
|
icon?: string;
|
|
@@ -114,14 +101,12 @@ export interface CategoryItem {
|
|
|
114
101
|
*/
|
|
115
102
|
export interface ApiActionItem {
|
|
116
103
|
id: string;
|
|
117
|
-
backendActionId?: string;
|
|
118
|
-
action_id?: string;
|
|
119
104
|
action_key?: string;
|
|
120
105
|
action_ver?: number;
|
|
121
106
|
is_trigger: number;
|
|
122
107
|
name: string;
|
|
123
108
|
description: string | null;
|
|
124
|
-
connector_id: string
|
|
109
|
+
connector_id: string;
|
|
125
110
|
status: number;
|
|
126
111
|
protocol: string;
|
|
127
112
|
config_schema: any;
|
|
@@ -149,9 +134,6 @@ export interface ModernNodeSelectorProps {
|
|
|
149
134
|
*/
|
|
150
135
|
export interface LinkSearchParams {
|
|
151
136
|
name?: string;
|
|
152
|
-
keyword?: string;
|
|
153
|
-
linkId?: string;
|
|
154
|
-
categoryId?: string | number;
|
|
155
137
|
build_type?: string;
|
|
156
138
|
deployment_type?: string;
|
|
157
139
|
app_domain_category?: string;
|
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
import { ActionItem, ApiActionItem,
|
|
2
|
-
import { QueryConnectableNodePackageDto } from '../../../api/connectable.types';
|
|
1
|
+
import { ActionItem, ApiActionItem, CategoryRequestType, ConnectorInfo, LinkSearchParams, NodeFetchResult } from '../types';
|
|
3
2
|
export declare const transformAction: (action: ApiActionItem, connector: ConnectorInfo) => ActionItem;
|
|
4
|
-
/**
|
|
5
|
-
* 将 connectable 分类响应转换成现有面板模型。
|
|
6
|
-
*/
|
|
7
|
-
export declare const transformConnectableCategoriesResponse: (response: unknown) => CategoryItem[];
|
|
8
|
-
/**
|
|
9
|
-
* 将 connectable 节点包分页响应转换成现有面板模型。
|
|
10
|
-
*/
|
|
11
|
-
export declare const transformConnectablePluginResponse: (response: unknown) => NodeFetchResult;
|
|
12
|
-
export declare const fetchConnectableCategories: (query: QueryConnectableNodePackageDto) => Promise<CategoryItem[]>;
|
|
13
|
-
export declare const fetchConnectableNodes: (query: QueryConnectableNodePackageDto) => Promise<NodeFetchResult>;
|
|
14
3
|
export declare const fetchNodesByCategory: (params?: LinkSearchParams) => Promise<NodeFetchResult>;
|
|
15
|
-
export declare const fetchCategories: (type?: CategoryRequestType) => Promise<CategoryItem[] | {
|
|
4
|
+
export declare const fetchCategories: (type?: CategoryRequestType) => Promise<import('../types').CategoryItem[] | {
|
|
16
5
|
id: any;
|
|
17
6
|
name: any;
|
|
18
7
|
description: any;
|
|
@@ -465,36 +465,6 @@ export interface DipPortSchema {
|
|
|
465
465
|
name: string;
|
|
466
466
|
/** UI 显示名称,如 "输入"、"True 分支"、"默认输出" */
|
|
467
467
|
displayName?: string;
|
|
468
|
-
/** ACM SNAKE_CASE 传输字段;消费前由 normalizePortSchema 归一化 */
|
|
469
|
-
display_name?: string;
|
|
470
|
-
/**
|
|
471
|
-
* 端口连接能力类型,缺失或空字符串时按 `main` 处理。
|
|
472
|
-
*
|
|
473
|
-
* 常见值:`main`、`trigger`、`control`、`ai_model`、`ai_tool`、`ai_memory`。
|
|
474
|
-
*/
|
|
475
|
-
type?: string;
|
|
476
|
-
/** 输入端口是否必须存在至少一条连线 */
|
|
477
|
-
required?: boolean;
|
|
478
|
-
/** 端口允许的最大连线数,`null` 或缺失表示不限制 */
|
|
479
|
-
maxConnections?: number | null;
|
|
480
|
-
/** ACM SNAKE_CASE 传输字段 */
|
|
481
|
-
max_connections?: number | null;
|
|
482
|
-
/** 输入端口允许连接的源节点 schema key 白名单,空列表表示不限制 */
|
|
483
|
-
allowedSourceNodeKeys?: string[];
|
|
484
|
-
/** ACM SNAKE_CASE 传输字段 */
|
|
485
|
-
allowed_source_node_keys?: string[];
|
|
486
|
-
/** 输出端口允许连接的目标节点 schema key 白名单,空列表表示不限制 */
|
|
487
|
-
allowedTargetNodeKeys?: string[];
|
|
488
|
-
/** ACM SNAKE_CASE 传输字段 */
|
|
489
|
-
allowed_target_node_keys?: string[];
|
|
490
|
-
/** 输入端口禁止连接的源节点 schema key 黑名单 */
|
|
491
|
-
deniedSourceNodeKeys?: string[];
|
|
492
|
-
/** ACM SNAKE_CASE 传输字段 */
|
|
493
|
-
denied_source_node_keys?: string[];
|
|
494
|
-
/** 输出端口禁止连接的目标节点 schema key 黑名单 */
|
|
495
|
-
deniedTargetNodeKeys?: string[];
|
|
496
|
-
/** ACM SNAKE_CASE 传输字段 */
|
|
497
|
-
denied_target_node_keys?: string[];
|
|
498
468
|
}
|
|
499
469
|
/**
|
|
500
470
|
* 节点输出字段 Schema
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { QueryConnectableNodePackageDto } from './connectable.types';
|
|
2
1
|
import { DipNodeSchema } from './dip.types';
|
|
3
2
|
import { LinkSearchParams, LinkSearchResponse } from '../Panels/ModernNodeSelectorPanel/types';
|
|
4
3
|
import { AxiosRequestConfig } from 'axios';
|
|
5
|
-
export type { ConnectableNodePackageQueryBase, ConnectablePersistedNodeId, IndependentConnectableNodePackageQuery, QueryConnectableNodePackageDto, QueryConnectableNodePackageRequestBody, SourceConnectableNodePackageQuery, TargetConnectableNodePackageQuery, } from './connectable.types';
|
|
6
4
|
export interface WorkflowRequestOptions {
|
|
7
5
|
method?: AxiosRequestConfig['method'];
|
|
8
6
|
headers?: Record<string, string>;
|
|
@@ -15,8 +13,6 @@ export interface WorkflowApiEndpoints {
|
|
|
15
13
|
nodeCategory: string;
|
|
16
14
|
nodesList: string;
|
|
17
15
|
searchLinks: string;
|
|
18
|
-
connectableNodePackageCategories: string;
|
|
19
|
-
connectableNodePackagePlugins: string;
|
|
20
16
|
actions: string;
|
|
21
17
|
actionNodeSchema: string;
|
|
22
18
|
createNode: string;
|
|
@@ -82,8 +78,6 @@ export declare function apiGetNodesList(params: {
|
|
|
82
78
|
name?: string;
|
|
83
79
|
}): Promise<unknown>;
|
|
84
80
|
export declare function apiSearchLinks(params: LinkSearchParams): Promise<LinkSearchResponse>;
|
|
85
|
-
export declare function apiQueryConnectableNodePackageCategories(query: QueryConnectableNodePackageDto): Promise<unknown>;
|
|
86
|
-
export declare function apiQueryConnectableNodePackagePlugins(query: QueryConnectableNodePackageDto): Promise<unknown>;
|
|
87
81
|
export declare const apiGetActions: (params: {
|
|
88
82
|
linkId?: string;
|
|
89
83
|
name?: string;
|
|
@@ -205,3 +199,4 @@ export declare function onlineFlow(id: any): Promise<unknown>;
|
|
|
205
199
|
export declare const apiGetAccountInstanceV2: (linkId?: string | null, actionAccountSchemaId?: string | number) => Promise<unknown>;
|
|
206
200
|
export declare const getAppList: (params: any, formData?: any) => Promise<unknown>;
|
|
207
201
|
export declare const fetchSubFlowList: (name: any, formData?: any) => Promise<unknown>;
|
|
202
|
+
export {};
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { NodeTypeItem } from '../Panels/ModernNodeSelectorPanel/types';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
export interface NodeAddInfo {
|
|
3
|
+
sourceNodeId?: string;
|
|
4
|
+
sourceHandle?: string;
|
|
5
|
+
targetNodeId?: string;
|
|
6
|
+
targetHandle?: string;
|
|
7
|
+
position: {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
};
|
|
11
|
+
trigger?: boolean;
|
|
12
|
+
edge?: any;
|
|
13
|
+
}
|
|
4
14
|
export type NodeAddEvent = {
|
|
5
15
|
info: NodeAddInfo;
|
|
6
16
|
nodeType: NodeTypeItem;
|
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
import { ActionItem } from '../Panels/ModernNodeSelectorPanel/types';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
export interface NodeAddInfo {
|
|
3
|
+
sourceNodeId?: string;
|
|
4
|
+
sourceHandle?: string;
|
|
5
|
+
targetNodeId?: string;
|
|
6
|
+
targetHandle?: string;
|
|
7
|
+
position?: {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
};
|
|
11
|
+
edge?: any;
|
|
12
|
+
sourceNode?: any;
|
|
13
|
+
targetNode?: any;
|
|
14
|
+
trigger?: boolean;
|
|
15
|
+
protocol?: string;
|
|
16
|
+
refresh?: boolean;
|
|
17
|
+
}
|
|
4
18
|
export declare function usePanel(): {
|
|
5
19
|
nodeSelectorVisible: boolean;
|
|
6
|
-
nodeAddInfo: NodeAddInfo;
|
|
20
|
+
nodeAddInfo: import('../store/panelSlice').NodeAddInfo;
|
|
7
21
|
openNodeSelector: (info: NodeAddInfo) => void;
|
|
8
22
|
closeNodeSelector: () => void;
|
|
9
23
|
handleNodeSelect: (nodeType: ActionItem) => void;
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import { PayloadAction } from '@reduxjs/toolkit';
|
|
2
2
|
import { ActionItem, NodeTypeItem } from '../Panels/ModernNodeSelectorPanel/types';
|
|
3
|
-
|
|
3
|
+
export interface NodeAddInfo {
|
|
4
|
+
sourceNodeId: string;
|
|
5
|
+
sourceHandle: string;
|
|
6
|
+
targetNodeId?: string;
|
|
7
|
+
targetHandle?: string;
|
|
8
|
+
position: {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
};
|
|
12
|
+
edge?: any;
|
|
13
|
+
sourceNode?: any;
|
|
14
|
+
targetNode?: any;
|
|
15
|
+
trigger?: boolean;
|
|
16
|
+
protocol?: string;
|
|
17
|
+
refresh?: boolean;
|
|
18
|
+
}
|
|
4
19
|
type NodeAddCallback = ((info: NodeAddInfo, nodeType: ActionItem) => void) | null;
|
|
5
20
|
export interface PanelState {
|
|
6
21
|
nodeSelectorVisible: boolean;
|
|
@@ -11,40 +26,17 @@ export declare const panelSlice: import('@reduxjs/toolkit').Slice<PanelState, {
|
|
|
11
26
|
openNodeSelector: (state: {
|
|
12
27
|
nodeSelectorVisible: boolean;
|
|
13
28
|
nodeAddInfo: {
|
|
14
|
-
sourceNodeId
|
|
15
|
-
sourceHandle
|
|
29
|
+
sourceNodeId: string;
|
|
30
|
+
sourceHandle: string;
|
|
16
31
|
targetNodeId?: string;
|
|
17
32
|
targetHandle?: string;
|
|
18
|
-
position
|
|
33
|
+
position: {
|
|
19
34
|
x: number;
|
|
20
35
|
y: number;
|
|
21
36
|
};
|
|
22
|
-
edge?:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
target: string;
|
|
26
|
-
sourceHandle?: string | null;
|
|
27
|
-
sourceHandleId?: string | null;
|
|
28
|
-
targetHandle?: string | null;
|
|
29
|
-
targetHandleId?: string | null;
|
|
30
|
-
data?: {
|
|
31
|
-
[x: string]: unknown;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
sourceNode?: {
|
|
35
|
-
data: {
|
|
36
|
-
[x: string]: unknown;
|
|
37
|
-
};
|
|
38
|
-
id: string;
|
|
39
|
-
type?: string;
|
|
40
|
-
};
|
|
41
|
-
targetNode?: {
|
|
42
|
-
data: {
|
|
43
|
-
[x: string]: unknown;
|
|
44
|
-
};
|
|
45
|
-
id: string;
|
|
46
|
-
type?: string;
|
|
47
|
-
};
|
|
37
|
+
edge?: any;
|
|
38
|
+
sourceNode?: any;
|
|
39
|
+
targetNode?: any;
|
|
48
40
|
trigger?: boolean;
|
|
49
41
|
protocol?: string;
|
|
50
42
|
refresh?: boolean;
|
|
@@ -54,40 +46,17 @@ export declare const panelSlice: import('@reduxjs/toolkit').Slice<PanelState, {
|
|
|
54
46
|
closeNodeSelector: (state: {
|
|
55
47
|
nodeSelectorVisible: boolean;
|
|
56
48
|
nodeAddInfo: {
|
|
57
|
-
sourceNodeId
|
|
58
|
-
sourceHandle
|
|
49
|
+
sourceNodeId: string;
|
|
50
|
+
sourceHandle: string;
|
|
59
51
|
targetNodeId?: string;
|
|
60
52
|
targetHandle?: string;
|
|
61
|
-
position
|
|
53
|
+
position: {
|
|
62
54
|
x: number;
|
|
63
55
|
y: number;
|
|
64
56
|
};
|
|
65
|
-
edge?:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
target: string;
|
|
69
|
-
sourceHandle?: string | null;
|
|
70
|
-
sourceHandleId?: string | null;
|
|
71
|
-
targetHandle?: string | null;
|
|
72
|
-
targetHandleId?: string | null;
|
|
73
|
-
data?: {
|
|
74
|
-
[x: string]: unknown;
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
sourceNode?: {
|
|
78
|
-
data: {
|
|
79
|
-
[x: string]: unknown;
|
|
80
|
-
};
|
|
81
|
-
id: string;
|
|
82
|
-
type?: string;
|
|
83
|
-
};
|
|
84
|
-
targetNode?: {
|
|
85
|
-
data: {
|
|
86
|
-
[x: string]: unknown;
|
|
87
|
-
};
|
|
88
|
-
id: string;
|
|
89
|
-
type?: string;
|
|
90
|
-
};
|
|
57
|
+
edge?: any;
|
|
58
|
+
sourceNode?: any;
|
|
59
|
+
targetNode?: any;
|
|
91
60
|
trigger?: boolean;
|
|
92
61
|
protocol?: string;
|
|
93
62
|
refresh?: boolean;
|
|
@@ -97,40 +66,17 @@ export declare const panelSlice: import('@reduxjs/toolkit').Slice<PanelState, {
|
|
|
97
66
|
setNodeAddCallback: (state: {
|
|
98
67
|
nodeSelectorVisible: boolean;
|
|
99
68
|
nodeAddInfo: {
|
|
100
|
-
sourceNodeId
|
|
101
|
-
sourceHandle
|
|
69
|
+
sourceNodeId: string;
|
|
70
|
+
sourceHandle: string;
|
|
102
71
|
targetNodeId?: string;
|
|
103
72
|
targetHandle?: string;
|
|
104
|
-
position
|
|
73
|
+
position: {
|
|
105
74
|
x: number;
|
|
106
75
|
y: number;
|
|
107
76
|
};
|
|
108
|
-
edge?:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
target: string;
|
|
112
|
-
sourceHandle?: string | null;
|
|
113
|
-
sourceHandleId?: string | null;
|
|
114
|
-
targetHandle?: string | null;
|
|
115
|
-
targetHandleId?: string | null;
|
|
116
|
-
data?: {
|
|
117
|
-
[x: string]: unknown;
|
|
118
|
-
};
|
|
119
|
-
};
|
|
120
|
-
sourceNode?: {
|
|
121
|
-
data: {
|
|
122
|
-
[x: string]: unknown;
|
|
123
|
-
};
|
|
124
|
-
id: string;
|
|
125
|
-
type?: string;
|
|
126
|
-
};
|
|
127
|
-
targetNode?: {
|
|
128
|
-
data: {
|
|
129
|
-
[x: string]: unknown;
|
|
130
|
-
};
|
|
131
|
-
id: string;
|
|
132
|
-
type?: string;
|
|
133
|
-
};
|
|
77
|
+
edge?: any;
|
|
78
|
+
sourceNode?: any;
|
|
79
|
+
targetNode?: any;
|
|
134
80
|
trigger?: boolean;
|
|
135
81
|
protocol?: string;
|
|
136
82
|
refresh?: boolean;
|
|
@@ -140,40 +86,17 @@ export declare const panelSlice: import('@reduxjs/toolkit').Slice<PanelState, {
|
|
|
140
86
|
executeNodeAddCallback: (state: {
|
|
141
87
|
nodeSelectorVisible: boolean;
|
|
142
88
|
nodeAddInfo: {
|
|
143
|
-
sourceNodeId
|
|
144
|
-
sourceHandle
|
|
89
|
+
sourceNodeId: string;
|
|
90
|
+
sourceHandle: string;
|
|
145
91
|
targetNodeId?: string;
|
|
146
92
|
targetHandle?: string;
|
|
147
|
-
position
|
|
93
|
+
position: {
|
|
148
94
|
x: number;
|
|
149
95
|
y: number;
|
|
150
96
|
};
|
|
151
|
-
edge?:
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
target: string;
|
|
155
|
-
sourceHandle?: string | null;
|
|
156
|
-
sourceHandleId?: string | null;
|
|
157
|
-
targetHandle?: string | null;
|
|
158
|
-
targetHandleId?: string | null;
|
|
159
|
-
data?: {
|
|
160
|
-
[x: string]: unknown;
|
|
161
|
-
};
|
|
162
|
-
};
|
|
163
|
-
sourceNode?: {
|
|
164
|
-
data: {
|
|
165
|
-
[x: string]: unknown;
|
|
166
|
-
};
|
|
167
|
-
id: string;
|
|
168
|
-
type?: string;
|
|
169
|
-
};
|
|
170
|
-
targetNode?: {
|
|
171
|
-
data: {
|
|
172
|
-
[x: string]: unknown;
|
|
173
|
-
};
|
|
174
|
-
id: string;
|
|
175
|
-
type?: string;
|
|
176
|
-
};
|
|
97
|
+
edge?: any;
|
|
98
|
+
sourceNode?: any;
|
|
99
|
+
targetNode?: any;
|
|
177
100
|
trigger?: boolean;
|
|
178
101
|
protocol?: string;
|
|
179
102
|
refresh?: boolean;
|
|
@@ -181,6 +104,6 @@ export declare const panelSlice: import('@reduxjs/toolkit').Slice<PanelState, {
|
|
|
181
104
|
nodeAddCallback: NodeAddCallback;
|
|
182
105
|
}, action: PayloadAction<NodeTypeItem>) => void;
|
|
183
106
|
}, "panel", "panel", import('@reduxjs/toolkit').SliceSelectors<PanelState>>;
|
|
184
|
-
export declare const openNodeSelector: import('@reduxjs/toolkit').
|
|
107
|
+
export declare const openNodeSelector: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<NodeAddInfo, "panel/openNodeSelector">, closeNodeSelector: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"panel/closeNodeSelector">, setNodeAddCallback: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<(info: NodeAddInfo, nodeType: ActionItem) => void, "panel/setNodeAddCallback">, executeNodeAddCallback: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<NodeTypeItem, "panel/executeNodeAddCallback">;
|
|
185
108
|
declare const _default: import('@reduxjs/toolkit').Reducer<PanelState>;
|
|
186
109
|
export default _default;
|