import { BLUEPRINT_CONFIG_VERSION, RUNTIME_CLI_VERSION } from '../../config.js';
export interface ConfigUpdate {
    organizationId?: string;
    projectId?: string;
    stackId?: string;
}
export interface BlueprintsConfig extends ConfigUpdate {
    blueprintConfigVersion?: typeof BLUEPRINT_CONFIG_VERSION;
    runtimeCliVersion?: typeof RUNTIME_CLI_VERSION;
    updatedAt?: number;
}
export interface LocatedBlueprintsConfig extends BlueprintsConfig {
    configPath: string;
}
export declare function readConfigFile(blueprintFilePath?: string): LocatedBlueprintsConfig | null;
/**
 * Create or update the config file to disk.
 * One of organizationId or projectId must be provided. Not both.
 * Blueprint config version and updatedAt timestamp are set automatically.
 * @param options - the options to write the config file
 * @param options.blueprintFilePath - the path to the blueprint file
 * @param options.organizationId - the organization ID
 * @param options.projectId - the project ID
 * @param options.stackId - the stack ID
 */
export declare function writeConfigFile(blueprintFilePath: string, options: {
    stackId?: string;
} & ({
    organizationId: string;
    projectId?: string;
} | {
    projectId: string;
    organizationId?: string;
})): BlueprintsConfig;
/**
 * Update the config file with the given properties.
 * Config file must already exist.
 * Adds timestamp. No validation or transformation is performed.
 * @param blueprintFilePath - the path to the blueprint file
 * @param updateableProperties - the properties to update
 * @param updateableProperties.organizationId - the organization ID
 * @param updateableProperties.projectId - the project ID
 * @param updateableProperties.stackId - the stack ID
 */
export declare function patchConfigFile(blueprintFilePath: string, updateableProperties: ConfigUpdate): BlueprintsConfig;
/**
 * Find and write an organizationId to the config file by getting it from the projectId
 * @throws {Error} if unable to fetch project
 * @returns {Promise<string>} the discovered organizationId
 */
export declare function backfillOrganizationId({ blueprintFilePath, projectId, }: {
    blueprintFilePath: string;
    projectId: string;
}): Promise<string>;
export declare function backfillProjectBasedStackId({ blueprintFilePath, projectId, }: {
    blueprintFilePath: string;
    projectId: string;
}): Promise<string | undefined>;
