European Parliament MCP Server API - v1.4.23
    Preparing search index...

    Interface DetailBatchOptions<Item>

    Options controlling a single incremental detail-refresh batch.

    interface DetailBatchOptions<Item> {
        batchSize: number;
        details: Record<string, unknown>;
        fetchDetail: (item: Item) => Promise<unknown>;
        idFor: (item: Item) => string;
        isNotFound: (error: unknown) => boolean;
        items: readonly Item[];
        keysFor: (item: Item) => readonly string[];
        missingIds: Set<string>;
        extraKeysFromDetail?: (detail: unknown) => readonly string[];
        onRetry?: (id: string) => void;
        onSkip?: (id: string) => void;
    }

    Type Parameters

    • Item
    Index
    batchSize: number

    Maximum number of uncached items to fetch this run.

    details: Record<string, unknown>

    Detail map fetched so far (mutated in place).

    fetchDetail: (item: Item) => Promise<unknown>

    Fetches the detail record for one item.

    idFor: (item: Item) => string

    Primary identifier used for missing-id bookkeeping.

    isNotFound: (error: unknown) => boolean

    Classifies an error as a definitive 404 so the id is not retried.

    items: readonly Item[]

    Full current roster of items.

    keysFor: (item: Item) => readonly string[]

    All identifier variants a detail record should be stored/looked up under.

    missingIds: Set<string>

    Not-found identifiers to skip this cycle (mutated in place).

    extraKeysFromDetail?: (detail: unknown) => readonly string[]

    Additional keys derived from the fetched detail (e.g. canonical identifier).

    onRetry?: (id: string) => void

    Invoked when an item fetch fails transiently and will be retried later.

    onSkip?: (id: string) => void

    Invoked when an item is recorded as permanently missing (404).