Type Alias: DomainEvent
Real-time domain event model.
Every type here is derived from the OpenAPI spec (components["schemas"] and the
documentation-only GET /api/events/schema operation) — there are NO hand-written
event shapes, so the model can never drift from the backend. Regenerate with
npm run generate:types whenever the spec changes.
Events are delivered as JSON on the SSE streams:
GET /api/events/stream(tenant-wide)GET /api/projects/{projectId}/events/stream(project-scoped)
Each event's data (the SSE data: line) is a DomainEvent. Narrow on the
type discriminator to get a fully-typed payload.data:
Defined in
4Players/cortex-typescript-sdk/src/realtime/events.ts:28