@oxidezap/baileyrs 0.0.26 → 0.0.27

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 (530) hide show
  1. package/lib/Bridge/adapt.d.ts +2 -0
  2. package/lib/Bridge/adapt.d.ts.map +1 -1
  3. package/lib/Bridge/adapt.js +2 -1
  4. package/lib/Bridge/adapt.js.map +1 -1
  5. package/lib/Bridge/history-sync-wire.d.ts +17 -0
  6. package/lib/Bridge/history-sync-wire.d.ts.map +1 -0
  7. package/lib/Bridge/history-sync-wire.js +45 -0
  8. package/lib/Bridge/history-sync-wire.js.map +1 -0
  9. package/lib/Bridge/index.d.ts +1 -1
  10. package/lib/Bridge/index.d.ts.map +1 -1
  11. package/lib/Bridge/index.js +3 -3
  12. package/lib/Bridge/index.js.map +1 -1
  13. package/lib/Bridge/primitives.d.ts +4 -0
  14. package/lib/Bridge/primitives.d.ts.map +1 -1
  15. package/lib/Bridge/primitives.js +14 -0
  16. package/lib/Bridge/primitives.js.map +1 -1
  17. package/lib/Bridge/schema.d.ts +9 -2
  18. package/lib/Bridge/schema.d.ts.map +1 -1
  19. package/lib/Bridge/schema.js +263 -35
  20. package/lib/Bridge/schema.js.map +1 -1
  21. package/lib/Bridge/types.d.ts +117 -3
  22. package/lib/Bridge/types.d.ts.map +1 -1
  23. package/lib/Compatibility/group-metadata.d.ts +9 -0
  24. package/lib/Compatibility/group-metadata.d.ts.map +1 -0
  25. package/lib/Compatibility/group-metadata.js +70 -0
  26. package/lib/Compatibility/group-metadata.js.map +1 -0
  27. package/lib/Compatibility/group-notifications.d.ts +22 -0
  28. package/lib/Compatibility/group-notifications.d.ts.map +1 -0
  29. package/lib/Compatibility/group-notifications.js +307 -0
  30. package/lib/Compatibility/group-notifications.js.map +1 -0
  31. package/lib/Compatibility/group-stub-params.d.ts +32 -0
  32. package/lib/Compatibility/group-stub-params.d.ts.map +1 -0
  33. package/lib/Compatibility/group-stub-params.js +57 -0
  34. package/lib/Compatibility/group-stub-params.js.map +1 -0
  35. package/lib/Compatibility/internal/async-primitives.d.ts +16 -0
  36. package/lib/Compatibility/internal/async-primitives.d.ts.map +1 -0
  37. package/lib/Compatibility/internal/async-primitives.js +42 -0
  38. package/lib/Compatibility/internal/async-primitives.js.map +1 -0
  39. package/lib/Compatibility/internal/auth-state.d.ts +15 -0
  40. package/lib/Compatibility/internal/auth-state.d.ts.map +1 -0
  41. package/lib/Compatibility/internal/auth-state.js +21 -0
  42. package/lib/Compatibility/internal/auth-state.js.map +1 -0
  43. package/lib/Compatibility/internal/cache-store.d.ts +7 -0
  44. package/lib/Compatibility/internal/cache-store.d.ts.map +1 -0
  45. package/lib/Compatibility/internal/cache-store.js +19 -0
  46. package/lib/Compatibility/internal/cache-store.js.map +1 -0
  47. package/lib/Compatibility/internal/expiring-lru-map.d.ts +21 -0
  48. package/lib/Compatibility/internal/expiring-lru-map.d.ts.map +1 -0
  49. package/lib/Compatibility/internal/expiring-lru-map.js +68 -0
  50. package/lib/Compatibility/internal/expiring-lru-map.js.map +1 -0
  51. package/lib/Compatibility/internal/make-mutex.d.ts +7 -0
  52. package/lib/Compatibility/internal/make-mutex.d.ts.map +1 -0
  53. package/lib/Compatibility/internal/make-mutex.js +31 -0
  54. package/lib/Compatibility/internal/make-mutex.js.map +1 -0
  55. package/lib/Compatibility/internal/native-memory-store.d.ts +6 -0
  56. package/lib/Compatibility/internal/native-memory-store.d.ts.map +1 -0
  57. package/lib/Compatibility/internal/native-memory-store.js +8 -0
  58. package/lib/Compatibility/internal/native-memory-store.js.map +1 -0
  59. package/lib/Compatibility/internal/numeric-enum.d.ts +8 -0
  60. package/lib/Compatibility/internal/numeric-enum.d.ts.map +1 -0
  61. package/lib/Compatibility/internal/numeric-enum.js +11 -0
  62. package/lib/Compatibility/internal/numeric-enum.js.map +1 -0
  63. package/lib/Compatibility/internal/signal-key-store.d.ts +9 -0
  64. package/lib/Compatibility/internal/signal-key-store.d.ts.map +1 -0
  65. package/lib/Compatibility/internal/signal-key-store.js +17 -0
  66. package/lib/Compatibility/internal/signal-key-store.js.map +1 -0
  67. package/lib/Compatibility/legacy-store/adapter.d.ts +4 -0
  68. package/lib/Compatibility/legacy-store/adapter.d.ts.map +1 -0
  69. package/lib/Compatibility/legacy-store/adapter.js +301 -0
  70. package/lib/Compatibility/legacy-store/adapter.js.map +1 -0
  71. package/lib/Compatibility/legacy-store/codecs/basic.d.ts +6 -0
  72. package/lib/Compatibility/legacy-store/codecs/basic.d.ts.map +1 -0
  73. package/lib/Compatibility/legacy-store/codecs/basic.js +184 -0
  74. package/lib/Compatibility/legacy-store/codecs/basic.js.map +1 -0
  75. package/lib/Compatibility/legacy-store/codecs/index.d.ts +6 -0
  76. package/lib/Compatibility/legacy-store/codecs/index.d.ts.map +1 -0
  77. package/lib/Compatibility/legacy-store/codecs/index.js +7 -0
  78. package/lib/Compatibility/legacy-store/codecs/index.js.map +1 -0
  79. package/lib/Compatibility/legacy-store/codecs/signal.d.ts +8 -0
  80. package/lib/Compatibility/legacy-store/codecs/signal.d.ts.map +1 -0
  81. package/lib/Compatibility/legacy-store/codecs/signal.js +219 -0
  82. package/lib/Compatibility/legacy-store/codecs/signal.js.map +1 -0
  83. package/lib/Compatibility/legacy-store/common.d.ts +25 -0
  84. package/lib/Compatibility/legacy-store/common.d.ts.map +1 -0
  85. package/lib/Compatibility/legacy-store/common.js +112 -0
  86. package/lib/Compatibility/legacy-store/common.js.map +1 -0
  87. package/lib/Compatibility/legacy-store/constants.d.ts +226 -0
  88. package/lib/Compatibility/legacy-store/constants.d.ts.map +1 -0
  89. package/lib/Compatibility/legacy-store/constants.js +199 -0
  90. package/lib/Compatibility/legacy-store/constants.js.map +1 -0
  91. package/lib/Compatibility/legacy-store/device.d.ts +9 -0
  92. package/lib/Compatibility/legacy-store/device.d.ts.map +1 -0
  93. package/lib/Compatibility/legacy-store/device.js +192 -0
  94. package/lib/Compatibility/legacy-store/device.js.map +1 -0
  95. package/lib/Compatibility/legacy-store/multi-file.d.ts +6 -0
  96. package/lib/Compatibility/legacy-store/multi-file.d.ts.map +1 -0
  97. package/lib/Compatibility/legacy-store/multi-file.js +84 -0
  98. package/lib/Compatibility/legacy-store/multi-file.js.map +1 -0
  99. package/lib/Compatibility/legacy-store/native-projection.d.ts +8 -0
  100. package/lib/Compatibility/legacy-store/native-projection.d.ts.map +1 -0
  101. package/lib/Compatibility/legacy-store/native-projection.js +109 -0
  102. package/lib/Compatibility/legacy-store/native-projection.js.map +1 -0
  103. package/lib/Compatibility/legacy-store/routing.d.ts +18 -0
  104. package/lib/Compatibility/legacy-store/routing.d.ts.map +1 -0
  105. package/lib/Compatibility/legacy-store/routing.js +162 -0
  106. package/lib/Compatibility/legacy-store/routing.js.map +1 -0
  107. package/lib/Compatibility/legacy-store/types.d.ts +41 -0
  108. package/lib/Compatibility/legacy-store/types.d.ts.map +1 -0
  109. package/lib/Compatibility/legacy-store/types.js +3 -0
  110. package/lib/Compatibility/legacy-store/types.js.map +1 -0
  111. package/lib/Compatibility/legacy-store/validation.d.ts +9 -0
  112. package/lib/Compatibility/legacy-store/validation.d.ts.map +1 -0
  113. package/lib/Compatibility/legacy-store/validation.js +49 -0
  114. package/lib/Compatibility/legacy-store/validation.js.map +1 -0
  115. package/lib/Compatibility/media-type.d.ts +10 -0
  116. package/lib/Compatibility/media-type.d.ts.map +1 -0
  117. package/lib/Compatibility/media-type.js +31 -0
  118. package/lib/Compatibility/media-type.js.map +1 -0
  119. package/lib/Compatibility/message-keys.d.ts +9 -0
  120. package/lib/Compatibility/message-keys.d.ts.map +1 -0
  121. package/lib/Compatibility/message-keys.js +15 -0
  122. package/lib/Compatibility/message-keys.js.map +1 -0
  123. package/lib/Compatibility/message-relay.d.ts +26 -0
  124. package/lib/Compatibility/message-relay.d.ts.map +1 -0
  125. package/lib/Compatibility/message-relay.js +61 -0
  126. package/lib/Compatibility/message-relay.js.map +1 -0
  127. package/lib/Compatibility/message-upsert.d.ts +11 -0
  128. package/lib/Compatibility/message-upsert.d.ts.map +1 -0
  129. package/lib/Compatibility/message-upsert.js +8 -0
  130. package/lib/Compatibility/message-upsert.js.map +1 -0
  131. package/lib/Compatibility/participating-refresh.d.ts +9 -0
  132. package/lib/Compatibility/participating-refresh.d.ts.map +1 -0
  133. package/lib/Compatibility/participating-refresh.js +14 -0
  134. package/lib/Compatibility/participating-refresh.js.map +1 -0
  135. package/lib/Compatibility/proto-runtime.d.ts +9 -0
  136. package/lib/Compatibility/proto-runtime.d.ts.map +1 -0
  137. package/lib/Compatibility/proto-runtime.js +567 -0
  138. package/lib/Compatibility/proto-runtime.js.map +1 -0
  139. package/lib/Compatibility/public-api/auth-utils.d.ts +6 -0
  140. package/lib/Compatibility/public-api/auth-utils.d.ts.map +1 -0
  141. package/lib/Compatibility/public-api/auth-utils.js +202 -0
  142. package/lib/Compatibility/public-api/auth-utils.js.map +1 -0
  143. package/lib/Compatibility/public-api/enum-types.d.ts +163 -0
  144. package/lib/Compatibility/public-api/enum-types.d.ts.map +1 -0
  145. package/lib/Compatibility/public-api/enum-types.js +10 -0
  146. package/lib/Compatibility/public-api/enum-types.js.map +1 -0
  147. package/lib/Compatibility/public-api/identity-change-handler.d.ts +42 -0
  148. package/lib/Compatibility/public-api/identity-change-handler.d.ts.map +1 -0
  149. package/lib/Compatibility/public-api/identity-change-handler.js +38 -0
  150. package/lib/Compatibility/public-api/identity-change-handler.js.map +1 -0
  151. package/lib/Compatibility/public-api/message-retry-manager.d.ts +62 -0
  152. package/lib/Compatibility/public-api/message-retry-manager.d.ts.map +1 -0
  153. package/lib/Compatibility/public-api/message-retry-manager.js +180 -0
  154. package/lib/Compatibility/public-api/message-retry-manager.js.map +1 -0
  155. package/lib/Compatibility/public-api/pre-key-manager.d.ts +14 -0
  156. package/lib/Compatibility/public-api/pre-key-manager.d.ts.map +1 -0
  157. package/lib/Compatibility/public-api/pre-key-manager.js +83 -0
  158. package/lib/Compatibility/public-api/pre-key-manager.js.map +1 -0
  159. package/lib/Compatibility/public-api/stanza-ack.d.ts +4 -0
  160. package/lib/Compatibility/public-api/stanza-ack.d.ts.map +1 -0
  161. package/lib/Compatibility/public-api/stanza-ack.js +20 -0
  162. package/lib/Compatibility/public-api/stanza-ack.js.map +1 -0
  163. package/lib/Compatibility/signal-repository.d.ts +12 -0
  164. package/lib/Compatibility/signal-repository.d.ts.map +1 -0
  165. package/lib/Compatibility/signal-repository.js +131 -0
  166. package/lib/Compatibility/signal-repository.js.map +1 -0
  167. package/lib/Compatibility/socket-results.d.ts +28 -0
  168. package/lib/Compatibility/socket-results.d.ts.map +1 -0
  169. package/lib/Compatibility/socket-results.js +72 -0
  170. package/lib/Compatibility/socket-results.js.map +1 -0
  171. package/lib/Compatibility/stanza-responses.d.ts +13 -0
  172. package/lib/Compatibility/stanza-responses.d.ts.map +1 -0
  173. package/lib/Compatibility/stanza-responses.js +16 -0
  174. package/lib/Compatibility/stanza-responses.js.map +1 -0
  175. package/lib/Compatibility/tagged-message-waiter.d.ts +5 -0
  176. package/lib/Compatibility/tagged-message-waiter.d.ts.map +1 -0
  177. package/lib/Compatibility/tagged-message-waiter.js +42 -0
  178. package/lib/Compatibility/tagged-message-waiter.js.map +1 -0
  179. package/lib/Compatibility/usync/adapter.d.ts +13 -0
  180. package/lib/Compatibility/usync/adapter.d.ts.map +1 -0
  181. package/lib/Compatibility/usync/adapter.js +291 -0
  182. package/lib/Compatibility/usync/adapter.js.map +1 -0
  183. package/lib/Compatibility/websocket-client.d.ts +40 -0
  184. package/lib/Compatibility/websocket-client.d.ts.map +1 -0
  185. package/lib/Compatibility/websocket-client.js +120 -0
  186. package/lib/Compatibility/websocket-client.js.map +1 -0
  187. package/lib/Defaults/index.d.ts +70 -3
  188. package/lib/Defaults/index.d.ts.map +1 -1
  189. package/lib/Defaults/index.js +107 -15
  190. package/lib/Defaults/index.js.map +1 -1
  191. package/lib/Platform/crypto.d.ts +6 -0
  192. package/lib/Platform/crypto.d.ts.map +1 -0
  193. package/lib/Platform/crypto.js +36 -0
  194. package/lib/Platform/crypto.js.map +1 -0
  195. package/lib/Socket/blocking.d.ts +2 -2
  196. package/lib/Socket/blocking.d.ts.map +1 -1
  197. package/lib/Socket/blocking.js +2 -1
  198. package/lib/Socket/blocking.js.map +1 -1
  199. package/lib/Socket/chat-actions.d.ts +2 -9
  200. package/lib/Socket/chat-actions.d.ts.map +1 -1
  201. package/lib/Socket/chat-actions.js +24 -13
  202. package/lib/Socket/chat-actions.js.map +1 -1
  203. package/lib/Socket/communities.d.ts +61 -0
  204. package/lib/Socket/communities.d.ts.map +1 -0
  205. package/lib/Socket/communities.js +72 -0
  206. package/lib/Socket/communities.js.map +1 -0
  207. package/lib/Socket/contacts.d.ts +4 -2
  208. package/lib/Socket/contacts.d.ts.map +1 -1
  209. package/lib/Socket/contacts.js +6 -4
  210. package/lib/Socket/contacts.js.map +1 -1
  211. package/lib/Socket/events.d.ts +13 -5
  212. package/lib/Socket/events.d.ts.map +1 -1
  213. package/lib/Socket/events.js +273 -55
  214. package/lib/Socket/events.js.map +1 -1
  215. package/lib/Socket/group-notifications.d.ts +1 -30
  216. package/lib/Socket/group-notifications.d.ts.map +1 -1
  217. package/lib/Socket/group-notifications.js +3 -268
  218. package/lib/Socket/group-notifications.js.map +1 -1
  219. package/lib/Socket/groups.d.ts +17 -36
  220. package/lib/Socket/groups.d.ts.map +1 -1
  221. package/lib/Socket/groups.js +111 -116
  222. package/lib/Socket/groups.js.map +1 -1
  223. package/lib/Socket/index.d.ts +140 -201
  224. package/lib/Socket/index.d.ts.map +1 -1
  225. package/lib/Socket/index.js +215 -345
  226. package/lib/Socket/index.js.map +1 -1
  227. package/lib/Socket/message-capping.d.ts +4 -0
  228. package/lib/Socket/message-capping.d.ts.map +1 -0
  229. package/lib/Socket/message-capping.js +22 -0
  230. package/lib/Socket/message-capping.js.map +1 -0
  231. package/lib/Socket/messages.d.ts +8 -14
  232. package/lib/Socket/messages.d.ts.map +1 -1
  233. package/lib/Socket/messages.js +74 -40
  234. package/lib/Socket/messages.js.map +1 -1
  235. package/lib/Socket/newsletter.d.ts +5 -0
  236. package/lib/Socket/newsletter.d.ts.map +1 -1
  237. package/lib/Socket/newsletter.js +7 -0
  238. package/lib/Socket/newsletter.js.map +1 -1
  239. package/lib/Socket/prekeys.d.ts +10 -0
  240. package/lib/Socket/prekeys.d.ts.map +1 -0
  241. package/lib/Socket/prekeys.js +21 -0
  242. package/lib/Socket/prekeys.js.map +1 -0
  243. package/lib/Socket/presence.d.ts +3 -3
  244. package/lib/Socket/presence.d.ts.map +1 -1
  245. package/lib/Socket/presence.js +2 -2
  246. package/lib/Socket/presence.js.map +1 -1
  247. package/lib/Socket/profile.d.ts +6 -8
  248. package/lib/Socket/profile.d.ts.map +1 -1
  249. package/lib/Socket/profile.js +18 -17
  250. package/lib/Socket/profile.js.map +1 -1
  251. package/lib/Socket/reachout.js +1 -1
  252. package/lib/Socket/transport.d.ts.map +1 -1
  253. package/lib/Socket/transport.js +13 -1
  254. package/lib/Socket/transport.js.map +1 -1
  255. package/lib/Socket/types.d.ts +4 -2
  256. package/lib/Socket/types.d.ts.map +1 -1
  257. package/lib/Socket/types.js.map +1 -1
  258. package/lib/Socket/usync.d.ts +12 -0
  259. package/lib/Socket/usync.d.ts.map +1 -0
  260. package/lib/Socket/usync.js +27 -0
  261. package/lib/Socket/usync.js.map +1 -0
  262. package/lib/Types/Auth.d.ts +28 -30
  263. package/lib/Types/Auth.d.ts.map +1 -1
  264. package/lib/Types/Auth.js +1 -1
  265. package/lib/Types/Auth.js.map +1 -1
  266. package/lib/Types/BinaryNode.d.ts +0 -4
  267. package/lib/Types/BinaryNode.d.ts.map +1 -1
  268. package/lib/Types/Bussines.d.ts +1 -1
  269. package/lib/Types/Bussines.d.ts.map +1 -1
  270. package/lib/Types/Call.d.ts +3 -1
  271. package/lib/Types/Call.d.ts.map +1 -1
  272. package/lib/Types/Chat.d.ts +2 -2
  273. package/lib/Types/Chat.d.ts.map +1 -1
  274. package/lib/Types/Events.d.ts +16 -5
  275. package/lib/Types/Events.d.ts.map +1 -1
  276. package/lib/Types/Events.js +1 -1
  277. package/lib/Types/Events.js.map +1 -1
  278. package/lib/Types/GroupMetadata.d.ts +4 -0
  279. package/lib/Types/GroupMetadata.d.ts.map +1 -1
  280. package/lib/Types/Label.d.ts +3 -23
  281. package/lib/Types/Label.d.ts.map +1 -1
  282. package/lib/Types/Label.js +24 -23
  283. package/lib/Types/Label.js.map +1 -1
  284. package/lib/Types/LabelAssociation.d.ts +5 -6
  285. package/lib/Types/LabelAssociation.d.ts.map +1 -1
  286. package/lib/Types/LabelAssociation.js +4 -5
  287. package/lib/Types/LabelAssociation.js.map +1 -1
  288. package/lib/Types/Message.d.ts +45 -10
  289. package/lib/Types/Message.d.ts.map +1 -1
  290. package/lib/Types/Message.js +5 -7
  291. package/lib/Types/Message.js.map +1 -1
  292. package/lib/Types/Newsletter.d.ts +5 -28
  293. package/lib/Types/Newsletter.d.ts.map +1 -1
  294. package/lib/Types/Newsletter.js +34 -30
  295. package/lib/Types/Newsletter.js.map +1 -1
  296. package/lib/Types/Product.d.ts +75 -0
  297. package/lib/Types/Product.d.ts.map +1 -0
  298. package/lib/Types/Product.js +2 -0
  299. package/lib/Types/Product.js.map +1 -0
  300. package/lib/Types/Reachout.d.ts +3 -18
  301. package/lib/Types/Reachout.d.ts.map +1 -1
  302. package/lib/Types/Reachout.js +20 -19
  303. package/lib/Types/Reachout.js.map +1 -1
  304. package/lib/Types/Signal.d.ts +91 -0
  305. package/lib/Types/Signal.d.ts.map +1 -0
  306. package/lib/Types/Signal.js +2 -0
  307. package/lib/Types/Signal.js.map +1 -0
  308. package/lib/Types/Socket.d.ts +76 -30
  309. package/lib/Types/Socket.d.ts.map +1 -1
  310. package/lib/Types/State.d.ts +19 -0
  311. package/lib/Types/State.d.ts.map +1 -1
  312. package/lib/Types/State.js +26 -1
  313. package/lib/Types/State.js.map +1 -1
  314. package/lib/Types/USync.d.ts +9 -0
  315. package/lib/Types/USync.d.ts.map +1 -0
  316. package/lib/Types/USync.js +2 -0
  317. package/lib/Types/USync.js.map +1 -0
  318. package/lib/Types/index.d.ts +9 -12
  319. package/lib/Types/index.d.ts.map +1 -1
  320. package/lib/Types/index.js +30 -30
  321. package/lib/Types/index.js.map +1 -1
  322. package/lib/Utils/auth-utils.d.ts +2 -0
  323. package/lib/Utils/auth-utils.d.ts.map +1 -0
  324. package/lib/Utils/auth-utils.js +3 -0
  325. package/lib/Utils/auth-utils.js.map +1 -0
  326. package/lib/Utils/boom.d.ts +8 -32
  327. package/lib/Utils/boom.d.ts.map +1 -1
  328. package/lib/Utils/boom.js +7 -62
  329. package/lib/Utils/boom.js.map +1 -1
  330. package/lib/Utils/browser-utils.d.ts +1 -0
  331. package/lib/Utils/browser-utils.d.ts.map +1 -1
  332. package/lib/Utils/browser-utils.js +6 -0
  333. package/lib/Utils/browser-utils.js.map +1 -1
  334. package/lib/Utils/companion-reg-client-utils.d.ts +8 -0
  335. package/lib/Utils/companion-reg-client-utils.d.ts.map +1 -0
  336. package/lib/Utils/companion-reg-client-utils.js +32 -0
  337. package/lib/Utils/companion-reg-client-utils.js.map +1 -0
  338. package/lib/Utils/crypto.d.ts +31 -0
  339. package/lib/Utils/crypto.d.ts.map +1 -0
  340. package/lib/Utils/crypto.js +81 -0
  341. package/lib/Utils/crypto.js.map +1 -0
  342. package/lib/Utils/event-buffer.d.ts +15 -4
  343. package/lib/Utils/event-buffer.d.ts.map +1 -1
  344. package/lib/Utils/event-buffer.js +471 -34
  345. package/lib/Utils/event-buffer.js.map +1 -1
  346. package/lib/Utils/generics.d.ts +52 -15
  347. package/lib/Utils/generics.d.ts.map +1 -1
  348. package/lib/Utils/generics.js +269 -25
  349. package/lib/Utils/generics.js.map +1 -1
  350. package/lib/Utils/group-stub-params.d.ts +1 -28
  351. package/lib/Utils/group-stub-params.d.ts.map +1 -1
  352. package/lib/Utils/group-stub-params.js +2 -44
  353. package/lib/Utils/group-stub-params.js.map +1 -1
  354. package/lib/Utils/identity-change-handler.d.ts +2 -0
  355. package/lib/Utils/identity-change-handler.d.ts.map +1 -0
  356. package/lib/Utils/identity-change-handler.js +4 -0
  357. package/lib/Utils/identity-change-handler.js.map +1 -0
  358. package/lib/Utils/index.d.ts +9 -0
  359. package/lib/Utils/index.d.ts.map +1 -1
  360. package/lib/Utils/index.js +19 -10
  361. package/lib/Utils/index.js.map +1 -1
  362. package/lib/Utils/logger.d.ts.map +1 -1
  363. package/lib/Utils/message-retry-manager.d.ts +2 -0
  364. package/lib/Utils/message-retry-manager.d.ts.map +1 -0
  365. package/lib/Utils/message-retry-manager.js +4 -0
  366. package/lib/Utils/message-retry-manager.js.map +1 -0
  367. package/lib/Utils/messages-media.d.ts +28 -6
  368. package/lib/Utils/messages-media.d.ts.map +1 -1
  369. package/lib/Utils/messages-media.js +119 -1
  370. package/lib/Utils/messages-media.js.map +1 -1
  371. package/lib/Utils/messages.d.ts +33 -9
  372. package/lib/Utils/messages.d.ts.map +1 -1
  373. package/lib/Utils/messages.js +106 -33
  374. package/lib/Utils/messages.js.map +1 -1
  375. package/lib/Utils/native-crypto-provider.d.ts +10 -8
  376. package/lib/Utils/native-crypto-provider.d.ts.map +1 -1
  377. package/lib/Utils/native-crypto-provider.js +13 -56
  378. package/lib/Utils/native-crypto-provider.js.map +1 -1
  379. package/lib/Utils/pre-key-manager.d.ts +2 -0
  380. package/lib/Utils/pre-key-manager.d.ts.map +1 -0
  381. package/lib/Utils/pre-key-manager.js +3 -0
  382. package/lib/Utils/pre-key-manager.js.map +1 -0
  383. package/lib/Utils/process-history-message.d.ts +15 -4
  384. package/lib/Utils/process-history-message.d.ts.map +1 -1
  385. package/lib/Utils/process-history-message.js +162 -95
  386. package/lib/Utils/process-history-message.js.map +1 -1
  387. package/lib/Utils/process-message.d.ts +25 -0
  388. package/lib/Utils/process-message.d.ts.map +1 -0
  389. package/lib/Utils/process-message.js +79 -0
  390. package/lib/Utils/process-message.js.map +1 -0
  391. package/lib/Utils/signal.d.ts +29 -0
  392. package/lib/Utils/signal.d.ts.map +1 -0
  393. package/lib/Utils/signal.js +133 -0
  394. package/lib/Utils/signal.js.map +1 -0
  395. package/lib/Utils/sparse-array.d.ts +9 -0
  396. package/lib/Utils/sparse-array.d.ts.map +1 -0
  397. package/lib/Utils/sparse-array.js +12 -0
  398. package/lib/Utils/sparse-array.js.map +1 -0
  399. package/lib/Utils/stanza-ack.d.ts +2 -0
  400. package/lib/Utils/stanza-ack.d.ts.map +1 -0
  401. package/lib/Utils/stanza-ack.js +3 -0
  402. package/lib/Utils/stanza-ack.js.map +1 -0
  403. package/lib/Utils/use-bridge-store.d.ts.map +1 -1
  404. package/lib/Utils/use-bridge-store.js +191 -7
  405. package/lib/Utils/use-bridge-store.js.map +1 -1
  406. package/lib/Utils/use-memory-store.d.ts +8 -4
  407. package/lib/Utils/use-memory-store.d.ts.map +1 -1
  408. package/lib/Utils/use-memory-store.js +87 -10
  409. package/lib/Utils/use-memory-store.js.map +1 -1
  410. package/lib/Utils/use-multi-file-auth-state.d.ts +4 -2
  411. package/lib/Utils/use-multi-file-auth-state.d.ts.map +1 -1
  412. package/lib/Utils/use-multi-file-auth-state.js +13 -5
  413. package/lib/Utils/use-multi-file-auth-state.js.map +1 -1
  414. package/lib/Utils/wrap-legacy-store.d.ts +8 -32
  415. package/lib/Utils/wrap-legacy-store.d.ts.map +1 -1
  416. package/lib/Utils/wrap-legacy-store.js +7 -1214
  417. package/lib/Utils/wrap-legacy-store.js.map +1 -1
  418. package/lib/WABinary/generic-utils.d.ts +8 -0
  419. package/lib/WABinary/generic-utils.d.ts.map +1 -1
  420. package/lib/WABinary/generic-utils.js +63 -1
  421. package/lib/WABinary/generic-utils.js.map +1 -1
  422. package/lib/WABinary/index.js +2 -2
  423. package/lib/WABinary/jid-utils.d.ts +22 -10
  424. package/lib/WABinary/jid-utils.d.ts.map +1 -1
  425. package/lib/WABinary/jid-utils.js +40 -9
  426. package/lib/WABinary/jid-utils.js.map +1 -1
  427. package/lib/WAProto/compatibility-schema.d.ts +25 -0
  428. package/lib/WAProto/compatibility-schema.d.ts.map +1 -0
  429. package/lib/WAProto/compatibility-schema.js +6 -0
  430. package/lib/WAProto/compatibility-schema.js.map +1 -0
  431. package/lib/WAProto/runtime.d.ts +14019 -0
  432. package/lib/WAProto/runtime.js +17 -0
  433. package/lib/WAProto/runtime.js.map +1 -0
  434. package/lib/WAUSync/Protocols/USyncBotProfileProtocol.d.ts +27 -0
  435. package/lib/WAUSync/Protocols/USyncBotProfileProtocol.d.ts.map +1 -0
  436. package/lib/WAUSync/Protocols/USyncBotProfileProtocol.js +39 -0
  437. package/lib/WAUSync/Protocols/USyncBotProfileProtocol.js.map +1 -0
  438. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +10 -0
  439. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts.map +1 -0
  440. package/lib/WAUSync/Protocols/USyncContactProtocol.js +33 -0
  441. package/lib/WAUSync/Protocols/USyncContactProtocol.js.map +1 -0
  442. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +23 -0
  443. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts.map +1 -0
  444. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +41 -0
  445. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js.map +1 -0
  446. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +13 -0
  447. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts.map +1 -0
  448. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +19 -0
  449. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js.map +1 -0
  450. package/lib/WAUSync/Protocols/USyncLIDProtocol.d.ts +10 -0
  451. package/lib/WAUSync/Protocols/USyncLIDProtocol.d.ts.map +1 -0
  452. package/lib/WAUSync/Protocols/USyncLIDProtocol.js +15 -0
  453. package/lib/WAUSync/Protocols/USyncLIDProtocol.js.map +1 -0
  454. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +13 -0
  455. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts.map +1 -0
  456. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +25 -0
  457. package/lib/WAUSync/Protocols/USyncStatusProtocol.js.map +1 -0
  458. package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +10 -0
  459. package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts.map +1 -0
  460. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +21 -0
  461. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js.map +1 -0
  462. package/lib/WAUSync/Protocols/index.d.ts +6 -0
  463. package/lib/WAUSync/Protocols/index.d.ts.map +1 -0
  464. package/lib/WAUSync/Protocols/index.js +6 -0
  465. package/lib/WAUSync/Protocols/index.js.map +1 -0
  466. package/lib/WAUSync/USyncQuery.d.ts +30 -0
  467. package/lib/WAUSync/USyncQuery.d.ts.map +1 -0
  468. package/lib/WAUSync/USyncQuery.js +78 -0
  469. package/lib/WAUSync/USyncQuery.js.map +1 -0
  470. package/lib/WAUSync/USyncUser.d.ts +17 -0
  471. package/lib/WAUSync/USyncUser.d.ts.map +1 -0
  472. package/lib/WAUSync/USyncUser.js +31 -0
  473. package/lib/WAUSync/USyncUser.js.map +1 -0
  474. package/lib/WAUSync/index.d.ts +4 -0
  475. package/lib/WAUSync/index.d.ts.map +1 -0
  476. package/lib/WAUSync/index.js +4 -0
  477. package/lib/WAUSync/index.js.map +1 -0
  478. package/lib/index.d.ts +2 -1
  479. package/lib/index.d.ts.map +1 -1
  480. package/lib/index.js +9 -9
  481. package/lib/index.js.map +1 -1
  482. package/package.json +32 -14
  483. package/lib/Bridge/__tests__/adapt.test.d.ts +0 -2
  484. package/lib/Bridge/__tests__/adapt.test.d.ts.map +0 -1
  485. package/lib/Bridge/__tests__/adapt.test.js +0 -387
  486. package/lib/Bridge/__tests__/adapt.test.js.map +0 -1
  487. package/lib/Bridge/__tests__/dts-drift.test.d.ts +0 -13
  488. package/lib/Bridge/__tests__/dts-drift.test.d.ts.map +0 -1
  489. package/lib/Bridge/__tests__/dts-drift.test.js +0 -90
  490. package/lib/Bridge/__tests__/dts-drift.test.js.map +0 -1
  491. package/lib/Bridge/__tests__/fixtures.d.ts +0 -192
  492. package/lib/Bridge/__tests__/fixtures.d.ts.map +0 -1
  493. package/lib/Bridge/__tests__/fixtures.js +0 -99
  494. package/lib/Bridge/__tests__/fixtures.js.map +0 -1
  495. package/lib/Utils/__tests__/_legacy-store-fixtures.d.ts +0 -73
  496. package/lib/Utils/__tests__/_legacy-store-fixtures.d.ts.map +0 -1
  497. package/lib/Utils/__tests__/_legacy-store-fixtures.js +0 -113
  498. package/lib/Utils/__tests__/_legacy-store-fixtures.js.map +0 -1
  499. package/lib/Utils/__tests__/wrap-legacy-store-coverage.test.d.ts +0 -10
  500. package/lib/Utils/__tests__/wrap-legacy-store-coverage.test.d.ts.map +0 -1
  501. package/lib/Utils/__tests__/wrap-legacy-store-coverage.test.js +0 -291
  502. package/lib/Utils/__tests__/wrap-legacy-store-coverage.test.js.map +0 -1
  503. package/lib/Utils/__tests__/wrap-legacy-store-lid-mapping.test.d.ts +0 -8
  504. package/lib/Utils/__tests__/wrap-legacy-store-lid-mapping.test.d.ts.map +0 -1
  505. package/lib/Utils/__tests__/wrap-legacy-store-lid-mapping.test.js +0 -91
  506. package/lib/Utils/__tests__/wrap-legacy-store-lid-mapping.test.js.map +0 -1
  507. package/lib/Utils/__tests__/wrap-legacy-store-sender-key.test.d.ts +0 -10
  508. package/lib/Utils/__tests__/wrap-legacy-store-sender-key.test.d.ts.map +0 -1
  509. package/lib/Utils/__tests__/wrap-legacy-store-sender-key.test.js +0 -125
  510. package/lib/Utils/__tests__/wrap-legacy-store-sender-key.test.js.map +0 -1
  511. package/lib/Utils/__tests__/wrap-legacy-store-session-ratchet.test.d.ts +0 -2
  512. package/lib/Utils/__tests__/wrap-legacy-store-session-ratchet.test.d.ts.map +0 -1
  513. package/lib/Utils/__tests__/wrap-legacy-store-session-ratchet.test.js +0 -214
  514. package/lib/Utils/__tests__/wrap-legacy-store-session-ratchet.test.js.map +0 -1
  515. package/lib/Utils/__tests__/wrap-legacy-store-session.test.d.ts +0 -14
  516. package/lib/Utils/__tests__/wrap-legacy-store-session.test.d.ts.map +0 -1
  517. package/lib/Utils/__tests__/wrap-legacy-store-session.test.js +0 -305
  518. package/lib/Utils/__tests__/wrap-legacy-store-session.test.js.map +0 -1
  519. package/lib/Utils/bridge-call.d.ts +0 -22
  520. package/lib/Utils/bridge-call.d.ts.map +0 -1
  521. package/lib/Utils/bridge-call.js +0 -105
  522. package/lib/Utils/bridge-call.js.map +0 -1
  523. package/lib/Utils/lid-mapping-store.d.ts +0 -81
  524. package/lib/Utils/lid-mapping-store.d.ts.map +0 -1
  525. package/lib/Utils/lid-mapping-store.js +0 -126
  526. package/lib/Utils/lid-mapping-store.js.map +0 -1
  527. package/lib/__tests__/expect.d.ts +0 -44
  528. package/lib/__tests__/expect.d.ts.map +0 -1
  529. package/lib/__tests__/expect.js +0 -100
  530. package/lib/__tests__/expect.js.map +0 -1
