Abstractthe generated API surface this client is typed against —
call, job and event together. Defaults to BaseApiDirectory,
the entries identical in every generated version; a version-specific
subclass substitutes its own family's surface to reach the methods the
shared base cannot include.
OptionalsystemName: stringReadonlyapiAPI call handler
ReadonlyauthenticatorAuthentication manager
ReadonlyconnectionWebSocket connection manager
Protected ReadonlyenabledInitial connection gate, forwarded to the connection. The app flips it later
via connection.setEnabled() (mapping its SystemState.Active -> true).
Protected ReadonlyhostnamesSystem hostnames (primary and fallback)
Protected ReadonlyloggerLogger forwarded to the connection (defaults to a no-op).
ReadonlyopsVersion-agnostic operation mappings
Provides a unified interface for operations that differ between API versions. Each version-specific client implements these operations using its own endpoints.
Usage:
truenas.ops.containerQuery().subscribe(containers => ...);
truenas.ops.containerStart(id).subscribe(jobId => ...);
Protected ReadonlysystemSystem name (optional)
Protected ReadonlyuuidSystem UUID
ReadonlyversionAPI version information for this client
Get current authentication status.
true if authenticated with the system
Get current connection status.
true if WebSocket is connected
Close the WebSocket connection. Connection will automatically retry if retry is enabled.
ProtectedcreateFactory method to create the API handler. Override in subclasses to provide version-specific API implementations.
ProtectedcreateFactory method to create the authenticator. Override in subclasses to provide version-specific authentication.
ProtectedcreateFactory method to create the WebSocket connection. Override in subclasses to provide version-specific connection handling.
Protected AbstractcreateFactory method to create version-specific operation mappings. Must be implemented by subclasses to provide version-specific implementations.
This is the primary extension point for handling API differences between versions.
the generated API surface this client is typed against —
call,jobandeventtogether. Defaults to BaseApiDirectory, the entries identical in every generated version; a version-specific subclass substitutes its own family's surface to reach the methods the shared base cannot include.