import { IThing, Thing } from '../models/Thing.js';
import { DataEntity, IDataEntity } from './DataEntity.js';
import { DataNamespace } from './DataNamespace.js';
import { FileBreadcrumb } from '../models/store/File.js';
import { DataModelKind } from '../models/kinds.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.
 */
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.
 */
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(): 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;
    /**
     * Returns the parent namespace where this data model exist.
     */
    getParent(): DataNamespace | undefined;
    /**
     * Creates breadcrumbs from this data model to the root namespace.
     */
    breadcrumbs(): FileBreadcrumb[];
}
//# sourceMappingURL=DataModel.d.ts.map