/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { MaybePromise, Observable, Timer } from "@matter/general"; import { Identify } from "@matter/types/clusters/identify"; import { IdentifyBehavior } from "./IdentifyBehavior.js"; /** * This is the default server implementation of {@link IdentifyBehavior}. * * This implementation includes all features of {@link Identify.Cluster} and implements all mandatory commands. You should use * {@link IdentifyServer.with} to specialize the class for the features your implementation supports. Alternatively * you can extend this class and override the methods you need to change or add mandatory commands. * * Beside the standard state values the following additional state values are available: * * `isIdentifying` - Indicates if the device is currently identifying. * * Beside the standard events the following additional events are available: * * `startIdentifying` - Emitted when the device starts identifying. Use it to start your own identifying logic. This is mandatory. * * `stopIdentifying` - Emitted when the device stops identifying. This is mandatory. * * `effectTriggered` - Emitted when an effect should be triggered. Use it to trigger the effect. Depending on the device type this is mandatory! * * The following protected methods are available for override: * * `suppressTriggerEffect` - Decides whether the TriggerEffect command is supported by this endpoint. */ export declare class IdentifyServer extends IdentifyBehavior { #private; protected internal: IdentifyServer.Internal; readonly state: IdentifyServer.State; readonly events: IdentifyServer.Events; initialize(): MaybePromise; /** * Withdraw support for the optional TriggerEffect command. * * Support is retained when {@link triggerEffect} is implemented rather than inherited, or when the schema * declares the command supported. The latter covers device types that require the command, such as lights and * plug-in units, as well as `IdentifyServer.alter({ commands: { triggerEffect: { optional: false } } })` and * `IdentifyServer.enable({ commands: { triggerEffect: true } })`. * * Override with an empty implementation to offer the command in any other case. Note that an override on a * type derived via `alter()`, `enable()` or `with()` must be public, as {@link IdentifyServer.ExtensionInterface} * exposes this method publicly to such types. * * Withdrawal applies to the Matter view of the endpoint. Local invocation via the agent still runs * {@link triggerEffect}. */ protected suppressTriggerEffect(): void; [Symbol.asyncDispose](): Promise; identify({ identifyTime }: Identify.IdentifyRequest): MaybePromise; triggerEffect(effect: Identify.TriggerEffectRequest): MaybePromise; } export declare namespace IdentifyServer { class Internal { identifyTimer?: Timer; } class State extends IdentifyBehavior.State { isIdentifying: boolean; } class Events extends IdentifyBehavior.Events { startIdentifying: Observable; stopIdentifying: Observable; effectTriggered: Observable<[effect: Identify.TriggerEffectRequest], void>; } const ExtensionInterface: { suppressTriggerEffect(): void; }; } //# sourceMappingURL=IdentifyServer.d.ts.map