@xemahq/realtime-events
v0.3.0
Published
Shared event definitions and metadata for Xema realtime streaming.
Readme
@xemahq/realtime-events
Shared contract and helpers for the realtime SSE stream
Overview
The framework-agnostic contract for the unified realtime SSE stream — no DOM, no NestJS. It defines the event-type strings, frame shapes, channel definitions, and small registry helpers that derive subscription patterns and the known-types set from a descriptor registry. Producers publish against these shapes and the frontend imports the same definitions to route incoming frames. Dependency-light by design.
When to use it
- Use it when a producer or a frontend needs the shared realtime frame and channel definitions.
Installation
pnpm add @xemahq/realtime-eventsUsage
import { subscribedPatternsFromRegistry } from '@xemahq/realtime-events';
const patterns = subscribedPatternsFromRegistry(descriptors);License
Apache-2.0 © Xema — xema.dev
