@xemahq/events
v0.11.0
Published
CloudEvents-based event-bus client and transport for Xema services, with optional NestJS integration.
Readme
@xemahq/events
Typed CloudEvents descriptors, registry, and generators
Overview
The framework-agnostic core for typed events: a CloudEvents 1.0 envelope built
on the official cloudevents SDK, typed event descriptors, a descriptor
registry, payload validation, a pluggable transport interface, and AsyncAPI /
event-catalog generators. Pure types, zod schemas, and small helpers — no
NestJS, no frontend, no query-cache knowledge. The NestJS and frontend layers
build on top of this package.
When to use it
- Use it to declare typed event descriptors and validate or generate documentation for them, independent of any framework.
Installation
pnpm add @xemahq/eventsUsage
import { EventRegistry } from '@xemahq/events';
const registry = new EventRegistry();
registry.register(myEventDescriptors);
const descriptor = registry.getOrThrow(eventType);License
Apache-2.0 © Xema — xema.dev
