/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { DeviceTypeModel, MatterModel, RequirementModel } from "../../models/index.js"; import { ConditionAssertions } from "./ConditionAssertions.js"; import { type Component, type Singleton } from "./DeviceTypeConformance.js"; import type { DeviceTypeFacts } from "./DeviceTypeFacts.js"; import type { DeviceTypeScopeIndex } from "./DeviceTypeScopeIndex.js"; import type { DeviceTypeViolation } from "./DeviceTypeViolation.js"; import { Memo } from "./Memo.js"; import type { ReachingEndpoints } from "./ReachingEndpoints.js"; import { ResolvedEndpoint } from "./ResolvedEndpoint.js"; /** * One run of device type validation over endpoints that {@link facts} describes, resolved in {@link model}. * * The checks of a pass share what several endpoints read from the tree: the facts of each endpoint, the conditions of * each node scope and the composition facts of each composing endpoint. * * A pass must not outlive one synchronous run: the tree may change between runs, and nothing a pass keeps of it is * invalidated. Lookups that read only {@link model}, such as the cluster a requirement names, are shared by every pass * resolved in the same model instance, so mutating a model after it has validated an endpoint is unsupported. Build a * new model instead, e.g. with {@link MatterModel.withClusters}. * * @see {@link MatterSpecification.v161.Core} ยง 9.2 */ export declare class DeviceTypeValidationPass { readonly facts: DeviceTypeFacts; readonly model: MatterModel; /** @internal */ readonly index?: DeviceTypeScopeIndex; /** @internal */ readonly resolved: Memo>; /** @internal */ readonly collections: Memo>; /** @internal */ readonly reaching: Memo>; /** @internal */ readonly applicationDeviceTypeCounts: Memo>; /** @internal */ readonly components: Memo>; /** @internal */ readonly failures: Memo>; /** @internal */ readonly singletons: Memo>>; /** @internal */ readonly declarations: Memo>>; /** * @param index internal to matter.js */ constructor(facts: DeviceTypeFacts, model?: MatterModel, index?: DeviceTypeScopeIndex); /** * The closest endpoint at or above {@link endpoint} whose device type is classified as a node. * * @internal */ nodeEndpointOf(endpoint: E): E | undefined; /** * The node endpoint {@link nodeEndpoint} and its descendants, without a node endpoint below it and its subtree. * * @internal */ nodeScopeOf(nodeEndpoint: E): E[]; /** * The parts of {@link endpoint} that are {@link DeviceTypeFacts.isPresent present}. * * @internal */ childrenOf(endpoint: E): E[]; /** * @internal */ isNodeEndpoint(endpoint: E): boolean; /** * Whether the Base `Duplicate` condition holds for {@link endpoint}. * * @internal */ isDuplicate(endpoint: E): boolean; /** * Whether a device type of {@link endpoint} states a condition requirement located at the node endpoint. * * @internal */ assertsOnNodeEndpoint(endpoint: E): boolean; /** * How far beyond its own subtree, its ancestors and its siblings the facts of {@link endpoint} enter the judgement * of other endpoints of its node scope. * * @internal */ reachOf(endpoint: E): DeviceTypeValidationPass.Reach; /** * The endpoints of the node scope of {@link nodeEndpoint} whose {@link reachOf reach} is not `None`, in tree order, * and the node endpoints below it that bound the scope. * * @internal */ scanReaching(nodeEndpoint: E): { reaching: E[]; boundaries: E[]; }; /** * Whether {@link endpoint} is in the node scope of {@link nodeEndpoint}, as {@link nodeScopeOf} lists it. * * @internal */ isInScope(endpoint: E, nodeEndpoint: E): boolean; /** * The endpoints other than {@link nodeEndpoint} whose verdict can depend on the conditions of * {@link nodeEndpoint}. * * @internal */ nodeConditionReadersOf(nodeEndpoint: E): E[]; /** * Whether {@link endpoint} may be one of the {@link nodeConditionReadersOf condition readers} of * {@link nodeEndpoint}. * * @internal */ mayReadNodeConditions(endpoint: E, nodeEndpoint: E): boolean; /** * The conditions true for {@link nodeEndpoint}, a node endpoint. * * @internal */ nodeEndpointConditionsOf(nodeEndpoint: E): ReadonlySet; } export declare namespace DeviceTypeValidationPass { /** * How far beyond its own subtree, its ancestors and its siblings an endpoint's facts enter the judgement of other * endpoints of its node scope. Ordered, so the wider of two is the greater. * * @internal */ enum Reach { None = 0, /** * The node endpoint and its condition readers, through a condition the endpoint asserts on the node endpoint. */ NodeEndpoint = 1, /** * Every endpoint of the node scope, through a network interface or a singleton declaration. */ NodeScope = 2 } } //# sourceMappingURL=DeviceTypeValidationPass.d.ts.map