import { SelectQueryBuilder } from 'typeorm'; import { AggregateQuery, AggregateResponse } from '@nestjs-query/core'; declare enum AggregateFuncs { AVG = "AVG", SUM = "SUM", COUNT = "COUNT", MAX = "MAX", MIN = "MIN" } /** * @internal * Builds a WHERE clause from a Filter. */ export declare class AggregateBuilder { static asyncConvertToAggregateResponse(responsePromise: Promise[]>): Promise[]>; static getAggregateSelects(query: AggregateQuery): string[]; private static getAggregateGroupBySelects; private static getAggregateFuncSelects; static getAggregateAlias(func: AggregateFuncs, field: keyof Entity): string; static getGroupByAlias(field: keyof Entity): string; static convertToAggregateResponse(rawAggregates: Record[]): AggregateResponse[]; /** * Builds a aggregate SELECT clause from a aggregate. * @param qb - the `typeorm` SelectQueryBuilder * @param aggregate - the aggregates to select. * @param alias - optional alias to use to qualify an identifier */ build>(qb: Qb, aggregate: AggregateQuery, alias?: string): Qb; private createAggSelect; private createGroupBySelect; } export {};