fireodm
Version:
A basic and extensible ODM for the Firestore Admin SDK in Node.js with decorators, relationships, and validation.
12 lines • 520 B
TypeScript
import "reflect-metadata";
import { ZodSchema, ZodTypeAny } from "zod";
/**
* Decorator to attach a Zod schema to a class property.
*/
export declare function Validate(schema: ZodTypeAny): (target: any, propertyKey: string) => void;
/**
* Builds a Zod schema for the class by collecting all @Validate decorators.
* Returns a ZodType that parses into the class instance type T.
*/
export declare function getValidationSchema<T>(ctor: new (...args: any[]) => T): ZodSchema<T>;
//# sourceMappingURL=validation.d.ts.map