import { SourceChildNodes } from "./SourceChildNodes"; import { SourceConnection } from "./SourceConnection"; import { SourcePortAssignments } from "./SourcePortAssigments"; /** * Describes a node in the source, that has an internal structure of (child) * nodes and connections between them. */ export interface StructureNode { /** Uniquely identifies node. */ id: string; /** Identifies node to user & is unique relative to module. */ name: string; /** User-provided description of the node. */ description: string; /** Module the node belongs to. */ module: string; /** * Enumeration of input port names, or JavaScript expression that evaluates * to them. * TODO: Shouldn't allow code for port names. */ inputNames: Array; /** * Enumeration of output port names, or JavaScript expression that evaluates * to them. * TODO: Shouldn't allow code for port names. */ outputNames: Array; /** List of properties that make up the node's state. */ stateProperties: Array; /** List of child nodes and their properties. */ childNodes: SourceChildNodes; /** Connections between child nodes. */ childConnections: Array; /** Child node inputs to be used as own inputs. */ inputAssignments: SourcePortAssignments; /** Child node outputs to be used as own outputs. */ outputAssignments: SourcePortAssignments; /** TODO: Should be in graph representation only. */ errors?: { [code: string]: true }; }