@maschinenlesbar.org/deutsche-digitale-bibliothek-cli
    Preparing search index...

    Interface ItemResult

    The decoded body of an item component. Exactly one of json / text is set: json for JSON components (view, aip, binaries, ...), text for the ones the API serves as XML or a plain file (edm RDF/XML, source record XML, citation BIB).

    interface ItemResult {
        bytes?: Buffer<ArrayBufferLike>;
        contentType: string;
        heldBy?: string;
        json?: JsonValue;
        part:
            | "view"
            | "aip"
            | "edm"
            | "binaries"
            | "children"
            | "parents"
            | "source"
            | "source-description"
            | "source-record"
            | "iiif"
            | "citation";
        text?: string;
    }
    Index
    bytes?: Buffer<ArrayBufferLike>

    The exact upstream bytes, set together with text. Use these to save or pass on the record unchanged (any charset, CRs and control bytes intact).

    contentType: string

    The response Content-Type the decoding was based on.

    heldBy?: string

    Set when the item has no such component of its own and the API pointed to an ancestor's (a section of a digitised book, a unit of an archive finding aid; seen for source-record): the id of the item whose component this is. The record is then the ancestor's whole record (e.g. the volume's METS), not one for the requested item.

    json?: JsonValue

    Parsed JSON body, when the component returned JSON.

    part:
        | "view"
        | "aip"
        | "edm"
        | "binaries"
        | "children"
        | "parents"
        | "source"
        | "source-description"
        | "source-record"
        | "iiif"
        | "citation"
    text?: string

    Text body, when the component returned XML / a plain file: the bytes decoded by the Content-Type's charset (UTF-8 when none is given or the label is unknown).