UNPKG

n8n-nodes-tess-ai-by-pareto

Version:

n8n community node for interacting with the Tess API by Pareto

51 lines (50 loc) 1.52 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TessApi = void 0; class TessApi { constructor() { this.description = { displayName: 'Tess API', name: 'tessApi', group: ['transform'], version: 1, description: 'Consume Tess API', defaults: { name: 'Tess API', }, inputs: ['main'], outputs: ['main'], credentials: [ { name: 'tessApi', required: true, }, ], properties: [ { displayName: 'Resource', name: 'resource', type: 'string', default: 'agents', }, { displayName: 'Operation', name: 'operation', type: 'string', default: 'list', } ], }; } async execute() { const items = this.getInputData(); const returnData = []; for (let i = 0; i < items.length; i++) { const resource = this.getNodeParameter('resource', i); const operation = this.getNodeParameter('operation', i); returnData.push({ json: { resource, operation, status: 'Executed (Mock)' } }); } return [returnData]; } } exports.TessApi = TessApi;