@fer2809fl/baileys 7.0.0 → 7.0.2

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 (273) hide show
  1. package/README.md +259 -595
  2. package/WAProto/WAProto.proto +916 -360
  3. package/WAProto/fix-imports.js +18 -22
  4. package/WAProto/index.d.ts +15471 -8638
  5. package/WAProto/index.js +80576 -45941
  6. package/lib/Defaults/index.d.ts +14 -18
  7. package/lib/Defaults/index.d.ts.map +1 -1
  8. package/lib/Defaults/index.js +110 -115
  9. package/lib/Defaults/index.js.map +1 -1
  10. package/lib/Signal/Group/group_cipher.js.map +1 -1
  11. package/lib/Signal/Group/keyhelper.d.ts.map +1 -1
  12. package/lib/Signal/Group/keyhelper.js.map +1 -1
  13. package/lib/Signal/Group/sender-chain-key.js.map +1 -1
  14. package/lib/Signal/Group/sender-key-message.js.map +1 -1
  15. package/lib/Signal/Group/sender-message-key.js.map +1 -1
  16. package/lib/Signal/libsignal.d.ts.map +1 -1
  17. package/lib/Signal/libsignal.js +17 -45
  18. package/lib/Signal/libsignal.js.map +1 -1
  19. package/lib/Signal/lid-mapping.d.ts +0 -4
  20. package/lib/Signal/lid-mapping.d.ts.map +1 -1
  21. package/lib/Signal/lid-mapping.js +0 -6
  22. package/lib/Signal/lid-mapping.js.map +1 -1
  23. package/lib/Socket/business.d.ts +532 -280
  24. package/lib/Socket/business.d.ts.map +1 -1
  25. package/lib/Socket/business.js +401 -358
  26. package/lib/Socket/chats.d.ts +2 -22
  27. package/lib/Socket/chats.d.ts.map +1 -1
  28. package/lib/Socket/chats.js +43 -314
  29. package/lib/Socket/chats.js.map +1 -1
  30. package/lib/Socket/communities.d.ts +641 -336
  31. package/lib/Socket/communities.d.ts.map +1 -1
  32. package/lib/Socket/communities.js +3 -6
  33. package/lib/Socket/communities.js.map +1 -1
  34. package/lib/Socket/dugong.d.ts +130 -0
  35. package/lib/Socket/dugong.d.ts.map +1 -0
  36. package/lib/Socket/dugong.js +772 -0
  37. package/lib/Socket/dugong.js.map +1 -0
  38. package/lib/Socket/groups.d.ts +2 -23
  39. package/lib/Socket/groups.d.ts.map +1 -1
  40. package/lib/Socket/groups.js +8 -171
  41. package/lib/Socket/groups.js.map +1 -1
  42. package/lib/Socket/index.d.ts +631 -322
  43. package/lib/Socket/index.d.ts.map +1 -1
  44. package/lib/Socket/index.js +12 -9
  45. package/lib/Socket/index.js.map +1 -1
  46. package/lib/Socket/messages-recv.d.ts +52 -84
  47. package/lib/Socket/messages-recv.d.ts.map +1 -1
  48. package/lib/Socket/messages-recv.js +185 -686
  49. package/lib/Socket/messages-recv.js.map +1 -1
  50. package/lib/Socket/messages-send.d.ts +643 -262
  51. package/lib/Socket/messages-send.d.ts.map +1 -1
  52. package/lib/Socket/messages-send.js +1559 -1359
  53. package/lib/Socket/messages-send.js.map +1 -1
  54. package/lib/Socket/mex.d.ts +0 -1
  55. package/lib/Socket/mex.d.ts.map +1 -1
  56. package/lib/Socket/mex.js +8 -22
  57. package/lib/Socket/mex.js.map +1 -1
  58. package/lib/Socket/native-buttons.js +231 -0
  59. package/lib/Socket/newsletter.d.ts +27 -42
  60. package/lib/Socket/newsletter.d.ts.map +1 -1
  61. package/lib/Socket/newsletter.js +439 -402
  62. package/lib/Socket/newsletter.js.map +1 -1
  63. package/lib/Socket/socket.d.ts +2 -6
  64. package/lib/Socket/socket.d.ts.map +1 -1
  65. package/lib/Socket/socket.js +26 -62
  66. package/lib/Socket/socket.js.map +1 -1
  67. package/lib/Types/Auth.d.ts +0 -1
  68. package/lib/Types/Auth.d.ts.map +1 -1
  69. package/lib/Types/Bussines.d.ts +34 -22
  70. package/lib/Types/Call.d.ts +1 -1
  71. package/lib/Types/Call.d.ts.map +1 -1
  72. package/lib/Types/Chat.d.ts +0 -1
  73. package/lib/Types/Chat.d.ts.map +1 -1
  74. package/lib/Types/Contact.d.ts +0 -2
  75. package/lib/Types/Contact.d.ts.map +1 -1
  76. package/lib/Types/Events.d.ts +1 -20
  77. package/lib/Types/Events.d.ts.map +1 -1
  78. package/lib/Types/GroupMetadata.d.ts +1 -4
  79. package/lib/Types/GroupMetadata.d.ts.map +1 -1
  80. package/lib/Types/Message.d.ts +348 -354
  81. package/lib/Types/Message.d.ts.map +1 -1
  82. package/lib/Types/Message.js +0 -4
  83. package/lib/Types/Message.js.map +1 -1
  84. package/lib/Types/{Mex.d.ts → Newsletter.d.ts} +7 -26
  85. package/lib/Types/Newsletter.d.ts.map +1 -0
  86. package/lib/Types/{Mex.js → Newsletter.js} +3 -11
  87. package/lib/Types/Newsletter.js.map +1 -0
  88. package/lib/Types/Signal.d.ts +1 -12
  89. package/lib/Types/Signal.d.ts.map +1 -1
  90. package/lib/Types/Socket.d.ts +148 -135
  91. package/lib/Types/Socket.d.ts.map +1 -1
  92. package/lib/Types/Socket.js.map +1 -1
  93. package/lib/Types/State.d.ts +0 -65
  94. package/lib/Types/State.d.ts.map +1 -1
  95. package/lib/Types/State.js +0 -43
  96. package/lib/Types/State.js.map +1 -1
  97. package/lib/Types/index.d.ts +52 -52
  98. package/lib/Types/index.d.ts.map +1 -1
  99. package/lib/Types/index.js +30 -23
  100. package/lib/Types/index.js.map +1 -1
  101. package/lib/Utils/auth-utils.d.ts +0 -5
  102. package/lib/Utils/auth-utils.d.ts.map +1 -1
  103. package/lib/Utils/auth-utils.js +0 -12
  104. package/lib/Utils/auth-utils.js.map +1 -1
  105. package/lib/Utils/browser-utils.d.ts.map +1 -1
  106. package/lib/Utils/browser-utils.js +0 -1
  107. package/lib/Utils/browser-utils.js.map +1 -1
  108. package/lib/Utils/chat-utils.d.ts +4 -34
  109. package/lib/Utils/chat-utils.d.ts.map +1 -1
  110. package/lib/Utils/chat-utils.js +20 -80
  111. package/lib/Utils/chat-utils.js.map +1 -1
  112. package/lib/Utils/crypto.d.ts +12 -12
  113. package/lib/Utils/crypto.d.ts.map +1 -1
  114. package/lib/Utils/crypto.js.map +1 -1
  115. package/lib/Utils/decode-wa-message.d.ts +0 -18
  116. package/lib/Utils/decode-wa-message.d.ts.map +1 -1
  117. package/lib/Utils/decode-wa-message.js +0 -34
  118. package/lib/Utils/decode-wa-message.js.map +1 -1
  119. package/lib/Utils/event-buffer.d.ts +0 -2
  120. package/lib/Utils/event-buffer.d.ts.map +1 -1
  121. package/lib/Utils/event-buffer.js +1 -49
  122. package/lib/Utils/event-buffer.js.map +1 -1
  123. package/lib/Utils/generics.d.ts +2 -3
  124. package/lib/Utils/generics.d.ts.map +1 -1
  125. package/lib/Utils/generics.js +1 -10
  126. package/lib/Utils/generics.js.map +1 -1
  127. package/lib/Utils/history.d.ts +0 -2
  128. package/lib/Utils/history.d.ts.map +1 -1
  129. package/lib/Utils/history.js +9 -12
  130. package/lib/Utils/history.js.map +1 -1
  131. package/lib/Utils/identity-change-handler.d.ts +0 -7
  132. package/lib/Utils/identity-change-handler.d.ts.map +1 -1
  133. package/lib/Utils/identity-change-handler.js +0 -1
  134. package/lib/Utils/identity-change-handler.js.map +1 -1
  135. package/lib/Utils/index.d.ts +23 -30
  136. package/lib/Utils/index.d.ts.map +1 -1
  137. package/lib/Utils/index.js +2 -9
  138. package/lib/Utils/index.js.map +1 -1
  139. package/lib/Utils/link-preview.js +2 -2
  140. package/lib/Utils/link-preview.js.map +1 -1
  141. package/lib/Utils/message-retry-manager.d.ts +0 -5
  142. package/lib/Utils/message-retry-manager.d.ts.map +1 -1
  143. package/lib/Utils/message-retry-manager.js +0 -40
  144. package/lib/Utils/message-retry-manager.js.map +1 -1
  145. package/lib/Utils/messages-media.d.ts +13 -45
  146. package/lib/Utils/messages-media.d.ts.map +1 -1
  147. package/lib/Utils/messages-media.js +98 -293
  148. package/lib/Utils/messages-media.js.map +1 -1
  149. package/lib/Utils/messages.d.ts +3 -16
  150. package/lib/Utils/messages.d.ts.map +1 -1
  151. package/lib/Utils/messages.js +1123 -1219
  152. package/lib/Utils/messages.js.map +1 -1
  153. package/lib/Utils/noise-handler.d.ts +1 -1
  154. package/lib/Utils/process-message.d.ts.map +1 -1
  155. package/lib/Utils/process-message.js +1 -103
  156. package/lib/Utils/process-message.js.map +1 -1
  157. package/lib/Utils/rich-messages.d.ts +277 -0
  158. package/lib/Utils/rich-messages.d.ts.map +1 -0
  159. package/lib/Utils/rich-messages.js +1144 -0
  160. package/lib/Utils/rich-messages.js.map +1 -0
  161. package/lib/Utils/signal.d.ts +0 -13
  162. package/lib/Utils/signal.d.ts.map +1 -1
  163. package/lib/Utils/signal.js +0 -42
  164. package/lib/Utils/signal.js.map +1 -1
  165. package/lib/Utils/sticker-pack.d.ts +10 -0
  166. package/lib/Utils/sticker-pack.js +111 -0
  167. package/lib/Utils/sync-action-utils.d.ts.map +1 -1
  168. package/lib/Utils/sync-action-utils.js +0 -1
  169. package/lib/Utils/sync-action-utils.js.map +1 -1
  170. package/lib/Utils/tc-token-utils.d.ts +1 -26
  171. package/lib/Utils/tc-token-utils.d.ts.map +1 -1
  172. package/lib/Utils/tc-token-utils.js +5 -151
  173. package/lib/Utils/tc-token-utils.js.map +1 -1
  174. package/lib/Utils/validate-connection.d.ts +0 -1
  175. package/lib/Utils/validate-connection.d.ts.map +1 -1
  176. package/lib/Utils/validate-connection.js +3 -13
  177. package/lib/Utils/validate-connection.js.map +1 -1
  178. package/lib/WABinary/decode.d.ts +1 -1
  179. package/lib/WABinary/decode.d.ts.map +1 -1
  180. package/lib/WABinary/generic-utils.d.ts +3 -1
  181. package/lib/WABinary/generic-utils.d.ts.map +1 -1
  182. package/lib/WABinary/generic-utils.js +78 -0
  183. package/lib/WABinary/generic-utils.js.map +1 -1
  184. package/lib/WABinary/jid-utils.d.ts +0 -11
  185. package/lib/WABinary/jid-utils.d.ts.map +1 -1
  186. package/lib/WABinary/jid-utils.js +0 -33
  187. package/lib/WABinary/jid-utils.js.map +1 -1
  188. package/lib/WAM/encode.d.ts +1 -1
  189. package/lib/WAM/encode.d.ts.map +1 -1
  190. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts.map +1 -1
  191. package/lib/WAUSync/Protocols/USyncContactProtocol.js +3 -26
  192. package/lib/WAUSync/Protocols/USyncContactProtocol.js.map +1 -1
  193. package/lib/WAUSync/Protocols/index.d.ts +0 -1
  194. package/lib/WAUSync/Protocols/index.d.ts.map +1 -1
  195. package/lib/WAUSync/Protocols/index.js +0 -1
  196. package/lib/WAUSync/Protocols/index.js.map +1 -1
  197. package/lib/WAUSync/USyncQuery.d.ts +0 -1
  198. package/lib/WAUSync/USyncQuery.d.ts.map +1 -1
  199. package/lib/WAUSync/USyncQuery.js +2 -6
  200. package/lib/WAUSync/USyncQuery.js.map +1 -1
  201. package/lib/WAUSync/USyncUser.d.ts +0 -4
  202. package/lib/WAUSync/USyncUser.d.ts.map +1 -1
  203. package/lib/WAUSync/USyncUser.js +0 -8
  204. package/lib/WAUSync/USyncUser.js.map +1 -1
  205. package/lib/index.d.ts +1 -1
  206. package/lib/index.d.ts.map +1 -1
  207. package/lib/index.js +1 -4
  208. package/lib/index.js.map +1 -1
  209. package/package.json +30 -34
  210. package/LICENSE +0 -21
  211. package/engine-requirements.js +0 -10
  212. package/lib/Socket/smgss.d.ts +0 -119
  213. package/lib/Socket/smgss.d.ts.map +0 -1
  214. package/lib/Socket/smgss.js +0 -453
  215. package/lib/Socket/smgss.js.map +0 -1
  216. package/lib/Store/index.d.ts +0 -4
  217. package/lib/Store/index.d.ts.map +0 -1
  218. package/lib/Store/index.js +0 -4
  219. package/lib/Store/index.js.map +0 -1
  220. package/lib/Store/make-in-memory-store.d.ts +0 -132
  221. package/lib/Store/make-in-memory-store.d.ts.map +0 -1
  222. package/lib/Store/make-in-memory-store.js +0 -450
  223. package/lib/Store/make-in-memory-store.js.map +0 -1
  224. package/lib/Store/make-ordered-dictionary.d.ts +0 -14
  225. package/lib/Store/make-ordered-dictionary.d.ts.map +0 -1
  226. package/lib/Store/make-ordered-dictionary.js +0 -80
  227. package/lib/Store/make-ordered-dictionary.js.map +0 -1
  228. package/lib/Store/object-repository.d.ts +0 -13
  229. package/lib/Store/object-repository.d.ts.map +0 -1
  230. package/lib/Store/object-repository.js +0 -24
  231. package/lib/Store/object-repository.js.map +0 -1
  232. package/lib/Types/Mex.d.ts.map +0 -1
  233. package/lib/Types/Mex.js.map +0 -1
  234. package/lib/Utils/button-handler.d.ts +0 -28
  235. package/lib/Utils/button-handler.d.ts.map +0 -1
  236. package/lib/Utils/button-handler.js +0 -140
  237. package/lib/Utils/button-handler.js.map +0 -1
  238. package/lib/Utils/companion-reg-client-utils.d.ts +0 -17
  239. package/lib/Utils/companion-reg-client-utils.d.ts.map +0 -1
  240. package/lib/Utils/companion-reg-client-utils.js +0 -35
  241. package/lib/Utils/companion-reg-client-utils.js.map +0 -1
  242. package/lib/Utils/interactive.d.ts +0 -60
  243. package/lib/Utils/interactive.d.ts.map +0 -1
  244. package/lib/Utils/interactive.js +0 -224
  245. package/lib/Utils/interactive.js.map +0 -1
  246. package/lib/Utils/message-composer.d.ts +0 -93
  247. package/lib/Utils/message-composer.d.ts.map +0 -1
  248. package/lib/Utils/message-composer.js +0 -311
  249. package/lib/Utils/message-composer.js.map +0 -1
  250. package/lib/Utils/messages-newsletter.d.ts +0 -74
  251. package/lib/Utils/messages-newsletter.d.ts.map +0 -1
  252. package/lib/Utils/messages-newsletter.js +0 -128
  253. package/lib/Utils/messages-newsletter.js.map +0 -1
  254. package/lib/Utils/shortcake-crypto.d.ts +0 -36
  255. package/lib/Utils/shortcake-crypto.d.ts.map +0 -1
  256. package/lib/Utils/shortcake-crypto.js +0 -71
  257. package/lib/Utils/shortcake-crypto.js.map +0 -1
  258. package/lib/Utils/shortcake.d.ts +0 -36
  259. package/lib/Utils/shortcake.d.ts.map +0 -1
  260. package/lib/Utils/shortcake.js +0 -162
  261. package/lib/Utils/shortcake.js.map +0 -1
  262. package/lib/Utils/use-single-file-auth-state.d.ts +0 -6
  263. package/lib/Utils/use-single-file-auth-state.d.ts.map +0 -1
  264. package/lib/Utils/use-single-file-auth-state.js +0 -111
  265. package/lib/Utils/use-single-file-auth-state.js.map +0 -1
  266. package/lib/Utils/use-sqlite-auth-state.d.ts +0 -14
  267. package/lib/Utils/use-sqlite-auth-state.d.ts.map +0 -1
  268. package/lib/Utils/use-sqlite-auth-state.js +0 -107
  269. package/lib/Utils/use-sqlite-auth-state.js.map +0 -1
  270. package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +0 -10
  271. package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts.map +0 -1
  272. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +0 -25
  273. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js.map +0 -1
