UNPKG

@elsikora/nestjs-crud-automator

Version:

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

16 lines (15 loc) 1.09 kB
import { Type } from '@nestjs/common'; import { IAuthGuard } from '@nestjs/passport'; import { TApiPropertyDescribeProperties } from '../../../../type/decorator/api/property'; import { EApiDtoType, EApiRouteType } from '../../../../enum/decorator/api'; /** * 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;