/** * EventBus — warstwa intencji / orkiestracji. * * "Co się stało" (w przeciwieństwie do DataBus, który zajmuje się "co istnieje"). * Pub/sub, fire-and-forget, efemeryczny (brak cache — nowy subskrybent * NIE dostaje starych eventów). * * Rozszerzalny do cross-tab (BroadcastChannel) i cross-microfrontend (postMessage). */ import type { Observable } from 'rxjs'; import type { CorrelationId, EventId } from '../identity/index.js'; export interface EchelonEvent { readonly id: EventId; /** Dot-case domain event name, np. `fx.transaction.submit`. */ readonly type: string; readonly payload: TPayload; readonly at: number; readonly correlationId: CorrelationId; readonly source?: string; readonly meta?: Readonly>; } export interface EventBus { readonly stream$: Observable; /** Filtrowany strumień po typie eventu (dokładnym albo glob `fx.*`). */ on(typePattern: string): Observable>; emit(type: string, payload: unknown, options?: { correlationId?: CorrelationId; source?: string; }): void; } export declare const EVENT_BUS: import("../index.js").EchelonToken; //# sourceMappingURL=index.d.ts.map