import { Http, Response } from '@angular/http'; import { Observable } from 'rxjs/Observable'; import 'rxjs/add/operator/map'; import 'rxjs/add/operator/catch'; import 'rxjs/add/observable/throw'; export declare abstract class ParentBaseApiService { protected http: Http; constructor(http: Http); /** * Load the base service url by configuration */ abstract getServiceUrl(): string | null; /** * Find an object by its identifier * @param id the object identifier * @returns gets the object found */ findById(id: any, properties?: any): Observable; /** * Find all the elements * @returns gets the list of objects found */ findAll(properties?: any): Observable | null; /** * Delete an object by its identifier field * @param id the object identifier * @returns gets the response */ delete(id: any): Observable; /** * Insert the data * @param data the object containing the data to be inserted * @returns gets the response */ insert(data: T): Observable | null; /** * Updadte specific object into DB * @param fieldId the name of the field that identify the object * @param data the object to be updated * @returns gets the response */ update(fieldId: string, data: any): Observable; /** * Extract data that arrives from the response * @param res the response */ protected extractData(res: Response): any; }