Skip to content

components/flow/FlowRegistry#

FlowRegistry#

Methods#

buildPipeline()#

buildPipeline(
   nodeSetName, 
   nodes, 
   edges): any;
Parameters#
Parameter Type
nodeSetName string
nodes any[]
edges any[]
Returns#

any

createNodeRegistry()#

createNodeRegistry(nodeSetName): Record<string, React.FC<any>>;
Parameters#
Parameter Type
nodeSetName string
Returns#

Record<string, React.FC<any>>

getAllNodeSets()#

getAllNodeSets(): FlowNodeSet<string, NodeTypeToAttrs<string>>[];
Returns#

FlowNodeSet<string, NodeTypeToAttrs<string>>[]

getCategoryColors()#

getCategoryColors(nodeSetName): Record<string, string>;
Parameters#
Parameter Type
nodeSetName string
Returns#

Record<string, string>

getCategoryIcons()#

getCategoryIcons(nodeSetName): Record<string, SvgIconComponent>;
Parameters#
Parameter Type
nodeSetName string
Returns#

Record<string, SvgIconComponent>

getCategoryMapping()#

getCategoryMapping(nodeSetName): {
  categories: Record<string, string[]>;
  inverted: Record<string, string>;
};
Parameters#
Parameter Type
nodeSetName string
Returns#
{
  categories: Record<string, string[]>;
  inverted: Record<string, string>;
}
categories#
categories: Record<string, string[]>;
inverted#
inverted: Record<string, string>;

getConfiguration()#

getConfiguration(): FlowConfiguration | null;
Returns#

FlowConfiguration | null

getDTypeColorMap()#

getDTypeColorMap(nodeSetName): Record<string, {
  bg: string;
  handle: string;
  text: string;
}>;
Parameters#
Parameter Type
nodeSetName string
Returns#

Record<string, { bg: string; handle: string; text: string; }>

getInstance()#

static getInstance(): FlowRegistry;
Returns#

FlowRegistry

getNodeDefinition()#

getNodeDefinition(nodeSetName, nodeType): 
  | FlowNodeDefinition<string, Record<string, any>>
  | undefined;
Parameters#
Parameter Type
nodeSetName string
nodeType string
Returns#

| FlowNodeDefinition<string, Record<string, any>> | undefined

getNodeLabels()#

getNodeLabels(nodeSetName): Record<string, (t) => string>;
Parameters#
Parameter Type
nodeSetName string
Returns#

Record<string, (t) => string>

getNodeSet()#

getNodeSet(name): 
  | FlowNodeSet<string, NodeTypeToAttrs<string>>
  | undefined;
Parameters#
Parameter Type
name string
Returns#

| FlowNodeSet<string, NodeTypeToAttrs<string>> | undefined

getNodeSignatures()#

getNodeSignatures(nodeSetName): Record<string, any>;
Parameters#
Parameter Type
nodeSetName string
Returns#

Record<string, any>

getVersion()#

getVersion(): number;
Returns#

number

registerNodes()#

registerNodes(
   nodeSetName, 
   nodes, 
   category?, 
   categoryColor?, 
   categoryIcon?, 
   pluginId?): void;

Register additional nodes to an existing node set Useful for plugins that want to extend built-in node sets

Parameters#
Parameter Type
nodeSetName string
nodes Record<string, FlowNodeDefinition>
category? string
categoryColor? string
categoryIcon? any
pluginId? string
Returns#

void

registerNodeSet()#

registerNodeSet(nodeSet): void;
Parameters#
Parameter Type
nodeSet FlowNodeSet<string>
Returns#

void

serializeSchema()#

serializeSchema(): Record<string, unknown>;

Serialize every registered node set to a plain JSON object describing each node's editable attributes (name, default, allowed options, dtype). Used to feed the Neutron AI the real, complete node schema. i18n label functions are intentionally omitted (not serializable / not needed by the AI).

Returns#

Record<string, unknown>

setConfiguration()#

setConfiguration(config): void;
Parameters#
Parameter Type
config FlowConfiguration
Returns#

void

subscribe()#

subscribe(listener): () => void;

Subscribe to registry changes (node registration, etc.)

Parameters#
Parameter Type Description
listener () => void Callback to invoke when registry changes
Returns#

Unsubscribe function

() => void

unregisterNodesByPlugin()#

unregisterNodesByPlugin(pluginId): void;

Unregister all nodes from a specific plugin Called when a plugin is uninstalled or reloaded

Parameters#
Parameter Type
pluginId string
Returns#

void

unsubscribe()#

unsubscribe(listener): void;

Unsubscribe from registry changes

Parameters#
Parameter Type
listener () => void
Returns#

void

validateConnection()#

validateConnection(
   nodeSetName, 
   nodes, 
   edges, 
   _connection): boolean;
Parameters#
Parameter Type
nodeSetName string
nodes any[]
edges any[]
_connection any
Returns#

boolean