UNPKG

nestjs-prisma-base

Version:

A comprehensive NestJS package providing base classes, utilities, and decorators for building CRUD APIs with Prisma ORM integration, featuring pagination, search, filtering, relation loading, configurable DTOs, and modular composition capabilities.

37 lines (36 loc) 1.32 kB
import { DTOConfig } from './dto-config.interface'; export declare function configureDTOs(config: Partial<DTOConfig>): void; export declare function getDTOConfig(): DTOConfig; export declare function registerDTOConfigChangeCallback(callback: () => void): void; export declare class ConfigurableBaseCreateDto { protected static dtoConfig: Partial<DTOConfig>; static configure(config: Partial<DTOConfig>): void; static getConfig(): DTOConfig; } export declare class ConfigurableBaseUpdateDto { protected static dtoConfig: Partial<DTOConfig>; static configure(config: Partial<DTOConfig>): void; static getConfig(): DTOConfig; } export declare class ConfigurableBaseResponseDto { protected static dtoConfig: Partial<DTOConfig>; static configure(config: Partial<DTOConfig>): void; static getConfig(): DTOConfig; id?: number; createdAt?: Date; updatedAt?: Date; message?: string; static shouldIncludeTimestamps(): boolean; static shouldIncludeId(): boolean; static shouldIncludeMessage(): boolean; static isSwaggerEnabled(): boolean; static getTimestampFields(): { createdAt: string; updatedAt: string; }; static getMessageFieldConfig(): { fieldName: string; defaultValue?: string; maxLength: number; }; }