UNPKG

n8n-nodes-alegra-unofficial

Version:

Unofficial Alegra node for n8n - Community integration with Alegra's accounting platform. NOT OFFICIALLY SUPPORTED BY ALEGRA.

71 lines 2.52 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AlegraApi = void 0; class AlegraApi { constructor() { this.name = 'alegraApi'; this.displayName = 'Alegra API'; this.documentationUrl = 'https://developer.alegra.com/docs'; // Add explicit nodeTypes that can use this credential this.nodeTypes = ['alegra', 'n8n-nodes-alegra-unofficial.alegra']; // Keep allowedScopes as well for backward compatibility this.allowedScopes = ['alegra', 'n8n-nodes-alegra-unofficial.alegra']; this.properties = [ { displayName: 'Email', name: 'email', type: 'string', placeholder: 'name@email.com', default: '', required: true, description: 'The email address for your Alegra account', }, { displayName: 'API Token', name: 'token', type: 'string', typeOptions: { password: true, }, default: '', required: true, description: 'The API token for your Alegra account. You can generate it in your Alegra settings under "API - Integrations with other systems"', }, { displayName: 'Environment', name: 'environment', type: 'options', options: [ { name: 'Production', value: 'https://api.alegra.com', }, { name: 'Sandbox', value: 'https://sandbox-api.alegra.com', }, ], default: 'https://api.alegra.com', description: 'The Alegra environment to connect to', }, ]; this.authenticate = { type: 'generic', properties: { auth: { username: '={{$credentials.email}}', password: '={{$credentials.token}}', }, }, }; this.test = { request: { baseURL: '={{$credentials.environment}}', url: '/api/v1/company', method: 'GET', }, }; } } exports.AlegraApi = AlegraApi; //# sourceMappingURL=AlegraApi.credentials.js.map