@alannxd/baileys 6.0.5 → 6.0.6
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/WAProto/fix-import.js +29 -0
- package/WAProto/index.js +160 -201
- package/engine-requirements.js +1 -1
- package/lib/Defaults/baileys-version.json +3 -0
- package/lib/Defaults/index.d.ts +15 -37
- package/lib/Defaults/index.js +136 -119
- package/lib/Defaults/phonenumber-mcc.json +223 -0
- package/lib/Signal/Group/ciphertext-message.d.ts +0 -1
- package/lib/Signal/Group/ciphertext-message.js +5 -2
- package/lib/Signal/Group/group-session-builder.d.ts +3 -4
- package/lib/Signal/Group/group-session-builder.js +41 -7
- package/lib/Signal/Group/group_cipher.d.ts +4 -4
- package/lib/Signal/Group/group_cipher.js +51 -37
- package/lib/Signal/Group/index.d.ts +11 -12
- package/lib/Signal/Group/index.js +57 -12
- package/lib/Signal/Group/keyhelper.d.ts +1 -2
- package/lib/Signal/Group/keyhelper.js +44 -7
- package/lib/Signal/Group/queue-job.d.ts +1 -0
- package/lib/Signal/Group/queue-job.js +57 -0
- package/lib/Signal/Group/sender-chain-key.d.ts +2 -3
- package/lib/Signal/Group/sender-chain-key.js +15 -7
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +1 -2
- package/lib/Signal/Group/sender-key-distribution-message.js +11 -8
- package/lib/Signal/Group/sender-key-message.d.ts +1 -2
- package/lib/Signal/Group/sender-key-message.js +12 -9
- package/lib/Signal/Group/sender-key-name.d.ts +0 -1
- package/lib/Signal/Group/sender-key-name.js +5 -2
- package/lib/Signal/Group/sender-key-record.d.ts +2 -3
- package/lib/Signal/Group/sender-key-record.js +21 -9
- package/lib/Signal/Group/sender-key-state.d.ts +6 -7
- package/lib/Signal/Group/sender-key-state.js +42 -27
- package/lib/Signal/Group/sender-message-key.d.ts +0 -1
- package/lib/Signal/Group/sender-message-key.js +7 -4
- package/lib/Signal/libsignal.d.ts +3 -5
- package/lib/Signal/libsignal.js +90 -347
- package/lib/Socket/Client/{types.d.ts → abstract-socket-client.d.ts} +5 -4
- package/lib/Socket/Client/abstract-socket-client.js +13 -0
- package/lib/Socket/Client/index.d.ts +3 -3
- package/lib/Socket/Client/index.js +19 -3
- package/lib/Socket/Client/mobile-socket-client.d.ts +13 -0
- package/lib/Socket/Client/mobile-socket-client.js +65 -0
- package/lib/Socket/Client/{websocket.d.ts → web-socket-client.d.ts} +2 -3
- package/lib/Socket/Client/web-socket-client.js +62 -0
- package/lib/Socket/business.d.ts +108 -154
- package/lib/Socket/business.js +43 -162
- package/lib/Socket/chats.d.ts +239 -96
- package/lib/Socket/chats.js +427 -627
- package/lib/Socket/communities.d.ts +146 -239
- package/lib/Socket/communities.js +80 -90
- package/lib/Socket/groups.d.ts +57 -104
- package/lib/Socket/groups.js +161 -154
- package/lib/Socket/index.d.ts +115 -202
- package/lib/Socket/index.js +10 -11
- package/lib/Socket/luxu.d.ts +266 -22
- package/lib/Socket/luxu.js +465 -422
- package/lib/Socket/messages-recv.d.ts +84 -136
- package/lib/Socket/messages-recv.js +615 -1421
- package/lib/Socket/messages-send.d.ts +126 -142
- package/lib/Socket/messages-send.js +671 -878
- package/lib/Socket/newsletter.d.ts +85 -121
- package/lib/Socket/newsletter.js +272 -147
- package/lib/Socket/registration.d.ts +267 -0
- package/lib/Socket/registration.js +166 -0
- package/lib/Socket/socket.d.ts +19 -34
- package/lib/Socket/socket.js +313 -544
- package/lib/Socket/usync.d.ts +36 -0
- package/lib/Socket/usync.js +70 -0
- package/lib/Store/index.d.ts +3 -10
- package/lib/Store/index.js +10 -10
- package/lib/Store/make-cache-manager-store.d.ts +11 -17
- package/lib/Store/make-cache-manager-store.js +41 -43
- package/lib/Store/make-in-memory-store.d.ts +118 -39
- package/lib/Store/make-in-memory-store.js +341 -112
- package/lib/Store/make-ordered-dictionary.d.ts +10 -11
- package/lib/Store/make-ordered-dictionary.js +20 -14
- package/lib/Store/object-repository.d.ts +9 -10
- package/lib/Store/object-repository.js +6 -11
- package/lib/Types/Auth.d.ts +12 -19
- package/lib/Types/Auth.js +2 -2
- package/lib/Types/Call.d.ts +1 -3
- package/lib/Types/Call.js +2 -2
- package/lib/Types/Chat.d.ts +13 -35
- package/lib/Types/Chat.js +4 -8
- package/lib/Types/Contact.d.ts +1 -8
- package/lib/Types/Contact.js +2 -2
- package/lib/Types/Events.d.ts +17 -116
- package/lib/Types/Events.js +2 -2
- package/lib/Types/GroupMetadata.d.ts +5 -21
- package/lib/Types/GroupMetadata.js +2 -2
- package/lib/Types/Label.d.ts +0 -12
- package/lib/Types/Label.js +5 -3
- package/lib/Types/LabelAssociation.d.ts +0 -1
- package/lib/Types/LabelAssociation.js +5 -3
- package/lib/Types/Message.d.ts +58 -105
- package/lib/Types/Message.js +9 -11
- package/lib/Types/Newsletter.d.ts +103 -0
- package/lib/Types/Newsletter.js +38 -0
- package/lib/Types/Product.d.ts +1 -2
- package/lib/Types/Product.js +2 -2
- package/lib/Types/Signal.d.ts +2 -32
- package/lib/Types/Signal.js +2 -2
- package/lib/Types/Socket.d.ts +25 -50
- package/lib/Types/Socket.js +2 -3
- package/lib/Types/State.d.ts +2 -72
- package/lib/Types/State.js +2 -56
- package/lib/Types/USync.d.ts +2 -3
- package/lib/Types/USync.js +2 -2
- package/lib/Types/index.d.ts +14 -22
- package/lib/Types/index.js +31 -15
- package/lib/Utils/auth-utils.d.ts +6 -12
- package/lib/Utils/auth-utils.js +143 -239
- 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 +2 -3
- package/lib/Utils/business.js +69 -66
- package/lib/Utils/chat-utils.d.ts +23 -52
- package/lib/Utils/chat-utils.js +253 -396
- package/lib/Utils/crypto.d.ts +22 -18
- package/lib/Utils/crypto.js +90 -57
- package/lib/Utils/decode-wa-message.d.ts +8 -55
- package/lib/Utils/decode-wa-message.js +84 -203
- package/lib/Utils/event-buffer.d.ts +8 -9
- package/lib/Utils/event-buffer.js +77 -185
- package/lib/Utils/generics.d.ts +29 -28
- package/lib/Utils/generics.js +210 -180
- package/lib/Utils/history.d.ts +9 -18
- package/lib/Utils/history.js +55 -93
- package/lib/Utils/index.d.ts +17 -22
- package/lib/Utils/index.js +33 -22
- package/lib/Utils/link-preview.d.ts +5 -5
- package/lib/Utils/link-preview.js +24 -16
- package/lib/Utils/logger.d.ts +3 -11
- package/lib/Utils/logger.js +7 -3
- package/lib/Utils/lt-hash.d.ts +12 -8
- package/lib/Utils/lt-hash.js +46 -3
- package/lib/Utils/make-mutex.d.ts +2 -4
- package/lib/Utils/make-mutex.js +34 -24
- package/lib/Utils/messages-media.d.ts +44 -61
- package/lib/Utils/messages-media.js +482 -451
- package/lib/Utils/messages.d.ts +18 -32
- package/lib/Utils/messages.js +369 -458
- package/lib/Utils/noise-handler.d.ts +14 -13
- package/lib/Utils/noise-handler.js +99 -145
- package/lib/Utils/process-message.d.ts +12 -31
- package/lib/Utils/process-message.js +150 -459
- package/lib/Utils/signal.d.ts +5 -20
- package/lib/Utils/signal.js +72 -120
- package/lib/Utils/use-multi-file-auth-state.d.ts +2 -2
- package/lib/Utils/use-multi-file-auth-state.js +27 -29
- package/lib/Utils/validate-connection.d.ts +7 -7
- package/lib/Utils/validate-connection.js +99 -73
- package/lib/WABinary/constants.d.ts +27 -25
- package/lib/WABinary/constants.js +20 -1281
- package/lib/WABinary/decode.d.ts +5 -5
- package/lib/WABinary/decode.js +42 -52
- package/lib/WABinary/encode.d.ts +3 -3
- package/lib/WABinary/encode.js +155 -110
- package/lib/WABinary/generic-utils.d.ts +7 -8
- package/lib/WABinary/generic-utils.js +49 -48
- package/lib/WABinary/index.d.ts +5 -6
- package/lib/WABinary/index.js +21 -6
- package/lib/WABinary/jid-utils.d.ts +8 -25
- package/lib/WABinary/jid-utils.js +40 -74
- package/lib/WABinary/types.d.ts +1 -2
- package/lib/WABinary/types.js +2 -2
- package/lib/WAM/BinaryInfo.d.ts +11 -3
- package/lib/WAM/BinaryInfo.js +5 -2
- package/lib/WAM/constants.d.ts +3 -5
- package/lib/WAM/constants.js +11958 -19461
- package/lib/WAM/encode.d.ts +3 -3
- package/lib/WAM/encode.js +22 -17
- package/lib/WAM/index.d.ts +3 -4
- package/lib/WAM/index.js +19 -4
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +3 -4
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +13 -33
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +2 -3
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +14 -11
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +2 -3
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +12 -9
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +2 -3
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +13 -9
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +3 -4
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +22 -20
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +3 -5
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +8 -13
- package/lib/WAUSync/Protocols/index.d.ts +4 -6
- package/lib/WAUSync/Protocols/index.js +20 -6
- package/lib/WAUSync/USyncQuery.d.ts +4 -6
- package/lib/WAUSync/USyncQuery.js +35 -44
- package/lib/WAUSync/USyncUser.d.ts +5 -10
- package/lib/WAUSync/USyncUser.js +5 -10
- package/lib/WAUSync/index.js +19 -4
- package/lib/index.d.ts +9 -10
- package/lib/index.js +34 -12
- package/package.json +50 -83
- package/WAProto/GenerateStatics.sh +0 -3
- package/WAProto/WAProto.proto +0 -5479
- package/WAProto/fix-imports.js +0 -85
- package/WAProto/index.d.ts +0 -14017
- package/lib/Signal/lid-mapping.d.ts +0 -23
- package/lib/Signal/lid-mapping.js +0 -277
- package/lib/Socket/Client/types.js +0 -11
- package/lib/Socket/Client/websocket.js +0 -54
- package/lib/Socket/mex.d.ts +0 -3
- package/lib/Socket/mex.js +0 -42
- package/lib/Store/keyed-db.d.ts +0 -22
- package/lib/Store/keyed-db.js +0 -108
- package/lib/Types/Bussines.d.ts +0 -25
- package/lib/Types/Bussines.js +0 -2
- package/lib/Types/Mex.d.ts +0 -141
- package/lib/Types/Mex.js +0 -37
- package/lib/Utils/browser-utils.d.ts +0 -4
- package/lib/Utils/browser-utils.js +0 -28
- package/lib/Utils/companion-reg-client-utils.d.ts +0 -17
- package/lib/Utils/companion-reg-client-utils.js +0 -35
- package/lib/Utils/identity-change-handler.d.ts +0 -44
- package/lib/Utils/identity-change-handler.js +0 -50
- package/lib/Utils/message-retry-manager.d.ts +0 -115
- package/lib/Utils/message-retry-manager.js +0 -265
- package/lib/Utils/offline-node-processor.d.ts +0 -17
- package/lib/Utils/offline-node-processor.js +0 -40
- package/lib/Utils/pre-key-manager.d.ts +0 -28
- package/lib/Utils/pre-key-manager.js +0 -106
- package/lib/Utils/reporting-utils.d.ts +0 -11
- package/lib/Utils/reporting-utils.js +0 -258
- package/lib/Utils/stanza-ack.d.ts +0 -11
- package/lib/Utils/stanza-ack.js +0 -38
- package/lib/Utils/sync-action-utils.d.ts +0 -19
- package/lib/Utils/sync-action-utils.js +0 -49
- package/lib/Utils/tc-token-utils.d.ts +0 -37
- package/lib/Utils/tc-token-utils.js +0 -163
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +0 -10
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +0 -25
- package/lib/WAUSync/index.d.ts +0 -4
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.USyncQuery = void 0;
|
|
4
|
+
const WABinary_1 = require("../WABinary");
|
|
5
|
+
const UsyncBotProfileProtocol_1 = require("./Protocols/UsyncBotProfileProtocol");
|
|
6
|
+
const UsyncLIDProtocol_1 = require("./Protocols/UsyncLIDProtocol");
|
|
7
|
+
const Protocols_1 = require("./Protocols");
|
|
8
|
+
class USyncQuery {
|
|
7
9
|
constructor() {
|
|
8
10
|
this.protocols = [];
|
|
9
11
|
this.users = [];
|
|
@@ -23,76 +25,65 @@ export class USyncQuery {
|
|
|
23
25
|
return this;
|
|
24
26
|
}
|
|
25
27
|
parseUSyncQueryResult(result) {
|
|
26
|
-
if (result
|
|
28
|
+
if (result.attrs.type !== 'result') {
|
|
27
29
|
return;
|
|
28
30
|
}
|
|
29
|
-
const protocolMap = Object.fromEntries(this.protocols.map(protocol => {
|
|
31
|
+
const protocolMap = Object.fromEntries(this.protocols.map((protocol) => {
|
|
30
32
|
return [protocol.name, protocol.parser];
|
|
31
33
|
}));
|
|
32
34
|
const queryResult = {
|
|
33
35
|
// TODO: implement errors etc.
|
|
34
36
|
list: [],
|
|
35
|
-
sideList: []
|
|
37
|
+
sideList: [],
|
|
36
38
|
};
|
|
37
|
-
const usyncNode = getBinaryNodeChild(result, 'usync');
|
|
39
|
+
const usyncNode = (0, WABinary_1.getBinaryNodeChild)(result, 'usync');
|
|
38
40
|
//TODO: implement error backoff, refresh etc.
|
|
39
41
|
//TODO: see if there are any errors in the result node
|
|
40
42
|
//const resultNode = getBinaryNodeChild(usyncNode, 'result')
|
|
41
|
-
const listNode =
|
|
42
|
-
if (
|
|
43
|
-
queryResult.list = listNode.content.
|
|
44
|
-
const id = node
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
})
|
|
58
|
-
.filter(([, b]) => b !== null))
|
|
59
|
-
: {};
|
|
60
|
-
acc.push({ ...data, id });
|
|
61
|
-
}
|
|
62
|
-
return acc;
|
|
63
|
-
}, []);
|
|
43
|
+
const listNode = (0, WABinary_1.getBinaryNodeChild)(usyncNode, 'list');
|
|
44
|
+
if (Array.isArray(listNode === null || listNode === void 0 ? void 0 : listNode.content) && typeof listNode !== 'undefined') {
|
|
45
|
+
queryResult.list = listNode.content.map((node) => {
|
|
46
|
+
const id = node === null || node === void 0 ? void 0 : node.attrs.jid;
|
|
47
|
+
const data = Array.isArray(node === null || node === void 0 ? void 0 : node.content) ? Object.fromEntries(node.content.map((content) => {
|
|
48
|
+
const protocol = content.tag;
|
|
49
|
+
const parser = protocolMap[protocol];
|
|
50
|
+
if (parser) {
|
|
51
|
+
return [protocol, parser(content)];
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
return [protocol, null];
|
|
55
|
+
}
|
|
56
|
+
}).filter(([, b]) => b !== null)) : {};
|
|
57
|
+
return { ...data, id };
|
|
58
|
+
});
|
|
64
59
|
}
|
|
65
60
|
//TODO: implement side list
|
|
66
61
|
//const sideListNode = getBinaryNodeChild(usyncNode, 'side_list')
|
|
67
62
|
return queryResult;
|
|
68
63
|
}
|
|
69
64
|
withDeviceProtocol() {
|
|
70
|
-
this.protocols.push(new USyncDeviceProtocol());
|
|
65
|
+
this.protocols.push(new Protocols_1.USyncDeviceProtocol());
|
|
71
66
|
return this;
|
|
72
67
|
}
|
|
73
68
|
withContactProtocol() {
|
|
74
|
-
this.protocols.push(new USyncContactProtocol());
|
|
69
|
+
this.protocols.push(new Protocols_1.USyncContactProtocol());
|
|
75
70
|
return this;
|
|
76
71
|
}
|
|
77
72
|
withStatusProtocol() {
|
|
78
|
-
this.protocols.push(new USyncStatusProtocol());
|
|
73
|
+
this.protocols.push(new Protocols_1.USyncStatusProtocol());
|
|
79
74
|
return this;
|
|
80
75
|
}
|
|
81
76
|
withDisappearingModeProtocol() {
|
|
82
|
-
this.protocols.push(new USyncDisappearingModeProtocol());
|
|
77
|
+
this.protocols.push(new Protocols_1.USyncDisappearingModeProtocol());
|
|
83
78
|
return this;
|
|
84
79
|
}
|
|
85
80
|
withBotProfileProtocol() {
|
|
86
|
-
this.protocols.push(new USyncBotProfileProtocol());
|
|
81
|
+
this.protocols.push(new UsyncBotProfileProtocol_1.USyncBotProfileProtocol());
|
|
87
82
|
return this;
|
|
88
83
|
}
|
|
89
84
|
withLIDProtocol() {
|
|
90
|
-
this.protocols.push(new USyncLIDProtocol());
|
|
91
|
-
return this;
|
|
92
|
-
}
|
|
93
|
-
withUsernameProtocol() {
|
|
94
|
-
this.protocols.push(new USyncUsernameProtocol());
|
|
85
|
+
this.protocols.push(new UsyncLIDProtocol_1.USyncLIDProtocol());
|
|
95
86
|
return this;
|
|
96
87
|
}
|
|
97
88
|
}
|
|
98
|
-
|
|
89
|
+
exports.USyncQuery = USyncQuery;
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
export declare class USyncUser {
|
|
2
|
-
id
|
|
3
|
-
lid
|
|
4
|
-
phone
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
type?: string;
|
|
8
|
-
personaId?: string;
|
|
2
|
+
id: string;
|
|
3
|
+
lid: string;
|
|
4
|
+
phone: string;
|
|
5
|
+
type: string;
|
|
6
|
+
personaId: string;
|
|
9
7
|
withId(id: string): this;
|
|
10
8
|
withLid(lid: string): this;
|
|
11
9
|
withPhone(phone: string): this;
|
|
12
|
-
withUsername(username: string): this;
|
|
13
|
-
withUsernameKey(usernameKey: string): this;
|
|
14
10
|
withType(type: string): this;
|
|
15
11
|
withPersonaId(personaId: string): this;
|
|
16
12
|
}
|
|
17
|
-
//# sourceMappingURL=USyncUser.d.ts.map
|
package/lib/WAUSync/USyncUser.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.USyncUser = void 0;
|
|
4
|
+
class USyncUser {
|
|
2
5
|
withId(id) {
|
|
3
6
|
this.id = id;
|
|
4
7
|
return this;
|
|
@@ -11,14 +14,6 @@ export class USyncUser {
|
|
|
11
14
|
this.phone = phone;
|
|
12
15
|
return this;
|
|
13
16
|
}
|
|
14
|
-
withUsername(username) {
|
|
15
|
-
this.username = username;
|
|
16
|
-
return this;
|
|
17
|
-
}
|
|
18
|
-
withUsernameKey(usernameKey) {
|
|
19
|
-
this.usernameKey = usernameKey;
|
|
20
|
-
return this;
|
|
21
|
-
}
|
|
22
17
|
withType(type) {
|
|
23
18
|
this.type = type;
|
|
24
19
|
return this;
|
|
@@ -28,4 +23,4 @@ export class USyncUser {
|
|
|
28
23
|
return this;
|
|
29
24
|
}
|
|
30
25
|
}
|
|
31
|
-
|
|
26
|
+
exports.USyncUser = USyncUser;
|
package/lib/WAUSync/index.js
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import makeWASocket from './Socket
|
|
2
|
-
export * from '../WAProto
|
|
3
|
-
export * from './Utils
|
|
4
|
-
export * from './Types
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './
|
|
1
|
+
import makeWASocket from './Socket';
|
|
2
|
+
export * from '../WAProto';
|
|
3
|
+
export * from './Utils';
|
|
4
|
+
export * from './Types';
|
|
5
|
+
export * from './Store';
|
|
6
|
+
export * from './Defaults';
|
|
7
|
+
export * from './WABinary';
|
|
8
|
+
export * from './WAM';
|
|
9
|
+
export * from './WAUSync';
|
|
10
10
|
export type WASocket = ReturnType<typeof makeWASocket>;
|
|
11
11
|
export { makeWASocket };
|
|
12
12
|
export default makeWASocket;
|
|
13
|
-
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
2
3
|
const chalk = require("chalk");
|
|
3
4
|
|
|
4
5
|
console.log(chalk.cyan(`
|
|
@@ -19,14 +20,35 @@ fetch('https://raw.githubusercontent.com/alannzxd/xclient/refs/heads/main/inform
|
|
|
19
20
|
console.log(chalk.yellow("📁 Information: ") + chalk.white(message));
|
|
20
21
|
console.log("");
|
|
21
22
|
});
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
|
|
24
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
27
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
28
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
29
|
+
}
|
|
30
|
+
Object.defineProperty(o, k2, desc);
|
|
31
|
+
}) : (function(o, m, k, k2) {
|
|
32
|
+
if (k2 === undefined) k2 = k;
|
|
33
|
+
o[k2] = m[k];
|
|
34
|
+
}));
|
|
35
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
|
+
};
|
|
38
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
+
};
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.makeWASocket = void 0;
|
|
43
|
+
const Socket_1 = __importDefault(require("./Socket"));
|
|
44
|
+
exports.makeWASocket = Socket_1.default;
|
|
45
|
+
__exportStar(require("../WAProto"), exports);
|
|
46
|
+
__exportStar(require("./Utils"), exports);
|
|
47
|
+
__exportStar(require("./Types"), exports);
|
|
48
|
+
__exportStar(require("./Store"), exports);
|
|
49
|
+
__exportStar(require("./Defaults"), exports);
|
|
50
|
+
__exportStar(require("./WABinary"), exports);
|
|
51
|
+
__exportStar(require("./WAM"), exports);
|
|
52
|
+
__exportStar(require("./WAUSync"), exports);
|
|
53
|
+
|
|
54
|
+
exports.default = Socket_1.default;
|
package/package.json
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alannxd/baileys",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"description": "WhatsApp API Modification",
|
|
3
|
+
"version": "6.0.6",
|
|
4
|
+
"description": "WhatsApp API Modification By AlannXD",
|
|
6
5
|
"keywords": [
|
|
7
6
|
"whatsapp",
|
|
8
|
-
"automation",
|
|
9
7
|
"baileys",
|
|
10
|
-
"
|
|
11
|
-
"whatsapp
|
|
12
|
-
"whatsapp
|
|
8
|
+
"whatsapp-web",
|
|
9
|
+
"whatsapp-chat",
|
|
10
|
+
"whatsapp-group",
|
|
13
11
|
"botwa",
|
|
14
|
-
"holow",
|
|
15
12
|
"alannxd"
|
|
16
13
|
],
|
|
17
14
|
"homepage": "https://www.npmjs.com/package/@alannxd/baileys",
|
|
@@ -23,8 +20,8 @@
|
|
|
23
20
|
"main": "lib/index.js",
|
|
24
21
|
"types": "lib/index.d.ts",
|
|
25
22
|
"files": [
|
|
26
|
-
"lib
|
|
27
|
-
"WAProto
|
|
23
|
+
"lib/*",
|
|
24
|
+
"WAProto/*.js",
|
|
28
25
|
"engine-requirements.js"
|
|
29
26
|
],
|
|
30
27
|
"scripts": {
|
|
@@ -43,99 +40,69 @@
|
|
|
43
40
|
"test": "jest"
|
|
44
41
|
},
|
|
45
42
|
"dependencies": {
|
|
46
|
-
"@
|
|
43
|
+
"@adiwajshing/keyed-db": "^0.2.4",
|
|
47
44
|
"@hapi/boom": "^9.1.3",
|
|
45
|
+
"@cacheable/node-cache": "^1.4.0",
|
|
48
46
|
"async-mutex": "^0.5.0",
|
|
47
|
+
"audio-decode": "^2.1.3",
|
|
48
|
+
"axios": "^1.3.3",
|
|
49
|
+
"cache-manager": "4.0.1",
|
|
50
|
+
"chalk": "^4.1.2",
|
|
51
|
+
"futoin-hkdf": "^1.5.1",
|
|
52
|
+
"libphonenumber-js": "^1.10.20",
|
|
53
|
+
"lodash": "^4.17.21",
|
|
49
54
|
"libsignal": "npm:@alannxd/libsignal-node@2.5.0",
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"pino": "^
|
|
54
|
-
"protobufjs": "^7.
|
|
55
|
-
"
|
|
56
|
-
"ws": "^8.13.0"
|
|
57
|
-
"chalk": "^4.1.2"
|
|
55
|
+
"music-metadata": "^7.12.3",
|
|
56
|
+
"node-cache": "^5.1.2",
|
|
57
|
+
"node-fetch": "^2.6.1",
|
|
58
|
+
"pino": "^7.0.0",
|
|
59
|
+
"protobufjs": "^7.2.4",
|
|
60
|
+
"uuid": "^9.0.0",
|
|
61
|
+
"ws": "^8.13.0"
|
|
58
62
|
},
|
|
59
63
|
"devDependencies": {
|
|
60
|
-
"@eslint
|
|
61
|
-
"@
|
|
62
|
-
"@types/jest": "^
|
|
63
|
-
"@types/node": "^
|
|
64
|
+
"@adiwajshing/eslint-config": "github:adiwajshing/eslint-config",
|
|
65
|
+
"@types/got": "^9.6.11",
|
|
66
|
+
"@types/jest": "^27.5.1",
|
|
67
|
+
"@types/node": "^16.0.0",
|
|
68
|
+
"@types/sharp": "^0.29.4",
|
|
64
69
|
"@types/ws": "^8.0.0",
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"conventional-changelog-angular": "^8.0.0",
|
|
70
|
-
"esbuild-register": "^3.6.0",
|
|
71
|
-
"eslint": "^9",
|
|
72
|
-
"eslint-config-prettier": "^10.1.2",
|
|
73
|
-
"eslint-plugin-prettier": "^5.4.0",
|
|
74
|
-
"jest": "^30.0.5",
|
|
75
|
-
"jimp": "^1.6.1",
|
|
76
|
-
"jiti": "^2.4.2",
|
|
77
|
-
"json": "^11.0.0",
|
|
70
|
+
"conventional-changelog-cli": "^2.2.2",
|
|
71
|
+
"eslint": "^8.0.0",
|
|
72
|
+
"jest": "^27.0.6",
|
|
73
|
+
"jimp": "^0.16.1",
|
|
78
74
|
"link-preview-js": "^3.0.0",
|
|
79
|
-
"lru-cache": "^11.1.0",
|
|
80
75
|
"open": "^8.4.2",
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"ts-
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"typedoc-plugin-markdown": "4.4.2",
|
|
90
|
-
"typescript": "^5.8.2"
|
|
76
|
+
"qrcode-terminal": "^0.12.0",
|
|
77
|
+
"release-it": "^15.10.3",
|
|
78
|
+
"sharp": "^0.30.5",
|
|
79
|
+
"ts-jest": "^27.0.3",
|
|
80
|
+
"ts-node": "^10.8.1",
|
|
81
|
+
"typedoc": "^0.24.7",
|
|
82
|
+
"typescript": "^4.6.4",
|
|
83
|
+
"json": "^11.0.0"
|
|
91
84
|
},
|
|
92
85
|
"peerDependencies": {
|
|
93
|
-
"
|
|
94
|
-
"jimp": "^1.6.1",
|
|
86
|
+
"jimp": "^0.16.1",
|
|
95
87
|
"link-preview-js": "^3.0.0",
|
|
96
|
-
"
|
|
97
|
-
|
|
98
|
-
"resolutions": {
|
|
99
|
-
"ajv@npm:^6.12.4": "^6.14.0",
|
|
100
|
-
"basic-ftp": "^5.2.4",
|
|
101
|
-
"brace-expansion@npm:^1.1.7": "^1.1.13",
|
|
102
|
-
"brace-expansion@npm:^2.0.1": "^2.0.3",
|
|
103
|
-
"flatted": "^3.4.2",
|
|
104
|
-
"glob@npm:^10.2.2": "^10.5.0",
|
|
105
|
-
"glob@npm:^10.3.10": "^10.5.0",
|
|
106
|
-
"glob@npm:^10.5.0": "^10.5.0",
|
|
107
|
-
"handlebars": "^4.7.9",
|
|
108
|
-
"ip-address": "^10.1.1",
|
|
109
|
-
"js-yaml@npm:^3.13.1": "^3.14.2",
|
|
110
|
-
"js-yaml@npm:^4.1.0": "^4.1.1",
|
|
111
|
-
"markdown-it": "^14.1.1",
|
|
112
|
-
"minimatch@npm:^3.0.4": "^3.1.5",
|
|
113
|
-
"minimatch@npm:^3.1.2": "^3.1.5",
|
|
114
|
-
"minimatch@npm:^5.0.1": "^5.1.8",
|
|
115
|
-
"minimatch@npm:^9.0.4": "^9.0.9",
|
|
116
|
-
"minimatch@npm:^9.0.5": "^9.0.9",
|
|
117
|
-
"picomatch@npm:^2.0.4": "^2.3.2",
|
|
118
|
-
"picomatch@npm:^2.3.1": "^2.3.2",
|
|
119
|
-
"picomatch@npm:^4.0.0": "^4.0.4",
|
|
120
|
-
"picomatch@npm:^4.0.2": "^4.0.4",
|
|
121
|
-
"socks": "^2.8.8",
|
|
122
|
-
"tar": "^7.5.11",
|
|
123
|
-
"tmp": "^0.2.5",
|
|
124
|
-
"underscore": "^1.13.8",
|
|
125
|
-
"yaml@npm:^2.6.1": "^2.8.4"
|
|
88
|
+
"qrcode-terminal": "^0.12.0",
|
|
89
|
+
"sharp": "^0.32.2"
|
|
126
90
|
},
|
|
127
91
|
"peerDependenciesMeta": {
|
|
128
|
-
"audio-decode": {
|
|
129
|
-
"optional": true
|
|
130
|
-
},
|
|
131
92
|
"jimp": {
|
|
132
93
|
"optional": true
|
|
133
94
|
},
|
|
134
95
|
"link-preview-js": {
|
|
135
96
|
"optional": true
|
|
97
|
+
},
|
|
98
|
+
"qrcode-terminal": {
|
|
99
|
+
"optional": true
|
|
100
|
+
},
|
|
101
|
+
"sharp": {
|
|
102
|
+
"optional": true
|
|
136
103
|
}
|
|
137
104
|
},
|
|
138
|
-
"packageManager": "yarn@
|
|
105
|
+
"packageManager": "yarn@1.22.19",
|
|
139
106
|
"engines": {
|
|
140
107
|
"node": ">=20.0.0"
|
|
141
108
|
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
yarn pbjs -t static-module --no-beautify -w es6 --no-bundle --no-delimited --no-verify --no-comments -o ./index.js ./WAProto.proto;
|
|
2
|
-
yarn pbjs -t static-module --no-beautify -w es6 --no-bundle --no-delimited --no-verify ./WAProto.proto | yarn pbts --no-comments -o ./index.d.ts -;
|
|
3
|
-
node ./fix-imports.js
|