import type { ConstraintViolation } from '../../eventSequences/ConstraintViolation.js'; import type { IClientArtifactsProvider } from '../../artifacts/index.js'; import type { ChronicleConnection } from '../../connection/index.js'; import { ConstraintId } from './ConstraintId.js'; import { IConstraints } from './IConstraints.js'; import { ConstraintCapture } from './ConstraintBuilder.js'; /** Compile decorator and fluent constraints using the production registration rules. */ export declare function compileConstraints(provider: Pick): Map; /** Resolve the registered message and detail substitutions without a connection. */ export declare function resolveConstraintMessage(captures: ReadonlyMap, violation: ConstraintViolation): ConstraintViolation; /** Manages discovery and registration of constraints with the Chronicle Kernel. */ export declare class Constraints implements IConstraints { private readonly _eventStore; private readonly _connection; private readonly _clientArtifacts; private _captures; /** * Creates a new {@link Constraints} instance. * @param _eventStore - The name of the event store these constraints belong to. * @param _connection - The connection used to communicate with the Kernel. * @param _clientArtifacts - Provider for discovered client artifact types. */ constructor(_eventStore: string, _connection: ChronicleConnection, _clientArtifacts: IClientArtifactsProvider); /** @inheritdoc */ discover(): Promise; /** @inheritdoc */ register(): Promise; /** @inheritdoc */ hasFor(id: ConstraintId): boolean; /** * Resolves a configured violation message, preserving the Kernel message when none was supplied. * @param violation - Violation returned by the Kernel. * @returns The violation with its configured message and substituted details, if available. */ resolveMessageFor(violation: ConstraintViolation): ConstraintViolation; } //# sourceMappingURL=Constraints.d.ts.map