BIM.works SDKs - v3.0.0-beta.168
    Preparing search index...

    Class ClientIdentity

    What a client says it is, on every request (the X-BIMworks-Client header) and as the first message of its WebSocket. Immutable: every with… returns a new identity.

    Index

    Constructors

    Methods

    • A field by its wire key: sdk, v, app, parts, rt, inst, …

      Parameters

      • key: string

      Returns string | undefined

    • The value of X-BIMworks-Client.

      Returns string

    • The socket's first message: {"hb": true, "client": header()}.

      Returns string

    • bimworks-<sdk>/<v> (<runtime>; <os>) <app>, for runtimes that may set a User-Agent.

      Returns string

    • The application that uses the SDK, sent as app (letters, digits and . _ + -; anything else becomes _).

      Parameters

      • name: string | null
      • Optionalversion: string | null

      Returns ClientIdentity

    • The build's version, time (UTC, ISO 8601) and commit; a version of "DEV" or nothing is sent as dev.

      Parameters

      • version: string | null
      • Optionalbuilt: string | null
      • Optionalcommit: string | null

      Returns ClientIdentity

    • A BIM.works package that uses the client, e.g. a viewer, sent in parts.

      Parameters

      • name: string
      • Optionalversion: string | null

      Returns ClientIdentity

    • For an SDK generated from the OpenAPI spec: the spec's version, its SHA-256 prefix, generator/version.

      Parameters

      • spec: string | null
      • OptionalspecSha: string | null
      • Optionalgenerator: string | null

      Returns ClientIdentity

    • A new identity for this SDK id (js, web, …) with this runtime, its platform and a fresh instance id.

      Parameters

      • sdk: string
      • lang: string

      Returns ClientIdentity