lordceaser-baileys 3.4.0 → 3.4.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 (398) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +201 -0
  3. package/WAProto/_orig.js +92429 -277359
  4. package/WAProto/index.d.ts +11659 -95047
  5. package/WAProto/index.js +5 -2
  6. package/banner.png +0 -0
  7. package/index.js +11 -6
  8. package/lib/Defaults/index.d.ts +118 -48
  9. package/lib/Defaults/index.d.ts.map +1 -1
  10. package/lib/Defaults/index.js +29 -6
  11. package/lib/Defaults/index.js.map +1 -1
  12. package/lib/Signal/Group/ciphertext-message.d.ts +8 -8
  13. package/lib/Signal/Group/ciphertext-message.d.ts.map +1 -1
  14. package/lib/Signal/Group/ciphertext-message.js.map +1 -1
  15. package/lib/Signal/Group/group-session-builder.d.ts +6 -13
  16. package/lib/Signal/Group/group-session-builder.d.ts.map +1 -1
  17. package/lib/Signal/Group/group-session-builder.js.map +1 -1
  18. package/lib/Signal/Group/group_cipher.d.ts +9 -15
  19. package/lib/Signal/Group/group_cipher.d.ts.map +1 -1
  20. package/lib/Signal/Group/group_cipher.js.map +1 -1
  21. package/lib/Signal/Group/index.d.ts +11 -11
  22. package/lib/Signal/Group/index.d.ts.map +1 -1
  23. package/lib/Signal/Group/index.js.map +1 -1
  24. package/lib/Signal/Group/keyhelper.d.ts +6 -10
  25. package/lib/Signal/Group/keyhelper.d.ts.map +1 -1
  26. package/lib/Signal/Group/keyhelper.js.map +1 -1
  27. package/lib/Signal/Group/sender-chain-key.d.ts +10 -10
  28. package/lib/Signal/Group/sender-chain-key.d.ts.map +1 -1
  29. package/lib/Signal/Group/sender-chain-key.js.map +1 -1
  30. package/lib/Signal/Group/sender-key-distribution-message.d.ts +14 -14
  31. package/lib/Signal/Group/sender-key-distribution-message.d.ts.map +1 -1
  32. package/lib/Signal/Group/sender-key-distribution-message.js.map +1 -1
  33. package/lib/Signal/Group/sender-key-message.d.ts +16 -16
  34. package/lib/Signal/Group/sender-key-message.d.ts.map +1 -1
  35. package/lib/Signal/Group/sender-key-message.js.map +1 -1
  36. package/lib/Signal/Group/sender-key-name.d.ts +7 -13
  37. package/lib/Signal/Group/sender-key-name.d.ts.map +1 -1
  38. package/lib/Signal/Group/sender-key-name.js.map +1 -1
  39. package/lib/Signal/Group/sender-key-record.d.ts +10 -28
  40. package/lib/Signal/Group/sender-key-record.d.ts.map +1 -1
  41. package/lib/Signal/Group/sender-key-record.js.map +1 -1
  42. package/lib/Signal/Group/sender-key-state.d.ts +14 -36
  43. package/lib/Signal/Group/sender-key-state.d.ts.map +1 -1
  44. package/lib/Signal/Group/sender-key-state.js.map +1 -1
  45. package/lib/Signal/Group/sender-message-key.d.ts +10 -10
  46. package/lib/Signal/Group/sender-message-key.d.ts.map +1 -1
  47. package/lib/Signal/Group/sender-message-key.js.map +1 -1
  48. package/lib/Signal/libsignal.d.ts +54 -4
  49. package/lib/Signal/libsignal.d.ts.map +1 -1
  50. package/lib/Signal/libsignal.js.map +1 -1
  51. package/lib/Signal/lid-mapping.d.ts +15 -17
  52. package/lib/Signal/lid-mapping.d.ts.map +1 -1
  53. package/lib/Signal/lid-mapping.js.map +1 -1
  54. package/lib/Socket/Client/index.d.ts +2 -2
  55. package/lib/Socket/Client/index.d.ts.map +1 -1
  56. package/lib/Socket/Client/index.js +1 -0
  57. package/lib/Socket/Client/index.js.map +1 -1
  58. package/lib/Socket/Client/types.d.ts +4 -14
  59. package/lib/Socket/Client/types.d.ts.map +1 -1
  60. package/lib/Socket/Client/types.js +2 -1
  61. package/lib/Socket/Client/types.js.map +1 -1
  62. package/lib/Socket/Client/websocket.d.ts +5 -5
  63. package/lib/Socket/Client/websocket.d.ts.map +1 -1
  64. package/lib/Socket/Client/websocket.js +2 -1
  65. package/lib/Socket/Client/websocket.js.map +1 -1
  66. package/lib/Socket/business.d.ts +353 -175
  67. package/lib/Socket/business.d.ts.map +1 -1
  68. package/lib/Socket/business.js +43 -70
  69. package/lib/Socket/business.js.map +1 -1
  70. package/lib/Socket/chats.d.ts +112 -93
  71. package/lib/Socket/chats.d.ts.map +1 -1
  72. package/lib/Socket/chats.js +20 -709
  73. package/lib/Socket/chats.js.map +1 -1
  74. package/lib/Socket/communities.d.ts +499 -210
  75. package/lib/Socket/communities.d.ts.map +1 -1
  76. package/lib/Socket/communities.js +1 -0
  77. package/lib/Socket/communities.js.map +1 -1
  78. package/lib/Socket/groups.d.ts +245 -120
  79. package/lib/Socket/groups.d.ts.map +1 -1
  80. package/lib/Socket/groups.js +5 -206
  81. package/lib/Socket/groups.js.map +1 -1
  82. package/lib/Socket/index.d.ts +478 -208
  83. package/lib/Socket/index.d.ts.map +1 -1
  84. package/lib/Socket/index.js +3 -28
  85. package/lib/Socket/index.js.map +1 -1
  86. package/lib/Socket/messages-recv.d.ts +295 -164
  87. package/lib/Socket/messages-recv.d.ts.map +1 -1
  88. package/lib/Socket/messages-recv.js +9 -381
  89. package/lib/Socket/messages-recv.js.map +1 -1
  90. package/lib/Socket/messages-send.d.ts +290 -159
  91. package/lib/Socket/messages-send.d.ts.map +1 -1
  92. package/lib/Socket/messages-send.js +154 -1963
  93. package/lib/Socket/messages-send.js.map +1 -1
  94. package/lib/Socket/mex.d.ts +1 -2
  95. package/lib/Socket/mex.d.ts.map +1 -1
  96. package/lib/Socket/mex.js +2 -1
  97. package/lib/Socket/mex.js.map +1 -1
  98. package/lib/Socket/newsletter.d.ts +251 -138
  99. package/lib/Socket/newsletter.d.ts.map +1 -1
  100. package/lib/Socket/newsletter.js +9 -43
  101. package/lib/Socket/newsletter.js.map +1 -1
  102. package/lib/Socket/socket.d.ts +44 -42
  103. package/lib/Socket/socket.d.ts.map +1 -1
  104. package/lib/Socket/socket.js +17 -64
  105. package/lib/Socket/socket.js.map +1 -1
  106. package/lib/Store/index.d.ts +4 -0
  107. package/lib/Store/index.d.ts.map +1 -0
  108. package/lib/Store/index.js +4 -0
  109. package/lib/Store/index.js.map +1 -0
  110. package/lib/Store/make-in-memory-store.d.ts +63 -0
  111. package/lib/Store/make-in-memory-store.d.ts.map +1 -0
  112. package/lib/Store/make-in-memory-store.js +421 -0
  113. package/lib/Store/make-in-memory-store.js.map +1 -0
  114. package/lib/Store/make-ordered-dictionary.d.ts +13 -0
  115. package/lib/Store/make-ordered-dictionary.d.ts.map +1 -0
  116. package/lib/Store/make-ordered-dictionary.js +79 -0
  117. package/lib/Store/make-ordered-dictionary.js.map +1 -0
  118. package/lib/Store/object-repository.d.ts +11 -0
  119. package/lib/Store/object-repository.d.ts.map +1 -0
  120. package/lib/Store/object-repository.js +24 -0
  121. package/lib/Store/object-repository.js.map +1 -0
  122. package/lib/Types/Auth.d.ts +0 -115
  123. package/lib/Types/Auth.d.ts.map +1 -1
  124. package/lib/Types/Auth.js.map +1 -1
  125. package/lib/Types/Bussines.d.ts +1 -24
  126. package/lib/Types/Bussines.d.ts.map +1 -1
  127. package/lib/Types/Bussines.js.map +1 -1
  128. package/lib/Types/Call.d.ts +1 -14
  129. package/lib/Types/Call.d.ts.map +1 -1
  130. package/lib/Types/Call.js.map +1 -1
  131. package/lib/Types/Chat.d.ts +1 -123
  132. package/lib/Types/Chat.d.ts.map +1 -1
  133. package/lib/Types/Chat.js.map +1 -1
  134. package/lib/Types/Contact.d.ts +1 -25
  135. package/lib/Types/Contact.d.ts.map +1 -1
  136. package/lib/Types/Contact.js.map +1 -1
  137. package/lib/Types/Events.d.ts +1 -255
  138. package/lib/Types/Events.d.ts.map +1 -1
  139. package/lib/Types/Events.js.map +1 -1
  140. package/lib/Types/GroupMetadata.d.ts +1 -70
  141. package/lib/Types/GroupMetadata.d.ts.map +1 -1
  142. package/lib/Types/GroupMetadata.js.map +1 -1
  143. package/lib/Types/Label.d.ts +1 -45
  144. package/lib/Types/Label.d.ts.map +1 -1
  145. package/lib/Types/Label.js.map +1 -1
  146. package/lib/Types/LabelAssociation.d.ts +1 -28
  147. package/lib/Types/LabelAssociation.d.ts.map +1 -1
  148. package/lib/Types/LabelAssociation.js.map +1 -1
  149. package/lib/Types/Message.d.ts +10 -318
  150. package/lib/Types/Message.d.ts.map +1 -1
  151. package/lib/Types/Message.js +7 -0
  152. package/lib/Types/Message.js.map +1 -1
  153. package/lib/Types/Mex.d.ts +2 -140
  154. package/lib/Types/Mex.d.ts.map +1 -1
  155. package/lib/Types/Mex.js +2 -0
  156. package/lib/Types/Mex.js.map +1 -1
  157. package/lib/Types/Product.d.ts +1 -78
  158. package/lib/Types/Product.d.ts.map +1 -1
  159. package/lib/Types/Product.js.map +1 -1
  160. package/lib/Types/RichType.d.ts +3 -0
  161. package/lib/Types/RichType.d.ts.map +1 -0
  162. package/lib/Types/RichType.js +23 -0
  163. package/lib/Types/RichType.js.map +1 -0
  164. package/lib/Types/Signal.d.ts +0 -85
  165. package/lib/Types/Signal.d.ts.map +1 -1
  166. package/lib/Types/Signal.js.map +1 -1
  167. package/lib/Types/Socket.d.ts +1 -135
  168. package/lib/Types/Socket.d.ts.map +1 -1
  169. package/lib/Types/Socket.js +0 -1
  170. package/lib/Types/Socket.js.map +1 -1
  171. package/lib/Types/State.d.ts +5 -96
  172. package/lib/Types/State.d.ts.map +1 -1
  173. package/lib/Types/State.js.map +1 -1
  174. package/lib/Types/USync.d.ts +1 -25
  175. package/lib/Types/USync.d.ts.map +1 -1
  176. package/lib/Types/USync.js.map +1 -1
  177. package/lib/Types/index.d.ts +13 -65
  178. package/lib/Types/index.d.ts.map +1 -1
  179. package/lib/Types/index.js.map +1 -1
  180. package/lib/Utils/auth-utils.d.ts +51 -17
  181. package/lib/Utils/auth-utils.d.ts.map +1 -1
  182. package/lib/Utils/auth-utils.js +5 -1
  183. package/lib/Utils/auth-utils.js.map +1 -1
  184. package/lib/Utils/browser-utils.d.ts +9 -3
  185. package/lib/Utils/browser-utils.d.ts.map +1 -1
  186. package/lib/Utils/browser-utils.js.map +1 -1
  187. package/lib/Utils/business.d.ts +46 -19
  188. package/lib/Utils/business.d.ts.map +1 -1
  189. package/lib/Utils/business.js.map +1 -1
  190. package/lib/Utils/chat-utils.d.ts +398 -89
  191. package/lib/Utils/chat-utils.d.ts.map +1 -1
  192. package/lib/Utils/chat-utils.js.map +1 -1
  193. package/lib/Utils/companion-reg-client-utils.d.ts +4 -16
  194. package/lib/Utils/companion-reg-client-utils.d.ts.map +1 -1
  195. package/lib/Utils/companion-reg-client-utils.js +7 -2
  196. package/lib/Utils/companion-reg-client-utils.js.map +1 -1
  197. package/lib/Utils/crypto.d.ts +29 -26
  198. package/lib/Utils/crypto.d.ts.map +1 -1
  199. package/lib/Utils/crypto.js +2 -0
  200. package/lib/Utils/crypto.js.map +1 -1
  201. package/lib/Utils/decode-wa-message.d.ts +76 -58
  202. package/lib/Utils/decode-wa-message.d.ts.map +1 -1
  203. package/lib/Utils/decode-wa-message.js.map +1 -1
  204. package/lib/Utils/event-buffer.d.ts +9 -32
  205. package/lib/Utils/event-buffer.d.ts.map +1 -1
  206. package/lib/Utils/event-buffer.js.map +1 -1
  207. package/lib/Utils/generics.d.ts +45 -73
  208. package/lib/Utils/generics.d.ts.map +1 -1
  209. package/lib/Utils/generics.js +17 -15
  210. package/lib/Utils/generics.js.map +1 -1
  211. package/lib/Utils/history.d.ts +73 -21
  212. package/lib/Utils/history.d.ts.map +1 -1
  213. package/lib/Utils/history.js.map +1 -1
  214. package/lib/Utils/identity-change-handler.d.ts +9 -39
  215. package/lib/Utils/identity-change-handler.d.ts.map +1 -1
  216. package/lib/Utils/identity-change-handler.js.map +1 -1
  217. package/lib/Utils/index.d.ts +24 -21
  218. package/lib/Utils/index.d.ts.map +1 -1
  219. package/lib/Utils/index.js +3 -0
  220. package/lib/Utils/index.js.map +1 -1
  221. package/lib/Utils/link-preview.d.ts +8 -16
  222. package/lib/Utils/link-preview.d.ts.map +1 -1
  223. package/lib/Utils/link-preview.js.map +1 -1
  224. package/lib/Utils/logger.d.ts +1 -10
  225. package/lib/Utils/logger.d.ts.map +1 -1
  226. package/lib/Utils/logger.js.map +1 -1
  227. package/lib/Utils/lt-hash.d.ts +1 -2
  228. package/lib/Utils/lt-hash.d.ts.map +1 -1
  229. package/lib/Utils/lt-hash.js.map +1 -1
  230. package/lib/Utils/make-mutex.d.ts +4 -6
  231. package/lib/Utils/make-mutex.d.ts.map +1 -1
  232. package/lib/Utils/make-mutex.js.map +1 -1
  233. package/lib/Utils/message-retry-manager.d.ts +36 -71
  234. package/lib/Utils/message-retry-manager.d.ts.map +1 -1
  235. package/lib/Utils/message-retry-manager.js +1 -1
  236. package/lib/Utils/message-retry-manager.js.map +1 -1
  237. package/lib/Utils/messages-media.d.ts +121 -117
  238. package/lib/Utils/messages-media.d.ts.map +1 -1
  239. package/lib/Utils/messages-media.js +87 -32
  240. package/lib/Utils/messages-media.js.map +1 -1
  241. package/lib/Utils/messages.d.ts +33 -78
  242. package/lib/Utils/messages.d.ts.map +1 -1
  243. package/lib/Utils/messages.js +1010 -63
  244. package/lib/Utils/messages.js.map +1 -1
  245. package/lib/Utils/noise-handler.d.ts +18 -17
  246. package/lib/Utils/noise-handler.d.ts.map +1 -1
  247. package/lib/Utils/noise-handler.js.map +1 -1
  248. package/lib/Utils/offline-node-processor.d.ts +2 -9
  249. package/lib/Utils/offline-node-processor.d.ts.map +1 -1
  250. package/lib/Utils/offline-node-processor.js.map +1 -1
  251. package/lib/Utils/pre-key-manager.d.ts +9 -11
  252. package/lib/Utils/pre-key-manager.d.ts.map +1 -1
  253. package/lib/Utils/pre-key-manager.js.map +1 -1
  254. package/lib/Utils/process-message.d.ts +70 -46
  255. package/lib/Utils/process-message.d.ts.map +1 -1
  256. package/lib/Utils/process-message.js +119 -0
  257. package/lib/Utils/process-message.js.map +1 -1
  258. package/lib/Utils/reporting-utils.d.ts +12 -10
  259. package/lib/Utils/reporting-utils.d.ts.map +1 -1
  260. package/lib/Utils/reporting-utils.js.map +1 -1
  261. package/lib/Utils/rich-message-utils.d.ts +49 -0
  262. package/lib/Utils/rich-message-utils.d.ts.map +1 -0
  263. package/lib/Utils/rich-message-utils.js +370 -0
  264. package/lib/Utils/rich-message-utils.js.map +1 -0
  265. package/lib/Utils/signal.d.ts +71 -35
  266. package/lib/Utils/signal.d.ts.map +1 -1
  267. package/lib/Utils/signal.js.map +1 -1
  268. package/lib/Utils/stanza-ack.d.ts +8 -2
  269. package/lib/Utils/stanza-ack.d.ts.map +1 -1
  270. package/lib/Utils/stanza-ack.js.map +1 -1
  271. package/lib/Utils/sync-action-utils.d.ts +2 -18
  272. package/lib/Utils/sync-action-utils.d.ts.map +1 -1
  273. package/lib/Utils/sync-action-utils.js.map +1 -1
  274. package/lib/Utils/tc-token-utils.d.ts +23 -30
  275. package/lib/Utils/tc-token-utils.d.ts.map +1 -1
  276. package/lib/Utils/tc-token-utils.js.map +1 -1
  277. package/lib/Utils/use-multi-file-auth-state.d.ts +9 -11
  278. package/lib/Utils/use-multi-file-auth-state.d.ts.map +1 -1
  279. package/lib/Utils/use-multi-file-auth-state.js.map +1 -1
  280. package/lib/Utils/use-single-file-auth-state.d.ts +11 -0
  281. package/lib/Utils/use-single-file-auth-state.d.ts.map +1 -0
  282. package/lib/Utils/use-single-file-auth-state.js +109 -0
  283. package/lib/Utils/use-single-file-auth-state.js.map +1 -0
  284. package/lib/Utils/use-sqlite-auth-state.d.ts +11 -0
  285. package/lib/Utils/use-sqlite-auth-state.d.ts.map +1 -0
  286. package/lib/Utils/use-sqlite-auth-state.js +109 -0
  287. package/lib/Utils/use-sqlite-auth-state.js.map +1 -0
  288. package/lib/Utils/validate-connection.d.ts +42 -9
  289. package/lib/Utils/validate-connection.d.ts.map +1 -1
  290. package/lib/Utils/validate-connection.js.map +1 -1
  291. package/lib/WABinary/constants.d.ts +60 -26
  292. package/lib/WABinary/constants.d.ts.map +1 -1
  293. package/lib/WABinary/constants.js +166 -0
  294. package/lib/WABinary/constants.js.map +1 -1
  295. package/lib/WABinary/decode.d.ts +8 -5
  296. package/lib/WABinary/decode.d.ts.map +1 -1
  297. package/lib/WABinary/decode.js.map +1 -1
  298. package/lib/WABinary/encode.d.ts +2 -2
  299. package/lib/WABinary/encode.d.ts.map +1 -1
  300. package/lib/WABinary/encode.js.map +1 -1
  301. package/lib/WABinary/generic-utils.d.ts +75 -13
  302. package/lib/WABinary/generic-utils.d.ts.map +1 -1
  303. package/lib/WABinary/generic-utils.js +114 -1
  304. package/lib/WABinary/generic-utils.js.map +1 -1
  305. package/lib/WABinary/index.d.ts +5 -5
  306. package/lib/WABinary/index.d.ts.map +1 -1
  307. package/lib/WABinary/index.js.map +1 -1
  308. package/lib/WABinary/jid-utils.d.ts +28 -47
  309. package/lib/WABinary/jid-utils.d.ts.map +1 -1
  310. package/lib/WABinary/jid-utils.js +1 -1
  311. package/lib/WABinary/jid-utils.js.map +1 -1
  312. package/lib/WABinary/types.d.ts +1 -18
  313. package/lib/WABinary/types.d.ts.map +1 -1
  314. package/lib/WABinary/types.js.map +1 -1
  315. package/lib/WAM/BinaryInfo.d.ts +4 -5
  316. package/lib/WAM/BinaryInfo.d.ts.map +1 -1
  317. package/lib/WAM/BinaryInfo.js.map +1 -1
  318. package/lib/WAM/constants.d.ts +34916 -29
  319. package/lib/WAM/constants.d.ts.map +1 -1
  320. package/lib/WAM/constants.js.map +1 -1
  321. package/lib/WAM/encode.d.ts +1 -2
  322. package/lib/WAM/encode.d.ts.map +1 -1
  323. package/lib/WAM/encode.js.map +1 -1
  324. package/lib/WAM/index.d.ts +3 -3
  325. package/lib/WAM/index.d.ts.map +1 -1
  326. package/lib/WAM/index.js.map +1 -1
  327. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +34 -7
  328. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts.map +1 -1
  329. package/lib/WAUSync/Protocols/USyncContactProtocol.js +3 -7
  330. package/lib/WAUSync/Protocols/USyncContactProtocol.js.map +1 -1
  331. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +20 -20
  332. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts.map +1 -1
  333. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +2 -1
  334. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js.map +1 -1
  335. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +9 -9
  336. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts.map +1 -1
  337. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +2 -1
  338. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js.map +1 -1
  339. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +9 -9
  340. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts.map +1 -1
  341. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +2 -1
  342. package/lib/WAUSync/Protocols/USyncStatusProtocol.js.map +1 -1
  343. package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +7 -7
  344. package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts.map +1 -1
  345. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +3 -2
  346. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js.map +1 -1
  347. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +36 -23
  348. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts.map +1 -1
  349. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +2 -1
  350. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js.map +1 -1
  351. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +12 -7
  352. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts.map +1 -1
  353. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +2 -1
  354. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js.map +1 -1
  355. package/lib/WAUSync/Protocols/index.d.ts +5 -5
  356. package/lib/WAUSync/Protocols/index.d.ts.map +1 -1
  357. package/lib/WAUSync/Protocols/index.js +1 -7
  358. package/lib/WAUSync/Protocols/index.js.map +1 -1
  359. package/lib/WAUSync/USyncQuery.d.ts +10 -19
  360. package/lib/WAUSync/USyncQuery.d.ts.map +1 -1
  361. package/lib/WAUSync/USyncQuery.js +23 -126
  362. package/lib/WAUSync/USyncQuery.js.map +1 -1
  363. package/lib/WAUSync/USyncUser.d.ts +15 -15
  364. package/lib/WAUSync/USyncUser.d.ts.map +1 -1
  365. package/lib/WAUSync/USyncUser.js +1 -24
  366. package/lib/WAUSync/USyncUser.js.map +1 -1
  367. package/lib/WAUSync/index.d.ts +3 -3
  368. package/lib/WAUSync/index.d.ts.map +1 -1
  369. package/lib/WAUSync/index.js +2 -1
  370. package/lib/WAUSync/index.js.map +1 -1
  371. package/lib/index.d.ts +9 -9
  372. package/lib/index.d.ts.map +1 -1
  373. package/lib/index.js +1 -0
  374. package/lib/index.js.map +1 -1
  375. package/package.json +11 -3
  376. package/WAProto/GenerateStatics.sh +0 -3
  377. package/WAProto/V +0 -1
  378. package/WAProto/WAProto.proto +0 -8423
  379. package/WAProto/fix-imports.js +0 -85
  380. package/lib/Socket/aigroups.js +0 -315
  381. package/lib/Socket/ban-checker.js +0 -153
  382. package/lib/Socket/chats.js[old] +0 -1227
  383. package/lib/Socket/graphql.js +0 -899
  384. package/lib/Socket/groups.js[old] +0 -347
  385. package/lib/Socket/interactive-handler.js +0 -600
  386. package/lib/Socket/interop.js +0 -563
  387. package/lib/Socket/managed-account.js +0 -208
  388. package/lib/Socket/package.json +0 -1
  389. package/lib/Socket/privacy.js +0 -446
  390. package/lib/Socket/registration.js +0 -428
  391. package/lib/Socket/username.js +0 -229
  392. package/lib/Utils/package.json +0 -1
  393. package/lib/WAUSync/Protocols/USyncBusinessProtocol.js +0 -96
  394. package/lib/WAUSync/Protocols/USyncFeatureProtocol.js +0 -70
  395. package/lib/WAUSync/Protocols/USyncPictureProtocol.js +0 -28
  396. package/lib/WAUSync/Protocols/USyncSidelistProtocol.js +0 -25
  397. package/lib/WAUSync/Protocols/USyncTextStatusProtocol.js +0 -34
  398. package/lib/package.json +0 -1
