Skip to main content

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​

readonly adapter: 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​

readonly causationId: 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​

readonly correlationId: string

Defined in: packages/messaging/src/receiver.ts:102

The correlation id, also visible through currentCorrelationId().


envelope​

readonly envelope: 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?​

optional actorToken?: string

The gateway's signed actor token, propagated unchanged through the causal chain.

callerModule?​

optional callerModule?: "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?​

optional deadline?: string

idempotencyKey?​

optional idempotencyKey?: string

issuedAt​

issuedAt: string = Timestamp

messageId​

messageId: string = Uuid

schema​

schema: string

The registry key of the schema the body conforms to.


key​

readonly key: K

Defined in: packages/messaging/src/receiver.ts:98

The registry key.


scope​

readonly scope: 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​

readonly signal: AbortSignal

Defined in: packages/messaging/src/receiver.ts:109

Aborts when the message's deadline passes.


subject​

readonly subject: string

Defined in: packages/messaging/src/receiver.ts:96

The concrete subject.