Interface: EventPublication<K>
Defined in: packages/messaging/src/events.ts:33
What EventPublisher.publish is given.
Type Parameters
K
K extends EventKey
Properties
actor
readonlyactor: {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/events.ts:39
The actor whose request caused the event, propagated unchanged.
body
readonlybody:StaticType<[]>
Defined in: packages/messaging/src/events.ts:37
The event body. Validated strictly before it leaves.
causationId?
readonlyoptionalcausationId?:string
Defined in: packages/messaging/src/events.ts:52
The id of the message that caused this one. Defaults to the id of the message being handled (ambient), then to the correlation id.
correlationId?
readonlyoptionalcorrelationId?:string
Defined in: packages/messaging/src/events.ts:47
Defaults to the ambient correlation id, else a new one.
msgId?
readonlyoptionalmsgId?:string
Defined in: packages/messaging/src/events.ts:45
Nats-Msg-Id: what JetStream de-duplicates on inside the stream's window. For
an audit record it is the record id, so an outbox relay that publishes twice
stores once.
tenant
readonlytenant:string
Defined in: packages/messaging/src/events.ts:35
The tenant token of the subject: the tenant the event concerns, or platform.