LedeWire SDK API Reference
    Preparing search index...

    Type Alias CorpusDownloadResult

    CorpusDownloadResult:
        | { body: ReadableStream<Uint8Array>; ready: true; response: Response }
        | { corpus: CorpusResponse; ready: false }

    Result of client.acquisitions.downloadCorpus() — a discriminated union on ready.

    • ready: true — the archive is streaming now, as body.
    • ready: false — nothing to stream yet; corpus carries the same state client.acquisitions.getCorpus() would report (e.g. assembling, pending, rebuild_required, or failed).

    Type Declaration

    • { body: ReadableStream<Uint8Array>; ready: true; response: Response }
      • body: ReadableStream<Uint8Array>

        The gzip archive body. Read it to completion and verify its size against byte_size from client.acquisitions.getCorpus() — the download carries no Content-Length.

      • ready: true

        The corpus archive is ready and streaming.

      • response: Response

        The raw Response, for callers that need headers or want to read the body a different way (.blob(), .arrayBuffer(), etc.).

    • { corpus: CorpusResponse; ready: false }
      • corpus: CorpusResponse

        The corpus state, exactly as client.acquisitions.getCorpus() would report it.

      • ready: false

        Nothing is downloadable yet.