import { VulcainLogger } from './../log/vulcainLogger'; import { VulcainManifest } from './manifest'; import { IContainer } from '../di/resolvers'; import { IStubManager } from "../stubs/istubManager"; import { Settings } from './settings'; /** * Static class providing service helper methods * * @export * @class Service */ export declare class Service { private static _settings; private static _vulcainServer; private static _vulcainToken; private static logger; private static _serviceName; private static _serviceVersion; private static _domainName; private static crypter; private static _manifest; private static _stubManager; private static _fullServiceName; static setDomainName(name: string): void; /** * Settings properties from vulcain.json file */ static readonly settings: Settings; /** * Get the application manifest when the application runs in development mode * * @readonly * @static * * @memberOf System */ static readonly manifest: VulcainManifest; /** * UTC date as string. * * @static * @returns * * @memberOf System */ static nowAsString(): string; /** * Access to logger * * @static * * @memberOf System */ static readonly log: VulcainLogger; /** * Default tenant * * @readonly * @static * * @memberOf System */ static readonly defaultTenant: string; static getStubManager(container: IContainer): IStubManager; /** * Check if the service is running in local mode (on developer desktop) * * @readonly * @static * * @memberOf System */ static readonly isDevelopment: boolean; /** * Check if the current service is running in test mode (VULCAIN_TEST=true) * * @static * @returns * * @memberOf System */ static readonly isTestEnvironment: boolean; /** * Resolve alias * * @param {string} name * @param {string} [version] * @returns null if no alias exists * * @memberOf System */ static resolveAlias(name: string, version?: string): string; /** * Create container endpoint from service name and version * * @readonly * @static */ static createContainerEndpoint(serviceName: string, version: string): string; /** * Get current environment * * @readonly * @static * * @memberOf System */ static readonly environment: "local" | "test" | "production"; /** * Get vulcain server used for getting configurations * * @readonly * @static * * @memberOf System */ static readonly vulcainServer: string; /** * Get token for getting properties (must have configurations:read scope) * * @readonly * @static * * @memberOf System */ static readonly vulcainToken: string; /** * Get service name * * @readonly * @static * * @memberOf System */ static readonly serviceName: string; /** * Get service version * * @readonly * @static * * @memberOf System */ static readonly serviceVersion: string; static readonly fullServiceName: string; /** * Get current domain name * * @readonly * @static * * @memberOf System */ static readonly domainName: string; private static readonly crypto; /** * Encrypt a value * * @static * @param {any} value * @returns {string} * * @memberOf System */ static encrypt(value: any): string; /** * Decrypt a value * * @static * @param {string} value * @returns * * @memberOf System */ static decrypt(value: string): string; static registerPropertyAsDependency(name: string, defaultValue: any): void; /** * create an url from segments * Segments of type string are concatenated to provide the path * Segments of type object are appending in the query string * Null segments are ignored. * @protected * @param {string} base url * @param {(...Array)} urlSegments * @returns an url */ static createUrl(baseurl: string, ...urlSegments: Array): string; static removePasswordFromUrl(url: string): string; }