import type { Schemes } from '../schemes'; import { type GetSchemes, NodeEditor, type NodeId, type Root, Scope } from 'rete'; import { type Cancellable, Dataflow } from 'rete-engine'; import { Cache } from './utils/Cache'; export type PythonDataflowEngineScheme = GetSchemes; type Configure = (node: Schemes['Node']) => { inputs: () => string[]; outputs: () => string[]; }; /** * DataflowEngine is a plugin that integrates Dataflow with NodeEditor making it easy to use. * Additionally, it provides a cache for the data of each node in order to avoid recurring calculations. * @priority 10 * @listens nodecreated * @listens noderemoved * */ export declare class PythonDataflowEngine extends Scope ]> { private configure?; editor: NodeEditor; dataflow?: Dataflow; cache: Cache>>; constructor(configure?: Configure | undefined); setParent(scope: Scope>): void; private getDataflow; private add; private remove; /** * Resets the cache of the node and all its predecessors. * @param nodeId Node id to reset. If not specified, all nodes will be reset. */ reset(nodeId?: NodeId, alreadyResetNodes?: Set): void; /** * Fetches input data for the node by fetching data for all its predecessors recursively. * @param nodeId Node id to fetch input data for * @throws `Cancelled when `reset` is called while fetching data */ fetchInputs(nodeId: NodeId): Promise>; /** * Fetches output data of the node * @param nodeId Node id to fetch data from * @throws `Cancelled` when `reset` is called while fetching data */ fetch(nodeId: NodeId): Promise>; } export {};