BimWorksClient
Class in @bimworks/jssdk.
API catalogue · @bimworks/jssdk · Class
class BimWorksClient<TClient extends Client | null | undefined = Client | null | undefined>The main entry point to the BIM.works API. This is usually a short-lived object, but there is no reason to not use it for longer. For better organization, the BIM.works API is namespaced in about a dozen different namespaces. These namespaces are also used in the JS SDK. Each namespaced API is available as a readonly attribute on the BimWorksClient.
Type parameters#
| Name | Constraint | Description |
|---|---|---|
TClient |
Client | null | undefined |
Members#
| Member | Kind | Description |
|---|---|---|
| constructor | Method | |
| ai | Property | Natural-language actions on servers with AI enabled. |
| auth | Property | Account registration. Authentication is configured by the client factory. |
| bim | Property | |
| checks | Property | |
| client | Property | |
| fs | Property | |
| geometry3d | Property | |
| gis | Property | |
| ifc | Property | |
| info | Property | General server information, including the application version. |
| linkedData | Property | Files, URLs, texts and identifiers linked to objects. |
| registerExpiredTokenHandler | Property | |
| render | Property | |
| tokens | Property | |
| upload | Property | |
| addConnectionRestoredListener | Method | Register a callback invoked when the transport restores its connection. |
| addPart | Method | Names a BIM.works package that uses this client, e.g. a viewer (parts of the X-BIMworks-Client header). |
| close | Method | This method should be called as soon as you are done using the BimWorksClient |
| executePreSignedDownload | Method | Runs a pre-signed download (a token from Tokens) and resolves with its URL |
constructor#
constructor(client: TClient, settings?: TClient extends Client ? null | undefined : ClientFactorySettings, modelUploadFactory?: ModelUploaderFactory)Type parameters#
| Name | Constraint | Description |
|---|---|---|
TClient |
Client | null | undefined |
Parameters#
| Name | Type | Description |
|---|---|---|
client |
TClient |
|
settings |
TClient extends Client ? null | undefined : ClientFactorySettings |
|
modelUploadFactory |
ModelUploaderFactory |
ai#
Natural-language actions on servers with AI enabled.
auth#
Account registration. Authentication is configured by the client factory.
bim#
checks#
client#
fs#
geometry3d#
readonly geometry3d: Geometry3dgis#
ifc#
info#
General server information, including the application version.
linkedData#
readonly linkedData: LinkedDataFiles, URLs, texts and identifiers linked to objects.
registerExpiredTokenHandler#
public registerExpiredTokenHandler: (handler: (oldAuth: AuthToken) => Promise<AuthToken | undefined>) => voidrender#
tokens#
upload#
addConnectionRestoredListener#
public addConnectionRestoredListener(listener: () => void): voidRegister a callback invoked when the transport restores its connection.
Parameters#
| Name | Type | Description |
|---|---|---|
listener |
() => void |
addPart#
public addPart(name: string, version?: string | null): voidNames a BIM.works package that uses this client, e.g. a viewer (parts of the X-BIMworks-Client header).
Parameters#
| Name | Type | Description |
|---|---|---|
name |
string |
|
version |
string | null |
close#
public close(): voidThis method should be called as soon as you are done using the BimWorksClient
executePreSignedDownload#
public executePreSignedDownload(token: unknown): Promise<string>Runs a pre-signed download (a token from Tokens) and resolves with its URL
Parameters#
| Name | Type | Description |
|---|---|---|
token |
unknown |