Skip to main content

Interface: RequestCall<K>

Defined in: packages/messaging/src/sender.ts:51

What a call to MessageClient.request carries.

Type Parameters​

K​

K extends RequestKey

Properties​

actor​

readonly actor: { kind: "tenant"; roles: string[]; scopePath: string; subjectId: string; tenant: string; } | { kind: "platform"; roles: string[]; scopePath: "/"; subjectId: "00000000-0000-0000-0000-000000000000"; tenant: "platform"; }

Defined in: packages/messaging/src/sender.ts:55

Who the call acts for. Copied into the envelope unchanged; never widened here.


body​

readonly body: StaticType<[]>

Defined in: packages/messaging/src/sender.ts:53

The request body. Validated strictly before it leaves.


causationId?​

readonly optional causationId?: string

Defined in: packages/messaging/src/sender.ts:71

The id of the message that caused this one. Defaults to the id of the message being handled (ambient, set by the receiver), then to the correlation id. Pass it only to override.


correlationId?​

readonly optional correlationId?: string

Defined in: packages/messaging/src/sender.ts:65

Defaults to the ambient correlation id, else a new one.


idempotencyKey?​

readonly optional idempotencyKey?: string

Defined in: packages/messaging/src/sender.ts:63

Required by every mutation; a retry of the same intent reuses it.


tenant?​

readonly optional tenant?: string

Defined in: packages/messaging/src/sender.ts:61

The tenant token for a key with * in the tenant position. Defaults to the actor's tenant. Giving a different one is allowed only so a test can prove the receiver refuses it.


timeoutMs?​

readonly optional timeoutMs?: number

Defined in: packages/messaging/src/sender.ts:78

How long the caller waits, and so the envelope's deadline. Defaults from the client. A call that passes on the handled message's actor token is cut to that message's deadline whatever is given here, and fails as deadline.exceeded without sending when it has already passed.