@vanzxy/baileys 1.3.7 → 1.3.8

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.

Potentially problematic release.


This version of @vanzxy/baileys might be problematic. Click here for more details.

Files changed (122) hide show
  1. package/README.md +1 -1
  2. package/WAProto/index.d.ts +9 -0
  3. package/lib/Defaults/index.d.ts +147 -0
  4. package/lib/Defaults/index.js +2 -2
  5. package/lib/Signal/Group/ciphertext-message.d.ts +9 -0
  6. package/lib/Signal/Group/group-session-builder.d.ts +7 -0
  7. package/lib/Signal/Group/group_cipher.d.ts +10 -0
  8. package/lib/Signal/Group/index.d.ts +11 -0
  9. package/lib/Signal/Group/keyhelper.d.ts +6 -0
  10. package/lib/Signal/Group/sender-chain-key.d.ts +13 -0
  11. package/lib/Signal/Group/sender-key-distribution-message.d.ts +16 -0
  12. package/lib/Signal/Group/sender-key-message.d.ts +18 -0
  13. package/lib/Signal/Group/sender-key-name.d.ts +11 -0
  14. package/lib/Signal/Group/sender-key-record.d.ts +12 -0
  15. package/lib/Signal/Group/sender-key-state.d.ts +16 -0
  16. package/lib/Signal/Group/sender-message-key.d.ts +11 -0
  17. package/lib/Signal/libsignal.d.ts +54 -0
  18. package/lib/Signal/lid-mapping.d.ts +20 -0
  19. package/lib/Socket/Client/index.d.ts +2 -0
  20. package/lib/Socket/Client/types.d.ts +5 -0
  21. package/lib/Socket/Client/websocket.d.ts +12 -0
  22. package/lib/Socket/business.d.ts +395 -0
  23. package/lib/Socket/chats.d.ts +136 -0
  24. package/lib/Socket/communities.d.ts +561 -0
  25. package/lib/Socket/communities.js +4 -2
  26. package/lib/Socket/dugong.d.ts +117 -0
  27. package/lib/Socket/dugong.js +26 -1
  28. package/lib/Socket/groups.d.ts +285 -0
  29. package/lib/Socket/index.d.ts +531 -0
  30. package/lib/Socket/messages-recv.d.ts +333 -0
  31. package/lib/Socket/messages-send.d.ts +329 -0
  32. package/lib/Socket/mex.d.ts +1 -0
  33. package/lib/Socket/newsletter.d.ts +281 -0
  34. package/lib/Socket/newsletter.js +19 -19
  35. package/lib/Socket/socket.d.ts +60 -0
  36. package/lib/Store/index.d.ts +3 -0
  37. package/lib/Store/make-in-memory-store.d.ts +62 -0
  38. package/lib/Store/make-ordered-dictionary.d.ts +12 -0
  39. package/lib/Store/object-repository.d.ts +10 -0
  40. package/lib/Types/Auth.d.ts +117 -0
  41. package/lib/Types/Bussines.d.ts +25 -0
  42. package/lib/Types/Call.d.ts +15 -0
  43. package/lib/Types/Chat.d.ts +124 -0
  44. package/lib/Types/Contact.d.ts +26 -0
  45. package/lib/Types/Events.d.ts +256 -0
  46. package/lib/Types/GroupMetadata.d.ts +71 -0
  47. package/lib/Types/Label.d.ts +2 -0
  48. package/lib/Types/LabelAssociation.d.ts +2 -0
  49. package/lib/Types/Message.d.ts +11 -0
  50. package/lib/Types/Mex.d.ts +2 -0
  51. package/lib/Types/Product.d.ts +79 -0
  52. package/lib/Types/RichType.d.ts +2 -0
  53. package/lib/Types/Signal.d.ts +87 -0
  54. package/lib/Types/Socket.d.ts +136 -0
  55. package/lib/Types/State.d.ts +5 -0
  56. package/lib/Types/USync.d.ts +26 -0
  57. package/lib/Types/index.d.ts +66 -0
  58. package/lib/Utils/auth-utils.d.ts +57 -0
  59. package/lib/Utils/browser-utils.d.ts +8 -0
  60. package/lib/Utils/business.d.ts +49 -0
  61. package/lib/Utils/business.js +2 -1
  62. package/lib/Utils/chat-utils.d.ts +407 -0
  63. package/lib/Utils/chat-utils.js +15 -1
  64. package/lib/Utils/companion-reg-client-utils.d.ts +4 -0
  65. package/lib/Utils/crypto.d.ts +41 -0
  66. package/lib/Utils/decode-wa-message.d.ts +83 -0
  67. package/lib/Utils/decode-wa-message.js +1 -3
  68. package/lib/Utils/event-buffer.d.ts +12 -0
  69. package/lib/Utils/generics.d.ts +63 -0
  70. package/lib/Utils/generics.js +2 -4
  71. package/lib/Utils/history.d.ts +90 -0
  72. package/lib/Utils/identity-change-handler.d.ts +13 -0
  73. package/lib/Utils/index.d.ts +24 -0
  74. package/lib/Utils/link-preview.d.ts +12 -0
  75. package/lib/Utils/logger.d.ts +2 -0
  76. package/lib/Utils/lt-hash.d.ts +12 -0
  77. package/lib/Utils/lt-hash.js +21 -2
  78. package/lib/Utils/make-mutex.d.ts +6 -0
  79. package/lib/Utils/message-retry-manager.d.ts +79 -0
  80. package/lib/Utils/messages-media.d.ts +135 -0
  81. package/lib/Utils/messages.d.ts +44 -0
  82. package/lib/Utils/noise-handler.d.ts +20 -0
  83. package/lib/Utils/offline-node-processor.d.ts +9 -0
  84. package/lib/Utils/pre-key-manager.d.ts +25 -0
  85. package/lib/Utils/process-message.d.ts +82 -0
  86. package/lib/Utils/reporting-utils.d.ts +12 -0
  87. package/lib/Utils/rich-message-utils.d.ts +48 -0
  88. package/lib/Utils/signal.d.ts +82 -0
  89. package/lib/Utils/stanza-ack.d.ts +16 -0
  90. package/lib/Utils/sync-action-utils.d.ts +2 -0
  91. package/lib/Utils/tc-token-utils.d.ts +29 -0
  92. package/lib/Utils/use-multi-file-auth-state.d.ts +10 -0
  93. package/lib/Utils/use-single-file-auth-state.d.ts +10 -0
  94. package/lib/Utils/use-single-file-auth-state.js +6 -1
  95. package/lib/Utils/use-sqlite-auth-state.d.ts +11 -0
  96. package/lib/Utils/use-sqlite-auth-state.js +12 -0
  97. package/lib/Utils/validate-connection.d.ts +42 -0
  98. package/lib/WABinary/constants.d.ts +61 -0
  99. package/lib/WABinary/decode.d.ts +9 -0
  100. package/lib/WABinary/encode.d.ts +2 -0
  101. package/lib/WABinary/generic-utils.d.ts +74 -0
  102. package/lib/WABinary/index.d.ts +5 -0
  103. package/lib/WABinary/jid-utils.d.ts +28 -0
  104. package/lib/WABinary/types.d.ts +19 -0
  105. package/lib/WAM/BinaryInfo.d.ts +7 -0
  106. package/lib/WAM/constants.d.ts +34926 -0
  107. package/lib/WAM/encode.d.ts +1 -0
  108. package/lib/WAM/index.d.ts +3 -0
  109. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +36 -0
  110. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +29 -0
  111. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +12 -0
  112. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +12 -0
  113. package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +9 -0
  114. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +38 -0
  115. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +14 -0
  116. package/lib/WAUSync/Protocols/index.d.ts +7 -0
  117. package/lib/WAUSync/USyncQuery.d.ts +20 -0
  118. package/lib/WAUSync/USyncUser.d.ts +16 -0
  119. package/lib/WAUSync/index.d.ts +3 -0
  120. package/lib/index.d.ts +12 -0
  121. package/package.json +12 -7
  122. package/postinstall-banner.js +23 -0
