import { Model } from '../../../model'; import { ModelConstructor } from '../../../contracts/modelConstructor'; import { Scope } from '../scope'; import { Filter } from '../filter'; import { FilterOperator } from '../enums/filterOperator'; import { FilterType } from '../enums/filterType'; import { Sorter } from '../sorter'; import { SortDirection } from '../enums/sortDirection'; import { ExtractModelAttributesType } from '../../../types/extractModelAttributesType'; import { ExtractModelPersistedAttributesType } from '../../../types/extractModelPersistedAttributesType'; import { ExtractModelRelationsType } from '../../../types/extractModelRelationsType'; import { HttpClient } from '../../../httpClient'; import { AxiosResponse } from 'axios'; import { ExtractModelKeyType } from '../../../types/extractModelKeyType'; import { AggregateItem } from '../../../types/AggregateItem'; import { ModelRelations } from '../../../types/ModelRelations'; export declare class QueryBuilder, PersistedAttributes = ExtractModelPersistedAttributesType, Relations = ExtractModelRelationsType, Key = ExtractModelKeyType, AllAttributes = Attributes & PersistedAttributes> { protected baseUrl: string; protected modelConstructor: ModelConstructor; protected httpClient: HttpClient; protected includes: string[]; protected fetchTrashed: boolean; protected fetchOnlyTrashed: boolean; protected withCountRelations: ModelRelations[]; protected withExistsRelations: ModelRelations[]; protected withAvgRelations: AggregateItem[]; protected withSumRelations: AggregateItem[]; protected withMinRelations: AggregateItem[]; protected withMaxRelations: AggregateItem[]; protected scopes: Array; protected filters: Array; protected sorters: Array; protected searchValue?: string; constructor(modelConstructor: ModelConstructor, baseUrl?: string); get(limit?: number, page?: number): Promise>; search(limit?: number, page?: number): Promise>; find(key: Key): Promise; store(attributes: Attributes): Promise; batchStore(items: M[]): Promise; update(key: Key, attributes: Attributes): Promise; batchUpdate(items: M[]): Promise; destroy(key: Key, force?: boolean): Promise; batchDelete(items: Key[]): Promise; restore(key: Key): Promise; batchRestore(items: Key[]): Promise; with(relations: ModelRelations[]): this; withTrashed(): this; onlyTrashed(): this; scope(name: string, parameters?: Array): this; filter(field: string, operator: FilterOperator, value: any, type?: FilterType): this; sortBy(field: string, direction?: SortDirection): this; lookFor(value: string): this; hydrate(raw: AllAttributes & Relations, response?: AxiosResponse): M; /** * Include the count of the specified relations. * The relations need to be whitelisted in the controller. * @link https://tailflow.github.io/laravel-orion-docs/v2.x/guide/search.html#aggregates */ withCount(relations: ModelRelations[] | ModelRelations): this; /** * Include the exists of the specified relations. * The relations need to be whitelisted in the controller. * @link https://tailflow.github.io/laravel-orion-docs/v2.x/guide/search.html#aggregates * @param relations */ withExists(relations: ModelRelations[] | ModelRelations): this; /** * Include the avg of the specified relations. * The relations need to be whitelisted in the controller. * @link https://tailflow.github.io/laravel-orion-docs/v2.x/guide/search.html#aggregates * @param relations */ withAvg(relations: AggregateItem[] | AggregateItem): this; /** * Include the sum of the specified relations. * The relations need to be whitelisted in the controller. * @link https://tailflow.github.io/laravel-orion-docs/v2.x/guide/search.html#aggregates * @param relations */ withSum(relations: AggregateItem[] | AggregateItem): this; /** * Include the min of the specified relations. * The relations need to be whitelisted in the controller. * @link https://tailflow.github.io/laravel-orion-docs/v2.x/guide/search.html#aggregates * @param relations */ withMin(relations: AggregateItem[] | AggregateItem): this; /** * Include the max of the specified relations. * The relations need to be whitelisted in the controller. * @link https://tailflow.github.io/laravel-orion-docs/v2.x/guide/search.html#aggregates * @param relations */ withMax(relations: AggregateItem[] | AggregateItem): this; getHttpClient(): HttpClient; protected prepareQueryParams(operationParams?: any): any; }