/** * @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(options: T): EndpointType.For; export declare namespace EndpointType { const UNKNOWN_DEVICE_TYPE: DeviceTypeId; const UNKNOWN_DEVICE_REVISION = -1; /** * Is {@link value} shaped like an {@link EndpointType}? */ function is(value: unknown): value is EndpointType; /** * An endpoint type with no behaviors, client clusters, or requirements. */ interface Empty extends Omit { behaviors: {}; clientClusters: {}; requirements: {}; } /** * A fully typed {@link EndpointType} defined by {@link EndpointType.Options}. */ type For = { 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; }; } } //# sourceMappingURL=EndpointType.d.ts.map