import { configOptions, Config as IConfig } from "@ecoflow/types"; /** * Configuration for the application environment that will be used to configure the application environment * for the application component that will be used to run the application. * @param Directory The directory where the application will save the configuration files. * @param Name The name of the configuration file that will be saved. */ export declare class Config implements IConfig { private configDir; private configFile; _config: configOptions; constructor(Directory?: string, Name?: string, tempConfig?: configOptions); /** * Update the configuration of the application based on the temporary configuration. * @param tempConfig temporary configuration options object containing the configuration settings to update the configuration. */ private tempConfigUpdate; /** * Load the config file and if notg it exists in the config directory then load default config. * @memberof Config */ private loadConfig; /** * Extract the configuration from from the config object and return it as a string. * @memberof Config * @param object object containing configuration information. * @param key name of the configuration object. * @param isTypedArray boolean indicating if the configuration object is encoded as a typed array. * @returns object or string containing configuration information. */ private getConfig; /** * Save the configuration object to the configuration directory. * @memberof Config * @param cfg Configuration information to be stored in the config. */ private saveConfig; /** * Create the Base or Default Configuration file in the configutation directory. * @memberof Config */ private createDefaultConfigFile; /** * Configuration Settings to up updated. * @memberof Config * @param cfg Configuration information to be updated in the config file in the config directory. */ private updateConfigFile; /** * Get the path of the directory containing the configuration file. * @returns {string} The directory path of the configuration file. */ get getConfigPath(): string; /** * Get the base name of the configuration file. * @returns The base name of the configuration file. */ get getConfigFileName(): string; /** * Returns the configuration object for a given key. If the configuration object is present it will be returned else will be undefined. * @memberof Config * @param key string name of the configuration. * @returns {Object | String} containing configuration information. */ get(key: string): any; /** * Configuration Settings to save or update to the config file in the config directory. * @memberof Config * @param cfg Configuration Settings to up stored or update. * @returns {Promise} Promise resolving all configuration information. */ setConfig(cfg: configOptions): Promise; /** * Asynchronously creates a backup of the configuration file. * @returns Promise */ createBackup(): Promise; /** * List all the available backup configs availabe. * @memberof Config * @returns {Promise} Promise resolving array containing names of backup configurations files. */ listBackupConfigs(): Promise; /** * Delete the backup config file if it exists and returns list of backup configurations present in the config directory. * @memberof Config * @param ConfigFileName Name of the backuped Configuration to be deleted. * @returns {Promise } Promise resolving array containing names of backup configurations files. */ deleteConfigFile(ConfigFileName: string): Promise; /** * Returns the Default configuration settings * @returns {configOptions} containing default configuration information. */ getDefaultConfigs(): configOptions; } //# sourceMappingURL=Config.d.ts.map