@vanzxysenpai/baileys 0.0.0-stage → 0.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 (431) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/LICENSE +25 -0
  3. package/NOTICE.md +158 -0
  4. package/README.md +5294 -2
  5. package/VanzxyBanner.js +134 -0
  6. package/WAProto/index.d.ts +13317 -0
  7. package/WAProto/index.js +147553 -0
  8. package/lib/Builders/A2UI.d.ts +131 -0
  9. package/lib/Builders/A2UI.js +343 -0
  10. package/lib/Builders/AIRich.d.ts +1021 -0
  11. package/lib/Builders/AIRich.js +2889 -0
  12. package/lib/Builders/Album.d.ts +51 -0
  13. package/lib/Builders/Album.js +99 -0
  14. package/lib/Builders/Button.d.ts +137449 -0
  15. package/lib/Builders/Button.js +1054 -0
  16. package/lib/Builders/ButtonV2.d.ts +43 -0
  17. package/lib/Builders/ButtonV2.js +175 -0
  18. package/lib/Builders/ButtonV3.d.ts +35 -0
  19. package/lib/Builders/ButtonV3.js +189 -0
  20. package/lib/Builders/Carousel.d.ts +68 -0
  21. package/lib/Builders/Carousel.js +161 -0
  22. package/lib/Builders/Event.d.ts +61 -0
  23. package/lib/Builders/Event.js +118 -0
  24. package/lib/Builders/Expiring.d.ts +17 -0
  25. package/lib/Builders/Expiring.js +27 -0
  26. package/lib/Builders/Poll.d.ts +63 -0
  27. package/lib/Builders/Poll.js +139 -0
  28. package/lib/Builders/VanzxyBaileys.d.ts +42 -0
  29. package/lib/Builders/VanzxyBaileys.js +110 -0
  30. package/lib/Builders/errors.d.ts +25 -0
  31. package/lib/Builders/errors.js +29 -0
  32. package/lib/Builders/index.d.ts +14 -0
  33. package/lib/Builders/index.js +23 -0
  34. package/lib/Builders/shared.d.ts +395 -0
  35. package/lib/Builders/shared.js +738 -0
  36. package/lib/Defaults/bot-jid.d.ts +1 -0
  37. package/lib/Defaults/bot-jid.js +1 -0
  38. package/lib/Defaults/index.d.ts +161 -0
  39. package/lib/Defaults/index.js +165 -0
  40. package/lib/Defaults/version.d.ts +1 -0
  41. package/lib/Defaults/version.js +1 -0
  42. package/lib/Framework/Bot.d.ts +865 -0
  43. package/lib/Framework/Bot.js +230 -0
  44. package/lib/Framework/Context.d.ts +17 -0
  45. package/lib/Framework/Context.js +90 -0
  46. package/lib/Framework/MediaManager.d.ts +15 -0
  47. package/lib/Framework/MediaManager.js +154 -0
  48. package/lib/Framework/SessionManager.d.ts +10 -0
  49. package/lib/Framework/SessionManager.js +34 -0
  50. package/lib/Framework/StatsManager.d.ts +20 -0
  51. package/lib/Framework/StatsManager.js +117 -0
  52. package/lib/Framework/Store/SQLiteStore.d.ts +13 -0
  53. package/lib/Framework/Store/SQLiteStore.js +68 -0
  54. package/lib/Framework/index.d.ts +6 -0
  55. package/lib/Framework/index.js +11 -0
  56. package/lib/Signal/Group/ciphertext-message.d.ts +9 -0
  57. package/lib/Signal/Group/ciphertext-message.js +11 -0
  58. package/lib/Signal/Group/group-session-builder.d.ts +7 -0
  59. package/lib/Signal/Group/group-session-builder.js +29 -0
  60. package/lib/Signal/Group/group_cipher.d.ts +10 -0
  61. package/lib/Signal/Group/group_cipher.js +81 -0
  62. package/lib/Signal/Group/index.d.ts +11 -0
  63. package/lib/Signal/Group/index.js +11 -0
  64. package/lib/Signal/Group/keyhelper.d.ts +6 -0
  65. package/lib/Signal/Group/keyhelper.js +17 -0
  66. package/lib/Signal/Group/sender-chain-key.d.ts +13 -0
  67. package/lib/Signal/Group/sender-chain-key.js +25 -0
  68. package/lib/Signal/Group/sender-key-distribution-message.d.ts +16 -0
  69. package/lib/Signal/Group/sender-key-distribution-message.js +62 -0
  70. package/lib/Signal/Group/sender-key-message.d.ts +18 -0
  71. package/lib/Signal/Group/sender-key-message.js +65 -0
  72. package/lib/Signal/Group/sender-key-name.d.ts +11 -0
  73. package/lib/Signal/Group/sender-key-name.js +47 -0
  74. package/lib/Signal/Group/sender-key-record.d.ts +12 -0
  75. package/lib/Signal/Group/sender-key-record.js +40 -0
  76. package/lib/Signal/Group/sender-key-state.d.ts +16 -0
  77. package/lib/Signal/Group/sender-key-state.js +83 -0
  78. package/lib/Signal/Group/sender-message-key.d.ts +11 -0
  79. package/lib/Signal/Group/sender-message-key.js +25 -0
  80. package/lib/Signal/libsignal.d.ts +58 -0
  81. package/lib/Signal/libsignal.js +436 -0
  82. package/lib/Signal/lid-mapping.d.ts +20 -0
  83. package/lib/Signal/lid-mapping.js +276 -0
  84. package/lib/Socket/Client/index.d.ts +2 -0
  85. package/lib/Socket/Client/index.js +2 -0
  86. package/lib/Socket/Client/types.d.ts +5 -0
  87. package/lib/Socket/Client/types.js +10 -0
  88. package/lib/Socket/Client/websocket.d.ts +12 -0
  89. package/lib/Socket/Client/websocket.js +53 -0
  90. package/lib/Socket/business.d.ts +674 -0
  91. package/lib/Socket/business.js +379 -0
  92. package/lib/Socket/chats.d.ts +137 -0
  93. package/lib/Socket/chats.js +1299 -0
  94. package/lib/Socket/communities.d.ts +805 -0
  95. package/lib/Socket/communities.js +454 -0
  96. package/lib/Socket/dugong.d.ts +118 -0
  97. package/lib/Socket/dugong.js +810 -0
  98. package/lib/Socket/groups.d.ts +287 -0
  99. package/lib/Socket/groups.js +386 -0
  100. package/lib/Socket/index.d.ts +826 -0
  101. package/lib/Socket/index.js +35 -0
  102. package/lib/Socket/messages-recv.d.ts +613 -0
  103. package/lib/Socket/messages-recv.js +1851 -0
  104. package/lib/Socket/messages-send.d.ts +608 -0
  105. package/lib/Socket/messages-send.js +1574 -0
  106. package/lib/Socket/mex-fallback.d.ts +51 -0
  107. package/lib/Socket/mex-fallback.js +97 -0
  108. package/lib/Socket/mex.d.ts +1 -0
  109. package/lib/Socket/mex.js +41 -0
  110. package/lib/Socket/newsletter-ext.d.ts +47 -0
  111. package/lib/Socket/newsletter-ext.js +262 -0
  112. package/lib/Socket/newsletter.d.ts +285 -0
  113. package/lib/Socket/newsletter.js +223 -0
  114. package/lib/Socket/socket.d.ts +60 -0
  115. package/lib/Socket/socket.js +1001 -0
  116. package/lib/Socket/username.d.ts +842 -0
  117. package/lib/Socket/username.js +156 -0
  118. package/lib/Store/index.d.ts +3 -0
  119. package/lib/Store/index.js +3 -0
  120. package/lib/Store/make-in-memory-store.d.ts +62 -0
  121. package/lib/Store/make-in-memory-store.js +425 -0
  122. package/lib/Store/make-ordered-dictionary.d.ts +12 -0
  123. package/lib/Store/make-ordered-dictionary.js +78 -0
  124. package/lib/Store/object-repository.d.ts +10 -0
  125. package/lib/Store/object-repository.js +23 -0
  126. package/lib/Types/Auth.d.ts +1 -0
  127. package/lib/Types/Auth.js +1 -0
  128. package/lib/Types/Bussines.d.ts +1 -0
  129. package/lib/Types/Bussines.js +1 -0
  130. package/lib/Types/Call.d.ts +1 -0
  131. package/lib/Types/Call.js +1 -0
  132. package/lib/Types/Chat.d.ts +1 -0
  133. package/lib/Types/Chat.js +7 -0
  134. package/lib/Types/Contact.d.ts +1 -0
  135. package/lib/Types/Contact.js +1 -0
  136. package/lib/Types/Events.d.ts +1 -0
  137. package/lib/Types/Events.js +1 -0
  138. package/lib/Types/GroupMetadata.d.ts +1 -0
  139. package/lib/Types/GroupMetadata.js +1 -0
  140. package/lib/Types/Label.d.ts +2 -0
  141. package/lib/Types/Label.js +24 -0
  142. package/lib/Types/LabelAssociation.d.ts +2 -0
  143. package/lib/Types/LabelAssociation.js +6 -0
  144. package/lib/Types/Message.d.ts +11 -0
  145. package/lib/Types/Message.js +17 -0
  146. package/lib/Types/Mex.d.ts +2 -0
  147. package/lib/Types/Mex.js +38 -0
  148. package/lib/Types/Product.d.ts +1 -0
  149. package/lib/Types/Product.js +1 -0
  150. package/lib/Types/RichType.d.ts +2 -0
  151. package/lib/Types/RichType.js +22 -0
  152. package/lib/Types/Signal.d.ts +1 -0
  153. package/lib/Types/Signal.js +1 -0
  154. package/lib/Types/Socket.d.ts +1 -0
  155. package/lib/Types/Socket.js +1 -0
  156. package/lib/Types/State.d.ts +5 -0
  157. package/lib/Types/State.js +55 -0
  158. package/lib/Types/USync.d.ts +1 -0
  159. package/lib/Types/USync.js +1 -0
  160. package/lib/Types/index.d.ts +15 -0
  161. package/lib/Types/index.js +27 -0
  162. package/lib/Utils/PersistentStore.d.ts +83 -0
  163. package/lib/Utils/PersistentStore.js +592 -0
  164. package/lib/Utils/anchor-guard.d.ts +31 -0
  165. package/lib/Utils/anchor-guard.js +329 -0
  166. package/lib/Utils/android-stanza-id.d.ts +4 -0
  167. package/lib/Utils/android-stanza-id.js +21 -0
  168. package/lib/Utils/anti-delete.d.ts +62 -0
  169. package/lib/Utils/anti-delete.js +212 -0
  170. package/lib/Utils/auth-secure.d.ts +180 -0
  171. package/lib/Utils/auth-secure.js +791 -0
  172. package/lib/Utils/auth-utils.d.ts +59 -0
  173. package/lib/Utils/auth-utils.js +326 -0
  174. package/lib/Utils/auto-reconnect.d.ts +8 -0
  175. package/lib/Utils/auto-reconnect.js +204 -0
  176. package/lib/Utils/auto-reply.d.ts +35 -0
  177. package/lib/Utils/auto-reply.js +152 -0
  178. package/lib/Utils/bad-mac-handler.d.ts +59 -0
  179. package/lib/Utils/bad-mac-handler.js +119 -0
  180. package/lib/Utils/baileys-event-stream.d.ts +5 -0
  181. package/lib/Utils/baileys-event-stream.js +62 -0
  182. package/lib/Utils/browser-utils.d.ts +9 -0
  183. package/lib/Utils/browser-utils.js +29 -0
  184. package/lib/Utils/business.d.ts +49 -0
  185. package/lib/Utils/business.js +236 -0
  186. package/lib/Utils/button-helper-utils.d.ts +59 -0
  187. package/lib/Utils/button-helper-utils.js +266 -0
  188. package/lib/Utils/button-sender.d.ts +164 -0
  189. package/lib/Utils/button-sender.js +845 -0
  190. package/lib/Utils/chat-control.d.ts +98 -0
  191. package/lib/Utils/chat-control.js +231 -0
  192. package/lib/Utils/chat-history-helpers.d.ts +4 -0
  193. package/lib/Utils/chat-history-helpers.js +70 -0
  194. package/lib/Utils/chat-utils.d.ts +408 -0
  195. package/lib/Utils/chat-utils.js +879 -0
  196. package/lib/Utils/companion-reg-client-utils.d.ts +4 -0
  197. package/lib/Utils/companion-reg-client-utils.js +39 -0
  198. package/lib/Utils/connection-watchdog.d.ts +10 -0
  199. package/lib/Utils/connection-watchdog.js +74 -0
  200. package/lib/Utils/crypto.d.ts +41 -0
  201. package/lib/Utils/crypto.js +145 -0
  202. package/lib/Utils/decode-wa-message.d.ts +83 -0
  203. package/lib/Utils/decode-wa-message.js +315 -0
  204. package/lib/Utils/disconnect-reason.d.ts +13 -0
  205. package/lib/Utils/disconnect-reason.js +36 -0
  206. package/lib/Utils/event-buffer.d.ts +12 -0
  207. package/lib/Utils/event-buffer.js +640 -0
  208. package/lib/Utils/fetch-timeout.d.ts +4 -0
  209. package/lib/Utils/fetch-timeout.js +14 -0
  210. package/lib/Utils/ffmpeg-path.d.ts +5 -0
  211. package/lib/Utils/ffmpeg-path.js +130 -0
  212. package/lib/Utils/generics.d.ts +79 -0
  213. package/lib/Utils/generics.js +426 -0
  214. package/lib/Utils/group-metadata-cache.d.ts +3 -0
  215. package/lib/Utils/group-metadata-cache.js +25 -0
  216. package/lib/Utils/group-status-detection.d.ts +5 -0
  217. package/lib/Utils/group-status-detection.js +114 -0
  218. package/lib/Utils/history.d.ts +91 -0
  219. package/lib/Utils/history.js +144 -0
  220. package/lib/Utils/html-app.d.ts +14 -0
  221. package/lib/Utils/html-app.js +97 -0
  222. package/lib/Utils/html-multiplayer.d.ts +8 -0
  223. package/lib/Utils/html-multiplayer.js +90 -0
  224. package/lib/Utils/humanizer.d.ts +8 -0
  225. package/lib/Utils/humanizer.js +74 -0
  226. package/lib/Utils/identity-change-handler.d.ts +13 -0
  227. package/lib/Utils/identity-change-handler.js +49 -0
  228. package/lib/Utils/index.d.ts +88 -0
  229. package/lib/Utils/index.js +93 -0
  230. package/lib/Utils/jid-tools.d.ts +3 -0
  231. package/lib/Utils/jid-tools.js +78 -0
  232. package/lib/Utils/link-preview-metadata.d.ts +47 -0
  233. package/lib/Utils/link-preview-metadata.js +90 -0
  234. package/lib/Utils/link-preview.d.ts +12 -0
  235. package/lib/Utils/link-preview.js +84 -0
  236. package/lib/Utils/lock-manager.d.ts +5 -0
  237. package/lib/Utils/lock-manager.js +50 -0
  238. package/lib/Utils/logger.d.ts +2 -0
  239. package/lib/Utils/logger.js +2 -0
  240. package/lib/Utils/lt-hash.d.ts +12 -0
  241. package/lib/Utils/lt-hash.js +26 -0
  242. package/lib/Utils/make-mutex.d.ts +6 -0
  243. package/lib/Utils/make-mutex.js +32 -0
  244. package/lib/Utils/media-messages.d.ts +35 -0
  245. package/lib/Utils/media-messages.js +70 -0
  246. package/lib/Utils/media-processor.d.ts +6 -0
  247. package/lib/Utils/media-processor.js +174 -0
  248. package/lib/Utils/media-set.d.ts +6 -0
  249. package/lib/Utils/media-set.js +169 -0
  250. package/lib/Utils/message-kind.d.ts +26 -0
  251. package/lib/Utils/message-kind.js +138 -0
  252. package/lib/Utils/message-retry-manager.d.ts +79 -0
  253. package/lib/Utils/message-retry-manager.js +264 -0
  254. package/lib/Utils/message-search.d.ts +40 -0
  255. package/lib/Utils/message-search.js +181 -0
  256. package/lib/Utils/messages-media.d.ts +136 -0
  257. package/lib/Utils/messages-media.js +867 -0
  258. package/lib/Utils/messages.d.ts +66 -0
  259. package/lib/Utils/messages.js +2271 -0
  260. package/lib/Utils/meta-ai-msmsg.d.ts +3 -0
  261. package/lib/Utils/meta-ai-msmsg.js +132 -0
  262. package/lib/Utils/meta-ai.d.ts +4 -0
  263. package/lib/Utils/meta-ai.js +75 -0
  264. package/lib/Utils/migrate-auth-state.d.ts +23 -0
  265. package/lib/Utils/migrate-auth-state.js +126 -0
  266. package/lib/Utils/mini-app.d.ts +20 -0
  267. package/lib/Utils/mini-app.js +215 -0
  268. package/lib/Utils/mock-socket.d.ts +67 -0
  269. package/lib/Utils/mock-socket.js +254 -0
  270. package/lib/Utils/modern-messages.d.ts +64 -0
  271. package/lib/Utils/modern-messages.js +497 -0
  272. package/lib/Utils/native-flow.d.ts +19 -0
  273. package/lib/Utils/native-flow.js +112 -0
  274. package/lib/Utils/newsletter-status.d.ts +157 -0
  275. package/lib/Utils/newsletter-status.js +652 -0
  276. package/lib/Utils/noise-handler.d.ts +20 -0
  277. package/lib/Utils/noise-handler.js +200 -0
  278. package/lib/Utils/offline-node-processor.d.ts +9 -0
  279. package/lib/Utils/offline-node-processor.js +39 -0
  280. package/lib/Utils/pairing-utils.d.ts +5 -0
  281. package/lib/Utils/pairing-utils.js +29 -0
  282. package/lib/Utils/passkey.d.ts +4 -0
  283. package/lib/Utils/passkey.js +11 -0
  284. package/lib/Utils/past-participants.d.ts +2 -0
  285. package/lib/Utils/past-participants.js +40 -0
  286. package/lib/Utils/payment-detection.d.ts +40 -0
  287. package/lib/Utils/payment-detection.js +213 -0
  288. package/lib/Utils/payment-guard.d.ts +28 -0
  289. package/lib/Utils/payment-guard.js +143 -0
  290. package/lib/Utils/payment-messages.d.ts +42 -0
  291. package/lib/Utils/payment-messages.js +161 -0
  292. package/lib/Utils/payment-utils.d.ts +75 -0
  293. package/lib/Utils/payment-utils.js +145 -0
  294. package/lib/Utils/phone-utils.d.ts +3 -0
  295. package/lib/Utils/phone-utils.js +29 -0
  296. package/lib/Utils/pre-key-manager.d.ts +25 -0
  297. package/lib/Utils/pre-key-manager.js +105 -0
  298. package/lib/Utils/process-message.d.ts +103 -0
  299. package/lib/Utils/process-message.js +868 -0
  300. package/lib/Utils/qr-terminal.d.ts +1 -0
  301. package/lib/Utils/qr-terminal.js +16 -0
  302. package/lib/Utils/reconnect-backoff.d.ts +25 -0
  303. package/lib/Utils/reconnect-backoff.js +47 -0
  304. package/lib/Utils/reporting-utils.d.ts +12 -0
  305. package/lib/Utils/reporting-utils.js +257 -0
  306. package/lib/Utils/rich-message-utils.d.ts +54 -0
  307. package/lib/Utils/rich-message-utils.js +435 -0
  308. package/lib/Utils/rich-messages.d.ts +298 -0
  309. package/lib/Utils/rich-messages.js +1145 -0
  310. package/lib/Utils/scheduled-message.d.ts +81 -0
  311. package/lib/Utils/scheduled-message.js +101 -0
  312. package/lib/Utils/scheduling.d.ts +59 -0
  313. package/lib/Utils/scheduling.js +139 -0
  314. package/lib/Utils/signal.d.ts +82 -0
  315. package/lib/Utils/signal.js +200 -0
  316. package/lib/Utils/stanza-ack.d.ts +16 -0
  317. package/lib/Utils/stanza-ack.js +37 -0
  318. package/lib/Utils/status-stickers.d.ts +79 -0
  319. package/lib/Utils/status-stickers.js +261 -0
  320. package/lib/Utils/status.d.ts +107 -0
  321. package/lib/Utils/status.js +131 -0
  322. package/lib/Utils/sticker-pack-maker.d.ts +20 -0
  323. package/lib/Utils/sticker-pack-maker.js +112 -0
  324. package/lib/Utils/stickerpack.d.ts +18 -0
  325. package/lib/Utils/stickerpack.js +316 -0
  326. package/lib/Utils/sync-action-utils.d.ts +2 -0
  327. package/lib/Utils/sync-action-utils.js +48 -0
  328. package/lib/Utils/tag.d.ts +8 -0
  329. package/lib/Utils/tag.js +45 -0
  330. package/lib/Utils/tc-token-utils.d.ts +29 -0
  331. package/lib/Utils/tc-token-utils.js +162 -0
  332. package/lib/Utils/templates.d.ts +86 -0
  333. package/lib/Utils/templates.js +148 -0
  334. package/lib/Utils/text-format.d.ts +13 -0
  335. package/lib/Utils/text-format.js +81 -0
  336. package/lib/Utils/text-tools.d.ts +3 -0
  337. package/lib/Utils/text-tools.js +38 -0
  338. package/lib/Utils/ttl-cache.d.ts +29 -0
  339. package/lib/Utils/ttl-cache.js +123 -0
  340. package/lib/Utils/use-cache-manager-auth-state.d.ts +22 -0
  341. package/lib/Utils/use-cache-manager-auth-state.js +86 -0
  342. package/lib/Utils/use-multi-file-auth-state.d.ts +20 -0
  343. package/lib/Utils/use-multi-file-auth-state.js +201 -0
  344. package/lib/Utils/use-single-file-auth-state.d.ts +10 -0
  345. package/lib/Utils/use-single-file-auth-state.js +111 -0
  346. package/lib/Utils/use-sqlite-auth-state.d.ts +13 -0
  347. package/lib/Utils/use-sqlite-auth-state.js +171 -0
  348. package/lib/Utils/username.d.ts +22 -0
  349. package/lib/Utils/username.js +59 -0
  350. package/lib/Utils/validate-connection.d.ts +43 -0
  351. package/lib/Utils/validate-connection.js +197 -0
  352. package/lib/Utils/vcard.d.ts +40 -0
  353. package/lib/Utils/vcard.js +92 -0
  354. package/lib/Utils/voice-note.d.ts +13 -0
  355. package/lib/Utils/voice-note.js +47 -0
  356. package/lib/VoIP/audio-feeder.d.ts +15 -0
  357. package/lib/VoIP/audio-feeder.js +132 -0
  358. package/lib/VoIP/index.d.ts +22 -0
  359. package/lib/VoIP/index.js +277 -0
  360. package/lib/VoIP/relay-transport.d.ts +16 -0
  361. package/lib/VoIP/relay-transport.js +559 -0
  362. package/lib/VoIP/signaling.d.ts +16 -0
  363. package/lib/VoIP/signaling.js +624 -0
  364. package/lib/VoIP/types.d.ts +11 -0
  365. package/lib/VoIP/types.js +17 -0
  366. package/lib/VoIP/wasm-engine.d.ts +28 -0
  367. package/lib/VoIP/wasm-engine.js +1214 -0
  368. package/lib/VoIP/worker-bootstrap.d.ts +1 -0
  369. package/lib/VoIP/worker-bootstrap.js +1042 -0
  370. package/lib/WABinary/constants.d.ts +61 -0
  371. package/lib/WABinary/constants.js +1466 -0
  372. package/lib/WABinary/decode.d.ts +9 -0
  373. package/lib/WABinary/decode.js +261 -0
  374. package/lib/WABinary/encode.d.ts +2 -0
  375. package/lib/WABinary/encode.js +219 -0
  376. package/lib/WABinary/generic-utils.d.ts +45 -0
  377. package/lib/WABinary/generic-utils.js +285 -0
  378. package/lib/WABinary/index.d.ts +5 -0
  379. package/lib/WABinary/index.js +5 -0
  380. package/lib/WABinary/jid-utils.d.ts +32 -0
  381. package/lib/WABinary/jid-utils.js +102 -0
  382. package/lib/WABinary/types.d.ts +1 -0
  383. package/lib/WABinary/types.js +1 -0
  384. package/lib/WAM/BinaryInfo.d.ts +7 -0
  385. package/lib/WAM/BinaryInfo.js +9 -0
  386. package/lib/WAM/constants.d.ts +34926 -0
  387. package/lib/WAM/constants.js +22852 -0
  388. package/lib/WAM/encode.d.ts +1 -0
  389. package/lib/WAM/encode.js +149 -0
  390. package/lib/WAM/index.d.ts +3 -0
  391. package/lib/WAM/index.js +3 -0
  392. package/lib/WAUSync/Protocols/USyncBusinessProtocol.d.ts +43 -0
  393. package/lib/WAUSync/Protocols/USyncBusinessProtocol.js +32 -0
  394. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +36 -0
  395. package/lib/WAUSync/Protocols/USyncContactProtocol.js +51 -0
  396. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +29 -0
  397. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +60 -0
  398. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +12 -0
  399. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +26 -0
  400. package/lib/WAUSync/Protocols/USyncFeatureProtocol.d.ts +13 -0
  401. package/lib/WAUSync/Protocols/USyncFeatureProtocol.js +28 -0
  402. package/lib/WAUSync/Protocols/USyncPictureProtocol.d.ts +22 -0
  403. package/lib/WAUSync/Protocols/USyncPictureProtocol.js +28 -0
  404. package/lib/WAUSync/Protocols/USyncSidelistProtocol.d.ts +20 -0
  405. package/lib/WAUSync/Protocols/USyncSidelistProtocol.js +23 -0
  406. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +12 -0
  407. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +37 -0
  408. package/lib/WAUSync/Protocols/USyncTextStatusProtocol.d.ts +14 -0
  409. package/lib/WAUSync/Protocols/USyncTextStatusProtocol.js +24 -0
  410. package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +9 -0
  411. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +24 -0
  412. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +38 -0
  413. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +49 -0
  414. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +14 -0
  415. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +28 -0
  416. package/lib/WAUSync/Protocols/index.d.ts +12 -0
  417. package/lib/WAUSync/Protocols/index.js +12 -0
  418. package/lib/WAUSync/USyncQuery.d.ts +25 -0
  419. package/lib/WAUSync/USyncQuery.js +140 -0
  420. package/lib/WAUSync/USyncUser.d.ts +24 -0
  421. package/lib/WAUSync/USyncUser.js +47 -0
  422. package/lib/WAUSync/index.d.ts +3 -0
  423. package/lib/WAUSync/index.js +3 -0
  424. package/lib/assets/wasm/loader.js +5 -0
  425. package/lib/assets/wasm/whatsapp.wasm +0 -0
  426. package/lib/assets/wasm/worker-modules.js +273 -0
  427. package/lib/exports-extra.d.ts +45 -0
  428. package/lib/exports-extra.js +47 -0
  429. package/lib/index.d.ts +16 -0
  430. package/lib/index.js +24 -0
  431. package/package.json +161 -4
