import { IBaseModel } from '../../models/_interfaces/base.model.interface';
import { SearchResults } from './_responses/search-results/search-results.response';
import { HttpClient } from '@angular/common/http';
import { CacheService } from '../cache/cache.service';
import { Observable } from 'rxjs/Observable';
import { Environment } from '../../interfaces/environment.interface';
/**
 * Send Http REST Requests and map to models
 */
export declare class BaseHttpService {
    protected http: HttpClient;
    protected cache: CacheService;
    protected environment: Environment;
    readonly base: string;
    readonly modelClass: any;
    /**
     * The api host
     */
    readonly api: string;
    /**
     * Pipe an observer result to model using class defined modelClass
     */
    mapToModel: <T extends IBaseModel>(overriddenModelClass?: any) => (source: Observable<{}>) => Observable<any>;
    /**
     * Pipe an observer result to array of models using defined modelClass
     */
    mapToModelArray: <T extends IBaseModel>(overriddenModelClass?: any) => (source: Observable<any[]>) => Observable<any[]>;
    constructor(http: HttpClient, cache: CacheService, environment: Environment, base?: string, modelClass?: any);
    storeRouteInCache: (url: string) => (source: Observable<{}>) => Observable<{}>;
    /**
     * Generic index call
     */
    index<T extends IBaseModel>(page?: number, perPage?: number): Observable<T[]>;
    /**
     * Generic get call
     */
    get<T extends IBaseModel>(id: number): Observable<T>;
    /**
     * Generic getBySlug call
     */
    getBySlug<T extends IBaseModel>(slug: string): Observable<T>;
    /**
     * Generic add call
     */
    add<T extends IBaseModel>(model: IBaseModel): Observable<T>;
    /**
     * Generic save call
     */
    edit<T extends IBaseModel>(model: IBaseModel): Observable<T>;
    /**
     * Generic remove call
     */
    delete_(model: IBaseModel): Observable<Object>;
    by<T extends IBaseModel>(foreignUrl: string, value: number | string, key?: string): Observable<T[]>;
    /**
     * Retrieve ids of linked models
     */
    ids(foreignUrl: string, id: number): Observable<number[]>;
    /**
     * Search for matching models
     */
    search(query: string, page?: number, perPage?: number): Observable<SearchResults>;
    /**
     * Resolve model for implements IBaseModel  instancies
     */
    protected resolveModelClass<T extends IBaseModel>(json: any, overriddenModelClass?: any): any;
    private routeGet(id);
    private routeSlug(slug);
    protected storeModelInCache(model: IBaseModel): void;
    protected removeModelInCache(model: IBaseModel): void;
}
