UNPKG

n8n-nodes-megaapi

Version:

N8N Community Node for MegaAPI WhatsApp automation - Complete WhatsApp integration with messaging, groups, media, and more

66 lines 2.26 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MegaApiCredentials = exports.MegaApiCredentialsApi = void 0; class MegaApiCredentialsApi { constructor() { this.name = 'megaApiCredentialsApi'; this.displayName = 'megaAPI Credentials API'; this.documentationUrl = 'https://doc.mega-api.app.br/'; this.properties = [ { displayName: 'Host', name: 'host', type: 'string', default: '', placeholder: 'host', description: 'Host da API MegaAPI (disponível no seu painel)', required: true, }, { displayName: 'Instance Key', name: 'instanceKey', type: 'string', typeOptions: { password: true, }, default: '', placeholder: 'instance key', description: 'Chave da instância (disponível no seu painel)', required: true, }, { displayName: 'Token', name: 'token', type: 'string', typeOptions: { password: true, }, default: '', placeholder: 'token', description: 'Token de autenticação (disponível no seu painel)', required: true, }, ]; this.authenticate = { type: 'generic', properties: { headers: { Authorization: '=Bearer {{$credentials.token}}', }, }, }; this.test = { request: { baseURL: '={{$credentials.host}}', url: '=/rest/instance/{{$credentials.instanceKey}}', method: 'GET', headers: { Authorization: '=Bearer {{$credentials.token}}', }, }, }; } } exports.MegaApiCredentialsApi = MegaApiCredentialsApi; exports.MegaApiCredentials = MegaApiCredentialsApi; //# sourceMappingURL=MegaApiCredentialsApi.credentials.js.map