UNPKG

fireodm

Version:

A basic and extensible ODM for the Firestore Admin SDK in Node.js with decorators, relationships, and validation.

42 lines 1.15 kB
import { ZodIssue } from 'zod'; /** * Base class for custom ORM errors. */ export declare class OrmError extends Error { constructor(message: string); } /** * Error thrown when Zod validation fails on a model instance. */ export declare class ValidationError extends OrmError { /** * Array of Zod validation issues. */ issues: ZodIssue[]; /** * Creates an instance of ValidationError. * @param message The error message. * @param issues An array of Zod validation issues. */ constructor(message: string, issues: ZodIssue[]); } /** * Error thrown when a requested Firestore document is not found. */ export declare class NotFoundError extends OrmError { /** * The name of the model class being searched. */ modelName: string; /** * The ID of the document that was not found. */ documentId: string; /** * Creates an instance of NotFoundError. * @param modelName The name of the model class. * @param documentId The ID of the document. */ constructor(modelName: string, documentId: string); } //# sourceMappingURL=errors.d.ts.map