import { Capability } from "../device/Capability.js"; import type { CapabilityJson } from "../device/Capability.js"; import type { Label, Semantics } from "../registry/types.js"; import type { ActionMapping } from "./ActionMapping.js"; import type { AlexaInterfaceType } from "./enums.js"; /** One ModeController mode as discovery lists it (configuration.supportedModes): the value plus its friendly names. */ export interface SupportedMode { value: string; modeResources?: { friendlyNames: Array<{ "@type": string; value: { text?: string; locale?: string; assetId?: string; }; }>; }; } interface Options { semantics?: Semantics; supportedModes?: Array<{ value: string; friendlyNames: Label[]; }>; ordered?: boolean; } /** * A capability as 1.x declares it: device.addCapability(type, options), then the add and set methods below. It is a * Capability, so what the methods set reaches discovery the same way as the options of device.add(). Nothing is * refused here except an interface name the registry does not have: what Alexa would reject is logged by the bridge * when it answers a discovery. */ export declare class AlexaInterface extends Capability { constructor(type: AlexaInterfaceType | string, retrievable?: boolean, proactivelyReported?: boolean, instance?: string); /** The namespace of the interface, which is the value of its AlexaInterfaceType member. */ get type(): AlexaInterfaceType; addActionMapping(mapping: ActionMapping): void; addFriendlyName(name: string, locale: string): void; /** * The modes of a ModeController, as { value, modeResources } objects. A mode given as a string is announced as * { value } and noted: Alexa wants friendly names for it. ordered is true unless options.ordered says otherwise, * as 1.x announced every mode list; with device.add() the default is false. */ addSupportedModes(modes: Array, options?: { ordered?: boolean; }): void; setInstance(name: string): void; getType(): AlexaInterfaceType; /** @deprecated The same as getType(). */ getTypeString(): string; /** @deprecated Read descriptor.version. */ getVersion(): string; /** @deprecated The properties discovery lists: read properties.supported of toJSON(). */ getProps(): string[]; getJSON(): CapabilityJson; toJSON(): CapabilityJson; } export {};