UNPKG

@elsikora/nestjs-crud-automator

Version:

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

18 lines (17 loc) 1.28 kB
import { EApiRouteType } from '../../../enum/decorator/api'; import { IApiControllerReadPlan } from '../../../interface/class/api/controller/read'; import { IApiControllerPropertiesRouteAutoDtoConfig } from '../../../interface/decorator/api'; import { IApiEntity } from '../../../interface/entity'; import { Type } from '@nestjs/common'; import { IAuthGuard } from '@nestjs/passport'; /** * Generates a cached PARAMETERS DTO for route-local inherited read scope. * @template E - Entity type owned by the generated route. * @param {IApiEntity<E>} entityMetadata - Entity metadata used for field decorators. * @param {EApiRouteType} method - Generated GET or GET_LIST route type. * @param {IApiControllerReadPlan} readPlan - Validated route-local read plan. * @param {IApiControllerPropertiesRouteAutoDtoConfig} [dtoConfig] - Optional auto DTO validators. * @param {Type<IAuthGuard>} [currentGuard] - Authentication guard used for field exposure metadata. * @returns {Type<unknown>} Cached generated parameters DTO class. */ export declare function DtoGenerateReadParameters<E>(entityMetadata: IApiEntity<E>, method: EApiRouteType, readPlan: IApiControllerReadPlan, dtoConfig?: IApiControllerPropertiesRouteAutoDtoConfig, currentGuard?: Type<IAuthGuard>): Type<unknown>;