Class Client
Client
Class Declared in packages/sdk/client/dist/types/src/client/client.d.ts:29
The Client class encapsulates the core client-side API of DXOS.
Constructors
constructor([options])
Returns: Client
Arguments:
options
: ClientOptions
Properties
reloaded
Type: Event<void>
Emitted after the client is reset and the services have finished restarting.
version
Type: "0.6.12"
The version of this client API.
config
Type: Config
Current configuration object.
echoClient
Type: EchoClient
Internal Echo client.
graph
Type: Hypergraph
halo
Type: Halo
HALO credentials.
initialized
Type: boolean
Returns true if the client has been initialized. Initialize by calling .initialize()
.
mesh
Type: MeshProxy
MESH networking.
services
Type: ClientServicesProvider
Current client services provider.
shell
Type: Shell
spaces
Type: Echo
status
Type: MulticastObservable<"null" | SystemStatus>
Client services system status.
Methods
[custom]()
Returns: string
Arguments: none
addTypes(types)
Add schema types to the client.
Returns: this
Arguments:
types
: Schema<any, any, never>[]
destroy()
Cleanup, release resources. Open/close is re-entrant.
Returns: Promise<void>
Arguments: none
diagnostics([options])
Get client diagnostics data.
Returns: Promise<any>
Arguments:
options
: JsonKeyOptions
initialize()
Initializes internal resources in an idempotent way. Required before using the Client instance.
Returns: Promise<void>
Arguments: none
repair()
Test and repair database.
Returns: Promise<any>
Arguments: none
reset()
Resets and destroys client storage.
Returns: Promise<void>
Arguments: none
resumeHostServices()
Reinitialized the client session with the remote service host. This is useful when connecting to a host running behind a resource lock (e.g., HALO when SharedWorker is unavailable).
Returns: Promise<void>
Arguments: none
toJSON()
Returns: object
Arguments: none