@@ -1,340 +1,645 @@
1
- import { proto } from '../../WAProto/index.js';
2
- import { type GroupMetadata, type ParticipantAction, type SocketConfig, type WAMessageKey } from '../Types/index.js';
3
- import { type BinaryNode } from '../WABinary/index.js';
1
+ import { proto } from "../../WAProto/index.js";
2
+ import {
3
+ type GroupMetadata,
4
+ type ParticipantAction,
5
+ type SocketConfig,
6
+ type WAMessageKey,
7
+ } from "../Types/index.js";
8
+ import { type BinaryNode } from "../WABinary/index.js";
4
9
  export declare const makeCommunitiesSocket: (config: SocketConfig) => {
5
- communityMetadata: (jid: string) => Promise<GroupMetadata>;
6
- communityCreate: (subject: string, body: string) => Promise<GroupMetadata | null>;
7
- communityCreateGroup: (subject: string, participants: string[], parentCommunityJid: string) => Promise<GroupMetadata | null>;
8
- communityLeave: (id: string) => Promise<void>;
9
- communityUpdateSubject: (jid: string, subject: string) => Promise<void>;
10
- communityLinkGroup: (groupJid: string, parentCommunityJid: string) => Promise<void>;
11
- communityUnlinkGroup: (groupJid: string, parentCommunityJid: string) => Promise<void>;
12
- communityFetchLinkedGroups: (jid: string) => Promise<{
13
- communityJid: string;
14
- isCommunity: boolean;
15
- linkedGroups: {
16
- id: string | undefined;
17
- subject: string;
18
- creation: number | undefined;
19
- owner: string | undefined;
20
- size: number | undefined;
21
- }[];
22
- }>;
23
- communityRequestParticipantsList: (jid: string) => Promise<{
24
- [key: string]: string;
25
- }[]>;
26
- communityRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
27
- status: string;
28
- jid: string | undefined;
29
- }[]>;
30
- communityParticipantsUpdate: (jid: string, participants: string[], action: ParticipantAction) => Promise<{
31
- status: string;
32
- jid: string | undefined;
33
- content: BinaryNode;
34
- }[]>;
35
- communityUpdateDescription: (jid: string, description?: string) => Promise<void>;
36
- communityInviteCode: (jid: string) => Promise<string | undefined>;
37
- communityRevokeInvite: (jid: string) => Promise<string | undefined>;
38
- communityAcceptInvite: (code: string) => Promise<string | undefined>;
39
- /**
40
- * revoke a v4 invite for someone
41
- * @param communityJid community jid
42
- * @param invitedJid jid of person you invited
43
- * @returns true if successful
44
- */
45
- communityRevokeInviteV4: (communityJid: string, invitedJid: string) => Promise<boolean>;
46
- /**
47
- * accept a CommunityInviteMessage
48
- * @param key the key of the invite message, or optionally only provide the jid of the person who sent the invite
49
- * @param inviteMessage the message to accept
50
- */
51
- communityAcceptInviteV4: (key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<any>;
52
- communityGetInviteInfo: (code: string) => Promise<GroupMetadata>;
53
- communityToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
54
- communitySettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
55
- communityMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
56
- communityJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
57
- communityFetchAllParticipating: () => Promise<{
58
- [_: string]: GroupMetadata;
59
- }>;
60
- logger: import("../Utils/logger.js").ILogger;
61
- getOrderDetails: (orderId: string, tokenBase64: string) => Promise<import("../Types/index.js").OrderDetails>;
62
- getCatalog: ({ jid, limit, cursor }: import("../Types/index.js").GetCatalogOptions) => Promise<{
63
- products: import("../Types/index.js").Product[];
64
- nextPageCursor: string | undefined;
65
- }>;
66
- getCollections: (jid?: string, limit?: number) => Promise<{
67
- collections: import("../Types/index.js").CatalogCollection[];
68
- }>;
69
- productCreate: (create: import("../Types/index.js").ProductCreate) => Promise<import("../Types/index.js").Product>;
70
- productDelete: (productIds: string[]) => Promise<{
71
- deleted: number;
72
- }>;
73
- productUpdate: (productId: string, update: import("../Types/index.js").ProductUpdate) => Promise<import("../Types/index.js").Product>;
74
- updateBussinesProfile: (args: import("../Types/Bussines.js").UpdateBussinesProfileProps) => Promise<any>;
75
- updateCoverPhoto: (photo: import("../Types/index.js").WAMediaUpload) => Promise<number>;
76
- removeCoverPhoto: (id: string) => Promise<any>;
77
- sendMessageAck: (node: BinaryNode, errorCode?: number) => Promise<void>;
78
- sendRetryRequest: (node: BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
79
- rejectCall: (callId: string, callFrom: string) => Promise<void>;
80
- fetchMessageHistory: (count: number, oldestMsgKey: WAMessageKey, oldestMsgTimestamp: number | import("long").default) => Promise<string>;
81
- requestPlaceholderResend: (messageKey: WAMessageKey, msgData?: Partial<import("../Types/index.js").WAMessage>) => Promise<string | undefined>;
82
- messageRetryManager: import("../Utils/index.js").MessageRetryManager | null;
83
- userDevicesCache: import("../Types/index.js").PossiblyExtendedCacheStore | import("@cacheable/node-cache").NodeCache<import("../WABinary/index.js").JidWithDevice[]>;
84
- devicesMutex: {
85
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
86
- };
87
- issuePrivacyTokens: (jids: string[], timestamp?: number) => Promise<any>;
88
- assertSessions: (jids: string[], force?: boolean) => Promise<boolean>;
89
- relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: import("../Types/index.js").MessageRelayOptions) => Promise<string>;
90
- sendStatusWhatsApp: (content: import("../Types/index.js").AnyMessageContent, jids?: string[]) => Promise<import("../Types/index.js").WAMessage>;
91
- sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../Types/index.js").MessageReceiptType) => Promise<void>;
92
- sendReceipts: (keys: WAMessageKey[], type: import("../Types/index.js").MessageReceiptType) => Promise<void>;
93
- readMessages: (keys: WAMessageKey[]) => Promise<void>;
94
- refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types/index.js").MediaConnInfo>;
95
- resize: (buf: Buffer, width: number, height: number, opts?: {
96
- quality?: number;
97
- }) => Promise<Buffer>;
98
- convert: (buf: Buffer, opts: {
99
- to: string;
100
- }) => Promise<Buffer>;
101
- toSticker: (buf: Buffer, opts?: {
102
- quality?: number;
103
- }) => Promise<Buffer>;
104
- compress: (buf: Buffer, opts?: {
105
- quality?: number;
106
- }) => Promise<Buffer>;
107
- metadata: (buf: Buffer) => Promise<import("../Utils/index.js").MediaMetadataResult>;
108
- getMediaHost: () => string;
109
- waUploadToServer: import("../Types/index.js").WAMediaUploadFunction;
110
- fetchPrivacySettings: (force?: boolean) => Promise<{
111
- [_: string]: string;
112
- }>;
113
- sendPeerDataOperationMessage: (pdoMessage: proto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
114
- createParticipantNodes: (recipientJids: string[], message: proto.IMessage, extraAttrs?: BinaryNode["attrs"], dsmMessage?: proto.IMessage) => Promise<{
115
- nodes: BinaryNode[];
116
- shouldIncludeDeviceIdentity: boolean;
117
- }>;
118
- getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(import("../WABinary/index.js").JidWithDevice & {
119
- jid: string;
120
- })[]>;
121
- updateMemberLabel: (jid: string, memberLabel: string) => Promise<string>;
122
- updateMediaMessage: (message: import("../Types/index.js").WAMessage) => Promise<import("../Types/index.js").WAMessage>;
123
- captureUnifiedResponse: (msg?: proto.IMessage | null) => import("../Utils/index.js").CapturedUnifiedResponse | null;
124
- sendTable: (jid: string, title: string, headers: string[], rows: unknown[][], quoted?: import("../Types/index.js").WAMessage, options?: import("../Utils/index.js").RichContentOptions) => Promise<{
125
- message: proto.IMessage;
126
- messageId: string;
127
- }>;
128
- sendList: (jid: string, title: string, items: unknown[], quoted?: import("../Types/index.js").WAMessage, options?: import("../Utils/index.js").RichContentOptions) => Promise<{
129
- message: proto.IMessage;
130
- messageId: string;
131
- }>;
132
- sendCodeBlock: (jid: string, code: string, quoted?: import("../Types/index.js").WAMessage, options?: import("../Utils/index.js").RichContentOptions & {
133
- title?: string;
134
- language?: string;
135
- }) => Promise<{
136
- message: proto.IMessage;
137
- messageId: string;
138
- }>;
139
- sendLatex: (jid: string, quoted: import("../Types/index.js").WAMessage | undefined, options: import("../Utils/index.js").RichContentOptions & {
140
- text?: string;
141
- expressions: import("../Utils/index.js").LatexExpressionInput[];
142
- }) => Promise<{
143
- message: proto.IMessage;
144
- messageId: string;
145
- }>;
146
- sendUnifiedResponse: (jid: string, quoted: import("../Types/index.js").WAMessage | undefined, captured: import("../Utils/index.js").CapturedUnifiedResponse) => Promise<{
147
- message: proto.IMessage;
148
- messageId: string;
149
- }>;
150
- sendRichMessage: (jid: string, submessages: proto.IAIRichResponseSubMessage[], quoted?: import("../Types/index.js").WAMessage) => Promise<{
151
- message: proto.IMessage;
152
- messageId: string;
153
- }>;
154
- sendMessage: (jid: string, content: import("../Types/index.js").AnyMessageContent, options?: import("../Types/index.js").MiscMessageGenerationOptions) => Promise<any>;
155
- newsletterQuery: (jid: string, type: "get" | "set", content: any[]) => Promise<any>;
156
- newsletterCreate: (name: string, description?: string, picture?: import("../Types/index.js").WAMediaUpload) => Promise<import("../Types/index.js").NewsletterMetadata>;
157
- newsletterUpdate: (jid: string, updates: import("../Types/index.js").NewsletterUpdate) => Promise<unknown>;
158
- newsletterSubscribers: (jid: string) => Promise<{
159
- subscribers: number;
160
- }>;
161
- newsletterMetadata: (type: "invite" | "jid", key: string, viewRole?: string) => Promise<import("../Types/index.js").NewsletterMetadata | null>;
162
- newsletterFetchAllParticipating: (viewRole?: string) => Promise<Record<string, import("../Types/index.js").NewsletterMetadata>>;
163
- newsletterFollow: (jid: string) => Promise<void>;
164
- newsletterUnfollow: (jid: string) => Promise<void>;
165
- newsletterMute: (jid: string) => Promise<void>;
166
- newsletterUnmute: (jid: string) => Promise<void>;
167
- newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
168
- newsletterUpdateDescription: (jid: string, description: string) => Promise<unknown>;
169
- newsletterUpdatePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload) => Promise<unknown>;
170
- newsletterRemovePicture: (jid: string) => Promise<unknown>;
171
- newsletterReactionMode: (jid: string, mode: string) => Promise<unknown>;
172
- newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
173
- newsletterFetchMessages: {
174
- (type: "invite" | "jid", key: string, count: number, after?: number): Promise<any[]>;
175
- (jid: string, count: number, since?: number, after?: number): Promise<any[]>;
176
- };
177
- newsletterFetchUpdates: (jid: string, count: number, opts?: {
178
- since?: number;
179
- after?: number;
180
- decrypt?: boolean;
181
- }) => Promise<any[]>;
182
- subscribeNewsletterUpdates: (jid: string) => Promise<{
183
- duration: string;
184
- } | null>;
185
- newsletterAdminCount: (jid: string) => Promise<number>;
186
- newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
187
- newsletterDemote: (jid: string, userJid: string) => Promise<void>;
188
- newsletterDelete: (jid: string) => Promise<void>;
189
- newsletterAction: (jid: string, type: "follow" | "unfollow" | "mute" | "unmute") => Promise<void>;
190
- groupMetadata: (jid: string) => Promise<GroupMetadata>;
191
- groupCreate: (subject: string, participants: string[]) => Promise<GroupMetadata>;
192
- groupLeave: (id: string) => Promise<void>;
193
- groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
194
- groupRequestParticipantsList: (jid: string) => Promise<{
195
- [key: string]: string;
196
- }[]>;
197
- groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
198
- status: string;
199
- jid: string | undefined;
200
- }[]>;
201
- groupParticipantsUpdate: (jid: string, participants: string[], action: ParticipantAction) => Promise<{
202
- status: string;
203
- jid: string | undefined;
204
- content: BinaryNode;
205
- }[]>;
206
- groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
207
- groupInviteCode: (jid: string) => Promise<string | undefined>;
208
- groupRevokeInvite: (jid: string) => Promise<string | undefined>;
209
- groupAcceptInvite: (code: string) => Promise<string | undefined>;
210
- groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
211
- groupAcceptInviteV4: (key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<any>;
212
- groupGetInviteInfo: (code: string) => Promise<GroupMetadata>;
213
- groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
214
- groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
215
- groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
216
- groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
217
- groupFetchAllParticipating: () => Promise<{
218
- [_: string]: GroupMetadata;
219
- }>;
220
- getAdminStatus: (groupJid: string, senderJid?: string) => Promise<{
221
- isAdmin: boolean;
222
- isBotAdmin: boolean;
223
- }>;
224
- serverProps: {
225
- privacyTokenOn1to1: boolean;
226
- profilePicPrivacyToken: boolean;
227
- lidTrustedTokenIssueToLid: boolean;
228
- };
229
- createCallLink: (type: "audio" | "video", event?: {
230
- startTime: number;
231
- }, timeoutMs?: number) => Promise<string | undefined>;
232
- getBotListV2: () => Promise<import("../Types/index.js").BotListInfo[]>;
233
- messageMutex: {
234
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
235
- };
236
- receiptMutex: {
237
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
238
- };
239
- appStatePatchMutex: {
240
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
241
- };
242
- notificationMutex: {
243
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
244
- };
245
- upsertMessage: (msg: import("../Types/index.js").WAMessage, type: import("../Types/index.js").MessageUpsertType) => Promise<void>;
246
- appPatch: (patchCreate: import("../Types/index.js").WAPatchCreate) => Promise<void>;
247
- sendPresenceUpdate: (type: import("../Types/index.js").WAPresence, toJid?: string) => Promise<void>;
248
- presenceSubscribe: (toJid: string) => Promise<void>;
249
- profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
250
- fetchBlocklist: () => Promise<(string | undefined)[]>;
251
- fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
252
- fetchDisappearingDuration: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
253
- findUserId: (pnOrLid: string) => Promise<{
254
- phoneNumber: string;
255
- lid: string;
256
- }>;
257
- updateProfilePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload, dimensions?: {
258
- width: number;
259
- height: number;
260
- }, options?: {
261
- full?: boolean;
262
- }) => Promise<void>;
263
- removeProfilePicture: (jid: string) => Promise<void>;
264
- updateProfileStatus: (status: string) => Promise<void>;
265
- updateProfileName: (name: string) => Promise<void>;
266
- updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
267
- updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
268
- updateCallPrivacy: (value: import("../Types/index.js").WAPrivacyCallValue) => Promise<void>;
269
- updateMessagesPrivacy: (value: import("../Types/index.js").WAPrivacyMessagesValue) => Promise<void>;
270
- updateLastSeenPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
271
- updateOnlinePrivacy: (value: import("../Types/index.js").WAPrivacyOnlineValue) => Promise<void>;
272
- updateProfilePicturePrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
273
- updateStatusPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
274
- updateReadReceiptsPrivacy: (value: import("../Types/index.js").WAReadReceiptsValue) => Promise<void>;
275
- updateGroupsAddPrivacy: (value: import("../Types/index.js").WAPrivacyGroupAddValue) => Promise<void>;
276
- updateDefaultDisappearingMode: (duration: number) => Promise<void>;
277
- getBusinessProfile: (jid: string) => Promise<import("../Types/index.js").WABusinessProfile | void>;
278
- resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
279
- chatModify: (mod: import("../Types/index.js").ChatModification, jid: string) => Promise<void>;
280
- cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
281
- addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
282
- removeContact: (jid: string) => Promise<void>;
283
- placeholderResendCache: import("../Types/index.js").CacheStore;
284
- addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
285
- addChatLabel: (jid: string, labelId: string) => Promise<void>;
286
- removeChatLabel: (jid: string, labelId: string) => Promise<void>;
287
- addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
288
- removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
289
- star: (jid: string, messages: {
290
- id: string;
291
- fromMe?: boolean;
292
- }[], star: boolean) => Promise<void>;
293
- addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
294
- removeQuickReply: (timestamp: string) => Promise<void>;
295
- type: "md";
296
- ws: import("./Client/websocket.js").WebSocketClient;
297
- ev: import("../Types/index.js").BaileysEventEmitter & {
298
- process(handler: (events: Partial<import("../Types/index.js").BaileysEventMap>) => void | Promise<void>): () => void;
299
- buffer(): void;
300
- createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
301
- flush(): boolean;
302
- isBuffering(): boolean;
303
- destroy(): void;
304
- };
305
- authState: {
306
- creds: import("../Types/index.js").AuthenticationCreds;
307
- keys: import("../Types/index.js").SignalKeyStoreWithTransaction;
308
- };
309
- signalRepository: import("../Types/index.js").SignalRepositoryWithLIDStore;
310
- user: import("../Types/index.js").Contact | undefined;
311
- generateMessageTag: () => string;
312
- query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
313
- waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
314
- waitForSocketOpen: () => Promise<void>;
315
- sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
316
- sendNode: (frame: BinaryNode) => Promise<void>;
317
- logout: (msg?: string) => Promise<void>;
318
- end: (error: Error | undefined) => Promise<void>;
319
- registerSocketEndHandler: (handler: (error: Error | undefined) => void | Promise<void>) => void;
320
- onUnexpectedError: (err: Error | import("@hapi/boom").Boom, msg: string) => void;
321
- uploadPreKeys: (count?: number) => Promise<void>;
322
- uploadPreKeysToServerIfRequired: () => Promise<void>;
323
- digestKeyBundle: () => Promise<void>;
324
- rotateSignedPreKey: () => Promise<void>;
325
- requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
326
- updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
327
- sendUnifiedSession: () => Promise<void>;
328
- wamBuffer: import("../index.js").BinaryInfo;
329
- waitForConnectionUpdate: (check: (u: Partial<import("../Types/index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
330
- sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
331
- executeUSyncQuery: (usyncQuery: import("../index.js").USyncQuery) => Promise<import("../index.js").USyncQueryResult | undefined>;
332
- onWhatsApp: (...phoneNumber: string[]) => Promise<{
10
+ communityMetadata: (jid: string) => Promise<GroupMetadata>;
11
+ communityCreate: (
12
+ subject: string,
13
+ body: string,
14
+ ) => Promise<GroupMetadata | null>;
15
+ communityCreateGroup: (
16
+ subject: string,
17
+ participants: string[],
18
+ parentCommunityJid: string,
19
+ ) => Promise<GroupMetadata | null>;
20
+ communityLeave: (id: string) => Promise<void>;
21
+ communityUpdateSubject: (jid: string, subject: string) => Promise<void>;
22
+ communityLinkGroup: (
23
+ groupJid: string,
24
+ parentCommunityJid: string,
25
+ ) => Promise<void>;
26
+ communityUnlinkGroup: (
27
+ groupJid: string,
28
+ parentCommunityJid: string,
29
+ ) => Promise<void>;
30
+ communityFetchLinkedGroups: (jid: string) => Promise<{
31
+ communityJid: string;
32
+ isCommunity: boolean;
33
+ linkedGroups: {
34
+ id: string | undefined;
35
+ subject: string;
36
+ creation: number | undefined;
37
+ owner: string | undefined;
38
+ size: number | undefined;
39
+ }[];
40
+ }>;
41
+ communityRequestParticipantsList: (jid: string) => Promise<
42
+ {
43
+ [key: string]: string;
44
+ }[]
45
+ >;
46
+ communityRequestParticipantsUpdate: (
47
+ jid: string,
48
+ participants: string[],
49
+ action: "approve" | "reject",
50
+ ) => Promise<
51
+ {
52
+ status: string;
53
+ jid: string | undefined;
54
+ }[]
55
+ >;
56
+ communityParticipantsUpdate: (
57
+ jid: string,
58
+ participants: string[],
59
+ action: ParticipantAction,
60
+ ) => Promise<
61
+ {
62
+ status: string;
63
+ jid: string | undefined;
64
+ content: BinaryNode;
65
+ }[]
66
+ >;
67
+ communityUpdateDescription: (
68
+ jid: string,
69
+ description?: string,
70
+ ) => Promise<void>;
71
+ communityInviteCode: (jid: string) => Promise<string | undefined>;
72
+ communityRevokeInvite: (jid: string) => Promise<string | undefined>;
73
+ communityAcceptInvite: (code: string) => Promise<string | undefined>;
74
+ /**
75
+ * revoke a v4 invite for someone
76
+ * @param communityJid community jid
77
+ * @param invitedJid jid of person you invited
78
+ * @returns true if successful
79
+ */
80
+ communityRevokeInviteV4: (
81
+ communityJid: string,
82
+ invitedJid: string,
83
+ ) => Promise<boolean>;
84
+ /**
85
+ * accept a CommunityInviteMessage
86
+ * @param key the key of the invite message, or optionally only provide the jid of the person who sent the invite
87
+ * @param inviteMessage the message to accept
88
+ */
89
+ communityAcceptInviteV4: (
90
+ key: string | WAMessageKey,
91
+ inviteMessage: proto.Message.IGroupInviteMessage,
92
+ ) => Promise<any>;
93
+ communityGetInviteInfo: (code: string) => Promise<GroupMetadata>;
94
+ communityToggleEphemeral: (
95
+ jid: string,
96
+ ephemeralExpiration: number,
97
+ ) => Promise<void>;
98
+ communitySettingUpdate: (
99
+ jid: string,
100
+ setting: "announcement" | "not_announcement" | "locked" | "unlocked",
101
+ ) => Promise<void>;
102
+ communityMemberAddMode: (
103
+ jid: string,
104
+ mode: "admin_add" | "all_member_add",
105
+ ) => Promise<void>;
106
+ communityJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
107
+ communityFetchAllParticipating: () => Promise<{
108
+ [_: string]: GroupMetadata;
109
+ }>;
110
+ logger: import("../Utils/logger.js").ILogger;
111
+ getOrderDetails: (
112
+ orderId: string,
113
+ tokenBase64: string,
114
+ ) => Promise<import("../Types/index.js").OrderDetails>;
115
+ getCatalog: ({
116
+ jid,
117
+ limit,
118
+ cursor,
119
+ }: import("../Types/index.js").GetCatalogOptions) => Promise<{
120
+ products: import("../Types/index.js").Product[];
121
+ nextPageCursor: string | undefined;
122
+ }>;
123
+ getCollections: (
124
+ jid?: string,
125
+ limit?: number,
126
+ ) => Promise<{
127
+ collections: import("../Types/index.js").CatalogCollection[];
128
+ }>;
129
+ productCreate: (
130
+ create: import("../Types/index.js").ProductCreate,
131
+ ) => Promise<import("../Types/index.js").Product>;
132
+ productDelete: (productIds: string[]) => Promise<{
133
+ deleted: number;
134
+ }>;
135
+ productUpdate: (
136
+ productId: string,
137
+ update: import("../Types/index.js").ProductUpdate,
138
+ ) => Promise<import("../Types/index.js").Product>;
139
+ updateBusinessProfile: (
140
+ args: import("../Types/Bussines.js").UpdateBusinessProfileProps,
141
+ ) => Promise<any>;
142
+ updateBussinesProfile: (
143
+ args: import("../Types/Bussines.js").UpdateBussinesProfileProps,
144
+ ) => Promise<any>;
145
+ updateCoverPhoto: (
146
+ photo: import("../Types/index.js").WAMediaUpload,
147
+ ) => Promise<number>;
148
+ removeCoverPhoto: (id: string) => Promise<any>;
149
+ sendMessageAck: (node: BinaryNode, errorCode?: number) => Promise<void>;
150
+ sendRetryRequest: (
151
+ node: BinaryNode,
152
+ forceIncludeKeys?: boolean,
153
+ ) => Promise<void>;
154
+ rejectCall: (callId: string, callFrom: string) => Promise<void>;
155
+ fetchMessageHistory: (
156
+ count: number,
157
+ oldestMsgKey: WAMessageKey,
158
+ oldestMsgTimestamp: number | import("long").default,
159
+ ) => Promise<string>;
160
+ requestPlaceholderResend: (
161
+ messageKey: WAMessageKey,
162
+ msgData?: Partial<import("../Types/index.js").WAMessage>,
163
+ ) => Promise<string | undefined>;
164
+ messageRetryManager: import("../Utils/index.js").MessageRetryManager | null;
165
+ getPrivacyTokens: (jids: string[]) => Promise<any>;
166
+ assertSessions: (jids: string[], force?: boolean) => Promise<boolean>;
167
+ relayMessage: (
168
+ jid: string,
169
+ message: proto.IMessage,
170
+ {
171
+ messageId: msgId,
172
+ participant,
173
+ additionalAttributes,
174
+ additionalNodes,
175
+ useUserDevicesCache,
176
+ useCachedGroupMetadata,
177
+ statusJidList,
178
+ }: import("../Types/index.js").MessageRelayOptions,
179
+ ) => Promise<string>;
180
+ sendReceipt: (
181
+ jid: string,
182
+ participant: string | undefined,
183
+ messageIds: string[],
184
+ type: import("../Types/index.js").MessageReceiptType,
185
+ ) => Promise<void>;
186
+ sendReceipts: (
187
+ keys: WAMessageKey[],
188
+ type: import("../Types/index.js").MessageReceiptType,
189
+ ) => Promise<void>;
190
+ ourin: import("./dugong.js").Dugong;
191
+ readMessages: (keys: WAMessageKey[]) => Promise<void>;
192
+ refreshMediaConn: (
193
+ forceGet?: boolean,
194
+ ) => Promise<import("../Types/index.js").MediaConnInfo>;
195
+ waUploadToServer: import("../Types/index.js").WAMediaUploadFunction;
196
+ fetchPrivacySettings: (force?: boolean) => Promise<{
197
+ [_: string]: string;
198
+ }>;
199
+ sendPeerDataOperationMessage: (
200
+ pdoMessage: proto.Message.IPeerDataOperationRequestMessage,
201
+ ) => Promise<string>;
202
+ createParticipantNodes: (
203
+ recipientJids: string[],
204
+ message: proto.IMessage,
205
+ extraAttrs?: BinaryNode["attrs"],
206
+ dsmMessage?: proto.IMessage,
207
+ ) => Promise<{
208
+ nodes: BinaryNode[];
209
+ shouldIncludeDeviceIdentity: boolean;
210
+ }>;
211
+ getUSyncDevices: (
212
+ jids: string[],
213
+ useCache: boolean,
214
+ ignoreZeroDevices: boolean,
215
+ ) => Promise<
216
+ (import("../WABinary/index.js").JidWithDevice & {
217
+ jid: string;
218
+ })[]
219
+ >;
220
+ updateMemberLabel: (jid: string, memberLabel: string) => Promise<string>;
221
+ updateMediaMessage: (
222
+ message: import("../Types/index.js").WAMessage,
223
+ ) => Promise<import("../Types/index.js").WAMessage>;
224
+ sendStatusMention: (
225
+ content: any,
226
+ jids?: string[],
227
+ ) => Promise<import("../Types/index.js").WAMessage>;
228
+ sendTable: (
229
+ jid: string,
230
+ title: string,
231
+ headers: string[],
232
+ rows: string[][],
233
+ quoted?: any,
234
+ options?: import("../Utils/index.js").RichMessageOptions,
235
+ ) => Promise<{
236
+ message: any;
237
+ messageId: string;
238
+ }>;
239
+ sendList: (
240
+ jid: string,
241
+ title: string,
242
+ items: (string | string[])[],
243
+ quoted?: any,
244
+ options?: import("../Utils/index.js").RichMessageOptions,
245
+ ) => Promise<{
246
+ message: any;
247
+ messageId: string;
248
+ }>;
249
+ sendCodeBlock: (
250
+ jid: string,
251
+ code: string,
252
+ quoted?: any,
253
+ options?: import("../Utils/index.js").CodeBlockOptions,
254
+ ) => Promise<{
255
+ message: any;
256
+ messageId: string;
257
+ }>;
258
+ sendLatex: (
259
+ jid: string,
260
+ quoted: any,
261
+ options: import("../Utils/index.js").LatexOptions,
262
+ ) => Promise<{
263
+ message: any;
264
+ messageId: string;
265
+ }>;
266
+ sendLatexImage: (
267
+ jid: string,
268
+ quoted: any,
269
+ options: import("../Utils/index.js").LatexImageOptions,
270
+ renderLatexToPng: import("../Utils/index.js").LatexRenderFn,
271
+ uploadFn: import("../Utils/index.js").MediaUploadFn,
272
+ ) => Promise<{
273
+ message: any;
274
+ messageId: string;
275
+ }>;
276
+ sendLatexInlineImage: (
277
+ jid: string,
278
+ quoted: any,
279
+ options: import("../Utils/index.js").LatexImageOptions,
280
+ renderLatexToPng: import("../Utils/index.js").LatexRenderFn,
281
+ uploadFn: import("../Utils/index.js").MediaUploadFn,
282
+ ) => Promise<{
283
+ message: any;
284
+ messageId: string;
285
+ }>;
286
+ captureUnifiedResponse: (
287
+ msg: proto.IMessage,
288
+ ) => import("../Utils/index.js").CapturedUnifiedResponse | null;
289
+ sendUnifiedResponse: (
290
+ jid: string,
291
+ quoted: any,
292
+ captured: import("../Utils/index.js").CapturedUnifiedResponse,
293
+ ) => Promise<{
294
+ message: any;
295
+ messageId: string;
296
+ }>;
297
+ sendRichMessage: (
298
+ jid: string,
299
+ submessages: proto.IAIRichResponseSubMessage[],
300
+ quoted?: any,
301
+ options?: {},
302
+ ) => Promise<{
303
+ message: any;
304
+ messageId: string;
305
+ }>;
306
+ sendMessage: (
307
+ jid: string,
308
+ content: import("../Types/index.js").AnyMessageContent,
309
+ options?: import("../Types/index.js").MiscMessageGenerationOptions,
310
+ ) => Promise<any>;
311
+ newsletterFetchAllSubscribe: () => Promise<unknown>;
312
+ newsletterMultipleFollow: (jids: string) => Promise<void>;
313
+ newsletterAction: (jid: string, type: string) => Promise<void>;
314
+ cekIDSaluran: (url: string) => Promise<{
315
+ id: any;
316
+ state: any;
317
+ creation_time: number;
318
+ name: any;
319
+ description: any;
320
+ invite: any;
321
+ picture: string;
322
+ preview: string;
323
+ subscribers: number;
324
+ verification: any;
325
+ viewer_metadata: any;
326
+ }>;
327
+ newsletterCreate: (
328
+ name: string,
329
+ description?: string,
330
+ ) => Promise<import("../Types/index.js").NewsletterMetadata>;
331
+ newsletterUpdate: (
332
+ jid: string,
333
+ updates: import("../Types/index.js").NewsletterUpdate,
334
+ ) => Promise<unknown>;
335
+ newsletterSubscribers: (jid: string) => Promise<{
336
+ subscribers: number;
337
+ }>;
338
+ newsletterMetadata: (
339
+ type: "invite" | "jid",
340
+ key: string,
341
+ ) => Promise<import("../Types/index.js").NewsletterMetadata | null>;
342
+ newsletterFollow: (jid: string) => Promise<unknown>;
343
+ newsletterUnfollow: (jid: string) => Promise<unknown>;
344
+ newsletterMute: (jid: string) => Promise<unknown>;
345
+ newsletterUnmute: (jid: string) => Promise<unknown>;
346
+ newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
347
+ newsletterUpdateDescription: (
348
+ jid: string,
349
+ description: string,
350
+ ) => Promise<unknown>;
351
+ newsletterUpdatePicture: (
352
+ jid: string,
353
+ content: import("../Types/index.js").WAMediaUpload,
354
+ ) => Promise<unknown>;
355
+ newsletterRemovePicture: (jid: string) => Promise<unknown>;
356
+ newsletterReactMessage: (
357
+ jid: string,
358
+ serverId: string,
359
+ reaction?: string,
360
+ ) => Promise<void>;
361
+ newsletterFetchMessages: (
362
+ jid: string,
363
+ count: number,
364
+ since: number,
365
+ after: number,
366
+ ) => Promise<any>;
367
+ subscribeNewsletterUpdates: (jid: string) => Promise<{
368
+ duration: string;
369
+ } | null>;
370
+ newsletterAdminCount: (jid: string) => Promise<number>;
371
+ newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
372
+ newsletterDemote: (jid: string, userJid: string) => Promise<void>;
373
+ newsletterDelete: (jid: string) => Promise<void>;
374
+ groupMetadata: (jid: string) => Promise<GroupMetadata>;
375
+ groupCreate: (
376
+ subject: string,
377
+ participants: string[],
378
+ ) => Promise<GroupMetadata>;
379
+ groupLeave: (id: string) => Promise<void>;
380
+ groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
381
+ groupRequestParticipantsList: (jid: string) => Promise<
382
+ {
383
+ [key: string]: string;
384
+ }[]
385
+ >;
386
+ groupRequestParticipantsUpdate: (
387
+ jid: string,
388
+ participants: string[],
389
+ action: "approve" | "reject",
390
+ ) => Promise<
391
+ {
392
+ status: string;
393
+ jid: string | undefined;
394
+ }[]
395
+ >;
396
+ groupParticipantsUpdate: (
397
+ jid: string,
398
+ participants: string[],
399
+ action: ParticipantAction,
400
+ ) => Promise<
401
+ {
402
+ status: string;
403
+ jid: string | undefined;
404
+ content: BinaryNode;
405
+ }[]
406
+ >;
407
+ groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
408
+ groupInviteCode: (jid: string) => Promise<string | undefined>;
409
+ groupRevokeInvite: (jid: string) => Promise<string | undefined>;
410
+ groupAcceptInvite: (code: string) => Promise<string | undefined>;
411
+ groupRevokeInviteV4: (
412
+ groupJid: string,
413
+ invitedJid: string,
414
+ ) => Promise<boolean>;
415
+ groupAcceptInviteV4: (
416
+ key: string | WAMessageKey,
417
+ inviteMessage: proto.Message.IGroupInviteMessage,
418
+ ) => Promise<any>;
419
+ groupGetInviteInfo: (code: string) => Promise<GroupMetadata>;
420
+ groupToggleEphemeral: (
421
+ jid: string,
422
+ ephemeralExpiration: number,
423
+ ) => Promise<void>;
424
+ groupSettingUpdate: (
425
+ jid: string,
426
+ setting: "announcement" | "not_announcement" | "locked" | "unlocked",
427
+ ) => Promise<void>;
428
+ groupMemberAddMode: (
429
+ jid: string,
430
+ mode: "admin_add" | "all_member_add",
431
+ ) => Promise<void>;
432
+ groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
433
+ groupFetchAllParticipating: () => Promise<{
434
+ [_: string]: GroupMetadata;
435
+ }>;
436
+ createCallLink: (
437
+ type: "audio" | "video",
438
+ event?: {
439
+ startTime: number;
440
+ },
441
+ timeoutMs?: number,
442
+ ) => Promise<string | undefined>;
443
+ getBotListV2: () => Promise<import("../Types/index.js").BotListInfo[]>;
444
+ messageMutex: {
445
+ mutex<T>(code: () => Promise<T> | T): Promise<T>;
446
+ };
447
+ receiptMutex: {
448
+ mutex<T>(code: () => Promise<T> | T): Promise<T>;
449
+ };
450
+ appStatePatchMutex: {
451
+ mutex<T>(code: () => Promise<T> | T): Promise<T>;
452
+ };
453
+ notificationMutex: {
454
+ mutex<T>(code: () => Promise<T> | T): Promise<T>;
455
+ };
456
+ upsertMessage: (
457
+ msg: import("../Types/index.js").WAMessage,
458
+ type: import("../Types/index.js").MessageUpsertType,
459
+ ) => Promise<void>;
460
+ appPatch: (
461
+ patchCreate: import("../Types/index.js").WAPatchCreate,
462
+ ) => Promise<void>;
463
+ sendPresenceUpdate: (
464
+ type: import("../Types/index.js").WAPresence,
465
+ toJid?: string,
466
+ ) => Promise<void>;
467
+ presenceSubscribe: (toJid: string) => Promise<void>;
468
+ profilePictureUrl: (
469
+ jid: string,
470
+ type?: "preview" | "image",
471
+ timeoutMs?: number,
472
+ ) => Promise<string | undefined>;
473
+ fetchBlocklist: () => Promise<(string | undefined)[]>;
474
+ fetchStatus: (
475
+ ...jids: string[]
476
+ ) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
477
+ fetchDisappearingDuration: (
478
+ ...jids: string[]
479
+ ) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
480
+ updateProfilePicture: (
481
+ jid: string,
482
+ content: import("../Types/index.js").WAMediaUpload,
483
+ dimensions?: {
484
+ width: number;
485
+ height: number;
486
+ },
487
+ ) => Promise<void>;
488
+ removeProfilePicture: (jid: string) => Promise<void>;
489
+ updateProfileStatus: (status: string) => Promise<void>;
490
+ updateProfileName: (name: string) => Promise<void>;
491
+ updateBlockStatus: (
492
+ jid: string,
493
+ action: "block" | "unblock",
494
+ ) => Promise<void>;
495
+ updateDisableLinkPreviewsPrivacy: (
496
+ isPreviewsDisabled: boolean,
497
+ ) => Promise<void>;
498
+ updateCallPrivacy: (
499
+ value: import("../Types/index.js").WAPrivacyCallValue,
500
+ ) => Promise<void>;
501
+ updateMessagesPrivacy: (
502
+ value: import("../Types/index.js").WAPrivacyMessagesValue,
503
+ ) => Promise<void>;
504
+ updateLastSeenPrivacy: (
505
+ value: import("../Types/index.js").WAPrivacyValue,
506
+ ) => Promise<void>;
507
+ updateOnlinePrivacy: (
508
+ value: import("../Types/index.js").WAPrivacyOnlineValue,
509
+ ) => Promise<void>;
510
+ updateProfilePicturePrivacy: (
511
+ value: import("../Types/index.js").WAPrivacyValue,
512
+ ) => Promise<void>;
513
+ updateStatusPrivacy: (
514
+ value: import("../Types/index.js").WAPrivacyValue,
515
+ ) => Promise<void>;
516
+ updateReadReceiptsPrivacy: (
517
+ value: import("../Types/index.js").WAReadReceiptsValue,
518
+ ) => Promise<void>;
519
+ updateGroupsAddPrivacy: (
520
+ value: import("../Types/index.js").WAPrivacyGroupAddValue,
521
+ ) => Promise<void>;
522
+ updateDefaultDisappearingMode: (duration: number) => Promise<void>;
523
+ getBusinessProfile: (
524
+ jid: string,
525
+ ) => Promise<import("../Types/index.js").WABusinessProfile | void>;
526
+ resyncAppState: (
527
+ collections: readonly (
528
+ | "critical_unblock_low"
529
+ | "regular_high"
530
+ | "regular_low"
531
+ | "critical_block"
532
+ | "regular"
533
+ )[],
534
+ isInitialSync: boolean,
535
+ ) => Promise<void>;
536
+ chatModify: (
537
+ mod: import("../Types/index.js").ChatModification,
538
+ jid: string,
539
+ ) => Promise<void>;
540
+ cleanDirtyBits: (
541
+ type: "account_sync" | "groups",
542
+ fromTimestamp?: number | string,
543
+ ) => Promise<void>;
544
+ addOrEditContact: (
545
+ jid: string,
546
+ contact: proto.SyncActionValue.IContactAction,
547
+ ) => Promise<void>;
548
+ removeContact: (jid: string) => Promise<void>;
549
+ addLabel: (
550
+ jid: string,
551
+ labels: import("../Types/Label.js").LabelActionBody,
552
+ ) => Promise<void>;
553
+ addChatLabel: (jid: string, labelId: string) => Promise<void>;
554
+ removeChatLabel: (jid: string, labelId: string) => Promise<void>;
555
+ addMessageLabel: (
556
+ jid: string,
557
+ messageId: string,
558
+ labelId: string,
559
+ ) => Promise<void>;
560
+ removeMessageLabel: (
561
+ jid: string,
562
+ messageId: string,
563
+ labelId: string,
564
+ ) => Promise<void>;
565
+ star: (
566
+ jid: string,
567
+ messages: {
568
+ id: string;
569
+ fromMe?: boolean;
570
+ }[],
571
+ star: boolean,
572
+ ) => Promise<void>;
573
+ addOrEditQuickReply: (
574
+ quickReply: import("../Types/Bussines.js").QuickReplyAction,
575
+ ) => Promise<void>;
576
+ removeQuickReply: (timestamp: string) => Promise<void>;
577
+ type: "md";
578
+ ws: import("./Client/websocket.js").WebSocketClient;
579
+ ev: import("../Types/index.js").BaileysEventEmitter & {
580
+ process(
581
+ handler: (
582
+ events: Partial<import("../Types/index.js").BaileysEventMap>,
583
+ ) => void | Promise<void>,
584
+ ): () => void;
585
+ buffer(): void;
586
+ createBufferedFunction<A extends any[], T>(
587
+ work: (...args: A) => Promise<T>,
588
+ ): (...args: A) => Promise<T>;
589
+ flush(): boolean;
590
+ isBuffering(): boolean;
591
+ };
592
+ authState: {
593
+ creds: import("../Types/index.js").AuthenticationCreds;
594
+ keys: import("../Types/index.js").SignalKeyStoreWithTransaction;
595
+ };
596
+ signalRepository: import("../Types/index.js").SignalRepositoryWithLIDStore;
597
+ user: import("../Types/index.js").Contact | undefined;
598
+ generateMessageTag: () => string;
599
+ query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
600
+ waitForMessage: <T>(
601
+ msgId: string,
602
+ timeoutMs?: number | undefined,
603
+ ) => Promise<T | undefined>;
604
+ waitForSocketOpen: () => Promise<void>;
605
+ sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
606
+ sendNode: (frame: BinaryNode) => Promise<void>;
607
+ logout: (msg?: string) => Promise<void>;
608
+ end: (error: Error | undefined) => Promise<void>;
609
+ onUnexpectedError: (
610
+ err: Error | import("@hapi/boom").Boom,
611
+ msg: string,
612
+ ) => void;
613
+ uploadPreKeys: (count?: number, retryCount?: number) => Promise<void>;
614
+ uploadPreKeysToServerIfRequired: () => Promise<void>;
615
+ digestKeyBundle: () => Promise<void>;
616
+ rotateSignedPreKey: () => Promise<void>;
617
+ requestPairingCode: (
618
+ phoneNumber: string,
619
+ customPairingCode?: string,
620
+ ) => Promise<string>;
621
+ updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
622
+ sendUnifiedSession: () => Promise<void>;
623
+ wamBuffer: import("../index.js").BinaryInfo;
624
+ waitForConnectionUpdate: (
625
+ check: (
626
+ u: Partial<import("../Types/index.js").ConnectionState>,
627
+ ) => Promise<boolean | undefined>,
628
+ timeoutMs?: number,
629
+ ) => Promise<void>;
630
+ sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
631
+ executeUSyncQuery: (
632
+ usyncQuery: import("../index.js").USyncQuery,
633
+ ) => Promise<import("../index.js").USyncQueryResult | undefined>;
634
+ onWhatsApp: (...phoneNumber: string[]) => Promise<
635
+ | {
333
636
  jid: string;
334
637
  exists: boolean;
335
- }[] | undefined>;
336
- fetchAccountReachoutTimelock: () => Promise<import("../Types/index.js").ReachoutTimelockState>;
337
- fetchNewChatMessageCap: () => Promise<import("../Types/index.js").NewChatMessageCapInfo>;
638
+ }[]
639
+ | undefined
640
+ >;
338
641
  };
339
- export declare const extractCommunityMetadata: (result: BinaryNode) => GroupMetadata;
340
- //# sourceMappingURL=communities.d.ts.map
642
+ export declare const extractCommunityMetadata: (
643
+ result: BinaryNode,
644
+ ) => GroupMetadata;
645
+ //# sourceMappingURL=communities.d.ts.map