declare const NotFoundError_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
readonly _tag: "NotFoundError";
} & Readonly;
export declare class NotFoundError extends NotFoundError_base<{
readonly collection: string;
readonly id: string;
readonly message: string;
}> {
}
declare const DuplicateKeyError_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
readonly _tag: "DuplicateKeyError";
} & Readonly;
export declare class DuplicateKeyError extends DuplicateKeyError_base<{
readonly collection: string;
readonly field: string;
readonly value: string;
readonly existingId: string;
readonly message: string;
}> {
}
declare const ForeignKeyError_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
readonly _tag: "ForeignKeyError";
} & Readonly;
export declare class ForeignKeyError extends ForeignKeyError_base<{
readonly collection: string;
readonly field: string;
readonly value: string;
readonly targetCollection: string;
readonly message: string;
}> {
}
declare const ValidationError_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
readonly _tag: "ValidationError";
} & Readonly;
export declare class ValidationError extends ValidationError_base<{
readonly message: string;
readonly issues: ReadonlyArray<{
readonly field: string;
readonly message: string;
readonly value?: unknown;
readonly expected?: string;
readonly received?: string;
}>;
}> {
}
declare const UniqueConstraintError_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
readonly _tag: "UniqueConstraintError";
} & Readonly;
export declare class UniqueConstraintError extends UniqueConstraintError_base<{
readonly collection: string;
readonly constraint: string;
readonly fields: ReadonlyArray;
readonly values: Readonly>;
readonly existingId: string;
readonly message: string;
}> {
}
declare const ConcurrencyError_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
readonly _tag: "ConcurrencyError";
} & Readonly;
export declare class ConcurrencyError extends ConcurrencyError_base<{
readonly collection: string;
readonly id: string;
readonly message: string;
}> {
}
declare const OperationError_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
readonly _tag: "OperationError";
} & Readonly;
export declare class OperationError extends OperationError_base<{
readonly operation: string;
readonly reason: string;
readonly message: string;
}> {
}
declare const TransactionError_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
readonly _tag: "TransactionError";
} & Readonly;
export declare class TransactionError extends TransactionError_base<{
readonly operation: "begin" | "commit" | "rollback";
readonly reason: string;
readonly message: string;
}> {
}
declare const HookError_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
readonly _tag: "HookError";
} & Readonly;
export declare class HookError extends HookError_base<{
readonly hook: string;
readonly collection: string;
readonly operation: "create" | "update" | "delete";
readonly reason: string;
readonly message: string;
}> {
}
export type CrudError = NotFoundError | DuplicateKeyError | ForeignKeyError | ValidationError | UniqueConstraintError | ConcurrencyError | OperationError | TransactionError | HookError;
export {};
//# sourceMappingURL=crud-errors.d.ts.map