@d0v3riz/baileys 6.7.21 → 6.7.22

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 (356) hide show
  1. package/WAProto/GenerateStatics.sh +2 -3
  2. package/WAProto/index.js +4138 -4136
  3. package/lib/Defaults/index.d.ts +2 -3
  4. package/lib/Defaults/index.js +40 -36
  5. package/lib/Signal/Group/ciphertext-message.d.ts +0 -1
  6. package/lib/Signal/Group/ciphertext-message.js +5 -2
  7. package/lib/Signal/Group/group-session-builder.d.ts +3 -4
  8. package/lib/Signal/Group/group-session-builder.js +41 -7
  9. package/lib/Signal/Group/group_cipher.d.ts +2 -3
  10. package/lib/Signal/Group/group_cipher.js +16 -14
  11. package/lib/Signal/Group/index.d.ts +11 -12
  12. package/lib/Signal/Group/index.js +57 -12
  13. package/lib/Signal/Group/keyhelper.d.ts +1 -2
  14. package/lib/Signal/Group/keyhelper.js +44 -8
  15. package/lib/Signal/Group/queue-job.d.ts +0 -2
  16. package/lib/Signal/Group/queue-job.js +5 -5
  17. package/lib/Signal/Group/sender-chain-key.d.ts +1 -2
  18. package/lib/Signal/Group/sender-chain-key.js +9 -7
  19. package/lib/Signal/Group/sender-key-distribution-message.d.ts +1 -2
  20. package/lib/Signal/Group/sender-key-distribution-message.js +9 -6
  21. package/lib/Signal/Group/sender-key-message.d.ts +1 -2
  22. package/lib/Signal/Group/sender-key-message.js +12 -10
  23. package/lib/Signal/Group/sender-key-name.d.ts +0 -1
  24. package/lib/Signal/Group/sender-key-name.js +5 -2
  25. package/lib/Signal/Group/sender-key-record.d.ts +1 -2
  26. package/lib/Signal/Group/sender-key-record.js +12 -9
  27. package/lib/Signal/Group/sender-key-state.d.ts +2 -3
  28. package/lib/Signal/Group/sender-key-state.js +9 -6
  29. package/lib/Signal/Group/sender-message-key.d.ts +0 -1
  30. package/lib/Signal/Group/sender-message-key.js +7 -5
  31. package/lib/Signal/libsignal.d.ts +2 -3
  32. package/lib/Signal/libsignal.js +55 -22
  33. package/lib/Socket/Client/index.d.ts +2 -3
  34. package/lib/Socket/Client/index.js +18 -3
  35. package/lib/Socket/Client/types.d.ts +1 -2
  36. package/lib/Socket/Client/types.js +6 -4
  37. package/lib/Socket/Client/websocket.d.ts +1 -2
  38. package/lib/Socket/Client/websocket.js +26 -14
  39. package/lib/Socket/business.d.ts +64 -66
  40. package/lib/Socket/business.js +37 -32
  41. package/lib/Socket/chats.d.ts +19 -21
  42. package/lib/Socket/chats.js +141 -176
  43. package/lib/Socket/groups.d.ts +35 -37
  44. package/lib/Socket/groups.js +63 -56
  45. package/lib/Socket/index.d.ts +70 -102
  46. package/lib/Socket/index.js +9 -16
  47. package/lib/Socket/messages-recv.d.ts +49 -51
  48. package/lib/Socket/messages-recv.js +173 -180
  49. package/lib/Socket/messages-send.d.ts +46 -48
  50. package/lib/Socket/messages-send.js +84 -75
  51. package/lib/Socket/mex.d.ts +1 -2
  52. package/lib/Socket/mex.js +16 -12
  53. package/lib/Socket/newsletter.d.ts +44 -46
  54. package/lib/Socket/newsletter.js +27 -23
  55. package/lib/Socket/socket.d.ts +12 -13
  56. package/lib/Socket/socket.js +115 -135
  57. package/lib/Socket/usync.d.ts +14 -15
  58. package/lib/Socket/usync.js +11 -9
  59. package/lib/Types/Auth.d.ts +3 -4
  60. package/lib/Types/Auth.js +2 -2
  61. package/lib/Types/Call.d.ts +0 -1
  62. package/lib/Types/Call.js +2 -2
  63. package/lib/Types/Chat.d.ts +7 -10
  64. package/lib/Types/Chat.js +4 -2
  65. package/lib/Types/Contact.d.ts +0 -1
  66. package/lib/Types/Contact.js +2 -2
  67. package/lib/Types/Events.d.ts +10 -11
  68. package/lib/Types/Events.js +2 -2
  69. package/lib/Types/GroupMetadata.d.ts +2 -3
  70. package/lib/Types/GroupMetadata.js +2 -2
  71. package/lib/Types/Label.d.ts +0 -1
  72. package/lib/Types/Label.js +5 -3
  73. package/lib/Types/LabelAssociation.d.ts +0 -1
  74. package/lib/Types/LabelAssociation.js +5 -3
  75. package/lib/Types/Message.d.ts +7 -9
  76. package/lib/Types/Message.js +7 -7
  77. package/lib/Types/Newsletter.d.ts +0 -1
  78. package/lib/Types/Newsletter.js +7 -5
  79. package/lib/Types/Product.d.ts +1 -2
  80. package/lib/Types/Product.js +2 -2
  81. package/lib/Types/Signal.d.ts +1 -2
  82. package/lib/Types/Signal.js +2 -2
  83. package/lib/Types/Socket.d.ts +7 -8
  84. package/lib/Types/Socket.js +2 -3
  85. package/lib/Types/State.d.ts +2 -14
  86. package/lib/Types/State.js +2 -13
  87. package/lib/Types/USync.d.ts +2 -3
  88. package/lib/Types/USync.js +2 -2
  89. package/lib/Types/index.d.ts +14 -15
  90. package/lib/Types/index.js +31 -15
  91. package/lib/Utils/auth-utils.d.ts +2 -3
  92. package/lib/Utils/auth-utils.js +34 -25
  93. package/lib/Utils/baileys-event-stream.d.ts +1 -2
  94. package/lib/Utils/baileys-event-stream.js +22 -15
  95. package/lib/Utils/business.d.ts +2 -3
  96. package/lib/Utils/business.js +70 -61
  97. package/lib/Utils/chat-utils.d.ts +7 -8
  98. package/lib/Utils/chat-utils.js +137 -130
  99. package/lib/Utils/crypto.d.ts +1 -2
  100. package/lib/Utils/crypto.js +86 -37
  101. package/lib/Utils/decode-wa-message.d.ts +4 -5
  102. package/lib/Utils/decode-wa-message.js +44 -38
  103. package/lib/Utils/event-buffer.d.ts +4 -4
  104. package/lib/Utils/event-buffer.js +50 -37
  105. package/lib/Utils/generics.d.ts +8 -9
  106. package/lib/Utils/generics.js +114 -87
  107. package/lib/Utils/history.d.ts +3 -4
  108. package/lib/Utils/history.js +40 -32
  109. package/lib/Utils/index.d.ts +17 -18
  110. package/lib/Utils/index.js +33 -18
  111. package/lib/Utils/link-preview.d.ts +3 -4
  112. package/lib/Utils/link-preview.js +47 -10
  113. package/lib/Utils/logger.d.ts +6 -8
  114. package/lib/Utils/logger.js +7 -3
  115. package/lib/Utils/lt-hash.d.ts +8 -9
  116. package/lib/Utils/lt-hash.js +26 -23
  117. package/lib/Utils/make-mutex.d.ts +0 -1
  118. package/lib/Utils/make-mutex.js +9 -5
  119. package/lib/Utils/messages-media.d.ts +10 -11
  120. package/lib/Utils/messages-media.js +203 -141
  121. package/lib/Utils/messages.d.ts +6 -7
  122. package/lib/Utils/messages.js +199 -190
  123. package/lib/Utils/noise-handler.d.ts +4 -5
  124. package/lib/Utils/noise-handler.js +26 -22
  125. package/lib/Utils/process-message.d.ts +4 -5
  126. package/lib/Utils/process-message.js +104 -95
  127. package/lib/Utils/signal.d.ts +4 -5
  128. package/lib/Utils/signal.js +52 -47
  129. package/lib/Utils/use-multi-file-auth-state.d.ts +1 -2
  130. package/lib/Utils/use-multi-file-auth-state.js +26 -23
  131. package/lib/Utils/validate-connection.d.ts +3 -4
  132. package/lib/Utils/validate-connection.js +58 -52
  133. package/lib/WABinary/constants.d.ts +0 -1
  134. package/lib/WABinary/constants.js +11 -9
  135. package/lib/WABinary/decode.d.ts +1 -2
  136. package/lib/WABinary/decode.js +51 -13
  137. package/lib/WABinary/encode.d.ts +1 -2
  138. package/lib/WABinary/encode.js +41 -5
  139. package/lib/WABinary/generic-utils.d.ts +3 -4
  140. package/lib/WABinary/generic-utils.js +38 -30
  141. package/lib/WABinary/index.d.ts +5 -6
  142. package/lib/WABinary/index.js +21 -6
  143. package/lib/WABinary/jid-utils.d.ts +0 -1
  144. package/lib/WABinary/jid-utils.js +35 -21
  145. package/lib/WABinary/types.d.ts +1 -2
  146. package/lib/WABinary/types.js +2 -2
  147. package/lib/WAM/BinaryInfo.d.ts +1 -2
  148. package/lib/WAM/BinaryInfo.js +5 -2
  149. package/lib/WAM/constants.d.ts +0 -1
  150. package/lib/WAM/constants.js +6 -4
  151. package/lib/WAM/encode.d.ts +1 -2
  152. package/lib/WAM/encode.js +14 -12
  153. package/lib/WAM/index.d.ts +3 -4
  154. package/lib/WAM/index.js +19 -4
  155. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +3 -4
  156. package/lib/WAUSync/Protocols/USyncContactProtocol.js +9 -6
  157. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +2 -3
  158. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +12 -9
  159. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +2 -3
  160. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +9 -6
  161. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +2 -3
  162. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +11 -7
  163. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +3 -4
  164. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +21 -19
  165. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +2 -3
  166. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +5 -2
  167. package/lib/WAUSync/Protocols/index.d.ts +4 -5
  168. package/lib/WAUSync/Protocols/index.js +20 -5
  169. package/lib/WAUSync/USyncQuery.d.ts +3 -4
  170. package/lib/WAUSync/USyncQuery.js +20 -18
  171. package/lib/WAUSync/USyncUser.d.ts +5 -6
  172. package/lib/WAUSync/USyncUser.js +5 -2
  173. package/lib/WAUSync/index.d.ts +3 -4
  174. package/lib/WAUSync/index.js +19 -4
  175. package/lib/index.d.ts +8 -9
  176. package/lib/index.js +30 -11
  177. package/package.json +26 -26
  178. package/WAProto/fix-imports.js +0 -29
  179. package/lib/Defaults/index.d.ts.map +0 -1
  180. package/lib/Defaults/index.js.map +0 -1
  181. package/lib/Signal/Group/ciphertext-message.d.ts.map +0 -1
  182. package/lib/Signal/Group/ciphertext-message.js.map +0 -1
  183. package/lib/Signal/Group/group-session-builder.d.ts.map +0 -1
  184. package/lib/Signal/Group/group-session-builder.js.map +0 -1
  185. package/lib/Signal/Group/group_cipher.d.ts.map +0 -1
  186. package/lib/Signal/Group/group_cipher.js.map +0 -1
  187. package/lib/Signal/Group/index.d.ts.map +0 -1
  188. package/lib/Signal/Group/index.js.map +0 -1
  189. package/lib/Signal/Group/keyhelper.d.ts.map +0 -1
  190. package/lib/Signal/Group/keyhelper.js.map +0 -1
  191. package/lib/Signal/Group/queue-job.d.ts.map +0 -1
  192. package/lib/Signal/Group/queue-job.js.map +0 -1
  193. package/lib/Signal/Group/sender-chain-key.d.ts.map +0 -1
  194. package/lib/Signal/Group/sender-chain-key.js.map +0 -1
  195. package/lib/Signal/Group/sender-key-distribution-message.d.ts.map +0 -1
  196. package/lib/Signal/Group/sender-key-distribution-message.js.map +0 -1
  197. package/lib/Signal/Group/sender-key-message.d.ts.map +0 -1
  198. package/lib/Signal/Group/sender-key-message.js.map +0 -1
  199. package/lib/Signal/Group/sender-key-name.d.ts.map +0 -1
  200. package/lib/Signal/Group/sender-key-name.js.map +0 -1
  201. package/lib/Signal/Group/sender-key-record.d.ts.map +0 -1
  202. package/lib/Signal/Group/sender-key-record.js.map +0 -1
  203. package/lib/Signal/Group/sender-key-state.d.ts.map +0 -1
  204. package/lib/Signal/Group/sender-key-state.js.map +0 -1
  205. package/lib/Signal/Group/sender-message-key.d.ts.map +0 -1
  206. package/lib/Signal/Group/sender-message-key.js.map +0 -1
  207. package/lib/Signal/libsignal.d.ts.map +0 -1
  208. package/lib/Signal/libsignal.js.map +0 -1
  209. package/lib/Socket/Client/index.d.ts.map +0 -1
  210. package/lib/Socket/Client/index.js.map +0 -1
  211. package/lib/Socket/Client/types.d.ts.map +0 -1
  212. package/lib/Socket/Client/types.js.map +0 -1
  213. package/lib/Socket/Client/websocket.d.ts.map +0 -1
  214. package/lib/Socket/Client/websocket.js.map +0 -1
  215. package/lib/Socket/business.d.ts.map +0 -1
  216. package/lib/Socket/business.js.map +0 -1
  217. package/lib/Socket/chats.d.ts.map +0 -1
  218. package/lib/Socket/chats.js.map +0 -1
  219. package/lib/Socket/communities.d.ts +0 -219
  220. package/lib/Socket/communities.d.ts.map +0 -1
  221. package/lib/Socket/communities.js +0 -351
  222. package/lib/Socket/communities.js.map +0 -1
  223. package/lib/Socket/groups.d.ts.map +0 -1
  224. package/lib/Socket/groups.js.map +0 -1
  225. package/lib/Socket/index.d.ts.map +0 -1
  226. package/lib/Socket/index.js.map +0 -1
  227. package/lib/Socket/messages-recv.d.ts.map +0 -1
  228. package/lib/Socket/messages-recv.js.map +0 -1
  229. package/lib/Socket/messages-send.d.ts.map +0 -1
  230. package/lib/Socket/messages-send.js.map +0 -1
  231. package/lib/Socket/mex.d.ts.map +0 -1
  232. package/lib/Socket/mex.js.map +0 -1
  233. package/lib/Socket/newsletter.d.ts.map +0 -1
  234. package/lib/Socket/newsletter.js.map +0 -1
  235. package/lib/Socket/socket.d.ts.map +0 -1
  236. package/lib/Socket/socket.js.map +0 -1
  237. package/lib/Socket/usync.d.ts.map +0 -1
  238. package/lib/Socket/usync.js.map +0 -1
  239. package/lib/Types/Auth.d.ts.map +0 -1
  240. package/lib/Types/Auth.js.map +0 -1
  241. package/lib/Types/Call.d.ts.map +0 -1
  242. package/lib/Types/Call.js.map +0 -1
  243. package/lib/Types/Chat.d.ts.map +0 -1
  244. package/lib/Types/Chat.js.map +0 -1
  245. package/lib/Types/Contact.d.ts.map +0 -1
  246. package/lib/Types/Contact.js.map +0 -1
  247. package/lib/Types/Events.d.ts.map +0 -1
  248. package/lib/Types/Events.js.map +0 -1
  249. package/lib/Types/GroupMetadata.d.ts.map +0 -1
  250. package/lib/Types/GroupMetadata.js.map +0 -1
  251. package/lib/Types/Label.d.ts.map +0 -1
  252. package/lib/Types/Label.js.map +0 -1
  253. package/lib/Types/LabelAssociation.d.ts.map +0 -1
  254. package/lib/Types/LabelAssociation.js.map +0 -1
  255. package/lib/Types/Message.d.ts.map +0 -1
  256. package/lib/Types/Message.js.map +0 -1
  257. package/lib/Types/Newsletter.d.ts.map +0 -1
  258. package/lib/Types/Newsletter.js.map +0 -1
  259. package/lib/Types/Product.d.ts.map +0 -1
  260. package/lib/Types/Product.js.map +0 -1
  261. package/lib/Types/Signal.d.ts.map +0 -1
  262. package/lib/Types/Signal.js.map +0 -1
  263. package/lib/Types/Socket.d.ts.map +0 -1
  264. package/lib/Types/Socket.js.map +0 -1
  265. package/lib/Types/State.d.ts.map +0 -1
  266. package/lib/Types/State.js.map +0 -1
  267. package/lib/Types/USync.d.ts.map +0 -1
  268. package/lib/Types/USync.js.map +0 -1
  269. package/lib/Types/index.d.ts.map +0 -1
  270. package/lib/Types/index.js.map +0 -1
  271. package/lib/Utils/auth-utils.d.ts.map +0 -1
  272. package/lib/Utils/auth-utils.js.map +0 -1
  273. package/lib/Utils/baileys-event-stream.d.ts.map +0 -1
  274. package/lib/Utils/baileys-event-stream.js.map +0 -1
  275. package/lib/Utils/business.d.ts.map +0 -1
  276. package/lib/Utils/business.js.map +0 -1
  277. package/lib/Utils/chat-utils.d.ts.map +0 -1
  278. package/lib/Utils/chat-utils.js.map +0 -1
  279. package/lib/Utils/crypto.d.ts.map +0 -1
  280. package/lib/Utils/crypto.js.map +0 -1
  281. package/lib/Utils/decode-wa-message.d.ts.map +0 -1
  282. package/lib/Utils/decode-wa-message.js.map +0 -1
  283. package/lib/Utils/event-buffer.d.ts.map +0 -1
  284. package/lib/Utils/event-buffer.js.map +0 -1
  285. package/lib/Utils/generics.d.ts.map +0 -1
  286. package/lib/Utils/generics.js.map +0 -1
  287. package/lib/Utils/history.d.ts.map +0 -1
  288. package/lib/Utils/history.js.map +0 -1
  289. package/lib/Utils/index.d.ts.map +0 -1
  290. package/lib/Utils/index.js.map +0 -1
  291. package/lib/Utils/link-preview.d.ts.map +0 -1
  292. package/lib/Utils/link-preview.js.map +0 -1
  293. package/lib/Utils/logger.d.ts.map +0 -1
  294. package/lib/Utils/logger.js.map +0 -1
  295. package/lib/Utils/lt-hash.d.ts.map +0 -1
  296. package/lib/Utils/lt-hash.js.map +0 -1
  297. package/lib/Utils/make-mutex.d.ts.map +0 -1
  298. package/lib/Utils/make-mutex.js.map +0 -1
  299. package/lib/Utils/messages-media.d.ts.map +0 -1
  300. package/lib/Utils/messages-media.js.map +0 -1
  301. package/lib/Utils/messages.d.ts.map +0 -1
  302. package/lib/Utils/messages.js.map +0 -1
  303. package/lib/Utils/noise-handler.d.ts.map +0 -1
  304. package/lib/Utils/noise-handler.js.map +0 -1
  305. package/lib/Utils/process-message.d.ts.map +0 -1
  306. package/lib/Utils/process-message.js.map +0 -1
  307. package/lib/Utils/signal.d.ts.map +0 -1
  308. package/lib/Utils/signal.js.map +0 -1
  309. package/lib/Utils/use-multi-file-auth-state.d.ts.map +0 -1
  310. package/lib/Utils/use-multi-file-auth-state.js.map +0 -1
  311. package/lib/Utils/validate-connection.d.ts.map +0 -1
  312. package/lib/Utils/validate-connection.js.map +0 -1
  313. package/lib/WABinary/constants.d.ts.map +0 -1
  314. package/lib/WABinary/constants.js.map +0 -1
  315. package/lib/WABinary/decode.d.ts.map +0 -1
  316. package/lib/WABinary/decode.js.map +0 -1
  317. package/lib/WABinary/encode.d.ts.map +0 -1
  318. package/lib/WABinary/encode.js.map +0 -1
  319. package/lib/WABinary/generic-utils.d.ts.map +0 -1
  320. package/lib/WABinary/generic-utils.js.map +0 -1
  321. package/lib/WABinary/index.d.ts.map +0 -1
  322. package/lib/WABinary/index.js.map +0 -1
  323. package/lib/WABinary/jid-utils.d.ts.map +0 -1
  324. package/lib/WABinary/jid-utils.js.map +0 -1
  325. package/lib/WABinary/types.d.ts.map +0 -1
  326. package/lib/WABinary/types.js.map +0 -1
  327. package/lib/WAM/BinaryInfo.d.ts.map +0 -1
  328. package/lib/WAM/BinaryInfo.js.map +0 -1
  329. package/lib/WAM/constants.d.ts.map +0 -1
  330. package/lib/WAM/constants.js.map +0 -1
  331. package/lib/WAM/encode.d.ts.map +0 -1
  332. package/lib/WAM/encode.js.map +0 -1
  333. package/lib/WAM/index.d.ts.map +0 -1
  334. package/lib/WAM/index.js.map +0 -1
  335. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts.map +0 -1
  336. package/lib/WAUSync/Protocols/USyncContactProtocol.js.map +0 -1
  337. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts.map +0 -1
  338. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js.map +0 -1
  339. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts.map +0 -1
  340. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js.map +0 -1
  341. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts.map +0 -1
  342. package/lib/WAUSync/Protocols/USyncStatusProtocol.js.map +0 -1
  343. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts.map +0 -1
  344. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js.map +0 -1
  345. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts.map +0 -1
  346. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js.map +0 -1
  347. package/lib/WAUSync/Protocols/index.d.ts.map +0 -1
  348. package/lib/WAUSync/Protocols/index.js.map +0 -1
  349. package/lib/WAUSync/USyncQuery.d.ts.map +0 -1
  350. package/lib/WAUSync/USyncQuery.js.map +0 -1
  351. package/lib/WAUSync/USyncUser.d.ts.map +0 -1
  352. package/lib/WAUSync/USyncUser.js.map +0 -1
  353. package/lib/WAUSync/index.d.ts.map +0 -1
  354. package/lib/WAUSync/index.js.map +0 -1
  355. package/lib/index.d.ts.map +0 -1
  356. package/lib/index.js.map +0 -1
