import type { UmbTreeItemModel } from '../types.js'; import type { UmbTreeAncestorsOfRequestArgs, UmbTreeChildrenOfRequestArgs, UmbTreeRootItemsRequestArgs } from './types.js'; import type { UmbControllerHost } from '../../../../libs/controller-api/index.js'; import type { UmbDataSourceResponse, UmbTargetPagedModel } from '../../repository/index.js'; /** * Interface for a tree data source constructor. * @interface UmbTreeDataSourceConstructor * @template TreeItemType */ export interface UmbTreeDataSourceConstructor { new (host: UmbControllerHost): UmbTreeDataSource; } /** * Interface for a tree data source. * @interface UmbTreeDataSource * @template TreeItemType */ export interface UmbTreeDataSource { /** * Gets the root items of the tree. * @returns {*} {Promise>>} * @memberof UmbTreeDataSource */ getRootItems(args: TreeRootItemsRequestArgsType): Promise>>; /** * Gets the children of the given parent item. * @returns {Promise>>} * @memberof UmbTreeDataSource */ getChildrenOf(args: TreeChildrenOfRequestArgsType): Promise>>; /** * Gets the ancestors of the given item. * @returns {Promise>>} * @memberof UmbTreeDataSource */ getAncestorsOf(args: TreeAncestorsOfRequestArgsType): Promise>>; }