@wsapichat/mcp-server 1.0.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.
Files changed (72) hide show
  1. package/CLAUDE.md +96 -0
  2. package/LICENSE +21 -0
  3. package/README.md +403 -0
  4. package/dist/client/index.d.ts +16 -0
  5. package/dist/client/index.d.ts.map +1 -0
  6. package/dist/client/index.js +154 -0
  7. package/dist/client/index.js.map +1 -0
  8. package/dist/config/index.d.ts +85 -0
  9. package/dist/config/index.d.ts.map +1 -0
  10. package/dist/config/index.js +67 -0
  11. package/dist/config/index.js.map +1 -0
  12. package/dist/index.d.ts +5 -0
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/index.js +46 -0
  15. package/dist/index.js.map +1 -0
  16. package/dist/server.d.ts +20 -0
  17. package/dist/server.d.ts.map +1 -0
  18. package/dist/server.js +173 -0
  19. package/dist/server.js.map +1 -0
  20. package/dist/tools/account.d.ts +14 -0
  21. package/dist/tools/account.d.ts.map +1 -0
  22. package/dist/tools/account.js +78 -0
  23. package/dist/tools/account.js.map +1 -0
  24. package/dist/tools/chats.d.ts +14 -0
  25. package/dist/tools/chats.d.ts.map +1 -0
  26. package/dist/tools/chats.js +81 -0
  27. package/dist/tools/chats.js.map +1 -0
  28. package/dist/tools/contacts.d.ts +18 -0
  29. package/dist/tools/contacts.d.ts.map +1 -0
  30. package/dist/tools/contacts.js +213 -0
  31. package/dist/tools/contacts.js.map +1 -0
  32. package/dist/tools/groups.d.ts +12 -0
  33. package/dist/tools/groups.d.ts.map +1 -0
  34. package/dist/tools/groups.js +65 -0
  35. package/dist/tools/groups.js.map +1 -0
  36. package/dist/tools/instance.d.ts +12 -0
  37. package/dist/tools/instance.d.ts.map +1 -0
  38. package/dist/tools/instance.js +54 -0
  39. package/dist/tools/instance.js.map +1 -0
  40. package/dist/tools/messaging-advanced.d.ts +16 -0
  41. package/dist/tools/messaging-advanced.d.ts.map +1 -0
  42. package/dist/tools/messaging-advanced.js +386 -0
  43. package/dist/tools/messaging-advanced.js.map +1 -0
  44. package/dist/tools/messaging.d.ts +28 -0
  45. package/dist/tools/messaging.d.ts.map +1 -0
  46. package/dist/tools/messaging.js +491 -0
  47. package/dist/tools/messaging.js.map +1 -0
  48. package/dist/tools/session.d.ts +14 -0
  49. package/dist/tools/session.d.ts.map +1 -0
  50. package/dist/tools/session.js +61 -0
  51. package/dist/tools/session.js.map +1 -0
  52. package/dist/types/api.d.ts +2730 -0
  53. package/dist/types/api.d.ts.map +1 -0
  54. package/dist/types/api.js +6 -0
  55. package/dist/types/api.js.map +1 -0
  56. package/dist/types/webhooks.d.ts +1001 -0
  57. package/dist/types/webhooks.d.ts.map +1 -0
  58. package/dist/types/webhooks.js +6 -0
  59. package/dist/types/webhooks.js.map +1 -0
  60. package/dist/utils/errors.d.ts +39 -0
  61. package/dist/utils/errors.d.ts.map +1 -0
  62. package/dist/utils/errors.js +151 -0
  63. package/dist/utils/errors.js.map +1 -0
  64. package/dist/utils/logger.d.ts +12 -0
  65. package/dist/utils/logger.d.ts.map +1 -0
  66. package/dist/utils/logger.js +99 -0
  67. package/dist/utils/logger.js.map +1 -0
  68. package/dist/validation/schemas.d.ts +732 -0
  69. package/dist/validation/schemas.d.ts.map +1 -0
  70. package/dist/validation/schemas.js +269 -0
  71. package/dist/validation/schemas.js.map +1 -0
  72. package/package.json +83 -0
