@xbibzlibrary/whatsbibz 1.3.2 → 1.4.3

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 (247) hide show
  1. package/CHANGELOG.md +31 -1
  2. package/README.cn.md +604 -0
  3. package/README.id.md +237 -7
  4. package/README.md +237 -7
  5. package/WAProto/WAProto.proto +1 -0
  6. package/WAProto/index.d.ts +1 -0
  7. package/WAProto/index.js +1 -0
  8. package/assets/logo/README.md +11 -13
  9. package/assets/logo/preview.png +0 -0
  10. package/lib/BibzWhats/banner.d.ts +32 -0
  11. package/lib/BibzWhats/banner.js +121 -0
  12. package/lib/BibzWhats/client.d.ts +8 -1
  13. package/lib/BibzWhats/client.js +13 -0
  14. package/lib/BibzWhats/device-identity.d.ts +1 -0
  15. package/lib/BibzWhats/device-identity.js +1 -0
  16. package/lib/BibzWhats/extract.d.ts +1 -0
  17. package/lib/BibzWhats/extract.js +1 -0
  18. package/lib/BibzWhats/index.d.ts +2 -0
  19. package/lib/BibzWhats/index.js +2 -0
  20. package/lib/BibzWhats/jid.d.ts +1 -0
  21. package/lib/BibzWhats/jid.js +1 -0
  22. package/lib/BibzWhats/pairing.d.ts +1 -0
  23. package/lib/BibzWhats/pairing.js +1 -0
  24. package/lib/BibzWhats/send.d.ts +1 -0
  25. package/lib/BibzWhats/send.js +1 -0
  26. package/lib/BibzWhats/version.js +5 -4
  27. package/lib/Defaults/index.d.ts +3 -0
  28. package/lib/Defaults/index.js +4 -6
  29. package/lib/Modded/message_builder.d.ts +1 -0
  30. package/lib/Modded/message_builder.js +36 -43
  31. package/lib/Signal/Group/ciphertext-message.d.ts +1 -0
  32. package/lib/Signal/Group/ciphertext-message.js +1 -0
  33. package/lib/Signal/Group/group-session-builder.d.ts +1 -0
  34. package/lib/Signal/Group/group-session-builder.js +1 -0
  35. package/lib/Signal/Group/group_cipher.d.ts +1 -0
  36. package/lib/Signal/Group/group_cipher.js +1 -0
  37. package/lib/Signal/Group/index.d.ts +1 -0
  38. package/lib/Signal/Group/index.js +1 -0
  39. package/lib/Signal/Group/keyhelper.d.ts +1 -0
  40. package/lib/Signal/Group/keyhelper.js +1 -0
  41. package/lib/Signal/Group/sender-chain-key.d.ts +1 -0
  42. package/lib/Signal/Group/sender-chain-key.js +1 -0
  43. package/lib/Signal/Group/sender-key-distribution-message.d.ts +1 -0
  44. package/lib/Signal/Group/sender-key-distribution-message.js +1 -0
  45. package/lib/Signal/Group/sender-key-message.d.ts +1 -0
  46. package/lib/Signal/Group/sender-key-message.js +1 -0
  47. package/lib/Signal/Group/sender-key-name.d.ts +1 -0
  48. package/lib/Signal/Group/sender-key-name.js +1 -0
  49. package/lib/Signal/Group/sender-key-record.d.ts +1 -0
  50. package/lib/Signal/Group/sender-key-record.js +1 -0
  51. package/lib/Signal/Group/sender-key-state.d.ts +1 -0
  52. package/lib/Signal/Group/sender-key-state.js +1 -0
  53. package/lib/Signal/Group/sender-message-key.d.ts +1 -0
  54. package/lib/Signal/Group/sender-message-key.js +1 -0
  55. package/lib/Signal/libsignal.d.ts +1 -0
  56. package/lib/Signal/libsignal.js +1 -0
  57. package/lib/Signal/lid-mapping.d.ts +1 -0
  58. package/lib/Signal/lid-mapping.js +1 -0
  59. package/lib/Socket/Client/index.d.ts +1 -0
  60. package/lib/Socket/Client/index.js +1 -0
  61. package/lib/Socket/Client/types.d.ts +1 -0
  62. package/lib/Socket/Client/types.js +1 -0
  63. package/lib/Socket/Client/websocket.d.ts +1 -0
  64. package/lib/Socket/Client/websocket.js +1 -0
  65. package/lib/Socket/business.d.ts +1 -2
  66. package/lib/Socket/business.js +1 -0
  67. package/lib/Socket/chats.d.ts +1 -0
  68. package/lib/Socket/chats.js +1 -0
  69. package/lib/Socket/communities.d.ts +1 -2
  70. package/lib/Socket/communities.js +12 -2
  71. package/lib/Socket/engine.d.ts +1 -0
  72. package/lib/Socket/engine.js +1 -0
  73. package/lib/Socket/groups.d.ts +1 -0
  74. package/lib/Socket/groups.js +1 -0
  75. package/lib/Socket/index.d.ts +1 -2
  76. package/lib/Socket/index.js +12 -11
  77. package/lib/Socket/messages-recv.d.ts +1 -2
  78. package/lib/Socket/messages-recv.js +13 -4
  79. package/lib/Socket/messages-send.d.ts +7 -2
  80. package/lib/Socket/messages-send.js +59 -23
  81. package/lib/Socket/mex.d.ts +1 -0
  82. package/lib/Socket/mex.js +1 -0
  83. package/lib/Socket/newsletter.d.ts +1 -1
  84. package/lib/Socket/newsletter.js +255 -432
  85. package/lib/Socket/socket.d.ts +1 -0
  86. package/lib/Socket/socket.js +20 -1
  87. package/lib/Types/Auth.d.ts +2 -0
  88. package/lib/Types/Auth.js +1 -0
  89. package/lib/Types/Bussines.d.ts +1 -0
  90. package/lib/Types/Bussines.js +1 -0
  91. package/lib/Types/Call.d.ts +1 -0
  92. package/lib/Types/Call.js +1 -0
  93. package/lib/Types/Chat.d.ts +1 -0
  94. package/lib/Types/Chat.js +1 -0
  95. package/lib/Types/Contact.d.ts +1 -0
  96. package/lib/Types/Contact.js +1 -0
  97. package/lib/Types/Events.d.ts +1 -0
  98. package/lib/Types/Events.js +1 -0
  99. package/lib/Types/GroupMetadata.d.ts +1 -0
  100. package/lib/Types/GroupMetadata.js +1 -0
  101. package/lib/Types/Label.d.ts +1 -0
  102. package/lib/Types/Label.js +1 -0
  103. package/lib/Types/LabelAssociation.d.ts +1 -0
  104. package/lib/Types/LabelAssociation.js +1 -0
  105. package/lib/Types/Message.d.ts +1 -0
  106. package/lib/Types/Message.js +1 -0
  107. package/lib/Types/Newsletter.d.ts +1 -0
  108. package/lib/Types/Newsletter.js +1 -0
  109. package/lib/Types/Product.d.ts +1 -0
  110. package/lib/Types/Product.js +1 -0
  111. package/lib/Types/Signal.d.ts +1 -0
  112. package/lib/Types/Signal.js +1 -0
  113. package/lib/Types/Socket.d.ts +1 -6
  114. package/lib/Types/Socket.js +1 -0
  115. package/lib/Types/State.d.ts +1 -0
  116. package/lib/Types/State.js +1 -0
  117. package/lib/Types/USync.d.ts +1 -0
  118. package/lib/Types/USync.js +1 -0
  119. package/lib/Types/index.d.ts +1 -0
  120. package/lib/Types/index.js +1 -0
  121. package/lib/Utils/auth-utils.d.ts +1 -0
  122. package/lib/Utils/auth-utils.js +4 -0
  123. package/lib/Utils/browser-utils.d.ts +1 -0
  124. package/lib/Utils/browser-utils.js +3 -2
  125. package/lib/Utils/business.d.ts +1 -0
  126. package/lib/Utils/business.js +1 -0
  127. package/lib/Utils/chat-utils.d.ts +1 -0
  128. package/lib/Utils/chat-utils.js +1 -0
  129. package/lib/Utils/companion-reg-client-utils.d.ts +1 -0
  130. package/lib/Utils/companion-reg-client-utils.js +1 -0
  131. package/lib/Utils/crypto.d.ts +1 -0
  132. package/lib/Utils/crypto.js +1 -0
  133. package/lib/Utils/decode-wa-message.d.ts +1 -0
  134. package/lib/Utils/decode-wa-message.js +1 -0
  135. package/lib/Utils/event-buffer.d.ts +1 -0
  136. package/lib/Utils/event-buffer.js +9 -0
  137. package/lib/Utils/generics.d.ts +1 -0
  138. package/lib/Utils/generics.js +2 -1
  139. package/lib/Utils/history.d.ts +1 -0
  140. package/lib/Utils/history.js +1 -0
  141. package/lib/Utils/identity-change-handler.d.ts +1 -0
  142. package/lib/Utils/identity-change-handler.js +1 -0
  143. package/lib/Utils/index.d.ts +1 -0
  144. package/lib/Utils/index.js +1 -0
  145. package/lib/Utils/link-preview.d.ts +1 -0
  146. package/lib/Utils/link-preview.js +1 -0
  147. package/lib/Utils/logger.d.ts +1 -0
  148. package/lib/Utils/logger.js +1 -0
  149. package/lib/Utils/lt-hash.d.ts +1 -0
  150. package/lib/Utils/lt-hash.js +1 -0
  151. package/lib/Utils/make-mutex.d.ts +1 -0
  152. package/lib/Utils/make-mutex.js +1 -0
  153. package/lib/Utils/message-retry-manager.d.ts +1 -0
  154. package/lib/Utils/message-retry-manager.js +1 -0
  155. package/lib/Utils/messages-media.d.ts +1 -0
  156. package/lib/Utils/messages-media.js +28 -92
  157. package/lib/Utils/messages.d.ts +5 -0
  158. package/lib/Utils/messages.js +50 -5
  159. package/lib/Utils/noise-handler.d.ts +1 -0
  160. package/lib/Utils/noise-handler.js +1 -0
  161. package/lib/Utils/offline-node-processor.d.ts +2 -0
  162. package/lib/Utils/offline-node-processor.js +6 -0
  163. package/lib/Utils/platform-identity.d.ts +1 -0
  164. package/lib/Utils/platform-identity.js +1 -0
  165. package/lib/Utils/pre-key-manager.d.ts +1 -0
  166. package/lib/Utils/pre-key-manager.js +1 -0
  167. package/lib/Utils/process-message.d.ts +1 -0
  168. package/lib/Utils/process-message.js +1 -0
  169. package/lib/Utils/reporting-utils.d.ts +1 -0
  170. package/lib/Utils/reporting-utils.js +1 -0
  171. package/lib/Utils/rich-messages.d.ts +1 -0
  172. package/lib/Utils/rich-messages.js +11 -0
  173. package/lib/Utils/signal.d.ts +1 -0
  174. package/lib/Utils/signal.js +1 -0
  175. package/lib/Utils/stanza-ack.d.ts +1 -0
  176. package/lib/Utils/stanza-ack.js +1 -0
  177. package/lib/Utils/sticker-pack.d.ts +1 -0
  178. package/lib/Utils/sticker-pack.js +1 -0
  179. package/lib/Utils/sync-action-utils.d.ts +1 -0
  180. package/lib/Utils/sync-action-utils.js +1 -0
  181. package/lib/Utils/tc-token-utils.d.ts +1 -0
  182. package/lib/Utils/tc-token-utils.js +1 -0
  183. package/lib/Utils/use-multi-file-auth-state.d.ts +1 -0
  184. package/lib/Utils/use-multi-file-auth-state.js +1 -0
  185. package/lib/Utils/validate-connection.d.ts +1 -0
  186. package/lib/Utils/validate-connection.js +1 -0
  187. package/lib/VoIP/audio-feeder.d.ts +1 -0
  188. package/lib/VoIP/audio-feeder.js +1 -0
  189. package/lib/VoIP/index.d.ts +1 -0
  190. package/lib/VoIP/index.js +1 -0
  191. package/lib/VoIP/relay-transport.d.ts +1 -0
  192. package/lib/VoIP/relay-transport.js +1 -0
  193. package/lib/VoIP/signaling.js +1 -0
  194. package/lib/VoIP/types.d.ts +1 -0
  195. package/lib/VoIP/types.js +1 -0
  196. package/lib/VoIP/wasm-engine.d.ts +1 -0
  197. package/lib/VoIP/wasm-engine.js +1 -0
  198. package/lib/VoIP/worker-bootstrap.js +2 -1
  199. package/lib/WABinary/constants.d.ts +1 -0
  200. package/lib/WABinary/constants.js +1 -0
  201. package/lib/WABinary/decode.d.ts +1 -0
  202. package/lib/WABinary/decode.js +1 -0
  203. package/lib/WABinary/encode.d.ts +1 -0
  204. package/lib/WABinary/encode.js +1 -0
  205. package/lib/WABinary/generic-utils.d.ts +1 -0
  206. package/lib/WABinary/generic-utils.js +1 -0
  207. package/lib/WABinary/index.d.ts +1 -0
  208. package/lib/WABinary/index.js +1 -0
  209. package/lib/WABinary/jid-utils.d.ts +1 -0
  210. package/lib/WABinary/jid-utils.js +1 -0
  211. package/lib/WABinary/types.d.ts +1 -0
  212. package/lib/WABinary/types.js +1 -0
  213. package/lib/WAM/BinaryInfo.d.ts +1 -0
  214. package/lib/WAM/BinaryInfo.js +1 -0
  215. package/lib/WAM/constants.d.ts +1 -0
  216. package/lib/WAM/constants.js +1 -0
  217. package/lib/WAM/encode.d.ts +1 -0
  218. package/lib/WAM/encode.js +1 -0
  219. package/lib/WAM/index.d.ts +1 -0
  220. package/lib/WAM/index.js +1 -0
  221. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +1 -0
  222. package/lib/WAUSync/Protocols/USyncContactProtocol.js +1 -0
  223. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +1 -0
  224. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +1 -0
  225. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +1 -0
  226. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +1 -0
  227. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +1 -0
  228. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +1 -0
  229. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +1 -0
  230. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +1 -0
  231. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +1 -0
  232. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +1 -0
  233. package/lib/WAUSync/Protocols/index.d.ts +1 -0
  234. package/lib/WAUSync/Protocols/index.js +1 -0
  235. package/lib/WAUSync/USyncQuery.d.ts +1 -0
  236. package/lib/WAUSync/USyncQuery.js +1 -0
  237. package/lib/WAUSync/USyncUser.d.ts +1 -0
  238. package/lib/WAUSync/USyncUser.js +1 -0
  239. package/lib/WAUSync/index.d.ts +1 -0
  240. package/lib/WAUSync/index.js +1 -0
  241. package/lib/assets/wasm/loader.js +1 -0
  242. package/lib/assets/wasm/worker-modules.js +1 -0
  243. package/lib/index.d.ts +1 -0
  244. package/lib/index.js +1 -1
  245. package/package.json +27 -9
  246. package/WAProto/GenerateStatics.sh +0 -3
  247. package/WAProto/fix-imports.js +0 -81
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WABinary/jid-utils */
1
2
  export const S_WHATSAPP_NET = '@s.whatsapp.net';
