import { HttpRequest } from '@angular/common/http'; import { Injector } from '@angular/core'; import { Observable } from 'rxjs'; import { ABaseService } from './a-base.service'; /** Create and execute http requests */ export declare abstract class BaseHttpService extends ABaseService { static URL: string; private http; private alertService; /** * Create a global service to manage http interactions * @param injector - injector root service used in app.module */ constructor(injector: Injector); /** * Create a valid HttpRequest * @param url - Relative url to access to the api * @param method - Http method type * @param id - Id of a specific record * @param data - Data to send to the server */ protected getRequest(url: string, method: "GET" | "PUT" | "POST" | "PATCH" | "DELETE", id?: any, data?: any): HttpRequest; /** * Execute the given @param request * @param request - A valid HttpRequest to execute */ protected executeQuery(request: HttpRequest): Observable; protected executeRequest(request: HttpRequest): Observable; /** * Display an alert for the current error * @param error - Error message */ displayError(error: any): void; /** * Reject the promise with the specified @param error * @param error - Error message */ handleError(error: any): Promise; convertToT(type: new () => T, json: any): T | T[]; }