UNPKG

ts-flex-query

Version:
38 lines (37 loc) 1.41 kB
import { Expression } from '../../core/expression'; import { ODataRootExpression } from '../expressions/odata-root-expression'; import { ODataRequest } from '../helpers/definitions'; import { ODataExpressionHandler } from './odata-expression-handler'; interface RequestBuilderParams { expressionHandler?: ODataExpressionHandler; } export declare class RequestBuilder { #private; private readonly params; result: ODataRequest; get rootExpression(): ODataRootExpression | undefined; constructor(params: RequestBuilderParams); buildWithPossibleIncludeCount(expression: Expression): { countFieldName: string; elementsFieldName: string; } | void; /** Applies the given expression to the request. Throws an error if the expression is not OData-compatible. */ build(expression: Expression): void; private applyFilter; private applyLet; private applyMap; private applyGroup; private applyGroupForValue; private createODataApplyForGroupValue; private static createODataApplyForAggregate; private static selectAndExpandRequestToFieldArray; private applySlice; private applySort; private createRequestFromRecord; private createFieldRequestFromExpression; private static assertExpectedFieldChain; private static getFieldChain; private static getUnderlyingExpression; private static applyLet; } export {};