@open-wa/schema 5.0.0 → 5.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.
Files changed (70) hide show
  1. package/dist/generated/index.cjs +8 -2
  2. package/dist/generated/index.cjs.map +1 -1
  3. package/dist/generated/index.d.cts +715 -1
  4. package/dist/generated/index.d.cts.map +1 -1
  5. package/dist/generated/index.d.mts +715 -1
  6. package/dist/generated/index.d.mts.map +1 -1
  7. package/dist/generated/index.mjs +8 -2
  8. package/dist/generated/index.mjs.map +1 -1
  9. package/dist/{index-ChYFQM1K.d.cts → index-DTztyYhw.d.cts} +893 -3
  10. package/dist/index-DTztyYhw.d.cts.map +1 -0
  11. package/dist/{index-BHcd0h7x.d.mts → index-nVKR0RmZ.d.mts} +893 -3
  12. package/dist/index-nVKR0RmZ.d.mts.map +1 -0
  13. package/dist/index.cjs +51 -1
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.d.cts +2 -2
  16. package/dist/index.d.mts +2 -2
  17. package/dist/index.mjs +24 -2
  18. package/dist/index.mjs.map +1 -1
  19. package/dist/methods/index.cjs +5 -1
  20. package/dist/methods/index.d.cts +2 -2
  21. package/dist/methods/index.d.mts +2 -2
  22. package/dist/methods/index.mjs +2 -2
  23. package/dist/{methods-CZqeUhKy.mjs → methods-BSv5O3bS.mjs} +317 -2
  24. package/dist/methods-BSv5O3bS.mjs.map +1 -0
  25. package/dist/{methods-Dizm7Fn9.cjs → methods-DO0JONvB.cjs} +472 -1
  26. package/dist/methods-DO0JONvB.cjs.map +1 -0
  27. package/package.json +4 -3
  28. package/src/__tests__/generators.contract.test.ts +181 -0
  29. package/src/__tests__/registry.contract.test.ts +81 -0
  30. package/src/client-config.ts +30 -0
  31. package/src/codecs.test.ts +41 -0
  32. package/src/codecs.ts +191 -0
  33. package/src/common-types.ts +280 -0
  34. package/src/config.ts +47 -0
  35. package/src/enums.ts +63 -0
  36. package/src/events/groups.ts +33 -0
  37. package/src/events/index.ts +4 -0
  38. package/src/events/messaging.ts +86 -0
  39. package/src/events/registry.ts +124 -0
  40. package/src/events/state.ts +59 -0
  41. package/src/generated/AliasMap.ts +216 -0
  42. package/src/generated/BaseClient.ts +878 -0
  43. package/src/generated/BaseNamespacedClient.ts +214 -0
  44. package/src/generated/index.ts +5 -0
  45. package/src/generated/openapi.json +8949 -0
  46. package/src/generated/types.ts +383 -0
  47. package/src/http-manifest.ts +97 -0
  48. package/src/implementor.test.ts +88 -0
  49. package/src/implementor.ts +75 -0
  50. package/src/index.ts +44 -0
  51. package/src/interactive.ts +151 -0
  52. package/src/methods/business.ts +51 -0
  53. package/src/methods/chats.ts +263 -0
  54. package/src/methods/communities.ts +119 -0
  55. package/src/methods/contacts.ts +158 -0
  56. package/src/methods/groups.ts +376 -0
  57. package/src/methods/index.ts +34 -0
  58. package/src/methods/interactive.ts +21 -0
  59. package/src/methods/labels.ts +86 -0
  60. package/src/methods/media.ts +36 -0
  61. package/src/methods/messaging.ts +828 -0
  62. package/src/methods/session.ts +261 -0
  63. package/src/methods/status.ts +120 -0
  64. package/src/parameters.ts +237 -0
  65. package/src/registry.test.ts +30 -0
  66. package/src/registry.ts +601 -0
  67. package/dist/index-BHcd0h7x.d.mts.map +0 -1
  68. package/dist/index-ChYFQM1K.d.cts.map +0 -1
  69. package/dist/methods-CZqeUhKy.mjs.map +0 -1
  70. package/dist/methods-Dizm7Fn9.cjs.map +0 -1
