import { HandlerContext } from "@atomist/automation-client/lib/HandlerContext";
import { RemoteRepoRef } from "@atomist/automation-client/lib/operations/common/RepoId";
import { Goal } from "../../api/goal/Goal";
import { SdmGoalEvent } from "../../api/goal/SdmGoalEvent";
import { SdmGoalFulfillment, SdmGoalKey, SdmGoalMessage, SdmProvenance } from "../../api/goal/SdmGoalMessage";
import { SdmGoalSetMessage } from "../../api/goal/SdmGoalSetMessage";
import { GoalImplementation } from "../../api/goal/support/GoalImplementationMapper";
import { GoalSetTag } from "../../api/goal/tagGoalSet";
import { OnPushToAnyBranch, SdmGoalState } from "../../typings/types";
export declare function environmentFromGoal(goal: Goal): string;
export interface UpdateSdmGoalParams {
    state: SdmGoalState;
    description: string;
    url?: string;
    externalUrls?: Array<{
        label?: string;
        url: string;
    }>;
    approved?: boolean;
    error?: Error;
    data?: string;
    phase?: string;
}
export declare function updateGoal(ctx: HandlerContext, before: SdmGoalEvent, params: UpdateSdmGoalParams): Promise<void>;
export declare function goalCorrespondsToSdmGoal(goal: Goal, sdmGoal: SdmGoalKey): boolean;
export declare function constructSdmGoalImplementation(gi: GoalImplementation, registration: string): SdmGoalFulfillment;
export declare function constructSdmGoal(ctx: HandlerContext, parameters: {
    goalSet: string;
    goalSetId: string;
    goal: Goal;
    state: SdmGoalState;
    id: RemoteRepoRef;
    providerId: string;
    url?: string;
    fulfillment?: SdmGoalFulfillment;
}): SdmGoalMessage;
export declare function storeGoal(ctx: HandlerContext, sdmGoal: SdmGoalMessage): Promise<SdmGoalMessage>;
export declare function constructProvenance(ctx: HandlerContext): SdmProvenance;
export declare function descriptionFromState(goal: Goal, state: SdmGoalState, goalEvent?: SdmGoalEvent): string;
export declare function constructGoalSet(ctx: HandlerContext, goalSetId: string, goalSet: string, sdmGoals: SdmGoalMessage[], tags: GoalSetTag[], push: OnPushToAnyBranch.Push): SdmGoalSetMessage;
export declare function storeGoalSet(ctx: HandlerContext, goalSet: SdmGoalSetMessage): Promise<void>;
export declare function goalSetState(goals: Array<Pick<SdmGoalMessage, "name" | "state">>): SdmGoalState;
//# sourceMappingURL=storeGoals.d.ts.map