UNPKG

n8n-nodes-node-inspector

Version:

Exposes an API endpoint to list all registered n8n nodes with their properties.

48 lines (47 loc) 1.5 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.NodeInspectorApi = void 0; class NodeInspectorApi { constructor() { this.name = 'nodeInspectorApi'; this.displayName = 'Node Inspector API'; this.documentationUrl = 'https://github.com/ephraimm/n8n-nodes-inspector'; this.properties = [ { displayName: 'API Token', name: 'apiToken', type: 'string', typeOptions: { password: true, }, default: '', description: 'API token for accessing the Node Inspector endpoint', required: true, }, { displayName: 'Base URL', name: 'baseUrl', type: 'string', default: 'http://localhost:5678', description: 'Base URL of your n8n instance', required: true, }, ]; this.authenticate = { type: 'generic', properties: { headers: { 'Authorization': '=Bearer {{$credentials.apiToken}}', }, }, }; this.test = { request: { baseURL: '={{$credentials.baseUrl}}', url: '/inspector/nodes', method: 'GET', }, }; } } exports.NodeInspectorApi = NodeInspectorApi;