import { SynthesizedStack } from "./synth-stack";
import { TerraformPlan, Terraform, DeployingResource } from "./models/terraform";
export declare type StackEvent = {
    type: "START";
    targetAction?: "diff" | "deploy" | "destroy" | "output";
    targetStack?: string;
} | {
    type: "APPROVAL_ABORTED";
} | {
    type: "APPROVAL_GIVEN";
};
declare type ProgressEvent = {
    type: "STACK_SELECTED";
    stackName: string;
} | {
    type: "LOG";
    stackName: string;
    stateName: string;
    message: string;
    isError: boolean;
} | {
    type: "RESOURCE_UPDATE";
    stackName: string;
    stateName: string;
    stdout: string;
    updatedResources: DeployingResource[];
};
export interface StackContext {
    targetAction?: "diff" | "deploy" | "destroy" | "output";
    message?: string;
    stack?: SynthesizedStack;
    terraform?: Terraform;
    targetStackPlan?: TerraformPlan;
    autoApprove?: boolean;
    outputs?: Record<string, any>;
    outputsByConstructId?: Record<string, any>;
    onProgress: (event: ProgressEvent) => void;
    abortSignal: AbortSignal;
    cancelationReason?: string;
}
declare const services: {
    initializeTerraform: (context: StackContext) => Promise<Terraform>;
    diff: (context: StackContext) => Promise<TerraformPlan>;
    deploy: (context: StackContext) => Promise<void>;
    destroy: (context: StackContext) => Promise<void>;
    gatherOutputs: (context: StackContext) => Promise<{
        outputs: {
            [key: string]: import("./models/terraform").TerraformOutput;
        };
        outputsByConstructId: import("./output").NestedTerraformOutputs;
    }>;
};
declare const guards: {
    targetActionIs: (context: StackContext, _event: any, state: {
        cond: {
            value: string;
        };
    }) => boolean;
    autoApprove: (context: StackContext) => boolean;
    planNeedsNoApply: (_context: StackContext, event: {
        data: TerraformPlan;
    }) => boolean;
};
declare const stackExecutionMachine: import("xstate").StateMachine<StackContext, any, StackEvent, {
    value: any;
    context: StackContext;
}, import("xstate").BaseActionObject, Record<string, {
    data: any;
}>, import("xstate").TypegenDisabled & {
    missingImplementations: {
        actions: never;
        delays: never;
        guards: never;
        services: never;
    };
} & {
    eventsCausingActions: Record<string, string>;
    eventsCausingDelays: Record<string, string>;
    eventsCausingGuards: Record<string, string>;
    eventsCausingServices: Record<string, string>;
} & {
    indexedActions: import("xstate").IndexByType<import("xstate").BaseActionObject>;
    indexedEvents: Record<string, StackEvent> & {
        __XSTATE_ALLOW_ANY_INVOKE_DATA_HACK__: {
            data: any;
        };
    };
    invokeSrcNameMap: Record<string, "__XSTATE_ALLOW_ANY_INVOKE_DATA_HACK__">;
}>;
export { stackExecutionMachine, guards, services };
