/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { ElementTag } from "#common/ElementTag.js"; import { Specification } from "#common/Specification.js"; import { MatterElement } from "../elements/index.js"; import { ModelIndex } from "../logic/ModelIndex.js"; import { AttributeModel } from "./AttributeModel.js"; import { ClusterModel } from "./ClusterModel.js"; import { DatatypeModel } from "./DatatypeModel.js"; import { DeviceTypeModel } from "./DeviceTypeModel.js"; import { FabricModel } from "./FabricModel.js"; import { FieldModel } from "./FieldModel.js"; import { Model } from "./Model.js"; import { ResourceBundle } from "./Resource.js"; import { ScopeModel } from "./ScopeModel.js"; import { SemanticNamespaceModel } from "./SemanticNamespaceModel.js"; /** * The root of a Matter model. This is the parent for global models. */ export declare class MatterModel extends ScopeModel implements MatterElement { #private; tag: MatterElement.Tag; revision?: Specification.Revision; /** * The default instance of the canonical MatterModel (also exported directly simply as "Matter"). */ static standard: MatterModel; /** * Clusters. */ get clusters(): ModelIndex; /** * Create a copy of this model with clusters added or replaced. * * A supplied cluster replaces the standard cluster with the same ID (a plain addition loses to the standard entry * during lookup) and clusters with new IDs are appended. Use this to teach a {@link ClientNode} about custom or * extended clusters so a controller resolves their elements to real names instead of synthetic `attr$…`/`command$…`. */ withClusters(...clusters: ClusterModel[]): MatterModel; /** * Device types. */ get deviceTypes(): ModelIndex; /** * Semantic tag namespaces. */ get semanticNamespaces(): SemanticNamespaceModel[]; /** * Global datatypes. */ get datatypes(): ModelIndex; /** * Global fields. */ get fields(): ModelIndex; /** * Global attributes. */ get attributes(): ModelIndex; /** * Fabrics. */ get fabrics(): FabricModel[]; /** * All sub-cluster global elements from this model. * * This is the set of utility datatypes required by cluster definitions. * * The returned elements are clones as we use this to initialize empty models for testing or diagnostic purposes. */ get seedGlobals(): MatterModel.Child[]; /** * MatterModel always owns itself. */ get root(): this; /** * The set of "permanent" datatypes. * * These are datatypes owned by this model with the "isSeed" value set. For performance reasons we disallow * overriding these values. */ get permanentDatatypes(): Readonly>; /** * The resource pool for the node. */ get resources(): ResourceBundle | undefined; set resources(resources: ResourceBundle | undefined); constructor(definition?: MatterModel.Definition, ...children: Model.ChildDefinition[]); toElement(omitResources?: boolean, extra?: Record): MatterElement; static Tag: ElementTag; } export declare namespace MatterModel { type Child = ClusterModel | DeviceTypeModel | FieldModel | DatatypeModel | AttributeModel | FabricModel | SemanticNamespaceModel; type Definition = Omit, "name" | "children"> & { name?: string; children?: Model.ChildDefinition[]; }; } //# sourceMappingURL=MatterModel.d.ts.map