import { Request } from './Request'; import { SelectItem } from './SelectItem'; import { FilterItem } from './FilterItem'; import { SortOrderItem } from './SortOrderItem'; import { ExistsOptions } from './ExistsOptions'; import { QuerySettings } from './QuerySettings'; export declare class QueryBuilder { request: Request; constructor(action: string, mainEntity?: string); /** * * @param start starting row number * @param end ending row number */ rows(start: number, end: number): this; /** * * @param selectItems a list of SelectItems */ select(selectItems: SelectItem[]): this; /** * * @param sortItems a list of SortItems */ sortBy(sortOrderItems: SortOrderItem[]): this; /** * * @param filters a list of filters. These filters are part of FilterGroup[0] and are applied to the main request - setting the universe of results against which all other FilterGroups are applied */ where(filters: FilterItem[]): this; private exists; /** * * @param opts specifies the main entity to join to. e.g. { mainEntity: 'KdPhysician' }, the mainEntity MUST exist in the Search, Select, Group request * @param filters the list of filters to apply */ andExists(opts: ExistsOptions, filters: FilterItem[]): this; /** * * @param opts specifies the main entity to join to. e.g. { mainEntity: 'KdPhysician' }, the mainEntity MUST exist in the Search, Select, Group request * @param filters the list of filters to apply */ orExists(opts: ExistsOptions, filters: FilterItem[]): this; /** * * @param opts specifies the main entity to join to. e.g. { mainEntity: 'KdPhysician' }, the mainEntity MUST exist in the Search, Select, Group request * @param filters the list of filters to apply */ andNotExists(opts: ExistsOptions, filters: FilterItem[]): this; /** * * @param opts specifies the main entity to join to. e.g. { mainEntity: 'KdPhysician' }, the mainEntity MUST exist in the Search, Select, Group request * @param filters the list of filters to apply */ orNotExists(opts: ExistsOptions, filters: FilterItem[]): this; /** * * @param searchText the search term */ textSearch(searchText: string): this; /** * * @param lat latitude * @param lng longitude * @param distance radius size * @param unit radius size unit */ locationSearch(lat: number, lng: number, distance: number, unit: string): this; /** * * @param entities a array of related entities */ relatedEntities(entities: string[]): this; setUrlBase(urlBase: any): this; setApiKey(apiKey: any): this; setMaxCacheAge(age: any): this; setContext(context: any): this; setAuthToken(token: any): this; enableCache(opts: any): this; withCredentials(credentials: any): this; withSettings({ urlBase, authToken, apiKey, cache, credentials, maxCacheAge }: QuerySettings): this; requestData(): Promise; requestPage(): Promise; getRequest(): Request; toJSON(): any; } /** * * @param action request action, possible values are: Search|Select|Group * @param mainEntity for Search action only. It specifies the main entity to search for */ export declare function createQueryBuilder(action: string, mainEntity?: string): QueryBuilder;