انتقل إلى المحتوى الرئيسي

Function: encodeEnvelope()

encodeEnvelope(envelope): Record<string, string>

Defined in: packages/contracts/src/envelope.ts:179

Serialises an envelope to header name and value pairs.

Parameters​

envelope​

A valid envelope. Not validated here; validate before sending.

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?​

string = ...

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

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​

string = ...

correlationId​

string = ...

deadline?​

string = ...

idempotencyKey?​

string = ...

issuedAt​

string = Timestamp

messageId​

string = Uuid

schema​

string = ...

The registry key of the schema the body conforms to.

Returns​

Record<string, string>

One entry per present field. Optional fields that are absent are omitted.