@@ -1,10 +1,9 @@
1
- import type { USyncQueryProtocol } from '../../Types/USync.js';
2
- import { type BinaryNode } from '../../WABinary/index.js';
3
- import { USyncUser } from '../USyncUser.js';
1
+ import { USyncQueryProtocol } from '../../Types/USync';
2
+ import { BinaryNode } from '../../WABinary';
3
+ import { USyncUser } from '../USyncUser';
4
4
  export declare class USyncContactProtocol implements USyncQueryProtocol {
5
5
  name: string;
6
6
  getQueryElement(): BinaryNode;
7
7
  getUserElement(user: USyncUser): BinaryNode;
8
8
  parser(node: BinaryNode): boolean;
9
9
  }
10
- //# sourceMappingURL=USyncContactProtocol.d.ts.map
@@ -1,6 +1,8 @@
1
- import { assertNodeErrorFree } from '../../WABinary/index.js';
2
- import { USyncUser } from '../USyncUser.js';
3
- export class USyncContactProtocol {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.USyncContactProtocol = void 0;
4
+ const WABinary_1 = require("../../WABinary");
5
+ class USyncContactProtocol {
4
6
  constructor() {
5
7
  this.name = 'contact';
6
8
  }
@@ -19,11 +21,12 @@ export class USyncContactProtocol {
19
21
  };
20
22
  }
21
23
  parser(node) {
24
+ var _a;
22
25
  if (node.tag === 'contact') {
23
- assertNodeErrorFree(node);
24
- return node?.attrs?.type === 'in';
26
+ (0, WABinary_1.assertNodeErrorFree)(node);
27
+ return ((_a = node === null || node === void 0 ? void 0 : node.attrs) === null || _a === void 0 ? void 0 : _a.type) === 'in';
25
28
  }
26
29
  return false;
27
30
  }
28
31
  }
