import type { BlueprintResource } from '@sanity/blueprints';
import type { WaitForFn } from '../../utils/blueprints/wait-for.js';
import type { AuthParams, InstallerType, ResourceMetadata, ScopeType } from '../../utils/types.js';
import { type ProcessAssetsProgress, type ProcessedAsset } from './process-assets.js';
type PreDeployFailure = {
    success: false;
    error: string;
    code?: string;
    exitCode?: number;
    suggestions?: string[];
    requestId?: string;
};
export type PreDeployResult = PreDeployFailure | {
    success: true;
    /** One entry per prepared asset, for the deploy metadata */
    resourceMetadata: ResourceMetadata[];
};
export type PreDeployAssetEvent<R extends BlueprintResource> = {
    type: 'progress';
    progress: ProcessAssetsProgress;
} | {
    type: 'complete';
} | {
    type: 'result';
    result: ProcessedAsset<R>;
};
type PreDeployOptions<R extends BlueprintResource> = {
    scopeType: ScopeType;
    scopeId: string;
    resources: BlueprintResource[];
    stackId: string;
    stackName: string;
    bin: string;
    auth: AuthParams;
    blueprintFileDir: string;
    installer: InstallerType;
    fetchFn: typeof fetch;
    waitForFn: WaitForFn;
    onAssetEvent?: (event: PreDeployAssetEvent<R>) => void;
    onPreDeployStackStart?: () => void;
    onPreDeployStackFail?: () => void;
    onPreDeployStackDone?: () => void;
    onPreDeployOperationStart?: () => void;
    onPreDeployOperationDone?: () => void;
};
export declare function preDeploy<R extends BlueprintResource>(options: PreDeployOptions<R>): Promise<PreDeployResult>;
export {};