@@ -0,0 +1,386 @@
1
+ import { wsapiClient } from '../client/index.js';
2
+ import { createLogger } from '../utils/logger.js';
3
+ import { validateInput, sendAudioMessageSchema, sendVoiceMessageSchema, sendDocumentMessageSchema, sendStickerMessageSchema, sendLocationMessageSchema, sendContactMessageSchema, } from '../validation/schemas.js';
4
+ const logger = createLogger('messaging-advanced-tools');
5
+ // Send audio message tool
6
+ export const sendAudioMessage = {
7
+ name: 'whatsapp_send_audio',
8
+ description: 'Send an audio file message to a WhatsApp contact or group. Can send from URL or base64.',
9
+ inputSchema: {
10
+ type: 'object',
11
+ properties: {
12
+ to: {
13
+ type: 'string',
14
+ description: 'Recipient phone number (with @s.whatsapp.net) or group ID (with @g.us)',
15
+ },
16
+ audioBase64: {
17
+ type: 'string',
18
+ description: 'Base64 encoded audio data (alternative to audioURL)',
19
+ optional: true,
20
+ },
21
+ audioURL: {
22
+ type: 'string',
23
+ description: 'URL of the audio file to send (alternative to audioBase64)',
24
+ optional: true,
25
+ },
26
+ mimeType: {
27
+ type: 'string',
28
+ enum: ['audio/mpeg', 'audio/mp3', 'audio/ogg', 'audio/wav'],
29
+ description: 'MIME type of the audio file',
30
+ },
31
+ mentions: {
32
+ type: 'array',
33
+ items: { type: 'string' },
34
+ description: 'List of phone numbers to mention',
35
+ optional: true,
36
+ },
37
+ replyTo: {
38
+ type: 'string',
39
+ description: 'ID of the message being replied to',
40
+ optional: true,
41
+ },
42
+ isForwarded: {
43
+ type: 'boolean',
44
+ description: 'Whether the message should be marked as forwarded',
45
+ optional: true,
46
+ },
47
+ viewOnce: {
48
+ type: 'boolean',
49
+ description: 'Whether the audio should be sent as view-once',
50
+ optional: true,
51
+ },
52
+ },
53
+ required: ['to', 'mimeType'],
54
+ },
55
+ handler: async (args) => {
56
+ const input = validateInput(sendAudioMessageSchema, args);
57
+ logger.info('Sending audio message', {
58
+ to: input.to,
59
+ mimeType: input.mimeType,
60
+ viewOnce: input.viewOnce,
61
+ });
62
+ const result = await wsapiClient.post('/messages/audio', input);
63
+ logger.info('Audio message sent successfully', { messageId: result.id });
64
+ return {
65
+ success: true,
66
+ messageId: result.id,
67
+ message: 'Audio message sent successfully',
68
+ };
69
+ },
70
+ };
71
+ // Send voice message tool
72
+ export const sendVoiceMessage = {
73
+ name: 'whatsapp_send_voice',
74
+ description: 'Send a voice message (PTT) to a WhatsApp contact or group. Can send from URL or base64.',
75
+ inputSchema: {
76
+ type: 'object',
77
+ properties: {
78
+ to: {
79
+ type: 'string',
80
+ description: 'Recipient phone number (with @s.whatsapp.net) or group ID (with @g.us)',
81
+ },
82
+ voiceBase64: {
83
+ type: 'string',
84
+ description: 'Base64 encoded voice data (alternative to voiceURL)',
85
+ optional: true,
86
+ },
87
+ voiceURL: {
88
+ type: 'string',
89
+ description: 'URL of the voice file to send (alternative to voiceBase64)',
90
+ optional: true,
91
+ },
92
+ mentions: {
93
+ type: 'array',
94
+ items: { type: 'string' },
95
+ description: 'List of phone numbers to mention',
96
+ optional: true,
97
+ },
98
+ replyTo: {
99
+ type: 'string',
100
+ description: 'ID of the message being replied to',
101
+ optional: true,
102
+ },
103
+ isForwarded: {
104
+ type: 'boolean',
105
+ description: 'Whether the message should be marked as forwarded',
106
+ optional: true,
107
+ },
108
+ viewOnce: {
109
+ type: 'boolean',
110
+ description: 'Whether the voice message should be sent as view-once',
111
+ optional: true,
112
+ },
113
+ },
114
+ required: ['to'],
115
+ },
116
+ handler: async (args) => {
117
+ const input = validateInput(sendVoiceMessageSchema, args);
118
+ logger.info('Sending voice message', {
119
+ to: input.to,
120
+ viewOnce: input.viewOnce,
121
+ });
122
+ const result = await wsapiClient.post('/messages/voice', input);
123
+ logger.info('Voice message sent successfully', { messageId: result.id });
124
+ return {
125
+ success: true,
126
+ messageId: result.id,
127
+ message: 'Voice message sent successfully',
128
+ };
129
+ },
130
+ };
131
+ // Send document message tool
132
+ export const sendDocumentMessage = {
133
+ name: 'whatsapp_send_document',
134
+ description: 'Send a document file to a WhatsApp contact or group. Can send from URL or base64.',
135
+ inputSchema: {
136
+ type: 'object',
137
+ properties: {
138
+ to: {
139
+ type: 'string',
140
+ description: 'Recipient phone number (with @s.whatsapp.net) or group ID (with @g.us)',
141
+ },
142
+ documentBase64: {
143
+ type: 'string',
144
+ description: 'Base64 encoded document data (alternative to documentURL)',
145
+ optional: true,
146
+ },
147
+ documentURL: {
148
+ type: 'string',
149
+ description: 'URL of the document to send (alternative to documentBase64)',
150
+ optional: true,
151
+ },
152
+ fileName: {
153
+ type: 'string',
154
+ description: 'Name of the document file (max 255 characters)',
155
+ },
156
+ caption: {
157
+ type: 'string',
158
+ description: 'Caption for the document (max 1024 characters)',
159
+ optional: true,
160
+ },
161
+ mentions: {
162
+ type: 'array',
163
+ items: { type: 'string' },
164
+ description: 'List of phone numbers to mention in the caption',
165
+ optional: true,
166
+ },
167
+ replyTo: {
168
+ type: 'string',
169
+ description: 'ID of the message being replied to',
170
+ optional: true,
171
+ },
172
+ isForwarded: {
173
+ type: 'boolean',
174
+ description: 'Whether the message should be marked as forwarded',
175
+ optional: true,
176
+ },
177
+ },
178
+ required: ['to', 'fileName'],
179
+ },
180
+ handler: async (args) => {
181
+ const input = validateInput(sendDocumentMessageSchema, args);
182
+ logger.info('Sending document message', {
183
+ to: input.to,
184
+ fileName: input.fileName,
185
+ hasCaption: !!input.caption,
186
+ });
187
+ const result = await wsapiClient.post('/messages/document', input);
188
+ logger.info('Document message sent successfully', { messageId: result.id });
189
+ return {
190
+ success: true,
191
+ messageId: result.id,
192
+ message: 'Document message sent successfully',
193
+ };
194
+ },
195
+ };
196
+ // Send sticker message tool
197
+ export const sendStickerMessage = {
198
+ name: 'whatsapp_send_sticker',
199
+ description: 'Send a sticker message to a WhatsApp contact or group. Can send from URL or base64.',
200
+ inputSchema: {
201
+ type: 'object',
202
+ properties: {
203
+ to: {
204
+ type: 'string',
205
+ description: 'Recipient phone number (with @s.whatsapp.net) or group ID (with @g.us)',
206
+ },
207
+ stickerBase64: {
208
+ type: 'string',
209
+ description: 'Base64 encoded sticker data (alternative to stickerURL)',
210
+ optional: true,
211
+ },
212
+ stickerURL: {
213
+ type: 'string',
214
+ description: 'URL of the sticker to send (alternative to stickerBase64)',
215
+ optional: true,
216
+ },
217
+ mimeType: {
218
+ type: 'string',
219
+ enum: ['image/webp'],
220
+ description: 'MIME type of the sticker (must be image/webp)',
221
+ },
222
+ isAnimated: {
223
+ type: 'boolean',
224
+ description: 'Whether the sticker is animated',
225
+ optional: true,
226
+ },
227
+ mentions: {
228
+ type: 'array',
229
+ items: { type: 'string' },
230
+ description: 'List of phone numbers to mention',
231
+ optional: true,
232
+ },
233
+ replyTo: {
234
+ type: 'string',
235
+ description: 'ID of the message being replied to',
236
+ optional: true,
237
+ },
238
+ isForwarded: {
239
+ type: 'boolean',
240
+ description: 'Whether the message should be marked as forwarded',
241
+ optional: true,
242
+ },
243
+ },
244
+ required: ['to', 'mimeType'],
245
+ },
246
+ handler: async (args) => {
247
+ const input = validateInput(sendStickerMessageSchema, args);
248
+ logger.info('Sending sticker message', {
249
+ to: input.to,
250
+ mimeType: input.mimeType,
251
+ isAnimated: input.isAnimated,
252
+ });
253
+ const result = await wsapiClient.post('/messages/sticker', input);
254
+ logger.info('Sticker message sent successfully', { messageId: result.id });
255
+ return {
256
+ success: true,
257
+ messageId: result.id,
258
+ message: 'Sticker message sent successfully',
259
+ };
260
+ },
261
+ };
262
+ // Send location message tool
263
+ export const sendLocationMessage = {
264
+ name: 'whatsapp_send_location',
265
+ description: 'Send a location message to a WhatsApp contact or group.',
266
+ inputSchema: {
267
+ type: 'object',
268
+ properties: {
269
+ to: {
270
+ type: 'string',
271
+ description: 'Recipient phone number (with @s.whatsapp.net) or group ID (with @g.us)',
272
+ },
273
+ latitude: {
274
+ type: 'number',
275
+ minimum: -90,
276
+ maximum: 90,
277
+ description: 'Latitude coordinate',
278
+ },
279
+ longitude: {
280
+ type: 'number',
281
+ minimum: -180,
282
+ maximum: 180,
283
+ description: 'Longitude coordinate',
284
+ },
285
+ name: {
286
+ type: 'string',
287
+ description: 'Name of the location (max 1000 characters)',
288
+ optional: true,
289
+ },
290
+ address: {
291
+ type: 'string',
292
+ description: 'Address of the location (max 1000 characters)',
293
+ optional: true,
294
+ },
295
+ url: {
296
+ type: 'string',
297
+ description: 'URL related to the location (e.g., Google Maps link)',
298
+ optional: true,
299
+ },
300
+ },
301
+ required: ['to', 'latitude', 'longitude'],
302
+ },
303
+ handler: async (args) => {
304
+ const input = validateInput(sendLocationMessageSchema, args);
305
+ logger.info('Sending location message', {
306
+ to: input.to,
307
+ latitude: input.latitude,
308
+ longitude: input.longitude,
309
+ hasName: !!input.name,
310
+ hasAddress: !!input.address,
311
+ });
312
+ const result = await wsapiClient.post('/messages/location', input);
313
+ logger.info('Location message sent successfully', { messageId: result.id });
314
+ return {
315
+ success: true,
316
+ messageId: result.id,
317
+ message: 'Location message sent successfully',
318
+ };
319
+ },
320
+ };
321
+ // Send contact message tool
322
+ export const sendContactMessage = {
323
+ name: 'whatsapp_send_contact',
324
+ description: 'Send a contact (vCard) message to a WhatsApp contact or group.',
325
+ inputSchema: {
326
+ type: 'object',
327
+ properties: {
328
+ to: {
329
+ type: 'string',
330
+ description: 'Recipient phone number (with @s.whatsapp.net) or group ID (with @g.us)',
331
+ },
332
+ displayName: {
333
+ type: 'string',
334
+ description: 'Display name for the contact (alternative to vCard)',
335
+ optional: true,
336
+ },
337
+ vCard: {
338
+ type: 'string',
339
+ description: 'Raw vCard string (alternative to displayName)',
340
+ optional: true,
341
+ },
342
+ mentions: {
343
+ type: 'array',
344
+ items: { type: 'string' },
345
+ description: 'List of phone numbers to mention',
346
+ optional: true,
347
+ },
348
+ replyTo: {
349
+ type: 'string',
350
+ description: 'ID of the message being replied to',
351
+ optional: true,
352
+ },
353
+ isForwarded: {
354
+ type: 'boolean',
355
+ description: 'Whether the message should be marked as forwarded',
356
+ optional: true,
357
+ },
358
+ },
359
+ required: ['to'],
360
+ },
361
+ handler: async (args) => {
362
+ const input = validateInput(sendContactMessageSchema, args);
363
+ logger.info('Sending contact message', {
364
+ to: input.to,
365
+ hasDisplayName: !!input.displayName,
366
+ hasVCard: !!input.vCard,
367
+ });
368
+ const result = await wsapiClient.post('/messages/contact', input);
369
+ logger.info('Contact message sent successfully', { messageId: result.id });
370
+ return {
371
+ success: true,
372
+ messageId: result.id,
373
+ message: 'Contact message sent successfully',
374
+ };
375
+ },
376
+ };
377
+ // Export all advanced messaging tools
378
+ export const advancedMessagingTools = {
379
+ sendAudioMessage,
380
+ sendVoiceMessage,
381
+ sendDocumentMessage,
382
+ sendStickerMessage,
383
+ sendLocationMessage,
384
+ sendContactMessage,
385
+ };
386
+ //# sourceMappingURL=messaging-advanced.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messaging-advanced.js","sourceRoot":"","sources":["../../src/tools/messaging-advanced.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,GAOzB,MAAM,0BAA0B,CAAC;AAElC,MAAM,MAAM,GAAG,YAAY,CAAC,0BAA0B,CAAC,CAAC;AAExD,0BAA0B;AAC1B,MAAM,CAAC,MAAM,gBAAgB,GAAgB;IAC3C,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,yFAAyF;IACtG,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,EAAE,EAAE;gBACF,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,wEAAwE;aACtF;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,qDAAqD;gBAClE,QAAQ,EAAE,IAAI;aACf;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,4DAA4D;gBACzE,QAAQ,EAAE,IAAI;aACf;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,CAAC;gBAC3D,WAAW,EAAE,6BAA6B;aAC3C;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACzB,WAAW,EAAE,kCAAkC;gBAC/C,QAAQ,EAAE,IAAI;aACf;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;g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;QAElE,MAAM,CAAC,IAAI,CAAC,mCAAmC,EAAE,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;QAE3E,OAAO;YACL,OAAO,EAAE,IAAI;YACb,SAAS,EAAE,MAAM,CAAC,EAAE;YACpB,OAAO,EAAE,mCAAmC;SAC7C,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,sCAAsC;AACtC,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,gBAAgB;IAChB,gBAAgB;IAChB,mBAAmB;IACnB,kBAAkB;IAClB,mBAAmB;IACnB,kBAAkB;CACnB,CAAC"}
@@ -0,0 +1,28 @@
1
+ import type { ToolHandler } from '../server.js';
2
+ export declare const sendTextMessage: ToolHandler;
3
+ export declare const sendImageMessage: ToolHandler;
4
+ export declare const sendVideoMessage: ToolHandler;
5
+ export declare const sendLinkMessage: ToolHandler;
6
+ export declare const sendReactionMessage: ToolHandler;
7
+ export declare const editMessage: ToolHandler;
8
+ export declare const deleteMessage: ToolHandler;
9
+ export declare const markMessageAsRead: ToolHandler;
10
+ export declare const starMessage: ToolHandler;
11
+ export declare const messagingTools: {
12
+ sendAudioMessage: ToolHandler;
13
+ sendVoiceMessage: ToolHandler;
14
+ sendDocumentMessage: ToolHandler;
15
+ sendStickerMessage: ToolHandler;
16
+ sendLocationMessage: ToolHandler;
17
+ sendContactMessage: ToolHandler;
18
+ sendTextMessage: ToolHandler;
19
+ sendImageMessage: ToolHandler;
20
+ sendVideoMessage: ToolHandler;
21
+ sendLinkMessage: ToolHandler;
22
+ sendReactionMessage: ToolHandler;
23
+ editMessage: ToolHandler;
24
+ deleteMessage: ToolHandler;
25
+ markMessageAsRead: ToolHandler;
26
+ starMessage: ToolHandler;
27
+ };
28
+ //# sourceMappingURL=messaging.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messaging.d.ts","sourceRoot":"","sources":["../../src/tools/messaging.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAwBhD,eAAO,MAAM,eAAe,EAAE,WAgD7B,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,WA0E9B,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,WA0E9B,CAAC;AAGF,eAAO,MAAM,eAAe,EAAE,WAwE7B,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,WAgDjC,CAAC;AAGF,eAAO,MAAM,WAAW,EAAE,WA2CzB,CAAC;AAGF,eAAO,MAAM,aAAa,EAAE,WAyC3B,CAAC;AAGF,eAAO,MAAM,iBAAiB,EAAE,WAgD/B,CAAC;AAGF,eAAO,MAAM,WAAW,EAAE,WAyCzB,CAAC;AAMF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;CAW1B,CAAC"}