import type { DataSource, FindManyOptions, ObjectLiteral } from 'typeorm'; import type { GridView, ExpressRequest } from './interfaces/index.js'; /** * A class designed to handle querying, filtering, and sorting of entities managed by TypeORM * based on the parameters received from an Express request. It utilizes QuerystringParser for * parsing the request URL and applies complex filtering logic directly on the SQL query built * with TypeORM's SelectQueryBuilder. * * @typeParam T - The entity type that this ODataEntity instance will manage, extending TypeORM's * ObjectLiteral, which allows for any object shape that can be managed by TypeORM. */ export declare class ODataEntity { #private; /** * Initializes a new instance of the ODataEntity class with an entity constructor, * a TypeORM DataSource, and the Express request object. * * @param entity - The constructor of the entity that this instance will manage. * @param dataSource - The TypeORM DataSource instance used to retrieve the repository * of the specified entity. * @param request - The Express request object, containing the URL from which query * string parameters are parsed. */ constructor(entity: { new (): T; }, dataSource: DataSource, request: ExpressRequest); /** * Retrieves many entities based on the parsed query string parameters and the provided * find options. This method applies filtering, sorting, and pagination logic before * executing the query and returning the results along with the total count. * * @param findOptions - The TypeORM FindManyOptions used to configure the query. * @returns A Promise resolving to a GridView object containing the queried data and * total record count. */ getMany(findOptions: FindManyOptions): Promise>; }