n8n-nodes-evolution-api
Advanced tools
Comparing version 0.1.80 to 0.1.81
@@ -61,6 +61,2 @@ "use strict"; | ||
const operation = this.getNodeParameter('operation', 0); | ||
if (resource === 'instances-api' && operation === 'delete-instance') { | ||
const instanceOptions = await HttpVerbDescription_1.getInstances.call(this); | ||
this.getNodeParameter('instanceName', 0, instanceOptions); | ||
} | ||
let responseData; | ||
@@ -449,2 +445,41 @@ if (resource === 'instances-api' && operation === 'instance-basic') { | ||
} | ||
if (resource === 'instances-api' && operation === 'fetchDynamicList') { | ||
const credentials = await this.getCredentials('httpbinApi'); | ||
const serverUrl = credentials['server-url']; | ||
const apiKey = credentials.apikey; | ||
const options = { | ||
method: 'GET', | ||
headers: { | ||
apikey: apiKey, | ||
}, | ||
uri: `${serverUrl}/dynamic/list`, | ||
json: true, | ||
}; | ||
try { | ||
const response = await this.helpers.request(options); | ||
const processedData = response.map((item) => ({ | ||
id: item.id, | ||
name: item.name, | ||
connectionStatus: item.connectionStatus, | ||
ownerJid: item.ownerJid, | ||
profileName: item.profileName, | ||
profilePicUrl: item.profilePicUrl, | ||
integration: item.integration, | ||
token: item.token, | ||
createdAt: item.createdAt, | ||
updatedAt: item.updatedAt, | ||
setting: { | ||
rejectCall: item.Setting.rejectCall, | ||
msgCall: item.Setting.msgCall, | ||
alwaysOnline: item.Setting.alwaysOnline, | ||
readMessages: item.Setting.readMessages, | ||
syncFullHistory: item.Setting.syncFullHistory, | ||
}, | ||
})); | ||
responseData = processedData; | ||
} | ||
catch (error) { | ||
throw new n8n_workflow_1.NodeApiError(this.getNode(), error); | ||
} | ||
} | ||
return [this.helpers.returnJsonArray(responseData)]; | ||
@@ -451,0 +486,0 @@ } |
@@ -494,3 +494,3 @@ "use strict"; | ||
{ | ||
displayName: 'Nome Da Instância', | ||
displayName: 'Nome Da Instância Name or ID', | ||
name: 'instanceName', | ||
@@ -500,3 +500,3 @@ type: 'options', | ||
required: true, | ||
description: 'Selecione a instância que deseja deletar', | ||
description: 'Selecione a instância que deseja deletar. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.', | ||
displayOptions: { | ||
@@ -509,2 +509,5 @@ show: { | ||
options: [], | ||
typeOptions: { | ||
loadOptionsMethod: 'getInstances', | ||
}, | ||
}, | ||
@@ -511,0 +514,0 @@ ]; |
{ | ||
"name": "n8n-nodes-evolution-api", | ||
"version": "0.1.80", | ||
"version": "0.1.81", | ||
"description": "Api não oficial do WhatsApp", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
{ | ||
"name": "n8n-nodes-evolution-api", | ||
"version": "0.1.80", | ||
"version": "0.1.81", | ||
"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
119482
1678