import { InjectionToken } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import 'rxjs/add/observable/empty'; import 'rxjs/add/operator/catch'; import 'rxjs/add/operator/toPromise'; export declare const END_POINTS: InjectionToken<{}>; export interface ServiceBases { common: string; auth?: string; audit?: string; admin?: string; [key: string]: string; } export interface ConfigAssets { category?: string; serviceBases: ServiceBases; } export declare class ConfigService { private _http; config: ConfigAssets; private _endPoints; private _loaded; constructor(endPoints: any, _http: HttpClient); load(): Promise; /** * Determine the base portion of the URL that identifies the micro service. * * A fallback mechanism is build in. (if not defined go for 'common' micro * service; if 'common' is not defined either go for '/' = relative root * ) * It is public only for testing - would be normally private. * * @param endPoint: The endpoint spec in order to determine the base url for * the requested service * @returns the base portion of the resulting URL * */ _resolveBase(endPoint: string): string; /** * Compose the entire URL of the endpoint (resolve base and parameter injections) * * Parameters are given like :parameterName * * @param endPoint: The endpoint spec (service and and path with injected with parameters) * @param params: dictionary with keys like the parameters referenced in path of entry point * is optional, if not given no :parameter get replaced * @returns the resulting URL * */ resolve(endPoint: string, params?: any): string; }