import { Boom } from "@hapi/boom"; import { proto } from "../../WAProto"; import { BotListInfo, ChatModification, ContactAction, MessageUpsertType, SocketConfig, WABusinessProfile, WAMediaUpload, WAPatchCreate, WAPresence, WAPrivacyCallValue, WAPrivacyGroupAddValue, WAPrivacyMessagesValue, WAPrivacyOnlineValue, WAPrivacyValue, WAReadReceiptsValue, } from "../Types"; import { LabelActionBody } from "../Types/Label"; import { BinaryNode } from "../WABinary"; import { USyncQuery } from "../WAUSync"; export declare const makeChatsSocket: (config: SocketConfig) => { processingMutex: { mutex(code: () => T | Promise): Promise; }; fetchPrivacySettings: (force?: boolean) => Promise<{ [_: string]: string; }>; upsertMessage: ( msg: proto.IWebMessageInfo, type: MessageUpsertType, ) => Promise; appPatch: (patchCreate: WAPatchCreate) => Promise; sendPresenceUpdate: (type: WAPresence, toJid?: string) => Promise; presenceSubscribe: (toJid: string, tcToken?: Buffer) => Promise; getBotListV2: () => Promise; getLidUser: (jid: string) => Promise< | { lid: string; id: string; }[] | undefined >; onWhatsApp: (...jids: string[]) => Promise< | { jid: string; exists: unknown; }[] | undefined >; fetchBlocklist: () => Promise; fetchStatus: ( ...jids: string[] ) => Promise; fetchDisappearingDuration: ( ...jids: string[] ) => Promise; updateProfilePicture: (jid: string, content: WAMediaUpload) => Promise; removeProfilePicture: (jid: string) => Promise; updateProfileStatus: (status: string) => Promise; updateProfileName: (name: string) => Promise; updateBlockStatus: ( jid: string, action: "block" | "unblock", ) => Promise; updateCallPrivacy: (value: WAPrivacyCallValue) => Promise; updateMessagesPrivacy: (value: WAPrivacyMessagesValue) => Promise; updateLastSeenPrivacy: (value: WAPrivacyValue) => Promise; updateOnlinePrivacy: (value: WAPrivacyOnlineValue) => Promise; updateProfilePicturePrivacy: (value: WAPrivacyValue) => Promise; updateStatusPrivacy: (value: WAPrivacyValue) => Promise; updateReadReceiptsPrivacy: (value: WAReadReceiptsValue) => Promise; updateGroupsAddPrivacy: (value: WAPrivacyGroupAddValue) => Promise; updateDefaultDisappearingMode: (duration: number) => Promise; getBusinessProfile: (jid: string) => Promise; resyncAppState: ( collections: readonly ( | "critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular" )[], isInitialSync: boolean, ) => Promise; chatModify: (mod: ChatModification, jid: string) => Promise; cleanDirtyBits: ( type: "account_sync" | "groups", fromTimestamp?: number | string, ) => Promise; addLabel: (jid: string, labels: LabelActionBody) => Promise; addChatLabel: (jid: string, labelId: string) => Promise; removeChatLabel: (jid: string, labelId: string) => Promise; addMessageLabel: ( jid: string, messageId: string, labelId: string, ) => Promise; removeMessageLabel: ( jid: string, messageId: string, labelId: string, ) => Promise; clearMessage: ( jid: string, key: import("../Types").WAProto.IMessageKey, timeStamp: number | import("long").Long, ) => Promise; star: ( jid: string, messages: { id: string; fromMe?: boolean; }[], star: boolean, ) => Promise; addOrEditContact: (jid: string, contact: ContactAction) => Promise; removeContact: (jid: string) => Promise; executeUSyncQuery: ( usyncQuery: USyncQuery, ) => Promise; type: "md"; ws: import("./Client").WebSocketClient; ev: import("../Types").BaileysEventEmitter & { process( handler: ( events: Partial, ) => void | Promise, ): () => void; buffer(): void; createBufferedFunction( work: (...args: A) => Promise, ): (...args: A) => Promise; flush(force?: boolean | undefined): boolean; isBuffering(): boolean; }; authState: { creds: import("../Types").AuthenticationCreds; keys: import("../Types").SignalKeyStoreWithTransaction; }; signalRepository: import("../Types").SignalRepository; user: import("../Types").Contact | undefined; generateMessageTag: () => string; query: ( node: BinaryNode, timeoutMs?: number | undefined, ) => Promise; waitForMessage: ( msgId: string, timeoutMs?: number | undefined, ) => Promise; waitForSocketOpen: () => Promise; sendRawMessage: (data: Uint8Array | Buffer) => Promise; sendNode: (frame: BinaryNode) => Promise; logout: (msg?: string | undefined) => Promise; end: (error: Error | undefined) => void; onUnexpectedError: (err: Error | Boom, msg: string) => void; uploadPreKeys: (count?: number) => Promise; uploadPreKeysToServerIfRequired: () => Promise; requestPairingCode: (phoneNumber: string, code?: string) => Promise; waitForConnectionUpdate: ( check: ( u: Partial, ) => boolean | undefined, timeoutMs?: number | undefined, ) => Promise; /** * modify a chat -- mark unread, read etc. * lastMessages must be sorted in reverse chronologically * requires the last messages till the last message received required for archive & unread */ sendWAMBuffer: (wamBuffer: Buffer) => Promise; };