import { HttpError } from "@classytic/repo-core/errors"; //#region src/domain/errors/muster.errors.d.ts declare class MusterError extends Error implements HttpError { readonly code: string; readonly status: number; constructor(message: string, code: string, status: number); } declare class SessionNotFoundError extends MusterError { constructor(id: string); } declare class SessionNotOpenError extends MusterError { constructor(id: string); } declare class SessionAlreadyOpenError extends MusterError { constructor(subjectRef: string, subjectModel: string, scope?: string); } declare class InvalidSessionTransitionError extends MusterError { constructor(from: string, to: string); } declare class InvalidBreakStateError extends MusterError { constructor(message: string); } declare class InvalidTimeRangeError extends MusterError { constructor(message: string); } /** * A `claimVersion` CAS write lost the race — the document's `version` * moved between the read and the write (concurrent correction, break * toggle, or status transition). The operation was NOT applied; callers * retry by re-reading the document. */ declare class VersionMismatchError extends MusterError { constructor(id: string, expectedVersion: number); } declare class AttendanceRecordImmutableError extends MusterError { constructor(operation: string); } declare class UnmanagedSessionError extends MusterError { constructor(); } declare class UnknownSubjectError extends MusterError { constructor(subjectRef: string, subjectModel: string); } declare class CorrectionNotFoundError extends MusterError { constructor(id: string); } declare class CorrectionNotPendingError extends MusterError { constructor(id: string); } declare class InvalidCorrectionTransitionError extends MusterError { constructor(from: string, to: string); } declare class EmptyCorrectionError extends MusterError { constructor(); } declare class CorrectionAwaitingApprovalError extends MusterError { constructor(id: string, chainStatus: string); } /** * Thrown at `defineMuster(shape).bind()` when the backing repositories don't declare * the runtime capabilities muster's transactional verbs require * (PACKAGE_RULES "Runtime capabilities"). Fail loud at boot, not with a * cryptic driver error on the first `checkIn()`. */ declare class MusterCapabilityError extends MusterError { constructor(missing: readonly string[]); } //#endregion export { AttendanceRecordImmutableError, CorrectionAwaitingApprovalError, CorrectionNotFoundError, CorrectionNotPendingError, EmptyCorrectionError, InvalidBreakStateError, InvalidCorrectionTransitionError, InvalidSessionTransitionError, InvalidTimeRangeError, MusterCapabilityError, MusterError, SessionAlreadyOpenError, SessionNotFoundError, SessionNotOpenError, UnknownSubjectError, UnmanagedSessionError, VersionMismatchError };