@elsikora/nestjs-crud-automator
Version:
A library for automating the creation of CRUD operations in NestJS.
14 lines (13 loc) • 941 B
TypeScript
import type { EApiDtoType, EApiRouteType } from '../../enum/decorator/api/index';
import type { Type } from "@nestjs/common";
import type { IAuthGuard } from "@nestjs/passport";
import type { TApiPropertyDescribeProperties } from '../../type/decorator/api/property/index';
/**
* 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;