"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ToggleController = void 0; const schema_js_1 = require("../schema.js"); const semantics_js_1 = require("../semantics.js"); const types_js_1 = require("../types.js"); const directives = { TurnOn: { name: "TurnOn", payload: schema_js_1.s.object({}) }, TurnOff: { name: "TurnOff", payload: schema_js_1.s.object({}) }, }; /** * Something that is on or off, under an instance name: the oscillation of a fan, the light of an oven. The one * generic controller that Alexa hunches work with (SetEcoOn, SetEcoOff, EcoOn, EcoOff). */ exports.ToggleController = (0, types_js_1.defineInterface)({ namespace: "Alexa.ToggleController", version: "3", doc: "https://developer.amazon.com/docs/alexaplus/device-apis/alexa-togglecontroller.html", kind: "controller", tier: 1, instanced: true, properties: { toggleState: { name: "toggleState", value: schema_js_1.s.enum("ON", "OFF") }, }, directives, options: schema_js_1.s.object({ semantics: schema_js_1.s.optional((0, semantics_js_1.semanticsOf)({ directives, stateValue: schema_js_1.s.enum("ON", "OFF"), hunches: true })), }, { unknownKeys: "reject" }), errorNamespace: "Alexa.Safety", errorTypes: ["OBSTACLE_DETECTED", "SAFETY_BEAM_BREACHED"], });