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