import { Boom } from '@hapi/boom' import { proto } from '../../WAProto' import { AnyMessageContent, MediaConnInfo, ContactAction, MessageReceiptType, MessageRelayOptions, MiscMessageGenerationOptions, SocketConfig, WAMessageKey } from '../Types' import { BinaryNode, JidWithDevice } from '../WABinary' import { USyncQuery } from '../WAUSync' export declare const makeMessagesSocket: (config: SocketConfig) => { getPrivacyTokens: (jids: string[]) => Promise assertSessions: (jids: string[], force: boolean) => Promise relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: MessageRelayOptions) => Promise sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: MessageReceiptType) => Promise sendReceipts: (keys: WAMessageKey[], type: MessageReceiptType) => Promise readMessages: (keys: WAMessageKey[]) => Promise refreshMediaConn: (forceGet?: boolean) => Promise waUploadToServer: import("../Types").WAMediaUploadFunction fetchPrivacySettings: (force?: boolean) => Promise<{ [_: string]: string }> sendPeerDataOperationMessage: (pdoMessage: proto.Message.IPeerDataOperationRequestMessage) => Promise createParticipantNodes: (jids: string[], message: proto.IMessage, extraAttrs?: BinaryNode['attrs']) => Promise<{ nodes: BinaryNode[] shouldIncludeDeviceIdentity: boolean }> profilePictureUrl: (jid: string) => Promise getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise updateMediaMessage: (message: proto.IWebMessageInfo) => Promise sendStatusMentions: (content: import("../Types").WAProto.IMessage, jid: string, Private?: boolean) => Promise sendAlbumMessage: (jid: string, medias: import("../Types").WAProto.IMessage, options?: import("../Types").MiscMessageGenerationOptions) => Promise sendMessage: (jid: string, content: AnyMessageContent, options?: MiscMessageGenerationOptions) => Promise subscribeNewsletterUpdates: (jid: string) => Promise<{ duration: string }> newsletterReactionMode: (jid: string, mode: import("../Types").NewsletterReactionMode) => Promise newsletterUpdateDescription: (jid: string, description?: string | undefined) => Promise newsletterUpdateName: (jid: string, name: string) => Promise newsletterUpdatePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise newsletterRemovePicture: (jid: string) => Promise newsletterUnfollow: (jid: string) => Promise newsletterFollow: (jid: string) => Promise newsletterUnmute: (jid: string) => Promise newsletterMute: (jid: string) => Promise newsletterCreate: (name: string, description?: string, picture?: import("../Types").WAMediaUpload) => Promise newsletterQuery: (jid: string, type: string, content: BinaryNode) => Promise newsletterWMexQuery: (jid?: string | undefined, query_id: number, content: BinaryNode) => Promise newsletterMetadata: (type: "invite" | "jid", key: string, role?: import("../Types").NewsletterViewRole | undefined) => Promise newsletterAdminCount: (jid: string) => Promise newsletterChangeOwner: (jid: string, userLid: string) => Promise newsletterDemote: (jid: string, userLid: string) => Promise newsletterDelete: (jid: string) => Promise newsletterReactMessage: (jid: string, server_id: string, code?: string | undefined) => Promise newsletterFetchMessages: (type: "invite" | "jid", key: string, count: number, after?: number | undefined) => Promise newsletterFetchUpdates: (jid: string, count: number, after?: number | undefined, since?: number | undefined) => Promise groupQuery: (jid: string, type: string, content: BinaryNode) => Promise groupMetadata: (jid: string) => Promise groupCreate: (subject: string, participants: string[]) => Promise groupLeave: (id: string) => Promise groupUpdateSubject: (jid: string, subject: string) => Promise groupRequestParticipantsList: (jid: string) => Promise<{ [key: string]: string }[]> groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "reject" | "approve") => Promise<{ status: string jid: string }[]> groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types").ParticipantAction) => Promise<{ status: string jid: string content: BinaryNode }[]> groupUpdateDescription: (jid: string, description?: string | undefined) => Promise groupInviteCode: (jid: string) => Promise groupRevokeInvite: (jid: string) => Promise groupAcceptInvite: (code: string) => Promise groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise groupAcceptInviteV4: (key: string | proto.IMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise groupGetInviteInfo: (code: string) => Promise groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise groupSettingUpdate: (jid: string, setting: "announcement" | "locked" | "not_announcement" | "unlocked") => Promise groupMemberAddMode: (jid: string, mode: "all_member_add" | "admin_add") => Promise groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise groupFetchAllParticipating: () => Promise<{ [_: string]: import("../Types").GroupMetadata }> processingMutex: { mutex(code: () => T | Promise): Promise } upsertMessage: (msg: proto.IWebMessageInfo, type: import("../Types").MessageUpsertType) => Promise appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string | undefined) => Promise presenceSubscribe: (toJid: string, tcToken?: Buffer | undefined) => 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: import("../Types").WAMediaUpload) => Promise removeProfilePicture: (jid: string) => Promise updateProfileStatus: (status: string) => Promise updateProfileName: (name: string) => Promise updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise updateCallPrivacy: (value: import("../Types").WAPrivacyCallValue) => Promise updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise updateGroupsAddPrivacy: (value: import("../Types").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: import("../Types").ChatModification, jid: string) => Promise cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: string | number | undefined) => Promise addLabel: (jid: string, labels: import("../Types/Label").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 | undefined }[], 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 sendWAMBuffer: (wamBuffer: Buffer) => Promise }