@xbibzlibrary/whatsbibz 1.4.0 → 1.4.4

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 (248) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.cn.md +5 -5
  3. package/README.id.md +5 -5
  4. package/README.md +5 -5
  5. package/SECURITY.md +6 -6
  6. package/WAProto/WAProto.proto +1 -0
  7. package/WAProto/index.d.ts +1 -0
  8. package/WAProto/index.js +1 -0
  9. package/lib/BibzWhats/banner.d.ts +1 -0
  10. package/lib/BibzWhats/banner.js +1 -0
  11. package/lib/BibzWhats/client.d.ts +1 -0
  12. package/lib/BibzWhats/client.js +1 -0
  13. package/lib/BibzWhats/device-identity.d.ts +1 -0
  14. package/lib/BibzWhats/device-identity.js +1 -0
  15. package/lib/BibzWhats/extract.d.ts +1 -0
  16. package/lib/BibzWhats/extract.js +1 -0
  17. package/lib/BibzWhats/index.d.ts +1 -0
  18. package/lib/BibzWhats/index.js +1 -0
  19. package/lib/BibzWhats/jid.d.ts +1 -0
  20. package/lib/BibzWhats/jid.js +1 -0
  21. package/lib/BibzWhats/pairing.d.ts +1 -0
  22. package/lib/BibzWhats/pairing.js +1 -0
  23. package/lib/BibzWhats/send.d.ts +1 -0
  24. package/lib/BibzWhats/send.js +1 -0
  25. package/lib/BibzWhats/version.js +5 -4
  26. package/lib/Defaults/index.d.ts +3 -0
  27. package/lib/Defaults/index.js +4 -6
  28. package/lib/Modded/message_builder.d.ts +1 -0
  29. package/lib/Modded/message_builder.js +13 -36
  30. package/lib/Signal/Group/ciphertext-message.d.ts +1 -0
  31. package/lib/Signal/Group/ciphertext-message.js +1 -0
  32. package/lib/Signal/Group/group-session-builder.d.ts +1 -0
  33. package/lib/Signal/Group/group-session-builder.js +1 -0
  34. package/lib/Signal/Group/group_cipher.d.ts +1 -0
  35. package/lib/Signal/Group/group_cipher.js +1 -0
  36. package/lib/Signal/Group/index.d.ts +1 -0
  37. package/lib/Signal/Group/index.js +1 -0
  38. package/lib/Signal/Group/keyhelper.d.ts +1 -0
  39. package/lib/Signal/Group/keyhelper.js +1 -0
  40. package/lib/Signal/Group/sender-chain-key.d.ts +1 -0
  41. package/lib/Signal/Group/sender-chain-key.js +1 -0
  42. package/lib/Signal/Group/sender-key-distribution-message.d.ts +1 -0
  43. package/lib/Signal/Group/sender-key-distribution-message.js +1 -0
  44. package/lib/Signal/Group/sender-key-message.d.ts +1 -0
  45. package/lib/Signal/Group/sender-key-message.js +1 -0
  46. package/lib/Signal/Group/sender-key-name.d.ts +1 -0
  47. package/lib/Signal/Group/sender-key-name.js +1 -0
  48. package/lib/Signal/Group/sender-key-record.d.ts +1 -0
  49. package/lib/Signal/Group/sender-key-record.js +1 -0
  50. package/lib/Signal/Group/sender-key-state.d.ts +1 -0
  51. package/lib/Signal/Group/sender-key-state.js +1 -0
  52. package/lib/Signal/Group/sender-message-key.d.ts +1 -0
  53. package/lib/Signal/Group/sender-message-key.js +1 -0
  54. package/lib/Signal/libsignal.d.ts +1 -0
  55. package/lib/Signal/libsignal.js +1 -0
  56. package/lib/Signal/lid-mapping.d.ts +1 -0
  57. package/lib/Signal/lid-mapping.js +1 -0
  58. package/lib/Socket/Client/index.d.ts +1 -0
  59. package/lib/Socket/Client/index.js +1 -0
  60. package/lib/Socket/Client/types.d.ts +1 -0
  61. package/lib/Socket/Client/types.js +1 -0
  62. package/lib/Socket/Client/websocket.d.ts +1 -0
  63. package/lib/Socket/Client/websocket.js +1 -0
  64. package/lib/Socket/business.d.ts +1 -2
  65. package/lib/Socket/business.js +1 -0
  66. package/lib/Socket/chats.d.ts +1 -0
  67. package/lib/Socket/chats.js +1 -0
  68. package/lib/Socket/communities.d.ts +1 -2
  69. package/lib/Socket/communities.js +12 -2
  70. package/lib/Socket/engine.d.ts +1 -0
  71. package/lib/Socket/engine.js +1 -0
  72. package/lib/Socket/groups.d.ts +1 -0
  73. package/lib/Socket/groups.js +1 -0
  74. package/lib/Socket/index.d.ts +1 -2
  75. package/lib/Socket/index.js +12 -11
  76. package/lib/Socket/messages-recv.d.ts +1 -2
  77. package/lib/Socket/messages-recv.js +13 -4
  78. package/lib/Socket/messages-send.d.ts +7 -2
  79. package/lib/Socket/messages-send.js +59 -23
  80. package/lib/Socket/mex.d.ts +1 -0
  81. package/lib/Socket/mex.js +1 -0
  82. package/lib/Socket/newsletter.d.ts +1 -1
  83. package/lib/Socket/newsletter.js +255 -432
  84. package/lib/Socket/socket.d.ts +1 -0
  85. package/lib/Socket/socket.js +20 -1
  86. package/lib/Types/Auth.d.ts +2 -0
  87. package/lib/Types/Auth.js +1 -0
  88. package/lib/Types/Bussines.d.ts +1 -0
  89. package/lib/Types/Bussines.js +1 -0
  90. package/lib/Types/Call.d.ts +1 -0
  91. package/lib/Types/Call.js +1 -0
  92. package/lib/Types/Chat.d.ts +1 -0
  93. package/lib/Types/Chat.js +1 -0
  94. package/lib/Types/Contact.d.ts +1 -0
  95. package/lib/Types/Contact.js +1 -0
  96. package/lib/Types/Events.d.ts +1 -0
  97. package/lib/Types/Events.js +1 -0
  98. package/lib/Types/GroupMetadata.d.ts +1 -0
  99. package/lib/Types/GroupMetadata.js +1 -0
  100. package/lib/Types/Label.d.ts +1 -0
  101. package/lib/Types/Label.js +1 -0
  102. package/lib/Types/LabelAssociation.d.ts +1 -0
  103. package/lib/Types/LabelAssociation.js +1 -0
  104. package/lib/Types/Message.d.ts +1 -0
  105. package/lib/Types/Message.js +1 -0
  106. package/lib/Types/Newsletter.d.ts +1 -0
  107. package/lib/Types/Newsletter.js +1 -0
  108. package/lib/Types/Product.d.ts +1 -0
  109. package/lib/Types/Product.js +1 -0
  110. package/lib/Types/Signal.d.ts +1 -0
  111. package/lib/Types/Signal.js +1 -0
  112. package/lib/Types/Socket.d.ts +1 -6
  113. package/lib/Types/Socket.js +1 -0
  114. package/lib/Types/State.d.ts +1 -0
  115. package/lib/Types/State.js +1 -0
  116. package/lib/Types/USync.d.ts +1 -0
  117. package/lib/Types/USync.js +1 -0
  118. package/lib/Types/index.d.ts +1 -0
  119. package/lib/Types/index.js +1 -0
  120. package/lib/Utils/auth-utils.d.ts +1 -0
  121. package/lib/Utils/auth-utils.js +4 -0
  122. package/lib/Utils/browser-utils.d.ts +1 -0
  123. package/lib/Utils/browser-utils.js +3 -2
  124. package/lib/Utils/business.d.ts +1 -0
  125. package/lib/Utils/business.js +1 -0
  126. package/lib/Utils/chat-utils.d.ts +1 -0
  127. package/lib/Utils/chat-utils.js +1 -0
  128. package/lib/Utils/companion-reg-client-utils.d.ts +1 -0
  129. package/lib/Utils/companion-reg-client-utils.js +1 -0
  130. package/lib/Utils/crypto.d.ts +1 -0
  131. package/lib/Utils/crypto.js +1 -0
  132. package/lib/Utils/decode-wa-message.d.ts +1 -0
  133. package/lib/Utils/decode-wa-message.js +1 -0
  134. package/lib/Utils/event-buffer.d.ts +1 -0
  135. package/lib/Utils/event-buffer.js +9 -0
  136. package/lib/Utils/generics.d.ts +1 -0
  137. package/lib/Utils/generics.js +5 -3
  138. package/lib/Utils/history.d.ts +1 -0
  139. package/lib/Utils/history.js +1 -0
  140. package/lib/Utils/identity-change-handler.d.ts +1 -0
  141. package/lib/Utils/identity-change-handler.js +1 -0
  142. package/lib/Utils/index.d.ts +2 -0
  143. package/lib/Utils/index.js +2 -0
  144. package/lib/Utils/link-preview.d.ts +1 -0
  145. package/lib/Utils/link-preview.js +18 -13
  146. package/lib/Utils/logger.d.ts +1 -0
  147. package/lib/Utils/logger.js +1 -0
  148. package/lib/Utils/lt-hash.d.ts +1 -0
  149. package/lib/Utils/lt-hash.js +1 -0
  150. package/lib/Utils/make-mutex.d.ts +1 -0
  151. package/lib/Utils/make-mutex.js +1 -0
  152. package/lib/Utils/message-retry-manager.d.ts +1 -0
  153. package/lib/Utils/message-retry-manager.js +1 -0
  154. package/lib/Utils/messages-media.d.ts +1 -0
  155. package/lib/Utils/messages-media.js +31 -94
  156. package/lib/Utils/messages.d.ts +5 -0
  157. package/lib/Utils/messages.js +50 -5
  158. package/lib/Utils/node-security-2026-10.d.ts +18 -0
  159. package/lib/Utils/node-security-2026-10.js +236 -0
  160. package/lib/Utils/noise-handler.d.ts +1 -0
  161. package/lib/Utils/noise-handler.js +1 -0
  162. package/lib/Utils/offline-node-processor.d.ts +2 -0
  163. package/lib/Utils/offline-node-processor.js +6 -0
  164. package/lib/Utils/platform-identity.d.ts +1 -0
  165. package/lib/Utils/platform-identity.js +1 -0
  166. package/lib/Utils/pre-key-manager.d.ts +1 -0
  167. package/lib/Utils/pre-key-manager.js +1 -0
  168. package/lib/Utils/process-message.d.ts +1 -0
  169. package/lib/Utils/process-message.js +1 -0
  170. package/lib/Utils/reporting-utils.d.ts +1 -0
  171. package/lib/Utils/reporting-utils.js +1 -0
  172. package/lib/Utils/rich-messages.d.ts +1 -0
  173. package/lib/Utils/rich-messages.js +1 -0
  174. package/lib/Utils/signal.d.ts +1 -0
  175. package/lib/Utils/signal.js +1 -0
  176. package/lib/Utils/stanza-ack.d.ts +1 -0
  177. package/lib/Utils/stanza-ack.js +1 -0
  178. package/lib/Utils/sticker-pack.d.ts +1 -0
  179. package/lib/Utils/sticker-pack.js +1 -0
  180. package/lib/Utils/sync-action-utils.d.ts +1 -0
  181. package/lib/Utils/sync-action-utils.js +1 -0
  182. package/lib/Utils/tc-token-utils.d.ts +1 -0
  183. package/lib/Utils/tc-token-utils.js +1 -0
  184. package/lib/Utils/use-multi-file-auth-state.d.ts +1 -0
  185. package/lib/Utils/use-multi-file-auth-state.js +1 -0
  186. package/lib/Utils/validate-connection.d.ts +1 -0
  187. package/lib/Utils/validate-connection.js +1 -0
  188. package/lib/VoIP/audio-feeder.d.ts +1 -0
  189. package/lib/VoIP/audio-feeder.js +1 -0
  190. package/lib/VoIP/index.d.ts +1 -0
  191. package/lib/VoIP/index.js +1 -0
  192. package/lib/VoIP/relay-transport.d.ts +1 -0
  193. package/lib/VoIP/relay-transport.js +1 -0
  194. package/lib/VoIP/signaling.js +1 -0
  195. package/lib/VoIP/types.d.ts +1 -0
  196. package/lib/VoIP/types.js +1 -0
  197. package/lib/VoIP/wasm-engine.d.ts +1 -0
  198. package/lib/VoIP/wasm-engine.js +1 -0
  199. package/lib/VoIP/worker-bootstrap.js +2 -1
  200. package/lib/WABinary/constants.d.ts +1 -0
  201. package/lib/WABinary/constants.js +1 -0
  202. package/lib/WABinary/decode.d.ts +1 -0
  203. package/lib/WABinary/decode.js +1 -0
  204. package/lib/WABinary/encode.d.ts +1 -0
  205. package/lib/WABinary/encode.js +1 -0
  206. package/lib/WABinary/generic-utils.d.ts +1 -0
  207. package/lib/WABinary/generic-utils.js +1 -0
  208. package/lib/WABinary/index.d.ts +1 -0
  209. package/lib/WABinary/index.js +1 -0
  210. package/lib/WABinary/jid-utils.d.ts +1 -0
  211. package/lib/WABinary/jid-utils.js +1 -0
  212. package/lib/WABinary/types.d.ts +1 -0
  213. package/lib/WABinary/types.js +1 -0
  214. package/lib/WAM/BinaryInfo.d.ts +1 -0
  215. package/lib/WAM/BinaryInfo.js +1 -0
  216. package/lib/WAM/constants.d.ts +1 -0
  217. package/lib/WAM/constants.js +1 -0
  218. package/lib/WAM/encode.d.ts +1 -0
  219. package/lib/WAM/encode.js +1 -0
  220. package/lib/WAM/index.d.ts +1 -0
  221. package/lib/WAM/index.js +1 -0
  222. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +1 -0
  223. package/lib/WAUSync/Protocols/USyncContactProtocol.js +1 -0
  224. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +1 -0
  225. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +1 -0
  226. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +1 -0
  227. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +1 -0
  228. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +1 -0
  229. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +1 -0
  230. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +1 -0
  231. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +1 -0
  232. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +1 -0
  233. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +1 -0
  234. package/lib/WAUSync/Protocols/index.d.ts +1 -0
  235. package/lib/WAUSync/Protocols/index.js +1 -0
  236. package/lib/WAUSync/USyncQuery.d.ts +1 -0
  237. package/lib/WAUSync/USyncQuery.js +1 -0
  238. package/lib/WAUSync/USyncUser.d.ts +1 -0
  239. package/lib/WAUSync/USyncUser.js +1 -0
  240. package/lib/WAUSync/index.d.ts +1 -0
  241. package/lib/WAUSync/index.js +1 -0
  242. package/lib/assets/wasm/loader.js +1 -0
  243. package/lib/assets/wasm/worker-modules.js +1 -0
  244. package/lib/index.d.ts +1 -0
  245. package/lib/index.js +1 -1
  246. package/package.json +33 -14
  247. package/WAProto/GenerateStatics.sh +0 -3
  248. package/WAProto/fix-imports.js +0 -81
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/Utils/stanza-ack */
1
2
  import type { BinaryNode } from '../WABinary/index.js';
