import { LazyProvider } from '../common/provider.js'; /** * Module for managing loading of configuration * from various sources, and reloading that * configuration periodically - to account for * secret rotation, etc. */ /** * Load the json at the given file * * @param fileName */ export declare function loadJsonFromFile(fileName: string): Promise; /** * Load configuration from a file * * @param fileName * @param ttlSecs */ export declare function loadFromFile(fileName: string, ttlSecs: number): LazyProvider; export declare function loadJsonFromSecret(secretId: string): Promise; /** * Load configuration from a secret * * @param secretId ARN or name of secret * @param ttlSecs rotation period in seconds */ export declare function loadFromSecret(secretId: string, ttlSecs: number): LazyProvider; export interface LoadRule { ttlSecs: number; type: string; value: string; } /** * Load configuration from the sources specified by the given rule, * and combine the results into a single object via * Object.assign(this, listOfConfigs) * * @param rulesIn pulled from process.env["LITTLE_CONFIG"] if not set, * mapping from key to LoadRule that * specifies type of source (currently supports secret, env, string, * or file), ttlSecs, and path - merges with default rule * (homedir + "/.local/share/littleware/authn/config.json") * @return Provider that provides mapping from key to loaded data */ export declare function loadFromRule(rulesIn?: { [key: string]: LoadRule | { value: string; }; } | string): LazyProvider<{ [key: string]: any; }>;