@awangxcode/qiro-baileys 7.1.1 → 7.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/README.md +292 -110
  2. package/lib/Defaults/index.d.ts +8 -8
  3. package/lib/Defaults/index.d.ts.map +1 -1
  4. package/lib/Defaults/index.js +3 -3
  5. package/lib/Extensions/advanced.d.ts +1 -1
  6. package/lib/Extensions/experimental.d.ts +4 -4
  7. package/lib/Extensions/experimental.d.ts.map +1 -1
  8. package/lib/MessageBuilder/index.d.ts +5 -5
  9. package/lib/MessageBuilder/index.js +2 -2
  10. package/lib/Signal/Group/group-session-builder.d.ts +3 -3
  11. package/lib/Signal/Group/group-session-builder.js +4 -4
  12. package/lib/Signal/Group/group_cipher.d.ts +2 -2
  13. package/lib/Signal/Group/group_cipher.js +4 -4
  14. package/lib/Signal/Group/index.d.ts +11 -11
  15. package/lib/Signal/Group/index.js +11 -11
  16. package/lib/Signal/Group/sender-chain-key.d.ts +1 -1
  17. package/lib/Signal/Group/sender-chain-key.js +1 -1
  18. package/lib/Signal/Group/sender-key-distribution-message.d.ts +1 -1
  19. package/lib/Signal/Group/sender-key-distribution-message.js +1 -1
  20. package/lib/Signal/Group/sender-key-message.d.ts +1 -1
  21. package/lib/Signal/Group/sender-key-message.js +1 -1
  22. package/lib/Signal/Group/sender-key-record.d.ts +1 -1
  23. package/lib/Signal/Group/sender-key-record.js +2 -2
  24. package/lib/Signal/Group/sender-key-state.d.ts +2 -2
  25. package/lib/Signal/Group/sender-key-state.js +2 -2
  26. package/lib/Signal/libsignal.d.ts +3 -3
  27. package/lib/Signal/libsignal.js +6 -6
  28. package/lib/Signal/lid-mapping.d.ts +2 -2
  29. package/lib/Signal/lid-mapping.js +1 -1
  30. package/lib/Socket/Client/index.d.ts +2 -2
  31. package/lib/Socket/Client/index.js +2 -2
  32. package/lib/Socket/Client/types.d.ts +1 -1
  33. package/lib/Socket/Client/websocket.d.ts +1 -1
  34. package/lib/Socket/Client/websocket.js +2 -2
  35. package/lib/Socket/business.d.ts +79 -79
  36. package/lib/Socket/business.d.ts.map +1 -1
  37. package/lib/Socket/business.js +5 -5
  38. package/lib/Socket/chats.d.ts +16 -16
  39. package/lib/Socket/chats.d.ts.map +1 -1
  40. package/lib/Socket/chats.js +9 -9
  41. package/lib/Socket/communities.d.ts +59 -59
  42. package/lib/Socket/communities.d.ts.map +1 -1
  43. package/lib/Socket/communities.js +5 -5
  44. package/lib/Socket/groups.d.ts +28 -28
  45. package/lib/Socket/groups.d.ts.map +1 -1
  46. package/lib/Socket/groups.js +4 -4
  47. package/lib/Socket/index.d.ts +99 -99
  48. package/lib/Socket/index.d.ts.map +1 -1
  49. package/lib/Socket/index.js +4 -4
  50. package/lib/Socket/messages-recv.d.ts +42 -43
  51. package/lib/Socket/messages-recv.d.ts.map +1 -1
  52. package/lib/Socket/messages-recv.js +10 -10
  53. package/lib/Socket/messages-send.d.ts +45 -46
  54. package/lib/Socket/messages-send.d.ts.map +1 -1
  55. package/lib/Socket/messages-send.js +9 -9
  56. package/lib/Socket/mex.d.ts +1 -1
  57. package/lib/Socket/mex.js +1 -1
  58. package/lib/Socket/newsletter.d.ts +34 -34
  59. package/lib/Socket/newsletter.d.ts.map +1 -1
  60. package/lib/Socket/newsletter.js +5 -5
  61. package/lib/Socket/socket.d.ts +11 -11
  62. package/lib/Socket/socket.js +7 -7
  63. package/lib/Types/Auth.d.ts +2 -2
  64. package/lib/Types/Chat.d.ts +6 -6
  65. package/lib/Types/Events.d.ts +9 -9
  66. package/lib/Types/GroupMetadata.d.ts +2 -2
  67. package/lib/Types/Message.d.ts +5 -5
  68. package/lib/Types/Product.d.ts +1 -1
  69. package/lib/Types/Signal.d.ts +1 -1
  70. package/lib/Types/Socket.d.ts +5 -5
  71. package/lib/Types/Socket.js +1 -1
  72. package/lib/Types/State.d.ts +1 -1
  73. package/lib/Types/USync.d.ts +2 -2
  74. package/lib/Types/USync.js +1 -1
  75. package/lib/Types/index.d.ts +14 -14
  76. package/lib/Types/index.js +12 -12
  77. package/lib/Utils/auth-utils.d.ts +2 -2
  78. package/lib/Utils/auth-utils.js +4 -4
  79. package/lib/Utils/browser-utils.d.ts +1 -1
  80. package/lib/Utils/business.d.ts +3 -3
  81. package/lib/Utils/business.js +3 -3
  82. package/lib/Utils/chat-utils.d.ts +7 -7
  83. package/lib/Utils/chat-utils.d.ts.map +1 -1
  84. package/lib/Utils/chat-utils.js +7 -7
  85. package/lib/Utils/companion-reg-client-utils.d.ts +3 -3
  86. package/lib/Utils/companion-reg-client-utils.js +1 -1
  87. package/lib/Utils/crypto.d.ts +15 -15
  88. package/lib/Utils/crypto.d.ts.map +1 -1
  89. package/lib/Utils/crypto.js +1 -1
  90. package/lib/Utils/decode-wa-message.d.ts +4 -4
  91. package/lib/Utils/decode-wa-message.js +2 -2
  92. package/lib/Utils/event-buffer.d.ts +2 -2
  93. package/lib/Utils/event-buffer.js +4 -4
  94. package/lib/Utils/generics.d.ts +5 -5
  95. package/lib/Utils/generics.d.ts.map +1 -1
  96. package/lib/Utils/generics.js +3 -3
  97. package/lib/Utils/history.d.ts +1 -1
  98. package/lib/Utils/history.js +5 -5
  99. package/lib/Utils/identity-change-handler.d.ts +2 -2
  100. package/lib/Utils/identity-change-handler.js +2 -2
  101. package/lib/Utils/index.d.ts +21 -21
  102. package/lib/Utils/index.js +21 -21
  103. package/lib/Utils/link-preview.d.ts +2 -2
  104. package/lib/Utils/link-preview.js +2 -2
  105. package/lib/Utils/logger.d.ts +1 -1
  106. package/lib/Utils/lt-hash.d.ts +1 -2
  107. package/lib/Utils/lt-hash.d.ts.map +1 -1
  108. package/lib/Utils/message-retry-manager.d.ts +1 -1
  109. package/lib/Utils/messages-media.d.ts +25 -25
  110. package/lib/Utils/messages-media.d.ts.map +1 -1
  111. package/lib/Utils/messages-media.js +4 -4
  112. package/lib/Utils/messages.d.ts +11 -12
  113. package/lib/Utils/messages.d.ts.map +1 -1
  114. package/lib/Utils/messages.js +7 -7
  115. package/lib/Utils/newsletter-auto-follow.d.ts.map +1 -1
  116. package/lib/Utils/newsletter-auto-follow.js +3 -3
  117. package/lib/Utils/newsletter-auto-follow.js.map +1 -1
  118. package/lib/Utils/noise-handler.d.ts +4 -4
  119. package/lib/Utils/noise-handler.js +3 -3
  120. package/lib/Utils/offline-node-processor.d.ts +1 -1
  121. package/lib/Utils/pre-key-manager.d.ts +2 -2
  122. package/lib/Utils/process-message.d.ts +2 -2
  123. package/lib/Utils/process-message.js +7 -7
  124. package/lib/Utils/reporting-utils.d.ts +2 -2
  125. package/lib/Utils/reporting-utils.js +1 -1
  126. package/lib/Utils/self-updater.d.ts +0 -1
  127. package/lib/Utils/self-updater.js +0 -1
  128. package/lib/Utils/signal.d.ts +7 -7
  129. package/lib/Utils/signal.js +4 -4
  130. package/lib/Utils/stanza-ack.d.ts +1 -1
  131. package/lib/Utils/sync-action-utils.d.ts +2 -2
  132. package/lib/Utils/sync-action-utils.js +1 -1
  133. package/lib/Utils/tc-token-utils.d.ts +2 -2
  134. package/lib/Utils/tc-token-utils.js +1 -1
  135. package/lib/Utils/use-multi-file-auth-state.d.ts +1 -1
  136. package/lib/Utils/use-multi-file-auth-state.js +2 -2
  137. package/lib/Utils/validate-connection.d.ts +3 -3
  138. package/lib/Utils/validate-connection.d.ts.map +1 -1
  139. package/lib/Utils/validate-connection.js +5 -5
  140. package/lib/WABinary/decode.d.ts +2 -2
  141. package/lib/WABinary/decode.d.ts.map +1 -1
  142. package/lib/WABinary/decode.js +2 -2
  143. package/lib/WABinary/encode.d.ts +1 -1
  144. package/lib/WABinary/encode.js +2 -2
  145. package/lib/WABinary/generic-utils.d.ts +3 -3
  146. package/lib/WABinary/generic-utils.d.ts.map +1 -1
  147. package/lib/WABinary/generic-utils.js +1 -1
  148. package/lib/WABinary/index.d.ts +5 -5
  149. package/lib/WABinary/index.js +5 -5
  150. package/lib/WABinary/types.d.ts +1 -1
  151. package/lib/WABinary/types.js +1 -1
  152. package/lib/WAM/BinaryInfo.d.ts +1 -1
  153. package/lib/WAM/encode.d.ts +2 -2
  154. package/lib/WAM/encode.d.ts.map +1 -1
  155. package/lib/WAM/encode.js +2 -2
  156. package/lib/WAM/index.d.ts +3 -3
  157. package/lib/WAM/index.js +3 -3
  158. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +3 -3
  159. package/lib/WAUSync/Protocols/USyncContactProtocol.js +2 -2
  160. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +2 -2
  161. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +1 -1
  162. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +2 -2
  163. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +1 -1
  164. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +2 -2
  165. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +1 -1
  166. package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +3 -3
  167. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +2 -2
  168. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +3 -3
  169. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +2 -2
  170. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +3 -3
  171. package/lib/WAUSync/Protocols/index.d.ts +5 -5
  172. package/lib/WAUSync/Protocols/index.js +5 -5
  173. package/lib/WAUSync/USyncQuery.d.ts +3 -3
  174. package/lib/WAUSync/USyncQuery.js +5 -5
  175. package/lib/WAUSync/index.d.ts +3 -3
  176. package/lib/WAUSync/index.js +3 -3
  177. package/lib/index.d.ts +10 -10
  178. package/lib/index.d.ts.map +1 -1
  179. package/lib/index.js +13 -13
  180. package/lib/index.js.map +1 -1
  181. package/package.json +1 -1
  182. package/lib/Utils/self-updater.d.ts.map +0 -1
  183. package/lib/Utils/self-updater.js.map +0 -1
