@japofc/baileys 2.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 (342) hide show
  1. package/NOTICE.md +111 -0
  2. package/README.md +1254 -0
  3. package/WAProto/index.d.ts +9 -0
  4. package/WAProto/index.js +142276 -0
  5. package/engine-requirements.js +13 -0
  6. package/lib/Builders/A2UI.d.ts +242 -0
  7. package/lib/Builders/A2UI.js +308 -0
  8. package/lib/Builders/AIRich.d.ts +105 -0
  9. package/lib/Builders/AIRich.js +2286 -0
  10. package/lib/Builders/Button.d.ts +103 -0
  11. package/lib/Builders/Button.js +883 -0
  12. package/lib/Builders/ButtonV2.d.ts +28 -0
  13. package/lib/Builders/ButtonV2.js +144 -0
  14. package/lib/Builders/ButtonV3.d.ts +25 -0
  15. package/lib/Builders/ButtonV3.js +184 -0
  16. package/lib/Builders/Carousel.d.ts +22 -0
  17. package/lib/Builders/Carousel.js +111 -0
  18. package/lib/Builders/JapBaileys.d.ts +34 -0
  19. package/lib/Builders/JapBaileys.js +108 -0
  20. package/lib/Builders/Poll.d.ts +25 -0
  21. package/lib/Builders/Poll.js +128 -0
  22. package/lib/Builders/index.d.ts +17 -0
  23. package/lib/Builders/index.js +11 -0
  24. package/lib/Builders/shared.d.ts +67 -0
  25. package/lib/Builders/shared.js +652 -0
  26. package/lib/Defaults/index.d.ts +154 -0
  27. package/lib/Defaults/index.js +178 -0
  28. package/lib/Framework/Bot.d.ts +61 -0
  29. package/lib/Framework/Bot.js +248 -0
  30. package/lib/Framework/Context.d.ts +21 -0
  31. package/lib/Framework/Context.js +89 -0
  32. package/lib/Framework/MediaManager.d.ts +17 -0
  33. package/lib/Framework/MediaManager.js +151 -0
  34. package/lib/Framework/SessionManager.d.ts +13 -0
  35. package/lib/Framework/SessionManager.js +33 -0
  36. package/lib/Framework/StatsManager.d.ts +26 -0
  37. package/lib/Framework/StatsManager.js +119 -0
  38. package/lib/Framework/Store/SQLiteStore.d.ts +11 -0
  39. package/lib/Framework/Store/SQLiteStore.js +73 -0
  40. package/lib/Framework/index.d.ts +9 -0
  41. package/lib/Framework/index.js +10 -0
  42. package/lib/Signal/Group/ciphertext-message.d.ts +9 -0
  43. package/lib/Signal/Group/ciphertext-message.js +11 -0
  44. package/lib/Signal/Group/group-session-builder.d.ts +7 -0
  45. package/lib/Signal/Group/group-session-builder.js +29 -0
  46. package/lib/Signal/Group/group_cipher.d.ts +10 -0
  47. package/lib/Signal/Group/group_cipher.js +81 -0
  48. package/lib/Signal/Group/index.d.ts +11 -0
  49. package/lib/Signal/Group/index.js +11 -0
  50. package/lib/Signal/Group/keyhelper.d.ts +6 -0
  51. package/lib/Signal/Group/keyhelper.js +17 -0
  52. package/lib/Signal/Group/sender-chain-key.d.ts +13 -0
  53. package/lib/Signal/Group/sender-chain-key.js +25 -0
  54. package/lib/Signal/Group/sender-key-distribution-message.d.ts +16 -0
  55. package/lib/Signal/Group/sender-key-distribution-message.js +62 -0
  56. package/lib/Signal/Group/sender-key-message.d.ts +18 -0
  57. package/lib/Signal/Group/sender-key-message.js +65 -0
  58. package/lib/Signal/Group/sender-key-name.d.ts +11 -0
  59. package/lib/Signal/Group/sender-key-name.js +47 -0
  60. package/lib/Signal/Group/sender-key-record.d.ts +12 -0
  61. package/lib/Signal/Group/sender-key-record.js +40 -0
  62. package/lib/Signal/Group/sender-key-state.d.ts +16 -0
  63. package/lib/Signal/Group/sender-key-state.js +83 -0
  64. package/lib/Signal/Group/sender-message-key.d.ts +11 -0
  65. package/lib/Signal/Group/sender-message-key.js +25 -0
  66. package/lib/Signal/libsignal.d.ts +54 -0
  67. package/lib/Signal/libsignal.js +430 -0
  68. package/lib/Signal/lid-mapping.d.ts +20 -0
  69. package/lib/Signal/lid-mapping.js +276 -0
  70. package/lib/Socket/Client/index.d.ts +2 -0
  71. package/lib/Socket/Client/index.js +2 -0
  72. package/lib/Socket/Client/types.d.ts +5 -0
  73. package/lib/Socket/Client/types.js +10 -0
  74. package/lib/Socket/Client/websocket.d.ts +12 -0
  75. package/lib/Socket/Client/websocket.js +53 -0
  76. package/lib/Socket/business.d.ts +395 -0
  77. package/lib/Socket/business.js +379 -0
  78. package/lib/Socket/chats.d.ts +136 -0
  79. package/lib/Socket/chats.js +1327 -0
  80. package/lib/Socket/communities.d.ts +562 -0
  81. package/lib/Socket/communities.js +439 -0
  82. package/lib/Socket/dugong.d.ts +117 -0
  83. package/lib/Socket/dugong.js +798 -0
  84. package/lib/Socket/groups.d.ts +285 -0
  85. package/lib/Socket/groups.js +354 -0
  86. package/lib/Socket/index.d.ts +585 -0
  87. package/lib/Socket/index.js +52 -0
  88. package/lib/Socket/messages-recv.d.ts +333 -0
  89. package/lib/Socket/messages-recv.js +1781 -0
  90. package/lib/Socket/messages-send.d.ts +353 -0
  91. package/lib/Socket/messages-send.js +1524 -0
  92. package/lib/Socket/mex.d.ts +1 -0
  93. package/lib/Socket/mex.js +41 -0
  94. package/lib/Socket/newsletter.d.ts +286 -0
  95. package/lib/Socket/newsletter.js +364 -0
  96. package/lib/Socket/socket.d.ts +60 -0
  97. package/lib/Socket/socket.js +1012 -0
  98. package/lib/Socket/username.d.ts +82 -0
  99. package/lib/Socket/username.js +159 -0
  100. package/lib/Store/index.d.ts +3 -0
  101. package/lib/Store/index.js +3 -0
  102. package/lib/Store/make-in-memory-store.d.ts +62 -0
  103. package/lib/Store/make-in-memory-store.js +428 -0
  104. package/lib/Store/make-ordered-dictionary.d.ts +12 -0
  105. package/lib/Store/make-ordered-dictionary.js +78 -0
  106. package/lib/Store/object-repository.d.ts +10 -0
  107. package/lib/Store/object-repository.js +23 -0
  108. package/lib/Types/Auth.d.ts +117 -0
  109. package/lib/Types/Auth.js +1 -0
  110. package/lib/Types/Bussines.d.ts +25 -0
  111. package/lib/Types/Call.d.ts +15 -0
  112. package/lib/Types/Call.js +1 -0
  113. package/lib/Types/Chat.d.ts +124 -0
  114. package/lib/Types/Chat.js +7 -0
  115. package/lib/Types/Contact.d.ts +26 -0
  116. package/lib/Types/Contact.js +1 -0
  117. package/lib/Types/Events.d.ts +256 -0
  118. package/lib/Types/Events.js +1 -0
  119. package/lib/Types/GroupMetadata.d.ts +71 -0
  120. package/lib/Types/GroupMetadata.js +1 -0
  121. package/lib/Types/Label.d.ts +5 -0
  122. package/lib/Types/Label.js +24 -0
  123. package/lib/Types/LabelAssociation.d.ts +6 -0
  124. package/lib/Types/LabelAssociation.js +6 -0
  125. package/lib/Types/Message.d.ts +62 -0
  126. package/lib/Types/Message.js +17 -0
  127. package/lib/Types/Mex.d.ts +2 -0
  128. package/lib/Types/Mex.js +38 -0
  129. package/lib/Types/Product.d.ts +79 -0
  130. package/lib/Types/Product.js +1 -0
  131. package/lib/Types/RichType.d.ts +2 -0
  132. package/lib/Types/RichType.js +22 -0
  133. package/lib/Types/Signal.d.ts +87 -0
  134. package/lib/Types/Signal.js +1 -0
  135. package/lib/Types/Socket.d.ts +138 -0
  136. package/lib/Types/Socket.js +1 -0
  137. package/lib/Types/State.d.ts +8 -0
  138. package/lib/Types/State.js +55 -0
  139. package/lib/Types/USync.d.ts +26 -0
  140. package/lib/Types/index.d.ts +68 -0
  141. package/lib/Types/index.js +27 -0
  142. package/lib/Utils/MessageBuilder.d.ts +2 -0
  143. package/lib/Utils/MessageBuilder.js +2 -0
  144. package/lib/Utils/PersistentStore.d.ts +60 -0
  145. package/lib/Utils/PersistentStore.js +592 -0
  146. package/lib/Utils/anti-delete.d.ts +74 -0
  147. package/lib/Utils/anti-delete.js +221 -0
  148. package/lib/Utils/auth-secure.d.ts +86 -0
  149. package/lib/Utils/auth-secure.js +764 -0
  150. package/lib/Utils/auth-utils.d.ts +57 -0
  151. package/lib/Utils/auth-utils.js +306 -0
  152. package/lib/Utils/auto-reply.d.ts +47 -0
  153. package/lib/Utils/auto-reply.js +157 -0
  154. package/lib/Utils/baileys-event-stream.d.ts +8 -0
  155. package/lib/Utils/baileys-event-stream.js +62 -0
  156. package/lib/Utils/browser-utils.d.ts +8 -0
  157. package/lib/Utils/browser-utils.js +27 -0
  158. package/lib/Utils/business.d.ts +49 -0
  159. package/lib/Utils/business.js +239 -0
  160. package/lib/Utils/button-helper-utils.d.ts +53 -0
  161. package/lib/Utils/button-helper-utils.js +312 -0
  162. package/lib/Utils/button-sender.d.ts +54 -0
  163. package/lib/Utils/button-sender.js +822 -0
  164. package/lib/Utils/chat-control.d.ts +159 -0
  165. package/lib/Utils/chat-control.js +230 -0
  166. package/lib/Utils/chat-history-helpers.d.ts +21 -0
  167. package/lib/Utils/chat-history-helpers.js +70 -0
  168. package/lib/Utils/chat-utils.d.ts +407 -0
  169. package/lib/Utils/chat-utils.js +885 -0
  170. package/lib/Utils/companion-reg-client-utils.d.ts +4 -0
  171. package/lib/Utils/companion-reg-client-utils.js +39 -0
  172. package/lib/Utils/crypto.d.ts +41 -0
  173. package/lib/Utils/crypto.js +147 -0
  174. package/lib/Utils/decode-wa-message.d.ts +83 -0
  175. package/lib/Utils/decode-wa-message.js +316 -0
  176. package/lib/Utils/event-buffer.d.ts +12 -0
  177. package/lib/Utils/event-buffer.js +635 -0
  178. package/lib/Utils/generics.d.ts +69 -0
  179. package/lib/Utils/generics.js +438 -0
  180. package/lib/Utils/history-share.d.ts +11 -0
  181. package/lib/Utils/history-share.js +70 -0
  182. package/lib/Utils/history.d.ts +90 -0
  183. package/lib/Utils/history.js +146 -0
  184. package/lib/Utils/humanizer.d.ts +12 -0
  185. package/lib/Utils/humanizer.js +73 -0
  186. package/lib/Utils/identity-change-handler.d.ts +13 -0
  187. package/lib/Utils/identity-change-handler.js +49 -0
  188. package/lib/Utils/index.d.ts +57 -0
  189. package/lib/Utils/index.js +56 -0
  190. package/lib/Utils/jid-tools.d.ts +6 -0
  191. package/lib/Utils/jid-tools.js +77 -0
  192. package/lib/Utils/link-preview.d.ts +12 -0
  193. package/lib/Utils/link-preview.js +84 -0
  194. package/lib/Utils/logger.d.ts +4 -0
  195. package/lib/Utils/logger.js +2 -0
  196. package/lib/Utils/lt-hash.d.ts +12 -0
  197. package/lib/Utils/lt-hash.js +26 -0
  198. package/lib/Utils/make-mutex.d.ts +6 -0
  199. package/lib/Utils/make-mutex.js +32 -0
  200. package/lib/Utils/media-messages.d.ts +18 -0
  201. package/lib/Utils/media-messages.js +70 -0
  202. package/lib/Utils/media-set.d.ts +13 -0
  203. package/lib/Utils/media-set.js +171 -0
  204. package/lib/Utils/message-kind.d.ts +32 -0
  205. package/lib/Utils/message-kind.js +136 -0
  206. package/lib/Utils/message-retry-manager.d.ts +79 -0
  207. package/lib/Utils/message-retry-manager.js +264 -0
  208. package/lib/Utils/message-search.d.ts +44 -0
  209. package/lib/Utils/message-search.js +188 -0
  210. package/lib/Utils/messages-media.d.ts +135 -0
  211. package/lib/Utils/messages-media.js +868 -0
  212. package/lib/Utils/messages.d.ts +44 -0
  213. package/lib/Utils/messages.js +2326 -0
  214. package/lib/Utils/meta-ai.d.ts +13 -0
  215. package/lib/Utils/meta-ai.js +74 -0
  216. package/lib/Utils/mini-app.d.ts +35 -0
  217. package/lib/Utils/mini-app.js +213 -0
  218. package/lib/Utils/noise-handler.d.ts +20 -0
  219. package/lib/Utils/noise-handler.js +200 -0
  220. package/lib/Utils/offline-node-processor.d.ts +9 -0
  221. package/lib/Utils/offline-node-processor.js +39 -0
  222. package/lib/Utils/past-participants.d.ts +14 -0
  223. package/lib/Utils/past-participants.js +40 -0
  224. package/lib/Utils/pre-key-manager.d.ts +25 -0
  225. package/lib/Utils/pre-key-manager.js +105 -0
  226. package/lib/Utils/process-message.d.ts +82 -0
  227. package/lib/Utils/process-message.js +808 -0
  228. package/lib/Utils/qr-render.d.ts +59 -0
  229. package/lib/Utils/qr-render.js +179 -0
  230. package/lib/Utils/qrcodegen.d.ts +79 -0
  231. package/lib/Utils/qrcodegen.js +848 -0
  232. package/lib/Utils/reporting-utils.d.ts +12 -0
  233. package/lib/Utils/reporting-utils.js +257 -0
  234. package/lib/Utils/rich-message-utils.d.ts +48 -0
  235. package/lib/Utils/rich-message-utils.js +444 -0
  236. package/lib/Utils/router.d.ts +37 -0
  237. package/lib/Utils/router.js +165 -0
  238. package/lib/Utils/scheduled-posts.d.ts +30 -0
  239. package/lib/Utils/scheduled-posts.js +110 -0
  240. package/lib/Utils/scheduling.d.ts +42 -0
  241. package/lib/Utils/scheduling.js +139 -0
  242. package/lib/Utils/signal.d.ts +82 -0
  243. package/lib/Utils/signal.js +200 -0
  244. package/lib/Utils/stanza-ack.d.ts +16 -0
  245. package/lib/Utils/stanza-ack.js +37 -0
  246. package/lib/Utils/status.d.ts +50 -0
  247. package/lib/Utils/status.js +107 -0
  248. package/lib/Utils/stickerpack.d.ts +51 -0
  249. package/lib/Utils/stickerpack.js +274 -0
  250. package/lib/Utils/sync-action-utils.d.ts +2 -0
  251. package/lib/Utils/sync-action-utils.js +48 -0
  252. package/lib/Utils/tag.d.ts +12 -0
  253. package/lib/Utils/tag.js +44 -0
  254. package/lib/Utils/tc-token-utils.d.ts +29 -0
  255. package/lib/Utils/tc-token-utils.js +162 -0
  256. package/lib/Utils/templates.d.ts +76 -0
  257. package/lib/Utils/templates.js +150 -0
  258. package/lib/Utils/transcribe.d.ts +12 -0
  259. package/lib/Utils/transcribe.js +107 -0
  260. package/lib/Utils/use-cache-manager-auth-state.d.ts +13 -0
  261. package/lib/Utils/use-cache-manager-auth-state.js +81 -0
  262. package/lib/Utils/use-multi-file-auth-state.d.ts +10 -0
  263. package/lib/Utils/use-multi-file-auth-state.js +166 -0
  264. package/lib/Utils/use-single-file-auth-state.d.ts +10 -0
  265. package/lib/Utils/use-single-file-auth-state.js +113 -0
  266. package/lib/Utils/use-sqlite-auth-state.d.ts +11 -0
  267. package/lib/Utils/use-sqlite-auth-state.js +169 -0
  268. package/lib/Utils/validate-connection.d.ts +42 -0
  269. package/lib/Utils/validate-connection.js +198 -0
  270. package/lib/Utils/vcard.d.ts +58 -0
  271. package/lib/Utils/vcard.js +104 -0
  272. package/lib/Utils/voice-note.d.ts +15 -0
  273. package/lib/Utils/voice-note.js +63 -0
  274. package/lib/VoIP/audio-feeder.d.ts +18 -0
  275. package/lib/VoIP/audio-feeder.js +160 -0
  276. package/lib/VoIP/call-recorder.d.ts +13 -0
  277. package/lib/VoIP/call-recorder.js +73 -0
  278. package/lib/VoIP/index.d.ts +86 -0
  279. package/lib/VoIP/index.js +611 -0
  280. package/lib/VoIP/relay-transport.d.ts +43 -0
  281. package/lib/VoIP/relay-transport.js +563 -0
  282. package/lib/VoIP/signaling.d.ts +26 -0
  283. package/lib/VoIP/signaling.js +662 -0
  284. package/lib/VoIP/types.d.ts +69 -0
  285. package/lib/VoIP/types.js +17 -0
  286. package/lib/VoIP/wasm-engine.d.ts +120 -0
  287. package/lib/VoIP/wasm-engine.js +1358 -0
  288. package/lib/VoIP/worker-bootstrap.d.ts +4 -0
  289. package/lib/VoIP/worker-bootstrap.js +1046 -0
  290. package/lib/WABinary/constants.d.ts +61 -0
  291. package/lib/WABinary/constants.js +1466 -0
  292. package/lib/WABinary/decode.d.ts +9 -0
  293. package/lib/WABinary/decode.js +261 -0
  294. package/lib/WABinary/encode.d.ts +2 -0
  295. package/lib/WABinary/encode.js +219 -0
  296. package/lib/WABinary/generic-utils.d.ts +74 -0
  297. package/lib/WABinary/generic-utils.js +276 -0
  298. package/lib/WABinary/index.d.ts +5 -0
  299. package/lib/WABinary/index.js +5 -0
  300. package/lib/WABinary/jid-utils.d.ts +28 -0
  301. package/lib/WABinary/jid-utils.js +95 -0
  302. package/lib/WABinary/types.d.ts +19 -0
  303. package/lib/WABinary/types.js +1 -0
  304. package/lib/WAM/BinaryInfo.d.ts +7 -0
  305. package/lib/WAM/BinaryInfo.js +9 -0
  306. package/lib/WAM/constants.d.ts +34926 -0
  307. package/lib/WAM/constants.js +22852 -0
  308. package/lib/WAM/encode.d.ts +1 -0
  309. package/lib/WAM/encode.js +149 -0
  310. package/lib/WAM/index.d.ts +3 -0
  311. package/lib/WAM/index.js +3 -0
  312. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +36 -0
  313. package/lib/WAUSync/Protocols/USyncContactProtocol.js +51 -0
  314. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +29 -0
  315. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +62 -0
  316. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +12 -0
  317. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +26 -0
  318. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +12 -0
  319. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +37 -0
  320. package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +9 -0
  321. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +24 -0
  322. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +38 -0
  323. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +50 -0
  324. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +14 -0
  325. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +28 -0
  326. package/lib/WAUSync/Protocols/index.d.ts +7 -0
  327. package/lib/WAUSync/Protocols/index.js +7 -0
  328. package/lib/WAUSync/USyncQuery.d.ts +20 -0
  329. package/lib/WAUSync/USyncQuery.js +121 -0
  330. package/lib/WAUSync/USyncUser.d.ts +16 -0
  331. package/lib/WAUSync/USyncUser.js +30 -0
  332. package/lib/WAUSync/index.d.ts +3 -0
  333. package/lib/WAUSync/index.js +3 -0
  334. package/lib/assets/wasm/loader.d.ts +5 -0
  335. package/lib/assets/wasm/loader.js +5 -0
  336. package/lib/assets/wasm/whatsapp.wasm +0 -0
  337. package/lib/assets/wasm/worker-modules.d.ts +5 -0
  338. package/lib/assets/wasm/worker-modules.js +273 -0
  339. package/lib/index.d.ts +18 -0
  340. package/lib/index.js +23 -0
  341. package/package.json +180 -0
  342. package/postinstall-banner.js +82 -0
