import { type SystemConfig, type WebsocketServerConfig } from '@citrineos/types'; import type { IFileStorage } from '../interfaces/files/file-storage.js'; export declare class ConfigLoader { private static websocketServers; static loadConfig(): Promise; /** * Reads and validates the websocket servers this pod hosts, or returns the already * read config. The returned array is shared with every other caller — see * {@link websocketServers}. * * @param fileStorage Storage the file is read through; keys resolve against its root. * @param fileName `SystemConfig.websocketServerConfigFile`. * @throws If the file is missing or fails schema validation. */ static loadWebsocketServersConfig(fileStorage: IFileStorage, fileName: string): Promise; /** * Validates and writes the websocket servers config back to storage, then brings the * shared array up to date. * * @throws If `websocketServers` fails schema validation. Nothing is written or updated * in that case. */ static saveWebsocketServersConfig(fileStorage: IFileStorage, fileName: string, websocketServers: WebsocketServerConfig[]): Promise; /** * Merges configuration from environment variables into the default configuration. Allows any to keep it as generic as possible. * @param config The default configuration. * @param envVars The environment variables. * @returns The merged configuration. */ private static mergeConfigFromEnvVars; /** * Resolves one path segment against a level of the key map. * * A level holds leaf fields as `lowercasename -> realKey` and nested objects as * `realKey -> submap`, so both spellings have to be tried. * * @returns The real schema key, plus the submap to descend into when the segment named * a nested object. `child` is undefined for a leaf field, which is what tells the * caller that a further segment cannot resolve. Undefined when nothing matched. */ private static lookupSegment; private static getZodSchemaKeyMap; }