import { IThing, Thing } from '../../models/Thing.js';
import { DataEntity, IDataEntity } from './DataEntity.js';
import type { DataItemAdaptingOptions, DataNamespace } from './DataNamespace.js';
import { FileBreadcrumb } from '../../models/store/File.js';
import { DataModelKind } from '../../models/kinds.js';
import type { DataDomainRemoveOptions } from '../types.js';
/**
 * Data model creates a logical structure around data entities.
 * It groups entities that represents a whole schema, like a Product data model
 * can have entities that describe: the product entity, price history entity,
 * product location, etc.
 * @deprecated
 */
export interface IDataModel {
    kind: typeof DataModelKind;
    /**
     * The key of the namespace.
     */
    key: string;
    /**
     * The data model description.
     */
    info: IThing;
    /**
     * The list of keys of entities that this data model contain.
     */
    entities?: string[];
}
/**
 * Data model creates a logical structure around data entities.
 * It groups entities that represents a whole schema, like a Product data model
 * can have entities that describe: the product entity, price history entity,
 * product location, etc.
 * @deprecated
 */
export declare class DataModel {
    root: DataNamespace;
    kind: string;
    key: string;
    /**
     * The description of the data namespace.
     */
    info: Thing;
    /**
     * The list of entities that this data model has.
     */
    entities: DataEntity[];
    static fromName(root: DataNamespace, name: string): DataModel;
    /**
     * @param root the root namespace.
     * @param input The data model definition to restore.
     */
    constructor(root: DataNamespace, input?: string | IDataModel);
    new(init: IDataModel): void;
    static isDataModel(input: unknown): boolean;
    toJSON(): IDataModel;
    protected _readEntity(key: string): DataEntity | undefined;
    /**
     * Removes self from the namespace with all entities.
     */
    remove(opts?: DataDomainRemoveOptions): void;
    /**
     * Adapts an entity to this data model.
     * The entity must already be added to another data model within this namespace for it to be
     * adapted to this data model.
     * This method is used to change the data model of an entity.
     * It will remove the entity from the previous data model and add it to this one.
     * @param entity The entity to adapt.
     */
    adaptEntity(entity: DataEntity, opts?: DataItemAdaptingOptions): void;
    /**
     * Adds an entity to this data model.
     *
     * @param init The name of the entity to create, the instance of the entity or its schema
     * @returns A reference to the created entity.
     */
    addEntity(init: string | DataEntity | IDataEntity): DataEntity;
    /**
     * @deprecated Use the `getParentInstance()` method instead.
     */
    getParent(): DataNamespace | undefined;
    /**
     * Returns the parent namespace where this data model exist.
     */
    getParentInstance(): DataNamespace | undefined;
    /**
     * Creates breadcrumbs from this data model to the root namespace.
     */
    breadcrumbs(): FileBreadcrumb[];
    /**
     * Checks whether the data model is a child of the given namespace.
     * The relationship doesn't have to be direct, as long as the data model is in the hierarchy it will return true.
     *
     * @param key The key of the parent namespace to check.
     * @returns True if this data model is a child of the given namespace.
     */
    isChildOf(key: string): boolean;
}
//# sourceMappingURL=DataModel.d.ts.map