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

    Interface WebhookBridgeOptions

    Webhook bridge — POST socket events to an HTTP endpoint.

    interface WebhookBridgeOptions {
        events?: string[];
        fetchImpl?: {
            (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
            (input: string | URL | Request, init?: RequestInit): Promise<Response>;
        };
        headers?: Record<string, string>;
        maxBodyBytes?: number;
        retries?: number;
        retryDelayMs?: number;
        secret?: string;
        timeoutMs?: number;
        transform?: (event: string, payload: unknown) => unknown;
    }
    Index
    events?: string[]

    Events to forward. Default ['messages.upsert'].

    fetchImpl?: {
        (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
        (input: string | URL | Request, init?: RequestInit): Promise<Response>;
    }

    fetch override (testing).

    Type Declaration

      • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
      • Parameters

        • input: URL | RequestInfo
        • Optionalinit: RequestInit

        Returns Promise<Response>

      • (input: string | URL | Request, init?: RequestInit): Promise<Response>
      • Parameters

        • input: string | URL | Request
        • Optionalinit: RequestInit

        Returns Promise<Response>

    headers?: Record<string, string>
    maxBodyBytes?: number

    Cap the JSON body; oversized payloads get summarized. Default 512 KB.

    retries?: number

    Retries after the first attempt. Default 2.

    retryDelayMs?: number

    Base backoff delay (doubles per attempt). Default 1000.

    secret?: string

    HMAC-SHA256 secret → X-JAP-Signature header.

    timeoutMs?: number

    Per-request timeout. Default 10000.

    transform?: (event: string, payload: unknown) => unknown

    Reshape/filter payloads; return null/undefined to skip the event.