Interface: HandlerContext<S, P, K>
Defined in: packages/messaging/src/receiver.ts:90
What a handler is given. It never builds a scope: scope is minted here, once
per message, and a handler passes it down to a repository.
Type Parameters
S
S
P
P
K
K extends RequestKey = RequestKey
Properties
adapter
readonlyadapter:Adapter
Defined in: packages/messaging/src/receiver.ts:100
The carrier. A handler has no business branching on it; it is here for logs.
causationId
readonlycausationId:string
Defined in: packages/messaging/src/receiver.ts:107
The handled message's id. It is ambient: currentCausationId() returns it, and
send() defaults to it, so a handler passes it only to override.
correlationId
readonlycorrelationId:string
Defined in: packages/messaging/src/receiver.ts:102
The correlation id, also visible through currentCorrelationId().
envelope
readonlyenvelope:object
Defined in: packages/messaging/src/receiver.ts:94
The validated envelope.
actor
actor: {
kind:"tenant";roles:string[];scopePath:string;subjectId:string;tenant:string; } | {kind:"platform";roles:string[];scopePath:"/";subjectId:"00000000-0000-0000-0000-000000000000";tenant:"platform"; } =Actor
actorToken?
optionalactorToken?:string
The gateway's signed actor token, propagated unchanged through the causal chain.
callerModule?
optionalcallerModule?:"identity"|"audit"|"governance"|"trust"|"issuance"|"verification"|"vault"|"signing"|"e-services"|"provisioning"
The calling module on a module-initiated in-process call; set by the transport only.
causationId
causationId:
string
correlationId
correlationId:
string
deadline?
optionaldeadline?:string
idempotencyKey?
optionalidempotencyKey?:string
issuedAt
issuedAt:
string=Timestamp
messageId
messageId:
string=Uuid
schema
schema:
string
The registry key of the schema the body conforms to.
key
readonlykey:K
Defined in: packages/messaging/src/receiver.ts:98
The registry key.
scope
readonlyscope:MintedScope<S,KeyedTo<P,K>>
Defined in: packages/messaging/src/receiver.ts:92
The scope minted from the envelope's actor. kind says which.
signal
readonlysignal:AbortSignal
Defined in: packages/messaging/src/receiver.ts:109
Aborts when the message's deadline passes.
subject
readonlysubject:string
Defined in: packages/messaging/src/receiver.ts:96
The concrete subject.