/**
 * 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 type { FlowSurfaceResolvedKey } from './types';
type FlowSurfaceDeclaredKeyPersistenceDeps = {
    findModelById: (uid: string, options?: {
        transaction?: any;
        includeAsyncNode?: boolean;
    }) => Promise<any>;
    patchModel: (values: Record<string, any>, options?: {
        transaction?: any;
    }) => Promise<any>;
    getDeclaredKeyFromNode: (node: any) => string | undefined;
};
export declare function assertKeyPersistable(actionName: string, keyInfo: FlowSurfaceResolvedKey, node: any): void;
export declare function assertRequestKeysPersistable(actionName: string, keys: Map<string, FlowSurfaceResolvedKey>, deps: FlowSurfaceDeclaredKeyPersistenceDeps, transaction?: any): Promise<void>;
export declare function clearDeclaredKeyForNode(uid: string, deps: FlowSurfaceDeclaredKeyPersistenceDeps, transaction?: any): Promise<void>;
export declare function persistDeclaredKeyForNode(keyInfo: FlowSurfaceResolvedKey, deps: FlowSurfaceDeclaredKeyPersistenceDeps, transaction?: any): Promise<{
    key: string;
    uid: string;
    persisted: boolean;
    skipped: string;
} | {
    key: string;
    uid: string;
    persisted: boolean;
    skipped?: undefined;
}>;
export {};
