UNPKG

blade

Version:
73 lines (71 loc) 2.39 kB
import { a as CompilerError } from "./index-l2pJm30F.js"; //#region ../blade-client/dist/utils/index.d.ts //#endregion //#region src/utils/errors.d.ts interface ClientErrorDetails { message: string; code: 'JSON_PARSE_ERROR' | 'TRIGGER_REQUIRED' | 'AUTH_INVALID_ACCESS' | CompilerError['code']; } declare class ClientError extends Error { message: ClientErrorDetails['message']; code: ClientErrorDetails['code']; constructor(details: ClientErrorDetails); } //#endregion //#region src/triggers/errors.d.ts interface ErrorDetails { name?: string; message?: string; code?: string; fields?: string[]; instructions?: string[]; } declare class TriggerError extends Error { code?: ErrorDetails['code']; fields?: ErrorDetails['fields']; instructions?: ErrorDetails['instructions']; constructor(details?: ErrorDetails); } declare class InvalidFieldsError extends TriggerError { constructor(details: ErrorDetails & { fields: string[]; reasons?: string[]; }); } declare class EmptyFieldsError extends TriggerError { constructor(details: ErrorDetails & { fields: string[]; }); } declare class ExtraneousFieldsError extends TriggerError { constructor(details: ErrorDetails & { fields: string[]; }); } declare class RecordExistsError extends TriggerError { constructor(details?: ErrorDetails); } declare class RecordNotFoundError extends TriggerError { constructor(details?: ErrorDetails); } declare class TooManyRequestsError extends TriggerError { constructor(details?: ErrorDetails); } declare class InvalidPermissionsError extends TriggerError { constructor(details?: ErrorDetails); } declare class AddNotAllowedError extends TriggerError { constructor(details?: ErrorDetails); } declare class SetNotAllowedError extends TriggerError { constructor(details?: ErrorDetails); } declare class RemoveNotAllowedError extends TriggerError { constructor(details?: ErrorDetails); } declare class MultipleWithInstructionsError extends TriggerError { constructor(); } //#endregion //#endregion export { InvalidFieldsError as a, RecordExistsError as c, SetNotAllowedError as d, TooManyRequestsError as f, ExtraneousFieldsError as i, RecordNotFoundError as l, ClientError as n, InvalidPermissionsError as o, TriggerError as p, EmptyFieldsError as r, MultipleWithInstructionsError as s, AddNotAllowedError as t, RemoveNotAllowedError as u };