dataSource: DataSource;
class DataSource {
constructor(options?: Record<string, any>);
// 只读属性
get flowEngine(): FlowEngine; // 当前 FlowEngine 实例
get displayName(): string; // 显示名称(支持 i18n)
get key(): string; // 数据源 key,如 'main'
// 集合相关方法
getCollections(): Collection[]; // 获取所有集合
getCollection(name: string): Collection | undefined; // 按名称获取集合
getAssociation(associationName: string): CollectionField | undefined; // 获取关联字段(如 hasMany / belongsTo)
// 集合管理
addCollection(collection: Collection | CollectionOptions): void;
updateCollection(newOptions: CollectionOptions): void;
upsertCollection(options: CollectionOptions): Collection | undefined;
upsertCollections(collections: CollectionOptions[], options?: { clearFields?: boolean }): void;
removeCollection(name: string): void;
clearCollections(): void;
// 字段元数据
getCollectionField(fieldPath: string): CollectionField | undefined;
}