@@ -0,0 +1,878 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by packages/schema/scripts/gen-client-implementation.ts
4
+ * Do not edit this file manually.
5
+ */
6
+ import { implementMethod } from '../implementor';
7
+ import * as Methods from '../methods';
8
+
9
+ export abstract class BaseClient {
10
+ protected abstract execute(method: string, args: any): Promise<any>;
11
+
12
+ protected async pup(_func: any, args: any): Promise<any> {
13
+ throw new Error('BaseClient.pup is not available without a runtime implementation.');
14
+ }
15
+
16
+ /**
17
+ * Sends a text message to a chat
18
+ */
19
+ public sendText = implementMethod(Methods.sendText);
20
+
21
+ /**
22
+ * Sends a text message that includes @mentions
23
+ */
24
+ public sendTextWithMentions = implementMethod(Methods.sendTextWithMentions);
25
+
26
+ /**
27
+ * Sends a reply to a message that includes @mentions
28
+ */
29
+ public sendReplyWithMentions = implementMethod(Methods.sendReplyWithMentions);
30
+
31
+ /**
32
+ * Sends a payment request message
33
+ */
34
+ public sendPaymentRequest = implementMethod(Methods.sendPaymentRequest);
35
+
36
+ /**
37
+ * Sends an image to a chat
38
+ */
39
+ public sendImage = implementMethod(Methods.sendImage);
40
+
41
+ /**
42
+ * Sends a file or document to a chat
43
+ */
44
+ public sendFile = implementMethod(Methods.sendFile);
45
+
46
+ /**
47
+ * Sends an audio file to a chat
48
+ */
49
+ public sendAudio = implementMethod(Methods.sendAudio);
50
+
51
+ /**
52
+ * Sends a voice note (push-to-talk) to a chat
53
+ * @aliases sendVoiceNote
54
+ */
55
+ public sendPtt = implementMethod(Methods.sendPtt);
56
+
57
+ /**
58
+ * Sends a video as an animated GIF
59
+ */
60
+ public sendVideoAsGif = implementMethod(Methods.sendVideoAsGif);
61
+
62
+ /**
63
+ * Sends a location to a chat
64
+ */
65
+ public sendLocation = implementMethod(Methods.sendLocation);
66
+
67
+ /**
68
+ * Sends a contact card (vCard)
69
+ */
70
+ public sendVCard = implementMethod(Methods.sendVCard);
71
+
72
+ /**
73
+ * Sends a single contact
74
+ */
75
+ public sendContact = implementMethod(Methods.sendContact);
76
+
77
+ /**
78
+ * Sends multiple contacts
79
+ * @aliases sendContacts
80
+ */
81
+ public sendMultipleContacts = implementMethod(Methods.sendMultipleContacts);
82
+
83
+ /**
84
+ * Sends a button message (deprecated)
85
+ */
86
+ public sendButtons = implementMethod(Methods.sendButtons);
87
+
88
+ /**
89
+ * Sends an advanced button message with media (deprecated)
90
+ */
91
+ public sendAdvancedButtons = implementMethod(Methods.sendAdvancedButtons);
92
+
93
+ /**
94
+ * Sends a list/menu message (deprecated)
95
+ * @aliases sendList
96
+ */
97
+ public sendListMessage = implementMethod(Methods.sendListMessage);
98
+
99
+ /**
100
+ * Sends a poll message
101
+ */
102
+ public sendPoll = implementMethod(Methods.sendPoll);
103
+
104
+ /**
105
+ * Sends a banner image
106
+ */
107
+ public sendBanner = implementMethod(Methods.sendBanner);
108
+
109
+ /**
110
+ * Sends a YouTube link with auto-generated preview
111
+ * @aliases sendYoutubeLink
112
+ */
113
+ public sendYouTubeLink = implementMethod(Methods.sendYouTubeLink);
114
+
115
+ /**
116
+ * Sends a link with auto-generated preview
117
+ * @aliases sendLink
118
+ */
119
+ public sendLinkWithAutoPreview = implementMethod(Methods.sendLinkWithAutoPreview);
120
+
121
+ /**
122
+ * Sends a link preview message with custom thumbnail
123
+ * @aliases sendLinkWithThumbnail
124
+ */
125
+ public sendMessageWithThumb = implementMethod(Methods.sendMessageWithThumb);
126
+
127
+ /**
128
+ * Forwards messages to a chat
129
+ */
130
+ public forwardMessages = implementMethod(Methods.forwardMessages);
131
+
132
+ /**
133
+ * Deletes a message
134
+ */
135
+ public deleteMessage = implementMethod(Methods.deleteMessage);
136
+
137
+ /**
138
+ * Retrieves a specific message by ID
139
+ * @aliases getMessage
140
+ */
141
+ public getMessageById = implementMethod(Methods.getMessageById);
142
+
143
+ /**
144
+ * Retrieves all messages in the session
145
+ * @aliases listMessages
146
+ */
147
+ public getAllMessages = implementMethod(Methods.getAllMessages);
148
+
149
+ /**
150
+ * Get last message sent by host
151
+ */
152
+ public getMyLastMessage = implementMethod(Methods.getMyLastMessage);
153
+
154
+ /**
155
+ * Get starred messages
156
+ */
157
+ public getStarredMessages = implementMethod(Methods.getStarredMessages);
158
+
159
+ /**
160
+ * Get unsent/pending messages
161
+ */
162
+ public getUnsentMessages = implementMethod(Methods.getUnsentMessages);
163
+
164
+ /**
165
+ * Get message delivery info
166
+ */
167
+ public getMessageInfo = implementMethod(Methods.getMessageInfo);
168
+
169
+ /**
170
+ * Extract vCards from message
171
+ */
172
+ public getVCards = implementMethod(Methods.getVCards);
173
+
174
+ /**
175
+ * Get messages formatted for LLMs
176
+ * @aliases getGptArray
177
+ */
178
+ public getMessagesForLLM = implementMethod(Methods.getMessagesForLLM);
179
+
180
+ /**
181
+ * Star a message
182
+ */
183
+ public starMessage = implementMethod(Methods.starMessage);
184
+
185
+ /**
186
+ * Unstar a message
187
+ */
188
+ public unstarMessage = implementMethod(Methods.unstarMessage);
189
+
190
+ /**
191
+ * React to message with emoji
192
+ */
193
+ public react = implementMethod(Methods.react);
194
+
195
+ /**
196
+ * Mark message as seen
197
+ */
198
+ public sendSeen = implementMethod(Methods.sendSeen);
199
+
200
+ /**
201
+ * Loads earlier messages from a chat
202
+ * @aliases loadOlderMessages
203
+ */
204
+ public loadEarlierMessages = implementMethod(Methods.loadEarlierMessages);
205
+
206
+ /**
207
+ * Downloads a file from a URL and sends it to a chat
208
+ */
209
+ public sendFileFromUrl = implementMethod(Methods.sendFileFromUrl);
210
+
211
+ /**
212
+ * Retrieves all chats
213
+ * @aliases listChats
214
+ */
215
+ public getAllChats = implementMethod(Methods.getAllChats);
216
+
217
+ /**
218
+ * Get all chat IDs
219
+ * @aliases listChatIds
220
+ */
221
+ public getAllChatIds = implementMethod(Methods.getAllChatIds);
222
+
223
+ /**
224
+ * Get specific chat by ID
225
+ * @aliases getChatById
226
+ */
227
+ public getChat = implementMethod(Methods.getChat);
228
+
229
+ /**
230
+ * Get chats with non-contacts
231
+ */
232
+ public getChatWithNonContacts = implementMethod(Methods.getChatWithNonContacts);
233
+
234
+ /**
235
+ * Archive a chat
236
+ */
237
+ public archiveChat = implementMethod(Methods.archiveChat);
238
+
239
+ /**
240
+ * Unarchive a chat
241
+ */
242
+ public unarchiveChat = implementMethod(Methods.unarchiveChat);
243
+
244
+ /**
245
+ * Clear chat history
246
+ */
247
+ public clearChat = implementMethod(Methods.clearChat);
248
+
249
+ /**
250
+ * Delete a chat
251
+ */
252
+ public deleteChat = implementMethod(Methods.deleteChat);
253
+
254
+ /**
255
+ * Pin a chat
256
+ */
257
+ public pinChat = implementMethod(Methods.pinChat);
258
+
259
+ /**
260
+ * Unpin a chat
261
+ */
262
+ public unpinChat = implementMethod(Methods.unpinChat);
263
+
264
+ /**
265
+ * Mute a chat
266
+ */
267
+ public muteChat = implementMethod(Methods.muteChat);
268
+
269
+ /**
270
+ * Unmute a chat
271
+ */
272
+ public unmuteChat = implementMethod(Methods.unmuteChat);
273
+
274
+ /**
275
+ * Mark chat as read
276
+ */
277
+ public markAsRead = implementMethod(Methods.markAsRead);
278
+
279
+ /**
280
+ * Mark chat as unread
281
+ */
282
+ public markAsUnread = implementMethod(Methods.markAsUnread);
283
+
284
+ /**
285
+ * Set ephemeral messages for chat
286
+ */
287
+ public setChatEphemeral = implementMethod(Methods.setChatEphemeral);
288
+
289
+ /**
290
+ * Check if chat is online
291
+ */
292
+ public isChatOnline = implementMethod(Methods.isChatOnline);
293
+
294
+ /**
295
+ * Retrieves all contacts
296
+ * @aliases listContacts
297
+ */
298
+ public getAllContacts = implementMethod(Methods.getAllContacts);
299
+
300
+ /**
301
+ * Get specific contact
302
+ */
303
+ public getContact = implementMethod(Methods.getContact);
304
+
305
+ /**
306
+ * Get common groups with contact
307
+ */
308
+ public getCommonGroups = implementMethod(Methods.getCommonGroups);
309
+
310
+ /**
311
+ * Get profile of number
312
+ */
313
+ public getNumberProfile = implementMethod(Methods.getNumberProfile);
314
+
315
+ /**
316
+ * Get blocked contact IDs
317
+ */
318
+ public getBlockedIds = implementMethod(Methods.getBlockedIds);
319
+
320
+ /**
321
+ * Block a contact
322
+ * @aliases contactBlock
323
+ */
324
+ public blockContact = implementMethod(Methods.blockContact);
325
+
326
+ /**
327
+ * Unblock a contact
328
+ * @aliases contactUnblock
329
+ */
330
+ public unblockContact = implementMethod(Methods.unblockContact);
331
+
332
+ /**
333
+ * Check read receipts setting
334
+ * @aliases getReadReceipts
335
+ */
336
+ public checkReadReceipts = implementMethod(Methods.checkReadReceipts);
337
+
338
+ /**
339
+ * Check if number is on WhatsApp
340
+ */
341
+ public checkNumberStatus = implementMethod(Methods.checkNumberStatus);
342
+
343
+ /**
344
+ * Get profile picture from server
345
+ * @aliases getProfilePicFromServer
346
+ */
347
+ public getProfilePicture = implementMethod(Methods.getProfilePicture);
348
+
349
+ /**
350
+ * Retrieves members of a group
351
+ */
352
+ public getGroupMembers = implementMethod(Methods.getGroupMembers);
353
+
354
+ /**
355
+ * Get all groups
356
+ * @aliases listGroups
357
+ */
358
+ public getAllGroups = implementMethod(Methods.getAllGroups);
359
+
360
+ /**
361
+ * Get group member IDs
362
+ * @aliases getGroupMemberIds
363
+ */
364
+ public getGroupMembersId = implementMethod(Methods.getGroupMembersId);
365
+
366
+ /**
367
+ * Get group metadata
368
+ */
369
+ public getGroupInfo = implementMethod(Methods.getGroupInfo);
370
+
371
+ /**
372
+ * Get group admins
373
+ */
374
+ public getGroupAdmins = implementMethod(Methods.getGroupAdmins);
375
+
376
+ /**
377
+ * Get groups where kicked
378
+ */
379
+ public getKickedGroups = implementMethod(Methods.getKickedGroups);
380
+
381
+ /**
382
+ * Get group invite link
383
+ */
384
+ public getGroupInviteLink = implementMethod(Methods.getGroupInviteLink);
385
+
386
+ /**
387
+ * Create new group
388
+ */
389
+ public createGroup = implementMethod(Methods.createGroup);
390
+
391
+ /**
392
+ * Leave a group
393
+ */
394
+ public leaveGroup = implementMethod(Methods.leaveGroup);
395
+
396
+ /**
397
+ * Join group via invite link
398
+ * @aliases joinGroup
399
+ */
400
+ public joinGroupViaLink = implementMethod(Methods.joinGroupViaLink);
401
+
402
+ /**
403
+ * Revoke group invite link
404
+ */
405
+ public revokeGroupInviteLink = implementMethod(Methods.revokeGroupInviteLink);
406
+
407
+ /**
408
+ * Set group title
409
+ */
410
+ public setGroupTitle = implementMethod(Methods.setGroupTitle);
411
+
412
+ /**
413
+ * Set group description
414
+ */
415
+ public setGroupDescription = implementMethod(Methods.setGroupDescription);
416
+
417
+ /**
418
+ * Set group icon
419
+ */
420
+ public setGroupIcon = implementMethod(Methods.setGroupIcon);
421
+
422
+ /**
423
+ * Restrict group to admins only
424
+ */
425
+ public setGroupToAdminsOnly = implementMethod(Methods.setGroupToAdminsOnly);
426
+
427
+ /**
428
+ * Restrict group editing to admins only
429
+ */
430
+ public setGroupEditToAdminsOnly = implementMethod(Methods.setGroupEditToAdminsOnly);
431
+
432
+ /**
433
+ * Add participant to group
434
+ * @aliases addGroupParticipant
435
+ */
436
+ public addParticipant = implementMethod(Methods.addParticipant);
437
+
438
+ /**
439
+ * Remove participant from group
440
+ * @aliases removeGroupParticipant
441
+ */
442
+ public removeParticipant = implementMethod(Methods.removeParticipant);
443
+
444
+ /**
445
+ * Promote participant to admin
446
+ * @aliases promoteGroupParticipant
447
+ */
448
+ public promoteParticipant = implementMethod(Methods.promoteParticipant);
449
+
450
+ /**
451
+ * Demote participant from admin
452
+ * @aliases demoteGroupParticipant
453
+ */
454
+ public demoteParticipant = implementMethod(Methods.demoteParticipant);
455
+
456
+ /**
457
+ * Approve group join request
458
+ */
459
+ public approveGroupJoinRequest = implementMethod(Methods.approveGroupJoinRequest);
460
+
461
+ /**
462
+ * Reject group join request
463
+ */
464
+ public rejectGroupJoinRequest = implementMethod(Methods.rejectGroupJoinRequest);
465
+
466
+ /**
467
+ * Get all communities
468
+ * @aliases listCommunities
469
+ */
470
+ public getAllCommunities = implementMethod(Methods.getAllCommunities);
471
+
472
+ /**
473
+ * Get community metadata
474
+ */
475
+ public getCommunityInfo = implementMethod(Methods.getCommunityInfo);
476
+
477
+ /**
478
+ * Get community participant IDs
479
+ */
480
+ public getCommunityParticipantIds = implementMethod(Methods.getCommunityParticipantIds);
481
+
482
+ /**
483
+ * Get community admin IDs
484
+ */
485
+ public getCommunityAdminIds = implementMethod(Methods.getCommunityAdminIds);
486
+
487
+ /**
488
+ * Get community participants
489
+ */
490
+ public getCommunityParticipants = implementMethod(Methods.getCommunityParticipants);
491
+
492
+ /**
493
+ * Get community admins
494
+ */
495
+ public getCommunityAdmins = implementMethod(Methods.getCommunityAdmins);
496
+
497
+ /**
498
+ * Post text status
499
+ */
500
+ public postTextStatus = implementMethod(Methods.postTextStatus);
501
+
502
+ /**
503
+ * Post image status
504
+ */
505
+ public postImageStatus = implementMethod(Methods.postImageStatus);
506
+
507
+ /**
508
+ * Post video status
509
+ */
510
+ public postVideoStatus = implementMethod(Methods.postVideoStatus);
511
+
512
+ /**
513
+ * Get all stories
514
+ * @aliases getStatuses
515
+ */
516
+ public getStories = implementMethod(Methods.getStories);
517
+
518
+ /**
519
+ * Get specific status
520
+ */
521
+ public getStatus = implementMethod(Methods.getStatus);
522
+
523
+ /**
524
+ * Delete status
525
+ */
526
+ public deleteStatus = implementMethod(Methods.deleteStatus);
527
+
528
+ /**
529
+ * Delete all statuses
530
+ * @aliases deleteAllStatuses
531
+ */
532
+ public deleteAllStatus = implementMethod(Methods.deleteAllStatus);
533
+
534
+ /**
535
+ * Get all labels
536
+ * @aliases listLabels
537
+ */
538
+ public getAllLabels = implementMethod(Methods.getAllLabels);
539
+
540
+ /**
541
+ * Get chats by label
542
+ */
543
+ public getChatsByLabel = implementMethod(Methods.getChatsByLabel);
544
+
545
+ /**
546
+ * Add label to chat
547
+ */
548
+ public addLabel = implementMethod(Methods.addLabel);
549
+
550
+ /**
551
+ * Remove label from chat
552
+ */
553
+ public removeLabel = implementMethod(Methods.removeLabel);
554
+
555
+ /**
556
+ * Get business profile
557
+ */
558
+ public getBusinessProfile = implementMethod(Methods.getBusinessProfile);
559
+
560
+ /**
561
+ * Get business products
562
+ * @aliases getBusinessProfilesProducts
563
+ */
564
+ public getBusinessProducts = implementMethod(Methods.getBusinessProducts);
565
+
566
+ /**
567
+ * Get order details
568
+ */
569
+ public getOrder = implementMethod(Methods.getOrder);
570
+
571
+ /**
572
+ * Get host account info
573
+ */
574
+ public getMe = implementMethod(Methods.getMe);
575
+
576
+ /**
577
+ * Get host phone number
578
+ */
579
+ public getHostNumber = implementMethod(Methods.getHostNumber);
580
+
581
+ /**
582
+ * Get connection state
583
+ */
584
+ public getConnectionState = implementMethod(Methods.getConnectionState);
585
+
586
+ /**
587
+ * Get WhatsApp Web version
588
+ * @aliases getWhatsAppVersion
589
+ */
590
+ public getWAVersion = implementMethod(Methods.getWAVersion);
591
+
592
+ /**
593
+ * Get phone battery level
594
+ */
595
+ public getBatteryLevel = implementMethod(Methods.getBatteryLevel);
596
+
597
+ /**
598
+ * Check if phone is charging
599
+ * @aliases getIsPlugged
600
+ */
601
+ public isPlugged = implementMethod(Methods.isPlugged);
602
+
603
+ /**
604
+ * Get enabled features
605
+ */
606
+ public getFeatures = implementMethod(Methods.getFeatures);
607
+
608
+ /**
609
+ * Get license type
610
+ */
611
+ public getLicenseType = implementMethod(Methods.getLicenseType);
612
+
613
+ /**
614
+ * Get user agent
615
+ * @aliases getGeneratedUserAgent
616
+ */
617
+ public getUserAgent = implementMethod(Methods.getUserAgent);
618
+
619
+ /**
620
+ * Get process statistics
621
+ */
622
+ public getProcessStats = implementMethod(Methods.getProcessStats);
623
+
624
+ /**
625
+ * Get loaded message count
626
+ * @aliases getAmountOfLoadedMessages
627
+ */
628
+ public getLoadedMessageCount = implementMethod(Methods.getLoadedMessageCount);
629
+
630
+ /**
631
+ * Take screenshot
632
+ * @aliases takeScreenshot
633
+ */
634
+ public getSnapshot = implementMethod(Methods.getSnapshot);
635
+
636
+ /**
637
+ * Health check
638
+ */
639
+ public healthCheck = implementMethod(Methods.healthCheck);
640
+
641
+ /**
642
+ * Set host name
643
+ * @aliases setDisplayName
644
+ */
645
+ public setMyName = implementMethod(Methods.setMyName);
646
+
647
+ /**
648
+ * Set host status
649
+ * @aliases setStatusText
650
+ */
651
+ public setMyStatus = implementMethod(Methods.setMyStatus);
652
+
653
+ /**
654
+ * Set profile picture
655
+ * @aliases setProfilePic
656
+ */
657
+ public setProfilePicture = implementMethod(Methods.setProfilePicture);
658
+
659
+ /**
660
+ * Decrypts media from a message
661
+ */
662
+ public decryptMedia = implementMethod(Methods.decryptMedia);
663
+
664
+ /**
665
+ * Downloads and decrypts media from a message to a file
666
+ */
667
+ public downloadMedia = implementMethod(Methods.downloadMedia);
668
+
669
+ /**
670
+ * Send a portable interactive message document (Insiders and above)
671
+ */
672
+ public sendInteractive = implementMethod(Methods.sendInteractive);
673
+
674
+ /**
675
+ * Send a constructed WhatsApp protobuf Message payload (Insiders and above); media must already be uploaded
676
+ */
677
+ public sendRawMessage = implementMethod(Methods.sendRawMessage);
678
+
679
+ /**
680
+ * Alias of sendPtt.
681
+ */
682
+ public sendVoiceNote = this.sendPtt;
683
+
684
+ /**
685
+ * Alias of sendMultipleContacts.
686
+ */
687
+ public sendContacts = this.sendMultipleContacts;
688
+
689
+ /**
690
+ * Alias of sendListMessage.
691
+ */
692
+ public sendList = this.sendListMessage;
693
+
694
+ /**
695
+ * @deprecated Use sendYouTubeLink instead.
696
+ * Deprecated alias of sendYouTubeLink.
697
+ */
698
+ public sendYoutubeLink = this.sendYouTubeLink;
699
+
700
+ /**
701
+ * Alias of sendLinkWithAutoPreview.
702
+ */
703
+ public sendLink = this.sendLinkWithAutoPreview;
704
+
705
+ /**
706
+ * Alias of sendMessageWithThumb.
707
+ */
708
+ public sendLinkWithThumbnail = this.sendMessageWithThumb;
709
+
710
+ /**
711
+ * Alias of getMessageById.
712
+ */
713
+ public getMessage = this.getMessageById;
714
+
715
+ /**
716
+ * Alias of getAllMessages.
717
+ */
718
+ public listMessages = this.getAllMessages;
719
+
720
+ /**
721
+ * @deprecated Use getMessagesForLLM instead.
722
+ * Deprecated alias of getMessagesForLLM.
723
+ */
724
+ public getGptArray = this.getMessagesForLLM;
725
+
726
+ /**
727
+ * Alias of loadEarlierMessages.
728
+ */
729
+ public loadOlderMessages = this.loadEarlierMessages;
730
+
731
+ /**
732
+ * Alias of getAllChats.
733
+ */
734
+ public listChats = this.getAllChats;
735
+
736
+ /**
737
+ * Alias of getAllChatIds.
738
+ */
739
+ public listChatIds = this.getAllChatIds;
740
+
741
+ /**
742
+ * Alias of getChat.
743
+ */
744
+ public getChatById = this.getChat;
745
+
746
+ /**
747
+ * Alias of getAllContacts.
748
+ */
749
+ public listContacts = this.getAllContacts;
750
+
751
+ /**
752
+ * @deprecated Use blockContact instead.
753
+ * Deprecated alias of blockContact.
754
+ */
755
+ public contactBlock = this.blockContact;
756
+
757
+ /**
758
+ * @deprecated Use unblockContact instead.
759
+ * Deprecated alias of unblockContact.
760
+ */
761
+ public contactUnblock = this.unblockContact;
762
+
763
+ /**
764
+ * Alias of checkReadReceipts.
765
+ */
766
+ public getReadReceipts = this.checkReadReceipts;
767
+
768
+ /**
769
+ * @deprecated Use getProfilePicture instead.
770
+ * Deprecated alias of getProfilePicture.
771
+ */
772
+ public getProfilePicFromServer = this.getProfilePicture;
773
+
774
+ /**
775
+ * Alias of getAllGroups.
776
+ */
777
+ public listGroups = this.getAllGroups;
778
+
779
+ /**
780
+ * Alias of getGroupMembersId.
781
+ */
782
+ public getGroupMemberIds = this.getGroupMembersId;
783
+
784
+ /**
785
+ * Alias of joinGroupViaLink.
786
+ */
787
+ public joinGroup = this.joinGroupViaLink;
788
+
789
+ /**
790
+ * Alias of addParticipant.
791
+ */
792
+ public addGroupParticipant = this.addParticipant;
793
+
794
+ /**
795
+ * Alias of removeParticipant.
796
+ */
797
+ public removeGroupParticipant = this.removeParticipant;
798
+
799
+ /**
800
+ * Alias of promoteParticipant.
801
+ */
802
+ public promoteGroupParticipant = this.promoteParticipant;
803
+
804
+ /**
805
+ * Alias of demoteParticipant.
806
+ */
807
+ public demoteGroupParticipant = this.demoteParticipant;
808
+
809
+ /**
810
+ * Alias of getAllCommunities.
811
+ */
812
+ public listCommunities = this.getAllCommunities;
813
+
814
+ /**
815
+ * Alias of getStories.
816
+ */
817
+ public getStatuses = this.getStories;
818
+
819
+ /**
820
+ * Alias of deleteAllStatus.
821
+ */
822
+ public deleteAllStatuses = this.deleteAllStatus;
823
+
824
+ /**
825
+ * Alias of getAllLabels.
826
+ */
827
+ public listLabels = this.getAllLabels;
828
+
829
+ /**
830
+ * @deprecated Use getBusinessProducts instead.
831
+ * Deprecated alias of getBusinessProducts.
832
+ */
833
+ public getBusinessProfilesProducts = this.getBusinessProducts;
834
+
835
+ /**
836
+ * Alias of getWAVersion.
837
+ */
838
+ public getWhatsAppVersion = this.getWAVersion;
839
+
840
+ /**
841
+ * @deprecated Use isPlugged instead.
842
+ * Deprecated alias of isPlugged.
843
+ */
844
+ public getIsPlugged = this.isPlugged;
845
+
846
+ /**
847
+ * @deprecated Use getUserAgent instead.
848
+ * Deprecated alias of getUserAgent.
849
+ */
850
+ public getGeneratedUserAgent = this.getUserAgent;
851
+
852
+ /**
853
+ * @deprecated Use getLoadedMessageCount instead.
854
+ * Deprecated alias of getLoadedMessageCount.
855
+ */
856
+ public getAmountOfLoadedMessages = this.getLoadedMessageCount;
857
+
858
+ /**
859
+ * Alias of getSnapshot.
860
+ */
861
+ public takeScreenshot = this.getSnapshot;
862
+
863
+ /**
864
+ * Alias of setMyName.
865
+ */
866
+ public setDisplayName = this.setMyName;
867
+
868
+ /**
869
+ * Alias of setMyStatus.
870
+ */
871
+ public setStatusText = this.setMyStatus;
872
+
873
+ /**
874
+ * @deprecated Use setProfilePicture instead.
875
+ * Deprecated alias of setProfilePicture.
876
+ */
877
+ public setProfilePic = this.setProfilePicture;
878
+ }