@elsikora/nestjs-crud-automator
Version:
A library for automating the creation of CRUD operations in NestJS.
14 lines (13 loc) • 921 B
TypeScript
import { EApiDtoType, EApiRouteType } from '../../../../enum/decorator/api';
import { Type } from '@nestjs/common';
import { IAuthGuard } from '@nestjs/passport';
import { TApiPropertyDescribeProperties } from '../../../../type/decorator/api/property';
/**
* Determines if a property should be exposed for the current authentication guard
* @param {EApiRouteType} method - The API route type (GET, POST, etc.)
* @param {TApiPropertyDescribeProperties} propertyMetadata - The property's metadata
* @param {EApiDtoType} dtoType - The DTO type (request, response, etc.)
* @param {Type<IAuthGuard>} currentGuard - The current authentication guard
* @returns {boolean} True if the property should be exposed, false otherwise
*/
export declare function DtoIsPropertyExposedForGuard(method: EApiRouteType, propertyMetadata: TApiPropertyDescribeProperties, dtoType: EApiDtoType, currentGuard?: Type<IAuthGuard>): boolean;