/**
 * This file is part of the NocoBase (R) project.
 * Copyright (c) 2020-2024 NocoBase Co., Ltd.
 * Authors: NocoBase Team.
 *
 * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
 * For more information, please refer to: https://www.nocobase.com/agreement.
 */
import { Transactionable } from '@nocobase/database';
import type { DataSourceManager } from '@nocobase/data-source-manager';
import type PluginWorkflowServer from './Plugin';
import { EXECUTION_REASON } from './constants';
import type { ExecutionModel, WorkflowModel } from './types';
import Processor from './Processor';
type AbortOptions = Transactionable & {
    reason?: (typeof EXECUTION_REASON)[keyof typeof EXECUTION_REASON];
};
export declare function getExecutionLockKey(executionId: number | string): string;
export declare function getJobLockKey(jobId: number | string): string;
export declare function isLockAcquireError(error: unknown): boolean;
export declare function validateCollectionField(collection: string, dataSourceManager: DataSourceManager): Record<string, string> | null;
export declare function getExecutionStatusName(status: number | null | undefined): string;
export declare function getWorkflowExecutionLogMeta(workflow: WorkflowModel, processor?: Processor): {
    workflowId: number;
    workflowKey: string;
    workflowTitle: string;
    executionId: number;
    executionStatus: number;
    executionStatusName: string;
    lastNodeId: number;
    lastNodeType: string;
    lastJobId: number;
    lastJobStatus: number;
};
export declare function abortExecution(plugin: PluginWorkflowServer, execution: ExecutionModel, options?: AbortOptions): Promise<boolean>;
export declare function toJSON<T>(data: T): T;
export {};
