UNPKG

@alecslab/nestjs-crud-kit

Version:

Base clases of CRUD operations for NestJs

13 lines (12 loc) 477 B
interface IWrite<DTO, MODEL> { create(item: DTO): Promise<MODEL>; update(id: number | string | object, item: Partial<DTO>): Promise<boolean | MODEL>; remove(id: number | string | object): Promise<boolean | MODEL>; } interface IRead<MODEL> { findAll(options?: unknown): Promise<MODEL[]>; findOne(id: number | string | object, options?: unknown): Promise<MODEL>; } export interface IService<DTO, MODEL> extends IRead<MODEL>, IWrite<DTO, MODEL> { } export {};