import type { Collection } from "../main.js"; export type ErrorParams = { is_user_fault: boolean; type: string; is_developer_fault: boolean; data: any; }; export interface ErrorLikeObject { message: string; type: string; data: any; } export default class SealiousError> extends Error { is_user_fault: boolean; data: DataShape; is_developer_fault: boolean; sealious_error: boolean; type: string; message: string; constructor(message: string, _params?: ErrorParams, data?: any); toObject(): ErrorLikeObject; } export declare class ValidationError extends SealiousError { constructor(message: string, params?: Partial); } export declare class ValueExists extends SealiousError { constructor(message: string, params?: any); } export declare class InvalidCredentials extends SealiousError { constructor(message: string, params?: any); } export declare class NotFound extends SealiousError { constructor(message: string, params?: any); } export declare class DeveloperError extends SealiousError { constructor(message: string, params?: any); } export declare class BadContext extends SealiousError { constructor(message: string, params?: any); } export declare class ServerError extends SealiousError { constructor(message: string, params?: any); } export declare class BadSubjectPath extends SealiousError { constructor(message: string, params?: any); } export declare class BadSubjectAction extends SealiousError { constructor(message: string, params?: any); } export declare class FieldDoesNotSupportAttachments extends SealiousError { constructor(message: string, params?: any); } export declare class FieldsError extends SealiousError<{ collection: C; field_messages: { [field in keyof C["fields"]]: { message: string; }; }; other_messages: string[]; }> { field_messages: { [index: string]: { message: string; } | undefined; }; other_messages: string[]; constructor(collection: C, field_messages: { [index: string]: { message: string; } | undefined; }, other_messages?: string[]); hasErrors(): boolean; getSimpleMessages(): Partial>; static isFieldsError(collection: C, e: unknown): e is FieldsError; getErrorForField(field_name: keyof C["fields"]): string; }