@@ -0,0 +1,842 @@
1
+ export namespace USERNAME_QUERY_IDS {
2
+ let CHECK: string;
3
+ let CHECK_MULTI: string;
4
+ let SET: string;
5
+ let GET: string;
6
+ let GET_RECOMMENDATIONS: string;
7
+ let PIN_SET: string;
8
+ }
9
+ export namespace USERNAME_CHECK_RESULT {
10
+ let SUCCESS: string;
11
+ let INVALID: string;
12
+ }
13
+ export namespace USERNAME_SOURCE {
14
+ let FB: string;
15
+ let IG: string;
16
+ let USER_INPUT: string;
17
+ let SUGGESTION: string;
18
+ }
19
+ export function makeUsernameSocket(config: any): {
20
+ checkUsername: (username: any, includeSuggestions?: boolean) => Promise<{
21
+ available: boolean;
22
+ username: any;
23
+ suggestions?: undefined;
24
+ rejectionReasons?: undefined;
25
+ suggestionsEligible?: undefined;
26
+ } | {
27
+ available: boolean;
28
+ username: any;
29
+ suggestions: any;
30
+ rejectionReasons: any;
31
+ suggestionsEligible: any;
32
+ }>;
33
+ checkUsernameMulti: (usernames: any) => Promise<any>;
34
+ setUsername: (username: any, options?: {}) => Promise<any>;
35
+ deleteUsername: () => Promise<any>;
36
+ getMyUsername: () => Promise<any>;
37
+ setUsernamePin: (pin: any) => Promise<any>;
38
+ findUserByUsername: (username: any, pin: any) => Promise<{
39
+ jid: any;
40
+ contact: boolean;
41
+ }>;
42
+ fetchContactUsernames: (...jids: any[]) => Promise<any>;
43
+ getUsernameRecommendations: (source?: any) => Promise<any>;
44
+ getUsername: () => Promise<any>;
45
+ removeUsername: () => Promise<any>;
46
+ checkUsernameAvailability: (username: any, includeSuggestions?: boolean) => Promise<{
47
+ available: boolean;
48
+ username: any;
49
+ suggestions?: undefined;
50
+ rejectionReasons?: undefined;
51
+ suggestionsEligible?: undefined;
52
+ } | {
53
+ available: boolean;
54
+ username: any;
55
+ suggestions: any;
56
+ rejectionReasons: any;
57
+ suggestionsEligible: any;
58
+ }>;
59
+ USERNAME_QUERY_IDS: {
60
+ CHECK: string;
61
+ CHECK_MULTI: string;
62
+ SET: string;
63
+ GET: string;
64
+ GET_RECOMMENDATIONS: string;
65
+ PIN_SET: string;
66
+ };
67
+ USERNAME_CHECK_RESULT: {
68
+ SUCCESS: string;
69
+ INVALID: string;
70
+ };
71
+ USERNAME_SOURCE: {
72
+ FB: string;
73
+ IG: string;
74
+ USER_INPUT: string;
75
+ SUGGESTION: string;
76
+ };
77
+ communityQuery: (jid: any, type: any, content: any) => Promise<any>;
78
+ communityMetadata: (jid: any) => Promise<{
79
+ id: any;
80
+ subject: any;
81
+ subjectOwner: any;
82
+ subjectTime: number;
83
+ size: any;
84
+ creation: number;
85
+ owner: string;
86
+ ownerPn: string;
87
+ ownerUsername: any;
88
+ owner_country_code: any;
89
+ desc: any;
90
+ descId: any;
91
+ descOwner: string;
92
+ descOwnerPn: string;
93
+ descOwnerUsername: any;
94
+ descTime: number;
95
+ linkedParent: any;
96
+ restrict: boolean;
97
+ announce: boolean;
98
+ isCommunity: boolean;
99
+ isCommunityAnnounce: boolean;
100
+ joinApprovalMode: boolean;
101
+ memberAddMode: boolean;
102
+ participants: any;
103
+ ephemeralDuration: number;
104
+ addressingMode: any;
105
+ }>;
106
+ communityCreate: (subject: any, body: any) => Promise<any>;
107
+ communityCreateGroup: (subject: any, participants: any, parentCommunityJid: any) => Promise<any>;
108
+ communityLeave: (id: any) => Promise<void>;
109
+ communityUpdateSubject: (jid: any, subject: any) => Promise<void>;
110
+ communityLinkGroup: (groupJid: any, parentCommunityJid: any) => Promise<void>;
111
+ communityUnlinkGroup: (groupJid: any, parentCommunityJid: any) => Promise<void>;
112
+ communityFetchLinkedGroups: (jid: any) => Promise<{
113
+ communityJid: any;
114
+ isCommunity: boolean;
115
+ linkedGroups: {
116
+ id: string;
117
+ subject: any;
118
+ creation: number;
119
+ owner: string;
120
+ size: number;
121
+ }[];
122
+ }>;
123
+ communityRequestParticipantsList: (jid: any) => Promise<any>;
124
+ communityRequestParticipantsUpdate: (jid: any, participants: any, action: any) => Promise<any>;
125
+ communityParticipantsUpdate: (jid: any, participants: any, action: any) => Promise<any>;
126
+ communityUpdateDescription: (jid: any, description: any) => Promise<void>;
127
+ communityInviteCode: (jid: any) => Promise<any>;
128
+ communityRevokeInvite: (jid: any) => Promise<any>;
129
+ communityAcceptInvite: (code: any) => Promise<any>;
130
+ communityRevokeInviteV4: (communityJid: any, invitedJid: any) => Promise<boolean>;
131
+ communityAcceptInviteV4: (...args: any[]) => Promise<any>;
132
+ communityGetInviteInfo: (code: any) => Promise<{
133
+ id: any;
134
+ subject: any;
135
+ subjectOwner: any;
136
+ subjectTime: number;
137
+ size: any;
138
+ creation: number;
139
+ owner: string;
140
+ ownerPn: string;
141
+ ownerUsername: any;
142
+ owner_country_code: any;
143
+ desc: any;
144
+ descId: any;
145
+ descOwner: string;
146
+ descOwnerPn: string;
147
+ descOwnerUsername: any;
148
+ descTime: number;
149
+ linkedParent: any;
150
+ restrict: boolean;
151
+ announce: boolean;
152
+ isCommunity: boolean;
153
+ isCommunityAnnounce: boolean;
154
+ joinApprovalMode: boolean;
155
+ memberAddMode: boolean;
156
+ participants: any;
157
+ ephemeralDuration: number;
158
+ addressingMode: any;
159
+ }>;
160
+ communityToggleEphemeral: (jid: any, ephemeralExpiration: any) => Promise<void>;
161
+ communitySettingUpdate: (jid: any, setting: any) => Promise<void>;
162
+ communityMemberAddMode: (jid: any, mode: any) => Promise<void>;
163
+ communityJoinApprovalMode: (jid: any, mode: any) => Promise<void>;
164
+ communityFetchAllParticipating: () => Promise<{}>;
165
+ logger: any;
166
+ getOrderDetails: (orderId: any, tokenBase64: any) => Promise<{
167
+ price: {
168
+ total: number;
169
+ currency: any;
170
+ };
171
+ products: any;
172
+ }>;
173
+ getCatalog: (opts1: {
174
+ [key: string]: any;
175
+ jid: any;
176
+ limit: any;
177
+ cursor: any;
178
+ }) => Promise<{
179
+ products: any;
180
+ nextPageCursor: any;
181
+ }>;
182
+ getCollections: (jid: any, limit?: number) => Promise<{
183
+ collections: any;
184
+ }>;
185
+ productCreate: (create: any) => Promise<{
186
+ id: any;
187
+ imageUrls: {
188
+ requested: any;
189
+ original: any;
190
+ };
191
+ reviewStatus: {
192
+ whatsapp: any;
193
+ };
194
+ availability: string;
195
+ name: any;
196
+ retailerId: any;
197
+ url: any;
198
+ description: any;
199
+ price: number;
200
+ currency: any;
201
+ isHidden: boolean;
202
+ }>;
203
+ productDelete: (productIds: any) => Promise<{
204
+ deleted: number;
205
+ }>;
206
+ productUpdate: (productId: any, update: any) => Promise<{
207
+ id: any;
208
+ imageUrls: {
209
+ requested: any;
210
+ original: any;
211
+ };
212
+ reviewStatus: {
213
+ whatsapp: any;
214
+ };
215
+ availability: string;
216
+ name: any;
217
+ retailerId: any;
218
+ url: any;
219
+ description: any;
220
+ price: number;
221
+ currency: any;
222
+ isHidden: boolean;
223
+ }>;
224
+ updateBussinesProfile: (args: any) => Promise<any>;
225
+ updateBusinessProfile: (args: any) => Promise<any>;
226
+ updateCoverPhoto: (photo: any) => Promise<any>;
227
+ removeCoverPhoto: (id: any) => Promise<any>;
228
+ sendMessageAck: (node: any, errorCode: any) => Promise<void>;
229
+ sendRetryRequest: (node: any, forceIncludeKeys?: boolean) => Promise<void>;
230
+ rejectCall: (callId: any, callFrom: any) => Promise<void>;
231
+ fetchMessageHistory: (count: any, oldestMsgKey: any, oldestMsgTimestamp: any) => Promise<any>;
232
+ requestPlaceholderResend: (messageKey: any, msgData: any) => Promise<any>;
233
+ messageRetryManager: import("../index.js").MessageRetryManager;
234
+ userDevicesCache: any;
235
+ devicesMutex: {
236
+ mutex(code: any): any;
237
+ };
238
+ issuePrivacyTokens: (jids: any, timestamp: any) => Promise<any>;
239
+ assertSessions: (jids: any, force: any) => Promise<boolean>;
240
+ relayMessage: (jid: any, message: any, options: {
241
+ [key: string]: any;
242
+ messageId: any;
243
+ participant: any;
244
+ additionalAttributes: any;
245
+ additionalNodes: any;
246
+ useUserDevicesCache: any;
247
+ useCachedGroupMetadata: any;
248
+ addBizAttributes: any;
249
+ statusJidList: any;
250
+ recipientOverrides: any;
251
+ restrictKeyTo: any;
252
+ }) => Promise<any>;
253
+ sendReceipt: (jid: any, participant: any, messageIds: any, type: any) => Promise<void>;
254
+ sendReceipts: (keys: any, type: any) => Promise<void>;
255
+ readMessages: (keys: any) => Promise<void>;
256
+ refreshMediaConn: (forceGet?: boolean) => Promise<any>;
257
+ getMediaHost: () => string;
258
+ waUploadToServer: (filePath: any, options: {
259
+ [key: string]: any;
260
+ mediaType: any;
261
+ fileEncSha256B64: any;
262
+ timeoutMs: any;
263
+ newsletter: any;
264
+ }) => Promise<{
265
+ mediaUrl: any;
266
+ directPath: any;
267
+ meta_hmac: any;
268
+ fbid: any;
269
+ ts: any;
270
+ thumbnailDirectPath: any;
271
+ thumbnailSha256: any;
272
+ }>;
273
+ fetchPrivacySettings: (force?: boolean) => Promise<any>;
274
+ sendPeerDataOperationMessage: (pdoMessage: any) => Promise<any>;
275
+ createParticipantNodes: (recipientJids: any, message: any, extraAttrs: any, dsmMessage: any) => Promise<{
276
+ nodes: any[];
277
+ shouldIncludeDeviceIdentity: boolean;
278
+ }>;
279
+ getUSyncDevices: (jids: any, useCache: any, ignoreZeroDevices: any) => Promise<any[]>;
280
+ updateMemberLabel: (jid: any, memberLabel: any) => Promise<any>;
281
+ updateMediaMessage: (message: any) => Promise<any>;
282
+ sendTable: (jid: any, title: any, headers: any, rows: any, quoted: any, options?: {}) => Promise<{
283
+ message: {
284
+ botForwardedMessage: {
285
+ message: {
286
+ richResponseMessage: {
287
+ messageType: number;
288
+ submessages: any;
289
+ contextInfo: any;
290
+ };
291
+ };
292
+ };
293
+ };
294
+ messageId: string;
295
+ }>;
296
+ sendTableV2: (jid: any, table: any, quoted: any, options?: {}) => Promise<{
297
+ message: {
298
+ messageContextInfo: {
299
+ threadId: any[];
300
+ deviceListMetadata: {
301
+ senderKeyIndexes: any[];
302
+ recipientKeyIndexes: any[];
303
+ recipientKeyHash: string;
304
+ recipientTimestamp: number;
305
+ };
306
+ deviceListMetadataVersion: number;
307
+ messageSecret: any;
308
+ };
309
+ botForwardedMessage: {
310
+ message: {
311
+ richResponseMessage: {
312
+ submessages: any[];
313
+ messageType: number;
314
+ unifiedResponse: {
315
+ data: any;
316
+ };
317
+ contextInfo: {
318
+ forwardingScore: number;
319
+ isForwarded: boolean;
320
+ forwardedAiBotMessageInfo: {
321
+ botJid: string;
322
+ };
323
+ forwardOrigin: number;
324
+ botMessageSharingInfo: {
325
+ botEntryPointOrigin: number;
326
+ forwardScore: number;
327
+ };
328
+ };
329
+ };
330
+ };
331
+ };
332
+ };
333
+ messageId: string;
334
+ }>;
335
+ sendList: (jid: any, title: any, items: any, quoted: any, options?: {}) => Promise<{
336
+ message: {
337
+ botForwardedMessage: {
338
+ message: {
339
+ richResponseMessage: {
340
+ messageType: number;
341
+ submessages: any;
342
+ contextInfo: any;
343
+ };
344
+ };
345
+ };
346
+ };
347
+ messageId: string;
348
+ }>;
349
+ sendCodeBlock: (jid: any, code: any, quoted: any, options?: {}) => Promise<{
350
+ message: {
351
+ botForwardedMessage: {
352
+ message: {
353
+ richResponseMessage: {
354
+ messageType: number;
355
+ submessages: any;
356
+ contextInfo: any;
357
+ };
358
+ };
359
+ };
360
+ };
361
+ messageId: string;
362
+ }>;
363
+ sendCodeBlockV2: (jid: any, code: any, quoted: any, options?: {}) => Promise<{
364
+ message: {
365
+ messageContextInfo: {
366
+ threadId: any[];
367
+ deviceListMetadata: {
368
+ senderKeyIndexes: any[];
369
+ recipientKeyIndexes: any[];
370
+ recipientKeyHash: string;
371
+ recipientTimestamp: number;
372
+ };
373
+ deviceListMetadataVersion: number;
374
+ messageSecret: any;
375
+ };
376
+ botForwardedMessage: {
377
+ message: {
378
+ richResponseMessage: {
379
+ submessages: any[];
380
+ messageType: number;
381
+ unifiedResponse: {
382
+ data: any;
383
+ };
384
+ contextInfo: {
385
+ mentionedJid: any[];
386
+ groupMentions: any[];
387
+ statusAttributions: any[];
388
+ forwardingScore: number;
389
+ isForwarded: boolean;
390
+ forwardedAiBotMessageInfo: {
391
+ botJid: string;
392
+ };
393
+ forwardOrigin: number;
394
+ botMessageSharingInfo: {
395
+ botEntryPointOrigin: number;
396
+ forwardScore: number;
397
+ };
398
+ };
399
+ };
400
+ };
401
+ };
402
+ };
403
+ messageId: string;
404
+ }>;
405
+ sendLink: (jid: any, text: any, links: any, quoted: any, options?: {}) => Promise<{
406
+ message: {
407
+ messageContextInfo: {
408
+ messageSecret: any;
409
+ };
410
+ botForwardedMessage: {
411
+ message: {
412
+ richResponseMessage: {
413
+ messageType: number;
414
+ submessages: {
415
+ messageType: number;
416
+ messageText: any;
417
+ }[];
418
+ unifiedResponse: {
419
+ data: any;
420
+ };
421
+ contextInfo: {
422
+ forwardingScore: any;
423
+ isForwarded: boolean;
424
+ forwardedAiBotMessageInfo: {
425
+ botJid: any;
426
+ };
427
+ forwardOrigin: number;
428
+ botMessageSharingInfo: {
429
+ forwardScore: any;
430
+ };
431
+ };
432
+ };
433
+ };
434
+ };
435
+ };
436
+ messageId: string;
437
+ }>;
438
+ sendLinkV2: (jid: any, text: any, links: any, quoted: any, options?: {}) => Promise<{
439
+ message: {
440
+ messageContextInfo: {
441
+ threadId: any[];
442
+ messageSecret: any;
443
+ };
444
+ botForwardedMessage: {
445
+ message: {
446
+ richResponseMessage: {
447
+ messageType: number;
448
+ submessages: {
449
+ messageType: number;
450
+ messageText: any;
451
+ }[];
452
+ unifiedResponse: {
453
+ data: any;
454
+ };
455
+ contextInfo: {
456
+ isForwarded: boolean;
457
+ forwardOrigin: number;
458
+ };
459
+ };
460
+ };
461
+ };
462
+ };
463
+ messageId: string;
464
+ }>;
465
+ sendLatex: (jid: any, quoted: any, options: any) => Promise<{
466
+ message: {
467
+ botForwardedMessage: {
468
+ message: {
469
+ richResponseMessage: {
470
+ messageType: number;
471
+ submessages: any;
472
+ contextInfo: any;
473
+ };
474
+ };
475
+ };
476
+ };
477
+ messageId: string;
478
+ }>;
479
+ sendLatexImage: (jid: any, quoted: any, options: any, uploadFn: any, renderLatexToPng: any) => Promise<{
480
+ message: {
481
+ botForwardedMessage: {
482
+ message: {
483
+ richResponseMessage: {
484
+ messageType: number;
485
+ submessages: any;
486
+ contextInfo: any;
487
+ };
488
+ };
489
+ };
490
+ };
491
+ messageId: string;
492
+ }>;
493
+ sendLatexInlineImage: (jid: any, quoted: any, options: any, uploadFn: any, renderLatexToPng: any) => Promise<{
494
+ message: {
495
+ botForwardedMessage: {
496
+ message: {
497
+ richResponseMessage: {
498
+ messageType: number;
499
+ submessages: any;
500
+ contextInfo: any;
501
+ };
502
+ };
503
+ };
504
+ };
505
+ messageId: string;
506
+ }>;
507
+ captureUnifiedResponse: (msg: any) => {
508
+ unifiedResponse: {
509
+ data: any;
510
+ };
511
+ submessages: any;
512
+ contextInfo: any;
513
+ };
514
+ sendUnifiedResponse: (jid: any, quoted: any, captured: any) => Promise<{
515
+ message: {
516
+ botForwardedMessage: {
517
+ message: {
518
+ richResponseMessage: {
519
+ messageType: number;
520
+ submessages: any;
521
+ contextInfo: any;
522
+ };
523
+ };
524
+ };
525
+ };
526
+ messageId: string;
527
+ }>;
528
+ sendRichMessage: (jid: any, submessages: any, quoted: any, options?: {}) => Promise<{
529
+ message: {
530
+ botForwardedMessage: {
531
+ message: {
532
+ richResponseMessage: {
533
+ messageType: number;
534
+ submessages: any;
535
+ contextInfo: any;
536
+ };
537
+ };
538
+ };
539
+ };
540
+ messageId: string;
541
+ }>;
542
+ sendMessage: (jid: any, content: any, options?: {}) => Promise<any>;
543
+ sendAlbumMessage: (jid: any, medias: any, options?: {}) => Promise<any>;
544
+ sendReaction: (jid: any, reaction: any, key: any) => Promise<any>;
545
+ sendPin: (jid: any, key: any, pinOptions?: {
546
+ [key: string]: any;
547
+ durationSec?: number;
548
+ }, options?: {}) => Promise<any>;
549
+ sendUnpin: (jid: any, key: any, options?: {}) => Promise<any>;
550
+ sendKeep: (jid: any, key: any, options?: {}) => Promise<any>;
551
+ sendUnkeep: (jid: any, key: any, options?: {}) => Promise<any>;
552
+ sendEvent: (jid: any, event: any, options?: {}) => Promise<any>;
553
+ sendPoll: (jid: any, poll: any, options?: {}) => Promise<any>;
554
+ sendQuiz: (jid: any, quiz: any, options?: {}) => Promise<any>;
555
+ editPoll: (jid: any, key: any, poll: any, options?: {}) => Promise<any>;
556
+ sendMentionAll: (jid: any, text: any, options?: {}) => Promise<any>;
557
+ sendStatusMention: (content: any, mentions: any, options?: {}) => Promise<any>;
558
+ sendLocation: (jid: any, location: any, options?: {}) => Promise<any>;
559
+ sendContact: (jid: any, contact: any, options?: {}) => Promise<any>;
560
+ sendGroupInvite: (jid: any, invite: any, options?: {}) => Promise<any>;
561
+ downloadMedia: (message: any, type?: string, options?: {}) => Promise<any>;
562
+ copyNForward: (jid: any, message: any, forceForward?: boolean, options?: {}) => Promise<any>;
563
+ newsletterCreate: (name: any, description: any) => Promise<{
564
+ id: any;
565
+ owner: any;
566
+ name: any;
567
+ creation_time: number;
568
+ description: any;
569
+ invite: any;
570
+ subscribers: number;
571
+ verification: any;
572
+ picture: {
573
+ id: any;
574
+ directPath: any;
575
+ };
576
+ mute_state: any;
577
+ }>;
578
+ newsletterUpdate: (jid: any, updates: any) => Promise<any>;
579
+ newsletterSubscribers: (jid: any) => Promise<any>;
580
+ newsletterSubscribed: () => Promise<any>;
581
+ newsletterMetadata: (type: any, key: any) => Promise<any>;
582
+ newsletterFollow: (jid: any) => any;
583
+ newsletterUnfollow: (jid: any) => any;
584
+ newsletterMute: (jid: any) => any;
585
+ newsletterUnmute: (jid: any) => any;
586
+ newsletterUpdateName: (jid: any, name: any) => Promise<any>;
587
+ newsletterUpdateDescription: (jid: any, description: any) => Promise<any>;
588
+ newsletterUpdatePicture: (jid: any, content: any) => Promise<any>;
589
+ newsletterRemovePicture: (jid: any) => Promise<any>;
590
+ newsletterReactMessage: (jid: any, serverId: any, reaction: any) => Promise<void>;
591
+ newsletterFetchMessages: (jid: any, count: any, since: any, after: any) => Promise<any[]>;
592
+ subscribeNewsletterUpdates: (jid: any) => Promise<{
593
+ duration: any;
594
+ }>;
595
+ newsletterAdminCount: (jid: any) => Promise<any>;
596
+ newsletterChangeOwner: (jid: any, newOwnerJid: any) => Promise<void>;
597
+ newsletterDemote: (jid: any, userJid: any) => Promise<void>;
598
+ newsletterDelete: (jid: any) => Promise<void>;
599
+ executeWMexQuery: Function;
600
+ newsletterProbeQueryIds: Function;
601
+ groupQuery: (jid: any, type: any, content: any) => Promise<any>;
602
+ groupMetadata: (jid: any) => Promise<{
603
+ id: any;
604
+ notify: any;
605
+ addressingMode: any;
606
+ subject: any;
607
+ subjectOwner: any;
608
+ subjectOwnerPn: any;
609
+ subjectOwnerUsername: any;
610
+ subjectTime: number;
611
+ size: any;
612
+ creation: number;
613
+ owner: string;
614
+ ownerPn: string;
615
+ ownerUsername: any;
616
+ owner_country_code: any;
617
+ desc: any;
618
+ descId: any;
619
+ descOwner: string;
620
+ descOwnerPn: string;
621
+ descOwnerUsername: any;
622
+ descTime: number;
623
+ linkedParent: any;
624
+ restrict: boolean;
625
+ announce: boolean;
626
+ isCommunity: boolean;
627
+ isCommunityAnnounce: boolean;
628
+ joinApprovalMode: boolean;
629
+ memberAddMode: boolean;
630
+ participants: any;
631
+ ephemeralDuration: number;
632
+ }>;
633
+ groupCreate: (subject: any, participants: any) => Promise<{
634
+ id: any;
635
+ notify: any;
636
+ addressingMode: any;
637
+ subject: any;
638
+ subjectOwner: any;
639
+ subjectOwnerPn: any;
640
+ subjectOwnerUsername: any;
641
+ subjectTime: number;
642
+ size: any;
643
+ creation: number;
644
+ owner: string;
645
+ ownerPn: string;
646
+ ownerUsername: any;
647
+ owner_country_code: any;
648
+ desc: any;
649
+ descId: any;
650
+ descOwner: string;
651
+ descOwnerPn: string;
652
+ descOwnerUsername: any;
653
+ descTime: number;
654
+ linkedParent: any;
655
+ restrict: boolean;
656
+ announce: boolean;
657
+ isCommunity: boolean;
658
+ isCommunityAnnounce: boolean;
659
+ joinApprovalMode: boolean;
660
+ memberAddMode: boolean;
661
+ participants: any;
662
+ ephemeralDuration: number;
663
+ }>;
664
+ groupLeave: (id: any) => Promise<void>;
665
+ groupUpdateSubject: (jid: any, subject: any) => Promise<void>;
666
+ groupRequestParticipantsList: (jid: any) => Promise<any>;
667
+ groupRequestParticipantsUpdate: (jid: any, participants: any, action: any) => Promise<any>;
668
+ groupParticipantsUpdate: (jid: any, participants: any, action: any) => Promise<any[]>;
669
+ groupUpdateDescription: (jid: any, description: any) => Promise<void>;
670
+ groupInviteCode: (jid: any) => Promise<any>;
671
+ groupRevokeInvite: (jid: any) => Promise<any>;
672
+ groupAcceptInvite: (code: any) => Promise<any>;
673
+ groupRevokeInviteV4: (groupJid: any, invitedJid: any) => Promise<boolean>;
674
+ groupAcceptInviteV4: (...args: any[]) => Promise<any>;
675
+ groupGetInviteInfo: (code: any) => Promise<{
676
+ id: any;
677
+ notify: any;
678
+ addressingMode: any;
679
+ subject: any;
680
+ subjectOwner: any;
681
+ subjectOwnerPn: any;
682
+ subjectOwnerUsername: any;
683
+ subjectTime: number;
684
+ size: any;
685
+ creation: number;
686
+ owner: string;
687
+ ownerPn: string;
688
+ ownerUsername: any;
689
+ owner_country_code: any;
690
+ desc: any;
691
+ descId: any;
692
+ descOwner: string;
693
+ descOwnerPn: string;
694
+ descOwnerUsername: any;
695
+ descTime: number;
696
+ linkedParent: any;
697
+ restrict: boolean;
698
+ announce: boolean;
699
+ isCommunity: boolean;
700
+ isCommunityAnnounce: boolean;
701
+ joinApprovalMode: boolean;
702
+ memberAddMode: boolean;
703
+ participants: any;
704
+ ephemeralDuration: number;
705
+ }>;
706
+ groupToggleEphemeral: (jid: any, ephemeralExpiration: any) => Promise<void>;
707
+ groupSettingUpdate: (jid: any, setting: any) => Promise<void>;
708
+ groupMemberAddMode: (jid: any, mode: any) => Promise<void>;
709
+ groupJoinApprovalMode: (jid: any, mode: any) => Promise<void>;
710
+ groupFetchAllParticipating: () => Promise<{}>;
711
+ findUserId: (pnLid: any) => Promise<{
712
+ lid: any;
713
+ phoneNumber: any;
714
+ }>;
715
+ serverProps: {
716
+ privacyTokenOn1to1: boolean;
717
+ profilePicPrivacyToken: boolean;
718
+ lidTrustedTokenIssueToLid: boolean;
719
+ };
720
+ createCallLink: (type: any, event: any, timeoutMs: any) => Promise<any>;
721
+ getBotListV2: () => Promise<{
722
+ jid: any;
723
+ personaId: any;
724
+ }[]>;
725
+ messageMutex: {
726
+ mutex(code: any): any;
727
+ };
728
+ receiptMutex: {
729
+ mutex(code: any): any;
730
+ };
731
+ appStatePatchMutex: {
732
+ mutex(code: any): any;
733
+ };
734
+ notificationMutex: {
735
+ mutex(code: any): any;
736
+ };
737
+ upsertMessage: (...args: any[]) => Promise<any>;
738
+ appPatch: (patchCreate: any) => Promise<void>;
739
+ sendPresenceUpdate: (type: any, toJid: any) => Promise<void>;
740
+ presenceSubscribe: (toJid: any) => Promise<void>;
741
+ profilePictureUrl: (jid: any, type?: string, timeoutMs?: number, shouldIncludeTcToken?: boolean) => Promise<any>;
742
+ fetchBlocklist: () => Promise<any>;
743
+ fetchStatus: (...jids: any[]) => Promise<any>;
744
+ fetchDisappearingDuration: (...jids: any[]) => Promise<any>;
745
+ updateProfilePicture: (jid: any, content: any, dimensions: any) => Promise<void>;
746
+ removeProfilePicture: (jid: any) => Promise<void>;
747
+ updateProfileStatus: (status: any) => Promise<void>;
748
+ updateProfileName: (name: any) => Promise<void>;
749
+ updateBlockStatus: (jid: any, action: any) => Promise<void>;
750
+ updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: any) => Promise<void>;
751
+ updateCallPrivacy: (value: any) => Promise<void>;
752
+ updateMessagesPrivacy: (value: any) => Promise<void>;
753
+ updateLastSeenPrivacy: (value: any) => Promise<void>;
754
+ updateOnlinePrivacy: (value: any) => Promise<void>;
755
+ updateProfilePicturePrivacy: (value: any) => Promise<void>;
756
+ updateStatusPrivacy: (value: any) => Promise<void>;
757
+ updateReadReceiptsPrivacy: (value: any) => Promise<void>;
758
+ updateGroupsAddPrivacy: (value: any) => Promise<void>;
759
+ updateDefaultDisappearingMode: (duration: any) => Promise<void>;
760
+ getBusinessProfile: (jid: any) => Promise<{
761
+ wid: any;
762
+ address: any;
763
+ description: any;
764
+ website: any[];
765
+ email: any;
766
+ category: any;
767
+ business_hours: {
768
+ timezone: any;
769
+ business_config: any;
770
+ };
771
+ }>;
772
+ resyncAppState: (...args: any[]) => Promise<any>;
773
+ chatModify: (mod: any, jid: any) => Promise<void>;
774
+ cleanDirtyBits: (type: any, fromTimestamp: any) => Promise<void>;
775
+ addOrEditContact: (jid: any, contact: any) => Promise<void>;
776
+ removeContact: (jid: any) => Promise<void>;
777
+ placeholderResendCache: any;
778
+ addLabel: (jid: any, labels: any) => Promise<void>;
779
+ addChatLabel: (jid: any, labelId: any) => Promise<void>;
780
+ removeChatLabel: (jid: any, labelId: any) => Promise<void>;
781
+ addMessageLabel: (jid: any, messageId: any, labelId: any) => Promise<void>;
782
+ removeMessageLabel: (jid: any, messageId: any, labelId: any) => Promise<void>;
783
+ star: (jid: any, messages: any, star: any) => Promise<void>;
784
+ addOrEditQuickReply: (quickReply: any) => Promise<void>;
785
+ removeQuickReply: (timestamp: any) => Promise<void>;
786
+ type: string;
787
+ ws: import("./Client/websocket.js").WebSocketClient;
788
+ ev: {
789
+ process(handler: any): () => void;
790
+ emit(event: any, evData: any): any;
791
+ isBuffering(): boolean;
792
+ buffer: () => void;
793
+ flush: () => boolean;
794
+ createBufferedFunction(work: any): (...args: any[]) => Promise<any>;
795
+ on: (...args: any[]) => any;
796
+ off: (...args: any[]) => any;
797
+ removeAllListeners: (...args: any[]) => any;
798
+ destroy(): void;
799
+ };
800
+ authState: {
801
+ creds: any;
802
+ keys: {
803
+ get: (type: any, ids: any) => Promise<any>;
804
+ set: (data: any) => Promise<void>;
805
+ isInTransaction: () => boolean;
806
+ transaction: (work: any, key: any) => Promise<any>;
807
+ };
808
+ };
809
+ signalRepository: any;
810
+ user: any;
811
+ generateMessageTag: () => string;
812
+ query: (node: any, timeoutMs: any) => Promise<any>;
813
+ waitForMessage: (msgId: any, timeoutMs?: any) => Promise<any>;
814
+ waitForSocketOpen: () => Promise<void>;
815
+ sendRawMessage: (data: any) => Promise<void>;
816
+ sendNode: (frame: any) => Promise<void>;
817
+ logout: (msg: any) => Promise<void>;
818
+ end: (error: any) => Promise<void>;
819
+ registerSocketEndHandler: (handler: any) => void;
820
+ onUnexpectedError: (err: any, msg: any) => void;
821
+ uploadPreKeys: (count?: number) => Promise<void>;
822
+ uploadPreKeysToServerIfRequired: () => Promise<void>;
823
+ digestKeyBundle: () => Promise<void>;
824
+ rotateSignedPreKey: () => Promise<void>;
825
+ requestPairingCode: (phoneNumber: any, customPairingCode: any) => Promise<any>;
826
+ updateServerTimeOffset: (options: {
827
+ [key: string]: any;
828
+ attrs: any;
829
+ }) => void;
830
+ sendUnifiedSession: () => Promise<void>;
831
+ wamBuffer: import("../index.js").BinaryInfo;
832
+ waitForConnectionUpdate: (check: any, timeoutMs: any) => Promise<void>;
833
+ sendWAMBuffer: (wamBuffer: any) => Promise<any>;
834
+ executeUSyncQuery: (usyncQuery: any) => Promise<any>;
835
+ onWhatsApp: (...phoneNumber: any[]) => Promise<any>;
836
+ fetchAccountReachoutTimelock: () => Promise<{
837
+ isActive: boolean;
838
+ timeEnforcementEnds: Date;
839
+ enforcementType: any;
840
+ }>;
841
+ fetchNewChatMessageCap: () => Promise<any>;
842
+ };