/** * @license * Copyright 2025-2026 Open Home Foundation * SPDX-License-Identifier: Apache-2.0 */ import type { MatterNode } from "@matter-server/ws-client"; import type { AccessControlEntryStruct } from "../components/dialogs/acl/model.js"; import { type BindingEntryStruct } from "../components/dialogs/binding/model.js"; export declare function readBindings(node: MatterNode, endpoint: number): BindingEntryStruct[]; export interface EndpointBinding { endpoint: number; binding: BindingEntryStruct; } export declare function readAllBindings(node: MatterNode): EndpointBinding[]; export declare function targetServerClusters(node: MatterNode, endpoint: number): number[]; export declare function sourceClientClusters(node: MatterNode, endpoint: number): number[]; export interface BindableClusters { bindable: number[]; otherTarget: number[]; } export declare function bindableClusters(source: MatterNode, sourceEndpoint: number, target: MatterNode, targetEndpoint: number): BindableClusters; export type ReverseAclState = "present" | "missing" | "overPrivileged" | "cannotVerify" | "self"; export interface ReverseAclResult { state: ReverseAclState; } /** * Whether the target node's ACL grants the source the access this binding needs: * - self: target is the source node itself — no ACL needed * - present: a matching CASE entry at Operate exists * - overPrivileged: the only matching grant is above Operate (Manage/Administer) * - missing: no matching grant (or only below Operate) * - cannotVerify: target node not known / offline */ export declare function reverseAclState(sourceNodeId: number | bigint, binding: BindingEntryStruct, targetNode: MatterNode | undefined): ReverseAclResult; export type RelationshipKind = "none" | "backs" | "overPrivileged"; export interface RelationshipResult { kind: RelationshipKind; sourceNodeId?: number | bigint; sourceEndpoint?: number; } /** * Whether an ACL entry on the viewed node backs a real binding from one of its subjects. Grants * above Operate are flagged over-privileged (Operate is sufficient for a binding). */ export declare function detectBindingRelationship(entry: AccessControlEntryStruct, viewedNodeId: number | bigint, allNodes: MatterNode[]): RelationshipResult; export interface AddBindingCapacity { canAdd: boolean; reason?: string; } /** * A new binding consumes a target ACL slot only when no existing our-fabric Operate+ entry for the * source can absorb it — mirrors the merge behavior the writer implements. */ export declare function targetAclCapacityForBinding(targetNode: MatterNode, sourceNodeId: number | bigint): AddBindingCapacity; //# sourceMappingURL=binding.d.ts.map