@elsikora/nestjs-crud-automator
Version:
A library for automating the creation of CRUD operations in NestJS.
13 lines (12 loc) • 698 B
TypeScript
import { EApiDtoType, EApiRouteType } from '../../enum/decorator/api/index';
/**
* Determines if a DTO should be generated for a given route method and DTO type.
* Makes logical decisions based on combinations, for example:
* - BODY DTOs only for CREATE/UPDATE routes
* - QUERY DTOs only for GET_LIST routes
* - RESPONSE DTOs for all routes except DELETE
* @param {EApiRouteType} method - The API route type (CREATE, DELETE, GET, etc.)
* @param {EApiDtoType} dtoType - The type of DTO (REQUEST, RESPONSE, etc.)
* @returns {boolean} True if a DTO should be generated, false otherwise
*/
export declare const DtoIsShouldBeGenerated: (method: EApiRouteType, dtoType: EApiDtoType) => boolean;