@queenanya/baileys 8.1.5 → 8.2.5-beta
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.
- package/LICENSE +21 -0
- package/README.md +459 -0
- package/WAProto/index.d.ts +53473 -0
- package/WAProto/index.js +165029 -0
- package/WASignalGroup/GroupProtocol.js +1697 -0
- package/WASignalGroup/ciphertext_message.js +16 -0
- package/WASignalGroup/group_cipher.js +120 -0
- package/WASignalGroup/group_session_builder.js +46 -0
- package/WASignalGroup/index.js +5 -0
- package/WASignalGroup/keyhelper.js +21 -0
- package/WASignalGroup/protobufs.js +3 -0
- package/WASignalGroup/queue_job.js +69 -0
- package/WASignalGroup/sender_chain_key.js +50 -0
- package/WASignalGroup/sender_key_distribution_message.js +78 -0
- package/WASignalGroup/sender_key_message.js +92 -0
- package/WASignalGroup/sender_key_name.js +70 -0
- package/WASignalGroup/sender_key_record.js +56 -0
- package/WASignalGroup/sender_key_state.js +129 -0
- package/WASignalGroup/sender_message_key.js +39 -0
- package/engine-requirements.js +10 -0
- package/lib/Defaults/baileys-version.json +3 -0
- package/lib/Defaults/index.d.ts +51 -0
- package/lib/Defaults/index.js +107 -0
- package/lib/Signal/libsignal.d.ts +3 -0
- package/lib/Signal/libsignal.js +161 -0
- package/lib/Socket/Client/index.d.ts +2 -0
- package/lib/Socket/Client/index.js +18 -0
- package/lib/Socket/Client/types.d.ts +15 -0
- package/lib/Socket/Client/types.js +13 -0
- package/lib/Socket/Client/websocket.d.ts +12 -0
- package/lib/Socket/Client/websocket.js +62 -0
- package/lib/Socket/business.d.ts +177 -0
- package/lib/Socket/business.js +260 -0
- package/lib/Socket/chats.d.ts +89 -0
- package/lib/Socket/chats.js +954 -0
- package/lib/Socket/groups.d.ts +128 -0
- package/lib/Socket/groups.js +328 -0
- package/lib/Socket/index.d.ts +177 -0
- package/lib/Socket/index.js +10 -0
- package/lib/Socket/messages-recv.d.ts +166 -0
- package/lib/Socket/messages-recv.js +1056 -0
- package/lib/Socket/messages-send.d.ts +156 -0
- package/lib/Socket/messages-send.js +836 -0
- package/lib/Socket/newsletter.d.ts +140 -0
- package/lib/Socket/newsletter.js +252 -0
- package/lib/Socket/socket.d.ts +43 -0
- package/lib/Socket/socket.js +635 -0
- package/lib/Socket/usync.d.ts +36 -0
- package/lib/Socket/usync.js +65 -0
- package/lib/Store/index.d.ts +2 -0
- package/lib/Store/index.js +8 -0
- package/lib/Store/make-cache-manager-store.d.ts +14 -0
- package/lib/Store/make-cache-manager-store.js +83 -0
- package/lib/Store/make-in-memory-store.d.ts +118 -0
- package/lib/Store/make-in-memory-store.js +429 -0
- package/lib/Store/make-ordered-dictionary.d.ts +13 -0
- package/lib/Store/make-ordered-dictionary.js +81 -0
- package/lib/Store/object-repository.d.ts +10 -0
- package/lib/Store/object-repository.js +27 -0
- package/lib/Types/Auth.d.ts +103 -0
- package/lib/Types/Auth.js +2 -0
- package/lib/Types/Call.d.ts +13 -0
- package/lib/Types/Call.js +2 -0
- package/lib/Types/Chat.d.ts +115 -0
- package/lib/Types/Chat.js +4 -0
- package/lib/Types/Contact.d.ts +24 -0
- package/lib/Types/Contact.js +2 -0
- package/lib/Types/Events.d.ts +199 -0
- package/lib/Types/Events.js +2 -0
- package/lib/Types/GroupMetadata.d.ts +63 -0
- package/lib/Types/GroupMetadata.js +2 -0
- package/lib/Types/Label.d.ts +46 -0
- package/lib/Types/Label.js +27 -0
- package/lib/Types/LabelAssociation.d.ts +29 -0
- package/lib/Types/LabelAssociation.js +9 -0
- package/lib/Types/Message.d.ts +384 -0
- package/lib/Types/Message.js +7 -0
- package/lib/Types/Newsletter.d.ts +79 -0
- package/lib/Types/Newsletter.js +18 -0
- package/lib/Types/Product.d.ts +78 -0
- package/lib/Types/Product.js +2 -0
- package/lib/Types/Signal.d.ts +57 -0
- package/lib/Types/Signal.js +2 -0
- package/lib/Types/Socket.d.ts +121 -0
- package/lib/Types/Socket.js +2 -0
- package/lib/Types/State.d.ts +27 -0
- package/lib/Types/State.js +2 -0
- package/lib/Types/USync.d.ts +25 -0
- package/lib/Types/USync.js +2 -0
- package/lib/Types/index.d.ts +64 -0
- package/lib/Types/index.js +42 -0
- package/lib/Utils/auth-utils.d.ts +18 -0
- package/lib/Utils/auth-utils.js +199 -0
- package/lib/Utils/baileys-event-stream.d.ts +16 -0
- package/lib/Utils/baileys-event-stream.js +63 -0
- package/lib/Utils/business.d.ts +22 -0
- package/lib/Utils/business.js +234 -0
- package/lib/Utils/chat-utils.d.ts +70 -0
- package/lib/Utils/chat-utils.js +756 -0
- package/lib/Utils/crypto.d.ts +40 -0
- package/lib/Utils/crypto.js +195 -0
- package/lib/Utils/decode-wa-message.d.ts +38 -0
- package/lib/Utils/decode-wa-message.js +347 -0
- package/lib/Utils/event-buffer.d.ts +35 -0
- package/lib/Utils/event-buffer.js +518 -0
- package/lib/Utils/generics.d.ts +120 -0
- package/lib/Utils/generics.js +499 -0
- package/lib/Utils/history.d.ts +19 -0
- package/lib/Utils/history.js +94 -0
- package/lib/Utils/index.d.ts +17 -0
- package/lib/Utils/index.js +33 -0
- package/lib/Utils/link-preview.d.ts +21 -0
- package/lib/Utils/link-preview.js +126 -0
- package/lib/Utils/logger.d.ts +11 -0
- package/lib/Utils/logger.js +7 -0
- package/lib/Utils/lt-hash.d.ts +12 -0
- package/lib/Utils/lt-hash.js +51 -0
- package/lib/Utils/make-mutex.d.ts +7 -0
- package/lib/Utils/make-mutex.js +43 -0
- package/lib/Utils/messages-media.d.ts +127 -0
- package/lib/Utils/messages-media.js +792 -0
- package/lib/Utils/messages.d.ts +75 -0
- package/lib/Utils/messages.js +1020 -0
- package/lib/Utils/noise-handler.d.ts +19 -0
- package/lib/Utils/noise-handler.js +150 -0
- package/lib/Utils/process-message.d.ts +42 -0
- package/lib/Utils/process-message.js +372 -0
- package/lib/Utils/signal.d.ts +33 -0
- package/lib/Utils/signal.js +153 -0
- package/lib/Utils/use-multi-file-auth-state.d.ts +12 -0
- package/lib/Utils/use-multi-file-auth-state.js +125 -0
- package/lib/Utils/validate-connection.d.ts +10 -0
- package/lib/Utils/validate-connection.js +173 -0
- package/lib/WABinary/constants.d.ts +27 -0
- package/lib/WABinary/constants.js +40 -0
- package/lib/WABinary/decode.d.ts +6 -0
- package/lib/WABinary/decode.js +265 -0
- package/lib/WABinary/encode.d.ts +2 -0
- package/lib/WABinary/encode.js +252 -0
- package/lib/WABinary/generic-utils.d.ts +14 -0
- package/lib/WABinary/generic-utils.js +110 -0
- package/lib/WABinary/index.d.ts +5 -0
- package/lib/WABinary/index.js +21 -0
- package/lib/WABinary/jid-utils.d.ts +36 -0
- package/lib/WABinary/jid-utils.js +83 -0
- package/lib/WABinary/types.d.ts +18 -0
- package/lib/WABinary/types.js +2 -0
- package/lib/WAM/BinaryInfo.d.ts +8 -0
- package/lib/WAM/BinaryInfo.js +13 -0
- package/lib/WAM/constants.d.ts +39 -0
- package/lib/WAM/constants.js +15350 -0
- package/lib/WAM/encode.d.ts +2 -0
- package/lib/WAM/encode.js +155 -0
- package/lib/WAM/index.d.ts +3 -0
- package/lib/WAM/index.js +19 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +9 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +32 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +22 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +57 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +12 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +30 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +12 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +42 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +25 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +53 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +8 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +24 -0
- package/lib/WAUSync/Protocols/index.d.ts +4 -0
- package/lib/WAUSync/Protocols/index.js +20 -0
- package/lib/WAUSync/USyncQuery.d.ts +28 -0
- package/lib/WAUSync/USyncQuery.js +93 -0
- package/lib/WAUSync/USyncUser.d.ts +12 -0
- package/lib/WAUSync/USyncUser.js +26 -0
- package/lib/WAUSync/index.d.ts +3 -0
- package/lib/WAUSync/index.js +19 -0
- package/lib/index.d.ts +13 -0
- package/lib/index.js +33 -0
- package/package.json +101 -22
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class USyncUser {
|
|
2
|
+
id: string;
|
|
3
|
+
lid: string;
|
|
4
|
+
phone: string;
|
|
5
|
+
type: string;
|
|
6
|
+
personaId: string;
|
|
7
|
+
withId(id: string): this;
|
|
8
|
+
withLid(lid: string): this;
|
|
9
|
+
withPhone(phone: string): this;
|
|
10
|
+
withType(type: string): this;
|
|
11
|
+
withPersonaId(personaId: string): this;
|
|
12
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.USyncUser = void 0;
|
|
4
|
+
class USyncUser {
|
|
5
|
+
withId(id) {
|
|
6
|
+
this.id = id;
|
|
7
|
+
return this;
|
|
8
|
+
}
|
|
9
|
+
withLid(lid) {
|
|
10
|
+
this.lid = lid;
|
|
11
|
+
return this;
|
|
12
|
+
}
|
|
13
|
+
withPhone(phone) {
|
|
14
|
+
this.phone = phone;
|
|
15
|
+
return this;
|
|
16
|
+
}
|
|
17
|
+
withType(type) {
|
|
18
|
+
this.type = type;
|
|
19
|
+
return this;
|
|
20
|
+
}
|
|
21
|
+
withPersonaId(personaId) {
|
|
22
|
+
this.personaId = personaId;
|
|
23
|
+
return this;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.USyncUser = USyncUser;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Protocols"), exports);
|
|
18
|
+
__exportStar(require("./USyncQuery"), exports);
|
|
19
|
+
__exportStar(require("./USyncUser"), exports);
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { proto } from '../WAProto';
|
|
2
|
+
import makeWASocket from './Socket';
|
|
3
|
+
export * from '../WAProto';
|
|
4
|
+
export * from './Utils';
|
|
5
|
+
export * from './Types';
|
|
6
|
+
export * from './Store';
|
|
7
|
+
export * from './Defaults';
|
|
8
|
+
export * from './WABinary';
|
|
9
|
+
export * from './WAM';
|
|
10
|
+
export * from './WAUSync';
|
|
11
|
+
export type WASocket = ReturnType<typeof makeWASocket>;
|
|
12
|
+
export { makeWASocket, proto };
|
|
13
|
+
export default makeWASocket;
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.proto = exports.makeWASocket = void 0;
|
|
21
|
+
const WAProto_1 = require("../WAProto");
|
|
22
|
+
Object.defineProperty(exports, "proto", { enumerable: true, get: function () { return WAProto_1.proto; } });
|
|
23
|
+
const Socket_1 = __importDefault(require("./Socket"));
|
|
24
|
+
exports.makeWASocket = Socket_1.default;
|
|
25
|
+
__exportStar(require("../WAProto"), exports);
|
|
26
|
+
__exportStar(require("./Utils"), exports);
|
|
27
|
+
__exportStar(require("./Types"), exports);
|
|
28
|
+
__exportStar(require("./Store"), exports);
|
|
29
|
+
__exportStar(require("./Defaults"), exports);
|
|
30
|
+
__exportStar(require("./WABinary"), exports);
|
|
31
|
+
__exportStar(require("./WAM"), exports);
|
|
32
|
+
__exportStar(require("./WAUSync"), exports);
|
|
33
|
+
exports.default = Socket_1.default;
|
package/package.json
CHANGED
|
@@ -1,29 +1,108 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@queenanya/baileys",
|
|
3
|
-
"version": "8.
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
"version": "8.2.5-beta",
|
|
4
|
+
"description": "Custom Baileys WhatsApp API",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"baileys",
|
|
7
|
+
"baileys-mod",
|
|
8
|
+
"wabot",
|
|
9
|
+
"whatsapp",
|
|
10
|
+
"js-whatsapp",
|
|
11
|
+
"whatsapp-api",
|
|
12
|
+
"whatsapp-web",
|
|
13
|
+
"whatsapp-bot",
|
|
14
|
+
"automation",
|
|
15
|
+
"multi-device"
|
|
16
|
+
],
|
|
17
|
+
"homepage": "https://github.com/nstar-y/bail",
|
|
18
|
+
"repository": {
|
|
19
|
+
"url": "git+ssh://git@github.com/QueenAnya/Bail.git"
|
|
20
|
+
},
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"author": "Adhiraj Singh",
|
|
23
|
+
"main": "lib/index.js",
|
|
24
|
+
"types": "lib/index.d.ts",
|
|
25
|
+
"files": [
|
|
26
|
+
"lib/*",
|
|
27
|
+
"WAProto/*.ts",
|
|
28
|
+
"WAProto/*.js",
|
|
29
|
+
"WASignalGroup/*.js",
|
|
30
|
+
"engine-requirements.js"
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build:all": "tsc && typedoc",
|
|
34
|
+
"build:docs": "typedoc",
|
|
35
|
+
"build:tsc": "tsc",
|
|
36
|
+
"changelog:last": "conventional-changelog -p angular -r 2",
|
|
37
|
+
"changelog:preview": "conventional-changelog -p angular -u",
|
|
38
|
+
"changelog:update": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
|
|
39
|
+
"example": "node --inspect -r ts-node/register Example/example.ts",
|
|
40
|
+
"gen:protobuf": "sh WAProto/GenerateStatics.sh",
|
|
41
|
+
"lint": "eslint src --ext .js,.ts",
|
|
42
|
+
"lint:fix": "yarn lint --fix",
|
|
43
|
+
"prepack": "tsc",
|
|
44
|
+
"prepare": "tsc",
|
|
45
|
+
"preinstall": "node ./engine-requirements.js",
|
|
46
|
+
"release": "release-it",
|
|
47
|
+
"test": "jest"
|
|
48
|
+
},
|
|
8
49
|
"dependencies": {
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
50
|
+
"@adiwajshing/keyed-db": "^0.2.4",
|
|
51
|
+
"@cacheable/node-cache": "^1.4.0",
|
|
52
|
+
"@queenanya/eslint-config": "github:whiskeysockets/eslint-config",
|
|
53
|
+
"@hapi/boom": "^10.0.1",
|
|
54
|
+
"async-lock": "^1.4.1",
|
|
55
|
+
"async-mutex": "^0.5.0",
|
|
56
|
+
"audio-decode": "^2.1.3",
|
|
57
|
+
"axios": "^1.7.3",
|
|
58
|
+
"cache-manager": "^5.7.6",
|
|
59
|
+
"libsignal": "npm:@queenanya/libsignal@latest",
|
|
60
|
+
"lodash": "^4.17.21",
|
|
61
|
+
"music-metadata": "^7.12.3",
|
|
62
|
+
"pino": "^9.6",
|
|
63
|
+
"protobufjs": "^7.2.4",
|
|
64
|
+
"qrcode-terminal": "0.12.x",
|
|
65
|
+
"ws": "^8.18.0"
|
|
15
66
|
},
|
|
16
67
|
"devDependencies": {
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
68
|
+
"@types/jest": "^29.5.12",
|
|
69
|
+
"@types/node": "^20.14.10",
|
|
70
|
+
"@types/ws": "^8.5.11",
|
|
71
|
+
"conventional-changelog-cli": "^5.0.0",
|
|
72
|
+
"eslint": "^9.7.0",
|
|
73
|
+
"jest": "^29.7.0",
|
|
74
|
+
"jimp": "^0.22.12",
|
|
75
|
+
"json": "^11.0.0",
|
|
76
|
+
"link-preview-js": "^3.0.5",
|
|
77
|
+
"open": "^10.1.0",
|
|
78
|
+
"protobufjs-cli": "^1.1.3",
|
|
79
|
+
"release-it": "^17.6.0",
|
|
80
|
+
"sharp": "^0.33.4",
|
|
81
|
+
"ts-jest": "^29.2.2",
|
|
82
|
+
"ts-node": "^10.9.2",
|
|
83
|
+
"typedoc": "^0.27.9",
|
|
84
|
+
"typedoc-plugin-markdown": "4.4.2",
|
|
85
|
+
"typescript": "^5.8.2"
|
|
25
86
|
},
|
|
26
|
-
"
|
|
27
|
-
"
|
|
87
|
+
"peerDependencies": {
|
|
88
|
+
"audio-decode": "^2.1.3",
|
|
89
|
+
"jimp": "^0.22.12",
|
|
90
|
+
"link-preview-js": "^3.0.5",
|
|
91
|
+
"qrcode-terminal": "^0.12.0",
|
|
92
|
+
"sharp": "^0.34.1"
|
|
93
|
+
},
|
|
94
|
+
"peerDependenciesMeta": {
|
|
95
|
+
"audio-decode": {
|
|
96
|
+
"optional": true
|
|
97
|
+
},
|
|
98
|
+
"jimp": {
|
|
99
|
+
"optional": true
|
|
100
|
+
},
|
|
101
|
+
"link-preview-js": {
|
|
102
|
+
"optional": true
|
|
103
|
+
},
|
|
104
|
+
"sharp": {
|
|
105
|
+
"optional": true
|
|
106
|
+
}
|
|
28
107
|
}
|
|
29
|
-
}
|
|
108
|
+
}
|