import { ProjectConfig, ProjectUserConfig } from '@codiac.io/codiac-relay-contracts';
import { CliConfig, CliEnviro, ProjectEnviro } from '../entities';
/** Performs cruds on an entity stored on the local hard drive as single json file.
 */
export declare abstract class JsonFileRepoFor<T extends Object> {
    protected settings: IJsonFileParams;
    constructor(settings: IJsonFileParams);
    abstract entityTypeName: string;
}
export interface IJsonFileParams {
    fileName: string;
    /** Absolute path to folder containing the json file. */
    parentFolder: string;
}
export declare class CliGlobalConfigRepo extends JsonFileRepoFor<CliConfig> {
    constructor(cliEnviro: CliEnviro);
    entityTypeName: string;
    /** Returns an empty config object when undefined.
     * TODO: Consider changing signature to also return undefined.
     */
    read(): Promise<CliConfig>;
    upsert(entity: CliConfig): Promise<CliConfig | undefined>;
    /** Deserializes the global Codiac CLI configuration file.
   * @deprecated Use cliGlobalConfigRepo.read() instead.
  */
    read_sync(): CliConfig | undefined;
    /** Serializes the global Codiac CLI configuration object.
     *
     * @deprecated Use cliGlobalConfigRepo.upsert() instead.
    */
    write_sync(config: CliConfig): void;
}
/** Primary source for reading and writing project config files
 * for the current context of the project.
 * That is: the project config and project-user config...
 * @param projRoot Fully qualified path to the folder containing the project declaration file from which to scope method calls for this class. */
export declare class ProjectContextRepo {
    constructor(projectEnviro: ProjectEnviro);
    projRoot: string;
    /** Deserializes the Toyhauler config file in scope for the current working directory.
     * Throws if none is defined up the folder tree. */
    readProjectConfig(folder?: string): ProjectConfig;
    /** Instantiates a fresh config object with default values.
     * Assumes the project has been initialized.
     * @param apiName Friendly title for the api project (defaults to the name of the project folder)
     * @param tenantCode identifier for the tenant that owns this projeect.
    */
    createDefaultProjectConfig(apiName?: string, tenantCode?: string): ProjectConfig;
    /** Serializes the given config to its file.  Throws if the project root hasnt been initialized. */
    updateProjectConfigFile(config: ProjectConfig): Promise<void>;
    /** News up a project config object and serializes
     * to a file in the current working directory,
     * thus establishing it as a project root. */
    writeNewProjectConfig(seed?: ProjectConfig): ProjectConfig;
    /** Reads the user-specific project config file, if it exists.
   * Otherwise returns a new empty instance.
   */
    readProjectUserConfig(): ProjectUserConfig;
    /** Serializes the given config to a file in the project user folder. */
    writeProjectUserConfig(config?: ProjectUserConfig): void;
}