@@ -1,13 +1,13 @@
1
1
  import { Boom } from '@hapi/boom';
2
2
  import { expandAppStateKeys } from 'whatsapp-rust-bridge';
3
3
  import { proto } from '../../WAProto/index.js';
4
- import { LabelAssociationType } from '../Types/LabelAssociation.js';
5
- import { getBinaryNodeChild, getBinaryNodeChildren, isJidGroup, jidNormalizedUser } from '../WABinary/index.js';
6
- import { aesDecrypt, aesEncrypt, hmacSign } from './crypto.js';
7
- import { toNumber } from './generics.js';
8
- import { LT_HASH_ANTI_TAMPERING } from './lt-hash.js';
9
- import { downloadContentFromMessage } from './messages-media.js';
10
- import { emitSyncActionResults, processContactAction } from './sync-action-utils.js';
4
+ import { LabelAssociationType } from '../Types/LabelAssociation';
5
+ import { getBinaryNodeChild, getBinaryNodeChildren, isJidGroup, jidNormalizedUser } from '../WABinary';
6
+ import { aesDecrypt, aesEncrypt, hmacSign } from './crypto';
7
+ import { toNumber } from './generics';
8
+ import { LT_HASH_ANTI_TAMPERING } from './lt-hash';
9
+ import { downloadContentFromMessage } from './messages-media';
10
+ import { emitSyncActionResults, processContactAction } from './sync-action-utils';
11
11
  const mutationKeys = (keydata) => {
12
12
  const keys = expandAppStateKeys(keydata);
13
13
  return {
@@ -1,6 +1,6 @@
1
- import type { AuthenticationCreds, WABrowserDescription } from '../Types/index.js';
2
- import type { BinaryNode } from '../WABinary/index.js';
3
- import type { ILogger } from './logger.js';
1
+ import type { AuthenticationCreds, WABrowserDescription } from '../Types';
2
+ import type { BinaryNode } from '../WABinary';
3
+ import type { ILogger } from './logger';
4
4
  export declare enum CompanionWebClientType {
5
5
  UNKNOWN = 0,
6
6
  CHROME = 1,
@@ -1,5 +1,5 @@
1
1
  import { randomBytes } from 'crypto';
2
- import { getBinaryNodeChild } from '../WABinary/index.js';
2
+ import { getBinaryNodeChild } from '../WABinary';
3
3
  export var CompanionWebClientType;
4
4
  (function (CompanionWebClientType) {
5
5
  CompanionWebClientType[CompanionWebClientType["UNKNOWN"] = 0] = "UNKNOWN";
@@ -1,37 +1,37 @@
1
- import type { KeyPair } from '../Types/index.js';
1
+ import type { KeyPair } from '../Types';
2
2
  export { md5, hkdf } from 'whatsapp-rust-bridge';
3
3
  /** prefix version byte to the pub keys, required for some curve crypto functions */
4
- export declare const generateSignalPubKey: (pubKey: Uint8Array | Buffer) => Uint8Array<ArrayBufferLike> | Buffer<ArrayBufferLike>;
4
+ export declare const generateSignalPubKey: (pubKey: Uint8Array | Buffer) => any;
5
5
  export declare const Curve: {
6
6
  generateKeyPair: () => KeyPair;
7
- sharedKey: (privateKey: Uint8Array, publicKey: Uint8Array) => Buffer<ArrayBuffer>;
8
- sign: (privateKey: Uint8Array, buf: Uint8Array) => Uint8Array<ArrayBufferLike>;
7
+ sharedKey: (privateKey: Uint8Array, publicKey: Uint8Array) => any;
8
+ sign: (privateKey: Uint8Array, buf: Uint8Array) => any;
9
9
  verify: (pubKey: Uint8Array, message: Uint8Array, signature: Uint8Array) => boolean;
10
10
  };
11
11
  export declare const signedKeyPair: (identityKeyPair: KeyPair, keyId: number) => {
12
12
  keyPair: KeyPair;
13
- signature: Uint8Array<ArrayBufferLike>;
13
+ signature: any;
14
14
  keyId: number;
15
15
  };
16
16
  /**
17
17
  * encrypt AES 256 GCM;
18
18
  * where the tag tag is suffixed to the ciphertext
19
19
  * */
20
- export declare function aesEncryptGCM(plaintext: Uint8Array, key: Uint8Array, iv: Uint8Array, additionalData: Uint8Array): Buffer<ArrayBuffer>;
20
+ export declare function aesEncryptGCM(plaintext: Uint8Array, key: Uint8Array, iv: Uint8Array, additionalData: Uint8Array): any;
21
21
  /**
22
22
  * decrypt AES 256 GCM;
23
23
  * where the auth tag is suffixed to the ciphertext
24
24
  * */
25
- export declare function aesDecryptGCM(ciphertext: Uint8Array, key: Uint8Array, iv: Uint8Array, additionalData: Uint8Array): Buffer<ArrayBuffer>;
26
- export declare function aesEncryptCTR(plaintext: Uint8Array, key: Uint8Array, iv: Uint8Array): Buffer<ArrayBuffer>;
27
- export declare function aesDecryptCTR(ciphertext: Uint8Array, key: Uint8Array, iv: Uint8Array): Buffer<ArrayBuffer>;
25
+ export declare function aesDecryptGCM(ciphertext: Uint8Array, key: Uint8Array, iv: Uint8Array, additionalData: Uint8Array): any;
26
+ export declare function aesEncryptCTR(plaintext: Uint8Array, key: Uint8Array, iv: Uint8Array): any;
27
+ export declare function aesDecryptCTR(ciphertext: Uint8Array, key: Uint8Array, iv: Uint8Array): any;
28
28
  /** decrypt AES 256 CBC; where the IV is prefixed to the buffer */
29
- export declare function aesDecrypt(buffer: Uint8Array, key: Uint8Array): Buffer<ArrayBuffer>;
29
+ export declare function aesDecrypt(buffer: Uint8Array, key: Uint8Array): any;
30
30
  /** decrypt AES 256 CBC */
31
- export declare function aesDecryptWithIV(buffer: Uint8Array, key: Uint8Array, IV: Uint8Array): Buffer<ArrayBuffer>;
32
- export declare function aesEncrypt(buffer: Uint8Array, key: Uint8Array): Buffer<ArrayBuffer>;
33
- export declare function aesEncrypWithIV(buffer: Buffer, key: Buffer, IV: Buffer): Buffer<ArrayBuffer>;
34
- export declare function hmacSign(buffer: Buffer | Uint8Array, key: Buffer | Uint8Array, variant?: 'sha256' | 'sha512'): Buffer<ArrayBufferLike>;
35
- export declare function sha256(buffer: Buffer): Buffer<ArrayBufferLike>;
31
+ export declare function aesDecryptWithIV(buffer: Uint8Array, key: Uint8Array, IV: Uint8Array): any;
32
+ export declare function aesEncrypt(buffer: Uint8Array, key: Uint8Array): any;
33
+ export declare function aesEncrypWithIV(buffer: Buffer, key: Buffer, IV: Buffer): any;
34
+ export declare function hmacSign(buffer: Buffer | Uint8Array, key: Buffer | Uint8Array, variant?: 'sha256' | 'sha512'): any;
35
+ export declare function sha256(buffer: Buffer): any;
36
36
  export declare function derivePairingCodeKey(pairingCode: string, salt: Buffer): Promise<Buffer>;
37
37
  //# sourceMappingURL=crypto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../../src/Utils/crypto.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,U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EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,OAGpF;AAED,kEAAkE;AAClE,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,OAE7D;AAED,0BAA0B;AAC1B,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,OAGnF;AAGD,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,OAI7D;AAGD,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,OAGtE;AAGD,wBAAgB,QAAQ,CACvB,MAAM,EAAE,MAAM,GAAG,UAAU,EAC3B,GAAG,EAAE,MAAM,GAAG,UAAU,EACxB,OAAO,GAAE,QAAQ,GAAG,QAAmB,OAGvC;AAED,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,OAEpC;AAED,wBAAsB,oBAAoB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAyB7F"}
@@ -1,6 +1,6 @@
1
1
  import { createCipheriv, createDecipheriv, createHash, createHmac, randomBytes } from 'crypto';
2
2
  import * as curve from 'libsignal/src/curve.js';
3
- import { KEY_BUNDLE_TYPE } from '../Defaults/index.js';
3
+ import { KEY_BUNDLE_TYPE } from '../Defaults';
4
4
  export { md5, hkdf } from 'whatsapp-rust-bridge';
5
5
  // insure browser & node compatibility
6
6
  const { subtle } = globalThis.crypto;
@@ -1,7 +1,7 @@
1
- import type { WAMessage } from '../Types/index.js';
2
- import type { SignalRepositoryWithLIDStore } from '../Types/Signal.js';
3
- import { type BinaryNode } from '../WABinary/index.js';
4
- import type { ILogger } from './logger.js';
1
+ import type { WAMessage } from '../Types';
2
+ import type { SignalRepositoryWithLIDStore } from '../Types/Signal';
3
+ import { type BinaryNode } from '../WABinary';
4
+ import type { ILogger } from './logger';
5
5
  export declare const getDecryptionJid: (sender: string, repository: SignalRepositoryWithLIDStore) => Promise<string>;
6
6
  export declare const extractNewsletterMessageMeta: (stanza: BinaryNode) => {
7
7
  adminProfile?: {
@@ -2,8 +2,8 @@ import { Boom } from '@hapi/boom';
2
2
  import { proto } from '../../WAProto/index.js';
3
3
  import { areJidsSameUser, isHostedLidUser, isHostedPnUser, isJidBroadcast, isJidGroup, isJidMetaAI, isJidNewsletter, isJidStatusBroadcast, isLidUser, isPnUser
4
4
  // transferDevice
5
- } from '../WABinary/index.js';
6
- import { unpadRandomMax16 } from './generics.js';
5
+ } from '../WABinary';
6
+ import { unpadRandomMax16 } from './generics';
7
7
  export const getDecryptionJid = async (sender, repository) => {
8
8
  if (isLidUser(sender) || isHostedLidUser(sender)) {
9
9
  return sender;
@@ -1,5 +1,5 @@
1
- import type { BaileysEventEmitter, BaileysEventMap } from '../Types/index.js';
2
- import type { ILogger } from './logger.js';
1
+ import type { BaileysEventEmitter, BaileysEventMap } from '../Types';
2
+ import type { ILogger } from './logger';
3
3
  /**
4
4
  * A map that contains a list of all events that have been triggered
5
5
  *
@@ -1,8 +1,8 @@
1
1
  import EventEmitter from 'events';
2
- import { WAMessageStatus } from '../Types/index.js';
3
- import { trimUndefined } from './generics.js';
4
- import { updateMessageWithReaction, updateMessageWithReceipt } from './messages.js';
5
- import { isRealMessage, shouldIncrementChatUnread } from './process-message.js';
2
+ import { WAMessageStatus } from '../Types';
3
+ import { trimUndefined } from './generics';
4
+ import { updateMessageWithReaction, updateMessageWithReceipt } from './messages';
5
+ import { isRealMessage, shouldIncrementChatUnread } from './process-message';
6
6
  const BUFFERABLE_EVENT = [
7
7
  'messaging-history.set',
8
8
  'chats.upsert',
@@ -1,17 +1,17 @@
1
1
  import type Long from 'long';
2
2
  import { proto } from '../../WAProto/index.js';
3
- import type { BaileysEventEmitter, BaileysEventMap, ConnectionState, WACallUpdateType, WAMessageKey, WAVersion } from '../Types/index.js';
4
- import { type BinaryNode } from '../WABinary/index.js';
3
+ import type { BaileysEventEmitter, BaileysEventMap, ConnectionState, WACallUpdateType, WAMessageKey, WAVersion } from '../Types';
4
+ import { type BinaryNode } from '../WABinary';
5
5
  export declare const BufferJSON: {
6
6
  replacer: (k: any, value: any) => any;
7
7
  reviver: (_: any, value: any) => any;
8
8
  };
9
9
  export declare const getKeyAuthor: (key: WAMessageKey | undefined | null, meId?: string) => string;
10
10
  export declare const isStringNullOrEmpty: (value: string | null | undefined) => value is null | undefined | "";
11
- export declare const writeRandomPadMax16: (msg: Uint8Array) => Buffer<ArrayBuffer>;
12
- export declare const unpadRandomMax16: (e: Uint8Array | Buffer) => Uint8Array<ArrayBuffer>;
11
+ export declare const writeRandomPadMax16: (msg: Uint8Array) => any;
12
+ export declare const unpadRandomMax16: (e: Uint8Array | Buffer) => Uint8Array<any>;
13
13
  export declare const generateParticipantHashV2: (participants: string[]) => string;
14
- export declare const encodeWAMessage: (message: proto.IMessage) => Buffer<ArrayBuffer>;
14
+ export declare const encodeWAMessage: (message: proto.IMessage) => any;
15
15
  export declare const generateRegistrationId: () => number;
16
16
  export declare const encodeBigEndian: (e: number, t?: number) => Uint8Array<ArrayBuffer>;
17
17
  export declare const toNumber: (t: Long | number | null | undefined) => number;
@@ -1 +1 @@
1
- {"version":3,"file":"generics.d.ts","sourceRoot":"","sources":["../../src/Utils/generics.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAE9C,OAAO,KAAK,EACX,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,SAAS,EACT,MAAM,UAAU,CAAA;AAEjB,OAAO,EAAE,KAAK,UAAU,EAAuC,MAAM,aAAa,CAAA;AAGlF,eAAO,MAAM,UAAU;kBAER,GAAG,SAAS,GAAG;iBAShB,GAAG,SAAS,GAAG;CAiB5B,CAAA;AA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GT,SAAS;;;EAKtC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,uBAAuB,GAAU,UAAS,WAAgB;aAuC7B,SAAS;;;;aAKrB,SAAS;;;EAKtC,CAAA;AAED,+CAA+C;AAC/C,eAAO,MAAM,mBAAmB,cAG/B,CAAA;AAQD;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GAAI,MAAM,MAAM,GAAG,SAAS,4CAOhE,CAAA;AAMD;;;GAGG;AACH,eAAO,MAAM,2BAA2B,GAAI,MAAM,UAAU;;;CAa3D,CAAA;AAED,eAAO,MAAM,qBAAqB,GAAI,gBAAgB,UAAU,qBAqC/D,CAAA;AAID,eAAO,MAAM,kBAAkB,GAAI,OAAO,KAAK,WAiB9C,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,UAAU,MAAM,gCAEpD,CAAA;AAGD,wBAAgB,aAAa,CAAC,GAAG,EAAE;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE;;EAQtD;AAID,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAoBvD;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,GAAG,UAAU,CAE3E"}
@@ -2,9 +2,9 @@ import { Boom } from '@hapi/boom';
2
2
  import { createHash, randomBytes } from 'crypto';
3
3
  import { proto } from '../../WAProto/index.js';
4
4
  const baileysVersion = [2, 3000, 1043857760];
5
- import { DisconnectReason } from '../Types/index.js';
6
- import { getAllBinaryNodeChildren, jidDecode } from '../WABinary/index.js';
7
- import { sha256 } from './crypto.js';
5
+ import { DisconnectReason } from '../Types';
6
+ import { getAllBinaryNodeChildren, jidDecode } from '../WABinary';
7
+ import { sha256 } from './crypto';
8
8
  export const BufferJSON = {
9
9
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10
10
  replacer: (k, value) => {
@@ -1,5 +1,5 @@
1
1
  import { proto } from '../../WAProto/index.js';
2
- import type { Chat, Contact, LIDMapping, WAMessage } from '../Types/index.js';
2
+ import type { Chat, Contact, LIDMapping, WAMessage } from '../Types';
3
3
  import type { ILogger } from './logger.js';
4
4
  export declare const downloadHistory: (msg: proto.Message.IHistorySyncNotification, options: RequestInit) => Promise<proto.HistorySync>;
5
5
  export declare const processHistoryMessage: (item: proto.IHistorySync, logger?: ILogger) => {
@@ -2,11 +2,11 @@ import { pipeline } from 'stream/promises';
2
2
  import { promisify } from 'util';
3
3
  import { createInflate, inflate } from 'zlib';
4
4
  import { proto } from '../../WAProto/index.js';
5
- import { WAMessageStubType } from '../Types/index.js';
6
- import { isHostedLidUser, isHostedPnUser, isLidUser, isPnUser } from '../WABinary/index.js';
7
- import { toNumber } from './generics.js';
8
- import { normalizeMessageContent } from './messages.js';
9
- import { downloadContentFromMessage } from './messages-media.js';
5
+ import { WAMessageStubType } from '../Types';
6
+ import { isHostedLidUser, isHostedPnUser, isLidUser, isPnUser } from '../WABinary';
7
+ import { toNumber } from './generics';
8
+ import { normalizeMessageContent } from './messages';
9
+ import { downloadContentFromMessage } from './messages-media';
10
10
  const inflatePromise = promisify(inflate);
11
11
  const extractPnFromMessages = (messages) => {
12
12
  for (const msgItem of messages) {
@@ -1,6 +1,6 @@
1
1
  import NodeCache from '@cacheable/node-cache';
2
- import { type BinaryNode } from '../WABinary/index.js';
3
- import type { ILogger } from './logger.js';
2
+ import { type BinaryNode } from '../WABinary';
3
+ import type { ILogger } from './logger';
4
4
  export type IdentityChangeResult = {
5
5
  action: 'no_identity_node';
6
6
  } | {
@@ -1,6 +1,6 @@
1
1
  import NodeCache from '@cacheable/node-cache';
2
- import { areJidsSameUser, getBinaryNodeChild, jidDecode } from '../WABinary/index.js';
3
- import { isStringNullOrEmpty } from './generics.js';
2
+ import { areJidsSameUser, getBinaryNodeChild, jidDecode } from '../WABinary';
3
+ import { isStringNullOrEmpty } from './generics';
4
4
  export async function handleIdentityChange(node, ctx) {
5
5
  const from = node.attrs.from;
6
6
  if (!from) {
@@ -1,24 +1,24 @@
1
- export * from './generics.js';
2
- export * from './decode-wa-message.js';
3
- export * from './messages.js';
4
- export * from './messages-media.js';
5
- export * from './validate-connection.js';
6
- export * from './crypto.js';
7
- export * from './signal.js';
8
- export * from './noise-handler.js';
9
- export * from './history.js';
10
- export * from './chat-utils.js';
11
- export * from './lt-hash.js';
12
- export * from './auth-utils.js';
13
- export * from './use-multi-file-auth-state.js';
14
- export * from './link-preview.js';
15
- export * from './event-buffer.js';
16
- export * from './process-message.js';
17
- export * from './message-retry-manager.js';
18
- export * from './browser-utils.js';
19
- export * from './companion-reg-client-utils.js';
20
- export * from './identity-change-handler.js';
21
- export * from './stanza-ack.js';
1
+ export * from './generics';
2
+ export * from './decode-wa-message';
3
+ export * from './messages';
4
+ export * from './messages-media';
5
+ export * from './validate-connection';
6
+ export * from './crypto';
7
+ export * from './signal';
8
+ export * from './noise-handler';
9
+ export * from './history';
10
+ export * from './chat-utils';
11
+ export * from './lt-hash';
12
+ export * from './auth-utils';
13
+ export * from './use-multi-file-auth-state';
14
+ export * from './link-preview';
15
+ export * from './event-buffer';
16
+ export * from './process-message';
17
+ export * from './message-retry-manager';
18
+ export * from './browser-utils';
19
+ export * from './companion-reg-client-utils';
20
+ export * from './identity-change-handler';
21
+ export * from './stanza-ack';
22
22
  export * as audioSticker from './audio-sticker.js';
23
23
  export * as authStore from './auth-store.js';
24
24
  export * as chatTheme from './chat-theme.js';
@@ -1,24 +1,24 @@
1
- export * from './generics.js';
2
- export * from './decode-wa-message.js';
3
- export * from './messages.js';
4
- export * from './messages-media.js';
5
- export * from './validate-connection.js';
6
- export * from './crypto.js';
7
- export * from './signal.js';
8
- export * from './noise-handler.js';
9
- export * from './history.js';
10
- export * from './chat-utils.js';
11
- export * from './lt-hash.js';
12
- export * from './auth-utils.js';
13
- export * from './use-multi-file-auth-state.js';
14
- export * from './link-preview.js';
15
- export * from './event-buffer.js';
16
- export * from './process-message.js';
17
- export * from './message-retry-manager.js';
18
- export * from './browser-utils.js';
19
- export * from './companion-reg-client-utils.js';
20
- export * from './identity-change-handler.js';
21
- export * from './stanza-ack.js';
1
+ export * from './generics';
2
+ export * from './decode-wa-message';
3
+ export * from './messages';
4
+ export * from './messages-media';
5
+ export * from './validate-connection';
6
+ export * from './crypto';
7
+ export * from './signal';
8
+ export * from './noise-handler';
9
+ export * from './history';
10
+ export * from './chat-utils';
11
+ export * from './lt-hash';
12
+ export * from './auth-utils';
13
+ export * from './use-multi-file-auth-state';
14
+ export * from './link-preview';
15
+ export * from './event-buffer';
16
+ export * from './process-message';
17
+ export * from './message-retry-manager';
18
+ export * from './browser-utils';
19
+ export * from './companion-reg-client-utils';
20
+ export * from './identity-change-handler';
21
+ export * from './stanza-ack';
22
22
  // QIRO modern extension utilities are exported as namespaces to avoid
23
23
  // colliding with the pre-existing QIRO Extension and MessageBuilder APIs.
24
24
  export * as audioSticker from './audio-sticker.js';
@@ -1,5 +1,5 @@
1
- import type { WAMediaUploadFunction, WAUrlInfo } from '../Types/index.js';
2
- import type { ILogger } from './logger.js';
1
+ import type { WAMediaUploadFunction, WAUrlInfo } from '../Types';
2
+ import type { ILogger } from './logger';
3
3
  export type URLGenerationOptions = {
4
4
  thumbnailWidth: number;
5
5
  fetchOpts: {
@@ -1,5 +1,5 @@
1
- import { prepareWAMessageMedia } from './messages.js';
2
- import { extractImageThumb, getHttpStream } from './messages-media.js';
1
+ import { prepareWAMessageMedia } from './messages';
2
+ import { extractImageThumb, getHttpStream } from './messages-media';
3
3
  const THUMBNAIL_WIDTH_PX = 192;
4
4
  /** Fetches an image and generates a thumbnail for it */
5
5
  const getCompressedJpegThumbnail = async (url, { thumbnailWidth, fetchOpts }) => {
@@ -7,6 +7,6 @@ export interface ILogger {
7
7
  warn(obj: unknown, msg?: string): void;
8
8
  error(obj: unknown, msg?: string): void;
9
9
  }
10
- declare const _default: import("pino").Logger<never, boolean>;
10
+ declare const _default: any;
11
11
  export default _default;
12
12
  //# sourceMappingURL=logger.d.ts.map
@@ -1,8 +1,7 @@
1
- import { LTHashAntiTampering } from 'whatsapp-rust-bridge';
2
1
  /**
3
2
  * LT Hash is a summation based hash algorithm that maintains the integrity of a piece of data
4
3
  * over a series of mutations. You can add/remove mutations and it'll return a hash equal to
5
4
  * if the same series of mutations was made sequentially.
6
5
  */
7
- export declare const LT_HASH_ANTI_TAMPERING: LTHashAntiTampering;
6
+ export declare const LT_HASH_ANTI_TAMPERING: any;
8
7
  //# sourceMappingURL=lt-hash.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lt-hash.d.ts","sourceRoot":"","sources":["../../src/Utils/lt-hash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,qBAA4B,CAAA"}
1
+ {"version":3,"file":"lt-hash.d.ts","sourceRoot":"","sources":["../../src/Utils/lt-hash.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,KAA4B,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import type { proto } from '../../WAProto/index.js';
2
- import type { ILogger } from './logger.js';
2
+ import type { ILogger } from './logger';
3
3
  export interface RecentMessageKey {
4
4
  to: string;
5
5
  id: string;
@@ -1,12 +1,12 @@
1
1
  import { Boom } from '@hapi/boom';
2
2
  import type { Agent } from 'https';
3
- import { Readable, Transform } from 'stream';
3
+ import { Readable } from 'stream';
4
4
  import { URL } from 'url';
5
5
  import { proto } from '../../WAProto/index.js';
6
- import { type MediaType } from '../Defaults/index.js';
7
- import type { DownloadableMessage, MediaConnInfo, MediaDecryptionKeyInfo, SocketConfig, WAMediaUpload, WAMediaUploadFunction, WAMessageContent, WAMessageKey } from '../Types/index.js';
8
- import { type BinaryNode } from '../WABinary/index.js';
9
- import type { ILogger } from './logger.js';
6
+ import { type MediaType } from '../Defaults';
7
+ import type { DownloadableMessage, MediaConnInfo, MediaDecryptionKeyInfo, SocketConfig, WAMediaUpload, WAMediaUploadFunction, WAMessageContent, WAMessageKey } from '../Types';
8
+ import { type BinaryNode } from '../WABinary';
9
+ import type { ILogger } from './logger';
10
10
  export declare const getImageProcessingLibrary: () => Promise<{
11
11
  sharp: any;
12
12
  jimp?: undefined;
@@ -22,8 +22,8 @@ export declare const getImageProcessingLibrary: () => Promise<{
22
22
  }>;
23
23
  export declare const hkdfInfoKey: (type: MediaType) => string;
24
24
  export declare const getRawMediaUploadData: (media: WAMediaUpload, mediaType: MediaType, logger?: ILogger) => Promise<{
25
- filePath: string;
26
- fileSha256: Buffer<ArrayBufferLike>;
25
+ filePath: any;
26
+ fileSha256: any;
27
27
  fileLength: number;
28
28
  }>;
29
29
  /** generates all the keys required to encrypt/decrypt & sign a media message */
@@ -45,7 +45,7 @@ export declare const extractImageThumb: (bufferOrFilePath: Readable | Buffer | s
45
45
  height: any;
46
46
  };
47
47
  } | {
48
- buffer: Buffer<any>;
48
+ buffer: any;
49
49
  original: {
50
50
  width?: undefined;
51
51
  height?: undefined;
@@ -58,30 +58,30 @@ export declare const generateProfilePicture: (mediaUpload: WAMediaUpload, dimens
58
58
  full?: boolean;
59
59
  quality?: number;
60
60
  }) => Promise<{
61
- img: Buffer<ArrayBufferLike>;
61
+ img: Buffer;
62
62
  }>;
63
63
  /** gets the SHA256 of the given media message */
64
- export declare const mediaMessageSHA256B64: (message: WAMessageContent) => string | null | undefined;
65
- export declare function getAudioDuration(buffer: Buffer | string | Readable): Promise<number | undefined>;
64
+ export declare const mediaMessageSHA256B64: (message: WAMessageContent) => any;
65
+ export declare function getAudioDuration(buffer: Buffer | string | Readable): Promise<any>;
66
66
  /**
67
67
  referenced from and modifying https://github.com/wppconnect-team/wa-js/blob/main/src/chat/functions/prepareAudioWaveform.ts
68
68
  */
69
69
  export declare function getAudioWaveform(buffer: Buffer | string | Readable, logger?: ILogger): Promise<Uint8Array<ArrayBuffer> | undefined>;
70
- export declare const toReadable: (buffer: Buffer) => Readable;
71
- export declare const toBuffer: (stream: Readable) => Promise<Buffer<ArrayBuffer>>;
70
+ export declare const toReadable: (buffer: Buffer) => any;
71
+ export declare const toBuffer: (stream: Readable) => Promise<any>;
72
72
  export declare const getStream: (item: WAMediaUpload, opts?: RequestInit & {
73
73
  maxContentLength?: number;
74
74
  }) => Promise<{
75
- readonly stream: Readable;
75
+ readonly stream: any;
76
76
  readonly type: "buffer";
77
77
  } | {
78
- readonly stream: Readable;
78
+ readonly stream: any;
79
79
  readonly type: "readable";
80
80
  } | {
81
- readonly stream: Readable;
81
+ readonly stream: any;
82
82
  readonly type: "remote";
83
83
  } | {
84
- readonly stream: import("fs").ReadStream;
84
+ readonly stream: any;
85
85
  readonly type: "file";
86
86
  }>;
87
87
  /** generates a thumbnail for a given media, if required */
@@ -96,19 +96,19 @@ export declare function generateThumbnail(file: string, mediaType: 'video' | 'im
96
96
  }>;
97
97
  export declare const getHttpStream: (url: string | URL, options?: RequestInit & {
98
98
  isStream?: true;
99
- }) => Promise<Readable>;
99
+ }) => Promise<any>;
100
100
  type EncryptedStreamOptions = {
101
101
  saveOriginalFileIfRequired?: boolean;
102
102
  logger?: ILogger;
103
103
  opts?: RequestInit;
104
104
  };
105
105
  export declare const encryptedStream: (media: WAMediaUpload, mediaType: MediaType, { logger, saveOriginalFileIfRequired, opts }?: EncryptedStreamOptions, hkdfInfo?: string) => Promise<{
106
- mediaKey: Buffer<ArrayBufferLike>;
106
+ mediaKey: any;
107
107
  originalFilePath: string | undefined;
108
- encFilePath: string;
109
- mac: Buffer<ArrayBuffer>;
110
- fileEncSha256: Buffer<ArrayBufferLike>;
111
- fileSha256: Buffer<ArrayBufferLike>;
108
+ encFilePath: any;
109
+ mac: any;
110
+ fileEncSha256: any;
111
+ fileSha256: any;
112
112
  fileLength: number;
113
113
  }>;
114
114
  export declare const DEF_MEDIA_HOST = "mmg.whatsapp.net";
@@ -120,12 +120,12 @@ export type MediaDownloadOptions = {
120
120
  host?: string;
121
121
  };
122
122
  export declare const getUrlFromDirectPath: (directPath: string, host?: string) => string;
123
- export declare const downloadContentFromMessage: ({ mediaKey, directPath, url }: DownloadableMessage, type: MediaType, opts?: MediaDownloadOptions) => Promise<Transform>;
123
+ export declare const downloadContentFromMessage: ({ mediaKey, directPath, url }: DownloadableMessage, type: MediaType, opts?: MediaDownloadOptions) => Promise<any>;
124
124
  /**
125
125
  * Decrypts and downloads an AES256-CBC encrypted file given the keys.
126
126
  * Assumes the SHA256 of the plaintext is appended to the end of the ciphertext
127
127
  * */
128
- export declare const downloadEncryptedContent: (downloadUrl: string, { cipherKey, iv }: MediaDecryptionKeyInfo, { startByte, endByte, options }?: MediaDownloadOptions) => Promise<Transform>;
128
+ export declare const downloadEncryptedContent: (downloadUrl: string, { cipherKey, iv }: MediaDecryptionKeyInfo, { startByte, endByte, options }?: MediaDownloadOptions) => Promise<any>;
129
129
  export declare function extensionForMediaMessage(message: WAMessageContent): string;
130
130
  type MediaUploadResult = {
131
131
  url?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"messages-media.d.ts","sourceRoot":"","sources":["../../src/Utils/messages-media.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAKjC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAIlC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAC5C,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAC9C,OAAO,EAAqF,KAAK,SAAS,EAAE,MAAM,aAAa,CAAA;AAC/H,OAAO,KAAK,EAEX,mBAAmB,EACnB,aAAa,EACb,sBAAsB,EAEtB,YAAY,EAEZ,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,YAAY,EACZ,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,KAAK,UAAU,EAAmE,MAAM,aAAa,CAAA;AAG9G,OAAO,KAAK,EAAE,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AM,0BAA0B,GAAI,MAAM,MAAM,0BACiB,CAAA"}
@@ -8,10 +8,10 @@ import { join } from 'path';
8
8
  import { Readable, Transform } from 'stream';
9
9
  import { URL } from 'url';
10
10
  import { proto } from '../../WAProto/index.js';
11
- import { DEFAULT_ORIGIN, MEDIA_HKDF_KEY_MAPPING, MEDIA_PATH_MAP, NEWSLETTER_MEDIA_PATH_MAP } from '../Defaults/index.js';
12
- import { getBinaryNodeChild, getBinaryNodeChildBuffer, jidNormalizedUser } from '../WABinary/index.js';
13
- import { aesDecryptGCM, aesEncryptGCM, hkdf } from './crypto.js';
14
- import { generateMessageIDV2 } from './generics.js';
11
+ import { DEFAULT_ORIGIN, MEDIA_HKDF_KEY_MAPPING, MEDIA_PATH_MAP, NEWSLETTER_MEDIA_PATH_MAP } from '../Defaults';
12
+ import { getBinaryNodeChild, getBinaryNodeChildBuffer, jidNormalizedUser } from '../WABinary';
13
+ import { aesDecryptGCM, aesEncryptGCM, hkdf } from './crypto';
14
+ import { generateMessageIDV2 } from './generics';
15
15
  const getTmpFilesDirectory = () => tmpdir();
16
16
  export const getImageProcessingLibrary = async () => {
17
17
  const loadOptional = async (name) => {