@open-wa/schema 5.0.0-alpha.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.
- package/CHANGELOG.md +23 -0
- package/LICENSE.md +67 -0
- package/README.md +19 -0
- package/client_migration_doc.md +467 -0
- package/codecs_and_params_plan.md +936 -0
- package/migration_plan_doc.md +223 -0
- package/package.json +90 -0
- package/scripts/gen-client-implementation.ts +129 -0
- package/scripts/gen-client-reference-docs.ts +621 -0
- package/scripts/gen-openapi.ts +96 -0
- package/scripts/gen-types.ts +43 -0
- package/scripts/verify-v5-pipeline.ts +85 -0
- package/src/__tests__/generators.contract.test.ts +181 -0
- package/src/__tests__/registry.contract.test.ts +81 -0
- package/src/client-config.ts +30 -0
- package/src/codecs.test.ts +41 -0
- package/src/codecs.ts +191 -0
- package/src/common-types.ts +280 -0
- package/src/config.ts +47 -0
- package/src/enums.ts +63 -0
- package/src/events/groups.ts +33 -0
- package/src/events/index.ts +4 -0
- package/src/events/messaging.ts +72 -0
- package/src/events/registry.ts +114 -0
- package/src/events/state.ts +59 -0
- package/src/generated/AliasMap.ts +214 -0
- package/src/generated/BaseClient.ts +868 -0
- package/src/generated/BaseNamespacedClient.ts +212 -0
- package/src/generated/index.ts +5 -0
- package/src/generated/openapi.json +7799 -0
- package/src/generated/types.ts +377 -0
- package/src/http-manifest.ts +97 -0
- package/src/implementor.test.ts +88 -0
- package/src/implementor.ts +75 -0
- package/src/index.ts +43 -0
- package/src/methods/business.ts +51 -0
- package/src/methods/chats.ts +263 -0
- package/src/methods/communities.ts +119 -0
- package/src/methods/contacts.ts +158 -0
- package/src/methods/groups.ts +376 -0
- package/src/methods/index.ts +33 -0
- package/src/methods/labels.ts +86 -0
- package/src/methods/media.ts +36 -0
- package/src/methods/messaging.ts +828 -0
- package/src/methods/session.ts +261 -0
- package/src/methods/status.ts +120 -0
- package/src/open-wa-utils.d.ts +4 -0
- package/src/parameters.ts +237 -0
- package/src/registry.test.ts +30 -0
- package/src/registry.ts +601 -0
- package/tsconfig.generated.json +11 -0
- package/tsconfig.json +15 -0
- package/tsdown.config.ts +16 -0
- package/vitest.config.ts +10 -0
|
@@ -0,0 +1,868 @@
|
|
|
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
|
+
* Alias of sendPtt.
|
|
671
|
+
*/
|
|
672
|
+
public sendVoiceNote = this.sendPtt;
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Alias of sendMultipleContacts.
|
|
676
|
+
*/
|
|
677
|
+
public sendContacts = this.sendMultipleContacts;
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* Alias of sendListMessage.
|
|
681
|
+
*/
|
|
682
|
+
public sendList = this.sendListMessage;
|
|
683
|
+
|
|
684
|
+
/**
|
|
685
|
+
* @deprecated Use sendYouTubeLink instead.
|
|
686
|
+
* Deprecated alias of sendYouTubeLink.
|
|
687
|
+
*/
|
|
688
|
+
public sendYoutubeLink = this.sendYouTubeLink;
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* Alias of sendLinkWithAutoPreview.
|
|
692
|
+
*/
|
|
693
|
+
public sendLink = this.sendLinkWithAutoPreview;
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* Alias of sendMessageWithThumb.
|
|
697
|
+
*/
|
|
698
|
+
public sendLinkWithThumbnail = this.sendMessageWithThumb;
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* Alias of getMessageById.
|
|
702
|
+
*/
|
|
703
|
+
public getMessage = this.getMessageById;
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* Alias of getAllMessages.
|
|
707
|
+
*/
|
|
708
|
+
public listMessages = this.getAllMessages;
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* @deprecated Use getMessagesForLLM instead.
|
|
712
|
+
* Deprecated alias of getMessagesForLLM.
|
|
713
|
+
*/
|
|
714
|
+
public getGptArray = this.getMessagesForLLM;
|
|
715
|
+
|
|
716
|
+
/**
|
|
717
|
+
* Alias of loadEarlierMessages.
|
|
718
|
+
*/
|
|
719
|
+
public loadOlderMessages = this.loadEarlierMessages;
|
|
720
|
+
|
|
721
|
+
/**
|
|
722
|
+
* Alias of getAllChats.
|
|
723
|
+
*/
|
|
724
|
+
public listChats = this.getAllChats;
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* Alias of getAllChatIds.
|
|
728
|
+
*/
|
|
729
|
+
public listChatIds = this.getAllChatIds;
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* Alias of getChat.
|
|
733
|
+
*/
|
|
734
|
+
public getChatById = this.getChat;
|
|
735
|
+
|
|
736
|
+
/**
|
|
737
|
+
* Alias of getAllContacts.
|
|
738
|
+
*/
|
|
739
|
+
public listContacts = this.getAllContacts;
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* @deprecated Use blockContact instead.
|
|
743
|
+
* Deprecated alias of blockContact.
|
|
744
|
+
*/
|
|
745
|
+
public contactBlock = this.blockContact;
|
|
746
|
+
|
|
747
|
+
/**
|
|
748
|
+
* @deprecated Use unblockContact instead.
|
|
749
|
+
* Deprecated alias of unblockContact.
|
|
750
|
+
*/
|
|
751
|
+
public contactUnblock = this.unblockContact;
|
|
752
|
+
|
|
753
|
+
/**
|
|
754
|
+
* Alias of checkReadReceipts.
|
|
755
|
+
*/
|
|
756
|
+
public getReadReceipts = this.checkReadReceipts;
|
|
757
|
+
|
|
758
|
+
/**
|
|
759
|
+
* @deprecated Use getProfilePicture instead.
|
|
760
|
+
* Deprecated alias of getProfilePicture.
|
|
761
|
+
*/
|
|
762
|
+
public getProfilePicFromServer = this.getProfilePicture;
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* Alias of getAllGroups.
|
|
766
|
+
*/
|
|
767
|
+
public listGroups = this.getAllGroups;
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* Alias of getGroupMembersId.
|
|
771
|
+
*/
|
|
772
|
+
public getGroupMemberIds = this.getGroupMembersId;
|
|
773
|
+
|
|
774
|
+
/**
|
|
775
|
+
* Alias of joinGroupViaLink.
|
|
776
|
+
*/
|
|
777
|
+
public joinGroup = this.joinGroupViaLink;
|
|
778
|
+
|
|
779
|
+
/**
|
|
780
|
+
* Alias of addParticipant.
|
|
781
|
+
*/
|
|
782
|
+
public addGroupParticipant = this.addParticipant;
|
|
783
|
+
|
|
784
|
+
/**
|
|
785
|
+
* Alias of removeParticipant.
|
|
786
|
+
*/
|
|
787
|
+
public removeGroupParticipant = this.removeParticipant;
|
|
788
|
+
|
|
789
|
+
/**
|
|
790
|
+
* Alias of promoteParticipant.
|
|
791
|
+
*/
|
|
792
|
+
public promoteGroupParticipant = this.promoteParticipant;
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* Alias of demoteParticipant.
|
|
796
|
+
*/
|
|
797
|
+
public demoteGroupParticipant = this.demoteParticipant;
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* Alias of getAllCommunities.
|
|
801
|
+
*/
|
|
802
|
+
public listCommunities = this.getAllCommunities;
|
|
803
|
+
|
|
804
|
+
/**
|
|
805
|
+
* Alias of getStories.
|
|
806
|
+
*/
|
|
807
|
+
public getStatuses = this.getStories;
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* Alias of deleteAllStatus.
|
|
811
|
+
*/
|
|
812
|
+
public deleteAllStatuses = this.deleteAllStatus;
|
|
813
|
+
|
|
814
|
+
/**
|
|
815
|
+
* Alias of getAllLabels.
|
|
816
|
+
*/
|
|
817
|
+
public listLabels = this.getAllLabels;
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* @deprecated Use getBusinessProducts instead.
|
|
821
|
+
* Deprecated alias of getBusinessProducts.
|
|
822
|
+
*/
|
|
823
|
+
public getBusinessProfilesProducts = this.getBusinessProducts;
|
|
824
|
+
|
|
825
|
+
/**
|
|
826
|
+
* Alias of getWAVersion.
|
|
827
|
+
*/
|
|
828
|
+
public getWhatsAppVersion = this.getWAVersion;
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* @deprecated Use isPlugged instead.
|
|
832
|
+
* Deprecated alias of isPlugged.
|
|
833
|
+
*/
|
|
834
|
+
public getIsPlugged = this.isPlugged;
|
|
835
|
+
|
|
836
|
+
/**
|
|
837
|
+
* @deprecated Use getUserAgent instead.
|
|
838
|
+
* Deprecated alias of getUserAgent.
|
|
839
|
+
*/
|
|
840
|
+
public getGeneratedUserAgent = this.getUserAgent;
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* @deprecated Use getLoadedMessageCount instead.
|
|
844
|
+
* Deprecated alias of getLoadedMessageCount.
|
|
845
|
+
*/
|
|
846
|
+
public getAmountOfLoadedMessages = this.getLoadedMessageCount;
|
|
847
|
+
|
|
848
|
+
/**
|
|
849
|
+
* Alias of getSnapshot.
|
|
850
|
+
*/
|
|
851
|
+
public takeScreenshot = this.getSnapshot;
|
|
852
|
+
|
|
853
|
+
/**
|
|
854
|
+
* Alias of setMyName.
|
|
855
|
+
*/
|
|
856
|
+
public setDisplayName = this.setMyName;
|
|
857
|
+
|
|
858
|
+
/**
|
|
859
|
+
* Alias of setMyStatus.
|
|
860
|
+
*/
|
|
861
|
+
public setStatusText = this.setMyStatus;
|
|
862
|
+
|
|
863
|
+
/**
|
|
864
|
+
* @deprecated Use setProfilePicture instead.
|
|
865
|
+
* Deprecated alias of setProfilePicture.
|
|
866
|
+
*/
|
|
867
|
+
public setProfilePic = this.setProfilePicture;
|
|
868
|
+
}
|