@elsikora/nestjs-crud-automator
Version:
A library for automating the creation of CRUD operations in NestJS.
13 lines (12 loc) • 862 B
TypeScript
import { IApiBaseEntity } from '../../../../interface/api-base-entity.interface';
import { IApiControllerReadPlan } from '../../../../interface/class/api/controller/read';
import { FindOptionsWhere } from 'typeorm';
/**
* Converts validated inherited path parameters into a direct entity where scope.
* @template E - Entity type owned by the generated route.
* @param {Partial<E> | undefined} parameters - Transformed route parameter object.
* @param {IApiControllerReadPlan} readPlan - Validated route-local read plan.
* @returns {FindOptionsWhere<E>} Direct entity scope derived from the route path.
* @throws {BadRequestException} When a required inherited parameter is missing.
*/
export declare function ApiControllerReadScopeWhere<E extends IApiBaseEntity>(parameters: Partial<E> | undefined, readPlan: IApiControllerReadPlan): FindOptionsWhere<E>;