IFClite TypeScript API
    Preparing search index...

    Interface BcfApiClientOptions

    @ifc-lite/opencde-foundation — client for the buildingSMART OpenCDE Foundation API (https://github.com/buildingSMART/foundation-API): the services and conventions every OpenCDE API (BCF, Documents, ...) shares — /foundation/versions discovery, OAuth2 /auth discovery and token flows, and /current-user. @ifc-lite/bcf-api and @ifc-lite/documents-api both build their clients on top of this package.

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

    Hierarchy (View Summary)

    Index
    baseUrl: string

    Server base URL up to but excluding the version segment, e.g. https://example.com/bcf.

    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.

    version?: string

    BCF API version segment; defaults to '2.1'.