2
3
  export const OFFICIAL_BIZ_JID = '16505361212@c.us';
3
4
  export const SERVER_JID = 'server@c.us';
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WABinary/types */
1
2
  import * as constants from './constants.js';
2
3
  /**
3
4
  * the binary node WA uses internally for communication
@@ -1 +1,2 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WABinary/types */
1
2
  import * as constants from './constants.js';
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAM/BinaryInfo */
1
2
  import type { EventInputType } from './constants.js';
2
3
  export declare class BinaryInfo {
3
4
  protocolVersion: number;
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAM/BinaryInfo */
1
2
  export class BinaryInfo {
2
3
  constructor(options = {}) {
3
4
  this.protocolVersion = 5;
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAM/constants */
1
2
  export declare const WEB_EVENTS: Event[];
2
3
  export declare const WEB_GLOBALS: Global[];
3
4
  export declare const FLAG_BYTE = 8, FLAG_GLOBAL = 0, FLAG_EVENT = 1, FLAG_FIELD = 2, FLAG_EXTENDED = 4;
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAM/constants */
1
2
  export const WEB_EVENTS = [
2
3
  {
3
4
  name: 'WamDroppedEvent',
@@ -1,2 +1,3 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAM/encode */
1
2
  import { BinaryInfo } from './BinaryInfo.js';
2
3
  export declare const encodeWAM: (binaryInfo: BinaryInfo) => Buffer;
package/lib/WAM/encode.js CHANGED
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAM/encode */
1
2
  import { BinaryInfo } from './BinaryInfo.js';
2
3
  import { FLAG_BYTE, FLAG_EVENT, FLAG_EXTENDED, FLAG_FIELD, FLAG_GLOBAL, WEB_EVENTS, WEB_GLOBALS } from './constants.js';
3
4
  const getHeaderBitLength = (key) => (key < 256 ? 2 : 3);
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAM/index */
1
2
  export * from './constants.js';
2
3
  export * from './encode.js';
3
4
  export * from './BinaryInfo.js';
package/lib/WAM/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAM/index */
1
2
  export * from './constants.js';
2
3
  export * from './encode.js';
3
4
  export * from './BinaryInfo.js';
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAUSync/Protocols/USyncContactProtocol */
1
2
  import type { USyncQueryProtocol } from '../../Types/USync.js';
2
3
  import { type BinaryNode } from '../../WABinary/index.js';
3
4
  import { USyncUser } from '../USyncUser.js';
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAUSync/Protocols/USyncContactProtocol */
1
2
  import { assertNodeErrorFree } from '../../WABinary/index.js';
2
3
  import { USyncUser } from '../USyncUser.js';
3
4
  export class USyncContactProtocol {
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAUSync/Protocols/USyncDeviceProtocol */
1
2
  import type { USyncQueryProtocol } from '../../Types/USync.js';
2
3
  import { type BinaryNode } from '../../WABinary/index.js';
3
4
  export type KeyIndexData = {
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAUSync/Protocols/USyncDeviceProtocol */
1
2
  import { assertNodeErrorFree, getBinaryNodeChild } from '../../WABinary/index.js';
2
3
  export class USyncDeviceProtocol {
3
4
  constructor() {
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAUSync/Protocols/USyncDisappearingModeProtocol */
1
2
  import type { USyncQueryProtocol } from '../../Types/USync.js';
2
3
  import { type BinaryNode } from '../../WABinary/index.js';
3
4
  export type DisappearingModeData = {
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAUSync/Protocols/USyncDisappearingModeProtocol */
1
2
  import { assertNodeErrorFree } from '../../WABinary/index.js';
2
3
  export class USyncDisappearingModeProtocol {
3
4
  constructor() {
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAUSync/Protocols/USyncStatusProtocol */
1
2
  import type { USyncQueryProtocol } from '../../Types/USync.js';
2
3
  import { type BinaryNode } from '../../WABinary/index.js';
3
4
  export type StatusData = {
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAUSync/Protocols/USyncStatusProtocol */
1
2
  import { assertNodeErrorFree } from '../../WABinary/index.js';
2
3
  export class USyncStatusProtocol {
3
4
  constructor() {
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAUSync/Protocols/UsyncBotProfileProtocol */
1
2
  import type { USyncQueryProtocol } from '../../Types/USync.js';
2
3
  import { type BinaryNode } from '../../WABinary/index.js';
3
4
  import { USyncUser } from '../USyncUser.js';
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAUSync/Protocols/UsyncBotProfileProtocol */
1
2
  import { getBinaryNodeChild, getBinaryNodeChildren, getBinaryNodeChildString } from '../../WABinary/index.js';
2
3
  import { USyncUser } from '../USyncUser.js';
3
4
  export class USyncBotProfileProtocol {
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAUSync/Protocols/UsyncLIDProtocol */
1
2
  import type { USyncQueryProtocol } from '../../Types/USync.js';
2
3
  import type { BinaryNode } from '../../WABinary/index.js';
3
4
  import type { USyncUser } from '../USyncUser.js';
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAUSync/Protocols/UsyncLIDProtocol */
1
2
  export class USyncLIDProtocol {
2
3
  constructor() {
3
4
  this.name = 'lid';
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAUSync/Protocols/index */
1
2
  export * from './USyncDeviceProtocol.js';
2
3
  export * from './USyncContactProtocol.js';
3
4
  export * from './USyncStatusProtocol.js';
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAUSync/Protocols/index */
1
2
  export * from './USyncDeviceProtocol.js';
2
3
  export * from './USyncContactProtocol.js';
3
4
  export * from './USyncStatusProtocol.js';
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAUSync/USyncQuery */
1
2
  import type { USyncQueryProtocol } from '../Types/USync.js';
2
3
  import { type BinaryNode } from '../WABinary/index.js';
3
4
  import { USyncUser } from './USyncUser.js';
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAUSync/USyncQuery */
1
2
  import { getBinaryNodeChild } from '../WABinary/index.js';
2
3
  import { USyncBotProfileProtocol } from './Protocols/UsyncBotProfileProtocol.js';
3
4
  import { USyncLIDProtocol } from './Protocols/UsyncLIDProtocol.js';
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAUSync/USyncUser */
1
2
  export declare class USyncUser {
2
3
  id?: string;
3
4
  lid?: string;
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAUSync/USyncUser */
1
2
  export class USyncUser {
2
3
  withId(id) {
3
4
  this.id = id;
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAUSync/index */
1
2
  export * from './Protocols/index.js';
2
3
  export * from './USyncQuery.js';
3
4
  export * from './USyncUser.js';
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WAUSync/index */
1
2
  export * from './Protocols/index.js';
2
3
  export * from './USyncQuery.js';
3
4
  export * from './USyncUser.js';
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/assets/wasm/loader */
1
2
  ;/*FB_PKG_DELIM*/
2
3
 
3
4
  __d("flipperApi",[],(function(t,n,r,o,a,i){var e=(function(){function e(e,t,n){this.pluginId=e,this.methodId=t,this.$1=n}var t=e.prototype;return t.success=function(t){},t.error=function(t){},e})(),l=(function(){function t(e,t){this.pluginId=e,this.$1=t}var n=t.prototype;return n.send=function(t,n){this.$1.sendData(this.pluginId,t,n)},n.receive=function(n,r){var t=this;this.$1.subscribe(this.pluginId,n,function(o){r(o,new e(t.pluginId,n,t.$1))})},t})(),s=(function(){function e(e){this.id=e}var t=e.prototype;return t.onConnect=function(t){this.$1=t},t.onDisconnect=function(){this.$1=null},t.getConnection=function(){return this.$1},e})(),u=(function(){function e(e){this.$2=!1,this.plugins=new Map,this.$1=e,this.$1.setClient(this)}var t=e.prototype;return t.addPlugin=function(t){this.$2&&t.onConnect(new l(t.id,this.$1)),this.plugins.set(t.id,t)},t.getPlugin=function(t){return this.plugins.get(t)},t.onConnect=function(){var e=this;this.$2||(this.$2=!0,Array.from(this.plugins.values()).map(function(t){return t.onConnect(new l(t.id,e.$1))}))},t.onDisconnect=function(){this.$2=!1,Array.from(this.plugins.values()).map(function(e){return e.onDisconnect()})},t.start=function(t){this.$1.registerPlugins(Array.from(this.plugins.keys())),this.$1.start(t)},t.stop=function(){this.$1.stop()},e})();i.FlipperConnection=l,i.FlipperPlugin=s,i.FlipperClient=u}),66);
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/assets/wasm/worker-modules */
1
2
  ;/*FB_PKG_DELIM*/
2
3
 
3
4
  "use strict";(function(){var e=typeof globalThis!="undefined"&&globalThis||typeof self!="undefined"&&self||typeof global!="undefined"&&global;if(typeof e.AbortController=="undefined"){var t=(function(){function e(){this.__listeners=new Map}return e.prototype=Object.create(Object.prototype),e.prototype.addEventListener=function(e,t,n){if(arguments.length<2)throw new TypeError("TypeError: Failed to execute 'addEventListener' on 'CustomEventTarget': 2 arguments required, but only "+arguments.length+" present.");var r=this.__listeners,o=e.toString();r.has(o)||r.set(o,new Map);var a=r.get(o);a.has(t)||a.set(t,n)},e.prototype.removeEventListener=function(e,t,n){if(arguments.length<2)throw new TypeError("TypeError: Failed to execute 'addEventListener' on 'CustomEventTarget': 2 arguments required, but only "+arguments.length+" present.");var r=this.__listeners,o=e.toString();if(r.has(o)){var a=r.get(o);a.has(t)&&a.delete(t)}},e.prototype.dispatchEvent=function(e){var t=this;if(!(e instanceof Event))throw new TypeError("Failed to execute 'dispatchEvent' on 'CustomEventTarget': parameter 1 is not of type 'Event'.");var n=e.type,r=this.__listeners,o=r.get(n);if(o){var a=function(){var n=i[0],r=i[1];try{typeof n=="function"?n.call(t,e):n&&typeof n.handleEvent=="function"&&n.handleEvent(e)}catch(e){setTimeout(function(){throw e})}r&&r.once&&o.delete(n)};for(var i of o.entries())a()}return!0},e})(),n={};e.AbortSignal=(function(){function e(e){if(e!==n)throw new TypeError("Illegal constructor.");t.call(this),this._aborted=!1}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Object.defineProperty(e.prototype,"onabort",{get:function(){return this._onabort},set:function(t){var e=this._onabort;e&&this.removeEventListener("abort",e),this._onabort=t,this.addEventListener("abort",t)}}),Object.defineProperty(e.prototype,"aborted",{get:function(){return this._aborted}}),e})(),e.AbortController=(function(){function e(){this._signal=new AbortSignal(n)}return e.prototype=Object.create(Object.prototype),Object.defineProperty(e.prototype,"signal",{get:function(){return this._signal}}),e.prototype.abort=function(){var e=this.signal;e.aborted||(e._aborted=!0,e.dispatchEvent(new Event("abort")))},e})()}})();
package/lib/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/index */
1
2
  import makeWASocket from './Socket/index.js';
2
3
  export * from '../WAProto/index.js';
3
4
  export * from './Utils/index.js';
package/lib/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // BibzWhats — library WhatsApp Web (fork Baileys v7) untuk ekosistem Xbibz.
2
- // Entry point: seluruh API Baileys/ourin tetap diekspor (kompatibilitas 100%),
2
+ // Entry point: seluruh API Baileys tetap diekspor (kompatibilitas 100%),
3
3
  // ditambah lapisan tingkat tinggi `createBibzWhats()` dan helper BibzWhats.
4
4
  import makeWASocket from './Socket/index.js';
5
5
  export * from '../WAProto/index.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xbibzlibrary/whatsbibz",
3
- "version": "1.3.2",
3
+ "version": "1.4.3",
4
4
  "description": "WhatsBibz — WhatsApp Web multi-device library for Node.js (maintained Baileys fork): high-level client, custom pairing codes, self-healing sessions, configurable or automatic linked-device identity, complete TypeScript declarations.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -16,7 +16,9 @@
16
16
  },
17
17
  "files": [
18
18
  "lib/**/*",
19
- "WAProto/**/*",
19
+ "WAProto/index.js",
20
+ "WAProto/index.d.ts",
21
+ "WAProto/WAProto.proto",
20
22
  "LICENSE",
21
23
  "LICENSE.upstream",
22
24
  "README.md",
@@ -35,7 +37,10 @@
35
37
  "test": "node --test test/*.test.js",
36
38
  "check": "node scripts/check.js",
37
39
  "test:live": "BIBZ_LIVE=1 node --test test/identity-live.test.js",
38
- "prepublishOnly": "npm test && node scripts/check.js"
40
+ "prepublishOnly": "npm test && node scripts/check.js",
41
+ "docs:dev": "vitepress dev docs --host 0.0.0.0",
42
+ "docs:build": "vitepress build docs",
43
+ "docs:preview": "vitepress preview docs --host 0.0.0.0"
39
44
  },
40
45
  "keywords": [
41
46
  "whatsbibz",
@@ -75,18 +80,18 @@
75
80
  "registry": "https://registry.npmjs.org/"
76
81
  },
77
82
  "dependencies": {
78
- "@cacheable/node-cache": "^1.4.0",
79
- "@hapi/boom": "^9.1.3",
83
+ "@cacheable/node-cache": "^1.4.2",
84
+ "@hapi/boom": "^9.1.4",
80
85
  "@types/ws": "^8.18.1",
81
86
  "async-mutex": "^0.5.0",
82
- "fflate": "^0.8.0",
87
+ "fflate": "^0.8.3",
83
88
  "libsignal": "^6.0.0",
84
89
  "long": "^5.3.2",
85
90
  "lru-cache": "^11.1.0",
86
91
  "music-metadata": "^11.12.3",
87
- "p-queue": "^9.0.0",
92
+ "p-queue": "^9.0.1",
88
93
  "pino": "^9.6",
89
- "protobufjs": "^7.5.6",
94
+ "protobufjs": "^7.5.9",
90
95
  "whatsapp-rust-bridge": "0.5.5",
91
96
  "ws": "^8.13.0"
92
97
  },
@@ -119,7 +124,20 @@
119
124
  }
120
125
  },
121
126
  "devDependencies": {
127
+ "@lucide/vue": "^1.51.0",
128
+ "@tailwindcss/vite": "^4.3.3",
129
+ "@types/node": "^22.20.5",
130
+ "class-variance-authority": "^0.7.1",
131
+ "clsx": "^2.1.1",
132
+ "reka-ui": "^2.10.5",
133
+ "tailwind-merge": "^3.7.0",
134
+ "tailwindcss": "^4.3.3",
135
+ "tw-animate-css": "^1.4.0",
122
136
  "typescript": "^7.0.2",
123
- "@types/node": "^22.18.0"
137
+ "vitepress": "^1.6.4"
138
+ },
139
+ "overrides": {
140
+ "vite": "^6.4.3",
141
+ "esbuild": "^0.25.0"
124
142
  }
125
143
  }
@@ -1,3 +0,0 @@
1
- yarn pbjs -t static-module --no-beautify -w es6 --no-bundle --no-delimited --no-verify --no-comments -o ./index.js ./WAProto.proto;
2
- yarn pbjs -t static-module --no-beautify -w es6 --no-bundle --no-delimited --no-verify ./WAProto.proto | yarn pbts --no-comments -o ./index.d.ts -;
3
- node ./fix-imports.js
@@ -1,81 +0,0 @@
1
- import { readFileSync, writeFileSync } from 'fs';
2
- import { exit } from 'process';
3
-
4
- const filePath = './index.js'
5
-
6
- try {
7
- let content = readFileSync(filePath, 'utf8')
8
-
9
- content = content.replace(/import \* as (\$protobuf) from/g, 'import $1 from')
10
- content = content.replace(/(['"])protobufjs\/minimal(['"])/g, '$1protobufjs/minimal.js$2')
11
-
12
- const marker = 'const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});\n\n'
13
- const longToStringHelper =
14
- 'function longToString(value, unsigned) {\n' +
15
- '\tif (typeof value === "string") {\n' +
16
- '\t\treturn value;\n' +
17
- '\t}\n' +
18
- '\tif (typeof value === "number") {\n' +
19
- '\t\treturn String(value);\n' +
20
- '\t}\n' +
21
- '\tif (!$util.Long) {\n' +
22
- '\t\treturn String(value);\n' +
23
- '\t}\n' +
24
- '\tconst normalized = $util.Long.fromValue(value);\n' +
25
- '\tconst prepared = unsigned && normalized && typeof normalized.toUnsigned === "function"\n' +
26
- '\t\t? normalized.toUnsigned()\n' +
27
- '\t\t: normalized;\n' +
28
- '\treturn prepared.toString();\n' +
29
- '}\n\n'
30
- const longToNumberHelper =
31
- 'function longToNumber(value, unsigned) {\n' +
32
- '\tif (typeof value === "number") {\n' +
33
- '\t\treturn value;\n' +
34
- '\t}\n' +
35
- '\tif (typeof value === "string") {\n' +
36
- '\t\tconst numeric = Number(value);\n' +
37
- '\t\treturn numeric;\n' +
38
- '\t}\n' +
39
- '\tif (!$util.Long) {\n' +
40
- '\t\treturn Number(value);\n' +
41
- '\t}\n' +
42
- '\tconst normalized = $util.Long.fromValue(value);\n' +
43
- '\tconst prepared = unsigned && normalized && typeof normalized.toUnsigned === "function"\n' +
44
- '\t\t? normalized.toUnsigned()\n' +
45
- '\t\t: typeof normalized.toSigned === "function"\n' +
46
- '\t\t\t? normalized.toSigned()\n' +
47
- '\t\t\t: normalized;\n' +
48
- '\treturn prepared.toNumber();\n' +
49
- '}\n\n'
50
-
51
- if (!content.includes('function longToString(')) {
52
- const markerIndex = content.indexOf(marker)
53
- if (markerIndex === -1) {
54
- throw new Error('Unable to inject Long helpers: marker not found in WAProto index output')
55
- }
56
-
57
- content = content.replace(marker, `${marker}${longToStringHelper}${longToNumberHelper}`)
58
- } else {
59
- const longToStringRegex = /function longToString\(value, unsigned\) {\n[\s\S]*?\n}\n\n/
60
- const longToNumberRegex = /function longToNumber\(value, unsigned\) {\n[\s\S]*?\n}\n\n/
61
-
62
- if (!longToStringRegex.test(content) || !longToNumberRegex.test(content)) {
63
- throw new Error('Unable to update Long helpers: existing definitions not found')
64
- }
65
-
66
- content = content.replace(longToStringRegex, longToStringHelper)
67
- content = content.replace(longToNumberRegex, longToNumberHelper)
68
- }
69
-
70
- const longPattern = /([ \t]+d\.(\w+) = )o\.longs === String \? \$util\.Long\.prototype\.toString\.call\(m\.\2\) : o\.longs === Number \? new \$util\.LongBits\(m\.\2\.low >>> 0, m\.\2\.high >>> 0\)\.toNumber\((true)?\) : m\.\2;/g
71
- content = content.replace(longPattern, (_match, prefix, field, unsignedFlag) => {
72
- const unsignedArg = unsignedFlag ? ', true' : ''
73
- return `${prefix}o.longs === String ? longToString(m.${field}${unsignedArg}) : o.longs === Number ? longToNumber(m.${field}${unsignedArg}) : m.${field};`
74
- })
75
-
76
- writeFileSync(filePath, content, 'utf8')
77
- console.log(`✅ Fixed imports in ${filePath}`)
78
- } catch (error) {
79
- console.error(`❌ Error fixing imports: ${error.message}`)
80
- exit(1)
81
- }