/**
 * 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 { FlowSurfaceContextResponse } from './types';
type CollectionLike = {
    name?: string;
    title?: string;
    dataSourceKey?: string;
    fields?: any[] | Map<string, any> | Record<string, any>;
    getFields?: () => any[];
};
type FlowSurfacePopupContextLevel = {
    uid?: string;
    recordCollection?: CollectionLike | null;
    sourceRecordCollection?: CollectionLike | null;
};
type FlowSurfaceChartQueryOutput = {
    alias: string;
    source?: 'builder' | 'sql';
    type?: string;
    kind?: 'dimension' | 'measure';
    field?: string | string[];
    aggregation?: string;
    format?: string;
};
type FlowSurfaceChartCapabilityHint = {
    key: string;
    title: string;
    description: string;
};
type FlowSurfaceChartMappingSupport = {
    allowed: string[];
    required?: string[];
};
type FlowSurfaceChartStyleSupport = {
    type: 'boolean' | 'number' | 'string';
    enumValues?: string[];
    min?: number;
    max?: number;
    description?: string;
};
type FlowSurfaceChartContext = {
    queryOutputs?: FlowSurfaceChartQueryOutput[];
    aliases?: string[];
    supportedMappings?: Record<string, FlowSurfaceChartMappingSupport>;
    supportedStyles?: Record<string, Record<string, FlowSurfaceChartStyleSupport>>;
    supportedVisualTypes?: string[];
    safeDefaults?: FlowSurfaceChartCapabilityHint[];
    riskyPatterns?: FlowSurfaceChartCapabilityHint[];
    unsupportedPatterns?: FlowSurfaceChartCapabilityHint[];
};
export type FlowSurfaceContextSemantic = {
    collection?: CollectionLike | null;
    userCollection?: CollectionLike | null;
    recordCollection?: CollectionLike | null;
    formValuesCollection?: CollectionLike | null;
    itemCollections?: Array<CollectionLike | null>;
    itemRootCollection?: CollectionLike | null;
    popupLevels?: FlowSurfacePopupContextLevel[];
    chart?: FlowSurfaceChartContext | null;
};
export declare function isBareFlowContextPath(path: string): boolean;
export declare function buildFlowSurfaceContextResponse(input: {
    semantic: FlowSurfaceContextSemantic;
    path?: string;
    maxDepth?: number;
}): FlowSurfaceContextResponse;
export {};