@@ -0,0 +1,585 @@
1
+ export { Dugong } from "./dugong.js";
2
+ export default makeWASocket;
3
+ declare function makeWASocket(config: any): {
4
+ communityQuery: (jid: any, type: any, content: any) => Promise<any>;
5
+ communityMetadata: (jid: any) => Promise<{
6
+ id: any;
7
+ subject: any;
8
+ subjectOwner: any;
9
+ subjectTime: number;
10
+ size: any;
11
+ creation: number;
12
+ owner: string | undefined;
13
+ desc: any;
14
+ descId: any;
15
+ linkedParent: any;
16
+ restrict: boolean;
17
+ announce: boolean;
18
+ isCommunity: boolean;
19
+ isCommunityAnnounce: boolean;
20
+ joinApprovalMode: boolean;
21
+ memberAddMode: boolean;
22
+ participants: any;
23
+ ephemeralDuration: number | undefined;
24
+ addressingMode: any;
25
+ }>;
26
+ communityCreate: (subject: any, body: any) => Promise<{
27
+ id: any;
28
+ notify: any;
29
+ addressingMode: any;
30
+ subject: any;
31
+ subjectOwner: any;
32
+ subjectOwnerPn: any;
33
+ subjectOwnerUsername: any;
34
+ subjectTime: number;
35
+ size: any;
36
+ creation: number;
37
+ owner: string | undefined;
38
+ ownerPn: string | undefined;
39
+ ownerUsername: any;
40
+ owner_country_code: any;
41
+ desc: any;
42
+ descId: any;
43
+ descOwner: string | undefined;
44
+ descOwnerPn: string | undefined;
45
+ descOwnerUsername: any;
46
+ descTime: number | undefined;
47
+ linkedParent: any;
48
+ restrict: boolean;
49
+ announce: boolean;
50
+ isCommunity: boolean;
51
+ isCommunityAnnounce: boolean;
52
+ joinApprovalMode: boolean;
53
+ memberAddMode: boolean;
54
+ participants: any;
55
+ ephemeralDuration: number | undefined;
56
+ } | null>;
57
+ communityCreateGroup: (subject: any, participants: any, parentCommunityJid: any) => Promise<{
58
+ id: any;
59
+ notify: any;
60
+ addressingMode: any;
61
+ subject: any;
62
+ subjectOwner: any;
63
+ subjectOwnerPn: any;
64
+ subjectOwnerUsername: any;
65
+ subjectTime: number;
66
+ size: any;
67
+ creation: number;
68
+ owner: string | undefined;
69
+ ownerPn: string | undefined;
70
+ ownerUsername: any;
71
+ owner_country_code: any;
72
+ desc: any;
73
+ descId: any;
74
+ descOwner: string | undefined;
75
+ descOwnerPn: string | undefined;
76
+ descOwnerUsername: any;
77
+ descTime: number | undefined;
78
+ linkedParent: any;
79
+ restrict: boolean;
80
+ announce: boolean;
81
+ isCommunity: boolean;
82
+ isCommunityAnnounce: boolean;
83
+ joinApprovalMode: boolean;
84
+ memberAddMode: boolean;
85
+ participants: any;
86
+ ephemeralDuration: number | undefined;
87
+ } | null>;
88
+ communityLeave: (id: any) => Promise<void>;
89
+ communityUpdateSubject: (jid: any, subject: any) => Promise<void>;
90
+ communityLinkGroup: (groupJid: any, parentCommunityJid: any) => Promise<void>;
91
+ communityUnlinkGroup: (groupJid: any, parentCommunityJid: any) => Promise<void>;
92
+ communityFetchLinkedGroups: (jid: any) => Promise<{
93
+ communityJid: any;
94
+ isCommunity: boolean;
95
+ linkedGroups: {
96
+ id: string | undefined;
97
+ subject: any;
98
+ creation: number | undefined;
99
+ owner: string | undefined;
100
+ size: number | undefined;
101
+ }[];
102
+ }>;
103
+ communityRequestParticipantsList: (jid: any) => Promise<any>;
104
+ communityRequestParticipantsUpdate: (jid: any, participants: any, action: any) => Promise<any>;
105
+ communityParticipantsUpdate: (jid: any, participants: any, action: any) => Promise<any>;
106
+ communityUpdateDescription: (jid: any, description: any) => Promise<void>;
107
+ communityInviteCode: (jid: any) => Promise<any>;
108
+ communityRevokeInvite: (jid: any) => Promise<any>;
109
+ communityAcceptInvite: (code: any) => Promise<any>;
110
+ communityRevokeInviteV4: (communityJid: any, invitedJid: any) => Promise<boolean>;
111
+ communityAcceptInviteV4: (...args: any[]) => Promise<any>;
112
+ communityGetInviteInfo: (code: any) => Promise<{
113
+ id: any;
114
+ subject: any;
115
+ subjectOwner: any;
116
+ subjectTime: number;
117
+ size: any;
118
+ creation: number;
119
+ owner: string | undefined;
120
+ desc: any;
121
+ descId: any;
122
+ linkedParent: any;
123
+ restrict: boolean;
124
+ announce: boolean;
125
+ isCommunity: boolean;
126
+ isCommunityAnnounce: boolean;
127
+ joinApprovalMode: boolean;
128
+ memberAddMode: boolean;
129
+ participants: any;
130
+ ephemeralDuration: number | undefined;
131
+ addressingMode: any;
132
+ }>;
133
+ communityToggleEphemeral: (jid: any, ephemeralExpiration: any) => Promise<void>;
134
+ communitySettingUpdate: (jid: any, setting: any) => Promise<void>;
135
+ communityMemberAddMode: (jid: any, mode: any) => Promise<void>;
136
+ communityJoinApprovalMode: (jid: any, mode: any) => Promise<void>;
137
+ communityFetchAllParticipating: () => Promise<{}>;
138
+ logger: any;
139
+ getOrderDetails: (orderId: any, tokenBase64: any) => Promise<{
140
+ price: {
141
+ total: number;
142
+ currency: any;
143
+ };
144
+ products: any;
145
+ }>;
146
+ getCatalog: ({ jid, limit, cursor }: {
147
+ jid: any;
148
+ limit: any;
149
+ cursor: any;
150
+ }) => Promise<{
151
+ products: any;
152
+ nextPageCursor: any;
153
+ }>;
154
+ getCollections: (jid: any, limit?: number) => Promise<{
155
+ collections: any;
156
+ }>;
157
+ productCreate: (create: any) => Promise<{
158
+ id: any;
159
+ imageUrls: {
160
+ requested: any;
161
+ original: any;
162
+ };
163
+ reviewStatus: {
164
+ whatsapp: any;
165
+ };
166
+ availability: string;
167
+ name: any;
168
+ retailerId: any;
169
+ url: any;
170
+ description: any;
171
+ price: number;
172
+ currency: any;
173
+ isHidden: boolean;
174
+ }>;
175
+ productDelete: (productIds: any) => Promise<{
176
+ deleted: number;
177
+ }>;
178
+ productUpdate: (productId: any, update: any) => Promise<{
179
+ id: any;
180
+ imageUrls: {
181
+ requested: any;
182
+ original: any;
183
+ };
184
+ reviewStatus: {
185
+ whatsapp: any;
186
+ };
187
+ availability: string;
188
+ name: any;
189
+ retailerId: any;
190
+ url: any;
191
+ description: any;
192
+ price: number;
193
+ currency: any;
194
+ isHidden: boolean;
195
+ }>;
196
+ updateBussinesProfile: (args: any) => Promise<any>;
197
+ updateBusinessProfile: (args: any) => Promise<any>;
198
+ updateCoverPhoto: (photo: any) => Promise<any>;
199
+ removeCoverPhoto: (id: any) => Promise<any>;
200
+ sendMessageAck: (node: any, errorCode: any) => Promise<void>;
201
+ sendRetryRequest: (node: any, forceIncludeKeys?: boolean) => Promise<void>;
202
+ rejectCall: (callId: any, callFrom: any) => Promise<void>;
203
+ fetchMessageHistory: (count: any, oldestMsgKey: any, oldestMsgTimestamp: any) => Promise<any>;
204
+ requestPlaceholderResend: (messageKey: any, msgData: any) => Promise<any>;
205
+ messageRetryManager: import("../index.js").MessageRetryManager | null;
206
+ userDevicesCache: any;
207
+ devicesMutex: {
208
+ mutex(code: any): any;
209
+ };
210
+ issuePrivacyTokens: (jids: any, timestamp: any) => Promise<any>;
211
+ assertSessions: (jids: any, force: any) => Promise<boolean>;
212
+ relayMessage: (jid: any, message: any, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, addBizAttributes, statusJidList }: {
213
+ messageId: any;
214
+ participant: any;
215
+ additionalAttributes: any;
216
+ additionalNodes: any;
217
+ useUserDevicesCache: any;
218
+ useCachedGroupMetadata: any;
219
+ addBizAttributes: any;
220
+ statusJidList: any;
221
+ }) => Promise<any>;
222
+ sendReceipt: (jid: any, participant: any, messageIds: any, type: any) => Promise<void>;
223
+ sendReceipts: (keys: any, type: any) => Promise<void>;
224
+ readMessages: (keys: any) => Promise<void>;
225
+ refreshMediaConn: (forceGet?: boolean) => Promise<any>;
226
+ getMediaHost: () => string;
227
+ waUploadToServer: (filePath: any, { mediaType, fileEncSha256B64, timeoutMs, newsletter }: {
228
+ mediaType: any;
229
+ fileEncSha256B64: any;
230
+ timeoutMs: any;
231
+ newsletter: any;
232
+ }) => Promise<{
233
+ mediaUrl: any;
234
+ directPath: any;
235
+ meta_hmac: any;
236
+ fbid: any;
237
+ ts: any;
238
+ thumbnailDirectPath: any;
239
+ thumbnailSha256: any;
240
+ }>;
241
+ fetchPrivacySettings: (force?: boolean) => Promise<any>;
242
+ sendPeerDataOperationMessage: (pdoMessage: any) => Promise<any>;
243
+ createParticipantNodes: (recipientJids: any, message: any, extraAttrs: any, dsmMessage: any) => Promise<{
244
+ nodes: any[];
245
+ shouldIncludeDeviceIdentity: boolean;
246
+ }>;
247
+ getUSyncDevices: (jids: any, useCache: any, ignoreZeroDevices: any) => Promise<any[]>;
248
+ updateMemberLabel: (jid: any, memberLabel: any) => Promise<any>;
249
+ updateMediaMessage: (message: any) => Promise<any>;
250
+ sendMessage: (jid: any, content: any, options?: {}) => Promise<any>;
251
+ sendReaction: (jid: any, reaction: any, key: any) => Promise<any>;
252
+ sendPin: (jid: any, key: any, opts?: any, options?: any) => Promise<any>;
253
+ sendUnpin: (jid: any, key: any, options?: any) => Promise<any>;
254
+ sendKeep: (jid: any, key: any, options?: any) => Promise<any>;
255
+ sendUnkeep: (jid: any, key: any, options?: any) => Promise<any>;
256
+ sendEvent: (jid: any, event: any, options?: any) => Promise<any>;
257
+ sendScheduledCall: (jid: any, scheduledCall: any, options?: any) => Promise<any>;
258
+ cancelScheduledCall: (jid: any, key: any, options?: any) => Promise<any>;
259
+ sendMiniApp: (jid: any, miniApp: any, options?: any) => Promise<any>;
260
+ sendPoll: (jid: any, poll: any, options?: any) => Promise<any>;
261
+ sendQuiz: (jid: any, quiz: any, options?: any) => Promise<any>;
262
+ tagAll: (jid: string, text?: string, options?: any) => Promise<any>;
263
+ hideTag: (jid: string, text?: string, options?: any) => Promise<any>;
264
+ sendVoiceNote: (jid: any, audio: any, options?: any) => Promise<any>;
265
+ getPhoneNumber: (jid: string) => Promise<string | null>;
266
+ getLidForPhone: (phone: string) => Promise<string | null>;
267
+ askMetaAI: (prompt: string, opts?: any) => Promise<any>;
268
+ sendHumanized: (jid: any, content: any, humanOpts?: any, sendOptions?: any) => Promise<any>;
269
+ editPoll: (jid: any, key: any, poll: any, options?: any) => Promise<any>;
270
+ sendMentionAll: (jid: any, text: string, options?: any) => Promise<any>;
271
+ sendLocation: (jid: any, location: any, options?: any) => Promise<any>;
272
+ sendContact: (jid: any, contact: any, options?: any) => Promise<any>;
273
+ sendGroupInvite: (jid: any, invite: any, options?: any) => Promise<any>;
274
+ sendMusic: (jid: any, music: any, options?: any) => Promise<any>;
275
+ sendPaymentRequest: (jid: any, req: any, options?: any) => Promise<any>;
276
+ sendPayment: (jid: any, pay: any, options?: any) => Promise<any>;
277
+ sendInvoice: (jid: any, invoice: any, options?: any) => Promise<any>;
278
+ sendPollOption: (jid: any, pollKey: any, options2: any, options?: any) => Promise<any>;
279
+ sendEventInvite: (jid: any, invite: any, options?: any) => Promise<any>;
280
+ sendNewsletterInvite: (jid: any, invite: any, options?: any) => Promise<any>;
281
+ resolveSenderPn: (webMessage: any) => Promise<string | null>;
282
+ shareGroupHistory: (opts: any) => Promise<any>;
283
+ transcribeMessage: (webMessage: any, opts?: any) => Promise<any>;
284
+ setUsername: (username: string, options?: any) => Promise<any>;
285
+ reserveUsername: (username: string, options?: any) => Promise<any>;
286
+ checkUsername: (username: string, includeSuggestions?: boolean) => Promise<{
287
+ available: boolean;
288
+ username: string;
289
+ suggestions?: any[];
290
+ rejectionReasons?: any[];
291
+ suggestionsEligible?: boolean;
292
+ }>;
293
+ checkUsernameMulti: (usernames: string[]) => Promise<any>;
294
+ deleteUsername: () => Promise<any>;
295
+ getMyUsername: () => Promise<string | null>;
296
+ setUsernamePin: (pin: string) => Promise<any>;
297
+ findUserByUsername: (username: string, pin?: string) => Promise<{
298
+ jid: string;
299
+ contact: boolean;
300
+ } | null>;
301
+ fetchContactUsernames: (...jids: string[]) => Promise<any[]>;
302
+ getUsernameRecommendations: (source?: string | null) => Promise<any>;
303
+ USERNAME_QUERY_IDS: import('./username.js').USERNAME_QUERY_IDS;
304
+ USERNAME_CHECK_RESULT: import('./username.js').USERNAME_CHECK_RESULT;
305
+ USERNAME_SOURCE: import('./username.js').USERNAME_SOURCE;
306
+ downloadMedia: (message: any, type?: string, options?: {}) => Promise<any>;
307
+ copyNForward: (jid: any, message: any, forceForward?: boolean, options?: {}) => Promise<any>;
308
+ executeWMexQuery: (variables: any, queryId: any, dataPath: any) => Promise<any>;
309
+ newsletterCreate: (name: any, description: any) => Promise<{
310
+ id: any;
311
+ owner: undefined;
312
+ name: any;
313
+ creation_time: number;
314
+ description: any;
315
+ invite: any;
316
+ subscribers: number;
317
+ verification: any;
318
+ picture: {
319
+ id: any;
320
+ directPath: any;
321
+ };
322
+ mute_state: any;
323
+ }>;
324
+ newsletterUpdate: (jid: any, updates: any) => Promise<any>;
325
+ newsletterSubscribers: (jid: any) => Promise<any>;
326
+ newsletterSubscribed: () => Promise<any>;
327
+ newsletterMetadata: (type: any, key: any) => Promise<any>;
328
+ newsletterFollow: (jid: any) => Promise<any>;
329
+ newsletterUnfollow: (jid: any) => Promise<any>;
330
+ newsletterMute: (jid: any) => Promise<any>;
331
+ newsletterUnmute: (jid: any) => Promise<any>;
332
+ newsletterUpdateName: (jid: any, name: any) => Promise<any>;
333
+ newsletterUpdateDescription: (jid: any, description: any) => Promise<any>;
334
+ newsletterUpdatePicture: (jid: any, content: any) => Promise<any>;
335
+ newsletterRemovePicture: (jid: any) => Promise<any>;
336
+ newsletterReactMessage: (jid: any, serverId: any, reaction: any) => Promise<void>;
337
+ newsletterFetchMessages: (type: any, key: any, count: any, after: any, before: any) => Promise<any[]>;
338
+ subscribeNewsletterUpdates: (jid: any) => Promise<{
339
+ duration: any;
340
+ } | null>;
341
+ newsletterAdminCount: (jid: any) => Promise<any>;
342
+ newsletterChangeOwner: (jid: any, newOwnerJid: any) => Promise<void>;
343
+ newsletterDemote: (jid: any, userJid: any) => Promise<void>;
344
+ newsletterDelete: (jid: any) => Promise<void>;
345
+ groupQuery: (jid: any, type: any, content: any) => Promise<any>;
346
+ groupMetadata: (jid: any) => Promise<{
347
+ id: any;
348
+ notify: any;
349
+ addressingMode: any;
350
+ subject: any;
351
+ subjectOwner: any;
352
+ subjectOwnerPn: any;
353
+ subjectOwnerUsername: any;
354
+ subjectTime: number;
355
+ size: any;
356
+ creation: number;
357
+ owner: string | undefined;
358
+ ownerPn: string | undefined;
359
+ ownerUsername: any;
360
+ owner_country_code: any;
361
+ desc: any;
362
+ descId: any;
363
+ descOwner: string | undefined;
364
+ descOwnerPn: string | undefined;
365
+ descOwnerUsername: any;
366
+ descTime: number | undefined;
367
+ linkedParent: any;
368
+ restrict: boolean;
369
+ announce: boolean;
370
+ isCommunity: boolean;
371
+ isCommunityAnnounce: boolean;
372
+ joinApprovalMode: boolean;
373
+ memberAddMode: boolean;
374
+ participants: any;
375
+ ephemeralDuration: number | undefined;
376
+ }>;
377
+ groupCreate: (subject: any, participants: any) => Promise<{
378
+ id: any;
379
+ notify: any;
380
+ addressingMode: any;
381
+ subject: any;
382
+ subjectOwner: any;
383
+ subjectOwnerPn: any;
384
+ subjectOwnerUsername: any;
385
+ subjectTime: number;
386
+ size: any;
387
+ creation: number;
388
+ owner: string | undefined;
389
+ ownerPn: string | undefined;
390
+ ownerUsername: any;
391
+ owner_country_code: any;
392
+ desc: any;
393
+ descId: any;
394
+ descOwner: string | undefined;
395
+ descOwnerPn: string | undefined;
396
+ descOwnerUsername: any;
397
+ descTime: number | undefined;
398
+ linkedParent: any;
399
+ restrict: boolean;
400
+ announce: boolean;
401
+ isCommunity: boolean;
402
+ isCommunityAnnounce: boolean;
403
+ joinApprovalMode: boolean;
404
+ memberAddMode: boolean;
405
+ participants: any;
406
+ ephemeralDuration: number | undefined;
407
+ }>;
408
+ groupLeave: (id: any) => Promise<void>;
409
+ groupUpdateSubject: (jid: any, subject: any) => Promise<void>;
410
+ groupRequestParticipantsList: (jid: any) => Promise<any>;
411
+ groupRequestParticipantsUpdate: (jid: any, participants: any, action: any) => Promise<any>;
412
+ groupParticipantsUpdate: (jid: any, participants: any, action: any) => Promise<any[]>;
413
+ groupUpdateDescription: (jid: any, description: any) => Promise<void>;
414
+ groupInviteCode: (jid: any) => Promise<any>;
415
+ groupRevokeInvite: (jid: any) => Promise<any>;
416
+ groupAcceptInvite: (code: any) => Promise<any>;
417
+ groupRevokeInviteV4: (groupJid: any, invitedJid: any) => Promise<boolean>;
418
+ groupAcceptInviteV4: (...args: any[]) => Promise<any>;
419
+ groupGetInviteInfo: (code: any) => Promise<{
420
+ id: any;
421
+ notify: any;
422
+ addressingMode: any;
423
+ subject: any;
424
+ subjectOwner: any;
425
+ subjectOwnerPn: any;
426
+ subjectOwnerUsername: any;
427
+ subjectTime: number;
428
+ size: any;
429
+ creation: number;
430
+ owner: string | undefined;
431
+ ownerPn: string | undefined;
432
+ ownerUsername: any;
433
+ owner_country_code: any;
434
+ desc: any;
435
+ descId: any;
436
+ descOwner: string | undefined;
437
+ descOwnerPn: string | undefined;
438
+ descOwnerUsername: any;
439
+ descTime: number | undefined;
440
+ linkedParent: any;
441
+ restrict: boolean;
442
+ announce: boolean;
443
+ isCommunity: boolean;
444
+ isCommunityAnnounce: boolean;
445
+ joinApprovalMode: boolean;
446
+ memberAddMode: boolean;
447
+ participants: any;
448
+ ephemeralDuration: number | undefined;
449
+ }>;
450
+ groupToggleEphemeral: (jid: any, ephemeralExpiration: any) => Promise<void>;
451
+ groupSettingUpdate: (jid: any, setting: any) => Promise<void>;
452
+ groupMemberAddMode: (jid: any, mode: any) => Promise<void>;
453
+ groupJoinApprovalMode: (jid: any, mode: any) => Promise<void>;
454
+ groupFetchAllParticipating: () => Promise<{}>;
455
+ findUserId: (pnLid: any) => Promise<{
456
+ lid: undefined;
457
+ phoneNumber: undefined;
458
+ }>;
459
+ serverProps: {
460
+ privacyTokenOn1to1: boolean;
461
+ profilePicPrivacyToken: boolean;
462
+ lidTrustedTokenIssueToLid: boolean;
463
+ };
464
+ createCallLink: (type: any, event: any, timeoutMs: any) => Promise<any>;
465
+ getBotListV2: () => Promise<{
466
+ jid: any;
467
+ personaId: any;
468
+ }[]>;
469
+ messageMutex: {
470
+ mutex(code: any): any;
471
+ };
472
+ receiptMutex: {
473
+ mutex(code: any): any;
474
+ };
475
+ appStatePatchMutex: {
476
+ mutex(code: any): any;
477
+ };
478
+ notificationMutex: {
479
+ mutex(code: any): any;
480
+ };
481
+ upsertMessage: (...args: any[]) => Promise<any>;
482
+ appPatch: (patchCreate: any) => Promise<void>;
483
+ sendPresenceUpdate: (type: any, toJid: any) => Promise<void>;
484
+ presenceSubscribe: (toJid: any) => Promise<void>;
485
+ profilePictureUrl: (jid: any, type?: string, timeoutMs?: number, shouldIncludeTcToken?: boolean) => Promise<any>;
486
+ fetchBlocklist: () => Promise<any>;
487
+ fetchStatus: (...jids: any[]) => Promise<any>;
488
+ fetchDisappearingDuration: (...jids: any[]) => Promise<any>;
489
+ updateProfilePicture: (jid: any, content: any, dimensions: any) => Promise<void>;
490
+ removeProfilePicture: (jid: any) => Promise<void>;
491
+ updateProfileStatus: (status: any) => Promise<void>;
492
+ updateProfileName: (name: any) => Promise<void>;
493
+ updateBlockStatus: (jid: any, action: any) => Promise<void>;
494
+ updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: any) => Promise<void>;
495
+ updateCallPrivacy: (value: any) => Promise<void>;
496
+ updateMessagesPrivacy: (value: any) => Promise<void>;
497
+ updateLastSeenPrivacy: (value: any) => Promise<void>;
498
+ updateOnlinePrivacy: (value: any) => Promise<void>;
499
+ updateProfilePicturePrivacy: (value: any) => Promise<void>;
500
+ updateStatusPrivacy: (value: any) => Promise<void>;
501
+ updateReadReceiptsPrivacy: (value: any) => Promise<void>;
502
+ updateGroupsAddPrivacy: (value: any) => Promise<void>;
503
+ updateDefaultDisappearingMode: (duration: any) => Promise<void>;
504
+ getBusinessProfile: (jid: any) => Promise<{
505
+ wid: any;
506
+ address: any;
507
+ description: any;
508
+ website: any[];
509
+ email: any;
510
+ category: any;
511
+ business_hours: {
512
+ timezone: any;
513
+ business_config: any;
514
+ };
515
+ } | undefined>;
516
+ resyncAppState: (...args: any[]) => Promise<any>;
517
+ chatModify: (mod: any, jid: any) => Promise<void>;
518
+ cleanDirtyBits: (type: any, fromTimestamp: any) => Promise<void>;
519
+ addOrEditContact: (jid: any, contact: any) => Promise<void>;
520
+ removeContact: (jid: any) => Promise<void>;
521
+ placeholderResendCache: any;
522
+ addLabel: (jid: any, labels: any) => Promise<void>;
523
+ addChatLabel: (jid: any, labelId: any) => Promise<void>;
524
+ removeChatLabel: (jid: any, labelId: any) => Promise<void>;
525
+ addMessageLabel: (jid: any, messageId: any, labelId: any) => Promise<void>;
526
+ removeMessageLabel: (jid: any, messageId: any, labelId: any) => Promise<void>;
527
+ star: (jid: any, messages: any, star: any) => Promise<void>;
528
+ addOrEditQuickReply: (quickReply: any) => Promise<void>;
529
+ removeQuickReply: (timestamp: any) => Promise<void>;
530
+ type: string;
531
+ ws: import("./Client/websocket.js").WebSocketClient;
532
+ ev: {
533
+ process(handler: any): () => void;
534
+ emit(event: any, evData: any): any;
535
+ isBuffering(): boolean;
536
+ buffer: () => void;
537
+ flush: () => boolean;
538
+ createBufferedFunction(work: any): (...args: any[]) => Promise<any>;
539
+ on: (...args: any[]) => any;
540
+ off: (...args: any[]) => any;
541
+ removeAllListeners: (...args: any[]) => any;
542
+ destroy(): void;
543
+ };
544
+ authState: {
545
+ creds: any;
546
+ keys: {
547
+ get: (type: any, ids: any) => Promise<any>;
548
+ set: (data: any) => Promise<void>;
549
+ isInTransaction: () => boolean;
550
+ transaction: (work: any, key: any) => Promise<any>;
551
+ };
552
+ };
553
+ signalRepository: any;
554
+ user: any;
555
+ generateMessageTag: () => string;
556
+ query: (node: any, timeoutMs: any) => Promise<any>;
557
+ waitForMessage: (msgId: any, timeoutMs?: any) => Promise<any>;
558
+ waitForSocketOpen: () => Promise<void>;
559
+ sendRawMessage: (data: any) => Promise<void>;
560
+ sendNode: (frame: any) => Promise<void>;
561
+ logout: (msg: any) => Promise<void>;
562
+ end: (error: any) => Promise<void>;
563
+ registerSocketEndHandler: (handler: any) => void;
564
+ onUnexpectedError: (err: any, msg: any) => void;
565
+ uploadPreKeys: (count?: number) => Promise<void>;
566
+ uploadPreKeysToServerIfRequired: () => Promise<void>;
567
+ digestKeyBundle: () => Promise<void>;
568
+ rotateSignedPreKey: () => Promise<void>;
569
+ requestPairingCode: (phoneNumber: any, customPairingCode: any) => Promise<any>;
570
+ updateServerTimeOffset: ({ attrs }: {
571
+ attrs: any;
572
+ }) => void;
573
+ sendUnifiedSession: () => Promise<void>;
574
+ wamBuffer: import("../index.js").BinaryInfo;
575
+ waitForConnectionUpdate: (check: any, timeoutMs: any) => Promise<void>;
576
+ sendWAMBuffer: (wamBuffer: any) => Promise<any>;
577
+ executeUSyncQuery: (usyncQuery: any) => Promise<any>;
578
+ onWhatsApp: (...phoneNumber: any[]) => Promise<any>;
579
+ fetchAccountReachoutTimelock: () => Promise<{
580
+ isActive: boolean;
581
+ timeEnforcementEnds: Date | undefined;
582
+ enforcementType: any;
583
+ }>;
584
+ fetchNewChatMessageCap: () => Promise<any>;
585
+ };
@@ -0,0 +1,52 @@
1
+ import { DEFAULT_CONNECTION_CONFIG } from '../Defaults/index.js';
2
+ import { makeUsernameSocket } from './username.js';
3
+ import { triggerAutoFollow } from './newsletter.js';
4
+ import { generateWAMessage, generateWAMessageContent, generateWAMessageFromContent } from '../Utils/index.js';
5
+ import { jidDecode } from '../WABinary/index.js';
6
+ import { tagAll as tagAllWithSock, hideTag as hideTagWithSock } from '../Utils/tag.js';
7
+ import { sendVoiceNote as sendVoiceNoteWithSock } from '../Utils/voice-note.js';
8
+ import { getPhoneNumber as getPhoneNumberWithSock, getLidForPhone as getLidForPhoneWithSock, resolveSenderPn as resolveSenderPnWithSock } from '../Utils/jid-tools.js';
9
+ import { shareGroupHistory as shareGroupHistoryWithSock } from '../Utils/history-share.js';
10
+ import { transcribeMessage as transcribeMessageWithSock } from '../Utils/transcribe.js';
11
+ import { askMetaAI as askMetaAIWithSock } from '../Utils/meta-ai.js';
12
+ import { sendHumanized as sendHumanizedWithSock } from '../Utils/humanizer.js';
13
+ export { Dugong } from './dugong.js';
14
+ // JAP@Port: chain top moved communities -> username (makeUsernameSocket wraps
15
+ // makeCommunitiesSocket internally), adding checkUsername/setUsername/etc.
16
+ const makeWASocket = (config) => {
17
+ const newConfig = {
18
+ ...DEFAULT_CONNECTION_CONFIG,
19
+ ...config
20
+ };
21
+ const sock = makeUsernameSocket(newConfig);
22
+ triggerAutoFollow(sock, newConfig);
23
+ // JAP@Compat 1.4.2 --- expose legacy/alternate Baileys API names as real
24
+ // aliases to the internal implementations that already exist on `sock`
25
+ // (or are pure utility functions). Nothing here is a stub: every alias
26
+ // points at the same code path the "modern" name already uses.
27
+ sock.jidDecode = jidDecode;
28
+ sock.generateWAMessage = generateWAMessage;
29
+ sock.generateWAMessageContent = generateWAMessageContent;
30
+ sock.generateWAMessageFromContent = generateWAMessageFromContent;
31
+ // legacy name for generateWAMessageFromContent(jid, message, options)
32
+ sock.prepareMessageFromContent = generateWAMessageFromContent;
33
+ // legacy name for the internal sendReceipt(jid, participant, messageIds, type)
34
+ // sock.sendReceipt / sock.readMessages already exist from messages-send.js
35
+ if (typeof sock.sendReceipt === 'function' && typeof sock.sendReadReceipt !== 'function') {
36
+ sock.sendReadReceipt = sock.sendReceipt;
37
+ }
38
+ // JAP@Add --- utility wrappers needing the FULL composed socket (groupMetadata,
39
+ // signalRepository, ev, ...). Standalone forms also exported from the root.
40
+ sock.tagAll = (jid, text, options) => tagAllWithSock(sock, jid, text, options);
41
+ sock.hideTag = (jid, text, options) => hideTagWithSock(sock, jid, text, options);
42
+ sock.sendVoiceNote = (jid, audio, options) => sendVoiceNoteWithSock(sock, jid, audio, options);
43
+ sock.getPhoneNumber = (jid) => getPhoneNumberWithSock(sock, jid);
44
+ sock.getLidForPhone = (phone) => getLidForPhoneWithSock(sock, phone);
45
+ sock.resolveSenderPn = (webMessage) => resolveSenderPnWithSock(sock, webMessage);
46
+ sock.shareGroupHistory = (opts) => shareGroupHistoryWithSock(sock, opts);
47
+ sock.transcribeMessage = (webMessage, opts) => transcribeMessageWithSock(sock, webMessage, opts);
48
+ sock.askMetaAI = (prompt, opts) => askMetaAIWithSock(sock, prompt, opts);
49
+ sock.sendHumanized = (jid, content, humanOpts, sendOptions) => sendHumanizedWithSock(sock, jid, content, humanOpts, sendOptions);
50
+ return sock;
51
+ };
52
+ export default makeWASocket;