import { JsonApiErrorNode, MessagesBagContract, ErrorReporterContract } from '../types.js'; import { ValidationException } from '../validation_exception/index.js'; /** * The JsonApiErrorReporter formats error messages as per the JSON API spec. */ export declare class JsonApiErrorReporter implements ErrorReporterContract<{ errors: JsonApiErrorNode[]; }> { private messages; private bail; private errors; /** * A boolean to know if an error has been reported or * not */ hasErrors: boolean; constructor(messages: MessagesBagContract, bail: boolean); /** * Report a new error */ report(pointer: string, rule: string, message: string, arrayExpressionPointer?: string, args?: any): void; /** * Returns an instance of [[ValidationException]] */ toError(): ValidationException; /** * Return errors */ toJSON(): { errors: JsonApiErrorNode[]; }; }