Optionaloptions: ClientOptionsThe server's info (version, commit, features), fetched once and cached. Returns a promise that resolves to the ServerInfo.
The server's version, fetched once and cached.
Async dispose pattern support — use with await using.
Dispose pattern support (TypeScript 5.2+).
Close the underlying gRPC channels.
Get a config value as a string (default).
Get a config value converted to the specified type.
Optionaloptions: { signal?: AbortSignal; timeout?: number }Get a config value as a string (default).
Optionaloptions: { signal?: AbortSignal; timeout?: number }Get a config value as a string (default).
Optionaloptions: { signal?: AbortSignal; timeout?: number }Get a config value with nullable support. Returns null if the field has no value instead of throwing.
Get a config value as a string (default).
Get a config value as a string (default).
Get all config values for a tenant.
Optionaloptions: { signal?: AbortSignal; timeout?: number }A record mapping field paths to their string values.
Set a config value. The value is sent as a string — the server coerces it to the schema-defined type. For type-safe writes, prefer setNumber(), setBool(), setTime(), or setDuration().
Optionaloptions: {Set a boolean config value. Sends the native boolean as a proto boolValue.
Optionaloptions: {Set a duration config value. The value must be a duration string (e.g. "1h30m", "300s") — the server parses and validates the format.
Optionaloptions: {Atomically set multiple config values.
Record mapping field paths to typed values (string, number, boolean, or Date).
Optionaloptions: {Optional description for the audit log, idempotency key for safe DEADLINE_EXCEEDED retries, and per-field expected checksums for optimistic concurrency control.
Set a config field to null.
Optionaloptions: {Set a numeric config value. Sends the native number as a proto numberValue.
Optionaloptions: {Set a timestamp config value. Sends the Date as a proto timeValue.
Optionaloptions: {Replace the bearer token used for all subsequent RPCs (including watcher reconnects).
Switches the client to JWT auth mode: removes any metadata-header credentials (x-subject, x-role, x-tenant-id) that may have been set at construction time.
Raw JWT (without the "Bearer " prefix).
Create a config watcher for a tenant.
Returns a ConfigWatcher that can register fields and subscribe to
live configuration changes. Call field() to register fields, then
start() to load the initial snapshot and begin streaming.
The tenant ID to watch.
A new ConfigWatcher instance.
ConfigClient provides a promise-based API for reading and writing OpenDecree configuration values.
Example