@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.
- package/README.md +1 -1
- package/WAProto/index.d.ts +9 -0
- package/lib/Defaults/index.d.ts +147 -0
- package/lib/Defaults/index.js +2 -2
- package/lib/Signal/Group/ciphertext-message.d.ts +9 -0
- package/lib/Signal/Group/group-session-builder.d.ts +7 -0
- package/lib/Signal/Group/group_cipher.d.ts +10 -0
- package/lib/Signal/Group/index.d.ts +11 -0
- package/lib/Signal/Group/keyhelper.d.ts +6 -0
- package/lib/Signal/Group/sender-chain-key.d.ts +13 -0
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +16 -0
- package/lib/Signal/Group/sender-key-message.d.ts +18 -0
- package/lib/Signal/Group/sender-key-name.d.ts +11 -0
- package/lib/Signal/Group/sender-key-record.d.ts +12 -0
- package/lib/Signal/Group/sender-key-state.d.ts +16 -0
- package/lib/Signal/Group/sender-message-key.d.ts +11 -0
- package/lib/Signal/libsignal.d.ts +54 -0
- package/lib/Signal/lid-mapping.d.ts +20 -0
- package/lib/Socket/Client/index.d.ts +2 -0
- package/lib/Socket/Client/types.d.ts +5 -0
- package/lib/Socket/Client/websocket.d.ts +12 -0
- package/lib/Socket/business.d.ts +395 -0
- package/lib/Socket/chats.d.ts +136 -0
- package/lib/Socket/communities.d.ts +561 -0
- package/lib/Socket/communities.js +4 -2
- package/lib/Socket/dugong.d.ts +117 -0
- package/lib/Socket/dugong.js +26 -1
- package/lib/Socket/groups.d.ts +285 -0
- package/lib/Socket/index.d.ts +531 -0
- package/lib/Socket/messages-recv.d.ts +333 -0
- package/lib/Socket/messages-send.d.ts +329 -0
- package/lib/Socket/mex.d.ts +1 -0
- package/lib/Socket/newsletter.d.ts +281 -0
- package/lib/Socket/newsletter.js +19 -19
- package/lib/Socket/socket.d.ts +60 -0
- package/lib/Store/index.d.ts +3 -0
- package/lib/Store/make-in-memory-store.d.ts +62 -0
- package/lib/Store/make-ordered-dictionary.d.ts +12 -0
- package/lib/Store/object-repository.d.ts +10 -0
- package/lib/Types/Auth.d.ts +117 -0
- package/lib/Types/Bussines.d.ts +25 -0
- package/lib/Types/Call.d.ts +15 -0
- package/lib/Types/Chat.d.ts +124 -0
- package/lib/Types/Contact.d.ts +26 -0
- package/lib/Types/Events.d.ts +256 -0
- package/lib/Types/GroupMetadata.d.ts +71 -0
- package/lib/Types/Label.d.ts +2 -0
- package/lib/Types/LabelAssociation.d.ts +2 -0
- package/lib/Types/Message.d.ts +11 -0
- package/lib/Types/Mex.d.ts +2 -0
- package/lib/Types/Product.d.ts +79 -0
- package/lib/Types/RichType.d.ts +2 -0
- package/lib/Types/Signal.d.ts +87 -0
- package/lib/Types/Socket.d.ts +136 -0
- package/lib/Types/State.d.ts +5 -0
- package/lib/Types/USync.d.ts +26 -0
- package/lib/Types/index.d.ts +66 -0
- package/lib/Utils/auth-utils.d.ts +57 -0
- package/lib/Utils/browser-utils.d.ts +8 -0
- package/lib/Utils/business.d.ts +49 -0
- package/lib/Utils/business.js +2 -1
- package/lib/Utils/chat-utils.d.ts +407 -0
- package/lib/Utils/chat-utils.js +15 -1
- package/lib/Utils/companion-reg-client-utils.d.ts +4 -0
- package/lib/Utils/crypto.d.ts +41 -0
- package/lib/Utils/decode-wa-message.d.ts +83 -0
- package/lib/Utils/decode-wa-message.js +1 -3
- package/lib/Utils/event-buffer.d.ts +12 -0
- package/lib/Utils/generics.d.ts +63 -0
- package/lib/Utils/generics.js +2 -4
- package/lib/Utils/history.d.ts +90 -0
- package/lib/Utils/identity-change-handler.d.ts +13 -0
- package/lib/Utils/index.d.ts +24 -0
- package/lib/Utils/link-preview.d.ts +12 -0
- package/lib/Utils/logger.d.ts +2 -0
- package/lib/Utils/lt-hash.d.ts +12 -0
- package/lib/Utils/lt-hash.js +21 -2
- package/lib/Utils/make-mutex.d.ts +6 -0
- package/lib/Utils/message-retry-manager.d.ts +79 -0
- package/lib/Utils/messages-media.d.ts +135 -0
- package/lib/Utils/messages.d.ts +44 -0
- package/lib/Utils/noise-handler.d.ts +20 -0
- package/lib/Utils/offline-node-processor.d.ts +9 -0
- package/lib/Utils/pre-key-manager.d.ts +25 -0
- package/lib/Utils/process-message.d.ts +82 -0
- package/lib/Utils/reporting-utils.d.ts +12 -0
- package/lib/Utils/rich-message-utils.d.ts +48 -0
- package/lib/Utils/signal.d.ts +82 -0
- package/lib/Utils/stanza-ack.d.ts +16 -0
- package/lib/Utils/sync-action-utils.d.ts +2 -0
- package/lib/Utils/tc-token-utils.d.ts +29 -0
- package/lib/Utils/use-multi-file-auth-state.d.ts +10 -0
- package/lib/Utils/use-single-file-auth-state.d.ts +10 -0
- package/lib/Utils/use-single-file-auth-state.js +6 -1
- package/lib/Utils/use-sqlite-auth-state.d.ts +11 -0
- package/lib/Utils/use-sqlite-auth-state.js +12 -0
- package/lib/Utils/validate-connection.d.ts +42 -0
- package/lib/WABinary/constants.d.ts +61 -0
- package/lib/WABinary/decode.d.ts +9 -0
- package/lib/WABinary/encode.d.ts +2 -0
- package/lib/WABinary/generic-utils.d.ts +74 -0
- package/lib/WABinary/index.d.ts +5 -0
- package/lib/WABinary/jid-utils.d.ts +28 -0
- package/lib/WABinary/types.d.ts +19 -0
- package/lib/WAM/BinaryInfo.d.ts +7 -0
- package/lib/WAM/constants.d.ts +34926 -0
- package/lib/WAM/encode.d.ts +1 -0
- package/lib/WAM/index.d.ts +3 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +36 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +29 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +12 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +12 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +9 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +38 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +14 -0
- package/lib/WAUSync/Protocols/index.d.ts +7 -0
- package/lib/WAUSync/USyncQuery.d.ts +20 -0
- package/lib/WAUSync/USyncUser.d.ts +16 -0
- package/lib/WAUSync/index.d.ts +3 -0
- package/lib/index.d.ts +12 -0
- package/package.json +12 -7
- package/postinstall-banner.js +23 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function encodeWAM(binaryInfo: any): any;
|
|
@@ -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,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,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
|
+
}
|
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.
|
|
4
|
-
"description": "Enhanced Baileys fork by Vanzxy
|
|
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'));
|