import type { Constructor } from '@cratis/fundamentals'; import type { ConcurrencyDimensionFlags } from './ConcurrencyDimensions.js'; import type { EventSourceDefinition } from './EventSourceDefinition.js'; import type { EventStreamDefinition } from './EventStreamDefinition.js'; import type { IEventSources } from './IEventSources.js'; /** The explicit routing a caller supplied next to a definition. */ export interface ExplicitRouting { /** Explicit event source type, if any. */ sourceType?: string; /** Explicit event stream type, if any. */ streamType?: string; } /** The routing of an append resolved through an event source definition. */ export declare class ResolvedEventRouting { readonly definition: EventSourceDefinition; readonly stream?: EventStreamDefinition | undefined; private constructor(); /** The registered event source name written on the event. */ get eventSource(): string; /** The event source type written on the event. */ get sourceType(): string; /** The event stream type to write, or undefined to let the Kernel choose. */ get streamType(): string | undefined; /** The concurrency dimensions that apply: the stream's when it declares any, otherwise the source's. */ get dimensions(): ConcurrencyDimensionFlags; /** * Resolves the routing of an append. * @param eventSources - The event sources; undefined when the store has none. * @param eventSource - The definition class or name; undefined for a legacy append. * @param stream - The declared stream name, if any. * @param explicit - Explicit routing that must not contradict the definition. * @returns The routing, or undefined when no definition is involved. * @throws UnknownEventSource, EventStreamDoesNotBelongToEventSource, EventRoutingContradictsEventSource, EventStreamRequiresEventSource. */ static resolve(eventSources: IEventSources | undefined, eventSource: Constructor | string | undefined, stream: string | undefined, explicit?: ExplicitRouting): ResolvedEventRouting | undefined; } //# sourceMappingURL=ResolvedEventRouting.d.ts.map