@japofc/baileys - v2.4.7
    Preparing search index...

    Type Alias BaileysEventMap

    type BaileysEventMap = {
        "blocklist.set": { blocklist: string[] };
        "blocklist.update": { blocklist: string[]; type: "add" | "remove" };
        call: WACallEvent[];
        "chats.delete": string[];
        "chats.lock": { id: string; locked: boolean };
        "chats.update": ChatUpdate[];
        "chats.upsert": Chat[];
        "connection.update": Partial<ConnectionState>;
        "contacts.update": Partial<Contact>[];
        "contacts.upsert": Contact[];
        "creds.update": Partial<AuthenticationCreds>;
        "group-participants.update": {
            action: ParticipantAction;
            author: string;
            authorPn?: string;
            authorUsername?: string;
            id: string;
            participants: GroupParticipant[];
        };
        "group.join-request": {
            action: RequestJoinAction;
            author: string;
            authorPn?: string;
            authorUsername?: string;
            id: string;
            method: RequestJoinMethod;
            participant: string;
            participantPn?: string;
        };
        "group.member-tag.update": {
            groupId: string;
            label: string;
            messageTimestamp?: number;
            participant: string;
            participantAlt?: string;
        };
        "groups.update": Partial<GroupMetadata>[];
        "groups.upsert": GroupMetadata[];
        "labels.association": {
            association: LabelAssociation;
            type: "add" | "remove";
        };
        "labels.edit": Label;
        "lid-mapping.update": LIDMapping;
        "message-capping.update": NewChatMessageCapInfo;
        "message-receipt.update": MessageUserReceiptUpdate[];
        "messages.decrypt-failed": {
            error: string;
            key: WAMessageKey;
            willRetry: boolean;
        }[];
        "messages.delete": { keys: WAMessageKey[] }
        | { all: true; jid: string };
        "messages.media-update": {
            error?: Boom;
            key: WAMessageKey;
            media?: { ciphertext: Uint8Array; iv: Uint8Array };
        }[];
        "messages.reaction": { key: WAMessageKey; reaction: any }[];
        "messages.update": WAMessageUpdate[];
        "messages.upsert": {
            messages: WAMessage[];
            requestId?: string;
            type: MessageUpsertType;
        };
        "messaging-history.set": {
            chats: Chat[];
            chunkOrder?: number
            | null;
            contacts: Contact[];
            isLatest?: boolean;
            lidPnMappings?: LIDMapping[];
            messages: WAMessage[];
            pastParticipants?: any[] | null;
            peerDataRequestSessionId?: string | null;
            progress?: number | null;
            syncType?: any | null;
        };
        "messaging-history.status": {
            explicit: boolean;
            status: "complete"
            | "paused";
            syncType: any;
        };
        "newsletter-participants.update": {
            action: string;
            author: string;
            id: string;
            new_role: string;
            user: string;
        };
        "newsletter-settings.update": { id: string; update: any };
        "newsletter.reaction": {
            id: string;
            reaction: { code?: string; count?: number; removed?: boolean };
            server_id: string;
        };
        "newsletter.view": { count: number; id: string; server_id: string };
        "presence.update": {
            id: string;
            presences: { [participant: string]: PresenceData };
        };
        "settings.update": | { setting: "unarchiveChats"; value: boolean }
        | { setting: "locale"; value: string }
        | { setting: "disableLinkPreviews"; value: any }
        | { setting: "timeFormat"; value: any }
        | { setting: "privacySettingRelayAllCalls"; value: any }
        | { setting: "statusPrivacy"; value: any }
        | { setting: "notificationActivitySetting"; value: any }
        | { setting: "channelsPersonalisedRecommendation"; value: any };
    }
    Index
    "blocklist.set": { blocklist: string[] }
    "blocklist.update": { blocklist: string[]; type: "add" | "remove" }
    call: WACallEvent[]

    Receive an update on a call, including when the call was received, rejected, accepted

    "chats.delete": string[]

    delete chats with given ID

    "chats.lock": { id: string; locked: boolean }

    Settings and actions sync events

    "chats.update": ChatUpdate[]

    update the given chats

    "chats.upsert": Chat[]

    upsert chats

    "connection.update": Partial<ConnectionState>

    connection state has been updated -- WS closed, opened, connecting etc.

    "contacts.update": Partial<Contact>[]
    "contacts.upsert": Contact[]
    "creds.update": Partial<AuthenticationCreds>

    credentials updated -- some metadata, keys or something

    "group-participants.update": {
        action: ParticipantAction;
        author: string;
        authorPn?: string;
        authorUsername?: string;
        id: string;
        participants: GroupParticipant[];
    }

    apply an action to participants in a group

    "group.join-request": {
        action: RequestJoinAction;
        author: string;
        authorPn?: string;
        authorUsername?: string;
        id: string;
        method: RequestJoinMethod;
        participant: string;
        participantPn?: string;
    }
    "group.member-tag.update": {
        groupId: string;
        label: string;
        messageTimestamp?: number;
        participant: string;
        participantAlt?: string;
    }
    "groups.update": Partial<GroupMetadata>[]
    "groups.upsert": GroupMetadata[]
    "labels.association": { association: LabelAssociation; type: "add" | "remove" }
    "labels.edit": Label
    "lid-mapping.update": LIDMapping
    "message-capping.update": NewChatMessageCapInfo
    "message-receipt.update": MessageUserReceiptUpdate[]
    "messages.decrypt-failed": {
        error: string;
        key: WAMessageKey;
        willRetry: boolean;
    }[]

    an inbound message failed to decrypt (emitted alongside the CIPHERTEXT stub in messages.upsert). Lets apps observe decryption failures for metrics/alerting or to proactively reset a dead session, without scraping logs. willRetry is true when Baileys will send a retry receipt for this failure.

    "messages.delete": { keys: WAMessageKey[] } | { all: true; jid: string }
    "messages.media-update": {
        error?: Boom;
        key: WAMessageKey;
        media?: { ciphertext: Uint8Array; iv: Uint8Array };
    }[]
    "messages.reaction": { key: WAMessageKey; reaction: any }[]

    message was reacted to. If reaction was removed -- then "reaction.text" will be falsey

    "messages.update": WAMessageUpdate[]
    "messages.upsert": {
        messages: WAMessage[];
        requestId?: string;
        type: MessageUpsertType;
    }

    add/update the given messages. If they were received while the connection was online, the update will have type: "notify" if requestId is provided, then the messages was received from the phone due to it being unavailable

    "messaging-history.set": {
        chats: Chat[];
        chunkOrder?: number | null;
        contacts: Contact[];
        isLatest?: boolean;
        lidPnMappings?: LIDMapping[];
        messages: WAMessage[];
        pastParticipants?: any[] | null;
        peerDataRequestSessionId?: string | null;
        progress?: number | null;
        syncType?: any | null;
    }

    set chats (history sync), everything is reverse chronologically sorted

    "messaging-history.status": {
        explicit: boolean;
        status: "complete" | "paused";
        syncType: any;
    }

    signals history sync milestones (completion or stall) per sync type

    Type Declaration

    • explicit: boolean

      progress === 100 was received from the server. when false, completion was inferred via timeout (no more chunks arriving).

    • status: "complete" | "paused"

      the status of this sync phase

    • syncType: any

      which sync phase this status refers to

    "newsletter-participants.update": {
        action: string;
        author: string;
        id: string;
        new_role: string;
        user: string;
    }
    "newsletter-settings.update": { id: string; update: any }
    "newsletter.reaction": {
        id: string;
        reaction: { code?: string; count?: number; removed?: boolean };
        server_id: string;
    }

    Newsletter-related events

    "newsletter.view": { count: number; id: string; server_id: string }
    "presence.update": {
        id: string;
        presences: { [participant: string]: PresenceData };
    }

    presence of contact in a chat updated

    "settings.update":
        | { setting: "unarchiveChats"; value: boolean }
        | { setting: "locale"; value: string }
        | { setting: "disableLinkPreviews"; value: any }
        | { setting: "timeFormat"; value: any }
        | { setting: "privacySettingRelayAllCalls"; value: any }
        | { setting: "statusPrivacy"; value: any }
        | { setting: "notificationActivitySetting"; value: any }
        | { setting: "channelsPersonalisedRecommendation"; value: any }