n8n-nodes-genisys-whatsapp 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WhatsAppApiCredentials = void 0;
4
+ class WhatsAppApiCredentials {
5
+ constructor() {
6
+ this.name = 'whatsappApiCredentials';
7
+ this.displayName = 'WhatsApp API Credentials';
8
+ this.documentationUrl = 'https://github.com/n8n-io/n8n/blob/master/packages/nodes-base/nodes/HttpRequest/';
9
+ this.properties = [
10
+ {
11
+ displayName: 'Base URL',
12
+ name: 'baseUrl',
13
+ type: 'string',
14
+ default: '',
15
+ placeholder: 'https://api.meudominio.com',
16
+ description: 'The base URL of the WhatsApp API server.',
17
+ },
18
+ {
19
+ displayName: 'API Token',
20
+ name: 'apiToken',
21
+ type: 'string',
22
+ typeOptions: {
23
+ password: true,
24
+ },
25
+ default: '',
26
+ description: 'The Bearer Token for authentication.',
27
+ },
28
+ ];
29
+ }
30
+ }
31
+ exports.WhatsAppApiCredentials = WhatsAppApiCredentials;
32
+ //# sourceMappingURL=WhatsAppApiCredentials.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WhatsAppApiCredentials.credentials.js","sourceRoot":"","sources":["../../credentials/WhatsAppApiCredentials.credentials.ts"],"names":[],"mappings":";;;AAKA,MAAa,sBAAsB;IAAnC;QACI,SAAI,GAAG,wBAAwB,CAAC;QAChC,gBAAW,GAAG,0BAA0B,CAAC;QACzC,qBAAgB,GAAG,kFAAkF,CAAC;QACtG,eAAU,GAAsB;YAC5B;gBACI,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,4BAA4B;gBACzC,WAAW,EAAE,0CAA0C;aAC1D;YACD;gBACI,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACT,QAAQ,EAAE,IAAI;iBACjB;gBACD,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,sCAAsC;aACtD;SACJ,CAAC;IACN,CAAC;CAAA;AAxBD,wDAwBC"}
@@ -0,0 +1,313 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WhatsAppApi = void 0;
4
+ class WhatsAppApi {
5
+ constructor() {
6
+ this.description = {
7
+ displayName: 'WhatsApp API',
8
+ name: 'whatsAppApi',
9
+ icon: 'file:whatsapp.svg',
10
+ group: ['transform'],
11
+ version: 1,
12
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
13
+ description: 'Interact with WhatsApp API',
14
+ defaults: {
15
+ name: 'WhatsApp API',
16
+ },
17
+ inputs: ['main'],
18
+ outputs: ['main'],
19
+ credentials: [
20
+ {
21
+ name: 'whatsappApiCredentials',
22
+ required: true,
23
+ },
24
+ ],
25
+ properties: [
26
+ {
27
+ displayName: 'Action',
28
+ name: 'action',
29
+ type: 'options',
30
+ options: [
31
+ {
32
+ name: 'Send Message',
33
+ value: 'sendMessage',
34
+ },
35
+ ],
36
+ default: 'sendMessage',
37
+ noDataExpression: true,
38
+ },
39
+ {
40
+ displayName: 'Session ID',
41
+ name: 'session',
42
+ type: 'string',
43
+ default: 'Genisys',
44
+ description: 'The session ID of the WhatsApp instance.',
45
+ required: true,
46
+ displayOptions: {
47
+ show: {
48
+ action: [
49
+ 'sendMessage',
50
+ ],
51
+ },
52
+ },
53
+ },
54
+ {
55
+ displayName: 'Phone Number',
56
+ name: 'phone',
57
+ type: 'string',
58
+ default: '',
59
+ placeholder: '5511999999999',
60
+ description: 'The destination phone number with DDI and DDD.',
61
+ required: true,
62
+ displayOptions: {
63
+ show: {
64
+ action: [
65
+ 'sendMessage',
66
+ ],
67
+ },
68
+ },
69
+ },
70
+ {
71
+ displayName: 'Message Type',
72
+ name: 'messageType',
73
+ type: 'options',
74
+ options: [
75
+ {
76
+ name: 'Text',
77
+ value: 'text',
78
+ },
79
+ {
80
+ name: 'Image',
81
+ value: 'image',
82
+ },
83
+ {
84
+ name: 'Video',
85
+ value: 'video',
86
+ },
87
+ {
88
+ name: 'Audio',
89
+ value: 'audio',
90
+ },
91
+ {
92
+ name: 'PTT (Voice Note)',
93
+ value: 'ptt',
94
+ },
95
+ {
96
+ name: 'Document',
97
+ value: 'document',
98
+ },
99
+ {
100
+ name: 'Location',
101
+ value: 'location',
102
+ },
103
+ ],
104
+ default: 'text',
105
+ description: 'The type of message to send.',
106
+ displayOptions: {
107
+ show: {
108
+ action: [
109
+ 'sendMessage',
110
+ ],
111
+ },
112
+ },
113
+ },
114
+ {
115
+ displayName: 'Message',
116
+ name: 'message',
117
+ type: 'string',
118
+ typeOptions: {
119
+ rows: 4,
120
+ },
121
+ default: '',
122
+ description: 'The text message to send.',
123
+ displayOptions: {
124
+ show: {
125
+ action: [
126
+ 'sendMessage',
127
+ ],
128
+ messageType: [
129
+ 'text',
130
+ ],
131
+ },
132
+ },
133
+ },
134
+ {
135
+ displayName: 'Media URL',
136
+ name: 'mediaUrl',
137
+ type: 'string',
138
+ default: '',
139
+ description: 'URL of the media file.',
140
+ displayOptions: {
141
+ show: {
142
+ action: [
143
+ 'sendMessage',
144
+ ],
145
+ messageType: [
146
+ 'image',
147
+ 'video',
148
+ 'audio',
149
+ 'ptt',
150
+ 'document',
151
+ ],
152
+ },
153
+ },
154
+ },
155
+ {
156
+ displayName: 'Caption',
157
+ name: 'caption',
158
+ type: 'string',
159
+ default: '',
160
+ description: 'Caption for the media.',
161
+ displayOptions: {
162
+ show: {
163
+ action: [
164
+ 'sendMessage',
165
+ ],
166
+ messageType: [
167
+ 'image',
168
+ 'video',
169
+ 'document',
170
+ ],
171
+ },
172
+ },
173
+ },
174
+ {
175
+ displayName: 'Latitude',
176
+ name: 'latitude',
177
+ type: 'string',
178
+ default: '',
179
+ displayOptions: {
180
+ show: {
181
+ action: [
182
+ 'sendMessage',
183
+ ],
184
+ messageType: [
185
+ 'location',
186
+ ],
187
+ },
188
+ },
189
+ },
190
+ {
191
+ displayName: 'Longitude',
192
+ name: 'longitude',
193
+ type: 'string',
194
+ default: '',
195
+ displayOptions: {
196
+ show: {
197
+ action: [
198
+ 'sendMessage',
199
+ ],
200
+ messageType: [
201
+ 'location',
202
+ ],
203
+ },
204
+ },
205
+ },
206
+ {
207
+ displayName: 'Title',
208
+ name: 'title',
209
+ type: 'string',
210
+ default: '',
211
+ displayOptions: {
212
+ show: {
213
+ action: [
214
+ 'sendMessage',
215
+ ],
216
+ messageType: [
217
+ 'location',
218
+ ],
219
+ },
220
+ },
221
+ },
222
+ {
223
+ displayName: 'Description',
224
+ name: 'description',
225
+ type: 'string',
226
+ default: '',
227
+ displayOptions: {
228
+ show: {
229
+ action: [
230
+ 'sendMessage',
231
+ ],
232
+ messageType: [
233
+ 'location',
234
+ ],
235
+ },
236
+ },
237
+ },
238
+ ],
239
+ };
240
+ }
241
+ async execute() {
242
+ const items = this.getInputData();
243
+ const returnData = [];
244
+ const length = items.length;
245
+ const qs = {};
246
+ let responseData;
247
+ const credentials = await this.getCredentials('whatsappApiCredentials');
248
+ const baseUrl = credentials.baseUrl.replace(/\/$/, '');
249
+ const apiToken = credentials.apiToken;
250
+ for (let i = 0; i < length; i++) {
251
+ try {
252
+ const action = this.getNodeParameter('action', i);
253
+ const session = this.getNodeParameter('session', i);
254
+ const phone = this.getNodeParameter('phone', i);
255
+ const messageType = this.getNodeParameter('messageType', i);
256
+ if (action === 'sendMessage') {
257
+ const body = {
258
+ number: phone,
259
+ };
260
+ if (messageType === 'text') {
261
+ body.text = this.getNodeParameter('message', i);
262
+ Object.assign(body, { body: this.getNodeParameter('message', i) });
263
+ }
264
+ else if (['image', 'video', 'document'].includes(messageType)) {
265
+ body.mediaUrl = this.getNodeParameter('mediaUrl', i);
266
+ body.caption = this.getNodeParameter('caption', i);
267
+ }
268
+ else if (messageType === 'audio') {
269
+ body.mediaUrl = this.getNodeParameter('mediaUrl', i);
270
+ }
271
+ else if (messageType === 'ptt') {
272
+ body.mediaUrl = this.getNodeParameter('mediaUrl', i);
273
+ body.ptt = true;
274
+ }
275
+ else if (messageType === 'location') {
276
+ body.latitude = this.getNodeParameter('latitude', i);
277
+ body.longitude = this.getNodeParameter('longitude', i);
278
+ body.title = this.getNodeParameter('title', i);
279
+ body.description = this.getNodeParameter('description', i);
280
+ }
281
+ const options = {
282
+ headers: {
283
+ 'Authorization': `Bearer ${apiToken}`,
284
+ 'Content-Type': 'application/json',
285
+ },
286
+ method: 'POST',
287
+ body: body,
288
+ uri: `${baseUrl}/api/send`,
289
+ json: true,
290
+ };
291
+ Object.assign(body, { session: session });
292
+ responseData = await this.helpers.request(options);
293
+ }
294
+ if (Array.isArray(responseData)) {
295
+ returnData.push.apply(returnData, responseData);
296
+ }
297
+ else if (responseData !== undefined) {
298
+ returnData.push({ json: responseData });
299
+ }
300
+ }
301
+ catch (error) {
302
+ if (this.continueOnFail()) {
303
+ returnData.push({ json: { error: error.message } });
304
+ continue;
305
+ }
306
+ throw error;
307
+ }
308
+ }
309
+ return [returnData];
310
+ }
311
+ }
312
+ exports.WhatsAppApi = WhatsAppApi;
313
+ //# sourceMappingURL=WhatsAppApi.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WhatsAppApi.node.js","sourceRoot":"","sources":["../../../nodes/WhatsAppApi/WhatsAppApi.node.ts"],"names":[],"mappings":";;;AAUA,MAAa,WAAW;IAAxB;QACI,gBAAW,GAAyB;YAChC,WAAW,EAAE,cAAc;YAC3B,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,4BAA4B;YACzC,QAAQ,EAAE;gBACN,IAAI,EAAE,cAAc;aACvB;YACD,MAAM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AE,OAAO,EAAE,CAAC,CAAC;oBAE1C,YAAY,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;gBACvD,CAAC;gBAED,IAAI,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;oBAC9B,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,YAAoC,CAAC,CAAC;gBAC5E,CAAC;qBAAM,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;oBACpC,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,YAAY,EAAwB,CAAC,CAAC;gBAClE,CAAC;YACL,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBACxB,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;oBACpD,SAAS;gBACb,CAAC;gBACD,MAAM,KAAK,CAAC;YAChB,CAAC;QACL,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACxB,CAAC;CACJ;AAvWD,kCAuWC"}
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none">
2
+ <path fill="#25D366" d="M16 2.001c-7.732 0-14 6.268-14 14 0 2.483.649 4.814 1.782 6.862L2 29.999l7.352-1.928A13.914 13.914 0 0 0 16 30.001c7.732 0 14-6.268 14-14s-6.268-14-14-14zm0 25.564c-2.31 0-4.502-.693-6.353-1.884l-.454-.296-4.661 1.222 1.246-4.545-.286-.467A11.516 11.516 0 0 1 4.436 16.001c0-6.388 5.183-11.564 11.564-11.564 6.382 0 11.564 5.176 11.564 11.564 0 6.388-5.182 11.564-11.564 11.564z"/>
3
+ </svg>
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "n8n-nodes-genisys-whatsapp",
3
+ "version": "0.1.0",
4
+ "description": "Custom n8n node for WhatsApp API",
5
+ "keywords": [
6
+ "n8n-community-node-package"
7
+ ],
8
+ "license": "MIT",
9
+ "author": {
10
+ "name": "User",
11
+ "email": "user@example.com"
12
+ },
13
+ "main": "index.js",
14
+ "scripts": {
15
+ "build": "tsc && gulp build:icons",
16
+ "dev": "tsc --watch",
17
+ "lint": "tslint -p tsconfig.json -c tslint.json",
18
+ "test": "echo \"Error: no test specified\" && exit 1"
19
+ },
20
+ "files": [
21
+ "dist"
22
+ ],
23
+ "n8n": {
24
+ "nodes": [
25
+ "dist/nodes/WhatsAppApi/WhatsAppApi.node.js"
26
+ ],
27
+ "credentials": [
28
+ "dist/credentials/WhatsAppApiCredentials.credentials.js"
29
+ ]
30
+ },
31
+ "devDependencies": {
32
+ "@types/express": "^4.17.6",
33
+ "@types/node": "^14.14.41",
34
+ "@types/request-promise-native": "~1.0.15",
35
+ "gulp": "^4.0.2",
36
+ "n8n-core": "*",
37
+ "n8n-workflow": "*",
38
+ "prettier": "^2.0.5",
39
+ "tslint": "^6.1.2",
40
+ "typescript": "^5.0.0"
41
+ },
42
+ "dependencies": {
43
+ "n8n-core": "*",
44
+ "n8n-workflow": "*"
45
+ }
46
+ }