import { RetryOptions } from "@atomist/automation-client/lib/util/retry";
import { Goal, GoalDefinition } from "../Goal";
import { ExecuteGoal, GoalInvocation } from "../GoalInvocation";
/**
 * Minimum information needed to create a goal
 */
export interface EssentialGoalInfo extends Partial<GoalDefinition> {
    displayName: string;
}
/**
 * Rules for waiting for a predicated goal.
 * Specify timeout in seconds or milliseconds.
 */
export interface WaitRules {
    timeoutSeconds?: number;
    timeoutMillis?: number;
    retries?: number;
    condition: (gi: GoalInvocation) => Promise<boolean>;
}
/**
 * Create a goal from the given executor, waiting until a condition is satisfied,
 * with a given timeout.
 * @param {EssentialGoalInfo} egi
 * @param {ExecuteGoal} goalExecutor
 * @param w rules for waiting
 * @return {Goal}
 */
export declare function createPredicatedGoal(egi: EssentialGoalInfo, goalExecutor: ExecuteGoal, w: WaitRules): Goal;
/**
 * Wrap provided ExecuteGoal instance with WaitRules processing
 * @param {string} uniqueName
 * @param {ExecuteGoal} goalExecutor
 * @param w rules for waiting
 * @return {ExecuteGoal}
 */
export declare function createPredicatedGoalExecutor(uniqueName: string, goalExecutor: ExecuteGoal, w: WaitRules, unref?: boolean): ExecuteGoal;
export declare function createRetryingGoalExecutor(uniqueName: string, goalExecutor: ExecuteGoal, retry: RetryOptions): ExecuteGoal;
//# sourceMappingURL=createGoal.d.ts.map