@@ -1,26 +1,39 @@
1
1
  import { Buffer } from 'node:buffer';
2
2
  import { randomBytes } from 'node:crypto';
3
- import { EventEmitter } from 'node:events';
4
3
  import { createWhatsAppClient, encodeProto, initWasmEngine } from 'whatsapp-rust-bridge';
5
- import { DEFAULT_CONNECTION_CONFIG } from "../Defaults/index.js";
6
- import { DisconnectReason } from "../Types/index.js";
7
- import { Boom } from "../Utils/boom.js";
8
- import { makeEventBuffer } from "../Utils/event-buffer.js";
9
- import { _registerActiveBridgeClient, downloadMediaMessage } from "../Utils/messages.js";
10
- import { makeNativeCryptoProvider } from "../Utils/native-crypto-provider.js";
11
- import { wrapLegacyStore } from "../Utils/wrap-legacy-store.js";
12
- import { assertNodeErrorFree } from "../WABinary/generic-utils.js";
13
- import { makeBlockingMethods } from "./blocking.js";
14
- import { makeChatActionMethods } from "./chat-actions.js";
15
- import { makeContactMethods } from "./contacts.js";
16
- import { makeEventHandler } from "./events.js";
17
- import { makeGroupMethods } from "./groups.js";
18
- import { makeMessageMethods } from "./messages.js";
19
- import { makeNewsletterMethods } from "./newsletter.js";
20
- import { makePresenceMethods } from "./presence.js";
21
- import { makeProfileMethods } from "./profile.js";
22
- import { mapReachoutTimelock } from "./reachout.js";
23
- import { makeHttpClient, makeTransport } from "./transport.js";
4
+ import { normalizeSocketAuthenticationState } from '../Compatibility/internal/auth-state.js';
5
+ import { makeMutex } from '../Compatibility/internal/make-mutex.js';
6
+ import { isNativeMemoryStore } from '../Compatibility/internal/native-memory-store.js';
7
+ import { makeLazyTransactionKeyStore } from '../Compatibility/internal/signal-key-store.js';
8
+ import { toBridgeMediaType } from '../Compatibility/media-type.js';
9
+ import { bindSignalRepositoryContext, makeDefaultSignalRepository } from '../Compatibility/signal-repository.js';
10
+ import { bridgeBusinessProfileToBaileys } from '../Compatibility/socket-results.js';
11
+ import { makeStanzaResponseMethods } from '../Compatibility/stanza-responses.js';
12
+ import { makeParticipatingRefreshHandler } from '../Compatibility/participating-refresh.js';
13
+ import { makeTaggedMessageWaiter } from '../Compatibility/tagged-message-waiter.js';
14
+ import { isRawNodeForwardingEnabled, WebSocketClient } from '../Compatibility/websocket-client.js';
15
+ import { DEFAULT_CONNECTION_CONFIG } from '../Defaults/index.js';
16
+ import { DisconnectReason } from '../Types/index.js';
17
+ import { Boom } from '../Utils/boom.js';
18
+ import { makeEventBuffer } from '../Utils/event-buffer.js';
19
+ import { _registerActiveBridgeClient, downloadMediaMessage } from '../Utils/messages.js';
20
+ import { makeNativeCryptoProvider } from '../Utils/native-crypto-provider.js';
21
+ import { wrapLegacyStore } from '../Utils/wrap-legacy-store.js';
22
+ import { assertNodeErrorFree } from '../WABinary/generic-utils.js';
23
+ import { makeBlockingMethods } from './blocking.js';
24
+ import { makeChatActionMethods } from './chat-actions.js';
25
+ import { makeContactMethods } from './contacts.js';
26
+ import { makeCommunityMethods } from './communities.js';
27
+ import { makeEventHandlers } from './events.js';
28
+ import { makeGroupMethods } from './groups.js';
29
+ import { makeMessageMethods } from './messages.js';
30
+ import { makeNewsletterMethods } from './newsletter.js';
31
+ import { makePreKeyMethods } from './prekeys.js';
32
+ import { makePresenceMethods } from './presence.js';
33
+ import { makeProfileMethods } from './profile.js';
34
+ import { mapReachoutTimelock } from './reachout.js';
35
+ import { makeHttpClient, makeTransport } from './transport.js';
36
+ import { makeUSyncMethods } from './usync.js';
24
37
  let wasmInitialized = false;
