import { QFilterExpression, QOrderByExpression, QPathModel, QSearchTerm, QSelectExpression, QueryObjectModel } from "@odata2ts/odata-query-objects"; import { ExpandingODataQueryBuilderV4, ExpandType, NullableParam, NullableParamList, ODataQueryBuilderConfig } from "./ODataQueryBuilderModel.js"; /** * Bundles all the logic about handling system query params for OData (V2 and V4). */ export declare class ODataQueryBuilder { private readonly path; private readonly entity; private readonly unencoded; private readonly config?; private itemsCount; private itemsToSkip; private itemsTop; private selects; private filters; private orderBys; private expands; private groupBys; private searchTerms; constructor(path: string, qEntity: Q, config?: ODataQueryBuilderConfig); getPath(): string; private getSelects; private getExpands; addSelects: (...paths: NullableParamList) => void; addExpands: (...paths: NullableParamList) => void; /** * Helper method to retrieve a typed property from the entity. * * @param prop */ getEntityProp(prop: keyof Q): PropType; count(doCount?: boolean): void; countV2(doCount?: boolean): void; filterSelectAndMapPath(props: NullableParamList): string[]; select(props: NullableParamList): void; filter(expressions: NullableParamList): void; expand>(props: NullableParamList): void; /** * V4 only method used by regular and expanding builder. * The regular V2 builder has an own and quite special implementation. * * @param creator * @param prop * @param builderFn */ expanding>(creator: (property: string, qEntity: Q) => ExpandingODataQueryBuilderV4, prop: Prop, builderFn: (builder: any, qObject: any) => void): void; /** * Skip n items from the result set. * To be used in combination with top. * * @param itemsToSkip amount of items to skip * @returns this query builder */ skip(itemsToSkip: NullableParam): void; /** * Returns this many items. * To be used in combination with skip. * * @param itemsTop amount of items to fetch * @returns this query builder */ top(itemsTop: NullableParam): void; /** * Specify order by expressions by facilitating qObjects and their * ascending and descending methods. * * This method can be called multiple times in order to add orderBy expressions successively. * * @param expressions possibly multiple order by expressions at once * @returns this query builder */ orderBy(expressions: NullableParamList): void; groupBy(props: NullableParamList): void; search(terms: NullableParamList): void; private param; private paramEncoded; private buildQuery; build(): string; }