@@ -1,260 +1,530 @@
1
- import type { UserFacingSocketConfig } from '../Types/index.js';
2
- declare const makeWASocket: (config: UserFacingSocketConfig) => {
3
- communityMetadata: (jid: string) => Promise<import("../index.js").GroupMetadata>;
4
- communityCreate: (subject: string, body: string) => Promise<import("../index.js").GroupMetadata | null>;
5
- communityCreateGroup: (subject: string, participants: string[], parentCommunityJid: string) => Promise<import("../index.js").GroupMetadata | null>;
6
- communityLeave: (id: string) => Promise<void>;
7
- communityUpdateSubject: (jid: string, subject: string) => Promise<void>;
8
- communityLinkGroup: (groupJid: string, parentCommunityJid: string) => Promise<void>;
9
- communityUnlinkGroup: (groupJid: string, parentCommunityJid: string) => Promise<void>;
10
- communityFetchLinkedGroups: (jid: string) => Promise<{
11
- communityJid: string;
1
+ export default makeWASocket;
2
+ declare function makeWASocket(config: any): {
3
+ communityQuery: (jid: any, type: any, content: any) => Promise<any>;
4
+ communityMetadata: (jid: any) => Promise<{
5
+ id: any;
6
+ subject: any;
7
+ subjectOwner: any;
8
+ subjectTime: number;
9
+ size: any;
10
+ creation: number;
11
+ owner: string | undefined;
12
+ desc: any;
13
+ descId: any;
14
+ linkedParent: any;
15
+ restrict: boolean;
16
+ announce: boolean;
17
+ isCommunity: boolean;
18
+ isCommunityAnnounce: boolean;
19
+ joinApprovalMode: boolean;
20
+ memberAddMode: boolean;
21
+ participants: any;
22
+ ephemeralDuration: number | undefined;
23
+ addressingMode: any;
24
+ }>;
25
+ communityCreate: (subject: any, body: any) => Promise<{
26
+ id: any;
27
+ notify: any;
28
+ addressingMode: any;
29
+ subject: any;
30
+ subjectOwner: any;
31
+ subjectOwnerPn: any;
32
+ subjectOwnerUsername: any;
33
+ subjectTime: number;
34
+ size: any;
35
+ creation: number;
36
+ owner: string | undefined;
37
+ ownerPn: string | undefined;
38
+ ownerUsername: any;
39
+ owner_country_code: any;
40
+ desc: any;
41
+ descId: any;
42
+ descOwner: string | undefined;
43
+ descOwnerPn: string | undefined;
44
+ descOwnerUsername: any;
45
+ descTime: number | undefined;
46
+ linkedParent: any;
47
+ restrict: boolean;
48
+ announce: boolean;
49
+ isCommunity: boolean;
50
+ isCommunityAnnounce: boolean;
51
+ joinApprovalMode: boolean;
52
+ memberAddMode: boolean;
53
+ participants: any;
54
+ ephemeralDuration: number | undefined;
55
+ } | null>;
56
+ communityCreateGroup: (subject: any, participants: any, parentCommunityJid: any) => Promise<{
57
+ id: any;
58
+ notify: any;
59
+ addressingMode: any;
60
+ subject: any;
61
+ subjectOwner: any;
62
+ subjectOwnerPn: any;
63
+ subjectOwnerUsername: any;
64
+ subjectTime: number;
65
+ size: any;
66
+ creation: number;
67
+ owner: string | undefined;
68
+ ownerPn: string | undefined;
69
+ ownerUsername: any;
70
+ owner_country_code: any;
71
+ desc: any;
72
+ descId: any;
73
+ descOwner: string | undefined;
74
+ descOwnerPn: string | undefined;
75
+ descOwnerUsername: any;
76
+ descTime: number | undefined;
77
+ linkedParent: any;
78
+ restrict: boolean;
79
+ announce: boolean;
80
+ isCommunity: boolean;
81
+ isCommunityAnnounce: boolean;
82
+ joinApprovalMode: boolean;
83
+ memberAddMode: boolean;
84
+ participants: any;
85
+ ephemeralDuration: number | undefined;
86
+ } | null>;
87
+ communityLeave: (id: any) => Promise<void>;
88
+ communityUpdateSubject: (jid: any, subject: any) => Promise<void>;
89
+ communityLinkGroup: (groupJid: any, parentCommunityJid: any) => Promise<void>;
90
+ communityUnlinkGroup: (groupJid: any, parentCommunityJid: any) => Promise<void>;
91
+ communityFetchLinkedGroups: (jid: any) => Promise<{
92
+ communityJid: any;
12
93
  isCommunity: boolean;
13
94
  linkedGroups: {
14
95
  id: string | undefined;
15
- subject: string;
96
+ subject: any;
16
97
  creation: number | undefined;
17
98
  owner: string | undefined;
18
99
  size: number | undefined;
19
100
  }[];
20
101
  }>;
21
- communityRequestParticipantsList: (jid: string) => Promise<{
22
- [key: string]: string;
23
- }[]>;
24
- communityRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
25
- status: string;
26
- jid: string | undefined;
27
- }[]>;
28
- communityParticipantsUpdate: (jid: string, participants: string[], action: import("../index.js").ParticipantAction) => Promise<{
29
- status: string;
30
- jid: string | undefined;
31
- content: import("../index.js").BinaryNode;
32
- }[]>;
33
- communityUpdateDescription: (jid: string, description?: string) => Promise<void>;
34
- communityInviteCode: (jid: string) => Promise<string | undefined>;
35
- communityRevokeInvite: (jid: string) => Promise<string | undefined>;
36
- communityAcceptInvite: (code: string) => Promise<string | undefined>;
37
- communityRevokeInviteV4: (communityJid: string, invitedJid: string) => Promise<boolean>;
38
- communityAcceptInviteV4: (key: string | import("../index.js").WAMessageKey, inviteMessage: import("../index.js").proto.Message.IGroupInviteMessage) => Promise<any>;
39
- communityGetInviteInfo: (code: string) => Promise<import("../index.js").GroupMetadata>;
40
- communityToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
41
- communitySettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
42
- communityMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
43
- communityJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
44
- communityFetchAllParticipating: () => Promise<{
45
- [_: string]: import("../index.js").GroupMetadata;
102
+ communityRequestParticipantsList: (jid: any) => Promise<any>;
103
+ communityRequestParticipantsUpdate: (jid: any, participants: any, action: any) => Promise<any>;
104
+ communityParticipantsUpdate: (jid: any, participants: any, action: any) => Promise<any>;
105
+ communityUpdateDescription: (jid: any, description: any) => Promise<void>;
106
+ communityInviteCode: (jid: any) => Promise<any>;
107
+ communityRevokeInvite: (jid: any) => Promise<any>;
108
+ communityAcceptInvite: (code: any) => Promise<any>;
109
+ communityRevokeInviteV4: (communityJid: any, invitedJid: any) => Promise<boolean>;
110
+ communityAcceptInviteV4: (...args: any[]) => Promise<any>;
111
+ communityGetInviteInfo: (code: any) => Promise<{
112
+ id: any;
113
+ subject: any;
114
+ subjectOwner: any;
115
+ subjectTime: number;
116
+ size: any;
117
+ creation: number;
118
+ owner: string | undefined;
119
+ desc: any;
120
+ descId: any;
121
+ linkedParent: any;
122
+ restrict: boolean;
123
+ announce: boolean;
124
+ isCommunity: boolean;
125
+ isCommunityAnnounce: boolean;
126
+ joinApprovalMode: boolean;
127
+ memberAddMode: boolean;
128
+ participants: any;
129
+ ephemeralDuration: number | undefined;
130
+ addressingMode: any;
46
131
  }>;
47
- logger: import("../Utils/logger.js").ILogger;
48
- getOrderDetails: (orderId: string, tokenBase64: string) => Promise<import("../index.js").OrderDetails>;
49
- getCatalog: ({ jid, limit, cursor }: import("../index.js").GetCatalogOptions) => Promise<{
50
- products: import("../index.js").Product[];
51
- nextPageCursor: string | undefined;
132
+ communityToggleEphemeral: (jid: any, ephemeralExpiration: any) => Promise<void>;
133
+ communitySettingUpdate: (jid: any, setting: any) => Promise<void>;
134
+ communityMemberAddMode: (jid: any, mode: any) => Promise<void>;
135
+ communityJoinApprovalMode: (jid: any, mode: any) => Promise<void>;
136
+ communityFetchAllParticipating: () => Promise<{}>;
137
+ logger: any;
138
+ getOrderDetails: (orderId: any, tokenBase64: any) => Promise<{
139
+ price: {
140
+ total: number;
141
+ currency: any;
142
+ };
143
+ products: any;
52
144
  }>;
53
- getCollections: (jid?: string, limit?: number) => Promise<{
54
- collections: import("../index.js").CatalogCollection[];
145
+ getCatalog: ({ jid, limit, cursor }: {
146
+ jid: any;
147
+ limit: any;
148
+ cursor: any;
149
+ }) => Promise<{
150
+ products: any;
151
+ nextPageCursor: any;
55
152
  }>;
56
- productCreate: (create: import("../index.js").ProductCreate) => Promise<import("../index.js").Product>;
57
- productDelete: (productIds: string[]) => Promise<{
153
+ getCollections: (jid: any, limit?: number) => Promise<{
154
+ collections: any;
155
+ }>;
156
+ productCreate: (create: any) => Promise<{
157
+ id: any;
158
+ imageUrls: {
159
+ requested: any;
160
+ original: any;
161
+ };
162
+ reviewStatus: {
163
+ whatsapp: any;
164
+ };
165
+ availability: string;
166
+ name: any;
167
+ retailerId: any;
168
+ url: any;
169
+ description: any;
170
+ price: number;
171
+ currency: any;
172
+ isHidden: boolean;
173
+ }>;
174
+ productDelete: (productIds: any) => Promise<{
58
175
  deleted: number;
59
176
  }>;
60
- productUpdate: (productId: string, update: import("../index.js").ProductUpdate) => Promise<import("../index.js").Product>;
61
- updateBussinesProfile: (args: import("../Types/Bussines.js").UpdateBussinesProfileProps) => Promise<any>;
62
- updateCoverPhoto: (photo: import("../index.js").WAMediaUpload) => Promise<number>;
63
- removeCoverPhoto: (id: string) => Promise<any>;
64
- sendMessageAck: (node: import("../index.js").BinaryNode, errorCode?: number) => Promise<void>;
65
- sendRetryRequest: (node: import("../index.js").BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
66
- rejectCall: (callId: string, callFrom: string) => Promise<void>;
67
- fetchMessageHistory: (count: number, oldestMsgKey: import("../index.js").WAMessageKey, oldestMsgTimestamp: number | import("long").default) => Promise<string>;
68
- requestPlaceholderResend: (messageKey: import("../index.js").WAMessageKey, msgData?: Partial<import("../index.js").WAMessage>) => Promise<string | undefined>;
177
+ productUpdate: (productId: any, update: any) => Promise<{
178
+ id: any;
179
+ imageUrls: {
180
+ requested: any;
181
+ original: any;
182
+ };
183
+ reviewStatus: {
184
+ whatsapp: any;
185
+ };
186
+ availability: string;
187
+ name: any;
188
+ retailerId: any;
189
+ url: any;
190
+ description: any;
191
+ price: number;
192
+ currency: any;
193
+ isHidden: boolean;
194
+ }>;
195
+ updateBussinesProfile: (args: any) => Promise<any>;
196
+ updateBusinessProfile: (args: any) => Promise<any>;
197
+ updateCoverPhoto: (photo: any) => Promise<any>;
198
+ removeCoverPhoto: (id: any) => Promise<any>;
199
+ sendMessageAck: (node: any, errorCode: any) => Promise<void>;
200
+ sendRetryRequest: (node: any, forceIncludeKeys?: boolean) => Promise<void>;
201
+ rejectCall: (callId: any, callFrom: any) => Promise<void>;
202
+ fetchMessageHistory: (count: any, oldestMsgKey: any, oldestMsgTimestamp: any) => Promise<any>;
203
+ requestPlaceholderResend: (messageKey: any, msgData: any) => Promise<any>;
69
204
  messageRetryManager: import("../index.js").MessageRetryManager | null;
70
- userDevicesCache: import("../index.js").PossiblyExtendedCacheStore | import("@cacheable/node-cache").NodeCache<import("../index.js").JidWithDevice[]>;
205
+ userDevicesCache: any;
71
206
  devicesMutex: {
72
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
207
+ mutex(code: any): any;
73
208
  };
74
- issuePrivacyTokens: (jids: string[], timestamp?: number) => Promise<any>;
75
- assertSessions: (jids: string[], force?: boolean) => Promise<boolean>;
76
- relayMessage: (jid: string, message: import("../index.js").proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: import("../index.js").MessageRelayOptions) => Promise<string>;
77
- sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../index.js").MessageReceiptType) => Promise<void>;
78
- sendReceipts: (keys: import("../index.js").WAMessageKey[], type: import("../index.js").MessageReceiptType) => Promise<void>;
79
- readMessages: (keys: import("../index.js").WAMessageKey[]) => Promise<void>;
80
- refreshMediaConn: (forceGet?: boolean) => Promise<import("../index.js").MediaConnInfo>;
209
+ issuePrivacyTokens: (jids: any, timestamp: any) => Promise<any>;
210
+ assertSessions: (jids: any, force: any) => Promise<boolean>;
211
+ relayMessage: (jid: any, message: any, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, addBizAttributes, statusJidList }: {
212
+ messageId: any;
213
+ participant: any;
214
+ additionalAttributes: any;
215
+ additionalNodes: any;
216
+ useUserDevicesCache: any;
217
+ useCachedGroupMetadata: any;
218
+ addBizAttributes: any;
219
+ statusJidList: any;
220
+ }) => Promise<any>;
221
+ sendReceipt: (jid: any, participant: any, messageIds: any, type: any) => Promise<void>;
222
+ sendReceipts: (keys: any, type: any) => Promise<void>;
223
+ readMessages: (keys: any) => Promise<void>;
224
+ refreshMediaConn: (forceGet?: boolean) => Promise<any>;
81
225
  getMediaHost: () => string;
82
- waUploadToServer: import("../index.js").WAMediaUploadFunction;
83
- fetchPrivacySettings: (force?: boolean) => Promise<{
84
- [_: string]: string;
226
+ waUploadToServer: (filePath: any, { mediaType, fileEncSha256B64, timeoutMs, newsletter }: {
227
+ mediaType: any;
228
+ fileEncSha256B64: any;
229
+ timeoutMs: any;
230
+ newsletter: any;
231
+ }) => Promise<{
232
+ mediaUrl: any;
233
+ directPath: any;
234
+ meta_hmac: any;
235
+ fbid: any;
236
+ ts: any;
237
+ thumbnailDirectPath: any;
238
+ thumbnailSha256: any;
85
239
  }>;
86
- sendPeerDataOperationMessage: (pdoMessage: import("../index.js").proto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
87
- createParticipantNodes: (recipientJids: string[], message: import("../index.js").proto.IMessage, extraAttrs?: import("../index.js").BinaryNode["attrs"], dsmMessage?: import("../index.js").proto.IMessage) => Promise<{
88
- nodes: import("../index.js").BinaryNode[];
240
+ fetchPrivacySettings: (force?: boolean) => Promise<any>;
241
+ sendPeerDataOperationMessage: (pdoMessage: any) => Promise<any>;
242
+ createParticipantNodes: (recipientJids: any, message: any, extraAttrs: any, dsmMessage: any) => Promise<{
243
+ nodes: any[];
89
244
  shouldIncludeDeviceIdentity: boolean;
90
245
  }>;
91
- getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(import("../index.js").JidWithDevice & {
92
- jid: string;
93
- })[]>;
94
- updateMemberLabel: (jid: string, memberLabel: string) => Promise<string>;
95
- updateMediaMessage: (message: import("../index.js").WAMessage) => Promise<import("../index.js").WAMessage>;
96
- sendMessage: (jid: string, content: import("../index.js").AnyMessageContent, options?: import("../index.js").MiscMessageGenerationOptions) => Promise<import("../index.js").WAMessage | undefined>;
97
- newsletterCreate: (name: string, description?: string) => Promise<import("../index.js").NewsletterMetadata>;
98
- newsletterUpdate: (jid: string, updates: import("../index.js").NewsletterUpdate) => Promise<unknown>;
99
- newsletterSubscribers: (jid: string) => Promise<{
246
+ getUSyncDevices: (jids: any, useCache: any, ignoreZeroDevices: any) => Promise<any[]>;
247
+ updateMemberLabel: (jid: any, memberLabel: any) => Promise<any>;
248
+ updateMediaMessage: (message: any) => Promise<any>;
249
+ sendMessage: (jid: any, content: any, options?: {}) => Promise<import("../index.js").proto.WebMessageInfo | undefined>;
250
+ executeWMexQuery: (variables: any, queryId: any, dataPath: any) => Promise<any>;
251
+ newsletterCreate: (name: any, description: any) => Promise<{
252
+ id: any;
253
+ owner: undefined;
254
+ name: any;
255
+ creation_time: number;
256
+ description: any;
257
+ invite: any;
100
258
  subscribers: number;
259
+ verification: any;
260
+ picture: {
261
+ id: any;
262
+ directPath: any;
263
+ };
264
+ mute_state: any;
101
265
  }>;
102
- newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("../index.js").NewsletterMetadata | null>;
103
- newsletterFollow: (jid: string) => Promise<unknown>;
104
- newsletterUnfollow: (jid: string) => Promise<unknown>;
105
- newsletterMute: (jid: string) => Promise<unknown>;
106
- newsletterUnmute: (jid: string) => Promise<unknown>;
107
- newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
108
- newsletterUpdateDescription: (jid: string, description: string) => Promise<unknown>;
109
- newsletterUpdatePicture: (jid: string, content: import("../index.js").WAMediaUpload) => Promise<unknown>;
110
- newsletterRemovePicture: (jid: string) => Promise<unknown>;
111
- newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
112
- newsletterFetchMessages: (jid: string, count: number, since: number, after: number) => Promise<any>;
113
- subscribeNewsletterUpdates: (jid: string) => Promise<{
114
- duration: string;
115
- } | null>;
116
- newsletterAdminCount: (jid: string) => Promise<number>;
117
- newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
118
- newsletterDemote: (jid: string, userJid: string) => Promise<void>;
119
- newsletterDelete: (jid: string) => Promise<void>;
120
- groupMetadata: (jid: string) => Promise<import("../index.js").GroupMetadata>;
121
- groupCreate: (subject: string, participants: string[]) => Promise<import("../index.js").GroupMetadata>;
122
- groupLeave: (id: string) => Promise<void>;
123
- groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
124
- groupRequestParticipantsList: (jid: string) => Promise<{
125
- [key: string]: string;
126
- }[]>;
127
- groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
128
- status: string;
129
- jid: string | undefined;
266
+ newsletterUpdate: (jid: any, updates: any) => Promise<any>;
267
+ newsletterSubscribers: (jid: any) => Promise<any>;
268
+ newsletterSubscribed: () => Promise<any>;
269
+ newsletterMetadata: (type: any, key: any) => Promise<any>;
270
+ newsletterFollow: (jid: any) => Promise<any>;
271
+ newsletterUnfollow: (jid: any) => Promise<any>;
272
+ newsletterMute: (jid: any) => Promise<any>;
273
+ newsletterUnmute: (jid: any) => Promise<any>;
274
+ newsletterUpdateName: (jid: any, name: any) => Promise<any>;
275
+ newsletterUpdateDescription: (jid: any, description: any) => Promise<any>;
276
+ newsletterUpdatePicture: (jid: any, content: any) => Promise<any>;
277
+ newsletterRemovePicture: (jid: any) => Promise<any>;
278
+ newsletterReactMessage: (jid: any, serverId: any, reaction: any) => Promise<void>;
279
+ newsletterFetchMessages: (type: any, key: any, count: any, after: any, before: any) => Promise<{
280
+ [k: string]: any;
130
281
  }[]>;
131
- groupParticipantsUpdate: (jid: string, participants: string[], action: import("../index.js").ParticipantAction) => Promise<{
132
- status: string;
133
- jid: string | undefined;
134
- content: import("../index.js").BinaryNode;
135
- }[]>;
136
- groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
137
- groupInviteCode: (jid: string) => Promise<string | undefined>;
138
- groupRevokeInvite: (jid: string) => Promise<string | undefined>;
139
- groupAcceptInvite: (code: string) => Promise<string | undefined>;
140
- groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
141
- groupAcceptInviteV4: (key: string | import("../index.js").WAMessageKey, inviteMessage: import("../index.js").proto.Message.IGroupInviteMessage) => Promise<any>;
142
- groupGetInviteInfo: (code: string) => Promise<import("../index.js").GroupMetadata>;
143
- groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
144
- groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
145
- groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
146
- groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
147
- groupFetchAllParticipating: () => Promise<{
148
- [_: string]: import("../index.js").GroupMetadata;
282
+ subscribeNewsletterUpdates: (jid: any) => Promise<{
283
+ duration: any;
284
+ } | null>;
285
+ newsletterAdminCount: (jid: any) => Promise<any>;
286
+ newsletterChangeOwner: (jid: any, newOwnerJid: any) => Promise<void>;
287
+ newsletterDemote: (jid: any, userJid: any) => Promise<void>;
288
+ newsletterDelete: (jid: any) => Promise<void>;
289
+ groupQuery: (jid: any, type: any, content: any) => Promise<any>;
290
+ groupMetadata: (jid: any) => Promise<{
291
+ id: any;
292
+ notify: any;
293
+ addressingMode: any;
294
+ subject: any;
295
+ subjectOwner: any;
296
+ subjectOwnerPn: any;
297
+ subjectOwnerUsername: any;
298
+ subjectTime: number;
299
+ size: any;
300
+ creation: number;
301
+ owner: string | undefined;
302
+ ownerPn: string | undefined;
303
+ ownerUsername: any;
304
+ owner_country_code: any;
305
+ desc: any;
306
+ descId: any;
307
+ descOwner: string | undefined;
308
+ descOwnerPn: string | undefined;
309
+ descOwnerUsername: any;
310
+ descTime: number | undefined;
311
+ linkedParent: any;
312
+ restrict: boolean;
313
+ announce: boolean;
314
+ isCommunity: boolean;
315
+ isCommunityAnnounce: boolean;
316
+ joinApprovalMode: boolean;
317
+ memberAddMode: boolean;
318
+ participants: any;
319
+ ephemeralDuration: number | undefined;
320
+ }>;
321
+ groupCreate: (subject: any, participants: any) => Promise<{
322
+ id: any;
323
+ notify: any;
324
+ addressingMode: any;
325
+ subject: any;
326
+ subjectOwner: any;
327
+ subjectOwnerPn: any;
328
+ subjectOwnerUsername: any;
329
+ subjectTime: number;
330
+ size: any;
331
+ creation: number;
332
+ owner: string | undefined;
333
+ ownerPn: string | undefined;
334
+ ownerUsername: any;
335
+ owner_country_code: any;
336
+ desc: any;
337
+ descId: any;
338
+ descOwner: string | undefined;
339
+ descOwnerPn: string | undefined;
340
+ descOwnerUsername: any;
341
+ descTime: number | undefined;
342
+ linkedParent: any;
343
+ restrict: boolean;
344
+ announce: boolean;
345
+ isCommunity: boolean;
346
+ isCommunityAnnounce: boolean;
347
+ joinApprovalMode: boolean;
348
+ memberAddMode: boolean;
349
+ participants: any;
350
+ ephemeralDuration: number | undefined;
351
+ }>;
352
+ groupLeave: (id: any) => Promise<void>;
353
+ groupUpdateSubject: (jid: any, subject: any) => Promise<void>;
354
+ groupRequestParticipantsList: (jid: any) => Promise<any>;
355
+ groupRequestParticipantsUpdate: (jid: any, participants: any, action: any) => Promise<any>;
356
+ groupParticipantsUpdate: (jid: any, participants: any, action: any) => Promise<any>;
357
+ groupUpdateDescription: (jid: any, description: any) => Promise<void>;
358
+ groupInviteCode: (jid: any) => Promise<any>;
359
+ groupRevokeInvite: (jid: any) => Promise<any>;
360
+ groupAcceptInvite: (code: any) => Promise<any>;
361
+ groupRevokeInviteV4: (groupJid: any, invitedJid: any) => Promise<boolean>;
362
+ groupAcceptInviteV4: (...args: any[]) => Promise<any>;
363
+ groupGetInviteInfo: (code: any) => Promise<{
364
+ id: any;
365
+ notify: any;
366
+ addressingMode: any;
367
+ subject: any;
368
+ subjectOwner: any;
369
+ subjectOwnerPn: any;
370
+ subjectOwnerUsername: any;
371
+ subjectTime: number;
372
+ size: any;
373
+ creation: number;
374
+ owner: string | undefined;
375
+ ownerPn: string | undefined;
376
+ ownerUsername: any;
377
+ owner_country_code: any;
378
+ desc: any;
379
+ descId: any;
380
+ descOwner: string | undefined;
381
+ descOwnerPn: string | undefined;
382
+ descOwnerUsername: any;
383
+ descTime: number | undefined;
384
+ linkedParent: any;
385
+ restrict: boolean;
386
+ announce: boolean;
387
+ isCommunity: boolean;
388
+ isCommunityAnnounce: boolean;
389
+ joinApprovalMode: boolean;
390
+ memberAddMode: boolean;
391
+ participants: any;
392
+ ephemeralDuration: number | undefined;
393
+ }>;
394
+ groupToggleEphemeral: (jid: any, ephemeralExpiration: any) => Promise<void>;
395
+ groupSettingUpdate: (jid: any, setting: any) => Promise<void>;
396
+ groupMemberAddMode: (jid: any, mode: any) => Promise<void>;
397
+ groupJoinApprovalMode: (jid: any, mode: any) => Promise<void>;
398
+ groupFetchAllParticipating: () => Promise<{}>;
399
+ findUserId: (pnLid: any) => Promise<{
400
+ lid: undefined;
401
+ phoneNumber: undefined;
149
402
  }>;
150
403
  serverProps: {
151
404
  privacyTokenOn1to1: boolean;
152
405
  profilePicPrivacyToken: boolean;
153
406
  lidTrustedTokenIssueToLid: boolean;
154
407
  };
155
- createCallLink: (type: "audio" | "video", event?: {
156
- startTime: number;
157
- }, timeoutMs?: number) => Promise<string | undefined>;
158
- getBotListV2: () => Promise<import("../index.js").BotListInfo[]>;
408
+ createCallLink: (type: any, event: any, timeoutMs: any) => Promise<any>;
409
+ getBotListV2: () => Promise<{
410
+ jid: any;
411
+ personaId: any;
412
+ }[]>;
159
413
  messageMutex: {
160
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
414
+ mutex(code: any): any;
161
415
  };
162
416
  receiptMutex: {
163
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
417
+ mutex(code: any): any;
164
418
  };
165
419
  appStatePatchMutex: {
166
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
420
+ mutex(code: any): any;
167
421
  };
168
422
  notificationMutex: {
169
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
423
+ mutex(code: any): any;
170
424
  };
171
- upsertMessage: (msg: import("../index.js").WAMessage, type: import("../index.js").MessageUpsertType) => Promise<void>;
172
- appPatch: (patchCreate: import("../index.js").WAPatchCreate) => Promise<void>;
173
- sendPresenceUpdate: (type: import("../index.js").WAPresence, toJid?: string) => Promise<void>;
174
- presenceSubscribe: (toJid: string) => Promise<void>;
175
- profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
176
- fetchBlocklist: () => Promise<(string | undefined)[]>;
177
- fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
178
- fetchDisappearingDuration: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
179
- updateProfilePicture: (jid: string, content: import("../index.js").WAMediaUpload, dimensions?: {
180
- width: number;
181
- height: number;
182
- }) => Promise<void>;
183
- removeProfilePicture: (jid: string) => Promise<void>;
184
- updateProfileStatus: (status: string) => Promise<void>;
185
- updateProfileName: (name: string) => Promise<void>;
186
- updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
187
- updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
188
- updateCallPrivacy: (value: import("../index.js").WAPrivacyCallValue) => Promise<void>;
189
- updateMessagesPrivacy: (value: import("../index.js").WAPrivacyMessagesValue) => Promise<void>;
190
- updateLastSeenPrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
191
- updateOnlinePrivacy: (value: import("../index.js").WAPrivacyOnlineValue) => Promise<void>;
192
- updateProfilePicturePrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
193
- updateStatusPrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
194
- updateReadReceiptsPrivacy: (value: import("../index.js").WAReadReceiptsValue) => Promise<void>;
195
- updateGroupsAddPrivacy: (value: import("../index.js").WAPrivacyGroupAddValue) => Promise<void>;
196
- updateDefaultDisappearingMode: (duration: number) => Promise<void>;
197
- getBusinessProfile: (jid: string) => Promise<import("../index.js").WABusinessProfile | void>;
198
- resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
199
- chatModify: (mod: import("../index.js").ChatModification, jid: string) => Promise<void>;
200
- cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
201
- addOrEditContact: (jid: string, contact: import("../index.js").proto.SyncActionValue.IContactAction) => Promise<void>;
202
- removeContact: (jid: string) => Promise<void>;
203
- placeholderResendCache: import("../index.js").CacheStore;
204
- addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
205
- addChatLabel: (jid: string, labelId: string) => Promise<void>;
206
- removeChatLabel: (jid: string, labelId: string) => Promise<void>;
207
- addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
208
- removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
209
- star: (jid: string, messages: {
210
- id: string;
211
- fromMe?: boolean;
212
- }[], star: boolean) => Promise<void>;
213
- addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
214
- removeQuickReply: (timestamp: string) => Promise<void>;
215
- type: "md";
216
- ws: import("./Client/index.js").WebSocketClient;
217
- ev: import("../index.js").BaileysEventEmitter & {
218
- process(handler: (events: Partial<import("../index.js").BaileysEventMap>) => void | Promise<void>): () => void;
219
- buffer(): void;
220
- createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
221
- flush(): boolean;
425
+ upsertMessage: (...args: any[]) => Promise<any>;
426
+ appPatch: (patchCreate: any) => Promise<void>;
427
+ sendPresenceUpdate: (type: any, toJid: any) => Promise<void>;
428
+ presenceSubscribe: (toJid: any) => Promise<void>;
429
+ profilePictureUrl: (jid: any, type?: string, timeoutMs?: number, shouldIncludeTcToken?: boolean) => Promise<any>;
430
+ fetchBlocklist: () => Promise<any>;
431
+ fetchStatus: (...jids: any[]) => Promise<any>;
432
+ fetchDisappearingDuration: (...jids: any[]) => Promise<any>;
433
+ updateProfilePicture: (jid: any, content: any, dimensions: any) => Promise<void>;
434
+ removeProfilePicture: (jid: any) => Promise<void>;
435
+ updateProfileStatus: (status: any) => Promise<void>;
436
+ updateProfileName: (name: any) => Promise<void>;
437
+ updateBlockStatus: (jid: any, action: any) => Promise<void>;
438
+ updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: any) => Promise<void>;
439
+ updateCallPrivacy: (value: any) => Promise<void>;
440
+ updateMessagesPrivacy: (value: any) => Promise<void>;
441
+ updateLastSeenPrivacy: (value: any) => Promise<void>;
442
+ updateOnlinePrivacy: (value: any) => Promise<void>;
443
+ updateProfilePicturePrivacy: (value: any) => Promise<void>;
444
+ updateStatusPrivacy: (value: any) => Promise<void>;
445
+ updateReadReceiptsPrivacy: (value: any) => Promise<void>;
446
+ updateGroupsAddPrivacy: (value: any) => Promise<void>;
447
+ updateDefaultDisappearingMode: (duration: any) => Promise<void>;
448
+ getBusinessProfile: (jid: any) => Promise<{
449
+ wid: any;
450
+ address: any;
451
+ description: any;
452
+ website: any[];
453
+ email: any;
454
+ category: any;
455
+ business_hours: {
456
+ timezone: any;
457
+ business_config: any;
458
+ };
459
+ } | undefined>;
460
+ resyncAppState: (...args: any[]) => Promise<any>;
461
+ chatModify: (mod: any, jid: any) => Promise<void>;
462
+ cleanDirtyBits: (type: any, fromTimestamp: any) => Promise<void>;
463
+ addOrEditContact: (jid: any, contact: any) => Promise<void>;
464
+ removeContact: (jid: any) => Promise<void>;
465
+ placeholderResendCache: any;
466
+ addLabel: (jid: any, labels: any) => Promise<void>;
467
+ addChatLabel: (jid: any, labelId: any) => Promise<void>;
468
+ removeChatLabel: (jid: any, labelId: any) => Promise<void>;
469
+ addMessageLabel: (jid: any, messageId: any, labelId: any) => Promise<void>;
470
+ removeMessageLabel: (jid: any, messageId: any, labelId: any) => Promise<void>;
471
+ star: (jid: any, messages: any, star: any) => Promise<void>;
472
+ addOrEditQuickReply: (quickReply: any) => Promise<void>;
473
+ removeQuickReply: (timestamp: any) => Promise<void>;
474
+ type: string;
475
+ ws: import("./Client/websocket.js").WebSocketClient;
476
+ ev: {
477
+ process(handler: any): () => void;
478
+ emit(event: any, evData: any): any;
222
479
  isBuffering(): boolean;
480
+ buffer: () => void;
481
+ flush: () => boolean;
482
+ createBufferedFunction(work: any): (...args: any[]) => Promise<any>;
483
+ on: (...args: any[]) => any;
484
+ off: (...args: any[]) => any;
485
+ removeAllListeners: (...args: any[]) => any;
223
486
  destroy(): void;
224
487
  };
225
488
  authState: {
226
- creds: import("../index.js").AuthenticationCreds;
227
- keys: import("../index.js").SignalKeyStoreWithTransaction;
489
+ creds: any;
490
+ keys: {
491
+ get: (type: any, ids: any) => Promise<any>;
492
+ set: (data: any) => Promise<void>;
493
+ isInTransaction: () => boolean;
494
+ transaction: (work: any, key: any) => Promise<any>;
495
+ };
228
496
  };
229
- signalRepository: import("../index.js").SignalRepositoryWithLIDStore;
230
- user: import("../index.js").Contact | undefined;
497
+ signalRepository: any;
498
+ user: any;
231
499
  generateMessageTag: () => string;
232
- query: (node: import("../index.js").BinaryNode, timeoutMs?: number) => Promise<any>;
233
- waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
500
+ query: (node: any, timeoutMs: any) => Promise<any>;
501
+ waitForMessage: (msgId: any, timeoutMs?: any) => Promise<any>;
234
502
  waitForSocketOpen: () => Promise<void>;
235
- sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
236
- sendNode: (frame: import("../index.js").BinaryNode) => Promise<void>;
237
- logout: (msg?: string) => Promise<void>;
238
- end: (error: Error | undefined) => Promise<void>;
239
- registerSocketEndHandler: (handler: (error: Error | undefined) => void | Promise<void>) => void;
240
- onUnexpectedError: (err: Error | import("@hapi/boom").Boom, msg: string) => void;
503
+ sendRawMessage: (data: any) => Promise<void>;
504
+ sendNode: (frame: any) => Promise<void>;
505
+ logout: (msg: any) => Promise<void>;
506
+ end: (error: any) => Promise<void>;
507
+ registerSocketEndHandler: (handler: any) => void;
508
+ onUnexpectedError: (err: any, msg: any) => void;
241
509
  uploadPreKeys: (count?: number) => Promise<void>;
242
510
  uploadPreKeysToServerIfRequired: () => Promise<void>;
243
511
  digestKeyBundle: () => Promise<void>;
244
512
  rotateSignedPreKey: () => Promise<void>;
245
- requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
246
- updateServerTimeOffset: ({ attrs }: import("../index.js").BinaryNode) => void;
513
+ requestPairingCode: (phoneNumber: any, customPairingCode: any) => Promise<any>;
514
+ updateServerTimeOffset: ({ attrs }: {
515
+ attrs: any;
516
+ }) => void;
247
517
  sendUnifiedSession: () => Promise<void>;
248
518
  wamBuffer: import("../index.js").BinaryInfo;
249
- waitForConnectionUpdate: (check: (u: Partial<import("../index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
250
- sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
251
- executeUSyncQuery: (usyncQuery: import("../index.js").USyncQuery) => Promise<import("../index.js").USyncQueryResult | undefined>;
252
- onWhatsApp: (...phoneNumber: string[]) => Promise<{
253
- jid: string;
254
- exists: boolean;
255
- }[] | undefined>;
256
- fetchAccountReachoutTimelock: () => Promise<import("../index.js").ReachoutTimelockState>;
257
- fetchNewChatMessageCap: () => Promise<import("../index.js").NewChatMessageCapInfo>;
519
+ waitForConnectionUpdate: (check: any, timeoutMs: any) => Promise<void>;
520
+ sendWAMBuffer: (wamBuffer: any) => Promise<any>;
521
+ executeUSyncQuery: (usyncQuery: any) => Promise<any>;
522
+ onWhatsApp: (...phoneNumber: any[]) => Promise<any>;
523
+ fetchAccountReachoutTimelock: () => Promise<{
524
+ isActive: boolean;
525
+ timeEnforcementEnds: Date | undefined;
526
+ enforcementType: any;
527
+ }>;
528
+ fetchNewChatMessageCap: () => Promise<any>;
258
529
  };
259
- export default makeWASocket;
260
530
  //# sourceMappingURL=index.d.ts.map