import { IDynamicProperty } from './../dynamicProperty'; import { VulcainLogger } from './../log/vulcainLogger'; import { VulcainManifest } from './../dependencies/annotations'; export declare class System { private static _config; private static logger; private static _environment; private static _clusterStorage; private static _serviceName; private static _serviceVersion; private static _teamNamespace; private static crypter; private static isLocal; private static _manifest; static manifest: VulcainManifest; /** * UTC date as string. * * @static * @returns * * @memberOf System */ static nowAsString(): string; /** * Calculate a diff with a date from now in seconds * * @static * @param {string} date in utc string format * @returns * * @memberOf System */ static diffFromNow(date: string): number; /** * Acces to logger * * @static * * @memberOf System */ static log: VulcainLogger; /** * Check if the service is running in local mode (developper context) * * @readonly * @static * * @memberOf System */ static isDevelopment: boolean; private static loadVulcainLocalConfig(); /** * Resolve un alias (configuration key shared/$alternates/serviceName-version) * * @param {string} name * @param {string} [version] * @returns * * @memberOf System */ static resolveAlias(name: string, version?: string): string; /** * Get current environment * * @readonly * @static * * @memberOf System */ static environment: string; /** * Get environment storage address * * @readonly * @static * * @memberOf System */ static vulcainServer: any; static vulcainToken: any; /** * Get service name * * @readonly * @static * * @memberOf System */ static serviceName: string; /** * Get service version * * @readonly * @static * * @memberOf System */ static serviceVersion: string; /** * Get current team namespace * * @readonly * @static * * @memberOf System */ static domainName: string; private static 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; /** * create a shared property * @param name * @param defaultValue * @returns {IDynamicProperty} */ static createSharedConfigurationProperty(name: string, defaultValue: T, schema?: string): IDynamicProperty; /** * create a new chained property for the current service. Properties chain is: service.version.name->service.name->team.namespace->name * @param name property name * @param defaultValue * @returns {IDynamicProperty} */ static createServiceConfigurationProperty(name: string, defaultValue: T, schema?: string): IDynamicProperty; /** * create an url from segments * Segments of type string are concatened 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; }