import { HttpClient } from '@angular/common/http'; import { MatDialog } from '@angular/material'; import { Observable } from 'rxjs/Observable'; import { ObjectWithLinks, HateosPagedResponse } from './models/'; import { ExtRestConfig } from '../../services/rest/models'; export declare class RestService { config: ExtRestConfig; http: HttpClient; private dialog; constructor(config: ExtRestConfig, http: HttpClient, dialog: MatDialog); /** * Clear invalied url from server. * Ex: http://localhost:8080/api/users{?page,size,sort} * * @param url invalid url */ clearUrl(url: string): string; /** * Get Id from a url with tailing id * @param url */ getId(url: string): string; get(url: string, httpOptions?: Object): Observable; post(url: string, object: object, httpOptions?: Object): Observable; /** * Get All the data elements and without Paging Information * @param modelName * @param httpOptions */ findAll(modelName: string, httpOptions?: Object): Observable; findAllByProperty(url: string, propertyName: string, httpOptions?: Object): Observable; findOne(item: ObjectWithLinks): Observable; /** * Search for all the result * @param url * @param httpOptions */ search(url: string, httpOptions?: Object): Observable; /** Save thte Object.*/ save(item: ObjectWithLinks): Observable; /** Patch the given object.*/ patch(item: ObjectWithLinks): Observable; /** Put the given object. */ put(item: ObjectWithLinks): Observable; /** Delete all */ deleteAllWithConfirm(urls: string[]): Observable; deleteWithConfirm(url: string): Observable; private showDeleteConfimDialog(); }