IFClite TypeScript API
    Preparing search index...

    Interface DocumentsApiClientOptions

    @ifc-lite/documents-api — client for the buildingSMART OpenCDE Documents API 1.0 (https://github.com/buildingSMART/documents-API): select and download documents from a CDE's UI, poll for new versions, and upload files through the multi-part upload flow. Discovery and OAuth2 auth are @ifc-lite/opencde-foundation's.

    interface DocumentsApiClientOptions {
        baseUrl: string;
        errorLabel?: string;
        errorNamespace?: string;
        fetchFn?: FetchLike;
        getAccessToken?: BcfTokenProvider;
    }

    Hierarchy (View Summary)

    Index
    baseUrl: string

    Base URL of the Documents API itself, e.g. https://example.com/documents/1.0 — already the version-qualified api_base_url a /foundation/versions lookup returns (see discoverDocumentsService), NOT the bare server address.

    errorLabel?: string

    Name used in the fallback "{errorLabel} request failed (HTTP …) at …" message when a non-2xx response carries no server-supplied detail. Defaults to 'OpenCDE'; a concrete client (BCF, Documents, ...) names itself so the message reads like the rest of that client's errors.

    errorNamespace?: string

    Prefix of thrown errors' name (see FoundationApiError); defaults to 'Foundation'.

    fetchFn?: FetchLike

    Injectable fetch, for tests and non-browser hosts.

    getAccessToken?: BcfTokenProvider

    Supplies the Bearer token per request; omit for anonymous servers.