import { BaseDataSource } from '@rxap/data-source';
import { Observable, ReplaySubject, Subject, Subscription } from 'rxjs';
import { HttpClient, HttpRequest } from '@angular/common/http';
import { HttpDataSourceMetadata } from './http.data-source.metadata';
import { HttpDataSourceViewer } from './http.data-source.viewer';
import { HttpDataSourceOptions } from './http.data-source.options';
import { RequestInProgressSubject } from '@rxap/rxjs';
import * as i0 from "@angular/core";
export declare abstract class BaseHttpDataSource<Data = any, PathParams = any, Body = any> extends BaseDataSource<Data, HttpDataSourceMetadata<PathParams, Body>, HttpDataSourceViewer<PathParams, Body>> {
    readonly http: HttpClient;
    readonly requestsInProgress$: RequestInProgressSubject;
    readonly refresh$: Subject<HttpDataSourceOptions<PathParams, Body>>;
    readonly refreshed$: Subject<void>;
    timeout: number;
    protected _options: HttpDataSourceOptions<PathParams, Body>;
    protected _refreshSubscription: Subscription | null;
    protected _data$: ReplaySubject<Data>;
    constructor(http: HttpClient, metadata?: HttpDataSourceMetadata<PathParams, Body> | null, refresh$?: Subject<HttpDataSourceOptions<PathParams, Body>> | null);
    abstract derive(id: string, metadata: Partial<HttpDataSourceMetadata<PathParams, Body>>): BaseHttpDataSource<Data>;
    request$(options?: HttpDataSourceOptions<PathParams, Body>, merge?: boolean): Promise<Data>;
    reset(): any;
    refresh(options?: HttpDataSourceOptions<PathParams, Body>, merge?: boolean, force?: boolean): void;
    init(): void;
    protected isEqualToLastOptions(options: HttpDataSourceOptions<PathParams, Body>): boolean;
    protected _connect(viewer: HttpDataSourceViewer<PathParams, Body>): [Observable<Data>, Subscription];
    protected getRequestUrl(): string;
    protected buildHttpRequest(options: HttpDataSourceOptions<PathParams, Body>): HttpRequest<Body>;
    protected buildUrlWithParams(url: string, pathParams: Record<string, string>): string;
    protected abstract buildRequest(options: HttpDataSourceOptions<PathParams, Body>): Observable<Data>;
    static ɵfac: i0.ɵɵFactoryDeclaration<BaseHttpDataSource<any, any, any>, [null, { optional: true; }, { optional: true; }]>;
    static ɵprov: i0.ɵɵInjectableDeclaration<BaseHttpDataSource<any, any, any>>;
}
