import { type ReadBlueprintResult } from '../actions/blueprints/blueprint.js';
import type { Logger } from '../utils/logger.js';
import type { AuthParams, Result, ScopeType, Stack, Warning } from '../utils/types.js';
export interface CoreConfig {
    /** The CLI binary name. */
    bin: string;
    /** The log output function. */
    log: Logger;
    /** Enable resource validation during parsing */
    validateResources?: boolean;
    /** Path to a specific Blueprint file or directory */
    blueprintPath?: string;
}
export interface BlueprintConfig extends CoreConfig {
    token: string;
    blueprint: ReadBlueprintResult;
}
export interface DeployedBlueprintConfig extends BlueprintConfig {
    stackId: string;
    scopeType: ScopeType;
    scopeId: string;
    auth: AuthParams;
    deployedStack: Stack;
}
export type CoreResult = {
    /**
     * Internal data for isolated testing and debugging.
     * Not returned to users! Use `json` for structured output via oclif's `--json` flag.
     */
    data?: Record<string, unknown>;
} & ({
    /** Something went wrong. */
    success: false;
    /** The error message, if the operation failed. */
    error: string;
    /** Actionable suggestions displayed to the user via oclif's PrettyPrintableError. */
    suggestions?: string[];
    /** A URL for more information about the error. */
    ref?: string;
    /** A machine-readable error code. */
    code?: string;
    /** Request ID of the API call that failed, for support. */
    requestId?: string;
    /**
     * The user cancelled a prompt. A calling core reads it to keep its own message.
     * Not printed: `code` would surface as `Code:` in the command output.
     */
    cancelled?: true;
    /** Overrides the process exit code (defaults to oclif's 2). */
    exitCode?: number;
    streaming?: never;
    json?: never;
} | {
    /** Everything went well. */
    success: true;
    /** The streaming function, if the operation is streaming. */
    streaming?: Promise<void>;
    error?: never;
    /**
     * Structured data returned to the user when `--json` is passed.
     * Commands should return this value from `run()` for oclif to serialize.
     */
    json?: Record<string, unknown>;
    /**
     * Actionable items displayed to the user that we don't error out on.
     */
    warnings?: Warning[];
});
type InitBlueprintConfigParams = CoreConfig & ({
    validateToken: true;
    token: string;
} | {
    validateToken?: false;
    token?: string;
});
export declare function initBlueprintConfig({ bin, log, token, validateResources, validateToken, blueprintPath, }: InitBlueprintConfigParams): Promise<Result<BlueprintConfig>>;
export declare function initDeployedBlueprintConfig(config: Partial<BlueprintConfig> & Pick<BlueprintConfig, 'bin' | 'log' | 'token' | 'validateResources'> & {
    validateToken?: boolean;
    stackOverride?: string;
}): Promise<Result<DeployedBlueprintConfig>>;
export {};
