import { CoreObject, CoreObjectAttributes } from '../core-object'; import { Service } from '../service'; import { FilterQueryOperator } from './queries/filter-query'; import { SearchQueryOperator } from './queries/search-query'; import { QuerySortOperator } from './queries/sort-query'; /** * The currently possible request types that can be made as part of a query */ export type QueryFetchType = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; /** * Base Query Object that allows building a query against the primary API */ export declare abstract class CoreQuery, U extends CoreObjectAttributes> { private readonly _instance; private readonly _service; private readonly _queries; private readonly _abort; constructor(instance: T, service?: Service); get instance(): T; get service(): Service; /** * Call this to abort/terminate incomplete query requests */ abort(reason?: string): void; /** * Allows multiple queries to be joined together */ join(...queries: Array, CoreObjectAttributes>>): this; where(variable: keyof U, operation: FilterQueryOperator | SearchQueryOperator, value: string | number | boolean | Date): this; fields(...fields: Array): this; include(...objects: Array<(typeof CoreObject) | (typeof CoreQuery, CoreObjectAttributes>) | Array>): this; contains(...objects: Array>): this; notContains(...objects: Array>): this; deleted(...objects: Array>): this; sort(operation: QuerySortOperator, variable: keyof U): this; page(count: number, size: number): this; /** * Performs the primary request and returns the responses as an array */ protected _Fetch, U extends CoreObjectAttributes>(output: Output, url: string, type: QueryFetchType): Promise>; /** * Generates the url sequence of all queries and returns */ toString(): string; static fetch, Output extends CoreObject>(service: Service, input: Input, output: Output, encodedURL: string, type: QueryFetchType, abort?: AbortSignal): Promise>; /** * Performs an exponential backoff fetch() request */ private static _ExpFetch; }