Frodo Library - v5.0.0-36
    Preparing search index...

    Type Alias Node

    type Node = {
        createNode(
            nodeType: string,
            nodeData: NodeSkeleton,
        ): Promise<NodeSkeleton>;
        deleteCustomNode(
            nodeId?: string,
            nodeName?: string,
        ): Promise<CustomNodeSkeleton>;
        deleteCustomNodes(
            resultCallback?: ResultCallback<CustomNodeSkeleton>,
        ): Promise<CustomNodeSkeleton[]>;
        deleteNode(nodeId: string, nodeType: string): Promise<NodeSkeleton>;
        exportCustomNode(
            nodeId?: string,
            nodeName?: string,
            options?: CustomNodeExportOptions,
        ): Promise<CustomNodeExportInterface>;
        exportCustomNodes(
            options?: CustomNodeExportOptions,
        ): Promise<CustomNodeExportInterface>;
        exportNodes(): Promise<NodeExportInterface>;
        findOrphanedNodes(): Promise<NodeSkeleton[]>;
        getCustomNodeUsage(nodeId: string): Promise<CustomNodeUsage>;
        importCustomNodes(
            nodeId: string,
            nodeName: string,
            importData: CustomNodeExportInterface,
            options?: CustomNodeImportOptions,
            resultCallback?: ResultCallback<CustomNodeSkeleton>,
        ): Promise<CustomNodeSkeleton[]>;
        readCustomNode(
            nodeId?: string,
            nodeName?: string,
        ): Promise<CustomNodeSkeleton>;
        readCustomNodes(): Promise<CustomNodeSkeleton[]>;
        readCustomNodeSchema(
            serviceName: string,
            refreshCache?: boolean,
        ): Promise<NodeSkeleton>;
        readNode(
            nodeId: string,
            nodeType: string,
            nodeTypeVersion?: string,
        ): Promise<NodeSkeleton>;
        readNodes(): Promise<NodeSkeleton[]>;
        readNodesByType(
            nodeType: string,
            nodeTypeVersion?: string,
        ): Promise<NodeSkeleton[]>;
        readNodesByVersion(
            nodeVersionFilter?: NodeVersionFilter,
        ): Promise<NodeSkeleton[]>;
        readNodeSchema(
            nodeType: string,
            nodeTypeVersion?: string,
            refreshCache?: boolean,
        ): Promise<NodeSkeleton>;
        readNodeType(nodeType: string, nodeTypeVersion?: string): Promise<any>;
        readNodeTypes(): Promise<any>;
        removeOrphanedNodes(
            orphanedNodes: NodeSkeleton[],
            resultCallback?: ResultCallback<NodeSkeleton>,
        ): Promise<NodeSkeleton[]>;
        updateCustomNode(
            nodeId: string,
            nodeData: CustomNodeSkeleton,
        ): Promise<CustomNodeSkeleton>;
        updateNode(
            nodeId: string,
            nodeType: string,
            nodeData: NodeSkeleton,
        ): Promise<NodeSkeleton>;
    }
    Index
    • Delete custom node. Either ID or name must be provided.

      Parameters

      • OptionalnodeId: string

        ID or service name of custom node. Takes priority over node display name if both are provided.

      • OptionalnodeName: string

        Display name of custom node.

      Returns Promise<CustomNodeSkeleton>

      promise that resolves to a custom node object

    • Delete node by uuid and type

      Parameters

      • nodeId: string

        node uuid

      • nodeType: string

        node type

      Returns Promise<NodeSkeleton>

      a promise that resolves to an object containing a node object

    • Export custom node. Either ID or name must be provided.

      Parameters

      • OptionalnodeId: string

        ID or service name of custom node. Takes priority over node display name if both are provided.

      • OptionalnodeName: string

        Display name of custom node.

      • Optionaloptions: CustomNodeExportOptions

        Custom node export options

      Returns Promise<CustomNodeExportInterface>

      a promise that resolves to a custom node export object

    • Find all node configuration objects that are no longer referenced by any tree

      Returns Promise<NodeSkeleton[]>

      a promise that resolves to an array of orphaned nodes

    • Get custom node usage by ID

      Parameters

      • nodeId: string

        ID or service name of the custom node

      Returns Promise<CustomNodeUsage>

      a promise that resolves to an object containing a custom node usage object

    • Read custom node. Either ID or name must be provided.

      Parameters

      • OptionalnodeId: string

        ID or service name of custom node. Takes priority over node display name if both are provided.

      • OptionalnodeName: string

        Display name of custom node.

      Returns Promise<CustomNodeSkeleton>

      a promise that resolves to a custom node object

    • Read a custom node's configurable-property schema.

      Parameters

      • serviceName: string

        custom node service name (not the '_id' and without the 'designer-' prefix)

      • OptionalrefreshCache: boolean

        whether to refresh the schema cache for the specified custom node

      Returns Promise<NodeSkeleton>

      a promise that resolves to a node schema object

    • Read node by uuid and type

      Parameters

      • nodeId: string

        node uuid

      • nodeType: string

        node type

      • OptionalnodeTypeVersion: string

        node type version

      Returns Promise<NodeSkeleton>

      a promise that resolves to a node object

    • Read all nodes by type

      Parameters

      • nodeType: string

        node type

      • OptionalnodeTypeVersion: string

        node type version

      Returns Promise<NodeSkeleton[]>

      a promise that resolves to an object containing an array of node objects of the requested type

    • Read a node type's configurable-property schema (the schema an agent or UI needs to construct valid node config before creating/updating a node instance).

      Parameters

      • nodeType: string

        node type

      • OptionalnodeTypeVersion: string

        node type version

      • OptionalrefreshCache: boolean

        whether to refresh the schema cache for the specified node type/version

      Returns Promise<NodeSkeleton>

      a promise that resolves to a node schema object

    • Read a specific node type

      Parameters

      • nodeType: string

        node type

      • OptionalnodeTypeVersion: string

        node type version

      Returns Promise<any>

      a promise that resolves to a node type object

    • Read all node types

      Returns Promise<any>

      a promise that resolves to an array of node type objects

    • Remove orphaned nodes. Every orphaned node is tried: a node that cannot be deleted does not stop the others.

      Parameters

      • orphanedNodes: NodeSkeleton[]

        Pass in an array of orphaned node configuration objects to remove

      • OptionalresultCallback: ResultCallback<NodeSkeleton>

        Optional callback to process individual results. When given, the outcome of every node is passed to it as it happens (a failed node as an error that names it and carries the cause) and the error of a failed node is not printed. Without it, the error of a failed node is printed and nothing is passed on.

      Returns Promise<NodeSkeleton[]>

      a promise that resolves to an array nodes that encountered errors deleting

    • Update or create node by uuid and type

      Parameters

      • nodeId: string

        node uuid

      • nodeType: string

        node type

      • nodeData: NodeSkeleton

        node object

      Returns Promise<NodeSkeleton>

      a promise that resolves to an object containing a node object