@queenanya/baileys 7.4.7 → 7.4.13
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/README.md +26 -26
- package/WAProto/index.js +97194 -67957
- package/lib/Defaults/baileys-version.json +1 -1
- package/lib/Defaults/index.d.ts +231 -1
- package/lib/Defaults/index.js +23 -11
- package/lib/Defaults/phonenumber-mcc.json +223 -0
- package/lib/Socket/Client/index.d.ts +3 -2
- package/lib/Socket/Client/index.js +3 -2
- 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 -1
- package/lib/Socket/Client/{websocket.js → web-socket-client.js} +2 -2
- package/lib/Socket/business.d.ts +22 -29
- package/lib/Socket/chats.d.ts +3 -14
- package/lib/Socket/chats.js +48 -76
- package/lib/Socket/groups.d.ts +4 -21
- package/lib/Socket/groups.js +1 -12
- package/lib/Socket/index.d.ts +32 -37
- package/lib/Socket/index.js +2 -2
- package/lib/Socket/messages-recv.d.ts +22 -28
- package/lib/Socket/messages-recv.js +180 -291
- package/lib/Socket/messages-send.d.ts +13 -23
- package/lib/Socket/messages-send.js +76 -110
- package/lib/Socket/newsletter.d.ts +7 -17
- package/lib/Socket/newsletter.js +54 -67
- package/lib/Socket/registration.d.ts +267 -0
- package/lib/Socket/registration.js +166 -0
- package/lib/Socket/socket.d.ts +1 -3
- package/lib/Socket/socket.js +17 -15
- package/lib/Store/make-cache-manager-store.d.ts +1 -2
- package/lib/Store/make-in-memory-store.js +11 -13
- package/lib/Store/make-ordered-dictionary.js +2 -2
- package/lib/Types/Auth.d.ts +6 -1
- package/lib/Types/Call.d.ts +1 -1
- package/lib/Types/Chat.d.ts +7 -12
- package/lib/Types/Contact.d.ts +1 -1
- package/lib/Types/Events.d.ts +2 -44
- package/lib/Types/GroupMetadata.d.ts +1 -3
- package/lib/Types/Label.d.ts +0 -11
- package/lib/Types/Message.d.ts +30 -37
- package/lib/Types/Newsletter.d.ts +13 -0
- package/lib/Types/Newsletter.js +15 -1
- package/lib/Types/Socket.d.ts +3 -10
- package/lib/Types/index.d.ts +0 -8
- package/lib/Utils/auth-utils.js +7 -1
- package/lib/Utils/chat-utils.d.ts +4 -5
- package/lib/Utils/chat-utils.js +20 -41
- package/lib/Utils/crypto.d.ts +1 -2
- package/lib/Utils/crypto.js +2 -4
- package/lib/Utils/decode-wa-message.d.ts +0 -1
- package/lib/Utils/decode-wa-message.js +14 -34
- package/lib/Utils/event-buffer.js +8 -14
- package/lib/Utils/generics.d.ts +13 -37
- package/lib/Utils/generics.js +18 -102
- package/lib/Utils/history.d.ts +2 -6
- package/lib/Utils/history.js +0 -3
- package/lib/Utils/index.d.ts +0 -1
- package/lib/Utils/index.js +0 -1
- package/lib/Utils/link-preview.js +1 -24
- package/lib/Utils/logger.d.ts +3 -1
- package/lib/Utils/make-mutex.js +0 -1
- package/lib/Utils/messages-media.d.ts +2 -3
- package/lib/Utils/messages-media.js +32 -17
- package/lib/Utils/messages.d.ts +0 -1
- package/lib/Utils/messages.js +72 -67
- package/lib/Utils/noise-handler.d.ts +3 -3
- package/lib/Utils/noise-handler.js +12 -7
- package/lib/Utils/process-message.d.ts +2 -3
- package/lib/Utils/process-message.js +21 -55
- package/lib/Utils/signal.js +16 -23
- package/lib/Utils/use-multi-file-auth-state.js +3 -17
- package/lib/Utils/validate-connection.d.ts +1 -0
- package/lib/Utils/validate-connection.js +44 -10
- package/lib/WABinary/constants.js +5 -5
- package/lib/WABinary/decode.d.ts +2 -3
- package/lib/WABinary/decode.js +4 -6
- package/lib/WABinary/encode.d.ts +2 -1
- package/lib/WABinary/encode.js +6 -8
- package/lib/WABinary/generic-utils.d.ts +0 -1
- package/lib/WABinary/jid-utils.d.ts +3 -3
- package/lib/WABinary/jid-utils.js +5 -5
- package/lib/WAM/BinaryInfo.d.ts +2 -3
- package/lib/WAM/constants.d.ts +2 -3
- package/lib/WAM/encode.d.ts +0 -1
- package/lib/WAM/encode.js +2 -2
- package/package.json +37 -39
- /package/lib/Socket/Client/{types.d.ts → abstract-socket-client.d.ts} +0 -0
- /package/lib/Socket/Client/{types.js → abstract-socket-client.js} +0 -0
package/lib/Socket/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/// <reference types="long" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
/// <reference types="node" />
|
|
4
2
|
import { UserFacingSocketConfig } from '../Types';
|
|
5
3
|
declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
6
|
-
|
|
4
|
+
register: (code: string) => Promise<import("./registration").ExistsResponse>;
|
|
5
|
+
requestRegistrationCode: (registrationOptions?: import("./registration").RegistrationOptions | undefined) => Promise<import("./registration").ExistsResponse>;
|
|
6
|
+
logger: import("pino").Logger<import("pino").LoggerOptions>;
|
|
7
7
|
getOrderDetails: (orderId: string, tokenBase64: string) => Promise<import("../Types").OrderDetails>;
|
|
8
8
|
getCatalog: ({ jid, limit, cursor }: import("../Types").GetCatalogOptions) => Promise<{
|
|
9
9
|
products: import("../Types").Product[];
|
|
@@ -17,30 +17,34 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
17
17
|
deleted: number;
|
|
18
18
|
}>;
|
|
19
19
|
productUpdate: (productId: string, update: import("../Types").ProductUpdate) => Promise<import("../Types").Product>;
|
|
20
|
-
sendMessageAck: ({ tag, attrs, content }: import("
|
|
21
|
-
sendRetryRequest: (node: import("
|
|
20
|
+
sendMessageAck: ({ tag, attrs, content }: import("../index").BinaryNode) => Promise<void>;
|
|
21
|
+
sendRetryRequest: (node: import("../index").BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
|
|
22
|
+
offerCall: (toJid: string, isVideo?: boolean) => Promise<{
|
|
23
|
+
id: string;
|
|
24
|
+
to: string;
|
|
25
|
+
}>;
|
|
22
26
|
rejectCall: (callId: string, callFrom: string) => Promise<void>;
|
|
23
|
-
|
|
24
|
-
requestPlaceholderResend: (messageKey: import("../Types").WAMessageKey) => Promise<string | undefined>;
|
|
25
|
-
getPrivacyTokens: (jids: string[]) => Promise<import("..").BinaryNode>;
|
|
27
|
+
getPrivacyTokens: (jids: string[]) => Promise<import("../index").BinaryNode>;
|
|
26
28
|
assertSessions: (jids: string[], force: boolean) => Promise<boolean>;
|
|
27
|
-
relayMessage: (jid: string, message: import("../Types").WAProto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache,
|
|
29
|
+
relayMessage: (jid: string, message: import("../Types").WAProto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, cachedGroupMetadata, statusJidList }: import("../Types").MessageRelayOptions) => Promise<string>;
|
|
28
30
|
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../Types").MessageReceiptType) => Promise<void>;
|
|
29
|
-
sendReceipts: (keys: import("../Types").
|
|
30
|
-
|
|
31
|
+
sendReceipts: (keys: import("../Types").WAProto.IMessageKey[], type: import("../Types").MessageReceiptType) => Promise<void>;
|
|
32
|
+
getButtonArgs: (message: import("../Types").WAProto.IMessage) => {
|
|
33
|
+
[key: string]: string;
|
|
34
|
+
};
|
|
35
|
+
readMessages: (keys: import("../Types").WAProto.IMessageKey[]) => Promise<void>;
|
|
31
36
|
refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types").MediaConnInfo>;
|
|
32
|
-
|
|
33
|
-
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
34
|
-
[_: string]: string;
|
|
35
|
-
}>;
|
|
36
|
-
sendPeerDataOperationMessage: (pdoMessage: import("../Types").WAProto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
|
|
37
|
+
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<import("../index").JidWithDevice[]>;
|
|
37
38
|
createParticipantNodes: (jids: string[], message: import("../Types").WAProto.IMessage, extraAttrs?: {
|
|
38
39
|
[key: string]: string;
|
|
39
40
|
} | undefined) => Promise<{
|
|
40
|
-
nodes: import("
|
|
41
|
+
nodes: import("../index").BinaryNode[];
|
|
41
42
|
shouldIncludeDeviceIdentity: boolean;
|
|
42
43
|
}>;
|
|
43
|
-
|
|
44
|
+
waUploadToServer: import("../Types").WAMediaUploadFunction;
|
|
45
|
+
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
46
|
+
[_: string]: string;
|
|
47
|
+
}>;
|
|
44
48
|
updateMediaMessage: (message: import("../Types").WAProto.IWebMessageInfo) => Promise<import("../Types").WAProto.IWebMessageInfo>;
|
|
45
49
|
sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions) => Promise<import("../Types").WAProto.WebMessageInfo | undefined>;
|
|
46
50
|
subscribeNewsletterUpdates: (jid: string) => Promise<{
|
|
@@ -55,13 +59,14 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
55
59
|
newsletterFollow: (jid: string) => Promise<void>;
|
|
56
60
|
newsletterUnmute: (jid: string) => Promise<void>;
|
|
57
61
|
newsletterMute: (jid: string) => Promise<void>;
|
|
58
|
-
|
|
62
|
+
newsletterAction: (jid: string, type: "mute" | "follow" | "unfollow" | "unmute") => Promise<void>;
|
|
63
|
+
newsletterCreate: (name: string, description: string, reaction_codes: string) => Promise<import("../Types").NewsletterMetadata>;
|
|
59
64
|
newsletterMetadata: (type: "invite" | "jid", key: string, role?: import("../Types").NewsletterViewRole | undefined) => Promise<import("../Types").NewsletterMetadata>;
|
|
60
65
|
newsletterAdminCount: (jid: string) => Promise<number>;
|
|
61
66
|
newsletterChangeOwner: (jid: string, user: string) => Promise<void>;
|
|
62
67
|
newsletterDemote: (jid: string, user: string) => Promise<void>;
|
|
63
68
|
newsletterDelete: (jid: string) => Promise<void>;
|
|
64
|
-
newsletterReactMessage: (jid: string,
|
|
69
|
+
newsletterReactMessage: (jid: string, serverId: string, code?: string | undefined) => Promise<void>;
|
|
65
70
|
newsletterFetchMessages: (type: "invite" | "jid", key: string, count: number, after?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>;
|
|
66
71
|
newsletterFetchUpdates: (jid: string, count: number, after?: number | undefined, since?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>;
|
|
67
72
|
groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>;
|
|
@@ -78,14 +83,13 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
78
83
|
groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types").ParticipantAction) => Promise<{
|
|
79
84
|
status: string;
|
|
80
85
|
jid: string;
|
|
81
|
-
content: import("
|
|
86
|
+
content: import("../index").BinaryNode;
|
|
82
87
|
}[]>;
|
|
83
88
|
groupUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>;
|
|
84
89
|
groupInviteCode: (jid: string) => Promise<string | undefined>;
|
|
85
90
|
groupRevokeInvite: (jid: string) => Promise<string | undefined>;
|
|
86
91
|
groupAcceptInvite: (code: string) => Promise<string | undefined>;
|
|
87
|
-
|
|
88
|
-
groupAcceptInviteV4: (key: string | import("../Types").WAMessageKey, inviteMessage: import("../Types").WAProto.Message.IGroupInviteMessage) => Promise<string>;
|
|
92
|
+
groupAcceptInviteV4: (key: string | import("../Types").WAProto.IMessageKey, inviteMessage: import("../Types").WAProto.Message.IGroupInviteMessage) => Promise<string>;
|
|
89
93
|
groupGetInviteInfo: (code: string) => Promise<import("../Types").GroupMetadata>;
|
|
90
94
|
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
|
|
91
95
|
groupSettingUpdate: (jid: string, setting: "announcement" | "locked" | "not_announcement" | "unlocked") => Promise<void>;
|
|
@@ -107,35 +111,26 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
107
111
|
jid: string;
|
|
108
112
|
}[]>;
|
|
109
113
|
fetchBlocklist: () => Promise<string[]>;
|
|
110
|
-
fetchDisappearingDuration: (...jids: string[]) => Promise<{
|
|
111
|
-
user: string;
|
|
112
|
-
duration: number;
|
|
113
|
-
setAt: Date;
|
|
114
|
-
}[]>;
|
|
115
114
|
fetchStatus: (jid: string) => Promise<{
|
|
116
115
|
status: string | undefined;
|
|
117
116
|
setAt: Date;
|
|
118
117
|
} | undefined>;
|
|
119
118
|
updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>;
|
|
120
|
-
updateProfilePictureFull: (jid: any, content: any) => Promise<void>;
|
|
121
|
-
updateProfilePictureFull2: (jid: any, content: any) => Promise<void>;
|
|
122
119
|
removeProfilePicture: (jid: string) => Promise<void>;
|
|
123
120
|
updateProfileStatus: (status: string) => Promise<void>;
|
|
124
121
|
updateProfileName: (name: string) => Promise<void>;
|
|
125
122
|
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
|
|
126
|
-
updateCallPrivacy: (value: import("../Types").WAPrivacyCallValue) => Promise<void>;
|
|
127
123
|
updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
128
124
|
updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>;
|
|
129
125
|
updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
130
126
|
updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
131
127
|
updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>;
|
|
132
|
-
updateGroupsAddPrivacy: (value: import("../Types").
|
|
128
|
+
updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
133
129
|
updateDefaultDisappearingMode: (duration: number) => Promise<void>;
|
|
134
130
|
getBusinessProfile: (jid: string) => Promise<void | import("../Types").WABusinessProfile>;
|
|
135
131
|
resyncAppState: (collections: readonly ("critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular")[], isInitialSync: boolean) => Promise<void>;
|
|
136
132
|
chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>;
|
|
137
133
|
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: string | number | undefined) => Promise<void>;
|
|
138
|
-
addLabel: (jid: string, labels: import("../Types/Label").LabelActionBody) => Promise<void>;
|
|
139
134
|
addChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
140
135
|
removeChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
141
136
|
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
@@ -145,7 +140,7 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
145
140
|
fromMe?: boolean | undefined;
|
|
146
141
|
}[], star: boolean) => Promise<void>;
|
|
147
142
|
type: "md";
|
|
148
|
-
ws:
|
|
143
|
+
ws: any;
|
|
149
144
|
ev: import("../Types").BaileysEventEmitter & {
|
|
150
145
|
process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void;
|
|
151
146
|
buffer(): void;
|
|
@@ -160,11 +155,11 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
160
155
|
signalRepository: import("../Types").SignalRepository;
|
|
161
156
|
user: import("../Types").Contact | undefined;
|
|
162
157
|
generateMessageTag: () => string;
|
|
163
|
-
query: (node: import("
|
|
158
|
+
query: (node: import("../index").BinaryNode, timeoutMs?: number | undefined) => Promise<import("../index").BinaryNode>;
|
|
164
159
|
waitForMessage: <T_2>(msgId: string, timeoutMs?: number | undefined) => Promise<T_2>;
|
|
165
160
|
waitForSocketOpen: () => Promise<void>;
|
|
166
161
|
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
|
|
167
|
-
sendNode: (frame: import("
|
|
162
|
+
sendNode: (frame: import("../index").BinaryNode) => Promise<void>;
|
|
168
163
|
logout: (msg?: string | undefined) => Promise<void>;
|
|
169
164
|
end: (error: Error | undefined) => void;
|
|
170
165
|
onUnexpectedError: (err: Error | import("@hapi/boom").Boom<any>, msg: string) => void;
|
|
@@ -172,6 +167,6 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
172
167
|
uploadPreKeysToServerIfRequired: () => Promise<void>;
|
|
173
168
|
requestPairingCode: (phoneNumber: string) => Promise<string>;
|
|
174
169
|
waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>;
|
|
175
|
-
sendWAMBuffer: (wamBuffer: Buffer) => Promise<import("
|
|
170
|
+
sendWAMBuffer: (wamBuffer: Buffer) => Promise<import("../index").BinaryNode>;
|
|
176
171
|
};
|
|
177
172
|
export default makeWASocket;
|
package/lib/Socket/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const Defaults_1 = require("../Defaults");
|
|
4
|
-
const
|
|
4
|
+
const registration_1 = require("./registration");
|
|
5
5
|
// export the last socket layer
|
|
6
|
-
const makeWASocket = (config) => ((0,
|
|
6
|
+
const makeWASocket = (config) => ((0, registration_1.makeRegistrationSocket)({
|
|
7
7
|
...Defaults_1.DEFAULT_CONNECTION_CONFIG,
|
|
8
8
|
...config
|
|
9
9
|
}));
|
|
@@ -1,34 +1,37 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
2
|
import { Boom } from '@hapi/boom';
|
|
4
3
|
import { proto } from '../../WAProto';
|
|
5
|
-
import { MessageReceiptType, MessageRelayOptions, SocketConfig
|
|
4
|
+
import { MessageReceiptType, MessageRelayOptions, SocketConfig } from '../Types';
|
|
6
5
|
import { BinaryNode } from '../WABinary';
|
|
7
6
|
export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
8
7
|
sendMessageAck: ({ tag, attrs, content }: BinaryNode) => Promise<void>;
|
|
9
8
|
sendRetryRequest: (node: BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
|
|
9
|
+
offerCall: (toJid: string, isVideo?: boolean) => Promise<{
|
|
10
|
+
id: string;
|
|
11
|
+
to: string;
|
|
12
|
+
}>;
|
|
10
13
|
rejectCall: (callId: string, callFrom: string) => Promise<void>;
|
|
11
|
-
fetchMessageHistory: (count: number, oldestMsgKey: WAMessageKey, oldestMsgTimestamp: number | Long) => Promise<string>;
|
|
12
|
-
requestPlaceholderResend: (messageKey: WAMessageKey) => Promise<string | undefined>;
|
|
13
14
|
getPrivacyTokens: (jids: string[]) => Promise<BinaryNode>;
|
|
14
15
|
assertSessions: (jids: string[], force: boolean) => Promise<boolean>;
|
|
15
|
-
relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache,
|
|
16
|
+
relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, cachedGroupMetadata, statusJidList }: MessageRelayOptions) => Promise<string>;
|
|
16
17
|
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: MessageReceiptType) => Promise<void>;
|
|
17
|
-
sendReceipts: (keys:
|
|
18
|
-
|
|
18
|
+
sendReceipts: (keys: proto.IMessageKey[], type: MessageReceiptType) => Promise<void>;
|
|
19
|
+
getButtonArgs: (message: proto.IMessage) => {
|
|
20
|
+
[key: string]: string;
|
|
21
|
+
};
|
|
22
|
+
readMessages: (keys: proto.IMessageKey[]) => Promise<void>;
|
|
19
23
|
refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types").MediaConnInfo>;
|
|
20
|
-
|
|
21
|
-
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
22
|
-
[_: string]: string;
|
|
23
|
-
}>;
|
|
24
|
-
sendPeerDataOperationMessage: (pdoMessage: proto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
|
|
24
|
+
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<import("../WABinary").JidWithDevice[]>;
|
|
25
25
|
createParticipantNodes: (jids: string[], message: proto.IMessage, extraAttrs?: {
|
|
26
26
|
[key: string]: string;
|
|
27
27
|
} | undefined) => Promise<{
|
|
28
28
|
nodes: BinaryNode[];
|
|
29
29
|
shouldIncludeDeviceIdentity: boolean;
|
|
30
30
|
}>;
|
|
31
|
-
|
|
31
|
+
waUploadToServer: import("../Types").WAMediaUploadFunction;
|
|
32
|
+
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
33
|
+
[_: string]: string;
|
|
34
|
+
}>;
|
|
32
35
|
updateMediaMessage: (message: proto.IWebMessageInfo) => Promise<proto.IWebMessageInfo>;
|
|
33
36
|
sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions) => Promise<proto.WebMessageInfo | undefined>;
|
|
34
37
|
subscribeNewsletterUpdates: (jid: string) => Promise<{
|
|
@@ -43,13 +46,14 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
|
43
46
|
newsletterFollow: (jid: string) => Promise<void>;
|
|
44
47
|
newsletterUnmute: (jid: string) => Promise<void>;
|
|
45
48
|
newsletterMute: (jid: string) => Promise<void>;
|
|
46
|
-
|
|
49
|
+
newsletterAction: (jid: string, type: "mute" | "follow" | "unfollow" | "unmute") => Promise<void>;
|
|
50
|
+
newsletterCreate: (name: string, description: string, reaction_codes: string) => Promise<import("../Types").NewsletterMetadata>;
|
|
47
51
|
newsletterMetadata: (type: "invite" | "jid", key: string, role?: import("../Types").NewsletterViewRole | undefined) => Promise<import("../Types").NewsletterMetadata>;
|
|
48
52
|
newsletterAdminCount: (jid: string) => Promise<number>;
|
|
49
53
|
newsletterChangeOwner: (jid: string, user: string) => Promise<void>;
|
|
50
54
|
newsletterDemote: (jid: string, user: string) => Promise<void>;
|
|
51
55
|
newsletterDelete: (jid: string) => Promise<void>;
|
|
52
|
-
newsletterReactMessage: (jid: string,
|
|
56
|
+
newsletterReactMessage: (jid: string, serverId: string, code?: string | undefined) => Promise<void>;
|
|
53
57
|
newsletterFetchMessages: (type: "invite" | "jid", key: string, count: number, after?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>;
|
|
54
58
|
newsletterFetchUpdates: (jid: string, count: number, after?: number | undefined, since?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>;
|
|
55
59
|
groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>;
|
|
@@ -72,8 +76,7 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
|
72
76
|
groupInviteCode: (jid: string) => Promise<string | undefined>;
|
|
73
77
|
groupRevokeInvite: (jid: string) => Promise<string | undefined>;
|
|
74
78
|
groupAcceptInvite: (code: string) => Promise<string | undefined>;
|
|
75
|
-
|
|
76
|
-
groupAcceptInviteV4: (key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<string>;
|
|
79
|
+
groupAcceptInviteV4: (key: string | proto.IMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<string>;
|
|
77
80
|
groupGetInviteInfo: (code: string) => Promise<import("../Types").GroupMetadata>;
|
|
78
81
|
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
|
|
79
82
|
groupSettingUpdate: (jid: string, setting: "announcement" | "locked" | "not_announcement" | "unlocked") => Promise<void>;
|
|
@@ -95,35 +98,26 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
|
95
98
|
jid: string;
|
|
96
99
|
}[]>;
|
|
97
100
|
fetchBlocklist: () => Promise<string[]>;
|
|
98
|
-
fetchDisappearingDuration: (...jids: string[]) => Promise<{
|
|
99
|
-
user: string;
|
|
100
|
-
duration: number;
|
|
101
|
-
setAt: Date;
|
|
102
|
-
}[]>;
|
|
103
101
|
fetchStatus: (jid: string) => Promise<{
|
|
104
102
|
status: string | undefined;
|
|
105
103
|
setAt: Date;
|
|
106
104
|
} | undefined>;
|
|
107
105
|
updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>;
|
|
108
|
-
updateProfilePictureFull: (jid: any, content: any) => Promise<void>;
|
|
109
|
-
updateProfilePictureFull2: (jid: any, content: any) => Promise<void>;
|
|
110
106
|
removeProfilePicture: (jid: string) => Promise<void>;
|
|
111
107
|
updateProfileStatus: (status: string) => Promise<void>;
|
|
112
108
|
updateProfileName: (name: string) => Promise<void>;
|
|
113
109
|
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
|
|
114
|
-
updateCallPrivacy: (value: import("../Types").WAPrivacyCallValue) => Promise<void>;
|
|
115
110
|
updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
116
111
|
updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>;
|
|
117
112
|
updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
118
113
|
updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
119
114
|
updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>;
|
|
120
|
-
updateGroupsAddPrivacy: (value: import("../Types").
|
|
115
|
+
updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
121
116
|
updateDefaultDisappearingMode: (duration: number) => Promise<void>;
|
|
122
117
|
getBusinessProfile: (jid: string) => Promise<void | import("../Types").WABusinessProfile>;
|
|
123
118
|
resyncAppState: (collections: readonly ("critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular")[], isInitialSync: boolean) => Promise<void>;
|
|
124
119
|
chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>;
|
|
125
120
|
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: string | number | undefined) => Promise<void>;
|
|
126
|
-
addLabel: (jid: string, labels: import("../Types/Label").LabelActionBody) => Promise<void>;
|
|
127
121
|
addChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
128
122
|
removeChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
129
123
|
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
@@ -133,7 +127,7 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
|
133
127
|
fromMe?: boolean | undefined;
|
|
134
128
|
}[], star: boolean) => Promise<void>;
|
|
135
129
|
type: "md";
|
|
136
|
-
ws:
|
|
130
|
+
ws: any;
|
|
137
131
|
ev: import("../Types").BaileysEventEmitter & {
|
|
138
132
|
process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void;
|
|
139
133
|
buffer(): void;
|