import { Port, Node, Connection } from '../../types/core'; import { NodeDefinition } from '../../types/NodeDefinition'; /** * Create a connection object based on port types. * Normalizes port order so that the connection is always from output to input. * * @param fromPort - First port (can be input or output) * @param toPort - Second port (can be input or output) * @returns Connection data with normalized from/to, or null if invalid pairing */ export declare function createConnection(fromPort: Port, toPort: Port): { fromNodeId: string; fromPortId: string; toNodeId: string; toPortId: string; } | null; /** * Create a connection only if valid according to connection validation rules. * Normalizes port order so that the connection is always from output to input. * * @param fromPort - First port (can be input or output) * @param toPort - Second port (can be input or output) * @param nodes - All nodes in the editor * @param connections - All existing connections * @param getNodeDefinition - Function to get node definition by type * @returns Connection data with normalized from/to, or null if invalid */ export declare function createValidatedConnection(fromPort: Port, toPort: Port, nodes: Record, connections: Record, getNodeDefinition: (type: string) => NodeDefinition | undefined): { fromNodeId: string; fromPortId: string; toNodeId: string; toPortId: string; } | null;