IFClite TypeScript API
    Preparing search index...

    Class BcfApiClient

    Typed client for the buildingSMART BCF API (OpenCDE) REST services, versions 2.1 and 3.0. Every method has the same signature on both; the version option is the one place the difference is chosen:

    • 3.0 serves /auth and /current-user from the Foundation API (/foundation/{version}/...) instead of under /bcf/{version};
    • 3.0 renamed the extensions' user_id_type to users (getExtensions returns both names on either version);
    • 3.0 topics carry a server_assigned_id, 3.0 comments no reply_to_comment_guid. Both are optional fields on the shared DTOs.

    Extends FoundationApiClient: URL building, Bearer token injection, and error mapping, plus getVersions, are the Foundation API's own and are inherited rather than reimplemented here.

    Hierarchy (View Summary)

    Index
    baseUrl: string
    errorLabel: string
    errorNamespace: string | undefined
    fetchFn: FetchLike
    getAccessToken?: BcfTokenProvider
    version: string
    • Parameters

      • path: string
      • Optionalquery: Record<string, string | number | undefined>

      Returns string

    • Parameters

      • projectId: string
      • topicGuid: string
      • viewpointGuid: string

      Returns Promise<BcfColoringResponse>

    • Parameters

      • projectId: string
      • topicGuid: string

      Returns Promise<BcfViewpointDto[]>

    • Parameters

      • projectId: string
      • topicGuid: string
      • viewpointGuid: string

      Returns Promise<BcfSelectionResponse>

    • Snapshot image (PNG/JPEG) of a viewpoint, as served by the server.

      Parameters

      • projectId: string
      • topicGuid: string
      • viewpointGuid: string

      Returns Promise<Blob>

    • Parameters

      • projectId: string
      • topicGuid: string
      • viewpointGuid: string

      Returns Promise<BcfVisibilityResponse>