import { SlimExpressionFunction } from 'slim-exp'; import { SelectQueryBuilder } from 'typeorm'; export interface CriteriaExpression { func: SlimExpressionFunction; context?: C; } export interface FieldsSelector { fieldsToSelect?: { field: string; }[]; builder?: SlimExpressionFunction; } export interface ISpecification { getIncludePaths(): string[]; getIncludes(): SlimExpressionFunction[]; getDistinct(): boolean; getCriterias(): CriteriaExpression[]; getChainedIncludes(): { initial: SlimExpressionFunction; chain: SlimExpressionFunction[]; }[]; getOrderBy(): SlimExpressionFunction; getGroupBy(): SlimExpressionFunction; getFunction(): { type: FunctionQueryType; func: SlimExpressionFunction; }; getOrderByDescending(): SlimExpressionFunction; getThenGroupBy(): SlimExpressionFunction[]; getThenOrderBy(): SlimExpressionFunction[]; getTake(): number; getSkip(): number; getIsPagingEnabled(): boolean; getSelector(): FieldsSelector; } export declare enum QueryType { ONE = 0, ALL = 1, RAW_ONE = 2, RAW_ALL = 3 } export declare type FunctionQueryType = 'SUM' | 'COUNT' | 'MIN' | 'MAX' | 'AVG'; export declare type QuerySpecificationEvaluatorConstructor = new (initialQuery: (alias: string) => SelectQueryBuilder, spec: ISpecification) => IQuerySpecificationEvaluator; export declare class IQuerySpecificationEvaluator { constructor(initialQuery: (alias: string) => SelectQueryBuilder, spec: ISpecification); executeQuery(type: QueryType): Promise; getQuery(): Promise | string; getParams(): Promise | any; }