1 | import { HandlerContext } from "@atomist/automation-client/lib/HandlerContext";
|
2 | import { RemoteRepoRef } from "@atomist/automation-client/lib/operations/common/RepoId";
|
3 | import { Goal } from "../../api/goal/Goal";
|
4 | import { SdmGoalEvent } from "../../api/goal/SdmGoalEvent";
|
5 | import { SdmGoalFulfillment, SdmGoalKey, SdmGoalMessage, SdmProvenance } from "../../api/goal/SdmGoalMessage";
|
6 | import { SdmGoalSetMessage } from "../../api/goal/SdmGoalSetMessage";
|
7 | import { GoalImplementation } from "../../api/goal/support/GoalImplementationMapper";
|
8 | import { GoalSetTag } from "../../api/goal/tagGoalSet";
|
9 | import { OnPushToAnyBranch, SdmGoalState } from "../../typings/types";
|
10 | export declare function environmentFromGoal(goal: Goal): string;
|
11 | export 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 | }
|
24 | export declare function updateGoal(ctx: HandlerContext, before: SdmGoalEvent, params: UpdateSdmGoalParams): Promise<void>;
|
25 | export declare function goalCorrespondsToSdmGoal(goal: Goal, sdmGoal: SdmGoalKey): boolean;
|
26 | export declare function constructSdmGoalImplementation(gi: GoalImplementation, registration: string): SdmGoalFulfillment;
|
27 | export 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;
|
37 | export declare function storeGoal(ctx: HandlerContext, sdmGoal: SdmGoalMessage): Promise<SdmGoalMessage>;
|
38 | export declare function constructProvenance(ctx: HandlerContext): SdmProvenance;
|
39 | export declare function descriptionFromState(goal: Goal, state: SdmGoalState, goalEvent?: SdmGoalEvent): string;
|
40 | export declare function constructGoalSet(ctx: HandlerContext, goalSetId: string, goalSet: string, sdmGoals: SdmGoalMessage[], tags: GoalSetTag[], push: OnPushToAnyBranch.Push): SdmGoalSetMessage;
|
41 | export declare function storeGoalSet(ctx: HandlerContext, goalSet: SdmGoalSetMessage): Promise<void>;
|
42 | export declare function goalSetState(goals: Array<Pick<SdmGoalMessage, "name" | "state">>): SdmGoalState;
|
43 |
|
\ | No newline at end of file |