Skip to content

VerdictClientOptions

Integer results default to number. Bigint and adaptive result types require an explicit mode.

type VerdictClientOptions<M extends IntegerMode = "number"> = Readonly<{
instanceUrl: string;
sessionId?: string;
consistency?: Consistency;
apiKey: string;
fetch?: typeof globalThis.fetch;
retryHttp503?: boolean;
wireFormat?: "proto" | "json";
mutationAttemptTimeoutMs?: number;
mutationOverallTimeoutMs?: number;
}> & ("number" extends M ? Readonly<{
integerMode?: M;
}> : Readonly<{
integerMode: M;
}>);

apiKey: Bearer credential sent to the instance on every request.

consistency: Defaults to session. All successful reads and writes update the observed revision.

fetch: Fetch implementation. Defaults to globalThis.fetch.

instanceUrl: Instance Connect API base URL; one trailing slash is removed.

mutationAttemptTimeoutMs: Milliseconds allowed for each mutation attempt. Defaults to 12,000; maximum 55,000.

mutationOverallTimeoutMs: Milliseconds allowed for the entire mutation call. Defaults to 30,000; maximum 55,000.

retryHttp503: Enable bounded HTTP 503 backoff for reads and mutations. Defaults to true.

sessionId: Routing identifier sent on every request. Defaults to a UUID. Use 1-128 ASCII letters, digits, underscores, or hyphens.

wireFormat: Connect wire encoding. Defaults to protobuf.

integerMode: Result integer representation. Defaults to number; unsafe response integers throw IntegerRepresentationError.

integerMode: Required explicit result integer representation for bigint or adaptive mode.

VerdictClient · identity · IntegerRepresentationError · FactBatchInput · Consistency · ReadOptions · SessionOptions · Revision · Identity · GroundTerm · PatternValue · Wildcard · FilterValue · FactInput · PatternInput · ListFilterInput · IntegerMode · IntegerResult · ResultTerm

Client reference introduction.