/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import type { ElementTag } from "#common/ElementTag.js"; import type { FieldValue } from "#common/FieldValue.js"; import type { ClusterModel } from "#models/ClusterModel.js"; /** * Apply a declarative set of modifications to a {@link ClusterModel}. * * We use this to apply a limited set of modifications such as those expressed by device type requirements. We track * these modifications with individual fields because we use them to modify types in addition to the underlying model. */ export declare namespace ClusterModifier { /** * Apply the modifications defined by a device type. */ function applyRequirements(target: ClusterModel, modifications: ClusterModifier.RequirementModifications): ClusterModel; /** * Set {@link Model#isPresent} for the specified elements. */ function applyPresence(target: ClusterModel, modifications: ClusterModifier.PresenceModifications): ClusterModel; function apply(target: ClusterModel, modifications: ClusterModifier.ModificationSet, apply: (model: ClusterModel.Child, modification: T) => ClusterModel.Child | undefined): ClusterModel; } export declare namespace ClusterModifier { /** * Apply modifications as defined by device type requirements. */ interface RequirementModifications extends ModificationSet { } /** * Mark elements as active or inactive by default (if allowed by conformance). */ interface PresenceModifications extends ModificationSet { } interface RequirementModification { /** * If present, forces conformance to O or M. */ optional?: boolean; /** * Replaces the default for the element. */ default?: FieldValue; /** * Modifies the lower bound of the element's constraint. */ min?: FieldValue; /** * Modifies the upper bound of the element's constraint. */ max?: FieldValue; } /** * A set of element modifications keyed by tag and name */ interface ModificationSet extends Partial>> { } } //# sourceMappingURL=ClusterModifier.d.ts.map