/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { DeviceClassification } from "@matter/model";
import { DeviceTypeId } from "@matter/types";
import { SupportedBehaviors } from "../properties/SupportedBehaviors.js";
import { SupportedClientClusters } from "../properties/SupportedClientClusters.js";
/**
 * An EndpointType defines functionality for an endpoint.
 */
export interface EndpointType {
    name: string;
    deviceType: DeviceTypeId;
    deviceRevision: number;
    deviceClass: DeviceClassification;
    behaviors: SupportedBehaviors;
    clientClusters: SupportedClientClusters;
    requirements: EndpointType.Requirements;
}
/**
 * Define a new type of endpoint.
 */
export declare function EndpointType<const T extends EndpointType.Options>(options: T): EndpointType.For<T>;
export declare namespace EndpointType {
    const UNKNOWN_DEVICE_TYPE: DeviceTypeId;
    const UNKNOWN_DEVICE_REVISION = -1;
    /**
     * An endpoint type with no behaviors, client clusters, or requirements.
     */
    interface Empty extends Omit<EndpointType, "behaviors" | "clientClusters" | "requirements"> {
        behaviors: {};
        clientClusters: {};
        requirements: {};
    }
    /**
     * A fully typed {@link EndpointType} defined by {@link EndpointType.Options}.
     */
    type For<T extends EndpointType.Options> = {
        name: T["name"];
        deviceType: DeviceTypeId;
        deviceRevision: number;
        deviceClass: DeviceClassification;
        behaviors: T["behaviors"] extends SupportedBehaviors ? T["behaviors"] : {};
        clientClusters: T["clientClusters"] extends SupportedClientClusters ? T["clientClusters"] : {};
        requirements: T["requirements"] extends Requirements ? T["requirements"] : {};
    };
    /**
     * Endpoint configuration.
     */
    interface Options {
        name: string;
        deviceType: number;
        deviceRevision: number;
        deviceClass?: DeviceClassification;
        behaviors?: SupportedBehaviors;
        clientClusters?: SupportedClientClusters;
        requirements?: Requirements;
    }
    /**
     * Standard dependencies for an endpoint per the Matter specification.
     */
    interface Requirements {
        server?: {
            mandatory?: SupportedBehaviors;
            optional?: SupportedBehaviors;
        };
        client?: {
            mandatory?: SupportedBehaviors;
            optional?: SupportedBehaviors;
        };
        /**
         * Device type requirements for component device types (child endpoints) per the Matter specification.
         * These describe what device types must or may be present as child endpoints.
         *
         * TODO: support multiple instances of the same component device type.  The spec allows e.g.
         * BatteryStorage to require two ElectricalSensor endpoints (AC + DC) and two PowerSource endpoints
         * (Wired + Battery) each with different cluster/feature configurations.  Currently we deduplicate
         * to a single entry per device type.
         */
        deviceTypes?: {
            mandatory?: Record<string, {
                deviceType: number;
            }>;
            optional?: Record<string, {
                deviceType: number;
            }>;
        };
    }
}
//# sourceMappingURL=EndpointType.d.ts.map