Skip to content

ServerDecideOptions

ServerDecideOptions = object

Per-call options for decide().

optional asUser?: string

The user this decision is for, sent as the request’s userId. An unverified assertion: the route takes it at face value and reads that user’s grants, and nothing checks that the caller is that user. Take it from a session your backend has verified, never from a value on the incoming request, or the requester can claim any user’s grants.


optional context?: Record<string, unknown>

Facts sent as given. The engine reads them at the unverified tier.


optional giftLink?: string

The _gt query parameter from your own incoming request, verbatim. The client never reads a URL itself. An invalid, forged or expired token means no gift, never an error.


optional signal?: AbortSignal

Aborts the request early. The timeout still applies.