/**
 * 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.
 */
export type FlowSurfaceResolvedAssociationTitleField = {
    field: any;
    fieldName: string;
    source: 'explicit' | 'firstTitleable' | 'relationFieldLabel';
    targetCollection?: any;
};
export type FlowSurfaceTitleFieldErrorOptions = {
    action?: string;
    path?: string;
    fieldPath?: string;
    titleField?: string;
    targetCollection?: any;
    targetCollectionName?: string;
    invalidReason?: string;
    details?: Record<string, any>;
};
export declare function isTitleableCollectionField(field: any): any;
export declare function getExplicitCollectionTitleFieldName(collection: any): string;
export declare function normalizeFlowSurfaceTitleField(value: any): string;
export declare function getFlowSurfaceTitleFieldCandidateNames(collection: any, limit?: number): {
    availableFields: any[];
    availableFieldsTruncated: boolean;
};
export declare function buildFlowSurfaceTitleFieldErrorDetails(options?: FlowSurfaceTitleFieldErrorOptions, candidates?: {
    availableFields: any[];
    availableFieldsTruncated: boolean;
}): {
    [k: string]: any;
};
export declare function assertFlowSurfaceTitleFieldIsNotId(value: any, options?: FlowSurfaceTitleFieldErrorOptions): void;
export declare function assertCollectionTitleFieldExists(collection: any, fieldName: string, options?: FlowSurfaceTitleFieldErrorOptions): any;
export declare function resolveCollectionSafeTitleField(collection: any, options?: FlowSurfaceTitleFieldErrorOptions): FlowSurfaceResolvedAssociationTitleField | null;
export declare function resolveAssociationTitleFieldTargetCollection(field: any, dataSourceKey: string, getCollection: (dataSourceKey: string, collectionName: string) => any): any;
export declare function resolveAssociationSafeTitleField(field: any, dataSourceKey: string, getCollection: (dataSourceKey: string, collectionName: string) => any, options?: FlowSurfaceTitleFieldErrorOptions): FlowSurfaceResolvedAssociationTitleField | null;