@@ -0,0 +1 @@
1
+ export function encodeWAM(binaryInfo: any): any;
@@ -0,0 +1,3 @@
1
+ export * from "./constants.js";
2
+ export * from "./encode.js";
3
+ export * from "./BinaryInfo.js";
@@ -0,0 +1,36 @@
1
+ export class USyncContactProtocol {
2
+ name: string;
3
+ getQueryElement(): {
4
+ tag: string;
5
+ attrs: {};
6
+ };
7
+ getUserElement(user: any): {
8
+ tag: string;
9
+ attrs: {
10
+ type?: undefined;
11
+ };
12
+ content: any;
13
+ } | {
14
+ tag: string;
15
+ attrs: {
16
+ lid?: any;
17
+ pin?: any;
18
+ username: any;
19
+ type?: undefined;
20
+ };
21
+ content?: undefined;
22
+ } | {
23
+ tag: string;
24
+ attrs: {
25
+ type: any;
26
+ };
27
+ content?: undefined;
28
+ } | {
29
+ tag: string;
30
+ attrs: {
31
+ type?: undefined;
32
+ };
33
+ content?: undefined;
34
+ };
35
+ parser(node: any): boolean;
36
+ }
@@ -0,0 +1,29 @@
1
+ export class USyncDeviceProtocol {
2
+ name: string;
3
+ getQueryElement(): {
4
+ tag: string;
5
+ attrs: {
6
+ version: string;
7
+ };
8
+ };
9
+ getUserElement(user: any): {
10
+ tag: string;
11
+ attrs: {
12
+ phash: any;
13
+ ts: any;
14
+ expectedTs: any;
15
+ };
16
+ } | null;
17
+ parser(node: any): {
18
+ deviceList: {
19
+ id: number;
20
+ keyIndex: number;
21
+ isHosted: boolean;
22
+ }[];
23
+ keyIndex: {
24
+ timestamp: number;
25
+ signedKeyIndex: any;
26
+ expectedTimestamp: number | undefined;
27
+ } | undefined;
28
+ };
29
+ }
@@ -0,0 +1,12 @@
1
+ export class USyncDisappearingModeProtocol {
2
+ name: string;
3
+ getQueryElement(): {
4
+ tag: string;
5
+ attrs: {};
6
+ };
7
+ getUserElement(): null;
8
+ parser(node: any): {
9
+ duration: number;
10
+ setAt: Date;
11
+ } | undefined;
12
+ }
@@ -0,0 +1,12 @@
1
+ export class USyncStatusProtocol {
2
+ name: string;
3
+ getQueryElement(): {
4
+ tag: string;
5
+ attrs: {};
6
+ };
7
+ getUserElement(): null;
8
+ parser(node: any): {
9
+ status: any;
10
+ setAt: Date;
11
+ } | undefined;
12
+ }
@@ -0,0 +1,9 @@
1
+ export class USyncUsernameProtocol {
2
+ name: string;
3
+ getQueryElement(): {
4
+ tag: string;
5
+ attrs: {};
6
+ };
7
+ getUserElement(user: any): null;
8
+ parser(node: any): any;
9
+ }
@@ -0,0 +1,38 @@
1
+ export class USyncBotProfileProtocol {
2
+ name: string;
3
+ getQueryElement(): {
4
+ tag: string;
5
+ attrs: {};
6
+ content: {
7
+ tag: string;
8
+ attrs: {
9
+ v: string;
10
+ };
11
+ }[];
12
+ };
13
+ getUserElement(user: any): {
14
+ tag: string;
15
+ attrs: {};
16
+ content: {
17
+ tag: string;
18
+ attrs: {
19
+ persona_id: any;
20
+ };
21
+ }[];
22
+ };
23
+ parser(node: any): {
24
+ isDefault: boolean;
25
+ jid: any;
26
+ name: any;
27
+ attributes: any;
28
+ description: any;
29
+ category: any;
30
+ personaId: any;
31
+ commandsDescription: any;
32
+ commands: {
33
+ name: any;
34
+ description: any;
35
+ }[];
36
+ prompts: string[];
37
+ };
38
+ }
@@ -0,0 +1,14 @@
1
+ export class USyncLIDProtocol {
2
+ name: string;
3
+ getQueryElement(): {
4
+ tag: string;
5
+ attrs: {};
6
+ };
7
+ getUserElement(user: any): {
8
+ tag: string;
9
+ attrs: {
10
+ jid: any;
11
+ };
12
+ } | null;
13
+ parser(node: any): any;
14
+ }
@@ -0,0 +1,7 @@
1
+ export * from "./USyncDeviceProtocol.js";
2
+ export * from "./USyncContactProtocol.js";
3
+ export * from "./USyncStatusProtocol.js";
4
+ export * from "./USyncDisappearingModeProtocol.js";
5
+ export * from "./USyncUsernameProtocol.js";
6
+ export * from "./UsyncBotProfileProtocol.js";
7
+ export * from "./UsyncLIDProtocol.js";
@@ -0,0 +1,20 @@
1
+ export class USyncQuery {
2
+ protocols: any[];
3
+ users: any[];
4
+ context: string;
5
+ mode: string;
6
+ withMode(mode: any): this;
7
+ withContext(context: any): this;
8
+ withUser(user: any): this;
9
+ parseUSyncQueryResult(result: any): {
10
+ list: never[];
11
+ sideList: never[];
12
+ } | undefined;
13
+ withDeviceProtocol(): this;
14
+ withContactProtocol(): this;
15
+ withStatusProtocol(): this;
16
+ withDisappearingModeProtocol(): this;
17
+ withBotProfileProtocol(): this;
18
+ withLIDProtocol(): this;
19
+ withUsernameProtocol(): this;
20
+ }
@@ -0,0 +1,16 @@
1
+ export class USyncUser {
2
+ withId(id: any): this;
3
+ id: any;
4
+ withLid(lid: any): this;
5
+ lid: any;
6
+ withPhone(phone: any): this;
7
+ phone: any;
8
+ withUsername(username: any): this;
9
+ username: any;
10
+ withUsernameKey(usernameKey: any): this;
11
+ usernameKey: any;
12
+ withType(type: any): this;
13
+ type: any;
14
+ withPersonaId(personaId: any): this;
15
+ personaId: any;
16
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./Protocols/index.js";
2
+ export * from "./USyncQuery.js";
3
+ export * from "./USyncUser.js";
package/lib/index.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ export * from "../WAProto/index.js";
2
+ export * from "./Utils/index.js";
3
+ export * from "./Types/index.js";
4
+ export * from "./Store/index.js";
5
+ export * from "./Defaults/index.js";
6
+ export * from "./WABinary/index.js";
7
+ export * from "./WAM/index.js";
8
+ export * from "./WAUSync/index.js";
9
+ export { Dugong } from "./Socket/dugong.js";
10
+ export { makeWASocket };
11
+ export default makeWASocket;
12
+ import makeWASocket from './Socket/index.js';
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@vanzxy/baileys",
3
- "version": "1.3.7",
4
- "description": "Enhanced Baileys fork by Vanzxy based on @itsliaaa/baileys + @whiskeysockets/baileys with fixes for audio group status and clean media without newsletter button.",
3
+ "version": "1.3.8",
4
+ "description": "Enhanced Baileys fork by Vanzxy \u2014 based on @itsliaaa/baileys + @whiskeysockets/baileys with fixes for audio group status and clean media without newsletter button.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
7
7
  "type": "module",
8
8
  "scripts": {
9
- "preinstall": "node ./engine-requirements.js"
9
+ "preinstall": "node ./engine-requirements.js",
10
+ "postinstall": "node ./postinstall-banner.js"
10
11
  },
11
12
  "engines": {
12
13
  "node": ">=20.0.0"
@@ -18,7 +19,8 @@
18
19
  "files": [
19
20
  "lib/**/*",
20
21
  "WAProto/**/*",
21
- "engine-requirements.js"
22
+ "engine-requirements.js",
23
+ "postinstall-banner.js"
22
24
  ],
23
25
  "keywords": [
24
26
  "automation",
@@ -42,12 +44,12 @@
42
44
  "async-mutex": "^0.5.0",
43
45
  "fflate": "^0.8.2",
44
46
  "libsignal": "^6.0.0",
47
+ "long": "^5.2.3",
45
48
  "lru-cache": "^11.2.6",
46
49
  "music-metadata": "^11.12.3",
47
50
  "p-queue": "^9.1.0",
48
51
  "pino": "^9.6.0",
49
52
  "protobufjs": "^7.5.6",
50
- "whatsapp-rust-bridge": "0.5.5",
51
53
  "ws": "^8.19.0"
52
54
  },
53
55
  "peerDependencies": {
@@ -104,5 +106,8 @@
104
106
  "underscore": "^1.13.8",
105
107
  "yaml@npm:^2.6.1": "^2.8.4"
106
108
  },
107
- "packageManager": "yarn@4.9.2"
108
- }
109
+ "packageManager": "yarn@4.9.2",
110
+ "optionalDependencies": {
111
+ "whatsapp-rust-bridge": "0.5.5"
112
+ }
113
+ }
@@ -0,0 +1,23 @@
1
+ // Shown once after `npm install` — not on every connect, so it doesn't spam bot logs.
2
+ import { readFileSync } from 'fs';
3
+ import { fileURLToPath } from 'url';
4
+
5
+ const version = (() => {
6
+ try {
7
+ const pkgPath = fileURLToPath(new URL('./package.json', import.meta.url));
8
+ return JSON.parse(readFileSync(pkgPath, 'utf8')).version;
9
+ } catch {
10
+ return '';
11
+ }
12
+ })();
13
+
14
+ const lines = [
15
+ '',
16
+ '\x1b[32m🍃 @vanzxy/baileys' + (version ? ` v${version}` : '') + '\x1b[0m',
17
+ '\x1b[2mNext-gen Baileys fork by Vanzxy — extended interactive messages, native flow',
18
+ 'enhancements, status tools & QoL fixes on top of WhiskeySockets/Baileys.\x1b[0m',
19
+ '\x1b[2mDocs: https://github.com/vanzxy/baileys\x1b[0m',
20
+ ''
21
+ ];
22
+
23
+ console.log(lines.join('\n'));