UNPKG

@elsikora/nestjs-crud-automator

Version:

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

30 lines (29 loc) 2.03 kB
import { IApiBaseEntity } from '../../interface/api-base-entity.interface'; import { IApiRouteRuntimeCustomExecutionOptions, IApiRouteRuntimeGeneratedExecutionOptions } from '../../interface/class/api/route'; import { IApiRouteMetadata, IApiRouteRuntimeProperties } from '../../interface/decorator/api'; import { TApiControllerMethod } from '../../type/class/controller-method.type'; import { EApiRouteType } from '../../enum/decorator/api'; export declare class ApiRouteRuntime { static executeCustom<E extends IApiBaseEntity, R>(options: IApiRouteRuntimeCustomExecutionOptions<E, R>): Promise<R>; static executeCustomRequestRelations<E extends IApiBaseEntity>(controller: TApiControllerMethod<E>, metadata: IApiRouteMetadata<E>, runtimeProperties: IApiRouteRuntimeProperties<E>, body: Partial<E> | undefined): Promise<void>; static executeCustomResponseRelations<E extends IApiBaseEntity, R>(controller: TApiControllerMethod<E>, runtimeProperties: IApiRouteRuntimeProperties<E>, response: R): Promise<R>; static executeGenerated<E extends IApiBaseEntity, R extends EApiRouteType>(options: IApiRouteRuntimeGeneratedExecutionOptions<E, R>): Promise<unknown>; private static executeCustomErrorSubscribers; private static executeCustomResponse; private static executeDiscriminatedRequestBodyDto; private static executeGeneratedErrorSubscribers; private static executeGeneratedOperation; private static executeGeneratedRequestPipeline; private static executeGeneratedResponse; private static executeGeneratedTransaction; private static executeGeneratedUpdateOperation; private static executeRequestTargets; /** * Checks whether response relation loading has at least one configured include key. * @param {unknown} include - Response include map. * @returns {boolean} Whether response relation loading should run. */ private static hasResponseRelationInclude; private static loadCustomResponseRelations; private static resolvePrimaryKey; }