Skip to content

Commit

Permalink
feat: Spec and Doc fixes for Release 1.4.0 (#304)
Browse files Browse the repository at this point in the history
* feat: Included an array of suggested entities to the Search Intent as well as description changes
  • Loading branch information
kevinshahfws authored Sep 3, 2024
1 parent c80b741 commit 191664b
Show file tree
Hide file tree
Showing 10 changed files with 75 additions and 26 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/release-github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,15 @@ jobs:
npm run dist
- name: Check if semantic-release created a build
id: check_build
uses: andstor/file-existence-action@v2
uses: actions/github-script@v6
with:
files: './src/sdks/core/dist/lib/firebolt.mjs'
script: |
const fs = require('fs');
const path = './src/sdks/core/dist/lib/firebolt.mjs';
return fs.existsSync(path);
- name: File Existence Output
run: |
echo "File exists: ${{ steps.check_build.outputs.result }}"
- name: Release Firebolt SDKs to NPM
if: steps.check_build.outputs.files_exists == 'true' && github.event_name != 'pull_request' && (github.ref_name != 'main' || github.event_name == 'workflow_dispatch')
env:
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"devDependencies": {
"@commitlint/cli": "^17.0.3",
"@commitlint/config-conventional": "^17.0.3",
"@firebolt-js/openrpc": "3.1.1-next.2",
"@firebolt-js/openrpc": "3.1.1",
"@firebolt-js/schemas": "2.0.0",
"@saithodev/semantic-release-backmerge": "^3.2.0",
"@semantic-release/changelog": "^6.0.1",
Expand Down
8 changes: 4 additions & 4 deletions src/openrpc/device.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
{
"name": "distributor",
"summary": "Get the distributor ID for this device",
"summary": "Get the name of the entity which is distributing the current device. There can be multiple distributors which distribute the same device model.",
"params": [],
"tags": [
{
Expand Down Expand Up @@ -74,7 +74,7 @@
},
{
"name": "platform",
"summary": "Get the platform ID for this device",
"summary": "Get a transient platform identifier for the device. This API should be used to correlate metrics on the device only and cannot be guaranteed to have consistent responses across platforms.",
"params": [],
"tags": [
{
Expand Down Expand Up @@ -173,7 +173,7 @@
},
{
"name": "model",
"summary": "Get the device model",
"summary": "Get the manufacturer designated model of the device",
"params": [],
"tags": [
{
Expand Down Expand Up @@ -239,7 +239,7 @@
},
{
"name": "make",
"summary": "Get the device make",
"summary": "Get the manufacturer of the device model",
"params": [],
"tags": [
{
Expand Down
41 changes: 39 additions & 2 deletions src/openrpc/discovery.json
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@
},
{
"name": "progress",
"summary": "How much of the content has been watched (percentage as 0-1 for VOD, number of seconds for live)",
"summary": "How much of the content has been watched (percentage as (0-0.999) for VOD, number of seconds for live)",
"schema": {
"type": "number",
"minimum": 0
Expand Down Expand Up @@ -1181,7 +1181,7 @@
"params": [
{
"name": "appId",
"value": "xrn:firebolt:application-type:settings "
"value": "xrn:firebolt:application-type:settings"
},
{
"name": "intent",
Expand Down Expand Up @@ -1250,6 +1250,43 @@
"name": "success",
"value": true
}
},
{
"name": "Launch the Aggregated Experience to it's search screen.",
"params": [
{
"name": "appId",
"value": "xrn:firebolt:application-type:main"
},
{
"name": "intent",
"value": {
"action": "search",
"data": {
"query": "a cool show",
"suggestions": [
{
"entityType": "program",
"programType": "movie",
"entityId": "xyz"
},
{
"entityType": "music",
"musicType": "song",
"entityId": "abc"
}
]
},
"context": {
"source": "voice"
}
}
}
],
"result": {
"name": "success",
"value": true
}
}
]
},
Expand Down
8 changes: 4 additions & 4 deletions src/openrpc/localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -298,15 +298,15 @@
]
}
],
"summary": "Get any platform-specific localization information, in an Map<string, string>",
"summary": "Get any platform-specific localization information",
"params": [],
"result": {
"name": "info",
"summary": "the additional info",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string",
"type": ["number", "string", "boolean"],
"maxLength": 1024
},
"maxProperties": 32
Expand Down Expand Up @@ -346,9 +346,9 @@
},
{
"name": "value",
"summary": "Value to be set for additionalInfo",
"summary": "Value to be set for additionalInfo. Value can be a number, string or boolean",
"schema": {
"type": "string"
"type": ["number", "string", "boolean"]
},
"required": true
}
Expand Down
2 changes: 1 addition & 1 deletion src/openrpc/second_screen.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{
"name": "capabilities",
"x-uses": [
"xrn:firebolt:capability:device:info"
"xrn:firebolt:capability:secondscreen:protocol"
]
}
],
Expand Down
8 changes: 7 additions & 1 deletion src/schemas/intents.json
Original file line number Diff line number Diff line change
Expand Up @@ -609,10 +609,16 @@
"properties": {
"query": {
"type": "string"
},
"suggestions": {
"type": "array",
"items": {
"$ref": "https://meta.comcast.com/firebolt/entity#/definitions/Entity"
}
}
},
"additionalProperties": false
}
}
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion src/sdks/core/sdk.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"module": "SecondScreen",
"use": [
"xrn:firebolt:capability:protocol:dial",
"xrn:firebolt:capability:device:info"
"xrn:firebolt:capability:secondscreen:protocol"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions src/sdks/core/test/suite/device.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,17 @@ test("Device.make()", () => {
});

test("Device.hdcp()", () => {
const expectedOutput: Device.BooleanMap = {
const expectedOutput: Device.HDCPVersionMap = {
"hdcp1.4": true,
"hdcp2.2": true,
};
return Device.hdcp().then((res: Device.BooleanMap) => {
return Device.hdcp().then((res: Device.HDCPVersionMap) => {
expect(res).toEqual(expectedOutput);
});
});

test("Device.hdcp(subscriber)", () => {
return Device.hdcp((supportedHdrProfiles: Device.BooleanMap) => {}).then(
return Device.hdcp((supportedHdrProfiles: Device.HDCPVersionMap) => {}).then(
(res: number) => {
expect(res > 0).toBe(true);
}
Expand Down

0 comments on commit 191664b

Please sign in to comment.