import type { Task, TaskResult } from "./Task";
type TaskConnectionConfig = {
    condition?: Condition;
    max_retries?: number;
};
export declare class TaskConnection {
    source: Task;
    target: Task;
    config: TaskConnectionConfig;
    id: string;
    constructor(source: Task, target: Task, config?: TaskConnectionConfig, id?: string);
    get condition(): Condition;
    get max_retries(): number;
    toJSON(): {
        source: string;
        target: string;
        config: {
            condition: {
                type: "success" | "error" | "matches";
                path: string | undefined;
                value: any;
            } | undefined;
            max_retries?: number;
        };
    };
}
export declare class Condition {
    type: "success" | "error" | "matches";
    path: string;
    value: any;
    private constructor();
    static default(): Condition;
    static success(): Condition;
    static error(): Condition;
    static matches(path: string, value: any): Condition;
    isMet(result: TaskResult): boolean;
    sameAs(condition?: Condition): boolean;
    toJSON(): {
        type: "success" | "error" | "matches";
        path: string | undefined;
        value: any;
    };
    static fromObject(obj: ReturnType<Condition["toJSON"]>): Condition;
}
export {};