2
3
  /**
3
4
  * Builds an ACK stanza for a received node.
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/Utils/stanza-ack */
1
2
  /**
2
3
  * Builds an ACK stanza for a received node.
3
4
  * Pure function -- no I/O, no side effects.
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/Utils/sticker-pack */
1
2
  import type { StickerPackContent } from '../Types/Message.js';
2
3
  export type MakeStickerPackOptions = StickerPackContent & {
3
4
  contextInfo?: any;
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/Utils/sticker-pack */
1
2
  /**
2
3
  * Default emojis assigned to stickers when none are provided.
3
4
  * Rotates through this list by sticker index.
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/Utils/sync-action-utils */
1
2
  import { proto } from '../../WAProto/index.js';
2
3
  import type { BaileysEventEmitter, BaileysEventMap, Contact } from '../Types/index.js';
3
4
  import type { ILogger } from './logger.js';
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/Utils/sync-action-utils */
1
2
  import { proto } from '../../WAProto/index.js';
2
3
  import { isLidUser, isPnUser } from '../WABinary/index.js';
3
4
  /**
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/Utils/tc-token-utils */
1
2
  import type { AuthenticationState } from '../Types/index.js';
2
3
  import type { BinaryNode } from '../WABinary/index.js';
3
4
  export declare function isTcTokenExpired(timestamp: number | string | null | undefined): boolean;
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/Utils/tc-token-utils */
1
2
  const TC_TOKEN_BUCKET_DURATION = 604800; // 7 hari
2
3
  const TC_TOKEN_NUM_BUCKETS = 4; // jendela bergulir ~28 hari
3
4
  /** true bila timestamp (detik unix) token sudah di luar jendela ~28 hari WA Web */
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/Utils/use-multi-file-auth-state */
1
2
  import type { AuthenticationState } from '../Types/index.js';
2
3
  /**
3
4
  * stores the full authentication state in a single folder.
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/Utils/use-multi-file-auth-state */
1
2
  import { Mutex } from 'async-mutex';
2
3
  import { mkdir, readFile, stat, unlink, writeFile } from 'fs/promises';
3
4
  import { join } from 'path';
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/Utils/validate-connection */
1
2
  import { proto } from '../../WAProto/index.js';
2
3
  import type { AuthenticationCreds, SignalCreds, SocketConfig } from '../Types/index.js';
3
4
  import { type BinaryNode } from '../WABinary/index.js';
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/Utils/validate-connection */
1
2
  import { Boom } from '@hapi/boom';
2
3
  import { createHash } from 'crypto';
3
4
  import { proto } from '../../WAProto/index.js';
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/VoIP/audio-feeder */
1
2
  export declare class AudioFeeder {
2
3
  #private;
3
4
  private readonly sampleRate;
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/VoIP/audio-feeder */
1
2
  /**
2
3
  * Audio feeder.
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/VoIP/index */
1
2
  // Deklarasi minimal (upstream tidak menyertakan tipe untuk modul ini).
2
3
  import { EventEmitter } from 'events';
3
4
  export { CallState } from './types.js';
package/lib/VoIP/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/VoIP/index */
1
2
  import { EventEmitter } from "node:events";
2
3
  import { randomBytes, createHmac } from "node:crypto";
3
4
 
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/VoIP/relay-transport */
1
2
  type RelayAddress = {
2
3
  protocol: number;
3
4
  ipv4?: string;
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/VoIP/relay-transport */
1
2
  /**
2
3
  * Relay transport.
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/VoIP/signaling */
1
2
  import { decodeBinaryNode } from '../WABinary/decode.js';
2
3
  import { encodeBinaryNode } from '../WABinary/encode.js';
3
4
  import { getBinaryNodeChild, getAllBinaryNodeChildren } from '../WABinary/generic-utils.js';
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/VoIP/types */
1
2
  /**
2
3
  * Shared type definitions for BibzWhats VoIP.
3
4
  *
package/lib/VoIP/types.js CHANGED
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/VoIP/types */
1
2
  /**
2
3
  * Shared type definitions for BibzWhats VoIP.
3
4
  *
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/VoIP/wasm-engine */
1
2
  export type WasmAudioConfig = {
2
3
  sampleRate: number;
3
4
  channels: number;
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/VoIP/wasm-engine */
1
2
  var _a;
2
3
  /**
3
4
  * WhatsApp VoIP WASM engine.
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/VoIP/worker-bootstrap */
1
2
  /**
2
3
  * Worker-thread bootstrap for the WhatsApp WASM VoIP engine.
3
4
  *
@@ -344,7 +345,7 @@ global.importScripts = function (...urls) {
344
345
  for (const url of urls) {
345
346
  try {
346
347
  const code = fs.readFileSync(url, "utf8");
347
- eval(code);
348
+ vm.runInThisContext(code);
348
349
  }
349
350
  catch (e) { }
350
351
  }
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WABinary/constants */
1
2
  export declare const TAGS: {
2
3
  LIST_EMPTY: number;
3
4
  DICTIONARY_0: number;
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WABinary/constants */
1
2
  export const TAGS = {
2
3
  LIST_EMPTY: 0,
3
4
  DICTIONARY_0: 236,
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WABinary/decode */
1
2
  import type { BinaryNode, BinaryNodeCodingOptions } from './types.js';
2
3
  export declare const decompressingIfRequired: (buffer: Buffer) => Promise<Buffer>;
3
4
  export declare const decodeDecompressedBinaryNode: (buffer: Buffer, opts: Pick<BinaryNodeCodingOptions, "DOUBLE_BYTE_TOKENS" | "SINGLE_BYTE_TOKENS" | "TAGS">, indexRef?: {
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WABinary/decode */
1
2
  import { promisify } from 'util';
2
3
  import { inflate } from 'zlib';
3
4
  import * as constants from './constants.js';
@@ -1,2 +1,3 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WABinary/encode */
1
2
  import type { BinaryNode, BinaryNodeCodingOptions } from './types.js';
2
3
  export declare const encodeBinaryNode: (node: BinaryNode, opts?: Pick<BinaryNodeCodingOptions, "TAGS" | "TOKEN_MAP">, buffer?: number[]) => Buffer;
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WABinary/encode */
1
2
  import * as constants from './constants.js';
2
3
  import { jidDecode } from './jid-utils.js';
3
4
  export const encodeBinaryNode = (node, opts = constants, buffer = [0]) => {
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WABinary/generic-utils */
1
2
  import { proto } from '../../WAProto/index.js';
2
3
  import { type BinaryNode } from './types.js';
3
4
  export declare const getBinaryNodeChildren: (node: BinaryNode | undefined, childTag: string) => BinaryNode[];
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WABinary/generic-utils */
1
2
  import { Boom } from '@hapi/boom';
2
3
  import { proto } from '../../WAProto/index.js';
3
4
  import { unixTimestampSeconds } from '../Utils/generics.js';
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WABinary/index */
1
2
  export * from './encode.js';
2
3
  export * from './decode.js';
3
4
  export * from './generic-utils.js';
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WABinary/index */
1
2
  export * from './encode.js';
2
3
  export * from './decode.js';
3
4
  export * from './generic-utils.js';
@@ -1,3 +1,4 @@
1
+ /** @module @xbibzlibrary/whatsbibz/lib/WABinary/jid-utils */
1
2
  export declare const S_WHATSAPP_NET = "@s.whatsapp.net";
2
3
  export declare const OFFICIAL_BIZ_JID = "16505361212@c.us";
3
4
  export declare const SERVER_JID = "server@c.us";
@@ -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.4.0",
3
+ "version": "1.4.4",
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,20 +80,20 @@
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",
80
- "@types/ws": "^8.18.1",
83
+ "@cacheable/node-cache": "^1.7.6",
84
+ "@hapi/boom": "^9.1.4",
85
+ "@types/ws": "^8.18.2",
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
- "lru-cache": "^11.1.0",
86
- "music-metadata": "^11.12.3",
87
- "p-queue": "^9.0.0",
88
- "pino": "^9.6",
89
- "protobufjs": "^7.5.6",
90
+ "lru-cache": "^11.5.3",
91
+ "music-metadata": "^11.16.1",
92
+ "p-queue": "^9.3.5",
93
+ "pino": "^9.14.0",
94
+ "protobufjs": "^7.6.6",
90
95
  "whatsapp-rust-bridge": "0.5.5",
91
- "ws": "^8.13.0"
96
+ "ws": "^8.22.0"
92
97
  },
93
98
  "peerDependencies": {
94
99
  "@roamhq/wrtc": "*",
@@ -119,7 +124,21 @@
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": "^7.3.7",
141
+ "launch-editor": "^2.14.2",
142
+ "esbuild": "^0.25.0"
124
143
  }
125
144
  }
@@ -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