import { GraphNodes, IGraph } from '../Graphs/Graph.js'; import { Socket } from '../Sockets/Socket.js'; import { INode, NodeType } from './NodeInstance.js'; import { INodeDescription } from './Registry/NodeDescription.js'; export interface IStateService { storeEvent(event: any): void; getState(nodeId: string): any; setState(nodeId: string, newState: any): void; rehydrateState(nodes: GraphNodes, stateKey?: string): Promise; syncState(): Promise; syncAndClearState(): Promise; resetState(): Promise; } export type NodeConfiguration = { [key: string]: any; }; export type SetStateArgs = Record | ((prevState: Record) => Record); export declare abstract class Node implements INode { readonly inputs: Socket[]; readonly outputs: Socket[]; readonly description: INodeDescription; nodeType: TNodeType; readonly otherTypeNames: string[] | undefined; graph: IGraph; label?: string; metadata: any; _state: any; id: string; readonly configuration: NodeConfiguration; createStateProxy(): any; getState(): any; setState(value: SetStateArgs): void; constructor(node: Omit & { nodeType: TNodeType; }); readInput: (inputName: string) => T; writeOutput: (outputName: string, value: T) => void; }