Riksdagsmonitor Intelligence Platform โ€” API Documentation - v1.0.30
    Preparing search index...

    Injectable configuration for fetchCalendarWithFallback. All network calls go through fetchFn so tests can substitute a mock.

    interface CalendarFetchConfig {
    ย ย ย ย mcpUrl?: string;
    ย ย ย ย webBaseUrl?: string;
    ย ย ย ย timeout?: number;
    ย ย ย ย maxRetries?: number;
    ย ย ย ย fetchFn?: {
    ย ย ย ย ย ย ย ย (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
    ย ย ย ย ย ย ย ย (input: string | URL | Request, init?: RequestInit): Promise<Response>;
    ย ย ย ย };
    ย ย ย ย sleepFn?: (ms: number) => Promise<void>;
    }
    Index
    mcpUrl?: string

    MCP server endpoint URL. Defaults to the MCP_SERVER_URL env var or the public Render.com endpoint.

    webBaseUrl?: string

    Riksdag web kalendarium base URL (no trailing slash). Defaults to https://www.riksdagen.se.

    timeout?: number

    Request timeout in ms. Default 15 000.

    maxRetries?: number

    Maximum MCP retry attempts before triggering the web fallback. Default 2.

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

    Injectable fetch function. Defaults to globalThis.fetch. Set in tests to control all network calls without live HTTP.

    Type Declaration

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

    Optional sleep function override (ms โ†’ Promise). Defaults to setTimeout-based sleep. Override in tests to skip delays.