@genuxofficial/baileys 1.0.0 → 2.0.0
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 +1 -1
- package/README.md +5 -1
- package/WAProto/index.d.ts +19244 -2787
- package/WAProto/index.js +138202 -74217
- package/engine-requirements.js +10 -0
- package/lib/Defaults/baileys-version.json +1 -1
- package/lib/Defaults/index.d.ts +3 -5
- package/lib/Defaults/index.js +7 -6
- package/lib/Signal/libsignal.js +18 -9
- package/lib/Socket/Client/types.d.ts +0 -2
- package/lib/Socket/Client/websocket.js +1 -1
- package/lib/Socket/business.d.ts +65 -37
- package/lib/Socket/chats.d.ts +22 -18
- package/lib/Socket/chats.js +110 -6
- package/lib/Socket/groups.d.ts +30 -26
- package/lib/Socket/groups.js +20 -6
- package/lib/Socket/index.d.ts +66 -38
- package/lib/Socket/messages-recv.d.ts +63 -33
- package/lib/Socket/messages-recv.js +174 -27
- package/lib/Socket/messages-send.d.ts +55 -29
- package/lib/Socket/messages-send.js +190 -26
- package/lib/Socket/newsletter.d.ts +140 -0
- package/lib/Socket/newsletter.js +252 -0
- package/lib/Socket/socket.d.ts +8 -10
- package/lib/Socket/socket.js +26 -13
- package/lib/Socket/usync.d.ts +10 -12
- package/lib/Socket/usync.js +10 -15
- package/lib/Store/index.d.ts +1 -2
- package/lib/Store/index.js +1 -3
- package/lib/Store/make-in-memory-store.d.ts +1 -1
- package/lib/Store/make-in-memory-store.js +14 -5
- package/lib/Store/make-ordered-dictionary.d.ts +1 -1
- package/lib/Types/Auth.d.ts +0 -2
- package/lib/Types/Chat.d.ts +7 -0
- package/lib/Types/Contact.d.ts +5 -0
- package/lib/Types/Events.d.ts +27 -0
- package/lib/Types/GroupMetadata.d.ts +7 -0
- package/lib/Types/Label.js +1 -1
- package/lib/Types/LabelAssociation.js +1 -1
- package/lib/Types/Message.d.ts +129 -16
- package/lib/Types/Message.js +0 -2
- package/lib/Types/Newsletter.d.ts +79 -0
- package/lib/Types/Newsletter.js +18 -0
- package/lib/Types/Socket.d.ts +8 -5
- package/lib/Types/index.d.ts +1 -0
- package/lib/Types/index.js +2 -1
- package/lib/Utils/auth-utils.d.ts +1 -1
- package/lib/Utils/auth-utils.js +6 -7
- package/lib/Utils/business.js +2 -2
- package/lib/Utils/chat-utils.d.ts +8 -10
- package/lib/Utils/chat-utils.js +11 -0
- package/lib/Utils/crypto.d.ts +14 -16
- package/lib/Utils/crypto.js +40 -26
- package/lib/Utils/decode-wa-message.d.ts +5 -3
- package/lib/Utils/decode-wa-message.js +171 -29
- package/lib/Utils/event-buffer.js +1 -3
- package/lib/Utils/generics.d.ts +35 -9
- package/lib/Utils/generics.js +93 -27
- package/lib/Utils/history.d.ts +2 -2
- package/lib/Utils/link-preview.d.ts +1 -1
- package/lib/Utils/link-preview.js +17 -7
- package/lib/Utils/make-mutex.d.ts +2 -2
- package/lib/Utils/make-mutex.js +0 -1
- package/lib/Utils/messages-media.d.ts +35 -16
- package/lib/Utils/messages-media.js +168 -43
- package/lib/Utils/messages.d.ts +6 -9
- package/lib/Utils/messages.js +297 -37
- package/lib/Utils/noise-handler.d.ts +5 -7
- package/lib/Utils/process-message.js +2 -3
- package/lib/Utils/use-multi-file-auth-state.js +44 -13
- package/lib/Utils/validate-connection.d.ts +2 -2
- package/lib/Utils/validate-connection.js +1 -3
- package/lib/WABinary/decode.d.ts +2 -4
- package/lib/WABinary/decode.js +20 -9
- package/lib/WABinary/encode.d.ts +1 -3
- package/lib/WABinary/encode.js +30 -12
- package/lib/WABinary/generic-utils.d.ts +1 -3
- package/lib/WABinary/generic-utils.js +2 -2
- package/lib/WABinary/jid-utils.d.ts +9 -4
- package/lib/WABinary/jid-utils.js +25 -4
- package/lib/WAM/BinaryInfo.d.ts +2 -12
- package/lib/WAM/encode.d.ts +1 -3
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +2 -2
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +2 -2
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +2 -2
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +5 -5
- 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/USyncQuery.d.ts +2 -0
- package/lib/WAUSync/USyncQuery.js +27 -13
- package/lib/WAUSync/USyncUser.d.ts +2 -0
- package/lib/WAUSync/USyncUser.js +4 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +3 -1
- package/package.json +59 -57
- package/WAProto/GenerateStatics.sh +0 -4
- package/WAProto/WAProto.proto +0 -3344
package/lib/index.js
CHANGED
@@ -17,7 +17,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
18
18
|
};
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
20
|
-
exports.makeWASocket = void 0;
|
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; } });
|
21
23
|
const Socket_1 = __importDefault(require("./Socket"));
|
22
24
|
exports.makeWASocket = Socket_1.default;
|
23
25
|
__exportStar(require("../WAProto"), exports);
|
package/package.json
CHANGED
@@ -1,20 +1,22 @@
|
|
1
1
|
{
|
2
2
|
"name": "@genuxofficial/baileys",
|
3
|
-
"version": "
|
4
|
-
"description": "WhatsApp API",
|
3
|
+
"version": "2.0.0",
|
4
|
+
"description": "Custom Baileys WhatsApp API",
|
5
5
|
"keywords": [
|
6
|
+
"baileys",
|
7
|
+
"baileys-mod",
|
8
|
+
"wabot",
|
6
9
|
"whatsapp",
|
7
10
|
"js-whatsapp",
|
8
11
|
"whatsapp-api",
|
9
12
|
"whatsapp-web",
|
10
|
-
"whatsapp-
|
11
|
-
"whatsapp-group",
|
13
|
+
"whatsapp-bot",
|
12
14
|
"automation",
|
13
15
|
"multi-device"
|
14
16
|
],
|
15
17
|
"homepage": "https://github.com/genux-official/Baileys",
|
16
18
|
"repository": {
|
17
|
-
"url": "git@github.com
|
19
|
+
"url": "git+ssh://git@github.com/genux-official/Baileys.git"
|
18
20
|
},
|
19
21
|
"license": "MIT",
|
20
22
|
"author": "Genux Official",
|
@@ -22,83 +24,83 @@
|
|
22
24
|
"types": "lib/index.d.ts",
|
23
25
|
"files": [
|
24
26
|
"lib/*",
|
25
|
-
"WAProto
|
26
|
-
"
|
27
|
+
"WAProto/*.ts",
|
28
|
+
"WAProto/*.js",
|
29
|
+
"WASignalGroup/*.js",
|
30
|
+
"engine-requirements.js"
|
27
31
|
],
|
28
|
-
"scripts": {
|
29
|
-
"build:all": "tsc && typedoc",
|
30
|
-
"build:docs": "typedoc",
|
31
|
-
"build:tsc": "tsc",
|
32
|
-
"changelog:last": "conventional-changelog -p angular -r 2",
|
33
|
-
"changelog:preview": "conventional-changelog -p angular -u",
|
34
|
-
"changelog:update": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
|
35
|
-
"example": "node --inspect -r ts-node/register Example/example.ts",
|
36
|
-
"gen:protobuf": "sh WAProto/GenerateStatics.sh",
|
37
|
-
"lint": "eslint src --ext .js,.ts",
|
38
|
-
"lint:fix": "yarn lint --fix",
|
39
|
-
"prepack": "tsc",
|
40
|
-
"prepare": "tsc",
|
41
|
-
"release": "release-it",
|
42
|
-
"test": "jest"
|
43
|
-
},
|
44
32
|
"dependencies": {
|
45
33
|
"@adiwajshing/keyed-db": "^0.2.4",
|
46
|
-
"@
|
47
|
-
"@
|
34
|
+
"@cacheable/node-cache": "^1.4.0",
|
35
|
+
"@queenanya/eslint-config": "github:whiskeysockets/eslint-config",
|
36
|
+
"@hapi/boom": "^10.0.1",
|
48
37
|
"async-lock": "^1.4.1",
|
38
|
+
"async-mutex": "^0.5.0",
|
49
39
|
"audio-decode": "^2.1.3",
|
50
|
-
"axios": "^1.
|
40
|
+
"axios": "^1.7.3",
|
51
41
|
"cache-manager": "^5.7.6",
|
52
|
-
"
|
53
|
-
"libsignal": "github:WhiskeySockets/libsignal-node",
|
42
|
+
"libsignal": "npm:@queenanya/libsignal@latest",
|
54
43
|
"lodash": "^4.17.21",
|
55
44
|
"music-metadata": "^7.12.3",
|
56
|
-
"@cacheable/node-cache": "^1.4.0",
|
57
45
|
"pino": "^9.6",
|
58
46
|
"protobufjs": "^7.2.4",
|
59
|
-
"
|
60
|
-
"ws": "^8.
|
47
|
+
"qrcode-terminal": "0.12.x",
|
48
|
+
"ws": "^8.18.0"
|
61
49
|
},
|
62
50
|
"devDependencies": {
|
63
|
-
"@types/
|
64
|
-
"@types/
|
65
|
-
"@types/
|
66
|
-
"
|
67
|
-
"
|
68
|
-
"
|
69
|
-
"
|
70
|
-
"jest": "^27.0.6",
|
71
|
-
"jimp": "^0.16.1",
|
51
|
+
"@types/jest": "^29.5.12",
|
52
|
+
"@types/node": "^20.14.10",
|
53
|
+
"@types/ws": "^8.5.11",
|
54
|
+
"conventional-changelog-cli": "^5.0.0",
|
55
|
+
"eslint": "^9.7.0",
|
56
|
+
"jest": "^29.7.0",
|
57
|
+
"jimp": "^0.22.12",
|
72
58
|
"json": "^11.0.0",
|
73
|
-
"link-preview-js": "^3.0.
|
74
|
-
"open": "^
|
75
|
-
"
|
76
|
-
"release-it": "^
|
77
|
-
"sharp": "^0.
|
78
|
-
"ts-jest": "^
|
79
|
-
"ts-node": "^10.
|
80
|
-
"typedoc": "^0.
|
81
|
-
"
|
59
|
+
"link-preview-js": "^3.0.5",
|
60
|
+
"open": "^10.1.0",
|
61
|
+
"protobufjs-cli": "^1.1.3",
|
62
|
+
"release-it": "^17.6.0",
|
63
|
+
"sharp": "^0.33.4",
|
64
|
+
"ts-jest": "^29.2.2",
|
65
|
+
"ts-node": "^10.9.2",
|
66
|
+
"typedoc": "^0.27.9",
|
67
|
+
"typedoc-plugin-markdown": "4.4.2",
|
68
|
+
"typescript": "^5.8.2"
|
82
69
|
},
|
83
70
|
"peerDependencies": {
|
84
|
-
"
|
85
|
-
"
|
71
|
+
"audio-decode": "^2.1.3",
|
72
|
+
"jimp": "^0.22.12",
|
73
|
+
"link-preview-js": "^3.0.5",
|
86
74
|
"qrcode-terminal": "^0.12.0",
|
87
|
-
"sharp": "^0.
|
75
|
+
"sharp": "^0.34.1"
|
88
76
|
},
|
89
77
|
"peerDependenciesMeta": {
|
90
|
-
"
|
78
|
+
"audio-decode": {
|
91
79
|
"optional": true
|
92
80
|
},
|
93
|
-
"
|
81
|
+
"jimp": {
|
94
82
|
"optional": true
|
95
83
|
},
|
96
|
-
"
|
84
|
+
"link-preview-js": {
|
97
85
|
"optional": true
|
98
86
|
},
|
99
87
|
"sharp": {
|
100
88
|
"optional": true
|
101
89
|
}
|
102
90
|
},
|
103
|
-
"
|
104
|
-
|
91
|
+
"scripts": {
|
92
|
+
"build:all": "tsc && typedoc",
|
93
|
+
"build:docs": "typedoc",
|
94
|
+
"build:tsc": "tsc",
|
95
|
+
"changelog:last": "conventional-changelog -p angular -r 2",
|
96
|
+
"changelog:preview": "conventional-changelog -p angular -u",
|
97
|
+
"changelog:update": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
|
98
|
+
"example": "node --inspect -r ts-node/register Example/example.ts",
|
99
|
+
"gen:protobuf": "sh WAProto/GenerateStatics.sh",
|
100
|
+
"lint": "eslint src --ext .js,.ts",
|
101
|
+
"lint:fix": "yarn lint --fix",
|
102
|
+
"preinstall": "node ./engine-requirements.js",
|
103
|
+
"release": "release-it",
|
104
|
+
"test": "jest"
|
105
|
+
}
|
106
|
+
}
|
@@ -1,4 +0,0 @@
|
|
1
|
-
yarn pbjs -t static-module -w commonjs -o ./WAProto/index.js ./WAProto/WAProto.proto;
|
2
|
-
yarn pbts -o ./WAProto/index.d.ts ./WAProto/index.js;
|
3
|
-
|
4
|
-
#protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_opt=env=node,useOptionals=true,forceLong=long --ts_proto_out=. ./src/Binary/WAMessage.proto;
|