/**
 * 开放平台存储的「用户页配置」`UserCubeConfig`：`content` JSON、`components[]`、`tableView` 的读/合并。
 */
import type { UserCubeComponentItem, UserCubeConfigShape, CubePlatformMeta, CubeTableDataRow } from '../../../cn-ai-table/types/cube-platform-meta';
import type { CnAiBizRequestConfig } from '../../../cn-ai-table/types/ai-runtime-config';
/**
 * 选用哪一行解析「整页」userCubeConfig。勿按 tableId 在 components 里筛行，避免首存新表丢同页其它表。
 * 单行 = 与魔方 `tableData[0]` 一致；多行 = 取 gmtModified 最新。
 */
export declare function selectRowForPageConfig(tableData: CubeTableDataRow[]): CubeTableDataRow | null;
export declare function findComponentIndex(components: UserCubeComponentItem[], tableId: string, nodeId?: string): number;
export declare function readTableViewFromComponents(components: UserCubeComponentItem[] | undefined, tableId: string): unknown | null;
/** 对齐魔方 `__AI_Field_Fun__.getAiColumn`：`components[].config.columns.config` */
export declare function readAiColumnsConfigFromComponents(components: UserCubeComponentItem[] | undefined, tableId: string): unknown[];
/** 对齐魔方：整表替换该 `tableId` 下的 `columns.config` 数组 */
export declare function mergeAiColumnsConfigIntoComponents(components: UserCubeComponentItem[] | undefined, payload: {
    tableId: string;
    nodeId?: string;
    columns: unknown[];
}): UserCubeComponentItem[];
export declare function upsertAiColumnInComponents(components: UserCubeComponentItem[] | undefined, payload: {
    tableId: string;
    nodeId?: string;
    column: Record<string, unknown>;
}): UserCubeComponentItem[];
export declare function removeAiColumnFromComponents(components: UserCubeComponentItem[] | undefined, payload: {
    tableId: string;
    nodeId?: string;
    columnCode: string;
}): UserCubeComponentItem[];
/** 对齐 funcMap.setTableView：命中则改 tableView，否则 push CnTable。 */
export declare function mergeTableViewIntoComponents(components: UserCubeComponentItem[] | undefined, payload: {
    tableId: string;
    viewsData: unknown;
    nodeId?: string;
}): UserCubeComponentItem[];
/**
 * getList → 解析一行 content → userCubeConfig；行 id 写入根级 id（配置行主键）。
 */
export declare function loadUserCubeConfigFromPlatform(meta: CubePlatformMeta, bizRequestConfig?: Pick<CnAiBizRequestConfig, 'cubePlatform'> | null): Promise<{
    userCubeConfig: UserCubeConfigShape;
    userCubeConfigRowId: string;
}>;
