import { type RuntimeEventFeeds } from '../transport-core/index.js';
type EventLike = {
    readonly type: string;
};
export interface SerializedEventEnvelope<TEvent extends EventLike = EventLike> {
    readonly type: string;
    readonly timestamp?: number;
    readonly ts?: number;
    readonly traceId?: string;
    readonly sessionId?: string;
    readonly source?: string;
    readonly payload: TEvent;
}
export type DomainEventConnector<TDomain extends string, TEvent extends EventLike = EventLike> = (domain: TDomain, onEnvelope: (envelope: SerializedEventEnvelope<TEvent>) => void) => void | Promise<() => void>;
export type DomainEvents<TDomain extends string, TEvent extends EventLike = EventLike> = RuntimeEventFeeds<TDomain, TEvent>;
export declare function createRemoteDomainEvents<TDomain extends string, TEvent extends EventLike = EventLike>(domains: readonly TDomain[], connect: DomainEventConnector<TDomain, TEvent>): DomainEvents<TDomain, TEvent>;
export {};
//# sourceMappingURL=domain-events.d.ts.map