UNPKG

@elsikora/nestjs-crud-automator

Version:

A library for automating the creation of CRUD operations in NestJS.

16 lines (15 loc) 1.1 kB
import type { Type } from "@nestjs/common"; import type { IAuthGuard } from "@nestjs/passport"; import type { TApiPropertyDescribeProperties } from '../../type/decorator/api/property/index'; import { EApiDtoType, EApiRouteType } from '../../enum/decorator/api/index'; /** * Determines if a property should be marked for inclusion in a specific DTO type * @param {EApiRouteType} method - The API route type (GET, POST, etc.) * @param {EApiDtoType} dtoType - The DTO type (request, response, etc.) * @param {string} propertyName - The name of the property * @param {TApiPropertyDescribeProperties} propertyMetadata - The property's metadata * @param {boolean} isPrimary - Whether the property is a primary key * @param {Type<IAuthGuard>} currentGuard - The current authentication guard * @returns {boolean} True if the property should be marked, false otherwise */ export declare function DtoIsPropertyShouldBeMarked(method: EApiRouteType, dtoType: EApiDtoType, propertyName: string, propertyMetadata: TApiPropertyDescribeProperties, isPrimary: boolean, currentGuard?: Type<IAuthGuard>): boolean;