import { FlowNodeInstanceResult, FlowNodeViewModel, Identity, RuntimeExpressionParameters, TokenHistory } from '@5minds/processcube_engine_sdk';
import { FlowNodeInstanceDatabaseAdapter } from '../Tools/DatabaseAdaptersSequelize/FlowNodeInstanceAdapter';
export type FlowNodeExpressionParameters = {
    engine?: {
        id?: string;
        name?: string;
    };
    environment?: Record<string, any>;
    currentToken?: any;
    correlationId?: string;
    flowNodeExecutionCount?: number | null;
    processModel: Record<string, any>;
    processModelVersion?: string | null;
    correlationMetadata?: any;
    identity?: Identity;
    processInstanceMetadata?: any;
    currentDataObject?: any;
    currentFlowNode?: FlowNodeViewModel;
    previousFlowNodeId?: string;
    dataObjects?: {
        [dataObjectId: string]: any;
    };
    additionalProperties?: {
        [key: string]: any;
    };
    allowNonObjectResults: boolean;
};
export declare class ProcessTokenService {
    private flowNodeInstanceDatabaseAdapter;
    private runtimeExpressionWorkers;
    private config;
    constructor(flowNodeInstanceDatabaseAdapter: FlowNodeInstanceDatabaseAdapter);
    dispose(): Promise<void>;
    getAvailableParametersForExpressions(): Array<string>;
    /**
     * Gets the result of the last Flow Node Instance executed for a Process Instance.
     * Should only be used for Process Instances that were finished successfully.
     */
    getFinalResult(processInstanceId: string): Promise<FlowNodeInstanceResult>;
    validateSchema(dataContract: string, processedParams: RuntimeExpressionParameters, result: object): Promise<boolean>;
    executeRuntimeExpression<TExpectedResult>(expression: string, params: RuntimeExpressionParameters, dataContract?: string): Promise<TExpectedResult>;
    getFlowNodeExecutionCount(params: RuntimeExpressionParameters): Promise<number | null>;
    getParametersForRuntimeExpression(expression: string, params: RuntimeExpressionParameters): Promise<RuntimeExpressionParameters>;
    mergeRuntimeExpressionParameters(runtimeExpressionParametersA: RuntimeExpressionParameters, runtimeExpressionParametersB: RuntimeExpressionParameters): RuntimeExpressionParameters;
    buildTokenHistoryForProcessInstance(params: {
        processInstanceId: string;
        currentToken: object;
        currentFlowNodeId: string;
        previousFlowNodeId: string;
    }, expression?: string): Promise<TokenHistory>;
    private extractFlowNodesFromExpression;
    private sanitizeFlowNodeExpression;
    private executeTimeboxedRuntimeExpression;
}
