Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
MR414N-ID
GitHub Repository: MR414N-ID/botku2
Path: blob/master/node_modules/@adiwajshing/baileys/lib/Socket/messages-recv.d.ts
1129 views
1
/// <reference types="ws" />
2
/// <reference types="node" />
3
import { proto } from '../../WAProto';
4
import { MessageReceiptType, MessageRelayOptions, SocketConfig } from '../Types';
5
import { BinaryNode } from '../WABinary';
6
export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
7
sendMessageAck: ({ tag, attrs }: BinaryNode) => Promise<void>;
8
sendRetryRequest: (node: BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
9
getPrivacyTokens: (jids: string[]) => Promise<BinaryNode>;
10
assertSessions: (jids: string[], force: boolean) => Promise<boolean>;
11
relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, useUserDevicesCache, cachedGroupMetadata }: MessageRelayOptions) => Promise<string>;
12
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: MessageReceiptType) => Promise<void>;
13
sendReceipts: (keys: proto.IMessageKey[], type: MessageReceiptType) => Promise<void>;
14
readMessages: (keys: proto.IMessageKey[]) => Promise<void>;
15
refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types").MediaConnInfo>;
16
waUploadToServer: import("../Types").WAMediaUploadFunction;
17
fetchPrivacySettings: (force?: boolean) => Promise<{
18
[_: string]: string;
19
}>;
20
updateMediaMessage: (message: proto.IWebMessageInfo) => Promise<proto.IWebMessageInfo>;
21
sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions) => Promise<proto.WebMessageInfo | undefined>;
22
groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>;
23
groupCreate: (subject: string, participants: string[]) => Promise<import("../Types").GroupMetadata>;
24
groupLeave: (id: string) => Promise<void>;
25
groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
26
groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types").ParticipantAction) => Promise<{
27
status: string;
28
jid: string;
29
}[]>;
30
groupUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>;
31
groupInviteCode: (jid: string) => Promise<string | undefined>;
32
groupRevokeInvite: (jid: string) => Promise<string | undefined>;
33
groupAcceptInvite: (code: string) => Promise<string | undefined>;
34
groupAcceptInviteV4: (key: string | proto.IMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<string>;
35
groupGetInviteInfo: (code: string) => Promise<import("../Types").GroupMetadata>;
36
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
37
groupSettingUpdate: (jid: string, setting: "announcement" | "locked" | "not_announcement" | "unlocked") => Promise<void>;
38
groupFetchAllParticipating: () => Promise<{
39
[_: string]: import("../Types").GroupMetadata;
40
}>;
41
processingMutex: {
42
mutex<T>(code: () => T | Promise<T>): Promise<T>;
43
};
44
upsertMessage: (msg: proto.IWebMessageInfo, type: import("../Types").MessageUpsertType) => Promise<void>;
45
appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>;
46
sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string | undefined) => Promise<void>;
47
presenceSubscribe: (toJid: string) => Promise<void>;
48
profilePictureUrl: (jid: string, type?: "image" | "preview", timeoutMs?: number | undefined) => Promise<string | undefined>;
49
onWhatsApp: (...jids: string[]) => Promise<{
50
exists: boolean;
51
jid: string;
52
}[]>;
53
fetchBlocklist: () => Promise<string[]>;
54
fetchStatus: (jid: string) => Promise<{
55
status: string | undefined;
56
setAt: Date;
57
} | undefined>;
58
updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>;
59
updateProfileStatus: (status: string) => Promise<void>;
60
updateProfileName: (name: string) => Promise<void>;
61
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
62
getBusinessProfile: (jid: string) => Promise<void | import("../Types").WABusinessProfile>;
63
resyncAppState: (collections: readonly ("critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular")[], recvChats: import("../Types").InitialReceivedChatsState | undefined) => Promise<void>;
64
chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>;
65
resyncMainAppState: (ctx?: import("../Types").InitialReceivedChatsState | undefined) => Promise<void>;
66
type: "md";
67
ws: import("ws");
68
ev: import("../Types").BaileysEventEmitter & {
69
process(handler: (events: Partial<import("../Types").BaileysEventMap<import("../Types").AuthenticationCreds>>) => void | Promise<void>): () => void;
70
buffer(): boolean;
71
createBufferedFunction<A extends any[], T_1>(work: (...args: A) => Promise<T_1>): (...args: A) => Promise<T_1>;
72
flush(): Promise<void>;
73
processInBuffer(task: Promise<any>): any;
74
};
75
authState: {
76
creds: import("../Types").AuthenticationCreds;
77
keys: import("../Types").SignalKeyStoreWithTransaction;
78
};
79
user: import("../Types").Contact | undefined;
80
generateMessageTag: () => string;
81
query: (node: BinaryNode, timeoutMs?: number | undefined) => Promise<BinaryNode>;
82
waitForMessage: (msgId: string, timeoutMs?: number | undefined) => Promise<any>;
83
waitForSocketOpen: () => Promise<void>;
84
sendRawMessage: (data: Buffer | Uint8Array) => Promise<void>;
85
sendNode: (frame: BinaryNode) => Promise<void>;
86
logout: () => Promise<void>;
87
end: (error: Error | undefined) => void;
88
onUnexpectedError: (error: Error, msg: string) => void;
89
uploadPreKeys: (count?: number) => Promise<void>;
90
waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>;
91
};
92
93