n8n-nodes-evolution-api
Advanced tools
Comparing version 0.1.19 to 0.1.20
@@ -99,2 +99,37 @@ "use strict"; | ||
} | ||
if (resource === 'create-instance' && operation === 'instance-proxy') { | ||
const credentials = await this.getCredentials('httpbinApi'); | ||
const serverUrl = credentials['server-url']; | ||
const apiKey = credentials.apikey; | ||
const instanceName = this.getNodeParameter('instanceName', 0); | ||
const token = this.getNodeParameter('token', 0); | ||
const integration = this.getNodeParameter('integration', 0); | ||
const proxyHost = this.getNodeParameter('proxyHost', 0); | ||
const proxyPort = this.getNodeParameter('proxyPort', 0); | ||
const proxyProtocol = this.getNodeParameter('proxyProtocol', 0); | ||
const proxyUsername = this.getNodeParameter('proxyUsername', 0); | ||
const proxyPassword = this.getNodeParameter('proxyPassword', 0); | ||
const options = { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
apikey: apiKey, | ||
}, | ||
uri: `${serverUrl}/instance/create`, | ||
body: { | ||
instanceName, | ||
token, | ||
integration, | ||
proxy: { | ||
host: proxyHost, | ||
port: proxyPort, | ||
protocol: proxyProtocol, | ||
username: proxyUsername, | ||
password: proxyPassword, | ||
}, | ||
}, | ||
json: true, | ||
}; | ||
responseData = await this.helpers.request(options); | ||
} | ||
return [this.helpers.returnJsonArray(responseData)]; | ||
@@ -101,0 +136,0 @@ } |
@@ -44,3 +44,19 @@ "use strict"; | ||
method: 'POST', | ||
url: '/instance/create', | ||
url: '={{$credentials["server-url"].startsWith("https://") ? $credentials["server-url"] : "https://" + $credentials["server-url"]}}/instance/create', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
apikey: '={{$credentials.apikey}}', | ||
}, | ||
body: { | ||
instanceName: '={{$node["Nome da Instância"].instanceName}}', | ||
token: '={{$node["Token"].token}}', | ||
integration: 'WHATSAPP-BAILEYS', | ||
proxy: { | ||
host: '={{$node["Proxy Host"].proxyHost}}', | ||
port: '={{$node["Proxy Port"].proxyPort}}', | ||
protocol: '={{$node["Proxy Protocol"].proxyProtocol}}', | ||
username: '={{$node["Proxy Username"].proxyUsername}}', | ||
password: '={{$node["Proxy Password"].proxyPassword}}', | ||
}, | ||
}, | ||
}, | ||
@@ -136,3 +152,3 @@ }, | ||
required: true, | ||
description: 'Digite o nome da instância', | ||
description: 'Digite o nome para a instância', | ||
displayOptions: { | ||
@@ -151,4 +167,3 @@ show: { | ||
default: '', | ||
required: true, | ||
description: 'Digite o token', | ||
description: 'Opicional: Digite um Token para a instancia', | ||
displayOptions: { | ||
@@ -204,3 +219,2 @@ show: { | ||
default: '', | ||
required: true, | ||
description: 'Digite o token', | ||
@@ -293,2 +307,3 @@ displayOptions: { | ||
default: '', | ||
required: true, | ||
description: 'Digite o nome de usuário do proxy', | ||
@@ -306,6 +321,5 @@ displayOptions: { | ||
type: 'string', | ||
typeOptions: { password: true }, | ||
default: '', | ||
typeOptions: { | ||
password: true, | ||
}, | ||
required: true, | ||
description: 'Digite a senha do proxy', | ||
@@ -312,0 +326,0 @@ displayOptions: { |
{ | ||
"name": "n8n-nodes-evolution-api", | ||
"version": "0.1.19", | ||
"version": "0.1.20", | ||
"description": "Api não oficial do WhatsApp", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
{ | ||
"name": "n8n-nodes-evolution-api", | ||
"version": "0.1.19", | ||
"version": "0.1.20", | ||
"description": "Api não oficial do WhatsApp", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
64226
656