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

    Interface ListResult<T>

    The result of walking an object list across one or more pages.

    interface ListResult<T extends JsonObject = OparlObject> {
        data: T[];
        looped?: true;
        next: string | null;
        note?: string;
        pages: number;
        stoppedEarly?: true;
    }

    Type Parameters

    Index
    data: T[]

    Every object from the pages fetched, in server order, once per id. Where pages repeated an id, this is the last copy the server sent — the newer one, including a deleted: true tombstone.

    looped?: true

    Present (and true) when the walk gave up before the list ended: the server's next link pointed back at a page already fetched, or several pages in a row added no object that wasn't already listed. data then holds every distinct object seen, and next the link to continue from after unproductive pages (null after a loop back).

    next: string | null

    The next link of the last page fetched, or null when the list is exhausted, when the walk stopped at a next leading back to a page already fetched, or when the link is one this client refuses to follow (see note). In the partial result of an error thrown after the first page, the URL of the page that failed.

    note?: string

    Why the walk stopped early, or which filter could not be applied — a sentence for the user (the CLI prints it on stderr). Absent when there is nothing to report.

    pages: number

    Number of pages fetched.

    stoppedEarly?: true

    Present (and true) when the walk stopped before the list ended for a reason the caller did not choose: a refused or invalid next link, a link back to a page already fetched, pages that added nothing, the maxPages: 0 hard limit, or a later page that failed (the partial result of the error). Absent for a walk that ended where the caller asked, and for a note that only comments on the result (the limit note, a filter that could not be applied). The CLI logs such a note as a WARN.