supunmd-bail 2.1.1 → 2.1.3
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 +428 -0
- package/WAProto/index.js +130529 -45236
- package/engine-requirements.js +1 -1
- package/lib/Defaults/baileys-version.json +1 -1
- package/lib/Defaults/index.d.ts +9 -18
- package/lib/Defaults/index.js +136 -104
- 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 +0 -1
- package/lib/Signal/Group/queue-job.js +5 -2
- 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 -258
- package/lib/Socket/Client/{types.d.ts → abstract-socket-client.d.ts} +3 -2
- 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} +1 -2
- package/lib/Socket/Client/web-socket-client.js +62 -0
- package/lib/Socket/business.d.ts +108 -125
- package/lib/Socket/business.js +43 -159
- package/lib/Socket/chats.d.ts +239 -70
- package/lib/Socket/chats.js +384 -363
- package/lib/Socket/dugong.d.ts +254 -0
- package/lib/Socket/dugong.js +484 -0
- package/lib/Socket/groups.d.ts +56 -78
- package/lib/Socket/groups.js +96 -106
- package/lib/Socket/index.d.ts +115 -173
- package/lib/Socket/index.js +10 -17
- package/lib/Socket/messages-recv.d.ts +79 -91
- package/lib/Socket/messages-recv.js +521 -639
- package/lib/Socket/messages-send.d.ts +91 -111
- package/lib/Socket/messages-send.js +438 -599
- package/lib/Socket/newsletter.d.ts +84 -97
- package/lib/Socket/newsletter.js +1 -181
- package/lib/Socket/registration.d.ts +267 -0
- package/lib/Socket/registration.js +166 -0
- package/lib/Socket/socket.d.ts +18 -26
- package/lib/Socket/socket.js +230 -448
- package/lib/Socket/usync.d.ts +16 -17
- package/lib/Socket/usync.js +26 -19
- package/lib/Store/index.d.ts +3 -0
- package/lib/Store/index.js +10 -0
- package/lib/Store/make-cache-manager-store.d.ts +13 -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 +427 -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 +12 -13
- package/lib/Types/Auth.js +2 -2
- package/lib/Types/Call.d.ts +1 -2
- package/lib/Types/Call.js +2 -2
- package/lib/Types/Chat.d.ts +13 -34
- package/lib/Types/Chat.js +4 -8
- package/lib/Types/Contact.d.ts +1 -6
- package/lib/Types/Contact.js +2 -2
- package/lib/Types/Events.d.ts +15 -60
- package/lib/Types/Events.js +2 -2
- package/lib/Types/GroupMetadata.d.ts +5 -17
- 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 +54 -84
- package/lib/Types/Message.js +9 -11
- package/lib/Types/Newsletter.d.ts +98 -130
- package/lib/Types/Newsletter.js +38 -31
- package/lib/Types/Product.d.ts +1 -2
- package/lib/Types/Product.js +2 -2
- package/lib/Types/Signal.d.ts +1 -20
- package/lib/Types/Signal.js +2 -2
- package/lib/Types/Socket.d.ts +25 -47
- package/lib/Types/Socket.js +2 -3
- package/lib/Types/State.d.ts +2 -14
- package/lib/Types/State.js +2 -13
- 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 -7
- package/lib/Utils/auth-utils.js +148 -199
- package/lib/Utils/baileys-event-stream.d.ts +1 -2
- package/lib/Utils/baileys-event-stream.js +22 -15
- package/lib/Utils/business.d.ts +2 -3
- package/lib/Utils/business.js +69 -66
- package/lib/Utils/chat-utils.d.ts +22 -21
- package/lib/Utils/chat-utils.js +226 -260
- package/lib/Utils/crypto.d.ts +19 -19
- package/lib/Utils/crypto.js +86 -77
- package/lib/Utils/decode-wa-message.d.ts +8 -37
- package/lib/Utils/decode-wa-message.js +83 -164
- package/lib/Utils/event-buffer.d.ts +8 -7
- package/lib/Utils/event-buffer.js +76 -110
- package/lib/Utils/generics.d.ts +29 -27
- package/lib/Utils/generics.js +210 -168
- package/lib/Utils/history.d.ts +8 -12
- package/lib/Utils/history.js +46 -34
- package/lib/Utils/index.d.ts +17 -20
- package/lib/Utils/index.js +33 -20
- package/lib/Utils/link-preview.d.ts +5 -5
- package/lib/Utils/link-preview.js +22 -14
- package/lib/Utils/logger.d.ts +3 -11
- package/lib/Utils/logger.js +7 -3
- package/lib/Utils/lt-hash.d.ts +8 -9
- package/lib/Utils/lt-hash.js +28 -25
- package/lib/Utils/make-mutex.d.ts +2 -3
- package/lib/Utils/make-mutex.js +10 -7
- package/lib/Utils/messages-media.d.ts +44 -42
- package/lib/Utils/messages-media.js +475 -319
- package/lib/Utils/messages.d.ts +18 -17
- package/lib/Utils/messages.js +259 -383
- package/lib/Utils/noise-handler.d.ts +15 -14
- package/lib/Utils/noise-handler.js +38 -30
- package/lib/Utils/process-message.d.ts +13 -14
- package/lib/Utils/process-message.js +147 -239
- package/lib/Utils/signal.d.ts +5 -7
- package/lib/Utils/signal.js +72 -78
- 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 +106 -72
- 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 -28
- package/lib/WABinary/encode.d.ts +3 -3
- package/lib/WABinary/encode.js +154 -105
- package/lib/WABinary/generic-utils.d.ts +7 -5
- package/lib/WABinary/generic-utils.js +63 -56
- 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 +11 -8
- 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 -5
- package/lib/WAUSync/Protocols/index.js +20 -5
- package/lib/WAUSync/USyncQuery.d.ts +4 -5
- package/lib/WAUSync/USyncQuery.js +35 -40
- package/lib/WAUSync/USyncUser.d.ts +5 -6
- package/lib/WAUSync/USyncUser.js +5 -2
- package/lib/WAUSync/index.d.ts +3 -4
- package/lib/WAUSync/index.js +19 -4
- package/lib/index.d.ts +9 -19
- package/lib/index.js +1 -36
- package/package.json +109 -99
- package/WAProto/GenerateStatics.sh +0 -3
- package/WAProto/WAProto.proto +0 -5519
- package/WAProto/fix-imports.js +0 -29
- package/WAProto/index.d.ts +0 -11969
- package/lib/Signal/lid-mapping.d.ts +0 -23
- package/lib/Signal/lid-mapping.js +0 -171
- package/lib/Socket/Client/types.js +0 -11
- package/lib/Socket/Client/websocket.js +0 -50
- package/lib/Socket/communities.d.ts +0 -244
- package/lib/Socket/communities.js +0 -431
- package/lib/Socket/mex.d.ts +0 -3
- package/lib/Socket/mex.js +0 -42
- package/lib/Types/Bussines.d.ts +0 -25
- package/lib/Types/Bussines.js +0 -2
- package/lib/Utils/browser-utils.d.ts +0 -4
- package/lib/Utils/browser-utils.js +0 -28
- package/lib/Utils/message-retry-manager.d.ts +0 -82
- package/lib/Utils/message-retry-manager.js +0 -149
- package/lib/Utils/pre-key-manager.d.ts +0 -28
- package/lib/Utils/pre-key-manager.js +0 -106
- /package/lib/{supun → supunmd} +0 -0
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { LIDMapping, SignalKeyStoreWithTransaction } from '../Types/index.js';
|
|
2
|
-
import type { ILogger } from '../Utils/logger.js';
|
|
3
|
-
export declare class LIDMappingStore {
|
|
4
|
-
private readonly mappingCache;
|
|
5
|
-
private readonly keys;
|
|
6
|
-
private readonly logger;
|
|
7
|
-
private pnToLIDFunc?;
|
|
8
|
-
constructor(keys: SignalKeyStoreWithTransaction, logger: ILogger, pnToLIDFunc?: (jids: string[]) => Promise<LIDMapping[] | undefined>);
|
|
9
|
-
/**
|
|
10
|
-
* Store LID-PN mapping - USER LEVEL
|
|
11
|
-
*/
|
|
12
|
-
storeLIDPNMappings(pairs: LIDMapping[]): Promise<void>;
|
|
13
|
-
/**
|
|
14
|
-
* Get LID for PN - Returns device-specific LID based on user mapping
|
|
15
|
-
*/
|
|
16
|
-
getLIDForPN(pn: string): Promise<string | null>;
|
|
17
|
-
getLIDsForPNs(pns: string[]): Promise<LIDMapping[] | null>;
|
|
18
|
-
/**
|
|
19
|
-
* Get PN for LID - USER LEVEL with device construction
|
|
20
|
-
*/
|
|
21
|
-
getPNForLID(lid: string): Promise<string | null>;
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=lid-mapping.d.ts.map
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
import { LRUCache } from 'lru-cache';
|
|
2
|
-
import { isHostedPnUser, isLidUser, isPnUser, jidDecode, jidNormalizedUser, WAJIDDomains } from '../WABinary/index.js';
|
|
3
|
-
export class LIDMappingStore {
|
|
4
|
-
constructor(keys, logger, pnToLIDFunc) {
|
|
5
|
-
this.mappingCache = new LRUCache({
|
|
6
|
-
ttl: 7 * 24 * 60 * 60 * 1000, // 7 days
|
|
7
|
-
ttlAutopurge: true,
|
|
8
|
-
updateAgeOnGet: true
|
|
9
|
-
});
|
|
10
|
-
this.keys = keys;
|
|
11
|
-
this.pnToLIDFunc = pnToLIDFunc;
|
|
12
|
-
this.logger = logger;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Store LID-PN mapping - USER LEVEL
|
|
16
|
-
*/
|
|
17
|
-
async storeLIDPNMappings(pairs) {
|
|
18
|
-
// Validate inputs
|
|
19
|
-
const pairMap = {};
|
|
20
|
-
for (const { lid, pn } of pairs) {
|
|
21
|
-
if (!((isLidUser(lid) && isPnUser(pn)) || (isPnUser(lid) && isLidUser(pn)))) {
|
|
22
|
-
this.logger.warn(`Invalid LID-PN mapping: ${lid}, ${pn}`);
|
|
23
|
-
continue;
|
|
24
|
-
}
|
|
25
|
-
const lidDecoded = jidDecode(lid);
|
|
26
|
-
const pnDecoded = jidDecode(pn);
|
|
27
|
-
if (!lidDecoded || !pnDecoded)
|
|
28
|
-
return;
|
|
29
|
-
const pnUser = pnDecoded.user;
|
|
30
|
-
const lidUser = lidDecoded.user;
|
|
31
|
-
let existingLidUser = this.mappingCache.get(`pn:${pnUser}`);
|
|
32
|
-
if (!existingLidUser) {
|
|
33
|
-
this.logger.trace(`Cache miss for PN user ${pnUser}; checking database`);
|
|
34
|
-
const stored = await this.keys.get('lid-mapping', [pnUser]);
|
|
35
|
-
existingLidUser = stored[pnUser];
|
|
36
|
-
if (existingLidUser) {
|
|
37
|
-
// Update cache with database value
|
|
38
|
-
this.mappingCache.set(`pn:${pnUser}`, existingLidUser);
|
|
39
|
-
this.mappingCache.set(`lid:${existingLidUser}`, pnUser);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
if (existingLidUser === lidUser) {
|
|
43
|
-
this.logger.debug({ pnUser, lidUser }, 'LID mapping already exists, skipping');
|
|
44
|
-
continue;
|
|
45
|
-
}
|
|
46
|
-
pairMap[pnUser] = lidUser;
|
|
47
|
-
}
|
|
48
|
-
this.logger.trace({ pairMap }, `Storing ${Object.keys(pairMap).length} pn mappings`);
|
|
49
|
-
await this.keys.transaction(async () => {
|
|
50
|
-
for (const [pnUser, lidUser] of Object.entries(pairMap)) {
|
|
51
|
-
await this.keys.set({
|
|
52
|
-
'lid-mapping': {
|
|
53
|
-
[pnUser]: lidUser,
|
|
54
|
-
[`${lidUser}_reverse`]: pnUser
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
this.mappingCache.set(`pn:${pnUser}`, lidUser);
|
|
58
|
-
this.mappingCache.set(`lid:${lidUser}`, pnUser);
|
|
59
|
-
}
|
|
60
|
-
}, 'lid-mapping');
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Get LID for PN - Returns device-specific LID based on user mapping
|
|
64
|
-
*/
|
|
65
|
-
async getLIDForPN(pn) {
|
|
66
|
-
return (await this.getLIDsForPNs([pn]))?.[0]?.lid || null;
|
|
67
|
-
}
|
|
68
|
-
async getLIDsForPNs(pns) {
|
|
69
|
-
const usyncFetch = {};
|
|
70
|
-
// mapped from pn to lid mapping to prevent duplication in results later
|
|
71
|
-
const successfulPairs = {};
|
|
72
|
-
for (const pn of pns) {
|
|
73
|
-
if (!isPnUser(pn) && !isHostedPnUser(pn))
|
|
74
|
-
continue;
|
|
75
|
-
const decoded = jidDecode(pn);
|
|
76
|
-
if (!decoded)
|
|
77
|
-
continue;
|
|
78
|
-
// Check cache first for PN → LID mapping
|
|
79
|
-
const pnUser = decoded.user;
|
|
80
|
-
let lidUser = this.mappingCache.get(`pn:${pnUser}`);
|
|
81
|
-
if (!lidUser) {
|
|
82
|
-
// Cache miss - check database
|
|
83
|
-
const stored = await this.keys.get('lid-mapping', [pnUser]);
|
|
84
|
-
lidUser = stored[pnUser];
|
|
85
|
-
if (lidUser) {
|
|
86
|
-
this.mappingCache.set(`pn:${pnUser}`, lidUser);
|
|
87
|
-
this.mappingCache.set(`lid:${lidUser}`, pnUser);
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
this.logger.trace(`No LID mapping found for PN user ${pnUser}; batch getting from USync`);
|
|
91
|
-
const device = decoded.device || 0;
|
|
92
|
-
let normalizedPn = jidNormalizedUser(pn);
|
|
93
|
-
if (isHostedPnUser(normalizedPn)) {
|
|
94
|
-
normalizedPn = `${pnUser}@s.whatsapp.net`;
|
|
95
|
-
}
|
|
96
|
-
if (!usyncFetch[normalizedPn]) {
|
|
97
|
-
usyncFetch[normalizedPn] = [device];
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
usyncFetch[normalizedPn]?.push(device);
|
|
101
|
-
}
|
|
102
|
-
continue;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
lidUser = lidUser.toString();
|
|
106
|
-
if (!lidUser) {
|
|
107
|
-
this.logger.warn(`Invalid or empty LID user for PN ${pn}: lidUser = "${lidUser}"`);
|
|
108
|
-
return null;
|
|
109
|
-
}
|
|
110
|
-
// Push the PN device ID to the LID to maintain device separation
|
|
111
|
-
const pnDevice = decoded.device !== undefined ? decoded.device : 0;
|
|
112
|
-
const deviceSpecificLid = `${lidUser}${!!pnDevice ? `:${pnDevice}` : ``}@${decoded.server === 'hosted' ? 'hosted.lid' : 'lid'}`;
|
|
113
|
-
this.logger.trace(`getLIDForPN: ${pn} → ${deviceSpecificLid} (user mapping with device ${pnDevice})`);
|
|
114
|
-
successfulPairs[pn] = { lid: deviceSpecificLid, pn };
|
|
115
|
-
}
|
|
116
|
-
if (Object.keys(usyncFetch).length > 0) {
|
|
117
|
-
const result = await this.pnToLIDFunc?.(Object.keys(usyncFetch)); // this function already adds LIDs to mapping
|
|
118
|
-
if (result && result.length > 0) {
|
|
119
|
-
this.storeLIDPNMappings(result);
|
|
120
|
-
for (const pair of result) {
|
|
121
|
-
const pnDecoded = jidDecode(pair.pn);
|
|
122
|
-
const pnUser = pnDecoded?.user;
|
|
123
|
-
if (!pnUser)
|
|
124
|
-
continue;
|
|
125
|
-
const lidUser = jidDecode(pair.lid)?.user;
|
|
126
|
-
if (!lidUser)
|
|
127
|
-
continue;
|
|
128
|
-
for (const device of usyncFetch[pair.pn]) {
|
|
129
|
-
const deviceSpecificLid = `${lidUser}${!!device ? `:${device}` : ``}@${device === 99 ? 'hosted.lid' : 'lid'}`;
|
|
130
|
-
this.logger.trace(`getLIDForPN: USYNC success for ${pair.pn} → ${deviceSpecificLid} (user mapping with device ${device})`);
|
|
131
|
-
const deviceSpecificPn = `${pnUser}${!!device ? `:${device}` : ``}@${device === 99 ? 'hosted' : 's.whatsapp.net'}`;
|
|
132
|
-
successfulPairs[deviceSpecificPn] = { lid: deviceSpecificLid, pn: deviceSpecificPn };
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
else {
|
|
137
|
-
return null;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
return Object.values(successfulPairs);
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Get PN for LID - USER LEVEL with device construction
|
|
144
|
-
*/
|
|
145
|
-
async getPNForLID(lid) {
|
|
146
|
-
if (!isLidUser(lid))
|
|
147
|
-
return null;
|
|
148
|
-
const decoded = jidDecode(lid);
|
|
149
|
-
if (!decoded)
|
|
150
|
-
return null;
|
|
151
|
-
// Check cache first for LID → PN mapping
|
|
152
|
-
const lidUser = decoded.user;
|
|
153
|
-
let pnUser = this.mappingCache.get(`lid:${lidUser}`);
|
|
154
|
-
if (!pnUser || typeof pnUser !== 'string') {
|
|
155
|
-
// Cache miss - check database
|
|
156
|
-
const stored = await this.keys.get('lid-mapping', [`${lidUser}_reverse`]);
|
|
157
|
-
pnUser = stored[`${lidUser}_reverse`];
|
|
158
|
-
if (!pnUser || typeof pnUser !== 'string') {
|
|
159
|
-
this.logger.trace(`No reverse mapping found for LID user: ${lidUser}`);
|
|
160
|
-
return null;
|
|
161
|
-
}
|
|
162
|
-
this.mappingCache.set(`lid:${lidUser}`, pnUser);
|
|
163
|
-
}
|
|
164
|
-
// Construct device-specific PN JID
|
|
165
|
-
const lidDevice = decoded.device !== undefined ? decoded.device : 0;
|
|
166
|
-
const pnJid = `${pnUser}:${lidDevice}@${decoded.domainType === WAJIDDomains.HOSTED_LID ? 'hosted' : 's.whatsapp.net'}`;
|
|
167
|
-
this.logger.trace(`Found reverse mapping: ${lid} → ${pnJid}`);
|
|
168
|
-
return pnJid;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
//# sourceMappingURL=lid-mapping.js.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from 'events';
|
|
2
|
-
import { URL } from 'url';
|
|
3
|
-
export class AbstractSocketClient extends EventEmitter {
|
|
4
|
-
constructor(url, config) {
|
|
5
|
-
super();
|
|
6
|
-
this.url = url;
|
|
7
|
-
this.config = config;
|
|
8
|
-
this.setMaxListeners(0);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import WebSocket from 'ws';
|
|
2
|
-
import { DEFAULT_ORIGIN } from '../../Defaults/index.js';
|
|
3
|
-
import { AbstractSocketClient } from './types.js';
|
|
4
|
-
export class WebSocketClient extends AbstractSocketClient {
|
|
5
|
-
constructor() {
|
|
6
|
-
super(...arguments);
|
|
7
|
-
this.socket = null;
|
|
8
|
-
}
|
|
9
|
-
get isOpen() {
|
|
10
|
-
return this.socket?.readyState === WebSocket.OPEN;
|
|
11
|
-
}
|
|
12
|
-
get isClosed() {
|
|
13
|
-
return this.socket === null || this.socket?.readyState === WebSocket.CLOSED;
|
|
14
|
-
}
|
|
15
|
-
get isClosing() {
|
|
16
|
-
return this.socket === null || this.socket?.readyState === WebSocket.CLOSING;
|
|
17
|
-
}
|
|
18
|
-
get isConnecting() {
|
|
19
|
-
return this.socket?.readyState === WebSocket.CONNECTING;
|
|
20
|
-
}
|
|
21
|
-
async connect() {
|
|
22
|
-
if (this.socket) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
this.socket = new WebSocket(this.url, {
|
|
26
|
-
origin: DEFAULT_ORIGIN,
|
|
27
|
-
headers: this.config.options?.headers,
|
|
28
|
-
handshakeTimeout: this.config.connectTimeoutMs,
|
|
29
|
-
timeout: this.config.connectTimeoutMs,
|
|
30
|
-
agent: this.config.agent
|
|
31
|
-
});
|
|
32
|
-
this.socket.setMaxListeners(0);
|
|
33
|
-
const events = ['close', 'error', 'upgrade', 'message', 'open', 'ping', 'pong', 'unexpected-response'];
|
|
34
|
-
for (const event of events) {
|
|
35
|
-
this.socket?.on(event, (...args) => this.emit(event, ...args));
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
async close() {
|
|
39
|
-
if (!this.socket) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
this.socket.close();
|
|
43
|
-
this.socket = null;
|
|
44
|
-
}
|
|
45
|
-
send(str, cb) {
|
|
46
|
-
this.socket?.send(str, cb);
|
|
47
|
-
return Boolean(this.socket);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
//# sourceMappingURL=websocket.js.map
|
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
import { proto } from '../../WAProto/index.js';
|
|
2
|
-
import { type GroupMetadata, type ParticipantAction, type SocketConfig, type WAMessageKey } from '../Types/index.js';
|
|
3
|
-
import { type BinaryNode } from '../WABinary/index.js';
|
|
4
|
-
export declare const makeCommunitiesSocket: (config: SocketConfig) => {
|
|
5
|
-
communityMetadata: (jid: string) => Promise<GroupMetadata>;
|
|
6
|
-
communityCreate: (subject: string, body: string) => Promise<GroupMetadata | null>;
|
|
7
|
-
communityCreateGroup: (subject: string, participants: string[], parentCommunityJid: string) => Promise<GroupMetadata | null>;
|
|
8
|
-
communityLeave: (id: string) => Promise<void>;
|
|
9
|
-
communityUpdateSubject: (jid: string, subject: string) => Promise<void>;
|
|
10
|
-
communityLinkGroup: (groupJid: string, parentCommunityJid: string) => Promise<void>;
|
|
11
|
-
communityUnlinkGroup: (groupJid: string, parentCommunityJid: string) => Promise<void>;
|
|
12
|
-
communityFetchLinkedGroups: (jid: string) => Promise<{
|
|
13
|
-
communityJid: string;
|
|
14
|
-
isCommunity: boolean;
|
|
15
|
-
linkedGroups: {
|
|
16
|
-
id: string | undefined;
|
|
17
|
-
subject: string;
|
|
18
|
-
creation: number | undefined;
|
|
19
|
-
owner: string | undefined;
|
|
20
|
-
size: number | undefined;
|
|
21
|
-
}[];
|
|
22
|
-
}>;
|
|
23
|
-
communityRequestParticipantsList: (jid: string) => Promise<{
|
|
24
|
-
[key: string]: string;
|
|
25
|
-
}[]>;
|
|
26
|
-
communityRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
|
|
27
|
-
status: string;
|
|
28
|
-
jid: string | undefined;
|
|
29
|
-
}[]>;
|
|
30
|
-
communityParticipantsUpdate: (jid: string, participants: string[], action: ParticipantAction) => Promise<{
|
|
31
|
-
status: string;
|
|
32
|
-
jid: string | undefined;
|
|
33
|
-
content: BinaryNode;
|
|
34
|
-
}[]>;
|
|
35
|
-
communityUpdateDescription: (jid: string, description?: string) => Promise<void>;
|
|
36
|
-
communityInviteCode: (jid: string) => Promise<string | undefined>;
|
|
37
|
-
communityRevokeInvite: (jid: string) => Promise<string | undefined>;
|
|
38
|
-
communityAcceptInvite: (code: string) => Promise<string | undefined>;
|
|
39
|
-
/**
|
|
40
|
-
* revoke a v4 invite for someone
|
|
41
|
-
* @param communityJid community jid
|
|
42
|
-
* @param invitedJid jid of person you invited
|
|
43
|
-
* @returns true if successful
|
|
44
|
-
*/
|
|
45
|
-
communityRevokeInviteV4: (communityJid: string, invitedJid: string) => Promise<boolean>;
|
|
46
|
-
/**
|
|
47
|
-
* accept a CommunityInviteMessage
|
|
48
|
-
* @param key the key of the invite message, or optionally only provide the jid of the person who sent the invite
|
|
49
|
-
* @param inviteMessage the message to accept
|
|
50
|
-
*/
|
|
51
|
-
communityAcceptInviteV4: (key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<any>;
|
|
52
|
-
communityGetInviteInfo: (code: string) => Promise<GroupMetadata>;
|
|
53
|
-
communityToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
|
|
54
|
-
communitySettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
|
|
55
|
-
communityMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
|
|
56
|
-
communityJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
|
|
57
|
-
communityFetchAllParticipating: () => Promise<{
|
|
58
|
-
[_: string]: GroupMetadata;
|
|
59
|
-
}>;
|
|
60
|
-
logger: import("../Utils/logger.js").ILogger;
|
|
61
|
-
getOrderDetails: (orderId: string, tokenBase64: string) => Promise<import("../Types/index.js").OrderDetails>;
|
|
62
|
-
getCatalog: ({ jid, limit, cursor }: import("../Types/index.js").GetCatalogOptions) => Promise<{
|
|
63
|
-
products: import("../Types/index.js").Product[];
|
|
64
|
-
nextPageCursor: string | undefined;
|
|
65
|
-
}>;
|
|
66
|
-
getCollections: (jid?: string, limit?: number) => Promise<{
|
|
67
|
-
collections: import("../Types/index.js").CatalogCollection[];
|
|
68
|
-
}>;
|
|
69
|
-
productCreate: (create: import("../Types/index.js").ProductCreate) => Promise<import("../Types/index.js").Product>;
|
|
70
|
-
productDelete: (productIds: string[]) => Promise<{
|
|
71
|
-
deleted: number;
|
|
72
|
-
}>;
|
|
73
|
-
productUpdate: (productId: string, update: import("../Types/index.js").ProductUpdate) => Promise<import("../Types/index.js").Product>;
|
|
74
|
-
updateBussinesProfile: (args: import("../Types/Bussines.js").UpdateBussinesProfileProps) => Promise<any>;
|
|
75
|
-
updateCoverPhoto: (photo: import("../Types/index.js").WAMediaUpload) => Promise<number>;
|
|
76
|
-
removeCoverPhoto: (id: string) => Promise<any>;
|
|
77
|
-
sendMessageAck: ({ tag, attrs, content }: BinaryNode, errorCode?: number) => Promise<void>;
|
|
78
|
-
sendRetryRequest: (node: BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
|
|
79
|
-
rejectCall: (callId: string, callFrom: string) => Promise<void>;
|
|
80
|
-
fetchMessageHistory: (count: number, oldestMsgKey: WAMessageKey, oldestMsgTimestamp: number | Long) => Promise<string>;
|
|
81
|
-
requestPlaceholderResend: (messageKey: WAMessageKey) => Promise<string | undefined>;
|
|
82
|
-
messageRetryManager: import("../Utils/index.js").MessageRetryManager | null;
|
|
83
|
-
getPrivacyTokens: (jids: string[]) => Promise<any>;
|
|
84
|
-
assertSessions: (jids: string[]) => Promise<boolean>;
|
|
85
|
-
relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: import("../Types/index.js").MessageRelayOptions) => Promise<string>;
|
|
86
|
-
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../Types/index.js").MessageReceiptType) => Promise<void>;
|
|
87
|
-
sendReceipts: (keys: WAMessageKey[], type: import("../Types/index.js").MessageReceiptType) => Promise<void>;
|
|
88
|
-
readMessages: (keys: WAMessageKey[]) => Promise<void>;
|
|
89
|
-
refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types/index.js").MediaConnInfo>;
|
|
90
|
-
waUploadToServer: import("../Types/index.js").WAMediaUploadFunction;
|
|
91
|
-
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
92
|
-
[_: string]: string;
|
|
93
|
-
}>;
|
|
94
|
-
sendPeerDataOperationMessage: (pdoMessage: proto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
|
|
95
|
-
createParticipantNodes: (recipientJids: string[], message: proto.IMessage, extraAttrs?: BinaryNode["attrs"], dsmMessage?: proto.IMessage) => Promise<{
|
|
96
|
-
nodes: BinaryNode[];
|
|
97
|
-
shouldIncludeDeviceIdentity: boolean;
|
|
98
|
-
}>;
|
|
99
|
-
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(import("../WABinary/index.js").JidWithDevice & {
|
|
100
|
-
jid: string;
|
|
101
|
-
})[]>;
|
|
102
|
-
updateMediaMessage: (message: import("../Types/index.js").WAMessage) => Promise<import("../Types/index.js").WAMessage>;
|
|
103
|
-
sendMessage: (jid: string, content: import("../Types/index.js").AnyMessageContent, options?: import("../Types/index.js").MiscMessageGenerationOptions) => Promise<import("../Types/index.js").WAMessage | undefined>;
|
|
104
|
-
newsletterCreate: (name: string, description?: string) => Promise<import("../Types/index.js").NewsletterMetadata>;
|
|
105
|
-
newsletterUpdate: (jid: string, updates: import("../Types/index.js").NewsletterUpdate) => Promise<unknown>;
|
|
106
|
-
newsletterSubscribers: (jid: string) => Promise<{
|
|
107
|
-
subscribers: number;
|
|
108
|
-
}>;
|
|
109
|
-
newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("../Types/index.js").NewsletterMetadata | null>;
|
|
110
|
-
newsletterFollow: (jid: string) => Promise<unknown>;
|
|
111
|
-
newsletterUnfollow: (jid: string) => Promise<unknown>;
|
|
112
|
-
newsletterMute: (jid: string) => Promise<unknown>;
|
|
113
|
-
newsletterUnmute: (jid: string) => Promise<unknown>;
|
|
114
|
-
newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
|
|
115
|
-
newsletterUpdateDescription: (jid: string, description: string) => Promise<unknown>;
|
|
116
|
-
newsletterUpdatePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload) => Promise<unknown>;
|
|
117
|
-
newsletterRemovePicture: (jid: string) => Promise<unknown>;
|
|
118
|
-
newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
|
|
119
|
-
newsletterFetchMessages: (jid: string, count: number, since: number, after: number) => Promise<any>;
|
|
120
|
-
subscribeNewsletterUpdates: (jid: string) => Promise<{
|
|
121
|
-
duration: string;
|
|
122
|
-
} | null>;
|
|
123
|
-
newsletterAdminCount: (jid: string) => Promise<number>;
|
|
124
|
-
newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
|
|
125
|
-
newsletterDemote: (jid: string, userJid: string) => Promise<void>;
|
|
126
|
-
newsletterDelete: (jid: string) => Promise<void>;
|
|
127
|
-
groupMetadata: (jid: string) => Promise<GroupMetadata>;
|
|
128
|
-
groupCreate: (subject: string, participants: string[]) => Promise<GroupMetadata>;
|
|
129
|
-
groupLeave: (id: string) => Promise<void>;
|
|
130
|
-
groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
|
|
131
|
-
groupRequestParticipantsList: (jid: string) => Promise<{
|
|
132
|
-
[key: string]: string;
|
|
133
|
-
}[]>;
|
|
134
|
-
groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
|
|
135
|
-
status: string;
|
|
136
|
-
jid: string | undefined;
|
|
137
|
-
}[]>;
|
|
138
|
-
groupParticipantsUpdate: (jid: string, participants: string[], action: ParticipantAction) => Promise<{
|
|
139
|
-
status: string;
|
|
140
|
-
jid: string | undefined;
|
|
141
|
-
content: BinaryNode;
|
|
142
|
-
}[]>;
|
|
143
|
-
groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
|
|
144
|
-
groupInviteCode: (jid: string) => Promise<string | undefined>;
|
|
145
|
-
groupRevokeInvite: (jid: string) => Promise<string | undefined>;
|
|
146
|
-
groupAcceptInvite: (code: string) => Promise<string | undefined>;
|
|
147
|
-
groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
|
|
148
|
-
groupAcceptInviteV4: (key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<any>;
|
|
149
|
-
groupGetInviteInfo: (code: string) => Promise<GroupMetadata>;
|
|
150
|
-
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
|
|
151
|
-
groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
|
|
152
|
-
groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
|
|
153
|
-
groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
|
|
154
|
-
groupFetchAllParticipating: () => Promise<{
|
|
155
|
-
[_: string]: GroupMetadata;
|
|
156
|
-
}>;
|
|
157
|
-
createCallLink: (type: "audio" | "video", event?: {
|
|
158
|
-
startTime: number;
|
|
159
|
-
}, timeoutMs?: number) => Promise<string | undefined>;
|
|
160
|
-
getBotListV2: () => Promise<import("../Types/index.js").BotListInfo[]>;
|
|
161
|
-
processingMutex: {
|
|
162
|
-
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
163
|
-
};
|
|
164
|
-
upsertMessage: (msg: import("../Types/index.js").WAMessage, type: import("../Types/index.js").MessageUpsertType) => Promise<void>;
|
|
165
|
-
appPatch: (patchCreate: import("../Types/index.js").WAPatchCreate) => Promise<void>;
|
|
166
|
-
sendPresenceUpdate: (type: import("../Types/index.js").WAPresence, toJid?: string) => Promise<void>;
|
|
167
|
-
presenceSubscribe: (toJid: string, tcToken?: Buffer) => Promise<void>;
|
|
168
|
-
profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
|
|
169
|
-
fetchBlocklist: () => Promise<(string | undefined)[]>;
|
|
170
|
-
fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
171
|
-
fetchDisappearingDuration: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
172
|
-
updateProfilePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload, dimensions?: {
|
|
173
|
-
width: number;
|
|
174
|
-
height: number;
|
|
175
|
-
}) => Promise<void>;
|
|
176
|
-
removeProfilePicture: (jid: string) => Promise<void>;
|
|
177
|
-
updateProfileStatus: (status: string) => Promise<void>;
|
|
178
|
-
updateProfileName: (name: string) => Promise<void>;
|
|
179
|
-
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
|
|
180
|
-
updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
|
|
181
|
-
updateCallPrivacy: (value: import("../Types/index.js").WAPrivacyCallValue) => Promise<void>;
|
|
182
|
-
updateMessagesPrivacy: (value: import("../Types/index.js").WAPrivacyMessagesValue) => Promise<void>;
|
|
183
|
-
updateLastSeenPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
|
|
184
|
-
updateOnlinePrivacy: (value: import("../Types/index.js").WAPrivacyOnlineValue) => Promise<void>;
|
|
185
|
-
updateProfilePicturePrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
|
|
186
|
-
updateStatusPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
|
|
187
|
-
updateReadReceiptsPrivacy: (value: import("../Types/index.js").WAReadReceiptsValue) => Promise<void>;
|
|
188
|
-
updateGroupsAddPrivacy: (value: import("../Types/index.js").WAPrivacyGroupAddValue) => Promise<void>;
|
|
189
|
-
updateDefaultDisappearingMode: (duration: number) => Promise<void>;
|
|
190
|
-
getBusinessProfile: (jid: string) => Promise<import("../Types/index.js").WABusinessProfile | void>;
|
|
191
|
-
resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
|
|
192
|
-
chatModify: (mod: import("../Types/index.js").ChatModification, jid: string) => Promise<void>;
|
|
193
|
-
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
|
|
194
|
-
addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
|
|
195
|
-
removeContact: (jid: string) => Promise<void>;
|
|
196
|
-
addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
|
|
197
|
-
addChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
198
|
-
removeChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
199
|
-
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
200
|
-
removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
201
|
-
star: (jid: string, messages: {
|
|
202
|
-
id: string;
|
|
203
|
-
fromMe?: boolean;
|
|
204
|
-
}[], star: boolean) => Promise<void>;
|
|
205
|
-
addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
|
|
206
|
-
removeQuickReply: (timestamp: string) => Promise<void>;
|
|
207
|
-
type: "md";
|
|
208
|
-
ws: import("./Client/websocket.js").WebSocketClient;
|
|
209
|
-
ev: import("../Types/index.js").BaileysEventEmitter & {
|
|
210
|
-
process(handler: (events: Partial<import("../Types/index.js").BaileysEventMap>) => void | Promise<void>): () => void;
|
|
211
|
-
buffer(): void;
|
|
212
|
-
createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
|
|
213
|
-
flush(): boolean;
|
|
214
|
-
isBuffering(): boolean;
|
|
215
|
-
};
|
|
216
|
-
authState: {
|
|
217
|
-
creds: import("../Types/index.js").AuthenticationCreds;
|
|
218
|
-
keys: import("../Types/index.js").SignalKeyStoreWithTransaction;
|
|
219
|
-
};
|
|
220
|
-
signalRepository: import("../Types/index.js").SignalRepositoryWithLIDStore;
|
|
221
|
-
user: import("../Types/index.js").Contact | undefined;
|
|
222
|
-
generateMessageTag: () => string;
|
|
223
|
-
query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
|
|
224
|
-
waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
|
|
225
|
-
waitForSocketOpen: () => Promise<void>;
|
|
226
|
-
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
|
|
227
|
-
sendNode: (frame: BinaryNode) => Promise<void>;
|
|
228
|
-
logout: (msg?: string) => Promise<void>;
|
|
229
|
-
end: (error: Error | undefined) => void;
|
|
230
|
-
onUnexpectedError: (err: Error | import("@hapi/boom").Boom, msg: string) => void;
|
|
231
|
-
uploadPreKeys: (count?: number, retryCount?: number) => Promise<void>;
|
|
232
|
-
uploadPreKeysToServerIfRequired: () => Promise<void>;
|
|
233
|
-
requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
|
|
234
|
-
wamBuffer: import("../index.js").BinaryInfo;
|
|
235
|
-
waitForConnectionUpdate: (check: (u: Partial<import("../Types/index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
236
|
-
sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
|
|
237
|
-
executeUSyncQuery: (usyncQuery: import("../index.js").USyncQuery) => Promise<import("../index.js").USyncQueryResult | undefined>;
|
|
238
|
-
onWhatsApp: (...phoneNumber: string[]) => Promise<{
|
|
239
|
-
jid: string;
|
|
240
|
-
exists: boolean;
|
|
241
|
-
}[] | undefined>;
|
|
242
|
-
};
|
|
243
|
-
export declare const extractCommunityMetadata: (result: BinaryNode) => GroupMetadata;
|
|
244
|
-
//# sourceMappingURL=communities.d.ts.map
|