import { IDomainEvent, ISpecification } from '@vytches/ddd-contracts'; /** * Interface for routing events to appropriate contexts based on business rules. * Determines which bounded contexts should receive specific events. * * @since 1.0.0 * @public */ export interface IContextRouter { determineTargetContexts(event: IDomainEvent): string[]; } /** * Flexible context router implementation with multiple configuration options. * Supports routing rules based on event types, specifications, and predicates. * * @since 1.0.0 * @public * * @remarks * VF-031 (D-4): Part of the low-priority integration event bridge * (`IntegrationEventProcessor` / `DomainToIntegrationTransformer` / * `ContextRouter`). Kept because it is re-exported (transitively, via * `DomainToIntegrationTransformer`) from the public `@vytches/ddd-enterprise` * barrel, but the shape of this bridge may be refactored in a future major * release. Treat as stable-but-narrow API surface, not a long-term * architectural commitment. */ export declare class ContextRouter implements IContextRouter { private readonly routingRules; constructor(initialConfig?: ContextRouterConfig); configure(config: ContextRouterConfig): this; sendAllEventsTo(...contexts: string[]): this; sendEventTypeTo(eventName: string, ...contexts: string[]): this; sendEventsMatchingSpecificationTo(specification: ISpecification, ...contexts: string[]): this; sendEventsMatchingPredicateTo(predicate: (event: IDomainEvent) => boolean, ...contexts: string[]): this; determineTargetContexts(event: IDomainEvent): string[]; private normalizeCondition; private evaluateCondition; clear(): this; } type EventRoutingCondition = string | ((event: IDomainEvent) => boolean) | ISpecification | boolean; type ContextRouterConfig = string[] | Map | Record; export {};