@fingerprintsoft/angular-spring-hal
Version:
This Angular module offers a HAL/JSON http-client to easily interact with a Spring Data Rest API or any API that implements the Spring Data Rest resource model
37 lines (36 loc) • 1.84 kB
TypeScript
import { HttpClient, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http';
import { Resource } from './index';
import { ResourceArray } from './index';
import { HalOptions, HalParam } from '../services/rest.service';
import { SubTypeBuilder } from './index';
export declare class ResourceHelper {
private static readonly URL_TEMPLATE_VAR_REGEXP;
private static readonly EMPTY_STRING;
private static _headers;
private static proxy_uri;
private static root_uri;
private static http;
static get headers(): HttpHeaders;
static set headers(headers: HttpHeaders);
static optionParams(params: HttpParams, options?: HalOptions): HttpParams;
static params(httpParams: HttpParams, params?: HalParam[]): HttpParams;
static resolveRelations(resource: Resource): Object;
static createEmptyResult<T extends Resource>(_embedded: string): ResourceArray<T>;
static getClassName(obj: any): string;
static className(objProto: any): string[];
static instantiateResourceFromResponse<T extends Resource>(entity: T, response: HttpResponse<any>): T;
static instantiateResourceCollection<T extends Resource>(type: {
new (): T;
}, response: HttpResponse<any>, result: ResourceArray<T>, builder?: SubTypeBuilder): ResourceArray<T>;
static searchSubtypes<T extends Resource>(builder: SubTypeBuilder, embeddedClassName: string, instance: T): T;
static instantiateResource<T extends Resource>(entity: T, payload: Object): T;
static setProxyUri(proxy_uri: string): void;
static setRootUri(root_uri: string): void;
static getURL(): string;
private static addSlash;
static getProxy(url: string): string;
private static removeUrlTemplateVars;
static setHttp(http: HttpClient): void;
static getHttp(): HttpClient;
static getRootUri(): string;
}