From 1bd77aea73dc931ad17a79248633f16bbeb3a524 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Tue, 29 Aug 2023 16:01:59 -0400 Subject: [PATCH] Add air quality monitor + remote device types (#601) Signed-off-by: jsetton --- docs/USAGE.md | 2 + lambda/alexa/smarthome/category.js | 12 + .../device/types/airQualityMonitor.js | 46 + lambda/alexa/smarthome/device/types/index.js | 2 + lambda/alexa/smarthome/device/types/remote.js | 37 + .../cases/discovery/airQualityMonitor.test.js | 98 + .../test/alexa/cases/discovery/remote.test.js | 35 + lambda/test/alexa/cases/index.js | 4 + .../alexa_smart_home_message_schema.json | 1960 +++++++++-------- 9 files changed, 1330 insertions(+), 866 deletions(-) create mode 100644 lambda/alexa/smarthome/device/types/airQualityMonitor.js create mode 100644 lambda/alexa/smarthome/device/types/remote.js create mode 100644 lambda/test/alexa/cases/discovery/airQualityMonitor.test.js create mode 100644 lambda/test/alexa/cases/discovery/remote.test.js diff --git a/docs/USAGE.md b/docs/USAGE.md index 9ddad91f..4044edf4 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -512,6 +512,7 @@ Device Types | Supported Attributes | Description `AirConditioner` | *[`PowerState`](#powerstate)*, [`TargetTemperature`](#targettemperature), [`CurrentTemperature`](#currenttemperature), [`FanSpeed`](#fanspeed), [`FanDirection`](#fandirection), [`FanOscillate`](#fanoscillate) | A device that cools the air in interior spaces. `AirFreshener` | Same as `Fan` | A device that emits pleasant odors and masks unpleasant odors in interior spaces. `AirPurifier` | Same as `Fan` | A device that improves the quality of air in interior spaces. +`AirQualityMonitor` | [`CurrentTemperature`](#currenttemperature), [`CurrentHumidity`](#currenthumidity), [`BatteryLevel`](#batterylevel) | A device that measures air quality in interior spaces. `Automobile` | [`BatteryLevel`](#batterylevel), [`FanSpeed`](#fanspeed), [`LockState`](#lockstate), [`PowerState`](#powerstate), [`TargetTemperature`](#targettemperature), [`CurrentTemperature`](#currenttemperature) | A motor vehicle (automobile, car). `AutomobileAccessory` | [`BatteryLevel`](#batterylevel), [`CameraStream`](#camerastream), [`FanSpeed`](#fanspeed), [`PowerState`](#powerstate) | A smart device in an automobile, such as a dash camera. `Blind`, `Curtain`, `Shade` | *[`OpenState`](#openstate)*, *[`PositionState`](#positionstate)*, [`TiltAngle`](#tiltangle), [`TargetOpenState`](#targetopenstate), [`CurrentOpenState`](#currentopenstate) | A window covering on the inside of a structure. @@ -542,6 +543,7 @@ Device Types | Supported Attributes | Description `Oven` | *[`PowerState`](#powerstate)* | An oven cooking appliance. `Phone` | *[`PowerState`](#powerstate)* | A non-mobile phone, such as landline or an IP phone. `Printer` | *[`PowerState`](#powerstate)* | A device that prints. +`Remote` | *[`PowerState`](#powerstate)* | A device that support stateless events, such as a remote switch or smart button. `Router` | Same as `NetworkHardware` | A network router. `Screen` | Same as `Television` | A projector screen. `SecurityPanel` | *[`ArmState`](#armstate)*, [`BurglaryAlarm`](#burglaryalarm), [`CarbonMonoxideAlarm`](#carbonmonoxidealarm), [`FireAlarm`](#firealarm), [`WaterAlarm`](#wateralarm), [`AlarmAlert`](#alarmalert), [`ReadyAlert`](#readyalert), [`TroubleAlert`](#troublealert), [`ZonesAlert`](#zonesalert) | A security panel. diff --git a/lambda/alexa/smarthome/category.js b/lambda/alexa/smarthome/category.js index b3f8592f..d67627bd 100644 --- a/lambda/alexa/smarthome/category.js +++ b/lambda/alexa/smarthome/category.js @@ -40,6 +40,12 @@ export default class AlexaDisplayCategory { */ static AIR_PURIFIER = 'AIR_PURIFIER'; + /** + * Defines air quality monitor display category + * @type {String} + */ + static AIR_QUALITY_MONITOR = 'AIR_QUALITY_MONITOR'; + /** * Defines auto accessory display category * @type {String} @@ -214,6 +220,12 @@ export default class AlexaDisplayCategory { */ static PRINTER = 'PRINTER'; + /** + * Defines remote display category + * @type {String} + */ + static REMOTE = 'REMOTE'; + /** * Defines router display category * @type {String} diff --git a/lambda/alexa/smarthome/device/types/airQualityMonitor.js b/lambda/alexa/smarthome/device/types/airQualityMonitor.js new file mode 100644 index 00000000..9b3b2284 --- /dev/null +++ b/lambda/alexa/smarthome/device/types/airQualityMonitor.js @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2010-2023 Contributors to the openHAB project + * + * See the NOTICE file(s) distributed with this work for additional + * information. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + */ + +import AlexaDisplayCategory from '#alexa/smarthome/category.js'; +import Sensor from './sensor.js'; +import { Temperature, Humidity } from '../attributes/index.js'; + +/** + * Defines air quality monitor device type class + * @extends Sensor + */ +export default class AirQualityMonitor extends Sensor { + /** + * Returns supported names + * @return {Array} + */ + static get supportedNames() { + return ['AirQualityMonitor']; + } + + /** + * Returns supported attributes + * @return {Array} + */ + static get supportedAttributes() { + return [Temperature, Humidity, ...super.supportedAttributes]; + } + + /** + * Returns display categories + * @return {Array} + */ + static get displayCategories() { + return [AlexaDisplayCategory.AIR_QUALITY_MONITOR]; + } +} diff --git a/lambda/alexa/smarthome/device/types/index.js b/lambda/alexa/smarthome/device/types/index.js index 8f2de915..3ff4760d 100644 --- a/lambda/alexa/smarthome/device/types/index.js +++ b/lambda/alexa/smarthome/device/types/index.js @@ -18,6 +18,7 @@ export { default as Activity } from './activity.js'; export { default as AirConditioner } from './airConditioner.js'; export { default as AirFreshener } from './airFreshener.js'; export { default as AirPurifier } from './airPurifier.js'; +export { default as AirQualityMonitor } from './airQualityMonitor.js'; export { default as Automobile } from './automobile.js'; export { default as AutomobileAccessory } from './automobileAccessory.js'; export { default as BluetoothSpeaker } from './bluetoothSpeaker.js'; @@ -51,6 +52,7 @@ export { default as Outlet } from './outlet.js'; export { default as Oven } from './oven.js'; export { default as Phone } from './phone.js'; export { default as Printer } from './printer.js'; +export { default as Remote } from './remote.js'; export { default as Router } from './router.js'; export { default as Scene } from './scene.js'; export { default as Screen } from './screen.js'; diff --git a/lambda/alexa/smarthome/device/types/remote.js b/lambda/alexa/smarthome/device/types/remote.js new file mode 100644 index 00000000..dc3b5e67 --- /dev/null +++ b/lambda/alexa/smarthome/device/types/remote.js @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2010-2023 Contributors to the openHAB project + * + * See the NOTICE file(s) distributed with this work for additional + * information. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + */ + +import AlexaDisplayCategory from '#alexa/smarthome/category.js'; +import GenericDevice from './genericDevice.js'; + +/** + * Defines remote device type class + * @extends GenericDevice + */ +export default class Remote extends GenericDevice { + /** + * Returns supported names + * @return {Array} + */ + static get supportedNames() { + return ['Remote']; + } + + /** + * Returns display categories + * @return {Array} + */ + static get displayCategories() { + return [AlexaDisplayCategory.REMOTE]; + } +} diff --git a/lambda/test/alexa/cases/discovery/airQualityMonitor.test.js b/lambda/test/alexa/cases/discovery/airQualityMonitor.test.js new file mode 100644 index 00000000..9fcfa902 --- /dev/null +++ b/lambda/test/alexa/cases/discovery/airQualityMonitor.test.js @@ -0,0 +1,98 @@ +/** + * Copyright (c) 2010-2023 Contributors to the openHAB project + * + * See the NOTICE file(s) distributed with this work for additional + * information. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + */ + +export default { + description: 'air quality monitor', + items: [ + { + type: 'Group', + name: 'gAirQualityMonitor', + label: 'Air Quality Monitor', + metadata: { + alexa: { + value: 'AirQualityMonitor' + } + } + }, + { + type: 'Number:Dimensionless', + name: 'humidity', + groupNames: ['gAirQualityMonitor'], + metadata: { + alexa: { + value: 'CurrentHumidity' + } + } + }, + { + type: 'Number:Temperature', + name: 'temperature', + groupNames: ['gAirQualityMonitor'], + metadata: { + alexa: { + value: 'CurrentTemperature' + } + } + } + ], + catalog: { + '@Setting.Humidity': [ + { + text: 'Humidity', + locale: 'en-US' + } + ] + }, + expected: { + gAirQualityMonitor: { + capabilities: [ + 'Alexa.RangeController:Humidity.rangeValue', + 'Alexa.RangeController:Temperature.rangeValue', + 'Alexa.EndpointHealth.connectivity', + 'Alexa' + ], + displayCategories: ['AIR_QUALITY_MONITOR'], + friendlyName: 'Air Quality Monitor', + propertyFlags: { + 'Alexa.RangeController:Humidity': { + proactivelyReported: false, + retrievable: true, + nonControllable: true + }, + 'Alexa.RangeController:Temperature': { + proactivelyReported: false, + retrievable: true, + nonControllable: true + } + }, + resources: { + 'Alexa.RangeController:Humidity': { + friendlyNames: ['text:Humidity:en-US'] + }, + 'Alexa.RangeController:Temperature': { + friendlyNames: ['asset:Alexa.Setting.Temperature'] + } + }, + configuration: { + 'Alexa.RangeController:Humidity': { + supportedRange: { minimumValue: 0, maximumValue: 100, precision: 1 }, + unitOfMeasure: 'Alexa.Unit.Percent' + }, + 'Alexa.RangeController:Temperature': { + supportedRange: { minimumValue: -50, maximumValue: 100, precision: 0.5 }, + unitOfMeasure: 'Alexa.Unit.Temperature.Celsius' + } + } + } + } +}; diff --git a/lambda/test/alexa/cases/discovery/remote.test.js b/lambda/test/alexa/cases/discovery/remote.test.js new file mode 100644 index 00000000..42b39ad9 --- /dev/null +++ b/lambda/test/alexa/cases/discovery/remote.test.js @@ -0,0 +1,35 @@ +/** + * Copyright (c) 2010-2023 Contributors to the openHAB project + * + * See the NOTICE file(s) distributed with this work for additional + * information. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + */ + +export default { + description: 'remote', + items: [ + { + type: 'Switch', + name: 'remote', + label: 'Remote', + metadata: { + alexa: { + value: 'Remote' + } + } + } + ], + expected: { + remote: { + capabilities: ['Alexa.PowerController.powerState', 'Alexa.EndpointHealth.connectivity', 'Alexa'], + displayCategories: ['REMOTE'], + friendlyName: 'Remote' + } + } +}; diff --git a/lambda/test/alexa/cases/index.js b/lambda/test/alexa/cases/index.js index f06417a7..c504ce8c 100644 --- a/lambda/test/alexa/cases/index.js +++ b/lambda/test/alexa/cases/index.js @@ -22,6 +22,7 @@ import discoveryActivityTest from './discovery/activity.test.js'; import discoveryAirConditionerTest from './discovery/airConditioner.test.js'; import discoveryAirFreshenerTest from './discovery/airFreshener.test.js'; import discoveryAirPurifierTest from './discovery/airPurifier.test.js'; +import discoveryAirQualityMonitorTest from './discovery/airQualityMonitor.test.js'; import discoveryAutomobileTest from './discovery/automobile.test.js'; import discoveryAutomobileAccessoryTest from './discovery/automobileAccessory.test.js'; import discoveryBlindTest from './discovery/blind.test.js'; @@ -52,6 +53,7 @@ import discoveryOutletTest from './discovery/outlet.test.js'; import discoveryOvenTest from './discovery/oven.test.js'; import discoveryPhoneTest from './discovery/phone.test.js'; import discoveryPrinterTest from './discovery/printer.test.js'; +import discoveryRemoteTest from './discovery/remote.test.js'; import discoveryRouterTest from './discovery/router.test.js'; import discoverySceneTest from './discovery/scene.test.js'; import discoveryScreenTest from './discovery/screen.test.js'; @@ -102,6 +104,7 @@ export default { discoveryAirConditionerTest, discoveryAirFreshenerTest, discoveryAirPurifierTest, + discoveryAirQualityMonitorTest, discoveryAutomobileTest, discoveryAutomobileAccessoryTest, discoveryBlindTest, @@ -132,6 +135,7 @@ export default { discoveryOvenTest, discoveryPhoneTest, discoveryPrinterTest, + discoveryRemoteTest, discoveryRouterTest, discoverySceneTest, discoveryScreenTest, diff --git a/lambda/test/alexa/schemas/alexa_smart_home_message_schema.json b/lambda/test/alexa/schemas/alexa_smart_home_message_schema.json index a08c0741..4d0b4067 100644 --- a/lambda/test/alexa/schemas/alexa_smart_home_message_schema.json +++ b/lambda/test/alexa/schemas/alexa_smart_home_message_schema.json @@ -2282,246 +2282,6 @@ }, "additionalProperties": false }, - { - "required": [ - "name", - "namespace", - "timeOfSample", - "uncertaintyInMilliseconds", - "value" - ], - "type": "object", - "properties": { - "namespace": { - "enum": [ - "Alexa.TimeHoldController" - ] - }, - "name": { - "enum": [ - "holdStartTime" - ] - }, - "instance": { - "type": "string" - }, - "value": { - "pattern": "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\dZ$", - "type": "string" - }, - "timeOfSample": { - "$ref": "#/definitions/common/model.StatePropertyBase.TimeOfSample" - }, - "uncertaintyInMilliseconds": { - "$ref": "#/definitions/common/model.StatePropertyBase.UncertaintyInMilliseconds" - } - }, - "additionalProperties": false - }, - { - "required": [ - "name", - "namespace", - "timeOfSample", - "uncertaintyInMilliseconds", - "value" - ], - "type": "object", - "properties": { - "namespace": { - "enum": [ - "Alexa.TimeHoldController" - ] - }, - "name": { - "enum": [ - "holdEndTime" - ] - }, - "instance": { - "type": "string" - }, - "value": { - "pattern": "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\dZ$", - "type": "string" - }, - "timeOfSample": { - "$ref": "#/definitions/common/model.StatePropertyBase.TimeOfSample" - }, - "uncertaintyInMilliseconds": { - "$ref": "#/definitions/common/model.StatePropertyBase.UncertaintyInMilliseconds" - } - }, - "additionalProperties": false - }, - { - "required": [ - "name", - "namespace", - "timeOfSample", - "uncertaintyInMilliseconds", - "value" - ], - "type": "object", - "properties": { - "namespace": { - "enum": [ - "Alexa.InventoryLevelSensor" - ] - }, - "name": { - "enum": [ - "level" - ] - }, - "instance": { - "type": "string" - }, - "value": { - "type": "object", - "oneOf": [ - { - "required": [ - "@type", - "value", - "unit" - ], - "type": "object", - "properties": { - "@type": { - "type": "string", - "enum": [ - "Volume" - ] - }, - "value": { - "type": "number", - "minimum": 0 - }, - "unit": { - "type": "string", - "enum": [ - "LITER", - "MILLILITER", - "METRIC_CUP", - "METRIC_TEASPOON", - "UK_TABLESPOON", - "AU_TABLESPOON", - "CUBIC_CENTIMETER", - "CUBIC_METER", - "UK_GALLON", - "UK_QUART", - "UK_PINT", - "UK_CUP", - "UK_GILL", - "UK_FLUID_OUNCE", - "UK_FLUID_DRAM", - "CUBIC_INCH", - "CUBIC_FOOT", - "CUBIC_YARD", - "US_FLUID_GALLON", - "US_FLUID_QUART", - "US_FLUID_PINT", - "US_FLUID_CUP", - "US_FLUID_OUNCE", - "US_GILL", - "US_TABLESPOON", - "US_TEASPOON", - "US_DRAM", - "US_DRY_GALLON", - "US_DRY_QUART", - "US_DRY_PINT" - ] - } - }, - "additionalProperties": false - }, - { - "required": [ - "@type", - "value", - "unit" - ], - "type": "object", - "properties": { - "@type": { - "type": "string", - "enum": [ - "Weight" - ] - }, - "value": { - "type": "number", - "minimum": 0 - }, - "unit": { - "type": "string", - "enum": [ - "KILOGRAM", - "GRAM", - "MILLIGRAM", - "MICROGRAM", - "METRIC_POUND", - "POUND", - "OUNCE", - "DRAM" - ] - } - }, - "additionalProperties": false - }, - { - "required": [ - "@type", - "value" - ], - "type": "object", - "properties": { - "@type": { - "type": "string", - "enum": [ - "Percentage" - ] - }, - "value": { - "type": "number", - "minimum": 0, - "maximum": 100 - } - }, - "additionalProperties": false - }, - { - "required": [ - "@type", - "value" - ], - "type": "object", - "properties": { - "@type": { - "type": "string", - "enum": [ - "Count" - ] - }, - "value": { - "type": "integer", - "minimum": 0 - } - }, - "additionalProperties": false - } - ] - }, - "timeOfSample": { - "$ref": "#/definitions/common/model.StatePropertyBase.TimeOfSample" - }, - "uncertaintyInMilliseconds": { - "$ref": "#/definitions/common/model.StatePropertyBase.UncertaintyInMilliseconds" - } - }, - "additionalProperties": false - }, { "required": [ "name", @@ -2834,22 +2594,19 @@ "properties": { "namespace": { "enum": [ - "Alexa.Networking.AccessController" + "Alexa.TimeHoldController" ] }, "name": { "enum": [ - "networkAccess" + "holdStartTime" ] }, "instance": { "type": "string" }, "value": { - "enum": [ - "ALLOWED", - "BLOCKED" - ], + "pattern": "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\dZ$", "type": "string" }, "timeOfSample": { @@ -2873,21 +2630,226 @@ "properties": { "namespace": { "enum": [ - "Alexa.Cooking.PresetController" + "Alexa.TimeHoldController" ] }, "name": { "enum": [ - "presetName" + "holdEndTime" ] }, "instance": { "type": "string" }, "value": { - "type": "string", - "additionalProperties": false - }, + "pattern": "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\dZ$", + + "type": "string" + }, + "timeOfSample": { + "$ref": "#/definitions/common/model.StatePropertyBase.TimeOfSample" + }, + "uncertaintyInMilliseconds": { + "$ref": "#/definitions/common/model.StatePropertyBase.UncertaintyInMilliseconds" + } + }, + "additionalProperties": false + }, + { + "required": [ + "name", + "namespace", + "timeOfSample", + "uncertaintyInMilliseconds", + "value" + ], + "type": "object", + "properties": { + "namespace": { + "enum": [ + "Alexa.InventoryLevelSensor" + ] + }, + "name": { + "enum": [ + "level" + ] + }, + "instance": { + "type": "string" + }, + "value": { + "type": "object", + "oneOf": [ + { + "required": [ + "@type", + "value", + "unit" + ], + "type": "object", + "properties": { + "@type": { + "type": "string", + "enum": [ + "Volume" + ] + }, + "value": { + "type": "number", + "minimum": 0 + }, + "unit": { + "type": "string", + "enum": [ + "LITER", + "MILLILITER", + "METRIC_CUP", + "METRIC_TEASPOON", + "UK_TABLESPOON", + "AU_TABLESPOON", + "CUBIC_CENTIMETER", + "CUBIC_METER", + "UK_GALLON", + "UK_QUART", + "UK_PINT", + "UK_CUP", + "UK_GILL", + "UK_FLUID_OUNCE", + "UK_FLUID_DRAM", + "CUBIC_INCH", + "CUBIC_FOOT", + "CUBIC_YARD", + "US_FLUID_GALLON", + "US_FLUID_QUART", + "US_FLUID_PINT", + "US_FLUID_CUP", + "US_FLUID_OUNCE", + "US_GILL", + "US_TABLESPOON", + "US_TEASPOON", + "US_DRAM", + "US_DRY_GALLON", + "US_DRY_QUART", + "US_DRY_PINT" + ] + } + }, + "additionalProperties": false + }, + { + "required": [ + "@type", + "value", + "unit" + ], + "type": "object", + "properties": { + "@type": { + "type": "string", + "enum": [ + "Weight" + ] + }, + "value": { + "type": "number", + "minimum": 0 + }, + "unit": { + "type": "string", + "enum": [ + "KILOGRAM", + "GRAM", + "MILLIGRAM", + "MICROGRAM", + "METRIC_POUND", + "POUND", + "OUNCE", + "DRAM" + ] + } + }, + "additionalProperties": false + }, + { + "required": [ + "@type", + "value" + ], + "type": "object", + "properties": { + "@type": { + "type": "string", + "enum": [ + "Percentage" + ] + }, + "value": { + "type": "number", + "minimum": 0, + "maximum": 100 + } + }, + "additionalProperties": false + }, + { + "required": [ + "@type", + "value" + ], + "type": "object", + "properties": { + "@type": { + "type": "string", + "enum": [ + "Count" + ] + }, + "value": { + "type": "integer", + "minimum": 0 + } + }, + "additionalProperties": false + } + ] + }, + "timeOfSample": { + "$ref": "#/definitions/common/model.StatePropertyBase.TimeOfSample" + }, + "uncertaintyInMilliseconds": { + "$ref": "#/definitions/common/model.StatePropertyBase.UncertaintyInMilliseconds" + } + }, + "additionalProperties": false + }, + { + "required": [ + "name", + "namespace", + "timeOfSample", + "uncertaintyInMilliseconds", + "value" + ], + "type": "object", + "properties": { + "namespace": { + "enum": [ + "Alexa.Cooking.PresetController" + ] + }, + "name": { + "enum": [ + "presetName" + ] + }, + "instance": { + "type": "string" + }, + "value": { + "type": "string", + "additionalProperties": false + }, "timeOfSample": { "$ref": "#/definitions/common/model.StatePropertyBase.TimeOfSample" }, @@ -2997,6 +2959,45 @@ }, "additionalProperties": false }, + { + "required": [ + "name", + "namespace", + "timeOfSample", + "uncertaintyInMilliseconds", + "value" + ], + "type": "object", + "properties": { + "namespace": { + "enum": [ + "Alexa.Networking.AccessController" + ] + }, + "name": { + "enum": [ + "networkAccess" + ] + }, + "instance": { + "type": "string" + }, + "value": { + "enum": [ + "ALLOWED", + "BLOCKED" + ], + "type": "string" + }, + "timeOfSample": { + "$ref": "#/definitions/common/model.StatePropertyBase.TimeOfSample" + }, + "uncertaintyInMilliseconds": { + "$ref": "#/definitions/common/model.StatePropertyBase.UncertaintyInMilliseconds" + } + }, + "additionalProperties": false + }, { "required": [ "name", @@ -3460,16 +3461,50 @@ } }, "nullable": true - } - } - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "AlexaInterface" + }, + "directiveConfigurations": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "properties": { + "directives": { + "type": "array", + "items": { + "type": "string" + } + }, + "requestedAuthenticationConfidenceLevel": { + "type": "object", + "properties": { + "level": { + "type": "integer", + "format": "int32" + }, + "customPolicy": { + "type": "object", + "properties": { + "policyName": { + "type": "string" + } + }, + "nullable": true + } + }, + "nullable": true + } + } + } + } + } + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "AlexaInterface" ] }, "interface": { @@ -4528,6 +4563,40 @@ } }, "nullable": true + }, + "directiveConfigurations": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "properties": { + "directives": { + "type": "array", + "items": { + "type": "string" + } + }, + "requestedAuthenticationConfidenceLevel": { + "type": "object", + "properties": { + "level": { + "type": "integer", + "format": "int32" + }, + "customPolicy": { + "type": "object", + "properties": { + "policyName": { + "type": "string" + } + }, + "nullable": true + } + }, + "nullable": true + } + } + } } } }, @@ -4979,6 +5048,7 @@ "properties": { "supported": { "type": "array", + "nullable": true, "items": { "type": "object" } @@ -4991,6 +5061,40 @@ } }, "nullable": true + }, + "directiveConfigurations": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "properties": { + "directives": { + "type": "array", + "items": { + "type": "string" + } + }, + "requestedAuthenticationConfidenceLevel": { + "type": "object", + "properties": { + "level": { + "type": "integer", + "format": "int32" + }, + "customPolicy": { + "type": "object", + "properties": { + "policyName": { + "type": "string" + } + }, + "nullable": true + } + }, + "nullable": true + } + } + } } } }, @@ -5084,6 +5188,24 @@ ] } ] + }, + "isEndToEndEncryptionEnabled": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "true", + "false", + "True", + "False", + "TRUE", + "FALSE" + ] + } + ] } } } @@ -6317,38 +6439,6 @@ } ] }, - { - "type": "object", - "allOf": [ - { - "required": [ - "interface", - "type", - "version" - ], - "type": "object", - "properties": { - "type": { - "pattern": "^[ a-zA-Z0-9_\\-=#;:?@&]+$", - "type": "string" - }, - "interface": { - "type": "string" - }, - "version": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - } - } - } - ] - }, { "type": "object", "allOf": [ @@ -6399,6 +6489,40 @@ } }, "nullable": true + }, + "directiveConfigurations": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "properties": { + "directives": { + "type": "array", + "items": { + "type": "string" + } + }, + "requestedAuthenticationConfidenceLevel": { + "type": "object", + "properties": { + "level": { + "type": "integer", + "format": "int32" + }, + "customPolicy": { + "type": "object", + "properties": { + "policyName": { + "type": "string" + } + }, + "nullable": true + } + }, + "nullable": true + } + } + } } } }, @@ -6813,6 +6937,40 @@ } }, "nullable": true + }, + "directiveConfigurations": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "properties": { + "directives": { + "type": "array", + "items": { + "type": "string" + } + }, + "requestedAuthenticationConfidenceLevel": { + "type": "object", + "properties": { + "level": { + "type": "integer", + "format": "int32" + }, + "customPolicy": { + "type": "object", + "properties": { + "policyName": { + "type": "string" + } + }, + "nullable": true + } + }, + "nullable": true + } + } + } } } }, @@ -7388,6 +7546,40 @@ } }, "nullable": true + }, + "directiveConfigurations": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "properties": { + "directives": { + "type": "array", + "items": { + "type": "string" + } + }, + "requestedAuthenticationConfidenceLevel": { + "type": "object", + "properties": { + "level": { + "type": "integer", + "format": "int32" + }, + "customPolicy": { + "type": "object", + "properties": { + "policyName": { + "type": "string" + } + }, + "nullable": true + } + }, + "nullable": true + } + } + } } } }, @@ -8494,6 +8686,40 @@ } }, "nullable": true + }, + "directiveConfigurations": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "properties": { + "directives": { + "type": "array", + "items": { + "type": "string" + } + }, + "requestedAuthenticationConfidenceLevel": { + "type": "object", + "properties": { + "level": { + "type": "integer", + "format": "int32" + }, + "customPolicy": { + "type": "object", + "properties": { + "policyName": { + "type": "string" + } + }, + "nullable": true + } + }, + "nullable": true + } + } + } } } }, @@ -8619,48 +8845,219 @@ ], "type": "object", "properties": { - "interface": { - "type": "string" - }, - "version": { - "type": "string" - }, "type": { - "pattern": "^[ a-zA-Z0-9_\\-=#;:?@&]+$", "type": "string" - } - } - }, - { - "type": "object", - "properties": { + }, "interface": { - "enum": [ - "Alexa.MediaMetadata" - ], "type": "string" }, "version": { - "enum": [ - "3" - ], "type": "string" }, - "type": { - "enum": [ - "AlexaInterface" - ], + "instance": { "type": "string" - } - } - } - ] - }, - { - "type": "object", - "allOf": [ - { - "type": "object", + }, + "capabilityResources": { + "required": [ + "friendlyNames" + ], + "type": "object", + "properties": { + "friendlyNames": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object" + } + } + } + } + } + }, + "properties": { + "type": "object", + "properties": { + "supported": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "object", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "enum": [ + "cookingTimeInterval", + "cookingMode", + "foodItem" + ] + } + } + } + }, + "proactivelyReported": { + "type": "boolean" + }, + "retrievable": { + "type": "boolean" + }, + "readOnly": { + "type": "boolean" + }, + "nonControllable": { + "type": "boolean", + "writeOnly": true + } + } + }, + "configuration": { + "type": "object" + } + } + }, + { + "type": "object", + "properties": { + "interface": { + "enum": [ + "Alexa.Cooking" + ], + "type": "string" + }, + "version": { + "enum": [ + "3" + ], + "type": "string" + }, + "type": { + "enum": [ + "AlexaInterface" + ], + "type": "string" + } + } + } + ] + }, + { + "type": "object", + "allOf": [ + { + "required": [ + "interface", + "type", + "version" + ], + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "interface": { + "type": "string" + }, + "version": { + "type": "string" + }, + "instance": { + "type": "string" + }, + "capabilityResources": { + "required": [ + "friendlyNames" + ], + "type": "object", + "properties": { + "friendlyNames": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "object" + } + } + } + } + } + }, + "properties": { + "type": "object", + "properties": { + "supported": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "object", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "enum": [ + "holdStartTime", + "holdEndTime" + ] + } + } + } + }, + "proactivelyReported": { + "type": "boolean" + }, + "retrievable": { + "type": "boolean" + }, + "readOnly": { + "type": "boolean" + }, + "nonControllable": { + "type": "boolean", + "writeOnly": true + } + } + }, + "configuration": { + "type": "object" + } + } + }, + { + "type": "object", + "properties": { + "interface": { + "enum": [ + "Alexa.TimeHoldController" + ], + "type": "string" + }, + "version": { + "enum": [ + "3" + ], + "type": "string" + }, + "type": { + "enum": [ + "AlexaInterface" + ], + "type": "string" + } + } + } + ] + }, + { + "type": "object", + "allOf": [ + { + "type": "object", "required": [ "type", "interface", @@ -8819,11 +9216,15 @@ "required": [ "interface", "type", - "version" + "version", + "instance", + "capabilityResources", + "configuration" ], "type": "object", "properties": { "type": { + "pattern": "^[ a-zA-Z0-9_\\-=#;:?@&]+$", "type": "string" }, "interface": { @@ -8869,8 +9270,7 @@ "properties": { "name": { "enum": [ - "holdStartTime", - "holdEndTime" + "level" ] } } @@ -8892,121 +9292,9 @@ } }, "configuration": { - "type": "object" - } - } - }, - { - "type": "object", - "properties": { - "interface": { - "enum": [ - "Alexa.TimeHoldController" - ], - "type": "string" - }, - "version": { - "enum": [ - "3" - ], - "type": "string" - }, - "type": { - "enum": [ - "AlexaInterface" - ], - "type": "string" - } - } - } - ] - }, - { - "type": "object", - "allOf": [ - { - "required": [ - "interface", - "type", - "version", - "instance", - "capabilityResources", - "configuration" - ], - "type": "object", - "properties": { - "type": { - "pattern": "^[ a-zA-Z0-9_\\-=#;:?@&]+$", - "type": "string" - }, - "interface": { - "type": "string" - }, - "version": { - "type": "string" - }, - "instance": { - "type": "string" - }, - "capabilityResources": { - "required": [ - "friendlyNames" - ], - "type": "object", - "properties": { - "friendlyNames": { - "type": "array", - "items": { - "type": "object", - "properties": { - "value": { - "type": "object" - } - } - } - } - } - }, - "properties": { - "type": "object", - "properties": { - "supported": { - "uniqueItems": true, - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "additionalProperties": false, - "properties": { - "name": { - "enum": [ - "level" - ] - } - } - } - }, - "proactivelyReported": { - "type": "boolean" - }, - "retrievable": { - "type": "boolean" - }, - "readOnly": { - "type": "boolean" - }, - "nonControllable": { - "type": "boolean", - "writeOnly": true - } - } - }, - "configuration": { - "required": [ - "measurement", - "replenishment" + "required": [ + "measurement", + "replenishment" ], "type": "object", "properties": { @@ -9225,9 +9513,8 @@ "properties": { "name": { "enum": [ - "cookingTimeInterval", - "cookingMode", - "foodItem" + "presetName", + "requestedFoodDoneness" ] } } @@ -9258,7 +9545,7 @@ "properties": { "interface": { "enum": [ - "Alexa.Cooking" + "Alexa.Cooking.PresetController" ], "type": "string" }, @@ -9298,67 +9585,6 @@ "type": { "pattern": "^[ a-zA-Z0-9_\\-=#;:?@&]+$", "type": "string" - }, - "instance": { - "type": "string" - }, - "capabilityResources": { - "required": [ - "friendlyNames" - ], - "type": "object", - "properties": { - "friendlyNames": { - "items": { - "type": "object", - "properties": { - "value": { - "type": "object" - } - } - }, - "type": "array" - } - } - }, - "configuration": { - "type": "object" - }, - "properties": { - "type": "object", - "properties": { - "retrievable": { - "type": "boolean" - }, - "readOnly": { - "type": "boolean" - }, - "supported": { - "uniqueItems": true, - "items": { - "type": "object", - "required": [ - "name" - ], - "additionalProperties": false, - "properties": { - "name": { - "enum": [ - "networkAccess" - ] - } - } - }, - "type": "array" - }, - "proactivelyReported": { - "type": "boolean" - }, - "nonControllable": { - "writeOnly": true, - "type": "boolean" - } - } } } }, @@ -9367,7 +9593,7 @@ "properties": { "interface": { "enum": [ - "Alexa.Networking.AccessController" + "Alexa.MediaMetadata" ], "type": "string" }, @@ -9398,15 +9624,16 @@ ], "type": "object", "properties": { - "type": { - "type": "string" - }, "interface": { "type": "string" }, "version": { "type": "string" }, + "type": { + "pattern": "^[ a-zA-Z0-9_\\-=#;:?@&]+$", + "type": "string" + }, "instance": { "type": "string" }, @@ -9417,7 +9644,6 @@ "type": "object", "properties": { "friendlyNames": { - "type": "array", "items": { "type": "object", "properties": { @@ -9425,16 +9651,25 @@ "type": "object" } } - } + }, + "type": "array" } } }, + "configuration": { + "type": "object" + }, "properties": { "type": "object", "properties": { + "retrievable": { + "type": "boolean" + }, + "readOnly": { + "type": "boolean" + }, "supported": { "uniqueItems": true, - "type": "array", "items": { "type": "object", "required": [ @@ -9444,30 +9679,21 @@ "properties": { "name": { "enum": [ - "presetName", - "requestedFoodDoneness" + "networkAccess" ] } } - } + }, + "type": "array" }, "proactivelyReported": { "type": "boolean" }, - "retrievable": { - "type": "boolean" - }, - "readOnly": { - "type": "boolean" - }, "nonControllable": { - "type": "boolean", - "writeOnly": true + "writeOnly": true, + "type": "boolean" } } - }, - "configuration": { - "type": "object" } } }, @@ -9476,7 +9702,7 @@ "properties": { "interface": { "enum": [ - "Alexa.Cooking.PresetController" + "Alexa.Networking.AccessController" ], "type": "string" }, @@ -9994,7 +10220,7 @@ "name": { "type": "string", "enum": [ - "SessionDisconnected" + "SessionConnected" ] }, "payloadVersion": { @@ -10065,7 +10291,7 @@ "name": { "type": "string", "enum": [ - "SessionConnected" + "SessionDisconnected" ] }, "payloadVersion": { @@ -10347,7 +10573,7 @@ } }, { - "description": "A Response message for Alexa.MediaMetadata", + "description": "A Response message for Alexa.Authorization", "type": "object", "required": [ "event" @@ -10378,13 +10604,13 @@ "namespace": { "type": "string", "enum": [ - "Alexa.MediaMetadata" + "Alexa.Authorization" ] }, "name": { "type": "string", "enum": [ - "GetMediaMetadata.Response" + "AcceptGrant.Response" ] }, "payloadVersion": { @@ -10402,155 +10628,165 @@ "$ref": "#/definitions/common/model.Endpoint" }, "payload": { + "type": "object", "additionalProperties": false, + "properties": {}, + "maxProperties": 0 + } + } + } + } + }, + { + "description": "A Response message for Alexa.CameraStreamController", + "type": "object", + "required": [ + "event" + ], + "additionalProperties": false, + "properties": { + "context": { + "$ref": "#/definitions/common/model.Context" + }, + "event": { + "type": "object", + "required": [ + "header", + "payload" + ], + "additionalProperties": false, + "properties": { + "header": { + "type": "object", "required": [ - "scope", - "media" + "namespace", + "name", + "payloadVersion", + "messageId" ], - "type": "object", + "additionalProperties": false, "properties": { - "scope": { - "type": "object", - "required": [ - "type", - "token" - ], - "properties": { - "type": { - "enum": [ - "BearerToken" - ] - }, - "token": { - "type": "string", - "minLength": 1 - } - }, - "additionalProperties": false + "namespace": { + "type": "string", + "enum": [ + "Alexa.CameraStreamController" + ] }, - "media": { + "name": { + "type": "string", + "enum": [ + "Response" + ] + }, + "payloadVersion": { + "$ref": "#/definitions/common/model.PayloadVersion" + }, + "messageId": { + "$ref": "#/definitions/common/model.MessageId" + }, + "correlationToken": { + "$ref": "#/definitions/common/model.CorrelationToken" + } + } + }, + "endpoint": { + "$ref": "#/definitions/common/model.Endpoint" + }, + "payload": { + "additionalProperties": false, + "required": [ + "cameraStreams", + "imageUri" + ], + "type": "object", + "properties": { + "cameraStreams": { "minItems": 1, "items": { - "type": "object", "required": [ - "id", - "cause", - "recording" + "audioCodec", + "authorizationType", + "protocol", + "resolution", + "uri", + "videoCodec" ], + "additionalProperties": false, + "type": "object", "properties": { - "id": { - "type": "string", - "pattern": "[A-Za-z0-9\\_]+", - "minLength": 1, - "maxLength": 256 + "videoCodec": { + "enum": [ + "H264", + "MPEG2", + "MJPEG", + "JPG" + ] }, - "cause": { + "protocol": { "enum": [ - "MOTION_DETECTED", - "AUDIO_DETECTED", - "PERSON_DETECTED", - "APP_INTERACTION", - "VOICE_INTERACTION", - "RULE_TRIGGER" + "RTSP", + "WEBRTC", + "HLS" ] }, - "recording": { + "authorizationType": { + "enum": [ + "BASIC", + "DIGEST", + "NONE" + ] + }, + "idleTimeoutSeconds": { + "minimum": 1, + "type": "integer", + "format": "int32" + }, + "uri": { + "minLength": 1, + "type": "string", + "format": "uri" + }, + "expirationTime": { + "type": "string", + "format": "date-time" + }, + "resolution": { "type": "object", "required": [ - "startTime", - "endTime", - "uri" + "width", + "height" ], + "additionalProperties": false, "properties": { - "name": { - "type": "string", - "minLength": 1 - }, - "startTime": { - "pattern": "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\dZ$", - "type": "string" - }, - "endTime": { - "pattern": "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\dZ$", - "type": "string" - }, - "videoCodec": { - "enum": [ - "H264" - ] - }, - "audioCodec": { - "enum": [ - "G711", - "AAC", - "NONE" - ] - }, - "uri": { - "type": "object", - "required": [ - "value", - "expireTime" - ], - "properties": { - "value": { - "type": "string", - "format": "uri" - }, - "expireTime": { - "pattern": "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\dZ$", - "type": "string" - } - }, - "additionalProperties": false + "width": { + "minimum": 1, + "type": "integer", + "format": "int32" }, - "thumbnailUri": { - "type": "object", - "required": [ - "value", - "expireTime" - ], - "properties": { - "value": { - "type": "string", - "format": "uri" - }, - "expireTime": { - "pattern": "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\dZ$", - "type": "string" - } - }, - "additionalProperties": false + "height": { + "minimum": 1, + "type": "integer", + "format": "int32" } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - "type": "array" - }, - "errors": { - "minItems": 1, - "items": { - "type": "object", - "properties": { - "status": { + } + }, + "audioCodec": { "enum": [ - "DELETED", - "NOT_FOUND", - "SUBSCRIPTION_ERROR", - "INTERNAL_ERROR" + "G711", + "AAC", + "NONE" ] - }, - "mediaId": { - "type": "string", - "minLength": 1 } - }, - "additionalProperties": false + } }, - "type": "array" + "type": "array", + "maxItems": 2147483647 + }, + "imageUri": { + "minLength": 1, + "type": "string", + "format": "uri", + "maxLength": 2147483647 } } } @@ -10559,7 +10795,7 @@ } }, { - "description": "A Response message for Alexa.CameraStreamController", + "description": "A Response message for Alexa.MediaMetadata", "type": "object", "required": [ "event" @@ -10590,13 +10826,13 @@ "namespace": { "type": "string", "enum": [ - "Alexa.CameraStreamController" + "Alexa.MediaMetadata" ] }, "name": { "type": "string", "enum": [ - "Response" + "GetMediaMetadata.Response" ] }, "payloadVersion": { @@ -10616,165 +10852,155 @@ "payload": { "additionalProperties": false, "required": [ - "cameraStreams", - "imageUri" + "scope", + "media" ], "type": "object", "properties": { - "cameraStreams": { + "scope": { + "type": "object", + "required": [ + "type", + "token" + ], + "properties": { + "type": { + "enum": [ + "BearerToken" + ] + }, + "token": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + }, + "media": { "minItems": 1, "items": { + "type": "object", "required": [ - "audioCodec", - "authorizationType", - "protocol", - "resolution", - "uri", - "videoCodec" + "id", + "cause", + "recording" ], - "additionalProperties": false, - "type": "object", "properties": { - "videoCodec": { - "enum": [ - "H264", - "MPEG2", - "MJPEG", - "JPG" - ] - }, - "protocol": { - "enum": [ - "RTSP", - "WEBRTC", - "HLS" - ] + "id": { + "type": "string", + "pattern": "[A-Za-z0-9\\_]+", + "minLength": 1, + "maxLength": 256 }, - "authorizationType": { + "cause": { "enum": [ - "BASIC", - "DIGEST", - "NONE" + "MOTION_DETECTED", + "AUDIO_DETECTED", + "PERSON_DETECTED", + "APP_INTERACTION", + "VOICE_INTERACTION", + "RULE_TRIGGER" ] }, - "idleTimeoutSeconds": { - "minimum": 1, - "type": "integer", - "format": "int32" - }, - "uri": { - "minLength": 1, - "type": "string", - "format": "uri" - }, - "expirationTime": { - "type": "string", - "format": "date-time" - }, - "resolution": { + "recording": { "type": "object", "required": [ - "width", - "height" + "startTime", + "endTime", + "uri" ], - "additionalProperties": false, "properties": { - "width": { - "minimum": 1, - "type": "integer", - "format": "int32" + "name": { + "type": "string", + "minLength": 1 }, - "height": { - "minimum": 1, - "type": "integer", - "format": "int32" + "startTime": { + "pattern": "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\dZ$", + "type": "string" + }, + "endTime": { + "pattern": "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\dZ$", + "type": "string" + }, + "videoCodec": { + "enum": [ + "H264" + ] + }, + "audioCodec": { + "enum": [ + "G711", + "AAC", + "NONE" + ] + }, + "uri": { + "type": "object", + "required": [ + "value", + "expireTime" + ], + "properties": { + "value": { + "type": "string", + "format": "uri" + }, + "expireTime": { + "pattern": "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\dZ$", + "type": "string" + } + }, + "additionalProperties": false + }, + "thumbnailUri": { + "type": "object", + "required": [ + "value", + "expireTime" + ], + "properties": { + "value": { + "type": "string", + "format": "uri" + }, + "expireTime": { + "pattern": "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\dZ$", + "type": "string" + } + }, + "additionalProperties": false } - } - }, - "audioCodec": { + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "type": "array" + }, + "errors": { + "minItems": 1, + "items": { + "type": "object", + "properties": { + "status": { "enum": [ - "G711", - "AAC", - "NONE" + "DELETED", + "NOT_FOUND", + "SUBSCRIPTION_ERROR", + "INTERNAL_ERROR" ] + }, + "mediaId": { + "type": "string", + "minLength": 1 } - } + }, + "additionalProperties": false }, - "type": "array", - "maxItems": 2147483647 - }, - "imageUri": { - "minLength": 1, - "type": "string", - "format": "uri", - "maxLength": 2147483647 - } - } - } - } - } - } - }, - { - "description": "A Response message for Alexa.Authorization", - "type": "object", - "required": [ - "event" - ], - "additionalProperties": false, - "properties": { - "context": { - "$ref": "#/definitions/common/model.Context" - }, - "event": { - "type": "object", - "required": [ - "header", - "payload" - ], - "additionalProperties": false, - "properties": { - "header": { - "type": "object", - "required": [ - "namespace", - "name", - "payloadVersion", - "messageId" - ], - "additionalProperties": false, - "properties": { - "namespace": { - "type": "string", - "enum": [ - "Alexa.Authorization" - ] - }, - "name": { - "type": "string", - "enum": [ - "AcceptGrant.Response" - ] - }, - "payloadVersion": { - "$ref": "#/definitions/common/model.PayloadVersion" - }, - "messageId": { - "$ref": "#/definitions/common/model.MessageId" - }, - "correlationToken": { - "$ref": "#/definitions/common/model.CorrelationToken" + "type": "array" } } - }, - "endpoint": { - "$ref": "#/definitions/common/model.Endpoint" - }, - "payload": { - "type": "object", - "additionalProperties": false, - "properties": {}, - "maxProperties": 0 } } } @@ -11828,7 +12054,7 @@ } }, { - "description": "An ErrorResponse message for Alexa.Cooking", + "description": "An ErrorResponse message for Alexa.Authorization", "type": "object", "required": [ "event" @@ -11856,7 +12082,7 @@ "namespace": { "type": "string", "enum": [ - "Alexa.Cooking" + "Alexa.Authorization" ] }, "name": { @@ -11880,65 +12106,30 @@ "$ref": "#/definitions/common/model.Endpoint" }, "payload": { - "oneOf": [ - { - "additionalProperties": false, - "required": [ - "type", - "message" - ], - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "type": { - "enum": [ - "CHILD_LOCK", - "DOOR_CLOSED_TOO_LONG", - "DOOR_OPEN", - "PREHEAT_REQUIRED", - "PROBE_REQUIRED", - "REMOTE_START_NOT_SUPPORTED", - "REMOVE_PROBE", - "REMOTE_START_DISABLED" - ], - "type": "string" - } - } + "additionalProperties": false, + "required": [ + "message", + "type" + ], + "type": "object", + "properties": { + "message": { + "type": "string" }, - { - "additionalProperties": false, - "required": [ - "type", - "message", - "maxCookTime" + "type": { + "enum": [ + "ACCEPT_GRANT_FAILED" ], - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "type": { - "enum": [ - "COOK_DURATION_TOO_LONG" - ], - "type": "string" - }, - "maxCookTime": { - "type": "string" - } - } + "type": "string" } - ], - "type": "object" + } } } } } }, { - "description": "An ErrorResponse message for Alexa.Authorization", + "description": "An ErrorResponse message for Alexa.Cooking", "type": "object", "required": [ "event" @@ -11966,7 +12157,7 @@ "namespace": { "type": "string", "enum": [ - "Alexa.Authorization" + "Alexa.Cooking" ] }, "name": { @@ -11990,23 +12181,58 @@ "$ref": "#/definitions/common/model.Endpoint" }, "payload": { - "additionalProperties": false, - "required": [ - "message", - "type" - ], - "type": "object", - "properties": { - "message": { - "type": "string" + "oneOf": [ + { + "additionalProperties": false, + "required": [ + "type", + "message" + ], + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "type": { + "enum": [ + "CHILD_LOCK", + "DOOR_CLOSED_TOO_LONG", + "DOOR_OPEN", + "PREHEAT_REQUIRED", + "PROBE_REQUIRED", + "REMOTE_START_NOT_SUPPORTED", + "REMOVE_PROBE", + "REMOTE_START_DISABLED" + ], + "type": "string" + } + } }, - "type": { - "enum": [ - "ACCEPT_GRANT_FAILED" + { + "additionalProperties": false, + "required": [ + "type", + "message", + "maxCookTime" ], - "type": "string" + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "type": { + "enum": [ + "COOK_DURATION_TOO_LONG" + ], + "type": "string" + }, + "maxCookTime": { + "type": "string" + } + } } - } + ], + "type": "object" } } } @@ -12725,6 +12951,7 @@ "AIR_CONDITIONER", "AIR_FRESHENER", "AIR_PURIFIER", + "AIR_QUALITY_MONITOR", "AUTO_ACCESSORY", "BLUETOOTH_SPEAKER", "CAMERA", @@ -12754,6 +12981,7 @@ "OVEN", "PHONE", "PRINTER", + "REMOTE", "ROUTER", "SCENE_TRIGGER", "SCREEN",