import { Configuration } from "@atomist/automation-client/lib/configuration";
import { HandlerContext } from "@atomist/automation-client/lib/HandlerContext";
import { ProjectOperationCredentials } from "@atomist/automation-client/lib/operations/common/ProjectOperationCredentials";
import { RemoteRepoRef } from "@atomist/automation-client/lib/operations/common/RepoId";
import { AddressChannels } from "../../api/context/addressChannels";
import { ParameterPromptFactory } from "../../api/context/parameterPrompt";
import { PreferenceStore, PreferenceStoreFactory } from "../../api/context/preferenceStore";
import { EnrichGoal } from "../../api/goal/enrichGoal";
import { Goals } from "../../api/goal/Goals";
import { SdmGoalMessage } from "../../api/goal/SdmGoalMessage";
import { GoalImplementationMapper } from "../../api/goal/support/GoalImplementationMapper";
import { GoalSetTag, TagGoalSet } from "../../api/goal/tagGoalSet";
import { GoalsSetListener } from "../../api/listener/GoalsSetListener";
import { PushListenerInvocation } from "../../api/listener/PushListener";
import { GoalSetter } from "../../api/mapping/GoalSetter";
import { ProjectLoader } from "../../spi/project/ProjectLoader";
import { RepoRefResolver } from "../../spi/repo-ref/RepoRefResolver";
import { PushFields } from "../../typings/types";
/**
 * Configuration for handling incoming pushes
 */
export interface ChooseAndSetGoalsRules {
    projectLoader: ProjectLoader;
    repoRefResolver: RepoRefResolver;
    goalsListeners: GoalsSetListener[];
    goalSetter: GoalSetter;
    implementationMapping: GoalImplementationMapper;
    enrichGoal?: EnrichGoal;
    tagGoalSet?: TagGoalSet;
    preferencesFactory?: PreferenceStoreFactory;
    parameterPromptFactory?: ParameterPromptFactory<any>;
}
/**
 * Choose and set goals for this push
 * @param {ChooseAndSetGoalsRules} rules: configuration for handling incoming pushes
 * @param parameters details of incoming request
 * @return {Promise<Goals | undefined>}
 */
export declare function chooseAndSetGoals(rules: ChooseAndSetGoalsRules, parameters: {
    context: HandlerContext;
    credentials: ProjectOperationCredentials;
    push: PushFields.Fragment;
}): Promise<Goals | undefined>;
export declare function determineGoals(rules: {
    projectLoader: ProjectLoader;
    repoRefResolver: RepoRefResolver;
    goalSetter: GoalSetter;
    implementationMapping: GoalImplementationMapper;
    enrichGoal: EnrichGoal;
    tagGoalSet?: TagGoalSet;
}, circumstances: {
    credentials: ProjectOperationCredentials;
    id: RemoteRepoRef;
    context: HandlerContext;
    configuration: Configuration;
    push: PushFields.Fragment;
    addressChannels: AddressChannels;
    preferences?: PreferenceStore;
    goalSetId: string;
}): Promise<{
    determinedGoals: Goals | undefined;
    goalsToSave: SdmGoalMessage[];
    tags: GoalSetTag[];
}>;
export declare function planGoals(goals: Goals, pli: PushListenerInvocation): Promise<Goals>;
//# sourceMappingURL=chooseAndSetGoals.d.ts.map