25
38
  /**
26
39
  * Default mapping for the legacy `browser[1]` slot — preserved so users on the
@@ -48,207 +61,21 @@ const browserToPlatformType = (browser) => {
48
61
  return 'CHROME';
49
62
  }
50
63
  };
51
- /**
52
- * Returns a no-op `SignalKeyStore`-shaped facade. baileyrs hands this out from
53
- * `sock.authState.keys` when no legacy `auth.keys` was provided so that
54
- * upstream-Baileys code paths (typically post-error cleanup like
55
- * `keys.set({ 'sender-key': { [groupId]: null } })`) don't crash on a missing
56
- * `.set` method. The Rust bridge owns the real Signal state — this facade is
57
- * deliberately inert; reads come back empty and writes are dropped after a
58
- * `debug` log so the call site stays traceable.
59
- */
60
- function noopKeyStore(logger) {
61
- return {
62
- get: async () => ({}),
63
- set: async (data) => {
64
- const types = Object.keys(data).filter(k => data[k]);
65
- if (types.length) {
66
- logger.debug({ types }, 'authState.keys.set called — bridge owns Signal state, dropping no-op');
67
- }
68
- },
69
- clear: async () => {
70
- logger.debug('authState.keys.clear called — no-op (bridge state is not cleared from JS)');
71
- }
72
- };
73
- }
74
- /** Build the signalRepository object that delegates to the bridge */
75
- function makeSignalRepository(ctx) {
76
- return {
77
- decryptMessage: async (opts) => {
78
- return (await ctx.getClient()).signalDecryptMessage(opts.jid, opts.type, opts.ciphertext);
79
- },
80
- encryptMessage: async (opts) => {
81
- return (await ctx.getClient()).signalEncryptMessage(opts.jid, opts.data);
82
- },
83
- decryptGroupMessage: async (opts) => {
84
- return (await ctx.getClient()).signalDecryptGroupMessage(opts.group, opts.authorJid, opts.msg);
85
- },
86
- encryptGroupMessage: async (opts) => {
87
- return (await ctx.getClient()).signalEncryptGroupMessage(opts.group, opts.data, opts.meId);
88
- },
89
- processSenderKeyDistributionMessage: async () => { },
90
- injectE2ESession: async () => { },
91
- validateSession: async (jid) => {
92
- const exists = await (await ctx.getClient()).signalValidateSession(jid);
93
- return { exists };
94
- },
95
- jidToSignalProtocolAddress: (jid) => {
96
- try {
97
- return ctx.getClientSync().jidToSignalProtocolAddress(jid);
98
- }
99
- catch {
100
- return `${jid}.0`;
101
- }
102
- },
103
- migrateSession: async () => {
104
- return { migrated: 0, skipped: 0, total: 0 };
105
- },
106
- deleteSession: async (jids) => {
107
- return (await ctx.getClient()).signalDeleteSessions(jids);
108
- },
109
- /**
110
- * Bidirectional LID ↔ PN lookup. Mirrors the upstream Baileys
111
- * `signalRepository.lidMapping` API.
112
- *
113
- * Pure passthrough to the bridge — `client.lidForPn` / `client.pnForLid`
114
- * delegate to the core's `get_lid_pn_entry`, which is cache-aside as
115
- * of whatsapp-rust PR #565: hits the in-memory `lid_pn_cache` first
116
- * and falls through to `backend.get_pn_mapping` / `get_lid_mapping`
117
- * (so JsStoreCallbacks-backed sessions resolve every persisted
118
- * mapping without warm-up needing a list primitive).
119
- */
120
- lidMapping: {
121
- getLIDForPN: async (pn) => {
122
- const client = await ctx.getClient();
123
- return (await client.lidForPn(pn)) ?? null;
124
- },
125
- getPNForLID: async (lid) => {
126
- const client = await ctx.getClient();
127
- return (await client.pnForLid(lid)) ?? null;
128
- },
129
- /**
130
- * Batch variant of `getLIDForPN`. Upstream Baileys' equivalent
131
- * coalesces in-flight requests and de-duplicates inputs; we run
132
- * the lookups in parallel and return the same `LIDMapping[]`
133
- * shape so callers (e.g. `process-message.ts`) keep working.
134
- *
135
- * Uses `Promise.allSettled` so one bridge-side failure (e.g.
136
- * malformed JID, transient cache miss) doesn't reject the
137
- * whole batch and lose every successful lookup. Failures are
138
- * logged at debug and skipped.
139
- *
140
- * Returns `null` (not `[]`) when the input list is empty, to
141
- * mirror upstream's "absent" sentinel.
142
- */
143
- getLIDsForPNs: async (pns) => {
144
- if (pns.length === 0)
145
- return null;
146
- const client = await ctx.getClient();
147
- const unique = [...new Set(pns)];
148
- const settled = await Promise.allSettled(unique.map(async (pn) => {
149
- const lid = (await client.lidForPn(pn)) ?? null;
150
- return lid ? { pn, lid } : null;
151
- }));
152
- const resolved = [];
153
- for (const r of settled) {
154
- if (r.status === 'fulfilled') {
155
- if (r.value)
156
- resolved.push(r.value);
157
- }
158
- else {
159
- ctx.logger.debug({ err: r.reason }, 'getLIDsForPNs: lookup rejected — skipping');
160
- }
161
- }
162
- return resolved;
163
- },
164
- getPNsForLIDs: async (lids) => {
165
- if (lids.length === 0)
166
- return null;
167
- const client = await ctx.getClient();
168
- const unique = [...new Set(lids)];
169
- const settled = await Promise.allSettled(unique.map(async (lid) => {
170
- const pn = (await client.pnForLid(lid)) ?? null;
171
- return pn ? { pn, lid } : null;
172
- }));
173
- const resolved = [];
174
- for (const r of settled) {
175
- if (r.status === 'fulfilled') {
176
- if (r.value)
177
- resolved.push(r.value);
178
- }
179
- else {
180
- ctx.logger.debug({ err: r.reason }, 'getPNsForLIDs: lookup rejected — skipping');
181
- }
182
- }
183
- return resolved;
184
- },
185
- /**
186
- * No-op shim. The Rust bridge auto-learns LID↔PN mappings inside
187
- * `decode_message` / `usync` and persists them through
188
- * `JsStoreCallbacks` — upstream Baileys callers (notably
189
- * `process-message.ts` re-feeding mappings from `historySync`)
190
- * keep type-checking, but we don't need to write back.
191
- *
192
- * Logs at debug so unexpected paths stay traceable.
193
- */
194
- storeLIDPNMappings: async (pairs) => {
195
- if (pairs.length === 0)
196
- return;
197
- ctx.logger.debug({ count: pairs.length }, 'lidMapping.storeLIDPNMappings — bridge auto-learns, no-op');
198
- }
199
- }
200
- };
201
- }
202
64
  /** Build the ws EventEmitter with auto-enable raw node forwarding */