29
- //# sourceMappingURL=USyncContactProtocol.js.map
32
+ exports.USyncContactProtocol = USyncContactProtocol;
@@ -1,5 +1,5 @@
1
- import type { USyncQueryProtocol } from '../../Types/USync.js';
2
- import { type BinaryNode } from '../../WABinary/index.js';
1
+ import { USyncQueryProtocol } from '../../Types/USync';
2
+ import { BinaryNode } from '../../WABinary';
3
3
  export type KeyIndexData = {
4
4
  timestamp: number;
5
5
  signedKeyIndex?: Uint8Array;
@@ -20,4 +20,3 @@ export declare class USyncDeviceProtocol implements USyncQueryProtocol {
20
20
  getUserElement(): BinaryNode | null;
21
21
  parser(node: BinaryNode): ParsedDeviceInfo;
22
22
  }
23
- //# sourceMappingURL=USyncDeviceProtocol.d.ts.map
@@ -1,5 +1,8 @@
1
- import { assertNodeErrorFree, getBinaryNodeChild } from '../../WABinary/index.js';
2
- export class USyncDeviceProtocol {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.USyncDeviceProtocol = void 0;
4
+ const WABinary_1 = require("../../WABinary");
5
+ class USyncDeviceProtocol {
3
6
  constructor() {
4
7
  this.name = 'devices';
5
8
  }
@@ -21,10 +24,10 @@ export class USyncDeviceProtocol {
21
24
  const deviceList = [];
22
25
  let keyIndex = undefined;
23
26
  if (node.tag === 'devices') {
24
- assertNodeErrorFree(node);
25
- const deviceListNode = getBinaryNodeChild(node, 'device-list');
26
- const keyIndexNode = getBinaryNodeChild(node, 'key-index-list');
27
- if (Array.isArray(deviceListNode?.content)) {
27
+ (0, WABinary_1.assertNodeErrorFree)(node);
28
+ const deviceListNode = (0, WABinary_1.getBinaryNodeChild)(node, 'device-list');
29
+ const keyIndexNode = (0, WABinary_1.getBinaryNodeChild)(node, 'key-index-list');
30
+ if (Array.isArray(deviceListNode === null || deviceListNode === void 0 ? void 0 : deviceListNode.content)) {
28
31
  for (const { tag, attrs } of deviceListNode.content) {
29
32
  const id = +attrs.id;
30
33
  const keyIndex = +attrs['key-index'];
@@ -37,10 +40,10 @@ export class USyncDeviceProtocol {
37
40
  }
38
41
  }
39
42
  }
40
- if (keyIndexNode?.tag === 'key-index-list') {
43
+ if ((keyIndexNode === null || keyIndexNode === void 0 ? void 0 : keyIndexNode.tag) === 'key-index-list') {
41
44
  keyIndex = {
42
45
  timestamp: +keyIndexNode.attrs['ts'],
43
- signedKeyIndex: keyIndexNode?.content,
46
+ signedKeyIndex: keyIndexNode === null || keyIndexNode === void 0 ? void 0 : keyIndexNode.content,
44
47
  expectedTimestamp: keyIndexNode.attrs['expected_ts'] ? +keyIndexNode.attrs['expected_ts'] : undefined
45
48
  };
46
49
  }
@@ -51,4 +54,4 @@ export class USyncDeviceProtocol {
51
54
  };
52
55
  }
53
56
  }
54
- //# sourceMappingURL=USyncDeviceProtocol.js.map
57
+ exports.USyncDeviceProtocol = USyncDeviceProtocol;
@@ -1,5 +1,5 @@
1
- import type { USyncQueryProtocol } from '../../Types/USync.js';
2
- import { type BinaryNode } from '../../WABinary/index.js';
1
+ import { USyncQueryProtocol } from '../../Types/USync';
2
+ import { BinaryNode } from '../../WABinary';
3
3
  export type DisappearingModeData = {
4
4
  duration: number;
5
5
  setAt?: Date;
@@ -10,4 +10,3 @@ export declare class USyncDisappearingModeProtocol implements USyncQueryProtocol
10
10
  getUserElement(): null;
11
11
  parser(node: BinaryNode): DisappearingModeData | undefined;
12
12
  }
13
- //# sourceMappingURL=USyncDisappearingModeProtocol.d.ts.map
@@ -1,5 +1,8 @@
1
- import { assertNodeErrorFree } from '../../WABinary/index.js';
2
- export class USyncDisappearingModeProtocol {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.USyncDisappearingModeProtocol = void 0;
4
+ const WABinary_1 = require("../../WABinary");
5
+ class USyncDisappearingModeProtocol {
3
6
  constructor() {
4
7
  this.name = 'disappearing_mode';
5
8
  }
@@ -14,9 +17,9 @@ export class USyncDisappearingModeProtocol {
14
17
  }
15
18
  parser(node) {
16
19
  if (node.tag === 'disappearing_mode') {
17
- assertNodeErrorFree(node);
18
- const duration = +node?.attrs.duration;
19
- const setAt = new Date(+(node?.attrs.t || 0) * 1000);
20
+ (0, WABinary_1.assertNodeErrorFree)(node);
21
+ const duration = +(node === null || node === void 0 ? void 0 : node.attrs.duration);
22
+ const setAt = new Date(+((node === null || node === void 0 ? void 0 : node.attrs.t) || 0) * 1000);
20
23
  return {
21
24
  duration,
22
25
  setAt
@@ -24,4 +27,4 @@ export class USyncDisappearingModeProtocol {
24
27
  }
25
28
  }
26
29
  }
27
- //# sourceMappingURL=USyncDisappearingModeProtocol.js.map
30
+ exports.USyncDisappearingModeProtocol = USyncDisappearingModeProtocol;
@@ -1,5 +1,5 @@
1
- import type { USyncQueryProtocol } from '../../Types/USync.js';
2
- import { type BinaryNode } from '../../WABinary/index.js';
1
+ import { USyncQueryProtocol } from '../../Types/USync';
2
+ import { BinaryNode } from '../../WABinary';
3
3
  export type StatusData = {
4
4
  status?: string | null;
5
5
  setAt?: Date;
@@ -10,4 +10,3 @@ export declare class USyncStatusProtocol implements USyncQueryProtocol {
10
10
  getUserElement(): null;
11
11
  parser(node: BinaryNode): StatusData | undefined;
12
12
  }
13
- //# sourceMappingURL=USyncStatusProtocol.d.ts.map
@@ -1,5 +1,8 @@
1
- import { assertNodeErrorFree } from '../../WABinary/index.js';
2
- export class USyncStatusProtocol {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.USyncStatusProtocol = void 0;
4
+ const WABinary_1 = require("../../WABinary");
5
+ class USyncStatusProtocol {
3
6
  constructor() {
4
7
  this.name = 'status';
5
8
  }
@@ -13,12 +16,13 @@ export class USyncStatusProtocol {
13
16
  return null;
14
17
  }
15
18
  parser(node) {
19
+ var _a, _b, _c;
16
20
  if (node.tag === 'status') {
17
- assertNodeErrorFree(node);
18
- let status = node?.content?.toString() ?? null;
19
- const setAt = new Date(+(node?.attrs.t || 0) * 1000);
21
+ (0, WABinary_1.assertNodeErrorFree)(node);
22
+ let status = (_b = (_a = node === null || node === void 0 ? void 0 : node.content) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : null;
23
+ const setAt = new Date(+((node === null || node === void 0 ? void 0 : node.attrs.t) || 0) * 1000);
20
24
  if (!status) {
21
- if (node.attrs?.code && +node.attrs.code === 401) {
25
+ if (+((_c = node.attrs) === null || _c === void 0 ? void 0 : _c.code) === 401) {
22
26
  status = '';
23
27
  }
24
28
  else {
@@ -35,4 +39,4 @@ export class USyncStatusProtocol {
35
39
  }
36
40
  }
37
41
  }
38
- //# sourceMappingURL=USyncStatusProtocol.js.map
42
+ exports.USyncStatusProtocol = USyncStatusProtocol;
@@ -1,6 +1,6 @@
1
- import type { USyncQueryProtocol } from '../../Types/USync.js';
2
- import { type BinaryNode } from '../../WABinary/index.js';
3
- import { USyncUser } from '../USyncUser.js';
1
+ import { USyncQueryProtocol } from '../../Types/USync';
2
+ import { BinaryNode } from '../../WABinary';
3
+ import { USyncUser } from '../USyncUser';
4
4
  export type BotProfileCommand = {
5
5
  name: string;
6
6
  description: string;
@@ -23,4 +23,3 @@ export declare class USyncBotProfileProtocol implements USyncQueryProtocol {
23
23
  getUserElement(user: USyncUser): BinaryNode;
24
24
  parser(node: BinaryNode): BotProfileInfo;
25
25
  }
26
- //# sourceMappingURL=UsyncBotProfileProtocol.d.ts.map
@@ -1,6 +1,8 @@
1
- import { getBinaryNodeChild, getBinaryNodeChildren, getBinaryNodeChildString } from '../../WABinary/index.js';
2
- import { USyncUser } from '../USyncUser.js';
3
- export class USyncBotProfileProtocol {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.USyncBotProfileProtocol = void 0;
4
+ const WABinary_1 = require("../../WABinary");
5
+ class USyncBotProfileProtocol {
4
6
  constructor() {
5
7
  this.name = 'bot';
6
8
  }
@@ -19,33 +21,33 @@ export class USyncBotProfileProtocol {
19
21
  };
20
22
  }
21
23
  parser(node) {
22
- const botNode = getBinaryNodeChild(node, 'bot');
23
- const profile = getBinaryNodeChild(botNode, 'profile');
24
- const commandsNode = getBinaryNodeChild(profile, 'commands');
25
- const promptsNode = getBinaryNodeChild(profile, 'prompts');
24
+ const botNode = (0, WABinary_1.getBinaryNodeChild)(node, 'bot');
25
+ const profile = (0, WABinary_1.getBinaryNodeChild)(botNode, 'profile');
26
+ const commandsNode = (0, WABinary_1.getBinaryNodeChild)(profile, 'commands');
27
+ const promptsNode = (0, WABinary_1.getBinaryNodeChild)(profile, 'prompts');
26
28
  const commands = [];
27
29
  const prompts = [];
28
- for (const command of getBinaryNodeChildren(commandsNode, 'command')) {
30
+ for (const command of (0, WABinary_1.getBinaryNodeChildren)(commandsNode, 'command')) {
29
31
  commands.push({
30
- name: getBinaryNodeChildString(command, 'name'),
31
- description: getBinaryNodeChildString(command, 'description')
32
+ name: (0, WABinary_1.getBinaryNodeChildString)(command, 'name'),
33
+ description: (0, WABinary_1.getBinaryNodeChildString)(command, 'description')
32
34
  });
33
35
  }
34
- for (const prompt of getBinaryNodeChildren(promptsNode, 'prompt')) {
35
- prompts.push(`${getBinaryNodeChildString(prompt, 'emoji')} ${getBinaryNodeChildString(prompt, 'text')}`);
36
+ for (const prompt of (0, WABinary_1.getBinaryNodeChildren)(promptsNode, 'prompt')) {
37
+ prompts.push(`${(0, WABinary_1.getBinaryNodeChildString)(prompt, 'emoji')} ${(0, WABinary_1.getBinaryNodeChildString)(prompt, 'text')}`);
36
38
  }
37
39
  return {
38
- isDefault: !!getBinaryNodeChild(profile, 'default'),
40
+ isDefault: !!(0, WABinary_1.getBinaryNodeChild)(profile, 'default'),
39
41
  jid: node.attrs.jid,
40
- name: getBinaryNodeChildString(profile, 'name'),
41
- attributes: getBinaryNodeChildString(profile, 'attributes'),
42
- description: getBinaryNodeChildString(profile, 'description'),
43
- category: getBinaryNodeChildString(profile, 'category'),
42
+ name: (0, WABinary_1.getBinaryNodeChildString)(profile, 'name'),
43
+ attributes: (0, WABinary_1.getBinaryNodeChildString)(profile, 'attributes'),
44
+ description: (0, WABinary_1.getBinaryNodeChildString)(profile, 'description'),
45
+ category: (0, WABinary_1.getBinaryNodeChildString)(profile, 'category'),
44
46
  personaId: profile.attrs['persona_id'],
45
- commandsDescription: getBinaryNodeChildString(commandsNode, 'description'),
47
+ commandsDescription: (0, WABinary_1.getBinaryNodeChildString)(commandsNode, 'description'),
46
48
  commands,
47
49
  prompts
48
50
  };
49
51
  }
50
52
  }
51
- //# sourceMappingURL=UsyncBotProfileProtocol.js.map
53
+ exports.USyncBotProfileProtocol = USyncBotProfileProtocol;
@@ -1,9 +1,8 @@
1
- import type { USyncQueryProtocol } from '../../Types/USync.js';
2
- import type { BinaryNode } from '../../WABinary/index.js';
1
+ import { USyncQueryProtocol } from '../../Types/USync';
2
+ import { BinaryNode } from '../../WABinary';
3
3
  export declare class USyncLIDProtocol implements USyncQueryProtocol {
4
4
  name: string;
5
5
  getQueryElement(): BinaryNode;
6
6
  getUserElement(): null;
7
7
  parser(node: BinaryNode): string | null;
8
8
  }
9
- //# sourceMappingURL=UsyncLIDProtocol.d.ts.map
@@ -1,4 +1,7 @@
1
- export class USyncLIDProtocol {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.USyncLIDProtocol = void 0;
4
+ class USyncLIDProtocol {
2
5
  constructor() {
3
6
  this.name = 'lid';
4
7
  }
@@ -18,4 +21,4 @@ export class USyncLIDProtocol {
18
21
  return null;
19
22
  }
20
23
  }
21
- //# sourceMappingURL=UsyncLIDProtocol.js.map
24
+ exports.USyncLIDProtocol = USyncLIDProtocol;
@@ -1,5 +1,4 @@
1
- export * from './USyncDeviceProtocol.js';
2
- export * from './USyncContactProtocol.js';
3
- export * from './USyncStatusProtocol.js';
4
- export * from './USyncDisappearingModeProtocol.js';
5
- //# sourceMappingURL=index.d.ts.map
1
+ export * from './USyncDeviceProtocol';
2
+ export * from './USyncContactProtocol';
3
+ export * from './USyncStatusProtocol';
4
+ export * from './USyncDisappearingModeProtocol';
@@ -1,5 +1,20 @@
1
- export * from './USyncDeviceProtocol.js';
2
- export * from './USyncContactProtocol.js';
3
- export * from './USyncStatusProtocol.js';
4
- export * from './USyncDisappearingModeProtocol.js';
5
- //# sourceMappingURL=index.js.map
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./USyncDeviceProtocol"), exports);
18
+ __exportStar(require("./USyncContactProtocol"), exports);
19
+ __exportStar(require("./USyncStatusProtocol"), exports);
20
+ __exportStar(require("./USyncDisappearingModeProtocol"), exports);
@@ -1,6 +1,6 @@
1
- import type { USyncQueryProtocol } from '../Types/USync.js';
2
- import { type BinaryNode } from '../WABinary/index.js';
3
- import { USyncUser } from './USyncUser.js';
1
+ import { USyncQueryProtocol } from '../Types/USync';
2
+ import { BinaryNode } from '../WABinary';
3
+ import { USyncUser } from './USyncUser';
4
4
  export type USyncQueryResultList = {
5
5
  [protocol: string]: unknown;
6
6
  id: string;
@@ -26,4 +26,3 @@ export declare class USyncQuery {
26
26
  withBotProfileProtocol(): this;
27
27
  withLIDProtocol(): this;
28
28
  }
29
- //# sourceMappingURL=USyncQuery.d.ts.map
@@ -1,9 +1,11 @@
1
- import { getBinaryNodeChild } from '../WABinary/index.js';
2
- import { USyncBotProfileProtocol } from './Protocols/UsyncBotProfileProtocol.js';
3
- import { USyncLIDProtocol } from './Protocols/UsyncLIDProtocol.js';
4
- import { USyncContactProtocol, USyncDeviceProtocol, USyncDisappearingModeProtocol, USyncStatusProtocol } from './Protocols/index.js';
5
- import { USyncUser } from './USyncUser.js';
6
- export class USyncQuery {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.USyncQuery = void 0;
4
+ const WABinary_1 = require("../WABinary");
5
+ const UsyncBotProfileProtocol_1 = require("./Protocols/UsyncBotProfileProtocol");
6
+ const UsyncLIDProtocol_1 = require("./Protocols/UsyncLIDProtocol");
7
+ const Protocols_1 = require("./Protocols");
8
+ class USyncQuery {
7
9
  constructor() {
8
10
  this.protocols = [];
9
11
  this.users = [];
@@ -34,15 +36,15 @@ export class USyncQuery {
34
36
  list: [],
35
37
  sideList: []
36
38
  };
37
- const usyncNode = getBinaryNodeChild(result, 'usync');
39
+ const usyncNode = (0, WABinary_1.getBinaryNodeChild)(result, 'usync');
38
40
  //TODO: implement error backoff, refresh etc.
39
41
  //TODO: see if there are any errors in the result node
40
42
  //const resultNode = getBinaryNodeChild(usyncNode, 'result')
41
- const listNode = getBinaryNodeChild(usyncNode, 'list');
42
- if (Array.isArray(listNode?.content) && typeof listNode !== 'undefined') {
43
+ const listNode = (0, WABinary_1.getBinaryNodeChild)(usyncNode, 'list');
44
+ if (Array.isArray(listNode === null || listNode === void 0 ? void 0 : listNode.content) && typeof listNode !== 'undefined') {
43
45
  queryResult.list = listNode.content.map(node => {
44
- const id = node?.attrs.jid;
45
- const data = Array.isArray(node?.content)
46
+ const id = node === null || node === void 0 ? void 0 : node.attrs.jid;
47
+ const data = Array.isArray(node === null || node === void 0 ? void 0 : node.content)
46
48
  ? Object.fromEntries(node.content
47
49
  .map(content => {
48
50
  const protocol = content.tag;
@@ -64,28 +66,28 @@ export class USyncQuery {
64
66
  return queryResult;
65
67
  }
66
68
  withDeviceProtocol() {
67
- this.protocols.push(new USyncDeviceProtocol());
69
+ this.protocols.push(new Protocols_1.USyncDeviceProtocol());
68
70
  return this;
69
71
  }
70
72
  withContactProtocol() {
71
- this.protocols.push(new USyncContactProtocol());
73
+ this.protocols.push(new Protocols_1.USyncContactProtocol());
72
74
  return this;
73
75
  }
74
76
  withStatusProtocol() {
75
- this.protocols.push(new USyncStatusProtocol());
77
+ this.protocols.push(new Protocols_1.USyncStatusProtocol());
76
78
  return this;
77
79
  }
78
80
  withDisappearingModeProtocol() {
79
- this.protocols.push(new USyncDisappearingModeProtocol());
81
+ this.protocols.push(new Protocols_1.USyncDisappearingModeProtocol());
80
82
  return this;
81
83
  }
82
84
  withBotProfileProtocol() {
83
- this.protocols.push(new USyncBotProfileProtocol());
85
+ this.protocols.push(new UsyncBotProfileProtocol_1.USyncBotProfileProtocol());
84
86
  return this;
85
87
  }
86
88
  withLIDProtocol() {
87
- this.protocols.push(new USyncLIDProtocol());
89
+ this.protocols.push(new UsyncLIDProtocol_1.USyncLIDProtocol());
88
90
  return this;
89
91
  }
90
92
  }
91
- //# sourceMappingURL=USyncQuery.js.map
93
+ exports.USyncQuery = USyncQuery;
@@ -1,13 +1,12 @@
1
1
  export declare class USyncUser {
2
- id?: string;
3
- lid?: string;
4
- phone?: string;
5
- type?: string;
6
- personaId?: string;
2
+ id: string;
3
+ lid: string;
4
+ phone: string;
5
+ type: string;
6
+ personaId: string;
7
7
  withId(id: string): this;
8
8
  withLid(lid: string): this;
9
9
  withPhone(phone: string): this;
10
10
  withType(type: string): this;
11
11
  withPersonaId(personaId: string): this;
12
12
  }
13
- //# sourceMappingURL=USyncUser.d.ts.map
@@ -1,4 +1,7 @@
1
- export class USyncUser {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.USyncUser = void 0;
4
+ class USyncUser {
2
5
  withId(id) {
3
6
  this.id = id;
4
7
  return this;
@@ -20,4 +23,4 @@ export class USyncUser {
20
23
  return this;
21
24
  }
22
25
  }
23
- //# sourceMappingURL=USyncUser.js.map
26
+ exports.USyncUser = USyncUser;
@@ -1,4 +1,3 @@
1
- export * from './Protocols/index.js';
2
- export * from './USyncQuery.js';
3
- export * from './USyncUser.js';
4
- //# sourceMappingURL=index.d.ts.map
1
+ export * from './Protocols';
2
+ export * from './USyncQuery';
3
+ export * from './USyncUser';
@@ -1,4 +1,19 @@
1
- export * from './Protocols/index.js';
2
- export * from './USyncQuery.js';
3
- export * from './USyncUser.js';
4
- //# sourceMappingURL=index.js.map
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Protocols"), exports);
18
+ __exportStar(require("./USyncQuery"), exports);
19
+ __exportStar(require("./USyncUser"), exports);
package/lib/index.d.ts CHANGED
@@ -1,12 +1,11 @@
1
- import makeWASocket from './Socket/index.js';
2
- export * from '../WAProto/index.js';
3
- export * from './Utils/index.js';
4
- export * from './Types/index.js';
5
- export * from './Defaults/index.js';
6
- export * from './WABinary/index.js';
7
- export * from './WAM/index.js';
8
- export * from './WAUSync/index.js';
1
+ import makeWASocket from './Socket';
2
+ export * from '../WAProto';
3
+ export * from './Utils';
4
+ export * from './Types';
5
+ export * from './Defaults';
6
+ export * from './WABinary';
7
+ export * from './WAM';
8
+ export * from './WAUSync';
9
9
  export type WASocket = ReturnType<typeof makeWASocket>;
10
10
  export { makeWASocket };
11
11
  export default makeWASocket;
12
- //# sourceMappingURL=index.d.ts.map
package/lib/index.js CHANGED
@@ -1,11 +1,30 @@
1
- import makeWASocket from './Socket/index.js';
2
- export * from '../WAProto/index.js';
3
- export * from './Utils/index.js';
4
- export * from './Types/index.js';
5
- export * from './Defaults/index.js';
6
- export * from './WABinary/index.js';
7
- export * from './WAM/index.js';
8
- export * from './WAUSync/index.js';
9
- export { makeWASocket };
10
- export default makeWASocket;
11
- //# sourceMappingURL=index.js.map
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ var __importDefault = (this && this.__importDefault) || function (mod) {
17
+ return (mod && mod.__esModule) ? mod : { "default": mod };
18
+ };
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.makeWASocket = void 0;
21
+ const Socket_1 = __importDefault(require("./Socket"));
22
+ exports.makeWASocket = Socket_1.default;
23
+ __exportStar(require("../WAProto"), exports);
24
+ __exportStar(require("./Utils"), exports);
25
+ __exportStar(require("./Types"), exports);
26
+ __exportStar(require("./Defaults"), exports);
27
+ __exportStar(require("./WABinary"), exports);
28
+ __exportStar(require("./WAM"), exports);
29
+ __exportStar(require("./WAUSync"), exports);
30
+ exports.default = Socket_1.default;