diff --git a/package-lock.json b/package-lock.json index 421c709b5..173940cab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@firebolt-js/sdks", - "version": "1.1.1-next.1", + "version": "1.2.0-next.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@firebolt-js/sdks", - "version": "1.1.1-next.1", + "version": "1.2.0-next.2", "license": "Apache-2.0", "workspaces": [ "src/sdks/core", @@ -18,7 +18,7 @@ "devDependencies": { "@commitlint/cli": "^17.0.3", "@commitlint/config-conventional": "^17.0.3", - "@firebolt-js/openrpc": "2.3.0", + "@firebolt-js/openrpc": "3.0.0-next.3", "@firebolt-js/schemas": "2.0.0", "@saithodev/semantic-release-backmerge": "^3.2.0", "@semantic-release/changelog": "^6.0.1", @@ -1070,9 +1070,9 @@ "link": true }, "node_modules/@firebolt-js/openrpc": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@firebolt-js/openrpc/-/openrpc-2.3.0.tgz", - "integrity": "sha512-JlhFy4r1dkIUHESVi72LaYgbdjP3hG04OfaLEtqLx5sLYDOQ8Y+KHiD2h81u8fvRgLEc6HiX5HgCFdapoUg8Wg==", + "version": "3.0.0-next.3", + "resolved": "https://registry.npmjs.org/@firebolt-js/openrpc/-/openrpc-3.0.0-next.3.tgz", + "integrity": "sha512-hhNtHIpNwwN99Zd4ZABnQ3MIEMPYDN5rSZPNad4ah4R5rmLypWv79vfHSPYeCrTTmoQCwwCFhpObjhJk0EVX/g==", "dev": true, "dependencies": { "ajv": "^8.3.0", @@ -16951,7 +16951,7 @@ }, "src/sdks/core": { "name": "@firebolt-js/sdk", - "version": "1.1.1-next.1", + "version": "1.2.0-next.2", "license": "Apache-2.0", "devDependencies": { "jest": "^28.1.0", @@ -16962,7 +16962,7 @@ }, "src/sdks/manage": { "name": "@firebolt-js/manage-sdk", - "version": "1.1.1-next.1", + "version": "1.2.0-next.2", "license": "Apache-2.0", "devDependencies": { "jest": "^28.1.0", diff --git a/requirements/specifications/intents/command-and-control.md b/requirements/specifications/intents/command-and-control.md index 0fc2b171f..db799cde9 100644 --- a/requirements/specifications/intents/command-and-control.md +++ b/requirements/specifications/intents/command-and-control.md @@ -816,7 +816,9 @@ Setting the scale to `1` turns off magnification. Setting the scale to a value g Even if a Firebolt platform does not support specifying the numeric scale, it **MUST** turn magnifacation on and off based on them. -The magnification intent **MUST** have only one property, `scale`, `toggle`, `value` and **MUST NOT** combine them in a single intent. +If the intent has the `toggle` property, then it **MUST NOT** have the `scale` or `value` property. + +If the intent has the `value` property, then it **MUST NOT** have the `toggle`. ### 3.6. Interaction Intents @@ -899,8 +901,7 @@ up/down/left/right: "action": "scroll", "data": { "direction": "up" | "down" | "left" | "right", - "unit": "page" | "line" | "percent", - "distance": 2.5 + "unit": "page" | "line" | "percent" }, "context": { "source": "voice" @@ -909,8 +910,7 @@ up/down/left/right: } ``` -The distance is a float that represents how many of units to scroll. All -three data properties are required. +Both `direction` and `unit` are required. These Intents will generate appropriate browser / DOM scrolling operations that don\'t require custom APIs. diff --git a/src/schemas/intents.json b/src/schemas/intents.json index 459520ab0..e86e9ad1b 100644 --- a/src/schemas/intents.json +++ b/src/schemas/intents.json @@ -1114,6 +1114,7 @@ "type": "object", "properties": { "options": { + "type": "object", "maxProperties": 1 } } @@ -1122,6 +1123,7 @@ "type": "object", "properties": { "options": { + "type": "object", "maxProperties": 0 } } @@ -1707,10 +1709,6 @@ "page", "percent" ] - }, - "distance": { - "type": "number", - "minimum": 0 } }, "additionalProperties": false @@ -1817,12 +1815,22 @@ "required": [ "relative" ] }, "then": { - "minimum": 0, - "maximum": 100 + "properties": { + "value": { + "type": "number", + "minimum": -50, + "maximum": 50 + } + } }, "else": { - "minimum": -50, - "maximum": 50 + "properties": { + "value": { + "type": "number", + "minimum": 0, + "maximum": 100 + } + } }, "additionalProperties": false } @@ -1963,7 +1971,7 @@ "action": "power", "data": { "value": false, - "delay": "900" + "delay": 900 }, "context": { "source": "voice" @@ -2383,9 +2391,7 @@ "type": "object", "properties": { "seconds": { - "type": "number", - "minimum": 0, - "maximum": 1800 + "type": "number" }, "relative": { "const": true @@ -2400,7 +2406,18 @@ "then": { "properties": { "seconds": { - "minimum": 0 + "type": "number", + "minimum": 0, + "maximum": 86400 + } + } + }, + "else": { + "properties": { + "seconds": { + "type": "number", + "minimum": -43200, + "maximum": 43200 } } } @@ -2521,7 +2538,7 @@ ], "examples": [ { - "action": "closedcaptions", + "action": "closed-captions", "data": { "value": false }, @@ -2530,7 +2547,7 @@ } }, { - "action": "closedcaptions", + "action": "closed-captions", "data": { "toggle": true }, @@ -2540,9 +2557,9 @@ } ] }, - "VoiceGuideanceIntent": { + "VoiceGuidanceIntent": { "description": "A Firebolt compliant representation of a user intention to enable/disable voice guidance.", - "title": "VoiceGuideanceIntent", + "title": "VoiceGuidanceIntent", "allOf": [ { "$ref": "#/definitions/Intent" @@ -2592,6 +2609,7 @@ "then": { "properties": { "speed": { + "type": "integer", "minimum": -10, "maximum": 10 } @@ -2600,6 +2618,7 @@ "else": { "properties": { "speed": { + "type": "integer", "exclusiveMinimum": 0, "maximum": 10 } @@ -2607,11 +2626,13 @@ } }, "else": { - "required": [ "toggle" ], - "not": { - "required": [ - "speed" - ] + "if": { + "required": [ "toggle" ] + }, + "then": { + "not": { + "required": [ "value" ] + } } }, "additionalProperties": false @@ -2801,8 +2822,15 @@ "maximum": 10 } }, - "maxProperties": 1, - "minProperties": 1, + "if": { + "required": [ + "toggle" + ] + }, + "then": { + "type": "object", + "maxProperties": 1 + }, "additionalProperties": false } } @@ -2810,7 +2838,7 @@ ], "examples": [ { - "action": "power", + "action": "screen-magnification", "data": { "value": false }, @@ -2819,7 +2847,17 @@ } }, { - "action": "power", + "action": "screen-magnification", + "data": { + "value": true, + "scale": 2.5 + }, + "context": { + "source": "voice" + } + }, + { + "action": "screen-magnification", "data": { "toggle": true }, @@ -2828,10 +2866,9 @@ } }, { - "action": "power", + "action": "screen-magnification", "data": { - "value": false, - "delay": "900" + "value": false }, "context": { "source": "voice"