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

    Interface ImfClientConfig

    Client configuration

    interface ImfClientConfig {
    ย ย ย ย datamapperBaseURL?: string;
    ย ย ย ย sdmxBaseURL?: string;
    ย ย ย ย timeout?: number;
    ย ย ย ย userAgent?: string;
    ย ย ย ย maxRetries?: number;
    ย ย ย ย weoVintage?: string;
    ย ย ย ย sdmxSubscriptionKey?: string;
    ย ย ย ย onBatchIndicatorError?: (event: ImfBatchIndicatorErrorEvent) => void;
    }
    Index
    datamapperBaseURL?: string

    Override for the Datamapper base URL (for testing).

    sdmxBaseURL?: string

    Override for the SDMX 3.0 base URL (for testing).

    timeout?: number

    Request timeout in ms. Default 15_000.

    userAgent?: string

    User-Agent sent to IMF HTTP endpoints. Akamai currently rejects Node's default undici user-agent on the Datamapper API with HTTP 403, while browser/curl-style user-agents succeed.

    maxRetries?: number

    Max retry count for transient failures. Default 2.

    weoVintage?: string

    Optional WEO vintage tag to stamp on every projection returned by getWeoIndicator. Defaults to the current WEO cycle โ€” update in April / October when the IMF publishes a new flagship release.

    sdmxSubscriptionKey?: string

    IMF Data SDMX API subscription key, sent as the Ocp-Apim-Subscription-Key header on every SDMX call. The Datamapper transport is NOT authenticated and never receives this header. If omitted the client resolves the key via imf/config/auth.ts::resolveSdmxSubscriptionKey (the sole reader of IMF_SDMX_SUBSCRIPTION_KEY).

    onBatchIndicatorError?: (event: ImfBatchIndicatorErrorEvent) => void

    Optional diagnostic hook invoked when getWeoIndicatorsBatch() fail-softs one indicator to an empty series because the IMF transport/API call failed. The default is no-op so callers can opt in without polluting JSON stdout.