registry: Speaker, StepSpeaker, EqualizerController, PlaybackController, PlaybackStateReporter, InputController, ChannelController
Seven descriptors written from their pages replace seven stubs. All are version 3; 1.5.2 announced Speaker, StepSpeaker, EqualizerController and PlaybackStateReporter as version 1, and all but ChannelController without a property. StepSpeaker has no properties object in discovery and PlaybackController one without fields, next to supportedOperations; a directive for an operation the device did not list is answered with INVALID_DIRECTIVE. The equalizer declares bands, modes or both under "configurations", a TV its inputs from the 61 names of the page. Not described: the lineup of ChannelController, whose discovery example the page folds away. The discovery examples of InputController spell one key "friendNames"; the fixtures have friendlyNames, as its table does. 62 examples of the six pages are saved as fixtures. 241 tests pass, 215 before. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
c59cf3ff10
commit
d7dfc5b122
113 changed files with 3948 additions and 47 deletions
11
dist/types/registry/index.d.ts
vendored
11
dist/types/registry/index.d.ts
vendored
|
|
@ -1,18 +1,25 @@
|
|||
import { Alexa } from "./interfaces/Alexa.js";
|
||||
import { BrightnessController } from "./interfaces/BrightnessController.js";
|
||||
import { ChannelController } from "./interfaces/ChannelController.js";
|
||||
import { ColorController } from "./interfaces/ColorController.js";
|
||||
import { ColorTemperatureController } from "./interfaces/ColorTemperatureController.js";
|
||||
import { ContactSensor } from "./interfaces/ContactSensor.js";
|
||||
import { EndpointHealth } from "./interfaces/EndpointHealth.js";
|
||||
import { EqualizerController } from "./interfaces/EqualizerController.js";
|
||||
import { HumiditySensor } from "./interfaces/HumiditySensor.js";
|
||||
import { InputController } from "./interfaces/InputController.js";
|
||||
import { LockController } from "./interfaces/LockController.js";
|
||||
import { ModeController } from "./interfaces/ModeController.js";
|
||||
import { MotionSensor } from "./interfaces/MotionSensor.js";
|
||||
import { PercentageController } from "./interfaces/PercentageController.js";
|
||||
import { PlaybackController } from "./interfaces/PlaybackController.js";
|
||||
import { PlaybackStateReporter } from "./interfaces/PlaybackStateReporter.js";
|
||||
import { PowerController } from "./interfaces/PowerController.js";
|
||||
import { PowerLevelController } from "./interfaces/PowerLevelController.js";
|
||||
import { RangeController } from "./interfaces/RangeController.js";
|
||||
import { SecurityPanelController } from "./interfaces/SecurityPanelController.js";
|
||||
import { Speaker } from "./interfaces/Speaker.js";
|
||||
import { StepSpeaker } from "./interfaces/StepSpeaker.js";
|
||||
import { TemperatureSensor } from "./interfaces/TemperatureSensor.js";
|
||||
import { ThermostatController } from "./interfaces/ThermostatController.js";
|
||||
import { ThermostatControllerSchedule } from "./interfaces/ThermostatControllerSchedule.js";
|
||||
|
|
@ -26,7 +33,9 @@ export declare const registry: {
|
|||
/** Every descriptor, ordered by namespace. */
|
||||
list(): AnyDescriptor[];
|
||||
};
|
||||
export { Alexa, BrightnessController, ColorController, ColorTemperatureController, ContactSensor, EndpointHealth, HumiditySensor, LockController, ModeController, MotionSensor, PercentageController, PowerController, PowerLevelController, RangeController, SecurityPanelController, TemperatureSensor, ThermostatController, ThermostatControllerSchedule, ToggleController, };
|
||||
export { Alexa, BrightnessController, ChannelController, ColorController, ColorTemperatureController, ContactSensor, EndpointHealth, EqualizerController, HumiditySensor, InputController, LockController, ModeController, MotionSensor, PercentageController, PlaybackController, PlaybackStateReporter, PowerController, PowerLevelController, RangeController, SecurityPanelController, Speaker, StepSpeaker, TemperatureSensor, ThermostatController, ThermostatControllerSchedule, ToggleController, };
|
||||
export { INPUTS } from "./interfaces/InputController.js";
|
||||
export type { InputName } from "./interfaces/InputController.js";
|
||||
export type { Mode } from "./interfaces/ModeController.js";
|
||||
export { THERMOSTAT_MODES } from "./interfaces/ThermostatController.js";
|
||||
export type { ThermostatModeName } from "./interfaces/ThermostatController.js";
|
||||
|
|
|
|||
41
dist/types/registry/interfaces/ChannelController.d.ts
vendored
Normal file
41
dist/types/registry/interfaces/ChannelController.d.ts
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/**
|
||||
* The channel of a TV. ChangeChannel names the channel by one or more of number, callSign, affiliateCallSign and
|
||||
* uri, or by channelMetadata.name alone. The lineup of a TV provider is not described: the page folds the discovery
|
||||
* example that has one.
|
||||
*/
|
||||
export declare const ChannelController: import("../types.js").InterfaceDescriptor<{
|
||||
channel: {
|
||||
name: string;
|
||||
value: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
||||
/** "256", "13.1" */
|
||||
number: import("../schema.js").OptionalSchema<string>;
|
||||
callSign: import("../schema.js").OptionalSchema<string>;
|
||||
affiliateCallSign: import("../schema.js").OptionalSchema<string>;
|
||||
uri: import("../schema.js").OptionalSchema<string>;
|
||||
}>>;
|
||||
};
|
||||
}, {
|
||||
ChangeChannel: {
|
||||
name: string;
|
||||
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
||||
channel: import("../schema.js").OptionalSchema<import("../schema.js").InferShape<{
|
||||
/** "256", "13.1" */
|
||||
number: import("../schema.js").OptionalSchema<string>;
|
||||
callSign: import("../schema.js").OptionalSchema<string>;
|
||||
affiliateCallSign: import("../schema.js").OptionalSchema<string>;
|
||||
uri: import("../schema.js").OptionalSchema<string>;
|
||||
}>>;
|
||||
channelMetadata: import("../schema.js").OptionalSchema<import("../schema.js").InferShape<{
|
||||
name: import("../schema.js").OptionalSchema<string>;
|
||||
image: import("../schema.js").OptionalSchema<string>;
|
||||
}>>;
|
||||
}>>;
|
||||
};
|
||||
SkipChannels: {
|
||||
name: string;
|
||||
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
||||
channelCount: import("../schema.js").Schema<number>;
|
||||
}>>;
|
||||
note: string;
|
||||
};
|
||||
}, {}, false>;
|
||||
63
dist/types/registry/interfaces/EqualizerController.d.ts
vendored
Normal file
63
dist/types/registry/interfaces/EqualizerController.d.ts
vendored
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/**
|
||||
* The bands of an equalizer, its modes, or both. Discovery lists bands for a device declared with bands and mode
|
||||
* for one declared with modes. A band or a mode the device does not have is answered with INVALID_VALUE.
|
||||
*/
|
||||
export declare const EqualizerController: import("../types.js").InterfaceDescriptor<{
|
||||
bands: {
|
||||
name: string;
|
||||
value: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
||||
name: import("../schema.js").EnumSchema<"BASS" | "MIDRANGE" | "TREBLE">;
|
||||
value: import("../schema.js").Schema<number>;
|
||||
}>[]>;
|
||||
};
|
||||
mode: {
|
||||
name: string;
|
||||
value: import("../schema.js").EnumSchema<"TV" | "MOVIE" | "MUSIC" | "NIGHT" | "SPORT">;
|
||||
};
|
||||
}, {
|
||||
SetMode: {
|
||||
name: string;
|
||||
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
||||
mode: import("../schema.js").EnumSchema<"TV" | "MOVIE" | "MUSIC" | "NIGHT" | "SPORT">;
|
||||
}>>;
|
||||
};
|
||||
SetBands: {
|
||||
name: string;
|
||||
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
||||
bands: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
||||
name: import("../schema.js").EnumSchema<"BASS" | "MIDRANGE" | "TREBLE">;
|
||||
value: import("../schema.js").Schema<number>;
|
||||
}>[]>;
|
||||
}>>;
|
||||
};
|
||||
AdjustBands: {
|
||||
name: string;
|
||||
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
||||
bands: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
||||
name: import("../schema.js").EnumSchema<"BASS" | "MIDRANGE" | "TREBLE">;
|
||||
levelDelta: import("../schema.js").OptionalSchema<number>;
|
||||
levelDirection: import("../schema.js").EnumSchema<"UP" | "DOWN">;
|
||||
}>[]>;
|
||||
}>>;
|
||||
note: string;
|
||||
};
|
||||
ResetBands: {
|
||||
name: string;
|
||||
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
||||
bands: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
||||
name: import("../schema.js").EnumSchema<"BASS" | "MIDRANGE" | "TREBLE">;
|
||||
}>[]>;
|
||||
}>>;
|
||||
};
|
||||
}, import("../schema.js").InferShape<{
|
||||
/** The bands of the device and the levels they take. Left out for a device that has modes only. */
|
||||
bands: import("../schema.js").OptionalSchema<import("../schema.js").InferShape<{
|
||||
supported: import("../schema.js").Schema<("BASS" | "MIDRANGE" | "TREBLE")[]>;
|
||||
range: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
||||
minimum: import("../schema.js").Schema<number>;
|
||||
maximum: import("../schema.js").Schema<number>;
|
||||
}>>;
|
||||
}>>;
|
||||
/** Left out for a device that has bands only. */
|
||||
modes: import("../schema.js").OptionalSchema<("TV" | "MOVIE" | "MUSIC" | "NIGHT" | "SPORT")[]>;
|
||||
}>, false>;
|
||||
26
dist/types/registry/interfaces/InputController.d.ts
vendored
Normal file
26
dist/types/registry/interfaces/InputController.d.ts
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/** alexa-inputcontroller.html, "Input property values". */
|
||||
export declare const INPUTS: readonly ["AUX 1", "AUX 2", "AUX 3", "AUX 4", "AUX 5", "AUX 6", "AUX 7", "BLURAY", "CABLE", "CD", "COAX 1", "COAX 2", "COMPOSITE 1", "DVD", "GAME", "HD RADIO", "HDMI 1", "HDMI 2", "HDMI 3", "HDMI 4", "HDMI 5", "HDMI 6", "HDMI 7", "HDMI 8", "HDMI 9", "HDMI 10", "HDMI ARC", "INPUT 1", "INPUT 2", "INPUT 3", "INPUT 4", "INPUT 5", "INPUT 6", "INPUT 7", "INPUT 8", "INPUT 9", "INPUT 10", "IPOD", "LINE 1", "LINE 2", "LINE 3", "LINE 4", "LINE 5", "LINE 6", "LINE 7", "MEDIA PLAYER", "OPTICAL 1", "OPTICAL 2", "PHONO", "PLAYSTATION", "PLAYSTATION 3", "PLAYSTATION 4", "SATELLITE", "SMARTCAST", "TUNER", "TV", "USB DAC", "VIDEO 1", "VIDEO 2", "VIDEO 3", "XBOX"];
|
||||
export type InputName = (typeof INPUTS)[number];
|
||||
/**
|
||||
* The input a TV or a receiver shows. The inputs of the device are on the capability itself, as the discovery
|
||||
* example of the page has them; its table calls them a configuration object.
|
||||
*/
|
||||
export declare const InputController: import("../types.js").InterfaceDescriptor<{
|
||||
input: {
|
||||
name: string;
|
||||
value: import("../schema.js").EnumSchema<"TV" | "AUX 1" | "AUX 2" | "AUX 3" | "AUX 4" | "AUX 5" | "AUX 6" | "AUX 7" | "BLURAY" | "CABLE" | "CD" | "COAX 1" | "COAX 2" | "COMPOSITE 1" | "DVD" | "GAME" | "HD RADIO" | "HDMI 1" | "HDMI 2" | "HDMI 3" | "HDMI 4" | "HDMI 5" | "HDMI 6" | "HDMI 7" | "HDMI 8" | "HDMI 9" | "HDMI 10" | "HDMI ARC" | "INPUT 1" | "INPUT 2" | "INPUT 3" | "INPUT 4" | "INPUT 5" | "INPUT 6" | "INPUT 7" | "INPUT 8" | "INPUT 9" | "INPUT 10" | "IPOD" | "LINE 1" | "LINE 2" | "LINE 3" | "LINE 4" | "LINE 5" | "LINE 6" | "LINE 7" | "MEDIA PLAYER" | "OPTICAL 1" | "OPTICAL 2" | "PHONO" | "PLAYSTATION" | "PLAYSTATION 3" | "PLAYSTATION 4" | "SATELLITE" | "SMARTCAST" | "TUNER" | "USB DAC" | "VIDEO 1" | "VIDEO 2" | "VIDEO 3" | "XBOX">;
|
||||
};
|
||||
}, {
|
||||
SelectInput: {
|
||||
name: string;
|
||||
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
||||
input: import("../schema.js").EnumSchema<"TV" | "AUX 1" | "AUX 2" | "AUX 3" | "AUX 4" | "AUX 5" | "AUX 6" | "AUX 7" | "BLURAY" | "CABLE" | "CD" | "COAX 1" | "COAX 2" | "COMPOSITE 1" | "DVD" | "GAME" | "HD RADIO" | "HDMI 1" | "HDMI 2" | "HDMI 3" | "HDMI 4" | "HDMI 5" | "HDMI 6" | "HDMI 7" | "HDMI 8" | "HDMI 9" | "HDMI 10" | "HDMI ARC" | "INPUT 1" | "INPUT 2" | "INPUT 3" | "INPUT 4" | "INPUT 5" | "INPUT 6" | "INPUT 7" | "INPUT 8" | "INPUT 9" | "INPUT 10" | "IPOD" | "LINE 1" | "LINE 2" | "LINE 3" | "LINE 4" | "LINE 5" | "LINE 6" | "LINE 7" | "MEDIA PLAYER" | "OPTICAL 1" | "OPTICAL 2" | "PHONO" | "PLAYSTATION" | "PLAYSTATION 3" | "PLAYSTATION 4" | "SATELLITE" | "SMARTCAST" | "TUNER" | "USB DAC" | "VIDEO 1" | "VIDEO 2" | "VIDEO 3" | "XBOX">;
|
||||
}>>;
|
||||
};
|
||||
}, import("../schema.js").InferShape<{
|
||||
/** friendlyNames: what the user calls the input, "Cable" for HDMI 2. */
|
||||
inputs: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
||||
name: import("../schema.js").EnumSchema<"TV" | "AUX 1" | "AUX 2" | "AUX 3" | "AUX 4" | "AUX 5" | "AUX 6" | "AUX 7" | "BLURAY" | "CABLE" | "CD" | "COAX 1" | "COAX 2" | "COMPOSITE 1" | "DVD" | "GAME" | "HD RADIO" | "HDMI 1" | "HDMI 2" | "HDMI 3" | "HDMI 4" | "HDMI 5" | "HDMI 6" | "HDMI 7" | "HDMI 8" | "HDMI 9" | "HDMI 10" | "HDMI ARC" | "INPUT 1" | "INPUT 2" | "INPUT 3" | "INPUT 4" | "INPUT 5" | "INPUT 6" | "INPUT 7" | "INPUT 8" | "INPUT 9" | "INPUT 10" | "IPOD" | "LINE 1" | "LINE 2" | "LINE 3" | "LINE 4" | "LINE 5" | "LINE 6" | "LINE 7" | "MEDIA PLAYER" | "OPTICAL 1" | "OPTICAL 2" | "PHONO" | "PLAYSTATION" | "PLAYSTATION 3" | "PLAYSTATION 4" | "SATELLITE" | "SMARTCAST" | "TUNER" | "USB DAC" | "VIDEO 1" | "VIDEO 2" | "VIDEO 3" | "XBOX">;
|
||||
friendlyNames: import("../schema.js").OptionalSchema<string[]>;
|
||||
}>[]>;
|
||||
}>, false>;
|
||||
57
dist/types/registry/interfaces/PlaybackController.d.ts
vendored
Normal file
57
dist/types/registry/interfaces/PlaybackController.d.ts
vendored
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
import type { Declared } from "../types.js";
|
||||
declare const OPERATIONS: readonly ["Play", "Pause", "Stop", "Next", "Previous", "FastForward", "Rewind", "StartOver"];
|
||||
type Operation = (typeof OPERATIONS)[number];
|
||||
interface Options {
|
||||
supportedOperations?: Operation[];
|
||||
}
|
||||
/**
|
||||
* Play, pause and the other buttons of a player. The interface reports nothing: what plays is the playbackState of
|
||||
* Alexa.PlaybackStateReporter, which a Response to these directives has in its context. Errors of a video device go
|
||||
* under Alexa.Video, the others under Alexa.
|
||||
*/
|
||||
export declare const PlaybackController: import("../types.js").InterfaceDescriptor<{}, {
|
||||
Play: {
|
||||
name: "Play";
|
||||
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{}>>;
|
||||
when: ({ options }: Declared<Options>) => boolean;
|
||||
};
|
||||
Pause: {
|
||||
name: "Pause";
|
||||
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{}>>;
|
||||
when: ({ options }: Declared<Options>) => boolean;
|
||||
};
|
||||
Stop: {
|
||||
name: "Stop";
|
||||
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{}>>;
|
||||
when: ({ options }: Declared<Options>) => boolean;
|
||||
};
|
||||
Next: {
|
||||
name: "Next";
|
||||
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{}>>;
|
||||
when: ({ options }: Declared<Options>) => boolean;
|
||||
};
|
||||
Previous: {
|
||||
name: "Previous";
|
||||
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{}>>;
|
||||
when: ({ options }: Declared<Options>) => boolean;
|
||||
};
|
||||
FastForward: {
|
||||
name: "FastForward";
|
||||
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{}>>;
|
||||
when: ({ options }: Declared<Options>) => boolean;
|
||||
};
|
||||
Rewind: {
|
||||
name: "Rewind";
|
||||
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{}>>;
|
||||
when: ({ options }: Declared<Options>) => boolean;
|
||||
};
|
||||
StartOver: {
|
||||
name: "StartOver";
|
||||
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{}>>;
|
||||
when: ({ options }: Declared<Options>) => boolean;
|
||||
};
|
||||
}, import("../schema.js").InferShape<{
|
||||
/** Default: all eight. */
|
||||
supportedOperations: import("../schema.js").OptionalSchema<("Play" | "Pause" | "Stop" | "Next" | "Previous" | "FastForward" | "Rewind" | "StartOver")[]>;
|
||||
}>, false>;
|
||||
export {};
|
||||
9
dist/types/registry/interfaces/PlaybackStateReporter.d.ts
vendored
Normal file
9
dist/types/registry/interfaces/PlaybackStateReporter.d.ts
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/** What a player is doing, for an endpoint with Alexa.PlaybackController. Documented on the page of that interface. */
|
||||
export declare const PlaybackStateReporter: import("../types.js").InterfaceDescriptor<{
|
||||
playbackState: {
|
||||
name: string;
|
||||
value: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
||||
state: import("../schema.js").EnumSchema<"PLAYING" | "PAUSED" | "STOPPED">;
|
||||
}>>;
|
||||
};
|
||||
}, {}, {}, false>;
|
||||
32
dist/types/registry/interfaces/Speaker.d.ts
vendored
Normal file
32
dist/types/registry/interfaces/Speaker.d.ts
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/** A speaker that can be set to a volume from 0 to 100. One that only takes steps is an Alexa.StepSpeaker. */
|
||||
export declare const Speaker: import("../types.js").InterfaceDescriptor<{
|
||||
volume: {
|
||||
name: string;
|
||||
value: import("../schema.js").Schema<number>;
|
||||
};
|
||||
muted: {
|
||||
name: string;
|
||||
value: import("../schema.js").Schema<boolean>;
|
||||
};
|
||||
}, {
|
||||
SetVolume: {
|
||||
name: string;
|
||||
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
||||
volume: import("../schema.js").Schema<number>;
|
||||
}>>;
|
||||
};
|
||||
AdjustVolume: {
|
||||
name: string;
|
||||
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
||||
volume: import("../schema.js").Schema<number>;
|
||||
volumeDefault: import("../schema.js").Schema<boolean>;
|
||||
}>>;
|
||||
note: string;
|
||||
};
|
||||
SetMute: {
|
||||
name: string;
|
||||
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
||||
mute: import("../schema.js").Schema<boolean>;
|
||||
}>>;
|
||||
};
|
||||
}, {}, false>;
|
||||
19
dist/types/registry/interfaces/StepSpeaker.d.ts
vendored
Normal file
19
dist/types/registry/interfaces/StepSpeaker.d.ts
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* A speaker that is turned up and down by steps and does not know its volume. It reports nothing: the capability
|
||||
* has no properties object in discovery.
|
||||
*/
|
||||
export declare const StepSpeaker: import("../types.js").InterfaceDescriptor<{}, {
|
||||
AdjustVolume: {
|
||||
name: string;
|
||||
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
||||
volumeSteps: import("../schema.js").Schema<number>;
|
||||
}>>;
|
||||
note: string;
|
||||
};
|
||||
SetMute: {
|
||||
name: string;
|
||||
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
||||
mute: import("../schema.js").Schema<boolean>;
|
||||
}>>;
|
||||
};
|
||||
}, {}, false>;
|
||||
Loading…
Add table
Add a link
Reference in a new issue