import { Query, VcdApiClient } from '@vcd/angular-client';
import { GroupType, OrgType, UserType } from '@vcd/bindings/vcloud/api/rest/schema_v1_5';
import { Observable } from 'rxjs';
import { FilterBuilder } from '../filter-builder';
import * as i0 from "@angular/core";
/**
 * Given the query name of this entity, gives the data type that it represents.
 */
declare type InferEntityType<T> = T extends 'user' ? UserType : T extends 'organization' ? OrgType : T extends 'group' ? GroupType : unknown;
/**
 * What is returned from an API query,
 */
export interface QueryResult<T> {
    record: T[];
    total: number;
}
/**
 * The main options used to create a query.
 */
export interface RestQuery {
    filter?: FilterBuilder;
    pageSize?: number;
    fields?: string[];
}
/**
 * Additional options that can be used to configure a query.
 */
export interface RestQueryOptions {
    links?: boolean;
    multisite?: boolean;
    format?: Query.Format;
}
/**
 * Makes a query to the backend via the {@link VcdApiClient}.
 */
export declare class RestQueryService {
    private vcdApiClient;
    constructor(vcdApiClient: VcdApiClient);
    /**
     * Queries the given type of entity with the given options.
     */
    queryEntity<T extends string>(type: T, query: RestQuery, options?: RestQueryOptions): Observable<QueryResult<InferEntityType<T>>>;
    static ɵfac: i0.ɵɵFactoryDeclaration<RestQueryService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<RestQueryService>;
}
export {};
