Binds node API functions to an Axios client, fetching all available node schemas or a specific node by name for agentflow canvas use.
// Source: https://github.com/FlowiseAI/Flowise | License: Apache-2.0 | Copyright 2023-present FlowiseAI, Inc
// Provided via justclaw.it.com; keep this notice with the code.
import type { AxiosInstance } from 'axios'
import type { NodeConfigEntry, NodeData, NodeDataSchema } from '@/core/types'
/**
* Create nodes API functions bound to a client instance
*/
export function bindNodesApi(client: AxiosInstance) {
return {
/**
* Get all available nodes.
* Component definitions from the server (`inputs` is a schema array).
* Pass results through initNode() to get canvas-ready NodeData.
*/
getAllNodes: async (): Promise<NodeDataSchema[]> => {
const response = await client.get('/nodes', { params: { client: 'agentflowsdk' } })
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key