@maschinenlesbar.org/lobbyregister-cli
    Preparing search index...

    Interface EngineOptions

    interface EngineOptions {
        baseUrl?: string;
        headers?: Record<string, string>;
        maxRedirects?: number;
        maxResponseBytes?: number;
        maxRetries?: number;
        onRetry?: (event: RetryEvent) => void;
        retryDelayMs?: number;
        sleep?: (ms: number) => Promise<void>;
        timeoutMs?: number;
        transport?: Transport;
        userAgent?: string;
    }
    Index
    baseUrl?: string

    Base URL of the API. Defaults to https://www.lobbyregister.bundestag.de

    headers?: Record<string, string>

    Extra headers sent on every request to the configured origin (e.g. an Authorization token for a future authenticated endpoint). When a redirect crosses to a different origin, all of them are dropped (only the engine's own Accept and User-Agent go along), so no credential — Authorization, Proxy-Authorization, Cookie, X-API-Key, X-Auth-Token or any other — leaks to an arbitrary host named in Location. Names must be HTTP tokens and values are checked like userAgent.

    maxRedirects?: number

    Number of HTTP redirects (301/302/303/307/308) to follow, a non-negative integer (0 = none). Defaults to 5.

    maxResponseBytes?: number

    Hard cap on response body size in bytes (defends against memory exhaustion from a hostile/buggy endpoint), a non-negative integer. Defaults to 100 MiB; set to 0 for no limit.

    maxRetries?: number

    Number of automatic retries for transient (429/503) responses and reset connections (ECONNRESET, EPIPE, ECONNABORTED, undici's UND_ERR_SOCKET, anywhere in the error's cause chain; GET and HEAD only), a non-negative integer. Defaults to 2. Timeouts are not retried. Each retry waits retryDelayMs * attempt, or the response's Retry-After when that is longer (capped at 60 s).

    onRetry?: (event: RetryEvent) => void

    Called once per retry, right before the backoff sleep, for each retried 429/503 and reset connection; never when there is no retry. A throw is swallowed.

    retryDelayMs?: number

    Base backoff between retries in milliseconds (grows linearly), an integer from 0 to 60 000 (the Retry-After cap). Defaults to 200. A Retry-After can make a wait longer, never shorter.

    sleep?: (ms: number) => Promise<void>

    Injectable sleep, primarily for deterministic tests.

    timeoutMs?: number

    Time limit per request in milliseconds, covering the whole response body, not only idle gaps: an integer 0..MAX_TIMEOUT_MS (2^31 - 1, the largest timer Node supports); 0 disables. Defaults to 30000.

    transport?: Transport

    Swappable transport. Defaults to the built-in node http/https transport.

    userAgent?: string

    Value of the User-Agent header (default lobbyregister-cli). A blank value, a control character other than tab, or a character above U+00FF throws a LobbyValidationError.