Path: blob/master/node_modules/@adiwajshing/baileys/lib/LegacySocket/groups.d_1.ts
2593 views
/// <reference types="node" />1/// <reference types="ws" />2import { GroupMetadata, LegacySocketConfig, ParticipantAction } from '../Types';3import { BinaryNode } from '../WABinary';4declare const makeGroupsSocket: (config: LegacySocketConfig) => {5groupMetadata: (jid: string, minimal: boolean) => Promise<GroupMetadata>;6/**7* Create a group8* @param title like, the title of the group9* @param participants people to include in the group10*/11groupCreate: (title: string, participants: string[]) => Promise<GroupMetadata>;12/**13* Leave a group14* @param jid the ID of the group15*/16groupLeave: (id: string) => Promise<void>;17/**18* Update the subject of the group19* @param {string} jid the ID of the group20* @param {string} title the new title of the group21*/22groupUpdateSubject: (id: string, title: string) => Promise<void>;23/**24* Update the group description25* @param {string} jid the ID of the group26* @param {string} title the new title of the group27*/28groupUpdateDescription: (jid: string, description: string) => Promise<{29status: number;30}>;31/**32* Update participants in the group33* @param jid the ID of the group34* @param participants the people to add35*/36groupParticipantsUpdate: (id: string, participants: string[], action: ParticipantAction) => Promise<string[]>;37/** Query broadcast list info */38getBroadcastListInfo: (jid: string) => Promise<GroupMetadata>;39groupInviteCode: (jid: string) => Promise<string>;40relayMessage: (message: import("../Types").WAProto.IWebMessageInfo, { waitForAck }?: {41waitForAck: boolean;42}) => Promise<void>;43generateUrlInfo: (text: string) => Promise<import("../Types").WAUrlInfo>;44messageInfo: (jid: string, messageID: string) => Promise<import("../Types").WAProto.IUserReceipt[]>;45downloadMediaMessage: (message: import("../Types").WAProto.IWebMessageInfo, type?: "stream" | "buffer") => Promise<Buffer | import("stream").Readable>;46updateMediaMessage: (message: import("../Types").WAProto.IWebMessageInfo) => Promise<BinaryNode>;47fetchMessagesFromWA: (jid: string, count: number, cursor?: import("../Types").WAMessageCursor) => Promise<import("../Types").WAProto.WebMessageInfo[]>;48loadMessageFromWA: (jid: string, id: string) => Promise<import("../Types").WAProto.WebMessageInfo>;49searchMessages: (txt: string, inJid: string, count: number, page: number) => Promise<{50last: boolean;51messages: import("../Types").WAProto.WebMessageInfo[];52}>;53sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions & {54waitForAck?: boolean;55}) => Promise<import("../Types").WAProto.WebMessageInfo>;56sendChatsQuery: (epoch: number) => Promise<string>;57profilePictureUrl: (jid: string, timeoutMs?: number) => Promise<string>;58chatRead: (fromMessage: import("../Types").WAProto.IMessageKey, count: number) => Promise<void>;59chatModify: (modification: import("../Types").ChatModification, jid: string, chatInfo: Pick<import("../Types").Chat, "mute" | "pin">, timestampNow?: number) => Promise<void | {60status: number;61}>;62onWhatsApp: (str: string) => Promise<{63exists: boolean;64jid: string;65isBusiness: boolean;66}>;67sendPresenceUpdate: (type: import("../Types").WAPresence, jid: string) => Promise<string>;68presenceSubscribe: (jid: string) => Promise<string>;69getStatus: (jid: string) => Promise<{70status: string;71}>;72setStatus: (status: string) => Promise<{73status: number;74}>;75updateBusinessProfile: (profile: import("../Types").WABusinessProfile) => Promise<void>;76updateProfileName: (name: string) => Promise<{77status: number;78pushname: string;79}>;80updateProfilePicture(jid: string, img: Buffer): Promise<void>;81blockUser: (jid: string, type?: "add" | "remove") => Promise<void>;82getBusinessProfile: (jid: string) => Promise<import("../Types").WABusinessProfile>;83state: import("../Types").ConnectionState;84authInfo: import("../Types").LegacyAuthenticationCreds;85ev: import("../Types").LegacyBaileysEventEmitter;86canLogin: () => boolean;87logout: () => Promise<void>;88waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean, timeoutMs?: number) => Promise<void>;89type: "legacy";90ws: import("ws");91sendAdminTest: () => Promise<string>;92updateKeys: (info: {93encKey: Buffer;94macKey: Buffer;95}) => {96encKey: Buffer;97macKey: Buffer;98};99waitForSocketOpen: () => Promise<void>;100sendNode: ({ json, binaryTag, tag, longTag }: import("../Types").SocketSendMessageOptions) => Promise<string>;101generateMessageTag: (longTag?: boolean) => string;102waitForMessage: (tag: string, requiresPhoneConnection: boolean, timeoutMs?: number) => {103promise: Promise<any>;104cancelToken: () => void;105};106query: ({ json, timeoutMs, expect200, tag, longTag, binaryTag, requiresPhoneConnection }: import("../Types").SocketQueryOptions) => Promise<any>;107setQuery: (nodes: BinaryNode[], binaryTag?: import("../Types").WATag, tag?: string) => Promise<{108status: number;109}>;110currentEpoch: () => number;111end: (error: Error) => void;112};113export default makeGroupsSocket;114115116