203
- function makeWsEmitter(getClient) {
204
- const ws = new EventEmitter();
205
- let rawNodeEnabled = false;
206
- const originalOn = ws.on.bind(ws);
207
- ws.on = (event, listener) => {
208
- if (typeof event === 'string' && event.startsWith('CB:') && !rawNodeEnabled) {
209
- rawNodeEnabled = true;
210
- try {
211
- getClient()?.setRawNodeForwarding(true);
212
- }
213
- catch {
214
- // bridge not ready yet — will enable when it initializes
215
- }
216
- }
217
- return originalOn(event, listener);
218
- };
219
- Object.defineProperty(ws, 'isOpen', {
220
- get: () => getClient()?.isConnected() ?? false,
221
- enumerable: true
222
- });
223
- // Upstream Baileys exposes `sock.ws.socket.readyState` (the underlying
224
- // WebSocket's standard property) and a lot of bots — keep-alive timers,
225
- // reconnect heuristics, "is the link up?" checks — read it directly.
226
- // baileyrs has no JS-side WebSocket (the noise socket lives inside the
227
- // Rust core), but the only thing those callers care about is the same
228
- // two-value answer the standard WebSocket constants encode:
229
- // 1 = OPEN, 3 = CLOSED — same numeric values WHATWG defines.
230
- // Anything other than 1 means "not usable", so collapsing the
231
- // CONNECTING/CLOSING transitional states to CLOSED preserves the
232
- // branching every realistic caller does (`readyState === 1`).
233
- const socketShim = {};
234
- Object.defineProperty(socketShim, 'readyState', {
235
- get: () => (getClient()?.isConnected() ? 1 : 3),
236
- enumerable: true
237
- });
238
- Object.defineProperty(ws, 'socket', {
239
- value: socketShim,
240
- enumerable: true,
241
- configurable: true
242
- });
243
- return { ws, isRawNodeEnabled: () => rawNodeEnabled };
244
- }
245
65
  const makeWASocket = (config) => {
246
66
  const fullConfig = { ...DEFAULT_CONNECTION_CONFIG, ...config };
247
- const { auth, logger } = fullConfig;
248
- const ev = makeEventBuffer();
67
+ const { logger } = fullConfig;
68
+ const auth = normalizeSocketAuthenticationState(fullConfig.auth);
69
+ const getExposedKeys = makeLazyTransactionKeyStore(auth.keys, logger, fullConfig.transactionOpts);
70
+ const ev = makeEventBuffer(logger);
71
+ // Upstream mutates authState.creds before notifying user listeners. Register
72
+ // this first so `ev.on('creds.update', saveCreds)` persists the merged state
73
+ // rather than the pre-pair placeholder.
74
+ ev.on('creds.update', update => Object.assign(auth.creds, update));
249
75
  let client;
76
+ let readyClient;
250
77
  let user;
251
- const { ws, isRawNodeEnabled } = makeWsEmitter(() => client);
78
+ const ws = new WebSocketClient(fullConfig.waWebSocketUrl, fullConfig, () => client);
252
79
  let tagEpoch = 0;
253
80
  // Per-socket random prefix avoids collisions between sockets created
254
81
  // in the same millisecond. Date.now()-based prefixes (the previous
@@ -270,17 +97,27 @@ const makeWASocket = (config) => {
270
97
  fullConfig,
271
98
  ws,
272
99
  getUser: () => user,
100
+ getMe: () => {
101
+ const me = auth.creds.me;
102
+ const id = user?.id ?? me?.id;
103
+ if (!id)
104
+ return undefined;
105
+ return { ...me, id, ...(user?.lid ? { lid: user.lid } : {}) };
106
+ },
273
107
  setUser: u => {
274
108
  user = u;
275
109
  },
276
- getClient: async () => {
277
- await initPromise;
278
- if (initError) {
279
- throw new Boom('Bridge client failed to initialize: ' + initError.message, { statusCode: 500 });
280
- }
281
- if (!client)
282
- throw new Boom('Client not initialized', { statusCode: 500 });
283
- return client;
110
+ getClient: () => {
111
+ if (readyClient)
112
+ return readyClient;
113
+ return initPromise.then(() => {
114
+ if (initError) {
115
+ throw new Boom('Bridge client failed to initialize: ' + initError.message, { statusCode: 500 });
116
+ }
117
+ if (!client)
118
+ throw new Boom('Client not initialized', { statusCode: 500 });
119
+ return client;
120
+ });
284
121
  },
285
122
  getClientSync: () => {
286
123
  if (!client)
@@ -288,7 +125,28 @@ const makeWASocket = (config) => {
288
125
  return client;
289
126
  }
290
127
  };
291
- const handleEvent = makeEventHandler(ctx, {
128
+ // The native repository delegates Signal state directly to the core and does
129
+ // not need the standalone transaction facade. Keep that facade lazy for the
130
+ // public authState and custom repository contracts that can observe it.
131
+ const signalAuthState = {
132
+ creds: auth.creds,
133
+ keys: fullConfig.makeSignalRepository === makeDefaultSignalRepository ? auth.keys : getExposedKeys()
134
+ };
135
+ bindSignalRepositoryContext(signalAuthState, ctx);
136
+ const signalRepository = fullConfig.makeSignalRepository(signalAuthState, logger);
137
+ const devicesMutex = makeMutex();
138
+ const messageMutex = makeMutex();
139
+ const receiptMutex = makeMutex();
140
+ const appStatePatchMutex = makeMutex();
141
+ const notificationMutex = makeMutex();
142
+ const activeCallContexts = new Map();
143
+ const groupMethods = makeGroupMethods(ctx);
144
+ const communityMethods = makeCommunityMethods(ctx, groupMethods);
145
+ const refreshParticipating = makeParticipatingRefreshHandler(ctx, {
146
+ groupFetchAllParticipating: groupMethods.groupFetchAllParticipating,
147
+ communityFetchAllParticipating: communityMethods.communityFetchAllParticipating
148
+ });
149
+ const eventHandlers = makeEventHandlers(ctx, {
292
150
  onPairSuccess: data => {
293
151
  pairedAccount = data;
294
152
  client
@@ -297,7 +155,17 @@ const makeWASocket = (config) => {
297
155
  cachedAccount = acc ?? undefined;
298
156
  })
299
157
  .catch(() => { });
300
- }
158
+ },
159
+ onIncomingCall: event => {
160
+ const { callId, callCreator, type } = event.action;
161
+ if (type === 'reject' || type === 'accept' || type === 'timeout' || type === 'terminate') {
162
+ activeCallContexts.delete(callId);
163
+ }
164
+ else if (callCreator) {
165
+ activeCallContexts.set(callId, { peer: event.from, callCreator });
166
+ }
167
+ },
168
+ onDirtyState: event => refreshParticipating(event.dirtyType)
301
169
  });
302
170
  const init = async () => {
303
171
  if (!wasmInitialized) {
@@ -315,15 +183,20 @@ const makeWASocket = (config) => {
315
183
  // got to enter, then crash when the next state ('open' / 'close')
316
184
  // references prerequisites that the missed event was supposed to set
317
185
  // up.
318
- queueMicrotask(() => ev.emit('connection.update', { connection: 'connecting' }));
186
+ queueMicrotask(() => ev.emit('connection.update', {
187
+ connection: 'connecting',
188
+ receivedPendingNotifications: false,
189
+ qr: undefined
190
+ }));
319
191
  // Auto-promote upstream-Baileys-style `auth: { creds, keys }` to a
320
192
  // `JsStoreCallbacks`-shaped store via `wrapLegacyStore`. The synthetic
321
193
  // `saveCreds` callback re-emits `creds.update` so the bot's existing
322
194
  // `ev.on('creds.update', saveCreds)` listener handles persistence —
323
195
  // matches the lifecycle hook every upstream-Baileys setup already
324
196
  // wires, so migration needs zero changes to the auth block.
325
- let bridgeStore = auth.store ?? null;
326
- if (!bridgeStore && auth.creds && auth.keys) {
197
+ const useNativeMemory = auth.store ? isNativeMemoryStore(auth.store) : false;
198
+ let bridgeStore = useNativeMemory ? null : (auth.store ?? null);
199
+ if (!bridgeStore && !useNativeMemory && auth.creds && auth.keys) {
327
200
  const legacyState = { creds: auth.creds, keys: auth.keys };
328
201
  const wrapped = await wrapLegacyStore(legacyState, async () => {
329
202
  ev.emit('creds.update', auth.creds);
@@ -336,7 +209,12 @@ const makeWASocket = (config) => {
336
209
  autoWrappedStore = wrapped;
337
210
  logger.debug('auth: auto-wrapped legacy {creds, keys} via wrapLegacyStore');
338
211
  }
339
- client = await createWhatsAppClient(makeTransport(fullConfig), makeHttpClient(fullConfig), handleEvent, bridgeStore, fullConfig.cache ?? null, fullConfig.version);
212
+ if (useNativeMemory)
213
+ logger.debug('auth: using socket-local native memory backend');
214
+ client = await createWhatsAppClient(makeTransport(fullConfig), makeHttpClient(fullConfig), eventHandlers, bridgeStore, fullConfig.cache ?? null, fullConfig.version, fullConfig.wantedPreKeyCount ?? null);
215
+ if (fullConfig.pushName) {
216
+ await client.setInitialPushName(fullConfig.pushName);
217
+ }
340
218
  // Make this client the fallback for standalone helpers like
341
219
  // downloadContentFromMessage that have no socket reference.
342
220
  _registerActiveBridgeClient(client, logger);
@@ -364,7 +242,7 @@ const makeWASocket = (config) => {
364
242
  if (browserName === 'Android') {
365
243
  await client.setClientProfile({ preset: 'android', osVersion: osName });
366
244
  }
367
- if (isRawNodeEnabled()) {
245
+ if (isRawNodeForwardingEnabled(ws)) {
368
246
  client.setRawNodeForwarding(true);
369
247
  }
370
248
  // `run()` is fire-and-forget by design (the bridge runs the read
@@ -393,20 +271,35 @@ const makeWASocket = (config) => {
393
271
  }
394
272
  };
395
273
  let initError;
396
- const initPromise = init().catch(err => {
274
+ const initPromise = init()
275
+ .then(() => {
276
+ if (client)
277
+ readyClient = Promise.resolve(client);
278
+ })
279
+ .catch(err => {
397
280
  initError = err instanceof Error ? err : new Error(String(err));
398
281
  logger.error({ err }, 'failed to initialize bridge client');
399
282
  });
400
- const end = async () => {
283
+ let ended = false;
284
+ const socketEndHandlers = [
285
+ () => activeCallContexts.clear()
286
+ ];
287
+ const end = async (error) => {
288
+ if (ended) {
289
+ logger.trace({ trace: error?.stack }, 'connection already closed');
290
+ return;
291
+ }
292
+ ended = true;
401
293
  const c = client;
402
- client = undefined;
403
294
  if (c) {
404
295
  try {
405
- await c.disconnect();
296
+ await ws.close();
406
297
  }
407
298
  catch {
408
299
  /* ignore */
409
300
  }
301
+ client = undefined;
302
+ readyClient = undefined;
410
303
  // Barrier: bridge cleanup paths fired during `disconnect()` may
411
304
  // emit `set()` calls that are still queued as microtasks /
412
305
  // `setImmediate` callbacks at this point. Two yields to the
@@ -442,6 +335,14 @@ const makeWASocket = (config) => {
442
335
  if (firstFlushError)
443
336
  throw firstFlushError;
444
337
  }
338
+ for (const handler of socketEndHandlers) {
339
+ try {
340
+ await handler(error);
341
+ }
342
+ catch (handlerError) {
343
+ logger.error({ err: handlerError }, 'error in socket end handler');
344
+ }
345
+ }
445
346
  };
446
347
  const logout = async (msg) => {
447
348
  user = undefined;
@@ -453,30 +354,49 @@ const makeWASocket = (config) => {
453
354
  /* ignore */
454
355
  }
455
356
  }
357
+ const logoutError = new Boom(msg || 'Logged out', { statusCode: DisconnectReason.loggedOut });
456
358
  ev.emit('connection.update', {
457
359
  connection: 'close',
458
360
  lastDisconnect: {
459
- error: new Boom(msg || 'Logged out', { statusCode: DisconnectReason.loggedOut }),
361
+ error: logoutError,
460
362
  date: new Date()
461
363
  }
462
364
  });
463
- await end();
365
+ await end(logoutError);
366
+ };
367
+ const registerSocketEndHandler = (handler) => {
368
+ socketEndHandlers.push(handler);
464
369
  };
465
370
  const waitForConnectionUpdate = (check, timeoutMs) => {
466
371
  return new Promise((resolve, reject) => {
467
372
  let timeout;
468
- const listener = (update) => {
469
- if (check(update)) {
470
- ev.off('connection.update', listener);
471
- if (timeout)
472
- clearTimeout(timeout);
373
+ const cleanup = () => {
374
+ ev.off('connection.update', listener);
375
+ if (timeout)
376
+ clearTimeout(timeout);
377
+ };
378
+ const listener = async (update) => {
379
+ if (update.connection === 'close') {
380
+ cleanup();
381
+ reject(update.lastDisconnect?.error ??
382
+ new Boom('Connection Closed', { statusCode: DisconnectReason.connectionClosed }));
383
+ return;
384
+ }
385
+ try {
386
+ if (!(await check(update)))
387
+ return;
388
+ cleanup();
473
389
  resolve();
474
390
  }
391
+ catch (error) {
392
+ cleanup();
393
+ reject(error);
394
+ }
475
395
  };
476
396
  ev.on('connection.update', listener);
477
397
  if (timeoutMs) {
478
398
  timeout = setTimeout(() => {
479
- ev.off('connection.update', listener);
399
+ cleanup();
480
400
  reject(new Boom('Timed out waiting for connection update', { statusCode: 408 }));
481
401
  }, timeoutMs);
482
402
  // Don't keep the process alive if the caller has already stopped
@@ -485,6 +405,24 @@ const makeWASocket = (config) => {
485
405
  }
486
406
  });
487
407
  };
408
+ const fetchReachoutTimelock = async () => {
409
+ const payload = await (await ctx.getClient()).fetchReachoutTimelock();
410
+ const state = mapReachoutTimelock(payload) ?? { isActive: false };
411
+ ev.emit('connection.update', { reachoutTimeLock: state });
412
+ return state;
413
+ };
414
+ const query = async (node, timeoutMs) => {
415
+ if (!node.attrs.id)
416
+ node.attrs.id = generateMessageTag();
417
+ const result = (await (await ctx.getClient()).queryNode(node, timeoutMs));
418
+ assertNodeErrorFree(result);
419
+ return result;
420
+ };
421
+ const waitForMessage = makeTaggedMessageWaiter(ws, logger, fullConfig.defaultQueryTimeoutMs);
422
+ const usyncMethods = makeUSyncMethods({
423
+ queryNode: query,
424
+ queryUsync: async (typedQuery) => (await ctx.getClient()).queryUsync(typedQuery)
425
+ });
488
426
  const sock = {
489
427
  ev,
490
428
  logger,
@@ -520,22 +458,18 @@ const makeWASocket = (config) => {
520
458
  return {
521
459
  creds: {
522
460
  ...auth.creds,
523
- me: user ? { id: user.id, lid: user.lid } : undefined,
524
- account: cachedAccount,
525
- platform: pairedAccount?.platform
461
+ ...(user ? { me: { ...auth.creds.me, id: user.id, lid: user.lid } } : {}),
462
+ ...(cachedAccount ? { account: cachedAccount } : {}),
463
+ ...(pairedAccount?.platform ? { platform: pairedAccount.platform } : {})
526
464
  },
527
- // `keys` is a no-op facade for upstream-Baileys code that pokes
528
- // at the legacy SignalKeyStore (e.g. clearing sender-keys after a
529
- // decrypt error: `keys.set({ 'sender-key': { [groupId]: null } })`).
530
- // In baileyrs the bridge owns all Signal state, so writes here
531
- // would silently no-op even if we delegated them — the real
532
- // sender-key store is internal to Rust. We expose stable methods
533
- // that don't crash, log at debug for traceability, and return
534
- // empty results from `.get` so callers fall through to whatever
535
- // regen path they already have.
536
- keys: auth.keys ?? noopKeyStore(logger)
465
+ keys: getExposedKeys()
537
466
  };
538
467
  },
468
+ devicesMutex,
469
+ messageMutex,
470
+ receiptMutex,
471
+ appStatePatchMutex,
472
+ notificationMutex,
539
473
  generateMessageTag,
540
474
  sendNode: async (frame) => {
541
475
  return (await ctx.getClient()).sendNode(frame);
@@ -546,67 +480,8 @@ const makeWASocket = (config) => {
546
480
  getUSyncDevices: async (jids, useCache, ignoreZeroDevices) => {
547
481
  return (await ctx.getClient()).getUSyncDevices(jids, useCache, ignoreZeroDevices);
548
482
  },
549
- waitForMessage: (msgId, timeoutMs) => {
550
- return new Promise((resolve, reject) => {
551
- const timeout = timeoutMs ?? fullConfig.defaultQueryTimeoutMs;
552
- let timer;
553
- const tag = `TAG:${msgId}`;
554
- // Use `on`+explicit `off` instead of `once`. Two callers
555
- // awaiting the same id (rare but legal — can happen when an
556
- // id is reused for retries, or when both an `<ack>` and an
557
- // `<iq result>` carry the same id) would otherwise have the
558
- // second listener silently consumed by the first emit.
559
- const onRecv = (data) => {
560
- if (timer)
561
- clearTimeout(timer);
562
- ws.off(tag, listener);
563
- resolve(data);
564
- };
565
- const listener = onRecv;
566
- ws.on(tag, listener);
567
- if (timeout) {
568
- timer = setTimeout(() => {
569
- ws.off(tag, listener);
570
- reject(new Boom('Timed out waiting for message', { statusCode: DisconnectReason.timedOut }));
571
- }, timeout);
572
- // Query timers shouldn't keep the process alive past sock.end()
573
- // if the caller has given up — same pattern as use-bridge-store.
574
- timer.unref();
575
- }
576
- });
577
- },
578
- query: async (node, timeoutMs) => {
579
- if (!node.attrs.id) {
580
- node.attrs.id = generateMessageTag();
581
- }
582
- const msgId = node.attrs.id;
583
- const tag = `TAG:${msgId}`;
584
- // Snapshot the listeners on this tag BEFORE attaching ours so a
585
- // sendNode failure can remove only what we added — never another
586
- // caller's listener. `removeAllListeners(tag)` was the prior
587
- // behavior; it could nuke a parallel `waitForMessage` belonging
588
- // to a different consumer.
589
- const before = ws.listeners(tag);
590
- const resultPromise = sock.waitForMessage(msgId, timeoutMs);
591
- try {
592
- await sock.sendNode(node);
593
- }
594
- catch (err) {
595
- const ours = ws.listeners(tag).filter(l => !before.includes(l));
596
- for (const l of ours)
597
- ws.off(tag, l);
598
- throw err;
599
- }
600
- const result = await resultPromise;
601
- // Mirror upstream `Socket/socket.ts:217-220`: a stanza with an
602
- // `<error>` child is a server-rejection. Throw a Boom carrying
603
- // the error code so consumers branching on
604
- // `lastDisconnect.error.statusCode` / `.data` can react. Without
605
- // this, code expecting upstream semantics treats a 403 / 405
606
- // error response as success and reads garbage attrs.
607
- assertNodeErrorFree(result);
608
- return result;
609
- },
483
+ waitForMessage,
484
+ query,
610
485
  sendRawMessage: async (data) => {
611
486
  return (await ctx.getClient()).sendRawMessage(data instanceof Uint8Array ? data : new Uint8Array(data));
612
487
  },
@@ -614,13 +489,11 @@ const makeWASocket = (config) => {
614
489
  const bytes = encodeProto('Message', message);
615
490
  return (await ctx.getClient()).createParticipantNodesBytes(jids, bytes, extraAttrs ?? {});
616
491
  },
617
- signalRepository: makeSignalRepository(ctx),
618
- /** @deprecated Pre-key management is handled by the Rust bridge. */
619
- uploadPreKeys: async () => { },
620
- /** @deprecated Pre-key management is handled by the Rust bridge. */
621
- uploadPreKeysToServerIfRequired: async () => { },
492
+ signalRepository,
493
+ ...makePreKeyMethods(ctx),
622
494
  end,
623
495
  logout,
496
+ registerSocketEndHandler,
624
497
  waitForConnectionUpdate,
625
498
  setAutoReconnect: (enabled) => {
626
499
  client?.setAutoReconnect(enabled);
@@ -632,15 +505,15 @@ const makeWASocket = (config) => {
632
505
  * caller hears about the protocol mistake instead of the bridge silently
633
506
  * sending nothing.
634
507
  */
635
- sendPresenceUpdate: async (presence, toJid) => {
508
+ sendPresenceUpdate: async (type, toJid) => {
636
509
  const c = await ctx.getClient();
637
- if (presence === 'available' || presence === 'unavailable') {
638
- return c.sendPresence(presence);
510
+ if (type === 'available' || type === 'unavailable') {
511
+ return c.sendPresence(type);
639
512
  }
640
513
  if (!toJid) {
641
- throw new Boom(`sendPresenceUpdate('${presence}') requires a target jid`, { statusCode: 400 });
514
+ throw new Boom(`sendPresenceUpdate('${type}') requires a target jid`, { statusCode: 400 });
642
515
  }
643
- return c.sendChatState(toJid, presence);
516
+ return c.sendChatState(toJid, type);
644
517
  },
645
518
  /**
646
519
  * Plaintext media upload helper, source-compatible with the upstream
@@ -650,9 +523,10 @@ const makeWASocket = (config) => {
650
523
  */
651
524
  waUploadToServer: async (data, opts) => {
652
525
  const bytes = data instanceof Uint8Array && !Buffer.isBuffer(data) ? data : new Uint8Array(data);
653
- return (await ctx.getClient()).uploadMedia(bytes, opts.mediaType);
526
+ return (await ctx.getClient()).uploadMedia(bytes, toBridgeMediaType(opts.mediaType));
654
527
  },
655
- fetchPrivacySettings: async () => {
528
+ fetchPrivacySettings: async (force) => {
529
+ void force;
656
530
  return (await ctx.getClient()).fetchPrivacySettings();
657
531
  },
658
532
  updatePrivacySetting: async (category, value) => {
@@ -680,10 +554,9 @@ const makeWASocket = (config) => {
680
554
  await (await ctx.getClient()).updateDefaultDisappearingMode(duration);
681
555
  },
682
556
  rejectCall: async (callId, callFrom) => {
683
- await (await ctx.getClient()).rejectCall(callId, callFrom);
684
- },
685
- fetchStatus: async (...jids) => {
686
- return (await ctx.getClient()).fetchStatus(jids);
557
+ const context = activeCallContexts.get(callId);
558
+ await (await ctx.getClient()).rejectCall(callId, context?.peer ?? callFrom, context?.callCreator ?? callFrom);
559
+ activeCallContexts.delete(callId);
687
560
  },
688
561
  /**
689
562
  * Fetch the account's current reachout-timelock state from the server.
@@ -698,30 +571,27 @@ const makeWASocket = (config) => {
698
571
  * effect for parity with the push path. Returns the same state for
699
572
  * callers that prefer awaiting.
700
573
  */
701
- fetchReachoutTimelock: async () => {
702
- const payload = await (await ctx.getClient()).fetchReachoutTimelock();
703
- const state = mapReachoutTimelock(payload) ?? { isActive: false };
704
- ev.emit('connection.update', { reachoutTimeLock: state });
705
- return state;
706
- },
574
+ fetchReachoutTimelock,
575
+ /** Upstream Baileys-compatible name. */
576
+ fetchAccountReachoutTimelock: fetchReachoutTimelock,
707
577
  getBusinessProfile: async (jid) => {
708
- return (await ctx.getClient()).getBusinessProfile(jid);
578
+ return bridgeBusinessProfileToBaileys(await (await ctx.getClient()).getBusinessProfile(jid));
709
579
  },
710
580
  fetchMessageHistory: async (count, oldestMsgKey, oldestMsgTimestamp) => {
711
- return (await ctx.getClient()).fetchMessageHistory(count, oldestMsgKey.remoteJid || '', oldestMsgKey.id || '', oldestMsgKey.fromMe || false, oldestMsgTimestamp);
712
- },
713
- groupMemberAddMode: async (jid, mode) => {
714
- await (await ctx.getClient()).groupMemberAddMode(jid, mode);
581
+ return (await ctx.getClient()).fetchMessageHistory(count, oldestMsgKey.remoteJid || '', oldestMsgKey.id || '', oldestMsgKey.fromMe || false, typeof oldestMsgTimestamp === 'number' ? oldestMsgTimestamp : oldestMsgTimestamp.toNumber());
715
582
  },
716
583
  sendStatusMessage: async (message, recipients) => {
717
584
  const bytes = encodeProto('Message', message);
718
585
  return (await ctx.getClient()).sendStatusMessageBytes(bytes, recipients);
719
586
  },
720
587
  ...makeMessageMethods(ctx),
721
- ...makeGroupMethods(ctx),
588
+ ...groupMethods,
589
+ ...communityMethods,
722
590
  ...makeContactMethods(ctx),
723
591
  ...makeProfileMethods(ctx),
724
592
  ...makeChatActionMethods(ctx),
593
+ ...usyncMethods,
594
+ ...makeStanzaResponseMethods(ctx),
725
595
  ...makePresenceMethods(ctx),
726
596
  ...makeBlockingMethods(ctx),
727
597
  ...makeNewsletterMethods(ctx),