import { ConstraintEventSequence } from './ConstraintEventSequences.js'; import { IConstraintBuilder } from './IConstraintBuilder.js'; import { IUniqueConstraintBuilder } from './IUniqueConstraintBuilder.js'; import { UniqueConstraintCapture } from './UniqueConstraintBuilder.js'; /** Represents the captured scope for a constraint. */ export interface ConstraintScopeCapture { perEventSourceType: boolean; perEventStreamType: boolean; perEventStreamId: boolean; } /** Represents the captured definition of a unique event type constraint. */ export interface UniqueEventTypeCapture { eventTypeId: string; eventTypeIds?: string[]; removedWithEventTypeIds?: string[]; message?: string; name?: string; } /** Represents the full captured definition of a constraint. */ export interface ConstraintCapture { name: string; scope: ConstraintScopeCapture; uniqueConstraint?: UniqueConstraintCapture; uniqueEventType?: UniqueEventTypeCapture; /** Identifiers of the event sequences the constraint applies to; empty or omitted means every event sequence. */ eventSequences?: string[]; } /** * Implements {@link IConstraintBuilder}, capturing the constraint definition * for later serialization and registration with the Kernel. */ export declare class ConstraintBuilder implements IConstraintBuilder { readonly capture: ConstraintCapture; private _uniqueBuilder?; constructor(name: string); /** @inheritdoc */ perEventSourceType(): IConstraintBuilder; /** @inheritdoc */ perEventStreamType(): IConstraintBuilder; /** @inheritdoc */ perEventStreamId(): IConstraintBuilder; /** @inheritdoc */ forEventSequences(...eventSequenceIds: ConstraintEventSequence[]): IConstraintBuilder; /** @inheritdoc */ forEventLog(): IConstraintBuilder; /** @inheritdoc */ unique(callback: (builder: IUniqueConstraintBuilder) => void): IConstraintBuilder; /** @inheritdoc */ uniqueFor(eventType: Function, message?: string, name?: string): IConstraintBuilder; } //# sourceMappingURL=ConstraintBuilder.d.ts.map