ngx-mat-lib
Version:
A bunch of utilities and components to use in your Angular 7+ apps!
34 lines (33 loc) • 1.74 kB
TypeScript
import { HttpClient } from "@angular/common/http";
import { XmatConstantsService } from "./xmat-constants.service";
import { XmatFile, XmatHttpConfig, XmatRestVerbs } from "../models/index";
import { XmatGenericObject } from "../models/index";
import { Observable } from "rxjs";
/**
* XMAT REST BY TONY SAMPERI
* extend this file by adding a public "serviceUrls" variable
* and optionally servicesConfigs
*
* CRUD-HTTP MAPPING
* POST Create Crea una nuova risorsa
* GET Read Ottiene una risorsa esistente
* PUT Update Aggiorna una risorsa o ne modifica lo stato
* DELETE Delete Elimina una risorsa
*/
export declare class XmatRestService {
protected _http: HttpClient;
protected _xmatConstants: XmatConstantsService;
readonly servicesUrls: {};
readonly servicesConfigs: {};
protected _restBaseUrl: string;
protected _ds: string;
constructor(_http: HttpClient, _xmatConstants: XmatConstantsService);
downloadBlobFromUrl(file: XmatFile, verb?: XmatRestVerbs.GET, onError?: (err: any) => void): void;
downloadBlobFromUrl(file: XmatFile, verb: XmatRestVerbs.PATCH, body: any, onError?: (err: any) => void): void;
getBlobFromUrl(file: XmatFile, verb?: XmatRestVerbs.GET): Observable<Blob>;
getBlobFromUrl(file: XmatFile, verb: XmatRestVerbs.PATCH, body: any): Observable<Blob>;
$all(configs: XmatHttpConfig[]): Observable<any[]>;
$allMap<T extends XmatGenericObject<XmatHttpConfig>, U = any>(configs: T): Observable<XmatGenericObject<U>>;
$http<T>(config?: XmatHttpConfig): Observable<T>;
protected _generateHttpConfig(method?: XmatRestVerbs, url?: string, queryable?: boolean): XmatHttpConfig;
}