n8n-nodes-wa-webjs
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -1,270 +0,337 @@ | ||
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.WaWebJS = void 0; | ||
class WaWebJS { | ||
constructor() { | ||
this.description = { | ||
properties: [ | ||
{ | ||
displayName: 'Resource', | ||
name: 'resource', | ||
type: 'options', | ||
noDataExpression: true, | ||
options: [ | ||
{ | ||
name: 'Chatting', | ||
value: 'chatting', | ||
}, | ||
{ | ||
name: 'Session', | ||
value: 'session', | ||
}, | ||
{ | ||
name: 'Auth', | ||
value: 'auth', | ||
}, | ||
], | ||
default: 'chatting', | ||
}, | ||
{ | ||
displayName: 'Operation', | ||
name: 'operation', | ||
type: 'options', | ||
noDataExpression: true, | ||
displayOptions: { | ||
show: { | ||
resource: ['chatting'], | ||
}, | ||
}, | ||
options: [ | ||
{ | ||
name: 'SendText', | ||
value: 'sendText', | ||
action: 'Send text', | ||
description: 'Send Text Message', | ||
}, | ||
], | ||
default: 'sendText', | ||
}, | ||
{ | ||
displayName: 'Operation', | ||
name: 'operation', | ||
type: 'options', | ||
noDataExpression: true, | ||
displayOptions: { | ||
show: { | ||
resource: ['session'], | ||
}, | ||
}, | ||
options: [ | ||
{ | ||
name: 'Me', | ||
value: 'me', | ||
action: 'Me', | ||
}, | ||
{ | ||
name: 'Sessions', | ||
value: 'sessions', | ||
action: 'Sessions', | ||
}, | ||
{ | ||
name: 'Start', | ||
value: 'start', | ||
action: 'Start', | ||
}, | ||
{ | ||
name: 'Stop', | ||
value: 'stop', | ||
action: 'Stop', | ||
}, | ||
], | ||
default: 'start', | ||
}, | ||
{ | ||
displayName: 'Chat ID', | ||
name: 'chatId', | ||
type: 'string', | ||
required: true, | ||
displayOptions: { | ||
show: { | ||
operation: ['sendText'], | ||
resource: ['chatting'], | ||
}, | ||
}, | ||
default: '', | ||
placeholder: 'xxxxxxx@c.us', | ||
}, | ||
{ | ||
displayName: 'Text', | ||
name: 'text', | ||
type: 'string', | ||
required: true, | ||
displayOptions: { | ||
show: { | ||
operation: ['sendText'], | ||
resource: ['chatting'], | ||
}, | ||
}, | ||
default: '', | ||
placeholder: '', | ||
description: 'Text to send', | ||
}, | ||
{ | ||
displayName: 'Operation', | ||
name: 'operation', | ||
type: 'options', | ||
noDataExpression: true, | ||
displayOptions: { | ||
show: { | ||
resource: ['auth'], | ||
}, | ||
}, | ||
options: [ | ||
{ | ||
name: 'QR', | ||
value: 'qr', | ||
action: 'QR', | ||
}, | ||
], | ||
default: 'qr', | ||
}, | ||
{ | ||
displayName: 'Webhook URL', | ||
name: 'webhookUrl', | ||
type: 'string', | ||
required: true, | ||
displayOptions: { | ||
show: { | ||
operation: ['start'], | ||
resource: ['session'], | ||
}, | ||
}, | ||
default: '', | ||
placeholder: 'https://n8n.gms.church/xxxxxxxxx', | ||
}, | ||
], | ||
version: 1, | ||
defaults: { | ||
name: 'WaWebJS', | ||
}, | ||
inputs: ['main'], | ||
outputs: ['main'], | ||
displayName: 'Whatsapp WebJS', | ||
name: 'WaWebJS', | ||
icon: 'file:wa.svg', | ||
group: ['whatsapp'], | ||
description: 'Connect with Whatsapp WebJS API', | ||
credentials: [ | ||
{ | ||
name: 'waWebJSApi', | ||
required: true, | ||
}, | ||
], | ||
requestDefaults: { | ||
headers: { | ||
Accept: 'application/json', | ||
'Content-Type': 'application/json', | ||
}, | ||
baseURL: '={{$credentials.url}}', | ||
}, | ||
}; | ||
} | ||
async execute() { | ||
const cred = await this.getCredentials('waWebJSApi'); | ||
const session = cred.session; | ||
const items = this.getInputData(); | ||
const returnData = []; | ||
const resource = this.getNodeParameter('resource', 0); | ||
const operation = this.getNodeParameter('operation', 0); | ||
var options = { | ||
uri: `${cred.url}`, | ||
json: true, | ||
}; | ||
for (let i = 0; i < items.length; i++) { | ||
if (resource === 'chatting') { | ||
if (operation === 'sendText') { | ||
const chatId = this.getNodeParameter('chatId', i); | ||
const text = this.getNodeParameter('text', i); | ||
const session = 'default'; | ||
options.method = 'POST'; | ||
options.uri += `/${session}/messages/send-text`; | ||
options.body = { | ||
chatId: chatId, | ||
text: text, | ||
}; | ||
const responseData = await this.helpers.requestWithAuthentication.call( | ||
this, | ||
'waWebJSApi', | ||
options, | ||
); | ||
returnData.push({ | ||
json: responseData, | ||
}); | ||
} | ||
} else if (resource === 'session') { | ||
if (operation === 'start') { | ||
const url = this.getNodeParameter('webhookUrl', i); | ||
options.method = 'POST'; | ||
options.uri += `/sessions/${session}/start`; | ||
options.body = { | ||
webhookUrl: url, | ||
}; | ||
const responseData = await this.helpers.requestWithAuthentication.call( | ||
this, | ||
'waWebJSApi', | ||
options, | ||
); | ||
returnData.push({ | ||
json: responseData, | ||
}); | ||
} else if (operation === 'stop') { | ||
options.method = 'POST'; | ||
options.uri += `/sessions/${session}/stop`; | ||
const responseData = await this.helpers.requestWithAuthentication.call( | ||
this, | ||
'waWebJSApi', | ||
options, | ||
); | ||
returnData.push({ | ||
json: responseData, | ||
}); | ||
} else if (operation === 'me') { | ||
options.method = 'GET'; | ||
options.uri += `/sessions/${session}/me`; | ||
const responseData = await this.helpers.requestWithAuthentication.call( | ||
this, | ||
'waWebJSApi', | ||
options, | ||
); | ||
returnData.push({ | ||
json: responseData, | ||
}); | ||
} | ||
} else if (resource === 'auth') { | ||
if (operation === 'qr') { | ||
options.method = 'GET'; | ||
options.uri += `/sessions/${cred.session}/auth/qr`; | ||
const responseData = await this.helpers.requestWithAuthentication.call( | ||
this, | ||
'waWebJSApi', | ||
options, | ||
); | ||
let fileName = 'qrcode.png'; | ||
const mimeType = 'image/png'; | ||
const binaryPropertyName = 'qrcode'; | ||
const data = responseData; | ||
const binary = { | ||
[binaryPropertyName]: { data, fileName, mimeType }, | ||
}; | ||
returnData.push({ | ||
json: responseData, | ||
binary, | ||
}); | ||
} | ||
} | ||
} | ||
return this.prepareOutputData(returnData); | ||
} | ||
constructor() { | ||
this.description = { | ||
properties: [ | ||
{ | ||
displayName: 'Resource', | ||
name: 'resource', | ||
type: 'options', | ||
noDataExpression: true, | ||
options: [ | ||
{ | ||
name: 'Chatting', | ||
value: 'chatting', | ||
}, | ||
{ | ||
name: 'Session', | ||
value: 'session', | ||
}, | ||
{ | ||
name: 'Auth', | ||
value: 'auth', | ||
}, | ||
], | ||
default: 'chatting', | ||
}, | ||
{ | ||
displayName: 'Operation', | ||
name: 'operation', | ||
type: 'options', | ||
noDataExpression: true, | ||
displayOptions: { | ||
show: { | ||
resource: ['chatting'], | ||
}, | ||
}, | ||
options: [ | ||
{ | ||
name: 'SendText', | ||
value: 'sendText', | ||
action: 'Send text', | ||
description: 'Send Text Message', | ||
}, | ||
{ | ||
name: 'SendPoll', | ||
value: 'sendPoll', | ||
action: 'Send poll', | ||
}, | ||
], | ||
default: 'sendText', | ||
}, | ||
{ | ||
displayName: 'Operation', | ||
name: 'operation', | ||
type: 'options', | ||
noDataExpression: true, | ||
displayOptions: { | ||
show: { | ||
resource: ['session'], | ||
}, | ||
}, | ||
options: [ | ||
{ | ||
name: 'Me', | ||
value: 'me', | ||
action: 'Me', | ||
}, | ||
{ | ||
name: 'Sessions', | ||
value: 'sessions', | ||
action: 'Sessions', | ||
}, | ||
{ | ||
name: 'Start', | ||
value: 'start', | ||
action: 'Start', | ||
}, | ||
{ | ||
name: 'Stop', | ||
value: 'stop', | ||
action: 'Stop', | ||
}, | ||
], | ||
default: 'start', | ||
}, | ||
{ | ||
displayName: 'Chat ID', | ||
name: 'chatId', | ||
type: 'string', | ||
required: true, | ||
displayOptions: { | ||
show: { | ||
operation: ['sendText', 'sendPoll'], | ||
resource: ['chatting'], | ||
}, | ||
}, | ||
default: '', | ||
placeholder: 'xxxxxxx@c.us', | ||
}, | ||
{ | ||
displayName: 'Text', | ||
name: 'text', | ||
type: 'string', | ||
required: true, | ||
typeOptions: { | ||
rows: 4, | ||
}, | ||
displayOptions: { | ||
show: { | ||
operation: ['sendText'], | ||
resource: ['chatting'], | ||
}, | ||
}, | ||
default: '', | ||
placeholder: '', | ||
description: 'Text to send', | ||
}, | ||
{ | ||
displayName: 'Title', | ||
name: 'title', | ||
type: 'string', | ||
required: true, | ||
displayOptions: { | ||
show: { | ||
operation: ['sendPoll'], | ||
resource: ['chatting'], | ||
}, | ||
}, | ||
default: '', | ||
placeholder: '', | ||
}, | ||
{ | ||
displayName: 'Options', | ||
name: 'pollOptions', | ||
type: 'string', | ||
default: '', | ||
typeOptions: { | ||
rows: 4, | ||
}, | ||
displayOptions: { | ||
show: { | ||
operation: ['sendPoll'], | ||
resource: ['chatting'], | ||
}, | ||
}, | ||
placeholder: 'Semicolon separated option. Ex: option 1;option 2', | ||
}, | ||
{ | ||
displayName: 'Multiple Answers', | ||
name: 'multipleAnswers', | ||
type: 'boolean', | ||
displayOptions: { | ||
show: { | ||
operation: ['sendPoll'], | ||
resource: ['chatting'], | ||
}, | ||
}, | ||
default: false | ||
}, | ||
{ | ||
displayName: 'Operation', | ||
name: 'operation', | ||
type: 'options', | ||
noDataExpression: true, | ||
displayOptions: { | ||
show: { | ||
resource: ['auth'], | ||
}, | ||
}, | ||
options: [ | ||
{ | ||
name: 'QR', | ||
value: 'qr', | ||
action: 'QR', | ||
}, | ||
], | ||
default: 'qr', | ||
}, | ||
{ | ||
displayName: 'Webhook URL', | ||
name: 'webhookUrl', | ||
type: 'string', | ||
required: true, | ||
displayOptions: { | ||
show: { | ||
operation: ['start'], | ||
resource: ['session'], | ||
}, | ||
}, | ||
default: '', | ||
placeholder: 'https://n8n.gms.church/xxxxxxxxx', | ||
}, | ||
], | ||
version: 1, | ||
defaults: { | ||
name: 'WaWebJS', | ||
}, | ||
inputs: ['main'], | ||
outputs: ['main'], | ||
displayName: 'Whatsapp WebJS', | ||
name: 'WaWebJS', | ||
icon: 'file:wa.svg', | ||
group: ['whatsapp'], | ||
description: 'Connect with Whatsapp WebJS API', | ||
credentials: [ | ||
{ | ||
name: 'waWebJSApi', | ||
required: true, | ||
}, | ||
], | ||
requestDefaults: { | ||
headers: { | ||
Accept: 'application/json', | ||
'Content-Type': 'application/json', | ||
}, | ||
baseURL: '={{$credentials.url}}', | ||
}, | ||
}; | ||
} | ||
async execute() { | ||
const cred = await this.getCredentials('waWebJSApi'); | ||
const session = cred.session; | ||
const items = this.getInputData(); | ||
const returnData = []; | ||
const resource = this.getNodeParameter('resource', 0); | ||
const operation = this.getNodeParameter('operation', 0); | ||
var options = { | ||
uri: `${cred.url}`, | ||
json: true, | ||
}; | ||
for (let i = 0; i < items.length; i++) { | ||
if (resource === 'chatting') { | ||
if (operation === 'sendText') { | ||
const chatId = this.getNodeParameter('chatId', i); | ||
const text = this.getNodeParameter('text', i); | ||
options.method = 'POST'; | ||
options.uri += `/${session}/messages/send-text`; | ||
options.body = { | ||
chatId: chatId, | ||
text: text | ||
}; | ||
const responseData = await this.helpers.requestWithAuthentication.call(this, 'waWebJSApi', options); | ||
returnData.push({ | ||
json: responseData, | ||
}); | ||
} | ||
else if (operation === 'sendPoll') { | ||
const chatId = this.getNodeParameter('chatId', i); | ||
const title = this.getNodeParameter('title', i); | ||
const nodeOptionsParam = this.getNodeParameter('pollOptions', i); | ||
let pollOptions = []; | ||
if (nodeOptionsParam) { | ||
nodeOptionsParam.split(';').map((option) => option.trim()); | ||
} | ||
const multipleAnswers = this.getNodeParameter('multipleAnswers', i); | ||
options.method = 'POST'; | ||
options.uri += `/${session}/messages/send-text`; | ||
options.body = { | ||
chatId: chatId, | ||
poll: { | ||
name: title, | ||
options: pollOptions, | ||
multipleAnswers: multipleAnswers, | ||
}, | ||
}; | ||
const responseData = await this.helpers.requestWithAuthentication.call(this, 'waWebJSApi', options); | ||
returnData.push({ | ||
json: responseData, | ||
}); | ||
} | ||
} | ||
else if (resource === 'session') { | ||
if (operation === 'start') { | ||
const url = this.getNodeParameter('webhookUrl', i); | ||
options.method = 'POST'; | ||
options.uri += `/sessions/${session}/start`; | ||
options.body = { | ||
webhookUrl: url | ||
}; | ||
const responseData = await this.helpers.requestWithAuthentication.call(this, 'waWebJSApi', options); | ||
returnData.push({ | ||
json: responseData, | ||
}); | ||
} | ||
else if (operation === 'stop') { | ||
options.method = 'POST'; | ||
options.uri += `/sessions/${session}/stop`; | ||
const responseData = await this.helpers.requestWithAuthentication.call(this, 'waWebJSApi', options); | ||
returnData.push({ | ||
json: responseData, | ||
}); | ||
} | ||
else if (operation === 'me') { | ||
options.method = 'GET'; | ||
options.uri += `/sessions/${session}/me`; | ||
const responseData = await this.helpers.requestWithAuthentication.call(this, 'waWebJSApi', options); | ||
returnData.push({ | ||
json: responseData, | ||
}); | ||
} | ||
} | ||
else if (resource === 'auth') { | ||
if (operation === 'qr') { | ||
options.method = 'GET'; | ||
options.uri += `/sessions/${cred.session}/auth/qr`; | ||
const responseData = { | ||
"mimetype": "image/png", | ||
"data": "iVBORw0KGgoAAAANSUhEUgAAARQAAAEUCAYAAADqcMl5AAAAAklEQVR4AewaftIAABIvSURBVO3BQY7YypLAQFLo+1+Z42WuChBUbb8/yAj7g7XWuuBhrbUueVhrrUse1lrrkoe11rrkYa21LnlYa61LHtZa65KHtda65GGttS55WGutSx7WWuuSh7XWuuRhrbUueVhrrUse1lrrkh8+UvmbKt5QmSreUHmjYlJ5o+INlaliUjmpmFR+U8WJym+qmFR+U8WkclIxqfxNFV88rLXWJQ9rrXXJw1prXfLDZRU3qbyhMlW8oXJScaIyVUwqN1WcVEwqJxWTylRxonKiMlXcVHGi8kbFGyq/qeImlZse1lrrkoe11rrkYa21Lvnhl6m8UfEvVUwq/5LKGxWTyk0qU8VJxYnKGxWTyhsVk8oXKlPFpPKbVN6o+E0Pa611ycNaa13ysNZal/zw/0zFicobFb+pYlK5qeKLiknlDZWpYqqYVN6omFROKqaKSeWNijcqJpX/Tx7WWuuSh7XWuuRhrbUu+eH/GZWTiptUpoqTiknlpGJSOVGZKiaVm1S+UJkqbqo4UZkqTlSmiknlRGWq+P/kYa21LnlYa61LHtZa65IfflnFb1KZKiaVN1S+UPmiYlJ5o2JSe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Pa611ycNaa13ysNZalzystdYlD2utdcnDWmtd8n8BPVjIaoCAHgAAAABJRU5ErkJggg==" | ||
}; | ||
if (responseData.mimetype && responseData.data) { | ||
let fileName = 'qrcode.png'; | ||
const mimeType = responseData.mimetype; | ||
const binaryPropertyName = 'qrcode'; | ||
const data = responseData.data; | ||
const binary = { | ||
[binaryPropertyName]: { data, fileName, mimeType }, | ||
}; | ||
returnData.push({ | ||
json: responseData, | ||
binary, | ||
}); | ||
} | ||
else { | ||
returnData.push({ | ||
json: responseData | ||
}); | ||
} | ||
} | ||
} | ||
} | ||
return this.prepareOutputData(returnData); | ||
} | ||
} | ||
exports.WaWebJS = WaWebJS; | ||
//# sourceMappingURL=WaWebJS.node.js.map | ||
//# sourceMappingURL=WaWebJS.node.js.map |
{ | ||
"name": "n8n-nodes-wa-webjs", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "n8n to connect with WA Web JS API", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
{ | ||
"name": "n8n-nodes-wa-webjs", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "n8n to connect with WA Web JS API", | ||
@@ -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
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
61276
427