import { SdmContext } from "../context/SdmContext";
import { GoalContribution } from "../dsl/goalContribution";
import { Goals } from "../goal/Goals";
import { GoalImplementationMapper } from "../goal/support/GoalImplementationMapper";
import { PushListenerInvocation } from "../listener/PushListener";
import { GoalSetter } from "../mapping/GoalSetter";
import { PushMapping } from "../mapping/PushMapping";
import { GoalApprovalRequestVoteDecisionManager, GoalApprovalRequestVoter } from "../registration/goalApprovalRequestVote";
import { MachineConfiguration } from "./MachineConfiguration";
import { SoftwareDeliveryMachineConfiguration } from "./SoftwareDeliveryMachineOptions";
/**
 * Interface for machines driven by configurable goals.
 * Goals and goal "implementations" can be defined by users.
 */
export interface GoalDrivenMachine<O extends SoftwareDeliveryMachineConfiguration> extends MachineConfiguration<O> {
    /**
     * Return the PushMapping that will be used on pushes.
     * Useful in testing goal setting.
     * @return {PushMapping<Goals>}
     */
    pushMapping: PushMapping<Goals>;
    readonly goalFulfillmentMapper: GoalImplementationMapper;
    /**
     * (hint: prefer `withPushRules`)
     *
     * Add goal setting contributions that will be added into SDM goal setting.
     * Decorates other goal setting behavior.
     *
     * For example, always do fingerprints:
     *   sdm.addGoalContributions(onAnyPush().setGoals(FingerprintGoal))
     *
     * Or, sometimes do a custom local deploy goal:
     *   sdm.addGoalContributions(
     *       whenPushSatisfies(IsSdm, IsInLocalMode).setGoals(
     *          new Goals("delivery", LocalSdmDelivery)));
     *
     * @param goalContributions contributions to goals
     */
    addGoalContributions(goalContributions: GoalSetter): this;
    /**
     * Add to the list of things an SDM
     * can do on a push.
     *
     * @param contributor contributor to set
     * @param contributors additional contributors
     */
    withPushRules<F extends SdmContext = PushListenerInvocation>(contributor: GoalContribution<F>, ...contributors: Array<GoalContribution<F>>): this;
    /**
     * Add vote that gets to decide whether to deny or grant goal approval requests.
     * @param vote
     */
    addGoalApprovalRequestVoter(vote: GoalApprovalRequestVoter): this;
    /**
     * Set the decision manager used to make final decision on GoalApprovalRequestVoteResult instances.
     * @param manager
     */
    setGoalApprovalRequestVoteDecisionManager(manager: GoalApprovalRequestVoteDecisionManager): this;
}
//# sourceMappingURL=GoalDrivenMachine.d.ts.map