import { TypedResponse } from '../../http';
import { BimChange, BimChangeIfc, BimContainer } from '../bim-api-client';
import { BimChangeIdQuery } from '../BimChangeIdQuery';
import { BimChangeMetadataQuery } from '../BimChangeMetadataQuery';
import { LayerApiClient } from './LayerApiClient';
import { MapBoxApiClient } from './MapBoxApiClient';
/**
 * Implementing this interface allows the developer to customize where the container and IFC data is loaded from.
 */
export interface BimCoreApiClient {
    /**
     * Uniquely identifies the backend the client connects to.
     * If the client connects to a REST API its probably the host name of the API.
     */
    readonly id: string;
    /** Gets all containers (and workspaces) or just a specific one.
     * @param id If given, only container with specific id is returned. Otherwise all containers are returned.
     * @returns List of containers. May be empty if no containers were found or matched the specified _id_.
     */
    getContainers(id?: string): Promise<BimContainer[]>;
    /**
     * Retrieves all (successfully processed) IFC changes located in and below a specified parent.
     * @remarks
     * As it is expensive DO NOT use this method to get the IFC `changes` for many/all `containers` in the system.
     * It is however reasonable to use this method to get the `changes` for a few specific containers.
     * @param parent Parent change to get IFC changes from.
     * @returns All successfully processed IFC changes in the specified _container_.
     */
    getIfcChanges(parent: BimContainer | URL | BimChange): Promise<BimChangeIfc[]>;
    /**
     * Retrieves all changes in and below a specified parent change and that matches a specific query.
     * Use typescript type inference cast directly to a specific {@link BimChange} type if you know exactly
     * which types the query will return
     * @example type inference by specifying return type.
     * ```
     * const dwgChanges: BimChangeDwg[] = api.getChanges(container, {query: "dwg.status=Processed"});
     * ```
     * @example Predefined queries. Type is included in query so no need to specify on return value.
     * ```
     * const ifcFailures = api.getChanges(container, PredefinedBimChangeMetadataQuery.ifc(BimChangeStatus.Failed));
     * ```
     * @remarks
     * It is expensive to get all changes in a container. Use a `query` to filter out only the changes you are interested in.
     * Getting everything is discouraged as there can be 100k+ `changes` in a `container`. Be specific.
     * As it is expensive DO NOT use this method to get the `changes` for many/all `containers` in the system.
     * There can be many `containers` and many `changes` (like 100k+) in each `container`.
     * @param parent Parent to get changes from.
     * @param query example: `ifc.status=processed`, `dwg.status=processed` or `_system.layers.format=sensors`
     * @returns Changes in container that matched the filterQuery.
     */
    getChanges<T extends BimChange = BimChange>(parent: BimContainer | URL | BimChange, query: BimChangeIdQuery<T> | BimChangeMetadataQuery<T>): Promise<TypedResponse<T[]>>;
    /**
     * Issues an HTTP GET specified url.
     * @param absoluteOrRelativeUrl Url to issue HTTP GET to.
     * @param converter Converter for response. See {@link HttpResponseType} for predefined converters.
     * @param init Optional settings for to HTTP GET (fetch).
     * @typeParam T The type of data the specified _converter_ will convert the HTTP response body to.
     * @returns a {@link TypedResponse} containing the status code and the response value that resulted from using the specified _converter_.
     * @example
     * ```typescript
     * // Gets a JSON object and convert it to the MyObj interface.
     * const myObjResponse = this.get<MyObj>("http://foo.com/jsonendpoint", HttpResponseType.json)
     * const myObj = myObjResponse.status === 200 ? (await myObjResponse.value) : undefined;
     * // Gets a binary ArrayBuffer.
     * const myArrayBufferResponse = this.get("http://foo.com/jsonendpoint", HttpResponseType.arrayBuffer)
     * const myArrayBuffer = myArrayBufferResponse.status === 200 ? (await myArrayBufferResponse.value) : undefined;
     * ```
     */
    get<T>(absoluteOrRelativeUrl: URL | string, converter: (r: Response) => TypedResponse<T>, init?: RequestInit): Promise<TypedResponse<T>>;
    /** API to handle layer functionality. A Layer is a way to enrich an existing change in the database with extra data. This data
     * will be versioned separately from the change the layer is attached to.
     */
    readonly layers: LayerApiClient;
    /**
     * API to access MapBox functionality.
     */
    readonly mapBox: MapBoxApiClient;
}
//# sourceMappingURL=BimCoreApiClient.d.ts.map