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