Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
jajbshjahavahh
GitHub Repository: jajbshjahavahh/Gojo-Satoru
Path: blob/master/node_modules/@adiwajshing/baileys/lib/LegacySocket/index.d_1.ts
2593 views
1
/// <reference types="node" />
2
/// <reference types="ws" />
3
import { LegacySocketConfig } from '../Types';
4
declare const makeLegacySocket: (config: Partial<LegacySocketConfig>) => {
5
groupMetadata: (jid: string, minimal: boolean) => Promise<import("../Types").GroupMetadata>;
6
groupCreate: (title: string, participants: string[]) => Promise<import("../Types").GroupMetadata>;
7
groupLeave: (id: string) => Promise<void>;
8
groupUpdateSubject: (id: string, title: string) => Promise<void>;
9
groupUpdateDescription: (jid: string, description: string) => Promise<{
10
status: number;
11
}>;
12
groupParticipantsUpdate: (id: string, participants: string[], action: import("../Types").ParticipantAction) => Promise<string[]>;
13
getBroadcastListInfo: (jid: string) => Promise<import("../Types").GroupMetadata>;
14
groupInviteCode: (jid: string) => Promise<string>;
15
relayMessage: (message: import("../Types").WAProto.IWebMessageInfo, { waitForAck }?: {
16
waitForAck: boolean;
17
}) => Promise<void>;
18
generateUrlInfo: (text: string) => Promise<import("../Types").WAUrlInfo>;
19
messageInfo: (jid: string, messageID: string) => Promise<import("../Types").WAProto.IUserReceipt[]>;
20
downloadMediaMessage: (message: import("../Types").WAProto.IWebMessageInfo, type?: "stream" | "buffer") => Promise<Buffer | import("stream").Readable>;
21
updateMediaMessage: (message: import("../Types").WAProto.IWebMessageInfo) => Promise<import("..").BinaryNode>;
22
fetchMessagesFromWA: (jid: string, count: number, cursor?: import("../Types").WAMessageCursor) => Promise<import("../Types").WAProto.WebMessageInfo[]>;
23
loadMessageFromWA: (jid: string, id: string) => Promise<import("../Types").WAProto.WebMessageInfo>;
24
searchMessages: (txt: string, inJid: string, count: number, page: number) => Promise<{
25
last: boolean;
26
messages: import("../Types").WAProto.WebMessageInfo[];
27
}>;
28
sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions & {
29
waitForAck?: boolean;
30
}) => Promise<import("../Types").WAProto.WebMessageInfo>;
31
sendChatsQuery: (epoch: number) => Promise<string>;
32
profilePictureUrl: (jid: string, timeoutMs?: number) => Promise<string>;
33
chatRead: (fromMessage: import("../Types").WAProto.IMessageKey, count: number) => Promise<void>;
34
chatModify: (modification: import("../Types").ChatModification, jid: string, chatInfo: Pick<import("../Types").Chat, "mute" | "pin">, timestampNow?: number) => Promise<void | {
35
status: number;
36
}>;
37
onWhatsApp: (str: string) => Promise<{
38
exists: boolean;
39
jid: string;
40
isBusiness: boolean;
41
}>;
42
sendPresenceUpdate: (type: import("../Types").WAPresence, jid: string) => Promise<string>;
43
presenceSubscribe: (jid: string) => Promise<string>;
44
getStatus: (jid: string) => Promise<{
45
status: string;
46
}>;
47
setStatus: (status: string) => Promise<{
48
status: number;
49
}>;
50
updateBusinessProfile: (profile: import("../Types").WABusinessProfile) => Promise<void>;
51
updateProfileName: (name: string) => Promise<{
52
status: number;
53
pushname: string;
54
}>;
55
updateProfilePicture(jid: string, img: Buffer): Promise<void>;
56
blockUser: (jid: string, type?: "add" | "remove") => Promise<void>;
57
getBusinessProfile: (jid: string) => Promise<import("../Types").WABusinessProfile>;
58
state: import("../Types").ConnectionState;
59
authInfo: import("../Types").LegacyAuthenticationCreds;
60
ev: import("../Types").LegacyBaileysEventEmitter;
61
canLogin: () => boolean;
62
logout: () => Promise<void>;
63
waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean, timeoutMs?: number) => Promise<void>;
64
type: "legacy";
65
ws: import("ws");
66
sendAdminTest: () => Promise<string>;
67
updateKeys: (info: {
68
encKey: Buffer;
69
macKey: Buffer;
70
}) => {
71
encKey: Buffer;
72
macKey: Buffer;
73
};
74
waitForSocketOpen: () => Promise<void>;
75
sendNode: ({ json, binaryTag, tag, longTag }: import("../Types").SocketSendMessageOptions) => Promise<string>;
76
generateMessageTag: (longTag?: boolean) => string;
77
waitForMessage: (tag: string, requiresPhoneConnection: boolean, timeoutMs?: number) => {
78
promise: Promise<any>;
79
cancelToken: () => void;
80
};
81
query: ({ json, timeoutMs, expect200, tag, longTag, binaryTag, requiresPhoneConnection }: import("../Types").SocketQueryOptions) => Promise<any>;
82
setQuery: (nodes: import("..").BinaryNode[], binaryTag?: import("../Types").WATag, tag?: string) => Promise<{
83
status: number;
84
}>;
85
currentEpoch: () => number;
86
end: (error: Error) => void;
87
};
88
export default makeLegacySocket;
89
90