Six descriptors written from their pages replace the last stubs of tiers 1 and 2. A scene answers Activate and Deactivate through ctx.respond() with ActivationStarted and DeactivationStarted, the time and the cause filled in. device.raise(descriptor, name, payload) publishes DoorbellPress and the Event of a button on <root>/event with the endpoint and a new messageId; it throws a MessageError for an interface or instance the device did not declare, an event that answers a directive, a payload that does not fit and a message over 16000 bytes. TurnOn of a device with WakeOnLANController is deferred without the warning. On the wire: a doorbell has no properties object and proactivelyReported on the capability; SimpleEventSource is version 1.0, InventoryLevelSensor and WakeOnLANController version 3 (1.5.2: 1). A scene declared without options is announced as before. Alex2MQTT has no topic yet for the WakeUp event. 24 examples of the six pages are saved as fixtures. 267 tests pass, 241 before. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
46 lines
6.5 KiB
TypeScript
46 lines
6.5 KiB
TypeScript
/**
|
|
* The asset ids a friendly name can refer to: 103, the units of measure among them
|
|
* (resources-and-assets.html, "Global Alexa catalog").
|
|
*/
|
|
export declare const ASSETS: readonly ["Alexa.Actions.Charge", "Alexa.Actions.Clean", "Alexa.Actions.Dispense", "Alexa.Actions.Dock", "Alexa.Actions.Empty", "Alexa.Actions.Mop", "Alexa.Actions.Skip", "Alexa.Actions.Sweep", "Alexa.Actions.Vacuum", "Alexa.Button.OffButton", "Alexa.Button.OnButton", "Alexa.Button.BrightenButton", "Alexa.Button.DimButton", "Alexa.Button.MainButton", "Alexa.Button.TopButton", "Alexa.Button.BottomButton", "Alexa.Button.CenterButton", "Alexa.Button.MiddleButton", "Alexa.Button.UpButton", "Alexa.Button.DownButton", "Alexa.Button.LeftButton", "Alexa.Button.RightButton", "Alexa.Button.FirstButton", "Alexa.Button.SecondButton", "Alexa.Button.ThirdButton", "Alexa.Button.FourthButton", "Alexa.Button.FifthButton", "Alexa.Button.SixthButton", "Alexa.Button.SeventhButton", "Alexa.Button.EighthButton", "Alexa.Button.DoublePress", "Alexa.Button.DoublePush", "Alexa.Button.LongPress", "Alexa.Button.LongPush", "Alexa.Button.SinglePress", "Alexa.Button.SinglePush", "Alexa.DeviceName.AirPurifier", "Alexa.DeviceName.Camera", "Alexa.DeviceName.Fan", "Alexa.DeviceName.Router", "Alexa.DeviceName.Shade", "Alexa.DeviceName.Shower", "Alexa.DeviceName.SpaceHeater", "Alexa.DeviceName.Washer", "Alexa.Gesture.DoubleClick", "Alexa.Gesture.SingleClick", "Alexa.Gesture.SwipeDown", "Alexa.Gesture.SwipeLeft", "Alexa.Gesture.SwipeRight", "Alexa.Gesture.SwipeUp", "Alexa.Gesture.Tap", "Alexa.Gestures.DoubleTap", "Alexa.Setting.2GGuestWiFi", "Alexa.Setting.5GGuestWiFi", "Alexa.Setting.Auto", "Alexa.Setting.Direction", "Alexa.Setting.DryCycle", "Alexa.Setting.FanSpeed", "Alexa.Setting.GuestWiFi", "Alexa.Setting.Heat", "Alexa.Setting.Mode", "Alexa.Setting.Night", "Alexa.Setting.Opening", "Alexa.Setting.Oscillate", "Alexa.Setting.Preset", "Alexa.Setting.Quiet", "Alexa.Setting.Temperature", "Alexa.Setting.WashCycle", "Alexa.Setting.WaterTemperature", "Alexa.Shower.HandHeld", "Alexa.Shower.RainHead", "Alexa.Unit.Angle.Degrees", "Alexa.Unit.Angle.Radians", "Alexa.Unit.Distance.Feet", "Alexa.Unit.Distance.Inches", "Alexa.Unit.Distance.Kilometers", "Alexa.Unit.Distance.Meters", "Alexa.Unit.Distance.Miles", "Alexa.Unit.Distance.Yards", "Alexa.Unit.Mass.Grams", "Alexa.Unit.Mass.Kilograms", "Alexa.Unit.Percent", "Alexa.Unit.Temperature.Celsius", "Alexa.Unit.Temperature.Degrees", "Alexa.Unit.Temperature.Fahrenheit", "Alexa.Unit.Temperature.Kelvin", "Alexa.Unit.Volume.CubicFeet", "Alexa.Unit.Volume.CubicMeters", "Alexa.Unit.Volume.Gallons", "Alexa.Unit.Volume.Liters", "Alexa.Unit.Volume.Pints", "Alexa.Unit.Volume.Quarts", "Alexa.Unit.Weight.Ounces", "Alexa.Unit.Weight.Pounds", "Alexa.Value.Close", "Alexa.Value.Delicate", "Alexa.Value.High", "Alexa.Value.Low", "Alexa.Value.Maximum", "Alexa.Value.Medium", "Alexa.Value.Minimum", "Alexa.Value.Open", "Alexa.Value.QuickWash"];
|
|
export type AssetId = (typeof ASSETS)[number];
|
|
/** A unit of measure: the 23 Alexa.Unit.* assets, what a RangeController's unitOfMeasure takes. */
|
|
export type UnitOfMeasure = Extract<AssetId, `Alexa.Unit.${string}`>;
|
|
export declare const UNITS_OF_MEASURE: UnitOfMeasure[];
|
|
/** The phrases an action mapping gives to a directive (alexa-discovery-objects.html, "ActionMappings object"). */
|
|
export declare const ACTIONS: readonly ["Alexa.Actions.Open", "Alexa.Actions.Close", "Alexa.Actions.Raise", "Alexa.Actions.Lower", "Alexa.Actions.SetEcoOn", "Alexa.Actions.SetEcoOff"];
|
|
export type ActionId = (typeof ACTIONS)[number];
|
|
/** The states a state mapping gives to a property value (alexa-discovery-objects.html, "StateMappings object"). */
|
|
export declare const STATES: readonly ["Alexa.States.Open", "Alexa.States.Closed", "Alexa.States.EcoOn", "Alexa.States.EcoOff", "Alexa.States.Low", "Alexa.States.Empty", "Alexa.States.Full", "Alexa.States.Done", "Alexa.States.Stuck"];
|
|
export type StateId = (typeof STATES)[number];
|
|
/**
|
|
* The 56 display categories (alexa-discovery.html, "Display categories"). The DisplayCategory enum also keeps
|
|
* VEHICLE from 1.x, which the page no longer lists.
|
|
*/
|
|
export declare const DISPLAY_CATEGORIES: readonly ["ACTIVITY_TRIGGER", "AIR_CONDITIONER", "AIR_FRESHENER", "AIR_PURIFIER", "AIR_QUALITY_MONITOR", "ALEXA_VOICE_ENABLED", "AUTO_ACCESSORY", "BLUETOOTH_SPEAKER", "CAMERA", "CHRISTMAS_TREE", "COFFEE_MAKER", "COMPUTER", "CONTACT_SENSOR", "DISHWASHER", "DOOR", "DOORBELL", "DRYER", "EXTERIOR_BLIND", "FAN", "GAME_CONSOLE", "GARAGE_DOOR", "HEADPHONES", "HUB", "INTERIOR_BLIND", "LAPTOP", "LIGHT", "MICROWAVE", "MOBILE_PHONE", "MOTION_SENSOR", "MUSIC_SYSTEM", "NETWORK_HARDWARE", "OTHER", "OVEN", "PHONE", "PRINTER", "REMOTE", "ROUTER", "SCENE_TRIGGER", "SCREEN", "SECURITY_PANEL", "SECURITY_SYSTEM", "SLOW_COOKER", "SMARTLOCK", "SMARTPLUG", "SPEAKER", "STREAMING_DEVICE", "SWITCH", "TABLET", "TEMPERATURE_SENSOR", "THERMOSTAT", "TV", "VACUUM_CLEANER", "VACUUM", "WASHER", "WATER_HEATER", "WEARABLE"];
|
|
export type DisplayCategoryName = (typeof DISPLAY_CATEGORIES)[number];
|
|
/** Not to be used as a friendly name (resources-and-assets.html, "Reserved words"). */
|
|
export declare const RESERVED_WORDS: readonly ["alarm", "alarms", "all alarms", "away mode", "bass", "camera", "date", "date today", "day", "do not disturb", "drop in", "music", "night light", "notification", "playing", "sleep sounds", "time", "timer", "today in music", "treble", "volume", "way f. m."];
|
|
/**
|
|
* Why a property changed or an event was raised (message-guide.html, "Cause object"). RULE_TRIGGER is not in that
|
|
* table; the ChangeReport examples of alexa-securitypanelcontroller.html and alexa-thermostatcontroller.html use it.
|
|
*/
|
|
export declare const CAUSES: readonly ["APP_INTERACTION", "PERIODIC_POLL", "PHYSICAL_INTERACTION", "RULE_TRIGGER", "VOICE_INTERACTION"];
|
|
export type Cause = (typeof CAUSES)[number];
|
|
/**
|
|
* What a discovery answer may hold (alexa-discovery.html, "Interface limits"; alexa-discovery-objects.html,
|
|
* "Endpoint object details" and "AdditionalAttributes object details"; alexa-scenecontroller.html, "Discovery").
|
|
*/
|
|
export declare const LIMITS: {
|
|
readonly endpointsPerCustomer: 300;
|
|
readonly capabilitiesPerEndpoint: 100;
|
|
readonly endpointIdLength: 256;
|
|
readonly friendlyNameLength: 256;
|
|
readonly sceneFriendlyNameLength: 128;
|
|
readonly manufacturerNameLength: 128;
|
|
readonly descriptionLength: 128;
|
|
readonly additionalAttributeLength: 256;
|
|
readonly cookieBytes: 5000;
|
|
};
|
|
/** The 73 error types of the table, each with the namespace its ErrorResponse goes under. */
|
|
export declare const ERROR_TYPES: Readonly<Record<string, string>>;
|