UNPKG

2.37 kBTypeScriptView Raw
1import { HandlerContext } from "@atomist/automation-client/lib/HandlerContext";
2import { RemoteRepoRef } from "@atomist/automation-client/lib/operations/common/RepoId";
3import { Goal } from "../../api/goal/Goal";
4import { SdmGoalEvent } from "../../api/goal/SdmGoalEvent";
5import { SdmGoalFulfillment, SdmGoalKey, SdmGoalMessage, SdmProvenance } from "../../api/goal/SdmGoalMessage";
6import { SdmGoalSetMessage } from "../../api/goal/SdmGoalSetMessage";
7import { GoalImplementation } from "../../api/goal/support/GoalImplementationMapper";
8import { GoalSetTag } from "../../api/goal/tagGoalSet";
9import { OnPushToAnyBranch, SdmGoalState } from "../../typings/types";
10export declare function environmentFromGoal(goal: Goal): string;
11export interface UpdateSdmGoalParams {
12 state: SdmGoalState;
13 description: string;
14 url?: string;
15 externalUrls?: Array<{
16 label?: string;
17 url: string;
18 }>;
19 approved?: boolean;
20 error?: Error;
21 data?: string;
22 phase?: string;
23}
24export declare function updateGoal(ctx: HandlerContext, before: SdmGoalEvent, params: UpdateSdmGoalParams): Promise<void>;
25export declare function goalCorrespondsToSdmGoal(goal: Goal, sdmGoal: SdmGoalKey): boolean;
26export declare function constructSdmGoalImplementation(gi: GoalImplementation, registration: string): SdmGoalFulfillment;
27export declare function constructSdmGoal(ctx: HandlerContext, parameters: {
28 goalSet: string;
29 goalSetId: string;
30 goal: Goal;
31 state: SdmGoalState;
32 id: RemoteRepoRef;
33 providerId: string;
34 url?: string;
35 fulfillment?: SdmGoalFulfillment;
36}): SdmGoalMessage;
37export declare function storeGoal(ctx: HandlerContext, sdmGoal: SdmGoalMessage): Promise<SdmGoalMessage>;
38export declare function constructProvenance(ctx: HandlerContext): SdmProvenance;
39export declare function descriptionFromState(goal: Goal, state: SdmGoalState, goalEvent?: SdmGoalEvent): string;
40export declare function constructGoalSet(ctx: HandlerContext, goalSetId: string, goalSet: string, sdmGoals: SdmGoalMessage[], tags: GoalSetTag[], push: OnPushToAnyBranch.Push): SdmGoalSetMessage;
41export declare function storeGoalSet(ctx: HandlerContext, goalSet: SdmGoalSetMessage): Promise<void>;
42export declare function goalSetState(goals: Array<Pick<SdmGoalMessage, "name" | "state">>): SdmGoalState;
43//# sourceMappingURL=storeGoals.d.ts.map
\No newline at end of file