n8n-nodes-evolution-api
Advanced tools
Comparing version 0.1.44 to 0.1.45
@@ -134,2 +134,34 @@ "use strict"; | ||
} | ||
if (resource === 'instances-api' && operation === 'instanceSettings') { | ||
const credentials = await this.getCredentials('httpbinApi'); | ||
const serverUrl = credentials['server-url']; | ||
const apiKey = credentials.apikey; | ||
const instanceName = this.getNodeParameter('instanceName', 0); | ||
const rejectCall = this.getNodeParameter('rejectCall', 0); | ||
const msgCall = this.getNodeParameter('msgCall', 0); | ||
const groupsIgnore = this.getNodeParameter('groupsIgnore', 0); | ||
const alwaysOnline = this.getNodeParameter('alwaysOnline', 0); | ||
const readMessages = this.getNodeParameter('readMessages', 0); | ||
const syncFullHistory = this.getNodeParameter('syncFullHistory', 0); | ||
const readStatus = this.getNodeParameter('readStatus', 0); | ||
const options = { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
apikey: apiKey, | ||
}, | ||
uri: `${serverUrl}/settings/set/${instanceName}`, | ||
body: { | ||
rejectCall: rejectCall, | ||
msgCall: msgCall, | ||
groupsIgnore: groupsIgnore, | ||
alwaysOnline: alwaysOnline, | ||
readMessages: readMessages, | ||
syncFullHistory: syncFullHistory, | ||
readStatus: readStatus, | ||
}, | ||
json: true, | ||
}; | ||
responseData = await this.helpers.request(options); | ||
} | ||
if (resource === 'messages-api' && operation === 'sendText') { | ||
@@ -244,3 +276,2 @@ const credentials = await this.getCredentials('httpbinApi'); | ||
const media = this.getNodeParameter('media', 0); | ||
const mimetype = this.getNodeParameter('mimetype', 0); | ||
const caption = this.getNodeParameter('caption', 0); | ||
@@ -259,3 +290,2 @@ const fileName = this.getNodeParameter('fileName', 0); | ||
media: media, | ||
mimetype: mimetype, | ||
caption: caption, | ||
@@ -262,0 +292,0 @@ fileName: fileName, |
@@ -80,2 +80,27 @@ "use strict"; | ||
}, | ||
{ | ||
name: 'Definir Configurações', | ||
value: 'instanceSettings', | ||
description: 'Define o comportamento da instancia', | ||
action: 'Buscar instancias', | ||
routing: { | ||
request: { | ||
method: 'POST', | ||
url: '={{$credentials["server-url"].startsWith("https://") ? $credentials["server-url"] : "https://" + $credentials["server-url"]}}/settings/set{{$parameter.instanceName ? "?instanceName=" + $parameter.instanceName : ""}}', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
apikey: '={{$credentials.apikey}}', | ||
}, | ||
body: { | ||
rejectCall: '={{$node["Reject Call"].rejectCall}}', | ||
msgCall: '={{$node["Message Call"].msgCall}}', | ||
groupsIgnore: '={{$node["Groups Ignore"].groupsIgnore}}', | ||
alwaysOnline: '={{$node["Always Online"].alwaysOnline}}', | ||
readMessages: '={{$node["Read Messages"].readMessages}}', | ||
syncFullHistory: '={{$node["Sync Full History"].syncFullHistory}}', | ||
readStatus: '={{$node["Read Status"].readStatus}}', | ||
}, | ||
}, | ||
}, | ||
}, | ||
], | ||
@@ -739,7 +764,7 @@ default: 'instance-basic', | ||
{ | ||
displayName: 'Mimetype', | ||
name: 'mimetype', | ||
displayName: 'Nome Do Arquivo', | ||
name: 'fileName', | ||
type: 'string', | ||
default: 'document/pdf', | ||
description: 'Tipo MIME do vídeo', | ||
default: '', | ||
description: 'Nome do arquivo do vídeo', | ||
displayOptions: { | ||
@@ -753,14 +778,155 @@ show: { | ||
{ | ||
displayName: 'Nome Do Arquivo', | ||
name: 'fileName', | ||
displayName: 'Rejeitar Chamadas', | ||
name: 'rejectCall', | ||
type: 'options', | ||
options: [ | ||
{ | ||
name: 'Sim', | ||
value: true, | ||
}, | ||
{ | ||
name: 'Não', | ||
value: false, | ||
}, | ||
], | ||
default: true, | ||
description: 'Defina se as chamadas devem ser rejeitadas', | ||
displayOptions: { | ||
show: { | ||
resource: ['instances-api'], | ||
operation: ['instanceSettings'], | ||
}, | ||
}, | ||
}, | ||
{ | ||
displayName: 'Mensagem De Chamadas', | ||
name: 'msgCall', | ||
type: 'string', | ||
default: 'Arquivo.pdf', | ||
description: 'Nome do arquivo do vídeo', | ||
default: '', | ||
description: 'Mensagem a ser enviada se as chamadas forem rejeitadas', | ||
displayOptions: { | ||
show: { | ||
resource: ['messages-api'], | ||
operation: ['sendDocumento'], | ||
resource: ['instances-api'], | ||
operation: ['instanceSettings'], | ||
'rejectCall': [ | ||
true, | ||
], | ||
}, | ||
}, | ||
}, | ||
{ | ||
displayName: 'Ignorar Grupos', | ||
name: 'groupsIgnore', | ||
type: 'options', | ||
options: [ | ||
{ | ||
name: 'Sim', | ||
value: true, | ||
}, | ||
{ | ||
name: 'Não', | ||
value: false, | ||
}, | ||
], | ||
default: false, | ||
description: 'Defina se os grupos devem ser ignorados', | ||
displayOptions: { | ||
show: { | ||
resource: ['instances-api'], | ||
operation: ['instanceSettings'], | ||
}, | ||
}, | ||
}, | ||
{ | ||
displayName: 'Sempre Online', | ||
name: 'alwaysOnline', | ||
type: 'options', | ||
options: [ | ||
{ | ||
name: 'Sim', | ||
value: true, | ||
}, | ||
{ | ||
name: 'Não', | ||
value: false, | ||
}, | ||
], | ||
default: true, | ||
description: 'Defina se a instância deve estar sempre online', | ||
displayOptions: { | ||
show: { | ||
resource: ['instances-api'], | ||
operation: ['instanceSettings'], | ||
}, | ||
}, | ||
}, | ||
{ | ||
displayName: 'Ler Mensagens', | ||
name: 'readMessages', | ||
type: 'options', | ||
options: [ | ||
{ | ||
name: 'Sim', | ||
value: true, | ||
}, | ||
{ | ||
name: 'Não', | ||
value: false, | ||
}, | ||
], | ||
default: false, | ||
description: 'Defina se as mensagens devem ser lidas', | ||
displayOptions: { | ||
show: { | ||
resource: ['instances-api'], | ||
operation: ['instanceSettings'], | ||
}, | ||
}, | ||
}, | ||
{ | ||
displayName: 'Sincronizar Histórico Completo', | ||
name: 'syncFullHistory', | ||
type: 'options', | ||
options: [ | ||
{ | ||
name: 'Sim', | ||
value: true, | ||
}, | ||
{ | ||
name: 'Não', | ||
value: false, | ||
}, | ||
], | ||
default: false, | ||
description: 'Defina se o histórico completo deve ser sincronizado', | ||
displayOptions: { | ||
show: { | ||
resource: ['instances-api'], | ||
operation: ['instanceSettings'], | ||
}, | ||
}, | ||
}, | ||
{ | ||
displayName: 'Ler Status', | ||
name: 'readStatus', | ||
type: 'options', | ||
options: [ | ||
{ | ||
name: 'Sim', | ||
value: true, | ||
}, | ||
{ | ||
name: 'Não', | ||
value: false, | ||
}, | ||
], | ||
default: false, | ||
description: 'Defina se os status devem ser lidos', | ||
displayOptions: { | ||
show: { | ||
resource: ['instances-api'], | ||
operation: ['instanceSettings'], | ||
}, | ||
}, | ||
}, | ||
]; | ||
@@ -767,0 +933,0 @@ const deleteOperation = [ |
{ | ||
"name": "n8n-nodes-evolution-api", | ||
"version": "0.1.44", | ||
"version": "0.1.45", | ||
"description": "Api não oficial do WhatsApp", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
{ | ||
"name": "n8n-nodes-evolution-api", | ||
"version": "0.1.44", | ||
"version": "0.1.45", | ||
"description": "Api não oficial do WhatsApp", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -7,3 +7,3 @@ **[ Features do Node ]** | ||
✅ Busca por instancias (com e sem filtro); (by Orion)<br> | ||
❌ Configurações da instancia;<br> | ||
✅ Configurações da instancia; (by Orion)<br> | ||
❌ Conexão de instância;<br> | ||
@@ -10,0 +10,0 @@ ❌ Reiniciar instancia;<br> |
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
103192
1406