import { TransactionStepsDefinition, TransactionStepStatus, TransactionState } from ".";
/**
 * @class TransactionStep
 * @classdesc A class representing a single step in a transaction flow
 */
export declare class TransactionStep {
    /**
     * @member id - The id of the step
     * @member depth - The depth of the step in the flow
     * @member definition - The definition of the step
     * @member invoke - The current state and status of the invoke action of the step
     * @member compensate - The current state and status of the compensate action of the step
     * @member attempts - The number of attempts made to execute the step
     * @member failures - The number of failures encountered while executing the step
     * @member lastAttempt - The timestamp of the last attempt made to execute the step
     * @member next - The ids of the next steps in the flow
     * @member response - The response from the last successful execution of the step
     * @member forwardResponse - A flag indicating if the response from the previous step should be passed to this step as payload
     */
    private stepFailed;
    id: string;
    depth: number;
    definition: TransactionStepsDefinition;
    invoke: {
        state: TransactionState;
        status: TransactionStepStatus;
    };
    compensate: {
        state: TransactionState;
        status: TransactionStepStatus;
    };
    attempts: number;
    failures: number;
    lastAttempt: number | null;
    next: string[];
    response: unknown;
    forwardResponse: boolean;
    getStates(): {
        state: TransactionState;
        status: TransactionStepStatus;
    };
    beginCompensation(): void;
    isCompensating(): boolean;
    changeState(toState: TransactionState): void;
    changeStatus(toStatus: TransactionStepStatus): void;
    saveResponse(response: any): void;
    getResponse(): unknown;
    canRetry(): boolean;
    canInvoke(flowState: TransactionState): boolean;
    canCompensate(flowState: TransactionState): boolean;
}
