/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { AtLeastOne, Diagnostic } from "@matter/general";
import { Behavior, Endpoint as ClientEndpoint } from "@matter/node";
import { ClusterClientObj, Val } from "@matter/protocol";
import { ClusterId, ClusterType, DeviceTypeId, EndpointNumber } from "@matter/types";
import { DeviceTypeDefinition } from "./DeviceTypes.js";
export interface EndpointOptions {
    endpointId?: EndpointNumber;
    uniqueStorageKey?: string;
}
export declare class Endpoint {
    #private;
    [Diagnostic.value]: unknown[];
    protected deviceTypes: AtLeastOne<DeviceTypeDefinition>;
    private readonly clusterClients;
    private readonly childEndpoints;
    number: EndpointNumber | undefined;
    uniqueStorageKey: string | undefined;
    name: string;
    private structureChangedCallback;
    /**
     * Create a new Endpoint instance.
     *
     * @param endpoint The ClientEndpoint this Endpoint represents
     * @param deviceTypes One or multiple DeviceTypeDefinitions of the endpoint
     * @param options Options for the endpoint
     */
    constructor(endpoint: ClientEndpoint, deviceTypes: AtLeastOne<DeviceTypeDefinition>, options?: EndpointOptions);
    /**
     * Access to cached cluster state values using endpoint.state.clusterNameOrId.attributeNameOrId
     * Returns immutable cached attribute values from cluster clients
     */
    get state(): {
        readonly descriptor: {
            readonly deviceTypeList: readonly {
                readonly deviceType: DeviceTypeId;
                readonly revision: number;
            }[];
            readonly serverList: readonly ClusterId[];
            readonly clientList: readonly ClusterId[];
            readonly partsList: readonly EndpointNumber[];
            readonly endpointUniqueId?: string | undefined;
        };
    };
    /**
     * Access to cluster commands using endpoint.commands.clusterNameOrId.commandName
     * Returns async functions that can be called to invoke commands on cluster clients
     */
    get commands(): import("@matter/node").Commands<import("@matter/node").EndpointType.Empty>;
    /**
     * Access to typed cached cluster state values
     * Returns immutable cached attribute values from cluster clients
     */
    stateOf<T extends Behavior.Type>(type: T): import("@matter/general").Immutable<InstanceType<T["State"]>>;
    maybeStateOf<T extends Behavior.Type>(type: T): import("@matter/general").Immutable<InstanceType<T["State"]>> | undefined;
    /**
     * Update state values for a single behavior.
     *
     * The patch semantics used here are identical to {@link set}.
     *
     * This is the recommended way to set state for a single behavior because it provides proper type checking and
     * enforces the correctness of the used Behavior type including all enabled features.
     *
     * @param type the {@link Behavior} to patch
     * @param values the values to change
     */
    setStateOf<T extends Behavior.Type>(type: T, values: Behavior.PatchStateOf<T>): Promise<void>;
    /**
     * Update state values for a single behavior ID.
     *
     * The patch semantics used here are identical to {@link set}.
     *
     * Be aware that using a string type does not provide type checking and does not enforce the correctness of the used
     * Behavior type including all enabled features. Expect runtime errors if the provided values are not compatible
     * with the actual Behavior type.
     *
     * @param type the {@link Behavior} to patch
     * @param values the values to change
     */
    setStateOf(type: string, values: Val.Struct): Promise<void>;
    /**
     * Access to typed cluster commands
     * Returns async functions that can be called to invoke commands on cluster clients
     */
    commandsOf<T extends Behavior.Type>(type: T): import("@matter/node").Commands.OfBehavior<T>;
    get behaviors(): import("@matter/node").Behaviors;
    get endpoint(): ClientEndpoint<import("@matter/node").EndpointType.Empty>;
    /** Get all child endpoints aka parts */
    get parts(): Map<number, Endpoint>;
    get deviceType(): DeviceTypeId;
    setStructureChangedCallback(callback: () => void): void;
    removeFromStructure(): void;
    close(): void;
    getNumber(): EndpointNumber;
    addClusterClient(cluster: ClusterClientObj): void;
    getClusterClient<const N extends ClusterType.Concrete>(cluster: N): ClusterClientObj<N["Typing"]> | undefined;
    getClusterClientById(clusterId: ClusterId): ClusterClientObj | undefined;
    hasClusterClient(cluster: ClusterType.Concrete): boolean;
    getDeviceTypes(): AtLeastOne<DeviceTypeDefinition>;
    setDeviceTypes(deviceTypes: AtLeastOne<DeviceTypeDefinition>): void;
    addChildEndpoint(endpoint: Endpoint): void;
    getChildEndpoint(id: EndpointNumber): Endpoint | undefined;
    getChildEndpoints(): Endpoint[];
    removeChildEndpoint(endpoint: Endpoint): void;
    determineUniqueID(): string | undefined;
    verifyRequiredClusters(): void;
    getAllClusterClients(): ClusterClientObj[];
}
//# sourceMappingURL=Endpoint.d.ts.map