export interface ImportPipelineContext {
    readonly url: string;
    readonly signal?: AbortSignal;
    readonly onProgress?: (event: ImportPipelineProgressEvent) => void;
}
export interface ImportStage<TInput = unknown, TOutput = TInput> {
    readonly name: string;
    canRun?(input: TInput, context: ImportPipelineContext): Promise<boolean> | boolean;
    run(input: TInput, context: ImportPipelineContext): Promise<TOutput> | TOutput;
    rollback?(output: TOutput, context: ImportPipelineContext): Promise<void> | void;
}
export type ImportPipelineProgressStatus = "started" | "skipped" | "completed" | "rollback-started" | "rollback-completed";
export interface ImportPipelineProgressEvent {
    readonly url: string;
    readonly stageName: string;
    readonly status: ImportPipelineProgressStatus;
}
export interface ImportPipelineErrorOptions {
    readonly url: string;
    readonly stageName?: string;
    readonly cause?: unknown;
}
export declare class ImportPipelineError extends Error {
    readonly url: string;
    readonly stageName?: string;
    readonly cause?: unknown;
    constructor(message: string, options: ImportPipelineErrorOptions);
}
export declare class ImportPipeline {
    private readonly stages;
    addStage<TInput, TOutput>(stage: ImportStage<TInput, TOutput>): this;
    run<TInput, TOutput = unknown>(input: TInput, context: ImportPipelineContext): Promise<TOutput>;
    private withAbort;
    private throwIfAborted;
    private createAbortError;
    private toPipelineError;
    private report;
}
//# sourceMappingURL=ImportPipeline.d.ts.map